@shell-shock/core 0.17.8 → 0.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/api.cjs +36 -1
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +2 -77
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +2 -76
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +35 -1
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +291 -1
- package/dist/components/command-validation-logic.cjs.map +1 -0
- package/dist/components/command-validation-logic.d.cts +1 -3
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +1 -3
- package/dist/components/command-validation-logic.d.mts.map +1 -1
- package/dist/components/command-validation-logic.mjs +288 -1
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +265 -1
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +4 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +4 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +256 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +429 -15
- package/dist/components/exec-builtin.cjs.map +1 -0
- package/dist/components/exec-builtin.d.cts +1 -2
- package/dist/components/exec-builtin.d.cts.map +1 -1
- package/dist/components/exec-builtin.d.mts +1 -2
- package/dist/components/exec-builtin.d.mts.map +1 -1
- package/dist/components/exec-builtin.mjs +424 -15
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +119 -1
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +6 -8
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +6 -8
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +111 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +58 -1
- package/dist/components/index.mjs +10 -1
- package/dist/components/options-parser-logic.cjs +959 -5
- package/dist/components/options-parser-logic.cjs.map +1 -0
- package/dist/components/options-parser-logic.d.cts +8 -9
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +8 -9
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +944 -5
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +630 -8
- package/dist/components/state-builtin.cjs.map +1 -0
- package/dist/components/state-builtin.d.cts +4 -5
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +4 -5
- package/dist/components/state-builtin.d.mts.map +1 -1
- package/dist/components/state-builtin.mjs +622 -8
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +116 -1
- package/dist/components/usage.cjs.map +1 -0
- package/dist/components/usage.d.cts +1 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +1 -2
- package/dist/components/usage.d.mts.map +1 -1
- package/dist/components/usage.mjs +113 -1
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +839 -33
- package/dist/components/utils-builtin.cjs.map +1 -0
- package/dist/components/utils-builtin.d.cts +7 -8
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +7 -8
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +828 -33
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +65 -1
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +29 -8
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +29 -8
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +62 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +26 -1
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts.map +1 -1
- package/dist/contexts/command.mjs +23 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/index.cjs +9 -1
- package/dist/contexts/index.mjs +4 -1
- package/dist/contexts/options.cjs +63 -1
- package/dist/contexts/options.cjs.map +1 -0
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +57 -1
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/engine.cjs +138 -0
- package/dist/engine.cjs.map +1 -0
- package/dist/engine.d.cts +79 -0
- package/dist/engine.d.cts.map +1 -0
- package/dist/engine.d.mts +79 -0
- package/dist/engine.d.mts.map +1 -0
- package/dist/engine.mjs +136 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/helpers/automd.cjs +70 -1
- package/dist/helpers/automd.cjs.map +1 -0
- package/dist/helpers/automd.mjs +69 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +23 -1
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +22 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/get-framework.cjs +24 -0
- package/dist/helpers/get-framework.cjs.map +1 -0
- package/dist/helpers/get-framework.mjs +24 -0
- package/dist/helpers/get-framework.mjs.map +1 -0
- package/dist/helpers/paths.cjs +137 -1
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +133 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +113 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +112 -1
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +65 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +63 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +95 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +93 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +71 -1
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +69 -1
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +123 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +80 -5
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +80 -5
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +119 -1
- package/dist/index.mjs.map +1 -0
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/plugin-utils/compute-bin.cjs +48 -1
- package/dist/plugin-utils/compute-bin.cjs.map +1 -0
- package/dist/plugin-utils/compute-bin.d.cts +2 -2
- package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
- package/dist/plugin-utils/compute-bin.d.mts +2 -2
- package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
- package/dist/plugin-utils/compute-bin.mjs +47 -1
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +224 -1
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +4 -4
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +4 -4
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +214 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +70 -1
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +5 -5
- package/dist/plugin-utils/deepkit.d.cts.map +1 -1
- package/dist/plugin-utils/deepkit.d.mts +5 -5
- package/dist/plugin-utils/deepkit.d.mts.map +1 -1
- package/dist/plugin-utils/deepkit.mjs +68 -1
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +112 -2
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/description-helpers.mjs +107 -2
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +118 -1
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/get-command-tree.mjs +114 -1
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +39 -1
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +10 -1
- package/dist/plugin-utils/reflect.cjs +52 -1
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -1
- package/dist/plugin-utils/reflect.d.mts.map +1 -1
- package/dist/plugin-utils/reflect.mjs +50 -1
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +65 -1
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.mjs +62 -1
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +222 -1
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +5 -5
- package/dist/plugin-utils/type-checks.d.cts.map +1 -1
- package/dist/plugin-utils/type-checks.d.mts +5 -5
- package/dist/plugin-utils/type-checks.d.mts.map +1 -1
- package/dist/plugin-utils/type-checks.mjs +217 -1
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +495 -4
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +488 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +182 -1
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +178 -1
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +479 -1
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +478 -1
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +402 -1
- package/dist/types/command.cjs.map +1 -0
- package/dist/types/command.d.cts +61 -119
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +61 -119
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +367 -1
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +175 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +19 -12
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +19 -12
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +163 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +45 -1
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +3 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +3 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +40 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +53 -1
- package/dist/types/env.cjs.map +1 -0
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +50 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +53 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +6 -1
- package/dist/types/options.cjs +13 -1
- package/dist/types/options.cjs.map +1 -0
- package/dist/types/options.d.cts.map +1 -1
- package/dist/types/options.d.mts.map +1 -1
- package/dist/types/options.mjs +10 -1
- package/dist/types/options.mjs.map +1 -1
- package/package.json +43 -34
- package/dist/resolver/deepkit.cjs +0 -1
- package/dist/resolver/deepkit.mjs +0 -2
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/module.cjs +0 -1
- package/dist/resolver/module.mjs +0 -2
- package/dist/resolver/module.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validations.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"validations.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,123 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_config = require('./config.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const __ΩPartial = [
|
|
6
|
+
"T",
|
|
7
|
+
"Partial",
|
|
8
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
9
|
+
];
|
|
10
|
+
const __ΩRecord = [
|
|
11
|
+
"K",
|
|
12
|
+
"T",
|
|
13
|
+
"Record",
|
|
14
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* A utility function to define a Shell Shock command's metadata.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { defineMetadata } from '@shell-shock/core';
|
|
25
|
+
*
|
|
26
|
+
* export const metadata = defineMetadata({
|
|
27
|
+
* name: 'my-command',
|
|
28
|
+
* title: 'My Custom Command',
|
|
29
|
+
* icon: '🗲',
|
|
30
|
+
* description: 'This is my custom command',
|
|
31
|
+
* alias: ['mc', 'my-cmd'],
|
|
32
|
+
* tags: ['custom', 'example']
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @param metadata - A partial user configuration object.
|
|
37
|
+
* @returns A complete user configuration object.
|
|
38
|
+
*/
|
|
39
|
+
function defineMetadata(metadata) {
|
|
40
|
+
return metadata;
|
|
41
|
+
}
|
|
42
|
+
defineMetadata.__type = [
|
|
43
|
+
() => __ΩPartial,
|
|
44
|
+
"CommandMetadata",
|
|
45
|
+
"metadata",
|
|
46
|
+
"defineMetadata",
|
|
47
|
+
"A utility function to define a Shell Shock command's metadata.",
|
|
48
|
+
"P\"w\"o!\"2#\"w\"/$?%"
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* A utility function to define a Shell Shock command's options.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { defineOptions } from '@shell-shock/core';
|
|
59
|
+
*
|
|
60
|
+
* export const options = defineOptions({
|
|
61
|
+
* verbose: {
|
|
62
|
+
* name: 'verbose',
|
|
63
|
+
* description: 'Enable verbose output',
|
|
64
|
+
* type: 'boolean'
|
|
65
|
+
* }
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param options - A record of command option configurations.
|
|
70
|
+
* @returns A complete record of command option configurations.
|
|
71
|
+
*/
|
|
72
|
+
function defineOptions(options) {
|
|
73
|
+
return options;
|
|
74
|
+
}
|
|
75
|
+
defineOptions.__type = [
|
|
76
|
+
() => __ΩRecord,
|
|
77
|
+
"CommandOptionConfig",
|
|
78
|
+
"options",
|
|
79
|
+
() => __ΩRecord,
|
|
80
|
+
"defineOptions",
|
|
81
|
+
"A utility function to define a Shell Shock command's options.",
|
|
82
|
+
"P&\"w\"o!#2#&\"w\"o$#/%?&"
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* A utility function to define a Shell Shock command's arguments.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* import { defineArguments } from '@shell-shock/core';
|
|
93
|
+
*
|
|
94
|
+
* export const args = defineArguments([
|
|
95
|
+
* {
|
|
96
|
+
* name: 'input',
|
|
97
|
+
* type: 'string',
|
|
98
|
+
* description: 'The input file',
|
|
99
|
+
* required: true
|
|
100
|
+
* }
|
|
101
|
+
* ]);
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @param args - An array of command argument configurations.
|
|
105
|
+
* @returns A complete array of command argument configurations.
|
|
106
|
+
*/
|
|
107
|
+
function defineArguments(args) {
|
|
108
|
+
return args;
|
|
109
|
+
}
|
|
110
|
+
defineArguments.__type = [
|
|
111
|
+
"CommandArgumentConfig",
|
|
112
|
+
"args",
|
|
113
|
+
"defineArguments",
|
|
114
|
+
"A utility function to define a Shell Shock command's arguments.",
|
|
115
|
+
"P\"w!F2\"\"w!F/#?$"
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
//#endregion
|
|
119
|
+
exports.defineArguments = defineArguments;
|
|
120
|
+
exports.defineConfig = require_config.defineConfig;
|
|
121
|
+
exports.defineMetadata = defineMetadata;
|
|
122
|
+
exports.defineOptions = defineOptions;
|
|
123
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig } from "./types/config.cjs";
|
|
1
|
+
import { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter } from "./types/command.cjs";
|
|
2
|
+
import { Context, ExecutionContext, UnresolvedContext } from "./types/context.cjs";
|
|
3
|
+
import { EngineOptions, Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.cjs";
|
|
5
4
|
import { BaseCommandOptions } from "./types/options.cjs";
|
|
6
|
-
|
|
5
|
+
import { defineConfig } from "./config.cjs";
|
|
6
|
+
|
|
7
|
+
//#region src/index.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* A utility function to define a Shell Shock command's metadata.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { defineMetadata } from '@shell-shock/core';
|
|
17
|
+
*
|
|
18
|
+
* export const metadata = defineMetadata({
|
|
19
|
+
* name: 'my-command',
|
|
20
|
+
* title: 'My Custom Command',
|
|
21
|
+
* icon: '🗲',
|
|
22
|
+
* description: 'This is my custom command',
|
|
23
|
+
* alias: ['mc', 'my-cmd'],
|
|
24
|
+
* tags: ['custom', 'example']
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param metadata - A partial user configuration object.
|
|
29
|
+
* @returns A complete user configuration object.
|
|
30
|
+
*/
|
|
31
|
+
declare function defineMetadata(metadata: Partial<CommandMetadata>): CommandMetadata;
|
|
32
|
+
/**
|
|
33
|
+
* A utility function to define a Shell Shock command's options.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { defineOptions } from '@shell-shock/core';
|
|
41
|
+
*
|
|
42
|
+
* export const options = defineOptions({
|
|
43
|
+
* verbose: {
|
|
44
|
+
* name: 'verbose',
|
|
45
|
+
* description: 'Enable verbose output',
|
|
46
|
+
* type: 'boolean'
|
|
47
|
+
* }
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param options - A record of command option configurations.
|
|
52
|
+
* @returns A complete record of command option configurations.
|
|
53
|
+
*/
|
|
54
|
+
declare function defineOptions(options: Record<string, CommandOptionConfig>): Record<string, CommandOptionConfig>;
|
|
55
|
+
/**
|
|
56
|
+
* A utility function to define a Shell Shock command's arguments.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { defineArguments } from '@shell-shock/core';
|
|
64
|
+
*
|
|
65
|
+
* export const args = defineArguments([
|
|
66
|
+
* {
|
|
67
|
+
* name: 'input',
|
|
68
|
+
* type: 'string',
|
|
69
|
+
* description: 'The input file',
|
|
70
|
+
* required: true
|
|
71
|
+
* }
|
|
72
|
+
* ]);
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param args - An array of command argument configurations.
|
|
76
|
+
* @returns A complete array of command argument configurations.
|
|
77
|
+
*/
|
|
78
|
+
declare function defineArguments(args: CommandArgumentConfig[]): CommandArgumentConfig[];
|
|
79
|
+
//#endregion
|
|
80
|
+
export { type AsCommandParameterConfig, type BaseBooleanCommandParameter, type BaseCommandOptions, type BaseCommandParameter, type BaseNumberCommandParameter, type BaseSingleCommandParameter, type BaseStringCommandParameter, type BaseVariadicCommandParameter, type BooleanCommandOption, type BooleanCommandParameter, type BooleanCommandParameterConfig, type CommandArgument, type CommandArgumentConfig, type CommandBase, type CommandConfig, type CommandMetadata, type CommandModule, type CommandOption, type CommandOptionConfig, type CommandParameter, type CommandParameterConfig, type CommandParameterType, type CommandTree, type Context, type EngineOptions, type ExecutionContext, type NumberCommandParameter, type NumberCommandParameterConfig, type Options, type OutputConfig, type ReferenceOptions, type ResolvedConfig, type SerializedCommandTree, type SingleBooleanCommandParameter, type SingleNumberCommandParameter, type SingleStringCommandParameter, type StringCommandParameter, type StringCommandParameterConfig, type UnresolvedContext, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type VariadicBooleanCommandParameter, type VariadicNumberCommandParameter, type VariadicStringCommandParameter, defineArguments, defineConfig, defineMetadata, defineOptions };
|
|
81
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAkDA;;;;;;;;;;;;;AAEkB;AA0BlB;;;;iBA5BgB,cAAA,CACd,QAAA,EAAU,OAAA,CAAQ,eAAA,IACjB,eAAA;;;;;;;;;;;AA4BkC;AA2BrC;;;;;;;;AAEwB;;;iBA/BR,aAAA,CACd,OAAA,EAAS,MAAA,SAAe,mBAAA,IACvB,MAAA,SAAe,mBAAA;;;;;;;;;;;;;;;;;;;;;;;;iBA2BF,eAAA,CACd,IAAA,EAAM,qBAAA,KACL,qBAAqB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig } from "./types/config.mjs";
|
|
1
|
+
import { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter } from "./types/command.mjs";
|
|
2
|
+
import { Context, ExecutionContext, UnresolvedContext } from "./types/context.mjs";
|
|
3
|
+
import { EngineOptions, Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.mjs";
|
|
5
4
|
import { BaseCommandOptions } from "./types/options.mjs";
|
|
6
|
-
|
|
5
|
+
import { defineConfig } from "./config.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/index.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* A utility function to define a Shell Shock command's metadata.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { defineMetadata } from '@shell-shock/core';
|
|
17
|
+
*
|
|
18
|
+
* export const metadata = defineMetadata({
|
|
19
|
+
* name: 'my-command',
|
|
20
|
+
* title: 'My Custom Command',
|
|
21
|
+
* icon: '🗲',
|
|
22
|
+
* description: 'This is my custom command',
|
|
23
|
+
* alias: ['mc', 'my-cmd'],
|
|
24
|
+
* tags: ['custom', 'example']
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param metadata - A partial user configuration object.
|
|
29
|
+
* @returns A complete user configuration object.
|
|
30
|
+
*/
|
|
31
|
+
declare function defineMetadata(metadata: Partial<CommandMetadata>): CommandMetadata;
|
|
32
|
+
/**
|
|
33
|
+
* A utility function to define a Shell Shock command's options.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { defineOptions } from '@shell-shock/core';
|
|
41
|
+
*
|
|
42
|
+
* export const options = defineOptions({
|
|
43
|
+
* verbose: {
|
|
44
|
+
* name: 'verbose',
|
|
45
|
+
* description: 'Enable verbose output',
|
|
46
|
+
* type: 'boolean'
|
|
47
|
+
* }
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param options - A record of command option configurations.
|
|
52
|
+
* @returns A complete record of command option configurations.
|
|
53
|
+
*/
|
|
54
|
+
declare function defineOptions(options: Record<string, CommandOptionConfig>): Record<string, CommandOptionConfig>;
|
|
55
|
+
/**
|
|
56
|
+
* A utility function to define a Shell Shock command's arguments.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { defineArguments } from '@shell-shock/core';
|
|
64
|
+
*
|
|
65
|
+
* export const args = defineArguments([
|
|
66
|
+
* {
|
|
67
|
+
* name: 'input',
|
|
68
|
+
* type: 'string',
|
|
69
|
+
* description: 'The input file',
|
|
70
|
+
* required: true
|
|
71
|
+
* }
|
|
72
|
+
* ]);
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param args - An array of command argument configurations.
|
|
76
|
+
* @returns A complete array of command argument configurations.
|
|
77
|
+
*/
|
|
78
|
+
declare function defineArguments(args: CommandArgumentConfig[]): CommandArgumentConfig[];
|
|
79
|
+
//#endregion
|
|
80
|
+
export { type AsCommandParameterConfig, type BaseBooleanCommandParameter, type BaseCommandOptions, type BaseCommandParameter, type BaseNumberCommandParameter, type BaseSingleCommandParameter, type BaseStringCommandParameter, type BaseVariadicCommandParameter, type BooleanCommandOption, type BooleanCommandParameter, type BooleanCommandParameterConfig, type CommandArgument, type CommandArgumentConfig, type CommandBase, type CommandConfig, type CommandMetadata, type CommandModule, type CommandOption, type CommandOptionConfig, type CommandParameter, type CommandParameterConfig, type CommandParameterType, type CommandTree, type Context, type EngineOptions, type ExecutionContext, type NumberCommandParameter, type NumberCommandParameterConfig, type Options, type OutputConfig, type ReferenceOptions, type ResolvedConfig, type SerializedCommandTree, type SingleBooleanCommandParameter, type SingleNumberCommandParameter, type SingleStringCommandParameter, type StringCommandParameter, type StringCommandParameterConfig, type UnresolvedContext, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type VariadicBooleanCommandParameter, type VariadicNumberCommandParameter, type VariadicStringCommandParameter, defineArguments, defineConfig, defineMetadata, defineOptions };
|
|
81
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":""}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,119 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineConfig } from "./config.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const __ΩPartial = [
|
|
5
|
+
"T",
|
|
6
|
+
"Partial",
|
|
7
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
8
|
+
];
|
|
9
|
+
const __ΩRecord = [
|
|
10
|
+
"K",
|
|
11
|
+
"T",
|
|
12
|
+
"Record",
|
|
13
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* A utility function to define a Shell Shock command's metadata.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { defineMetadata } from '@shell-shock/core';
|
|
24
|
+
*
|
|
25
|
+
* export const metadata = defineMetadata({
|
|
26
|
+
* name: 'my-command',
|
|
27
|
+
* title: 'My Custom Command',
|
|
28
|
+
* icon: '🗲',
|
|
29
|
+
* description: 'This is my custom command',
|
|
30
|
+
* alias: ['mc', 'my-cmd'],
|
|
31
|
+
* tags: ['custom', 'example']
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param metadata - A partial user configuration object.
|
|
36
|
+
* @returns A complete user configuration object.
|
|
37
|
+
*/
|
|
38
|
+
function defineMetadata(metadata) {
|
|
39
|
+
return metadata;
|
|
40
|
+
}
|
|
41
|
+
defineMetadata.__type = [
|
|
42
|
+
() => __ΩPartial,
|
|
43
|
+
"CommandMetadata",
|
|
44
|
+
"metadata",
|
|
45
|
+
"defineMetadata",
|
|
46
|
+
"A utility function to define a Shell Shock command's metadata.",
|
|
47
|
+
"P\"w\"o!\"2#\"w\"/$?%"
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* A utility function to define a Shell Shock command's options.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { defineOptions } from '@shell-shock/core';
|
|
58
|
+
*
|
|
59
|
+
* export const options = defineOptions({
|
|
60
|
+
* verbose: {
|
|
61
|
+
* name: 'verbose',
|
|
62
|
+
* description: 'Enable verbose output',
|
|
63
|
+
* type: 'boolean'
|
|
64
|
+
* }
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param options - A record of command option configurations.
|
|
69
|
+
* @returns A complete record of command option configurations.
|
|
70
|
+
*/
|
|
71
|
+
function defineOptions(options) {
|
|
72
|
+
return options;
|
|
73
|
+
}
|
|
74
|
+
defineOptions.__type = [
|
|
75
|
+
() => __ΩRecord,
|
|
76
|
+
"CommandOptionConfig",
|
|
77
|
+
"options",
|
|
78
|
+
() => __ΩRecord,
|
|
79
|
+
"defineOptions",
|
|
80
|
+
"A utility function to define a Shell Shock command's options.",
|
|
81
|
+
"P&\"w\"o!#2#&\"w\"o$#/%?&"
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* A utility function to define a Shell Shock command's arguments.
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* import { defineArguments } from '@shell-shock/core';
|
|
92
|
+
*
|
|
93
|
+
* export const args = defineArguments([
|
|
94
|
+
* {
|
|
95
|
+
* name: 'input',
|
|
96
|
+
* type: 'string',
|
|
97
|
+
* description: 'The input file',
|
|
98
|
+
* required: true
|
|
99
|
+
* }
|
|
100
|
+
* ]);
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @param args - An array of command argument configurations.
|
|
104
|
+
* @returns A complete array of command argument configurations.
|
|
105
|
+
*/
|
|
106
|
+
function defineArguments(args) {
|
|
107
|
+
return args;
|
|
108
|
+
}
|
|
109
|
+
defineArguments.__type = [
|
|
110
|
+
"CommandArgumentConfig",
|
|
111
|
+
"args",
|
|
112
|
+
"defineArguments",
|
|
113
|
+
"A utility function to define a Shell Shock command's arguments.",
|
|
114
|
+
"P\"w!F2\"\"w!F/#?$"
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
export { defineArguments, defineConfig, defineMetadata, defineOptions };
|
|
119
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/package.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/package.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
const require_context_helpers = require('./context-helpers.cjs');
|
|
2
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
3
|
+
|
|
4
|
+
//#region src/plugin-utils/compute-bin.ts
|
|
5
|
+
function __assignType(fn, args) {
|
|
6
|
+
fn.__type = args;
|
|
7
|
+
return fn;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Computes the command tree for the root binary command based on the provided context.
|
|
11
|
+
*
|
|
12
|
+
* @param context - The plugin context containing the necessary information to compute the command tree.
|
|
13
|
+
* @returns The computed command tree for the root binary command.
|
|
14
|
+
*/
|
|
15
|
+
function computeBin(context) {
|
|
16
|
+
return {
|
|
17
|
+
id: "",
|
|
18
|
+
name: require_context_helpers.getAppName(context),
|
|
19
|
+
title: require_context_helpers.getAppTitle(context),
|
|
20
|
+
description: require_context_helpers.getAppDescription(context),
|
|
21
|
+
virtual: true,
|
|
22
|
+
path: null,
|
|
23
|
+
segments: [],
|
|
24
|
+
alias: [],
|
|
25
|
+
tags: [],
|
|
26
|
+
options: Object.fromEntries(context.globalOptions.map(__assignType((option) => [option.name, option], [
|
|
27
|
+
"option",
|
|
28
|
+
"",
|
|
29
|
+
"P\"2!\"/\""
|
|
30
|
+
]))),
|
|
31
|
+
args: [],
|
|
32
|
+
entry: { file: (0, _stryke_path_join_paths.joinPaths)(context.entryPath, "bin.ts") },
|
|
33
|
+
parent: null,
|
|
34
|
+
children: context.commands
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
computeBin.__type = [
|
|
38
|
+
"Context",
|
|
39
|
+
"context",
|
|
40
|
+
"CommandTree",
|
|
41
|
+
"computeBin",
|
|
42
|
+
"Computes the command tree for the root binary command based on the provided context.",
|
|
43
|
+
"P\"w!2\"\"w#/$?%"
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.computeBin = computeBin;
|
|
48
|
+
//# sourceMappingURL=compute-bin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-bin.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -2,10 +2,10 @@ import { CommandTree } from "../types/command.cjs";
|
|
|
2
2
|
import { Context } from "../types/context.cjs";
|
|
3
3
|
//#region src/plugin-utils/compute-bin.d.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Computes the command tree for the root binary command based on the provided context.
|
|
6
6
|
*
|
|
7
7
|
* @param context - The plugin context containing the necessary information to compute the command tree.
|
|
8
|
-
* @returns The computed command tree for the
|
|
8
|
+
* @returns The computed command tree for the root binary command.
|
|
9
9
|
*/
|
|
10
10
|
declare function computeBin(context: Context): CommandTree;
|
|
11
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-bin.d.cts","names":[],"sources":["../../src/plugin-utils/compute-bin.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"compute-bin.d.cts","names":[],"sources":["../../src/plugin-utils/compute-bin.ts"],"mappings":";;;;;;;AA4BA;;iBAAgB,UAAA,CAAW,OAAA,EAAS,OAAA,GAAU,WAAW"}
|
|
@@ -2,10 +2,10 @@ import { CommandTree } from "../types/command.mjs";
|
|
|
2
2
|
import { Context } from "../types/context.mjs";
|
|
3
3
|
//#region src/plugin-utils/compute-bin.d.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Computes the command tree for the root binary command based on the provided context.
|
|
6
6
|
*
|
|
7
7
|
* @param context - The plugin context containing the necessary information to compute the command tree.
|
|
8
|
-
* @returns The computed command tree for the
|
|
8
|
+
* @returns The computed command tree for the root binary command.
|
|
9
9
|
*/
|
|
10
10
|
declare function computeBin(context: Context): CommandTree;
|
|
11
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-bin.d.mts","names":[],"sources":["../../src/plugin-utils/compute-bin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute-bin.d.mts","names":[],"sources":["../../src/plugin-utils/compute-bin.ts"],"mappings":""}
|
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
import{getAppDescription
|
|
1
|
+
import { getAppDescription, getAppName, getAppTitle } from "./context-helpers.mjs";
|
|
2
|
+
import { joinPaths } from "@stryke/path/join-paths";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin-utils/compute-bin.ts
|
|
5
|
+
function __assignType(fn, args) {
|
|
6
|
+
fn.__type = args;
|
|
7
|
+
return fn;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Computes the command tree for the root binary command based on the provided context.
|
|
11
|
+
*
|
|
12
|
+
* @param context - The plugin context containing the necessary information to compute the command tree.
|
|
13
|
+
* @returns The computed command tree for the root binary command.
|
|
14
|
+
*/
|
|
15
|
+
function computeBin(context) {
|
|
16
|
+
return {
|
|
17
|
+
id: "",
|
|
18
|
+
name: getAppName(context),
|
|
19
|
+
title: getAppTitle(context),
|
|
20
|
+
description: getAppDescription(context),
|
|
21
|
+
virtual: true,
|
|
22
|
+
path: null,
|
|
23
|
+
segments: [],
|
|
24
|
+
alias: [],
|
|
25
|
+
tags: [],
|
|
26
|
+
options: Object.fromEntries(context.globalOptions.map(__assignType((option) => [option.name, option], [
|
|
27
|
+
"option",
|
|
28
|
+
"",
|
|
29
|
+
"P\"2!\"/\""
|
|
30
|
+
]))),
|
|
31
|
+
args: [],
|
|
32
|
+
entry: { file: joinPaths(context.entryPath, "bin.ts") },
|
|
33
|
+
parent: null,
|
|
34
|
+
children: context.commands
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
computeBin.__type = [
|
|
38
|
+
"Context",
|
|
39
|
+
"context",
|
|
40
|
+
"CommandTree",
|
|
41
|
+
"computeBin",
|
|
42
|
+
"Computes the command tree for the root binary command based on the provided context.",
|
|
43
|
+
"P\"w!2\"\"w#/$?%"
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { computeBin };
|
|
2
48
|
//# sourceMappingURL=compute-bin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-bin.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"compute-bin.mjs","names":[],"sources":[],"mappings":""}
|