1 | "use strict";
|
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3 | return new (P || (P = Promise))(function (resolve, reject) {
|
4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
7 | step((generator = generator.apply(thisArg, _arguments)).next());
|
8 | });
|
9 | };
|
10 | const cli_utils_1 = require("@ionic/cli-utils");
|
11 | const commands_1 = require("./commands");
|
12 | function run(pargv, env) {
|
13 | return __awaiter(this, void 0, void 0, function* () {
|
14 | const packageNamespace = new commands_1.PackageNamespace();
|
15 | const commandEnvironment = yield cli_utils_1.createCommandEnvironment(pargv, env, packageNamespace);
|
16 | yield cli_utils_1.runCommand(commandEnvironment);
|
17 | });
|
18 | }
|
19 | exports.run = run;
|
20 | function getAllCommandMetadata() {
|
21 | const packageNamespace = new commands_1.PackageNamespace();
|
22 | return cli_utils_1.getCommandMetadataList(packageNamespace);
|
23 | }
|
24 | exports.getAllCommandMetadata = getAllCommandMetadata;
|