2023-12-20 11:08:07 -08:00
|
|
|
import BaseCommand from './base-command';
|
2020-11-07 15:59:37 +00:00
|
|
|
const { _ } = require('@joplin/lib/locale');
|
2021-08-11 16:23:37 +01:00
|
|
|
const versionInfo = require('@joplin/lib/versionInfo').default;
|
2017-07-10 20:03:46 +00:00
|
|
|
|
|
|
|
class Command extends BaseCommand {
|
2023-12-20 11:08:07 -08:00
|
|
|
public override usage() {
|
2017-07-10 20:03:46 +00:00
|
|
|
return 'version';
|
|
|
|
}
|
|
|
|
|
2023-12-20 11:08:07 -08:00
|
|
|
public override description() {
|
2017-07-18 18:21:03 +00:00
|
|
|
return _('Displays version information');
|
2017-07-10 20:03:46 +00:00
|
|
|
}
|
|
|
|
|
2023-12-20 11:08:07 -08:00
|
|
|
public override async action() {
|
2023-02-08 22:16:09 +08:00
|
|
|
this.stdout(versionInfo(require('./package.json'), {}).message);
|
2017-07-10 20:03:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-30 09:35:42 +02:00
|
|
|
module.exports = Command;
|