mirror of
https://github.com/zadam/trilium.git
synced 2025-01-18 04:59:56 +08:00
expose app info on the backend script api #345
This commit is contained in:
parent
06b8a82f70
commit
0308b13460
1 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,7 @@ const repository = require('./repository');
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const cloningService = require('./cloning');
|
const cloningService = require('./cloning');
|
||||||
const messagingService = require('./messaging');
|
const messagingService = require('./messaging');
|
||||||
|
const appInfo = require('./app_info');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the main backend API interface for scripts. It's published in the local "api" object.
|
* This is the main backend API interface for scripts. It's published in the local "api" object.
|
||||||
|
@ -234,6 +235,11 @@ function BackendScriptApi(startNote, currentNote, originEntity) {
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
this.refreshTree = () => messagingService.sendMessageToAllClients({ type: 'refresh-tree' });
|
this.refreshTree = () => messagingService.sendMessageToAllClients({ type: 'refresh-tree' });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||||
|
*/
|
||||||
|
this.getAppInfo = () => appInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = BackendScriptApi;
|
module.exports = BackendScriptApi;
|
Loading…
Reference in a new issue