UNPKG

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