1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const util_1 = require("@kano/kit-app-shell-core/lib/util");
|
4 | const log_1 = require("@kano/kit-app-shell-core/lib/log");
|
5 | const argv_1 = require("./argv");
|
6 | function 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 | }
|
21 | exports.default = runCommand;
|
22 |
|
\ | No newline at end of file |