--version in dbmodel

This commit is contained in:
Jan Prochazka 2024-06-21 15:22:32 +02:00
parent 0c12dcaf16
commit a8999855bf
2 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,7 @@ if (processArgs.listenApi) {
const shell = require('./shell/index'); const shell = require('./shell/index');
const dbgateTools = require('dbgate-tools'); const dbgateTools = require('dbgate-tools');
const currentVersion = require('./currentVersion');
global['DBGATE_TOOLS'] = dbgateTools; global['DBGATE_TOOLS'] = dbgateTools;
@ -116,6 +117,7 @@ module.exports = {
...shell, ...shell,
getLogger, getLogger,
configureLogger, configureLogger,
currentVersion,
// loadLogsContent, // loadLogsContent,
getMainModule: () => require('./main'), getMainModule: () => require('./main'),
}; };

View File

@ -26,6 +26,8 @@ async function runAndExit(promise) {
} }
} }
program.version(dbgateApi.currentVersion.version);
program program
.option('-s, --server <server>', 'server host') .option('-s, --server <server>', 'server host')
.option('-u, --user <user>', 'user name') .option('-u, --user <user>', 'user name')