version.js 662 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.VersionCommand = void 0;
  4. const command_1 = require("../lib/command");
  5. class VersionCommand extends command_1.Command {
  6. async getMetadata() {
  7. return {
  8. name: 'version',
  9. type: 'global',
  10. summary: 'Returns the current CLI version',
  11. groups: ["hidden" /* MetadataGroup.HIDDEN */],
  12. };
  13. }
  14. async run(inputs, options) {
  15. // can't use logger--see https://github.com/ionic-team/ionic-cli/issues/2507
  16. process.stdout.write(this.env.ctx.version + '\n');
  17. }
  18. }
  19. exports.VersionCommand = VersionCommand;