state.js 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.StateCommand = void 0;
  4. const utils_terminal_1 = require("@ionic/utils-terminal");
  5. const constants_1 = require("../constants");
  6. const color_1 = require("../lib/color");
  7. const command_1 = require("../lib/command");
  8. const errors_1 = require("../lib/errors");
  9. class StateCommand extends command_1.Command {
  10. async getMetadata() {
  11. return {
  12. name: 'state',
  13. type: 'global',
  14. summary: '',
  15. groups: ["hidden" /* MetadataGroup.HIDDEN */],
  16. };
  17. }
  18. async run() {
  19. const data = [
  20. [`${(0, utils_terminal_1.indent)(4)}${(0, color_1.input)('ionic cordova platform save')}`, `save existing installed platforms to ${(0, color_1.strong)('config.xml')}`],
  21. [`${(0, utils_terminal_1.indent)(4)}${(0, color_1.input)('ionic cordova plugin save')}`, `save existing installed plugins to ${(0, color_1.strong)('config.xml')}`],
  22. [`${(0, utils_terminal_1.indent)(4)}${(0, color_1.input)('ionic cordova platform --help')}`, `view help page for managing Cordova platforms`],
  23. [`${(0, utils_terminal_1.indent)(4)}${(0, color_1.input)('ionic cordova plugin --help')}`, `view help page for managing Cordova plugins`],
  24. [`${(0, utils_terminal_1.indent)(4)}${(0, color_1.input)('ionic cordova prepare')}`, `install platforms and plugins listed in ${(0, color_1.strong)('config.xml')}`],
  25. ];
  26. throw new errors_1.FatalException(`${(0, color_1.input)('ionic state')} has been removed.\n\n` +
  27. `We recommend using Cordova directly to manage Cordova plugins and platforms.\n` +
  28. `The following commands fulfill the old ${(0, color_1.input)('ionic state')} functionality:\n\n` +
  29. `${(0, utils_terminal_1.columnar)(data, constants_1.COLUMNAR_OPTIONS)}\n\n` +
  30. `See ${(0, color_1.strong)('https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/')} for detailed information.\n`);
  31. }
  32. }
  33. exports.StateCommand = StateCommand;