@shell-shock/core 0.17.21 → 0.17.23
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/README.md +16 -7
- package/dist/api.cjs +4 -5
- package/dist/api.d.cts +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.mjs +2 -2
- package/dist/command-B6KYexlV.d.mts +308 -0
- package/dist/command-B6KYexlV.d.mts.map +1 -0
- package/dist/command-CtfR7hKM.d.cts +308 -0
- package/dist/command-CtfR7hKM.d.cts.map +1 -0
- package/dist/components/command-validation-logic.cjs +153 -216
- package/dist/components/command-validation-logic.d.cts +2 -1
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +2 -1
- package/dist/components/command-validation-logic.mjs +153 -214
- package/dist/components/docs.cjs +6 -364
- package/dist/components/docs.d.cts +2 -3
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +2 -3
- package/dist/components/docs.mjs +2 -356
- package/dist/components/exec-builtin.cjs +63 -100
- 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.mjs +7 -41
- package/dist/components/helpers.cjs +2 -52
- package/dist/components/helpers.d.cts +2 -1
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +2 -1
- package/dist/components/helpers.mjs +2 -50
- package/dist/components/index.cjs +7 -23
- package/dist/components/index.mjs +9 -9
- package/dist/components/options-parser-logic.cjs +198 -420
- package/dist/components/options-parser-logic.d.cts +2 -5
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +2 -5
- package/dist/components/options-parser-logic.mjs +192 -407
- package/dist/components/state-builtin.cjs +106 -164
- package/dist/components/state-builtin.d.cts +1 -2
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +1 -2
- package/dist/components/state-builtin.mjs +12 -68
- package/dist/components/usage.cjs +4 -48
- 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.mjs +4 -46
- package/dist/components/utils-builtin.cjs +77 -144
- package/dist/components/utils-builtin.d.cts +1 -2
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +1 -2
- package/dist/components/utils-builtin.mjs +9 -74
- package/dist/config-BIF9mEz0.d.cts +157 -0
- package/dist/config-BIF9mEz0.d.cts.map +1 -0
- package/dist/config-CnNYdfsL.d.mts +157 -0
- package/dist/config-CnNYdfsL.d.mts.map +1 -0
- package/dist/config.cjs +24 -58
- package/dist/config.d.cts +1 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +1 -2
- package/dist/config.mjs +23 -55
- package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
- package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
- package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
- package/dist/contexts/command.cjs +3 -9
- package/dist/contexts/command.d.cts +1 -2
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts +1 -2
- package/dist/contexts/command.mjs +2 -7
- package/dist/contexts/index.cjs +19 -1
- package/dist/contexts/index.d.cts +2 -1
- package/dist/contexts/index.d.mts +2 -1
- package/dist/contexts/index.mjs +2 -1
- package/dist/contexts/options.cjs +7 -30
- package/dist/contexts/options.d.cts +1 -2
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts +1 -2
- package/dist/contexts/options.mjs +7 -27
- package/dist/contexts/power-plant.cjs +19 -0
- package/dist/contexts/power-plant.d.cts +2 -0
- package/dist/contexts/power-plant.d.mts +2 -0
- package/dist/contexts/power-plant.mjs +5 -0
- package/dist/docs-C6ZvsVMu.cjs +278 -0
- package/dist/docs-CGQ2HtEY.mjs +249 -0
- package/dist/docs-CGQ2HtEY.mjs.map +1 -0
- package/dist/engine.cjs +5 -39
- package/dist/engine.d.cts +1 -2
- package/dist/engine.d.cts.map +1 -1
- package/dist/engine.d.mts +1 -2
- package/dist/engine.mjs +4 -37
- package/dist/generator.cjs +68 -0
- package/dist/generator.d.cts +15 -0
- package/dist/generator.d.cts.map +1 -0
- package/dist/generator.d.mts +15 -0
- package/dist/generator.d.mts.map +1 -0
- package/dist/generator.mjs +66 -0
- package/dist/generator.mjs.map +1 -0
- package/dist/{helpers/get-framework.cjs → get-framework-CxZc2krd.cjs} +7 -8
- package/dist/{helpers/get-framework.mjs → get-framework-Dlqz2hVZ.mjs} +3 -8
- package/dist/get-framework-Dlqz2hVZ.mjs.map +1 -0
- package/dist/helpers/power-plant.cjs +102 -0
- package/dist/helpers/power-plant.d.cts +61 -0
- package/dist/helpers/power-plant.d.cts.map +1 -0
- package/dist/helpers/power-plant.d.mts +61 -0
- package/dist/helpers/power-plant.d.mts.map +1 -0
- package/dist/helpers/power-plant.mjs +99 -0
- package/dist/helpers/power-plant.mjs.map +1 -0
- package/dist/index-D4klH_pj.d.mts +2 -0
- package/dist/index-DYOBadKY.d.cts +2 -0
- package/dist/index.cjs +1 -37
- package/dist/index.d.cts +4 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -6
- package/dist/index.mjs +0 -35
- package/dist/package-B7Vu265G.mjs +6 -0
- package/dist/package-B7Vu265G.mjs.map +1 -0
- package/dist/{package.cjs → package-BLC4qc8t.cjs} +2 -4
- package/dist/plugin-B-hM2twc.mjs +1458 -0
- package/dist/plugin-B-hM2twc.mjs.map +1 -0
- package/dist/plugin-Bhfq0DMC.cjs +1490 -0
- package/dist/plugin-utils/index.cjs +359 -26
- package/dist/plugin-utils/index.d.cts +273 -9
- package/dist/plugin-utils/index.d.cts.map +1 -0
- package/dist/plugin-utils/index.d.mts +273 -9
- package/dist/plugin-utils/index.d.mts.map +1 -0
- package/dist/plugin-utils/index.mjs +346 -10
- package/dist/plugin-utils/index.mjs.map +1 -0
- package/dist/plugin.cjs +3 -496
- package/dist/plugin.d.cts +1 -3
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +1 -3
- package/dist/plugin.mjs +2 -491
- package/dist/power-plant-LgxcvlMN.d.cts +4 -0
- package/dist/power-plant-LgxcvlMN.d.mts +4 -0
- package/dist/reflect-CSiffeL9.cjs +27 -0
- package/dist/reflect-DXKSFgvS.mjs +23 -0
- package/dist/reflect-DXKSFgvS.mjs.map +1 -0
- package/dist/schemas/env.cjs +91 -0
- package/dist/schemas/env.d.cts +145 -0
- package/dist/schemas/env.d.cts.map +1 -0
- package/dist/schemas/env.d.mts +145 -0
- package/dist/{types → schemas}/env.d.mts.map +1 -1
- package/dist/schemas/env.mjs +91 -0
- package/dist/schemas/index.cjs +4 -0
- package/dist/schemas/index.d.cts +2 -0
- package/dist/schemas/index.d.mts +2 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/types/command.cjs +0 -402
- package/dist/types/command.d.cts +2 -309
- package/dist/types/command.d.mts +2 -309
- package/dist/types/command.mjs +1 -368
- package/dist/types/config.cjs +0 -175
- package/dist/types/config.d.cts +2 -126
- package/dist/types/config.d.mts +2 -126
- package/dist/types/config.mjs +1 -164
- package/dist/types/context.cjs +0 -45
- package/dist/types/context.d.cts +2 -31
- package/dist/types/context.d.mts +2 -31
- package/dist/types/context.mjs +1 -41
- package/dist/types/index.cjs +3 -53
- package/dist/types/index.d.cts +4 -5
- package/dist/types/index.d.mts +4 -5
- package/dist/types/index.mjs +4 -5
- package/package.json +106 -42
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
- package/dist/api.cjs.map +0 -1
- package/dist/components/command-validation-logic.cjs.map +0 -1
- package/dist/components/docs.cjs.map +0 -1
- package/dist/components/docs.mjs.map +0 -1
- package/dist/components/exec-builtin.cjs.map +0 -1
- package/dist/components/helpers.cjs.map +0 -1
- package/dist/components/options-parser-logic.cjs.map +0 -1
- package/dist/components/state-builtin.cjs.map +0 -1
- package/dist/components/usage.cjs.map +0 -1
- package/dist/components/utils-builtin.cjs.map +0 -1
- package/dist/config.cjs.map +0 -1
- package/dist/contexts/command.cjs.map +0 -1
- package/dist/contexts/options.cjs.map +0 -1
- package/dist/engine.cjs.map +0 -1
- package/dist/helpers/automd.cjs +0 -193
- package/dist/helpers/automd.cjs.map +0 -1
- package/dist/helpers/automd.mjs +0 -190
- package/dist/helpers/automd.mjs.map +0 -1
- package/dist/helpers/docs-helpers.cjs +0 -24
- package/dist/helpers/docs-helpers.cjs.map +0 -1
- package/dist/helpers/docs-helpers.mjs +0 -24
- package/dist/helpers/docs-helpers.mjs.map +0 -1
- package/dist/helpers/get-framework.cjs.map +0 -1
- package/dist/helpers/get-framework.mjs.map +0 -1
- package/dist/helpers/paths.cjs +0 -137
- package/dist/helpers/paths.cjs.map +0 -1
- package/dist/helpers/paths.mjs +0 -134
- package/dist/helpers/paths.mjs.map +0 -1
- package/dist/helpers/persistence.cjs +0 -114
- package/dist/helpers/persistence.cjs.map +0 -1
- package/dist/helpers/persistence.mjs +0 -113
- package/dist/helpers/persistence.mjs.map +0 -1
- package/dist/helpers/update-package-json.cjs +0 -65
- package/dist/helpers/update-package-json.cjs.map +0 -1
- package/dist/helpers/update-package-json.mjs +0 -64
- package/dist/helpers/update-package-json.mjs.map +0 -1
- package/dist/helpers/utilities.cjs +0 -95
- package/dist/helpers/utilities.cjs.map +0 -1
- package/dist/helpers/utilities.mjs +0 -94
- package/dist/helpers/utilities.mjs.map +0 -1
- package/dist/helpers/validations.cjs +0 -71
- package/dist/helpers/validations.cjs.map +0 -1
- package/dist/helpers/validations.mjs +0 -70
- package/dist/helpers/validations.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/package.cjs.map +0 -1
- package/dist/package.mjs +0 -6
- package/dist/package.mjs.map +0 -1
- package/dist/plugin-utils/compute-bin.cjs +0 -49
- package/dist/plugin-utils/compute-bin.cjs.map +0 -1
- package/dist/plugin-utils/compute-bin.d.cts +0 -13
- package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
- package/dist/plugin-utils/compute-bin.d.mts +0 -13
- package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
- package/dist/plugin-utils/compute-bin.mjs +0 -49
- package/dist/plugin-utils/compute-bin.mjs.map +0 -1
- package/dist/plugin-utils/context-helpers.cjs.map +0 -1
- package/dist/plugin-utils/context-helpers.d.cts +0 -106
- package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
- package/dist/plugin-utils/context-helpers.d.mts +0 -106
- package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
- package/dist/plugin-utils/context-helpers.mjs.map +0 -1
- package/dist/plugin-utils/deepkit.cjs +0 -70
- package/dist/plugin-utils/deepkit.cjs.map +0 -1
- package/dist/plugin-utils/deepkit.d.cts +0 -23
- package/dist/plugin-utils/deepkit.d.cts.map +0 -1
- package/dist/plugin-utils/deepkit.d.mts +0 -23
- package/dist/plugin-utils/deepkit.d.mts.map +0 -1
- package/dist/plugin-utils/deepkit.mjs +0 -69
- package/dist/plugin-utils/deepkit.mjs.map +0 -1
- package/dist/plugin-utils/description-helpers.cjs +0 -112
- package/dist/plugin-utils/description-helpers.cjs.map +0 -1
- package/dist/plugin-utils/description-helpers.d.cts +0 -44
- package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
- package/dist/plugin-utils/description-helpers.d.mts +0 -44
- package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
- package/dist/plugin-utils/description-helpers.mjs +0 -108
- package/dist/plugin-utils/description-helpers.mjs.map +0 -1
- package/dist/plugin-utils/get-command-tree.cjs +0 -118
- package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/get-command-tree.d.cts +0 -36
- package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
- package/dist/plugin-utils/get-command-tree.d.mts +0 -36
- package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
- package/dist/plugin-utils/get-command-tree.mjs +0 -115
- package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
- package/dist/plugin-utils/reflect.cjs +0 -54
- package/dist/plugin-utils/reflect.cjs.map +0 -1
- package/dist/plugin-utils/reflect.d.cts +0 -14
- package/dist/plugin-utils/reflect.d.cts.map +0 -1
- package/dist/plugin-utils/reflect.d.mts +0 -14
- package/dist/plugin-utils/reflect.d.mts.map +0 -1
- package/dist/plugin-utils/reflect.mjs +0 -53
- package/dist/plugin-utils/reflect.mjs.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
- package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
- package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
- package/dist/plugin-utils/type-checks.cjs +0 -222
- package/dist/plugin-utils/type-checks.cjs.map +0 -1
- package/dist/plugin-utils/type-checks.d.cts +0 -41
- package/dist/plugin-utils/type-checks.d.cts.map +0 -1
- package/dist/plugin-utils/type-checks.d.mts +0 -41
- package/dist/plugin-utils/type-checks.d.mts.map +0 -1
- package/dist/plugin-utils/type-checks.mjs +0 -218
- package/dist/plugin-utils/type-checks.mjs.map +0 -1
- package/dist/plugin.cjs.map +0 -1
- package/dist/plugin.mjs.map +0 -1
- package/dist/resolver/deepkit.cjs +0 -110
- package/dist/resolver/deepkit.cjs.map +0 -1
- package/dist/resolver/deepkit.mjs +0 -109
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/helpers.cjs +0 -184
- package/dist/resolver/helpers.cjs.map +0 -1
- package/dist/resolver/helpers.mjs +0 -180
- package/dist/resolver/helpers.mjs.map +0 -1
- package/dist/resolver/resolve.cjs +0 -473
- package/dist/resolver/resolve.cjs.map +0 -1
- package/dist/resolver/resolve.mjs +0 -473
- package/dist/resolver/resolve.mjs.map +0 -1
- package/dist/types/command.cjs.map +0 -1
- package/dist/types/command.d.cts.map +0 -1
- package/dist/types/command.d.mts.map +0 -1
- package/dist/types/command.mjs.map +0 -1
- package/dist/types/config.cjs.map +0 -1
- package/dist/types/config.d.cts.map +0 -1
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/config.mjs.map +0 -1
- package/dist/types/context.cjs.map +0 -1
- package/dist/types/context.d.cts.map +0 -1
- package/dist/types/context.d.mts.map +0 -1
- package/dist/types/context.mjs.map +0 -1
- package/dist/types/env.cjs +0 -53
- package/dist/types/env.cjs.map +0 -1
- package/dist/types/env.d.cts +0 -71
- package/dist/types/env.d.cts.map +0 -1
- package/dist/types/env.d.mts +0 -71
- package/dist/types/env.mjs +0 -51
- /package/dist/{types → schemas}/env.mjs.map +0 -0
package/dist/types/command.cjs
CHANGED
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
//#region src/types/command.ts
|
|
4
|
-
const __ΩPick = [
|
|
5
|
-
"T",
|
|
6
|
-
"K",
|
|
7
|
-
"Pick",
|
|
8
|
-
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
9
|
-
];
|
|
10
|
-
const __ΩPartial = [
|
|
11
|
-
"T",
|
|
12
|
-
"Partial",
|
|
13
|
-
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
14
|
-
];
|
|
15
|
-
const __ΩOmit = [
|
|
16
|
-
"T",
|
|
17
|
-
"K",
|
|
18
|
-
() => __ΩPick,
|
|
19
|
-
() => __ΩExclude,
|
|
20
|
-
"Omit",
|
|
21
|
-
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
22
|
-
];
|
|
23
|
-
const __ΩRecord = [
|
|
24
|
-
"K",
|
|
25
|
-
"T",
|
|
26
|
-
"Record",
|
|
27
|
-
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
28
|
-
];
|
|
29
|
-
const __ΩExclude = [
|
|
30
|
-
"T",
|
|
31
|
-
"U",
|
|
32
|
-
"Exclude",
|
|
33
|
-
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
34
|
-
];
|
|
35
|
-
const __ΩCommandParameterType = [
|
|
36
|
-
"string",
|
|
37
|
-
"number",
|
|
38
|
-
"boolean",
|
|
39
|
-
"CommandParameterType",
|
|
40
|
-
"P.!.\".#Jw$y"
|
|
41
|
-
];
|
|
42
|
-
const __ΩBaseCommandParameter = [
|
|
43
|
-
"name",
|
|
44
|
-
"The option name.",
|
|
45
|
-
() => __ΩCommandParameterType,
|
|
46
|
-
"type",
|
|
47
|
-
"The option kind.",
|
|
48
|
-
"title",
|
|
49
|
-
"The display title.",
|
|
50
|
-
"description",
|
|
51
|
-
"The option description.",
|
|
52
|
-
"alias",
|
|
53
|
-
"Alternative option names.",
|
|
54
|
-
"default",
|
|
55
|
-
"The default value.",
|
|
56
|
-
false,
|
|
57
|
-
"env",
|
|
58
|
-
"The environment variable name or false to disable.",
|
|
59
|
-
"required",
|
|
60
|
-
"Whether the option is required.",
|
|
61
|
-
"variadic",
|
|
62
|
-
"Whether the option accepts multiple values.",
|
|
63
|
-
"BaseCommandParameter",
|
|
64
|
-
"P&4!?\"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y"
|
|
65
|
-
];
|
|
66
|
-
const __ΩBaseSingleCommandParameter = [
|
|
67
|
-
"default",
|
|
68
|
-
"The default value.",
|
|
69
|
-
false,
|
|
70
|
-
"variadic",
|
|
71
|
-
"Whether the option accepts multiple values.",
|
|
72
|
-
"BaseSingleCommandParameter",
|
|
73
|
-
"PP&')J4!8?\".#4$?%Mw&y"
|
|
74
|
-
];
|
|
75
|
-
const __ΩBaseVariadicCommandParameter = [
|
|
76
|
-
"default",
|
|
77
|
-
"The default value.",
|
|
78
|
-
true,
|
|
79
|
-
"variadic",
|
|
80
|
-
"Whether the option accepts multiple values.",
|
|
81
|
-
"BaseVariadicCommandParameter",
|
|
82
|
-
"PP&F'F)FJ4!8?\".#4$?%Mw&y"
|
|
83
|
-
];
|
|
84
|
-
const __ΩBaseStringCommandParameter = [
|
|
85
|
-
() => __ΩBaseCommandParameter,
|
|
86
|
-
"string",
|
|
87
|
-
"type",
|
|
88
|
-
"The option kind.",
|
|
89
|
-
"default",
|
|
90
|
-
"The default value.",
|
|
91
|
-
"format",
|
|
92
|
-
"A standard string format to validate the option value against.",
|
|
93
|
-
"choices",
|
|
94
|
-
"The allowed choices for the option value.",
|
|
95
|
-
"BaseStringCommandParameter",
|
|
96
|
-
"Pn!.\"4#?$P&&FJ4%8?&P!&J4'8?(&F4)8?*Mw+y"
|
|
97
|
-
];
|
|
98
|
-
const __ΩSingleStringCommandParameter = [
|
|
99
|
-
() => __ΩBaseStringCommandParameter,
|
|
100
|
-
"default",
|
|
101
|
-
"The default value.",
|
|
102
|
-
false,
|
|
103
|
-
"variadic",
|
|
104
|
-
"Whether the option accepts multiple values.",
|
|
105
|
-
"SingleStringCommandParameter",
|
|
106
|
-
"Pn!&4\"8?#.$4%?&Mw'y"
|
|
107
|
-
];
|
|
108
|
-
const __ΩVariadicStringCommandParameter = [
|
|
109
|
-
() => __ΩBaseStringCommandParameter,
|
|
110
|
-
"default",
|
|
111
|
-
"The default value.",
|
|
112
|
-
true,
|
|
113
|
-
"variadic",
|
|
114
|
-
"Whether the option accepts multiple values.",
|
|
115
|
-
"VariadicStringCommandParameter",
|
|
116
|
-
"Pn!&F4\"8?#.$4%?&Mw'y"
|
|
117
|
-
];
|
|
118
|
-
const __ΩStringCommandParameter = [
|
|
119
|
-
() => __ΩSingleStringCommandParameter,
|
|
120
|
-
() => __ΩVariadicStringCommandParameter,
|
|
121
|
-
"StringCommandParameter",
|
|
122
|
-
"Pn!n\"Jw#y"
|
|
123
|
-
];
|
|
124
|
-
const __ΩBaseNumberCommandParameter = [
|
|
125
|
-
() => __ΩBaseCommandParameter,
|
|
126
|
-
"number",
|
|
127
|
-
"type",
|
|
128
|
-
"The option kind.",
|
|
129
|
-
"default",
|
|
130
|
-
"The default value.",
|
|
131
|
-
"choices",
|
|
132
|
-
"The allowed choices for the option value.",
|
|
133
|
-
"BaseNumberCommandParameter",
|
|
134
|
-
"Pn!.\"4#?$P''FJ4%8?&'F4'8?(Mw)y"
|
|
135
|
-
];
|
|
136
|
-
const __ΩSingleNumberCommandParameter = [
|
|
137
|
-
() => __ΩBaseNumberCommandParameter,
|
|
138
|
-
"default",
|
|
139
|
-
"The default value.",
|
|
140
|
-
false,
|
|
141
|
-
"variadic",
|
|
142
|
-
"Whether the option accepts multiple values.",
|
|
143
|
-
"SingleNumberCommandParameter",
|
|
144
|
-
"Pn!'4\"8?#.$4%?&Mw'y"
|
|
145
|
-
];
|
|
146
|
-
const __ΩVariadicNumberCommandParameter = [
|
|
147
|
-
() => __ΩBaseNumberCommandParameter,
|
|
148
|
-
"default",
|
|
149
|
-
"The default value.",
|
|
150
|
-
true,
|
|
151
|
-
"variadic",
|
|
152
|
-
"Whether the option accepts multiple values.",
|
|
153
|
-
"VariadicNumberCommandParameter",
|
|
154
|
-
"Pn!'F4\"8?#.$4%?&Mw'y"
|
|
155
|
-
];
|
|
156
|
-
const __ΩNumberCommandParameter = [
|
|
157
|
-
() => __ΩSingleNumberCommandParameter,
|
|
158
|
-
() => __ΩVariadicNumberCommandParameter,
|
|
159
|
-
"NumberCommandParameter",
|
|
160
|
-
"Pn!n\"Jw#y"
|
|
161
|
-
];
|
|
162
|
-
const __ΩBaseBooleanCommandParameter = [
|
|
163
|
-
() => __ΩBaseCommandParameter,
|
|
164
|
-
"boolean",
|
|
165
|
-
"type",
|
|
166
|
-
"The option kind.",
|
|
167
|
-
"default",
|
|
168
|
-
"The default value.",
|
|
169
|
-
"BaseBooleanCommandParameter",
|
|
170
|
-
"Pn!.\"4#?$P))FJ4%8?&Mw'y"
|
|
171
|
-
];
|
|
172
|
-
const __ΩSingleBooleanCommandParameter = [
|
|
173
|
-
() => __ΩBaseBooleanCommandParameter,
|
|
174
|
-
"default",
|
|
175
|
-
"The default value.",
|
|
176
|
-
false,
|
|
177
|
-
"variadic",
|
|
178
|
-
"Whether the option accepts multiple values.",
|
|
179
|
-
"SingleBooleanCommandParameter",
|
|
180
|
-
"Pn!)4\"8?#.$4%?&Mw'y"
|
|
181
|
-
];
|
|
182
|
-
const __ΩVariadicBooleanCommandParameter = [
|
|
183
|
-
() => __ΩBaseBooleanCommandParameter,
|
|
184
|
-
"default",
|
|
185
|
-
"The default value.",
|
|
186
|
-
true,
|
|
187
|
-
"variadic",
|
|
188
|
-
"Whether the option accepts multiple values.",
|
|
189
|
-
"VariadicBooleanCommandParameter",
|
|
190
|
-
"Pn!)F4\"8?#.$4%?&Mw'y"
|
|
191
|
-
];
|
|
192
|
-
const __ΩBooleanCommandParameter = [
|
|
193
|
-
() => __ΩSingleBooleanCommandParameter,
|
|
194
|
-
() => __ΩVariadicBooleanCommandParameter,
|
|
195
|
-
"BooleanCommandParameter",
|
|
196
|
-
"Pn!n\"Jw#y"
|
|
197
|
-
];
|
|
198
|
-
const __ΩCommandParameter = [
|
|
199
|
-
() => __ΩStringCommandParameter,
|
|
200
|
-
() => __ΩNumberCommandParameter,
|
|
201
|
-
() => __ΩBooleanCommandParameter,
|
|
202
|
-
"CommandParameter",
|
|
203
|
-
"Pn!n\"n#Jw$y"
|
|
204
|
-
];
|
|
205
|
-
const __ΩAsCommandParameterConfig = [
|
|
206
|
-
"T",
|
|
207
|
-
() => __ΩPick,
|
|
208
|
-
"type",
|
|
209
|
-
() => __ΩPartial,
|
|
210
|
-
() => __ΩOmit,
|
|
211
|
-
"type",
|
|
212
|
-
"alias",
|
|
213
|
-
"alias",
|
|
214
|
-
"AsCommandParameterConfig",
|
|
215
|
-
"b!Pe\"!.#o\"#e\"!P.&.'Jo%#o$\"PP&&FJ4(8MKw)y"
|
|
216
|
-
];
|
|
217
|
-
const __ΩStringCommandParameterConfig = [
|
|
218
|
-
() => __ΩAsCommandParameterConfig,
|
|
219
|
-
() => __ΩStringCommandParameter,
|
|
220
|
-
"StringCommandParameterConfig",
|
|
221
|
-
"n\"o!\"w#y"
|
|
222
|
-
];
|
|
223
|
-
const __ΩNumberCommandParameterConfig = [
|
|
224
|
-
() => __ΩAsCommandParameterConfig,
|
|
225
|
-
() => __ΩNumberCommandParameter,
|
|
226
|
-
"NumberCommandParameterConfig",
|
|
227
|
-
"n\"o!\"w#y"
|
|
228
|
-
];
|
|
229
|
-
const __ΩBooleanCommandParameterConfig = [
|
|
230
|
-
() => __ΩAsCommandParameterConfig,
|
|
231
|
-
() => __ΩBooleanCommandParameter,
|
|
232
|
-
"BooleanCommandParameterConfig",
|
|
233
|
-
"n\"o!\"w#y"
|
|
234
|
-
];
|
|
235
|
-
const __ΩCommandParameterConfig = [
|
|
236
|
-
() => __ΩStringCommandParameterConfig,
|
|
237
|
-
() => __ΩNumberCommandParameterConfig,
|
|
238
|
-
() => __ΩBooleanCommandParameterConfig,
|
|
239
|
-
"CommandParameterConfig",
|
|
240
|
-
"Pn!n\"n#Jw$y"
|
|
241
|
-
];
|
|
242
|
-
const __ΩBooleanCommandOption = [
|
|
243
|
-
() => __ΩSingleBooleanCommandParameter,
|
|
244
|
-
"isNegativeOf",
|
|
245
|
-
"The option this negates.",
|
|
246
|
-
"skipAddingNegative",
|
|
247
|
-
"Whether to skip adding a negative option.",
|
|
248
|
-
"BooleanCommandOption",
|
|
249
|
-
"Pn!&4\"8?#)4$8?%Mw&y"
|
|
250
|
-
];
|
|
251
|
-
const __ΩCommandOption = [
|
|
252
|
-
() => __ΩStringCommandParameter,
|
|
253
|
-
() => __ΩNumberCommandParameter,
|
|
254
|
-
() => __ΩBooleanCommandOption,
|
|
255
|
-
() => __ΩVariadicBooleanCommandParameter,
|
|
256
|
-
"CommandOption",
|
|
257
|
-
"Pn!n\"n#n$Jw%y"
|
|
258
|
-
];
|
|
259
|
-
const __ΩCommandOptionConfig = [
|
|
260
|
-
() => __ΩAsCommandParameterConfig,
|
|
261
|
-
() => __ΩCommandOption,
|
|
262
|
-
"CommandOptionConfig",
|
|
263
|
-
"n\"o!\"w#y"
|
|
264
|
-
];
|
|
265
|
-
const __ΩCommandArgument = [
|
|
266
|
-
() => __ΩStringCommandParameter,
|
|
267
|
-
() => __ΩNumberCommandParameter,
|
|
268
|
-
() => __ΩBooleanCommandParameter,
|
|
269
|
-
"CommandArgument",
|
|
270
|
-
"Pn!n\"n#Jw$y"
|
|
271
|
-
];
|
|
272
|
-
const __ΩCommandArgumentConfig = [
|
|
273
|
-
() => __ΩAsCommandParameterConfig,
|
|
274
|
-
() => __ΩCommandArgument,
|
|
275
|
-
"CommandArgumentConfig",
|
|
276
|
-
"n\"o!\"w#y"
|
|
277
|
-
];
|
|
278
|
-
const __ΩCommandMetadata = [
|
|
279
|
-
"title",
|
|
280
|
-
"The display name of the command.",
|
|
281
|
-
"description",
|
|
282
|
-
"A brief description of what the command does.",
|
|
283
|
-
"alias",
|
|
284
|
-
"One or more alternative names for the command.",
|
|
285
|
-
"tags",
|
|
286
|
-
"Optional tags for the command.",
|
|
287
|
-
"icon",
|
|
288
|
-
"An optional icon to visually represent the command in user interfaces.",
|
|
289
|
-
"docs",
|
|
290
|
-
"A URL to the command documentation or reference.",
|
|
291
|
-
"CommandMetadata",
|
|
292
|
-
"P&4!8?\"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y"
|
|
293
|
-
];
|
|
294
|
-
const __ΩCommandBase = [
|
|
295
|
-
() => __ΩCommandMetadata,
|
|
296
|
-
"id",
|
|
297
|
-
"The command id.",
|
|
298
|
-
"name",
|
|
299
|
-
"The command name.",
|
|
300
|
-
"path",
|
|
301
|
-
"The full command path value.",
|
|
302
|
-
"segments",
|
|
303
|
-
"The path segments.",
|
|
304
|
-
"alias",
|
|
305
|
-
"Alternative command names.",
|
|
306
|
-
"virtual",
|
|
307
|
-
"Whether the command is virtual.",
|
|
308
|
-
"CommandBase",
|
|
309
|
-
"Pn!P&,J4\"?#&4$?%P&,J4&?'&F4(?)&F4*8?+)4,?-Mw.y"
|
|
310
|
-
];
|
|
311
|
-
const __ΩCommandConfig = [
|
|
312
|
-
() => __ΩCommandBase,
|
|
313
|
-
"id",
|
|
314
|
-
"The command id.",
|
|
315
|
-
"entry",
|
|
316
|
-
"The resolved entry definition.",
|
|
317
|
-
() => __ΩCommandMetadata,
|
|
318
|
-
"tags",
|
|
319
|
-
"tags",
|
|
320
|
-
"CommandConfig",
|
|
321
|
-
"Pn!&4\"?#!4$?%n&.'f4(8Mw)y"
|
|
322
|
-
];
|
|
323
|
-
const __ΩCommandTree = [
|
|
324
|
-
() => __ΩRecord,
|
|
325
|
-
() => __ΩCommandOption,
|
|
326
|
-
"options",
|
|
327
|
-
"The command options.",
|
|
328
|
-
() => __ΩCommandArgument,
|
|
329
|
-
"args",
|
|
330
|
-
"The positional arguments provided to the command.",
|
|
331
|
-
0,
|
|
332
|
-
"parent",
|
|
333
|
-
"The parent command.",
|
|
334
|
-
() => __ΩRecord,
|
|
335
|
-
0,
|
|
336
|
-
"children",
|
|
337
|
-
"Child commands.",
|
|
338
|
-
"CommandTree",
|
|
339
|
-
"P!P&n\"o!#4#?$n%F4&?'P,n(J4)?*&n,o+#4-?.MKw/y"
|
|
340
|
-
];
|
|
341
|
-
const __ΩSerializedCommandTree = [
|
|
342
|
-
() => __ΩOmit,
|
|
343
|
-
() => __ΩCommandTree,
|
|
344
|
-
"parent",
|
|
345
|
-
"children",
|
|
346
|
-
"parent",
|
|
347
|
-
"The parent command id.",
|
|
348
|
-
() => __ΩRecord,
|
|
349
|
-
0,
|
|
350
|
-
"children",
|
|
351
|
-
"Serialized child commands.",
|
|
352
|
-
"SerializedCommandTree",
|
|
353
|
-
"Pn\"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y"
|
|
354
|
-
];
|
|
355
|
-
const __ΩCommandModule = [
|
|
356
|
-
() => __ΩCommandMetadata,
|
|
357
|
-
"metadata",
|
|
358
|
-
() => __ΩRecord,
|
|
359
|
-
() => __ΩCommandOptionConfig,
|
|
360
|
-
"options",
|
|
361
|
-
() => __ΩCommandArgumentConfig,
|
|
362
|
-
"args",
|
|
363
|
-
"default",
|
|
364
|
-
"CommandModule",
|
|
365
|
-
"Pn!4\"8P&n$o##!J4%8Pn&!JF4'8!4(8Mw)y"
|
|
366
|
-
];
|
|
367
|
-
|
|
368
|
-
//#endregion
|
|
369
|
-
exports.__ΩAsCommandParameterConfig = __ΩAsCommandParameterConfig;
|
|
370
|
-
exports.__ΩBaseBooleanCommandParameter = __ΩBaseBooleanCommandParameter;
|
|
371
|
-
exports.__ΩBaseCommandParameter = __ΩBaseCommandParameter;
|
|
372
|
-
exports.__ΩBaseNumberCommandParameter = __ΩBaseNumberCommandParameter;
|
|
373
|
-
exports.__ΩBaseSingleCommandParameter = __ΩBaseSingleCommandParameter;
|
|
374
|
-
exports.__ΩBaseStringCommandParameter = __ΩBaseStringCommandParameter;
|
|
375
|
-
exports.__ΩBaseVariadicCommandParameter = __ΩBaseVariadicCommandParameter;
|
|
376
|
-
exports.__ΩBooleanCommandOption = __ΩBooleanCommandOption;
|
|
377
|
-
exports.__ΩBooleanCommandParameter = __ΩBooleanCommandParameter;
|
|
378
|
-
exports.__ΩBooleanCommandParameterConfig = __ΩBooleanCommandParameterConfig;
|
|
379
|
-
exports.__ΩCommandArgument = __ΩCommandArgument;
|
|
380
|
-
exports.__ΩCommandArgumentConfig = __ΩCommandArgumentConfig;
|
|
381
|
-
exports.__ΩCommandBase = __ΩCommandBase;
|
|
382
|
-
exports.__ΩCommandConfig = __ΩCommandConfig;
|
|
383
|
-
exports.__ΩCommandMetadata = __ΩCommandMetadata;
|
|
384
|
-
exports.__ΩCommandModule = __ΩCommandModule;
|
|
385
|
-
exports.__ΩCommandOption = __ΩCommandOption;
|
|
386
|
-
exports.__ΩCommandOptionConfig = __ΩCommandOptionConfig;
|
|
387
|
-
exports.__ΩCommandParameter = __ΩCommandParameter;
|
|
388
|
-
exports.__ΩCommandParameterConfig = __ΩCommandParameterConfig;
|
|
389
|
-
exports.__ΩCommandParameterType = __ΩCommandParameterType;
|
|
390
|
-
exports.__ΩCommandTree = __ΩCommandTree;
|
|
391
|
-
exports.__ΩNumberCommandParameter = __ΩNumberCommandParameter;
|
|
392
|
-
exports.__ΩNumberCommandParameterConfig = __ΩNumberCommandParameterConfig;
|
|
393
|
-
exports.__ΩSerializedCommandTree = __ΩSerializedCommandTree;
|
|
394
|
-
exports.__ΩSingleBooleanCommandParameter = __ΩSingleBooleanCommandParameter;
|
|
395
|
-
exports.__ΩSingleNumberCommandParameter = __ΩSingleNumberCommandParameter;
|
|
396
|
-
exports.__ΩSingleStringCommandParameter = __ΩSingleStringCommandParameter;
|
|
397
|
-
exports.__ΩStringCommandParameter = __ΩStringCommandParameter;
|
|
398
|
-
exports.__ΩStringCommandParameterConfig = __ΩStringCommandParameterConfig;
|
|
399
|
-
exports.__ΩVariadicBooleanCommandParameter = __ΩVariadicBooleanCommandParameter;
|
|
400
|
-
exports.__ΩVariadicNumberCommandParameter = __ΩVariadicNumberCommandParameter;
|
|
401
|
-
exports.__ΩVariadicStringCommandParameter = __ΩVariadicStringCommandParameter;
|
|
402
|
-
//# sourceMappingURL=command.cjs.map
|
package/dist/types/command.d.cts
CHANGED
|
@@ -1,309 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ResolvedEntryFileReference } from "powerlines";
|
|
4
|
-
|
|
5
|
-
//#region src/types/command.d.ts
|
|
6
|
-
type CommandParameterType = "string" | "number" | "boolean";
|
|
7
|
-
interface BaseCommandParameter {
|
|
8
|
-
/**
|
|
9
|
-
* The option name.
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* The option kind.
|
|
14
|
-
*/
|
|
15
|
-
type: CommandParameterType;
|
|
16
|
-
/**
|
|
17
|
-
* The display title.
|
|
18
|
-
*/
|
|
19
|
-
title: string;
|
|
20
|
-
/**
|
|
21
|
-
* The option description.
|
|
22
|
-
*/
|
|
23
|
-
description: string;
|
|
24
|
-
/**
|
|
25
|
-
* Alternative option names.
|
|
26
|
-
*/
|
|
27
|
-
alias: string[];
|
|
28
|
-
/**
|
|
29
|
-
* The default value.
|
|
30
|
-
*/
|
|
31
|
-
default?: string | number | boolean | string[] | number[] | boolean[];
|
|
32
|
-
/**
|
|
33
|
-
* The environment variable name or false to disable.
|
|
34
|
-
*/
|
|
35
|
-
env: string | false;
|
|
36
|
-
/**
|
|
37
|
-
* Whether the option is required.
|
|
38
|
-
*/
|
|
39
|
-
required: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the option accepts multiple values.
|
|
42
|
-
*/
|
|
43
|
-
variadic: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface BaseSingleCommandParameter {
|
|
46
|
-
/**
|
|
47
|
-
* The default value.
|
|
48
|
-
*/
|
|
49
|
-
default?: string | number | boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether the option accepts multiple values.
|
|
52
|
-
*/
|
|
53
|
-
variadic: false;
|
|
54
|
-
}
|
|
55
|
-
interface BaseVariadicCommandParameter {
|
|
56
|
-
/**
|
|
57
|
-
* The default value.
|
|
58
|
-
*/
|
|
59
|
-
default?: string[] | number[] | boolean[];
|
|
60
|
-
/**
|
|
61
|
-
* Whether the option accepts multiple values.
|
|
62
|
-
*/
|
|
63
|
-
variadic: true;
|
|
64
|
-
}
|
|
65
|
-
interface BaseStringCommandParameter extends BaseCommandParameter {
|
|
66
|
-
/**
|
|
67
|
-
* The option kind.
|
|
68
|
-
*/
|
|
69
|
-
type: "string";
|
|
70
|
-
/**
|
|
71
|
-
* The default value.
|
|
72
|
-
*/
|
|
73
|
-
default?: string | string[];
|
|
74
|
-
/**
|
|
75
|
-
* A standard string format to validate the option value against.
|
|
76
|
-
*/
|
|
77
|
-
format?: JsonSchemaStringFormat | string;
|
|
78
|
-
/**
|
|
79
|
-
* The allowed choices for the option value.
|
|
80
|
-
*/
|
|
81
|
-
choices?: string[];
|
|
82
|
-
}
|
|
83
|
-
interface SingleStringCommandParameter extends BaseStringCommandParameter {
|
|
84
|
-
/**
|
|
85
|
-
* The default value.
|
|
86
|
-
*/
|
|
87
|
-
default?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Whether the option accepts multiple values.
|
|
90
|
-
*/
|
|
91
|
-
variadic: false;
|
|
92
|
-
}
|
|
93
|
-
interface VariadicStringCommandParameter extends BaseStringCommandParameter {
|
|
94
|
-
/**
|
|
95
|
-
* The default value.
|
|
96
|
-
*/
|
|
97
|
-
default?: string[];
|
|
98
|
-
/**
|
|
99
|
-
* Whether the option accepts multiple values.
|
|
100
|
-
*/
|
|
101
|
-
variadic: true;
|
|
102
|
-
}
|
|
103
|
-
type StringCommandParameter = SingleStringCommandParameter | VariadicStringCommandParameter;
|
|
104
|
-
interface BaseNumberCommandParameter extends BaseCommandParameter {
|
|
105
|
-
/**
|
|
106
|
-
* The option kind.
|
|
107
|
-
*/
|
|
108
|
-
type: "number";
|
|
109
|
-
/**
|
|
110
|
-
* The default value.
|
|
111
|
-
*/
|
|
112
|
-
default?: number | number[];
|
|
113
|
-
/**
|
|
114
|
-
* The allowed choices for the option value.
|
|
115
|
-
*/
|
|
116
|
-
choices?: number[];
|
|
117
|
-
}
|
|
118
|
-
interface SingleNumberCommandParameter extends BaseNumberCommandParameter {
|
|
119
|
-
/**
|
|
120
|
-
* The default value.
|
|
121
|
-
*/
|
|
122
|
-
default?: number;
|
|
123
|
-
/**
|
|
124
|
-
* Whether the option accepts multiple values.
|
|
125
|
-
*/
|
|
126
|
-
variadic: false;
|
|
127
|
-
}
|
|
128
|
-
interface VariadicNumberCommandParameter extends BaseNumberCommandParameter {
|
|
129
|
-
/**
|
|
130
|
-
* The default value.
|
|
131
|
-
*/
|
|
132
|
-
default?: number[];
|
|
133
|
-
/**
|
|
134
|
-
* Whether the option accepts multiple values.
|
|
135
|
-
*/
|
|
136
|
-
variadic: true;
|
|
137
|
-
}
|
|
138
|
-
type NumberCommandParameter = SingleNumberCommandParameter | VariadicNumberCommandParameter;
|
|
139
|
-
interface BaseBooleanCommandParameter extends BaseCommandParameter {
|
|
140
|
-
/**
|
|
141
|
-
* The option kind.
|
|
142
|
-
*/
|
|
143
|
-
type: "boolean";
|
|
144
|
-
/**
|
|
145
|
-
* The default value.
|
|
146
|
-
*/
|
|
147
|
-
default?: boolean | boolean[];
|
|
148
|
-
}
|
|
149
|
-
interface SingleBooleanCommandParameter extends BaseBooleanCommandParameter {
|
|
150
|
-
/**
|
|
151
|
-
* The default value.
|
|
152
|
-
*/
|
|
153
|
-
default?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* Whether the option accepts multiple values.
|
|
156
|
-
*/
|
|
157
|
-
variadic: false;
|
|
158
|
-
}
|
|
159
|
-
interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {
|
|
160
|
-
/**
|
|
161
|
-
* The default value.
|
|
162
|
-
*/
|
|
163
|
-
default?: boolean[];
|
|
164
|
-
/**
|
|
165
|
-
* Whether the option accepts multiple values.
|
|
166
|
-
*/
|
|
167
|
-
variadic: true;
|
|
168
|
-
}
|
|
169
|
-
type BooleanCommandParameter = SingleBooleanCommandParameter | VariadicBooleanCommandParameter;
|
|
170
|
-
type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
171
|
-
type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "type"> & Partial<Omit<T, "type" | "alias">> & {
|
|
172
|
-
alias?: string | string[];
|
|
173
|
-
};
|
|
174
|
-
type StringCommandParameterConfig = AsCommandParameterConfig<StringCommandParameter>;
|
|
175
|
-
type NumberCommandParameterConfig = AsCommandParameterConfig<NumberCommandParameter>;
|
|
176
|
-
type BooleanCommandParameterConfig = AsCommandParameterConfig<BooleanCommandParameter>;
|
|
177
|
-
type CommandParameterConfig = StringCommandParameterConfig | NumberCommandParameterConfig | BooleanCommandParameterConfig;
|
|
178
|
-
interface BooleanCommandOption extends SingleBooleanCommandParameter {
|
|
179
|
-
/**
|
|
180
|
-
* The option this negates.
|
|
181
|
-
*/
|
|
182
|
-
isNegativeOf?: string;
|
|
183
|
-
/**
|
|
184
|
-
* Whether to skip adding a negative option.
|
|
185
|
-
*/
|
|
186
|
-
skipAddingNegative?: boolean;
|
|
187
|
-
}
|
|
188
|
-
type CommandOption = StringCommandParameter | NumberCommandParameter | BooleanCommandOption | VariadicBooleanCommandParameter;
|
|
189
|
-
type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;
|
|
190
|
-
type CommandArgument = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
191
|
-
type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;
|
|
192
|
-
interface CommandMetadata {
|
|
193
|
-
/**
|
|
194
|
-
* The display name of the command.
|
|
195
|
-
*
|
|
196
|
-
* @remarks
|
|
197
|
-
* This value will be used in various displays of the user interface and documentation. If not provided, a formatted value of the command name will be used.
|
|
198
|
-
*/
|
|
199
|
-
title?: string;
|
|
200
|
-
/**
|
|
201
|
-
* A brief description of what the command does.
|
|
202
|
-
*
|
|
203
|
-
* @remarks
|
|
204
|
-
* This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
|
|
205
|
-
*/
|
|
206
|
-
description?: string;
|
|
207
|
-
/**
|
|
208
|
-
* One or more alternative names for the command.
|
|
209
|
-
*/
|
|
210
|
-
alias?: string | string[];
|
|
211
|
-
/**
|
|
212
|
-
* Optional tags for the command.
|
|
213
|
-
*
|
|
214
|
-
* @remarks
|
|
215
|
-
* Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
|
|
216
|
-
*/
|
|
217
|
-
tags?: string[];
|
|
218
|
-
/**
|
|
219
|
-
* An optional icon to visually represent the command in user interfaces.
|
|
220
|
-
*
|
|
221
|
-
* @remarks
|
|
222
|
-
* This can be a string containing an emoji, a Unicode character, or any other symbol that helps to visually identify the command. If not provided, no icon will be displayed.
|
|
223
|
-
*/
|
|
224
|
-
icon?: string;
|
|
225
|
-
/**
|
|
226
|
-
* A URL to the command documentation or reference.
|
|
227
|
-
*
|
|
228
|
-
* @remarks
|
|
229
|
-
* This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
230
|
-
*/
|
|
231
|
-
docs?: string;
|
|
232
|
-
}
|
|
233
|
-
interface CommandBase extends CommandMetadata {
|
|
234
|
-
/**
|
|
235
|
-
* The command id.
|
|
236
|
-
*/
|
|
237
|
-
id: string | null;
|
|
238
|
-
/**
|
|
239
|
-
* The command name.
|
|
240
|
-
*/
|
|
241
|
-
name: string;
|
|
242
|
-
/**
|
|
243
|
-
* The full command path value.
|
|
244
|
-
*/
|
|
245
|
-
path: string | null;
|
|
246
|
-
/**
|
|
247
|
-
* The path segments.
|
|
248
|
-
*/
|
|
249
|
-
segments: string[];
|
|
250
|
-
/**
|
|
251
|
-
* Alternative command names.
|
|
252
|
-
*/
|
|
253
|
-
alias?: string[];
|
|
254
|
-
/**
|
|
255
|
-
* Whether the command is virtual.
|
|
256
|
-
*
|
|
257
|
-
* @remarks
|
|
258
|
-
* Virtual commands are considered forks in the command tree and are not directly executable. They are used to group related subcommands together without having an actual command handler or entry point.
|
|
259
|
-
*/
|
|
260
|
-
virtual: boolean;
|
|
261
|
-
}
|
|
262
|
-
interface CommandConfig extends CommandBase {
|
|
263
|
-
/**
|
|
264
|
-
* The command id.
|
|
265
|
-
*/
|
|
266
|
-
id: string;
|
|
267
|
-
/**
|
|
268
|
-
* The resolved entry definition.
|
|
269
|
-
*/
|
|
270
|
-
entry: ResolvedEntryFileReference;
|
|
271
|
-
tags?: CommandMetadata["tags"];
|
|
272
|
-
}
|
|
273
|
-
type CommandTree = RequiredKeys<CommandConfig, "title" | "description" | "alias" | "tags"> & {
|
|
274
|
-
/**
|
|
275
|
-
* The command options.
|
|
276
|
-
*/
|
|
277
|
-
options: Record<string, CommandOption>;
|
|
278
|
-
/**
|
|
279
|
-
* The positional arguments provided to the command.
|
|
280
|
-
*/
|
|
281
|
-
args: CommandArgument[];
|
|
282
|
-
/**
|
|
283
|
-
* The parent command.
|
|
284
|
-
*/
|
|
285
|
-
parent: null | CommandTree;
|
|
286
|
-
/**
|
|
287
|
-
* Child commands.
|
|
288
|
-
*/
|
|
289
|
-
children: Record<string, CommandTree>;
|
|
290
|
-
};
|
|
291
|
-
type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
|
|
292
|
-
/**
|
|
293
|
-
* The parent command id.
|
|
294
|
-
*/
|
|
295
|
-
parent: null | string;
|
|
296
|
-
/**
|
|
297
|
-
* Serialized child commands.
|
|
298
|
-
*/
|
|
299
|
-
children: Record<string, SerializedCommandTree>;
|
|
300
|
-
};
|
|
301
|
-
interface CommandModule {
|
|
302
|
-
metadata?: CommandMetadata;
|
|
303
|
-
options?: Record<string, CommandOptionConfig> | SchemaInput;
|
|
304
|
-
args?: (CommandArgumentConfig | SchemaInput)[];
|
|
305
|
-
default?: AnyFunction;
|
|
306
|
-
}
|
|
307
|
-
//#endregion
|
|
308
|
-
export { 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 };
|
|
309
|
-
//# sourceMappingURL=command.d.cts.map
|
|
1
|
+
import { A as StringCommandParameterConfig, C as NumberCommandParameter, D as SingleNumberCommandParameter, E as SingleBooleanCommandParameter, M as VariadicNumberCommandParameter, N as VariadicStringCommandParameter, O as SingleStringCommandParameter, S as CommandTree, T as SerializedCommandTree, _ as CommandOption, a as BaseSingleCommandParameter, b as CommandParameterConfig, c as BooleanCommandOption, d as CommandArgument, f as CommandArgumentConfig, g as CommandModule, h as CommandMetadata, i as BaseNumberCommandParameter, j as VariadicBooleanCommandParameter, k as StringCommandParameter, l as BooleanCommandParameter, m as CommandConfig, n as BaseBooleanCommandParameter, o as BaseStringCommandParameter, p as CommandBase, r as BaseCommandParameter, s as BaseVariadicCommandParameter, t as AsCommandParameterConfig, u as BooleanCommandParameterConfig, v as CommandOptionConfig, w as NumberCommandParameterConfig, x as CommandParameterType, y as CommandParameter } from "../command-CtfR7hKM.cjs";
|
|
2
|
+
export { 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 };
|