UNPKG

826 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const util_1 = require("@kano/kit-app-shell-core/lib/util");
4const log_1 = require("@kano/kit-app-shell-core/lib/log");
5const argv_1 = require("./argv");
6function runCommand(command, platformId, argv) {
7 return util_1.util.platform.loadPlatformKey(platformId, command)
8 .then((platformCommand) => {
9 return argv_1.agregateArgv(argv, platformId, command)
10 .then((opts) => {
11 argv_1.addConfig(opts);
12 log_1.log.trace('OPTIONS', opts);
13 const result = platformCommand(opts);
14 if (result && 'then' in result) {
15 return result;
16 }
17 return Promise.resolve();
18 });
19 });
20}
21exports.default = runCommand;
22//# sourceMappingURL=command.js.map
\No newline at end of file