1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function customCommand(command, kernel, args) {
|
4 | if (typeof command === 'string') {
|
5 | const options = {};
|
6 | const excludeKeys = ['_', 'version', 'v', 'help', 'h'];
|
7 | Object.keys(args).forEach(key => {
|
8 | if (!excludeKeys.includes(key)) {
|
9 | options[key] = args[key];
|
10 | }
|
11 | });
|
12 | kernel.run({
|
13 | name: command,
|
14 | opts: {
|
15 | _: args._,
|
16 | options,
|
17 | isHelp: args.h
|
18 | }
|
19 | });
|
20 | }
|
21 | }
|
22 | exports.default = customCommand;
|
23 |
|
\ | No newline at end of file |