2017-07-10 20:03:46 +00:00
|
|
|
import { BaseCommand } from './base-command.js';
|
2017-07-11 00:17:03 +01:00
|
|
|
import { Setting } from 'lib/models/setting.js'
|
|
|
|
import { _ } from '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
|
|
|
}
|
|
|
|
|
2017-07-11 00:17:03 +01:00
|
|
|
async action(args) {
|
|
|
|
const p = require('./package.json');
|
2017-10-07 17:30:27 +01:00
|
|
|
this.stdout(_('%s %s (%s)', p.name, p.version, Setting.value('env')));
|
2017-07-10 20:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Command;
|