2017-11-03 00:09:34 +00:00
|
|
|
const { BaseCommand } = require('./base-command.js');
|
2017-12-14 18:12:14 +00:00
|
|
|
const Setting = require('lib/models/Setting.js');
|
2017-11-03 00:09:34 +00:00
|
|
|
const { _ } = require('lib/locale.js');
|
2017-07-10 20:03:46 +00:00
|
|
|
|
|
|
|
class Command extends BaseCommand {
|
|
|
|
usage() {
|
|
|
|
return 'version';
|
|
|
|
}
|
|
|
|
|
|
|
|
description() {
|
2017-07-18 18:21:03 +00:00
|
|
|
return _('Displays version information');
|
2017-07-10 20:03:46 +00:00
|
|
|
}
|
|
|
|
|
2019-09-12 22:16:42 +00:00
|
|
|
async action() {
|
2017-07-10 23:17:03 +00:00
|
|
|
const p = require('./package.json');
|
2017-10-07 16:30:27 +00:00
|
|
|
this.stdout(_('%s %s (%s)', p.name, p.version, Setting.value('env')));
|
2017-07-10 20:03:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-30 07:35:42 +00:00
|
|
|
module.exports = Command;
|