@shell-shock/core 0.17.7 → 0.17.8
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 +1 -29
- package/dist/api.cjs +1 -95
- package/dist/api.d.cts +52 -4
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +52 -4
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +1 -92
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +1 -292
- package/dist/components/command-validation-logic.mjs +1 -289
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +1 -265
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +1 -256
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +13 -429
- package/dist/components/exec-builtin.mjs +13 -425
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +1 -120
- package/dist/components/helpers.mjs +1 -112
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +1 -58
- package/dist/components/index.mjs +1 -10
- package/dist/components/options-parser-logic.cjs +5 -960
- package/dist/components/options-parser-logic.d.cts +1 -1
- package/dist/components/options-parser-logic.mjs +5 -945
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +8 -629
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts.map +1 -1
- package/dist/components/state-builtin.mjs +8 -622
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +1 -117
- package/dist/components/usage.mjs +1 -114
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +33 -838
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +33 -828
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +1 -31
- package/dist/config.mjs +1 -29
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +1 -26
- package/dist/contexts/command.mjs +1 -23
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/index.cjs +1 -9
- package/dist/contexts/index.mjs +1 -4
- package/dist/contexts/options.cjs +1 -63
- package/dist/contexts/options.mjs +1 -58
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/helpers/automd.cjs +1 -71
- package/dist/helpers/automd.mjs +1 -70
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +1 -23
- package/dist/helpers/docs-helpers.mjs +1 -22
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/paths.cjs +1 -137
- package/dist/helpers/paths.mjs +1 -133
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +1 -113
- package/dist/helpers/persistence.mjs +1 -110
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +1 -59
- package/dist/helpers/update-package-json.mjs +1 -57
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +1 -95
- package/dist/helpers/utilities.mjs +1 -93
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +1 -71
- package/dist/helpers/validations.mjs +1 -71
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +1 -52
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -7
- package/dist/plugin-utils/compute-bin.cjs +1 -50
- package/dist/plugin-utils/compute-bin.mjs +1 -49
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +1 -231
- package/dist/plugin-utils/context-helpers.mjs +1 -221
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +1 -71
- package/dist/plugin-utils/deepkit.mjs +1 -69
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +2 -111
- package/dist/plugin-utils/description-helpers.mjs +2 -107
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +1 -117
- package/dist/plugin-utils/get-command-tree.mjs +1 -114
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +1 -39
- package/dist/plugin-utils/index.mjs +1 -10
- package/dist/plugin-utils/reflect.cjs +1 -52
- package/dist/plugin-utils/reflect.mjs +1 -52
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +1 -64
- package/dist/plugin-utils/traverse-command-tree.mjs +1 -62
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +1 -93
- package/dist/plugin-utils/type-checks.mjs +1 -88
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +4 -429
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +4 -423
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/deepkit.cjs +1 -135
- package/dist/resolver/deepkit.mjs +1 -134
- package/dist/resolver/deepkit.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +1 -173
- package/dist/resolver/helpers.mjs +1 -168
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/module.cjs +1 -145
- package/dist/resolver/module.mjs +1 -144
- package/dist/resolver/module.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +1 -222
- package/dist/resolver/resolve.mjs +1 -221
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +1 -441
- package/dist/types/command.mjs +1 -405
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +1 -144
- package/dist/types/config.d.cts +3 -2
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +3 -2
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +1 -138
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +1 -37
- 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 +1 -34
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +1 -52
- package/dist/types/env.mjs +1 -50
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +1 -49
- package/dist/types/index.mjs +1 -6
- package/dist/types/options.cjs +1 -12
- package/dist/types/options.mjs +1 -10
- package/package.json +23 -23
package/dist/types/command.mjs
CHANGED
|
@@ -1,406 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const __ΩPick = [
|
|
3
|
-
"T",
|
|
4
|
-
"K",
|
|
5
|
-
"Pick",
|
|
6
|
-
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
7
|
-
];
|
|
8
|
-
const __ΩPartial = [
|
|
9
|
-
"T",
|
|
10
|
-
"Partial",
|
|
11
|
-
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
12
|
-
];
|
|
13
|
-
const __ΩOmit = [
|
|
14
|
-
"T",
|
|
15
|
-
"K",
|
|
16
|
-
() => __ΩPick,
|
|
17
|
-
() => __ΩExclude,
|
|
18
|
-
"Omit",
|
|
19
|
-
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
20
|
-
];
|
|
21
|
-
const __ΩRecord = [
|
|
22
|
-
"K",
|
|
23
|
-
"T",
|
|
24
|
-
"Record",
|
|
25
|
-
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
26
|
-
];
|
|
27
|
-
const __ΩExclude = [
|
|
28
|
-
"T",
|
|
29
|
-
"U",
|
|
30
|
-
"Exclude",
|
|
31
|
-
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
32
|
-
];
|
|
33
|
-
const __ΩCommandParameterType = ["CommandParameterType", "P&')P&'JFJw!y"];
|
|
34
|
-
const CommandParameterKinds = {
|
|
35
|
-
string: "string",
|
|
36
|
-
number: "number",
|
|
37
|
-
boolean: "boolean"
|
|
38
|
-
};
|
|
39
|
-
const __ΩCommandParameterKind = [
|
|
40
|
-
() => CommandParameterKinds,
|
|
41
|
-
() => CommandParameterKinds,
|
|
42
|
-
"CommandParameterKind",
|
|
43
|
-
"i!i\"gfw#y"
|
|
44
|
-
];
|
|
45
|
-
const __ΩBaseCommandParameter = [
|
|
46
|
-
"name",
|
|
47
|
-
"The option name.",
|
|
48
|
-
() => __ΩCommandParameterKind,
|
|
49
|
-
"kind",
|
|
50
|
-
"The option kind.",
|
|
51
|
-
"title",
|
|
52
|
-
"The display title.",
|
|
53
|
-
"description",
|
|
54
|
-
"The option description.",
|
|
55
|
-
"alias",
|
|
56
|
-
"Alternative option names.",
|
|
57
|
-
"default",
|
|
58
|
-
"The default value.",
|
|
59
|
-
false,
|
|
60
|
-
"env",
|
|
61
|
-
"The environment variable name or false to disable.",
|
|
62
|
-
"optional",
|
|
63
|
-
"Whether the option is optional.",
|
|
64
|
-
"variadic",
|
|
65
|
-
"Whether the option accepts multiple values.",
|
|
66
|
-
"BaseCommandParameter",
|
|
67
|
-
"P&4!?\"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y"
|
|
68
|
-
];
|
|
69
|
-
const __ΩBaseSingleCommandParameter = [
|
|
70
|
-
"default",
|
|
71
|
-
"The default value.",
|
|
72
|
-
false,
|
|
73
|
-
"variadic",
|
|
74
|
-
"Whether the option accepts multiple values.",
|
|
75
|
-
"BaseSingleCommandParameter",
|
|
76
|
-
"PP&')J4!8?\".#4$?%Mw&y"
|
|
77
|
-
];
|
|
78
|
-
const __ΩBaseVariadicCommandParameter = [
|
|
79
|
-
"default",
|
|
80
|
-
"The default value.",
|
|
81
|
-
true,
|
|
82
|
-
"variadic",
|
|
83
|
-
"Whether the option accepts multiple values.",
|
|
84
|
-
"BaseVariadicCommandParameter",
|
|
85
|
-
"PP&F'F)FJ4!8?\".#4$?%Mw&y"
|
|
86
|
-
];
|
|
87
|
-
const __ΩBaseStringCommandParameter = [
|
|
88
|
-
() => __ΩBaseCommandParameter,
|
|
89
|
-
"string",
|
|
90
|
-
"kind",
|
|
91
|
-
"The option kind.",
|
|
92
|
-
"default",
|
|
93
|
-
"The default value.",
|
|
94
|
-
"email",
|
|
95
|
-
"uri",
|
|
96
|
-
"uuid",
|
|
97
|
-
"ipv4",
|
|
98
|
-
"ipv6",
|
|
99
|
-
"date",
|
|
100
|
-
"time",
|
|
101
|
-
"date-time",
|
|
102
|
-
"duration",
|
|
103
|
-
"format",
|
|
104
|
-
"A standard string format to validate the option value against.",
|
|
105
|
-
"choices",
|
|
106
|
-
"The allowed choices for the option value.",
|
|
107
|
-
"BaseStringCommandParameter",
|
|
108
|
-
"Pn!.\"4#?$P&&FJ4%8?&P.'.(.).*.+.,.-.../J408?1&F428?3Mw4y"
|
|
109
|
-
];
|
|
110
|
-
const __ΩSingleStringCommandParameter = [
|
|
111
|
-
() => __ΩBaseStringCommandParameter,
|
|
112
|
-
"default",
|
|
113
|
-
"The default value.",
|
|
114
|
-
false,
|
|
115
|
-
"variadic",
|
|
116
|
-
"Whether the option accepts multiple values.",
|
|
117
|
-
"SingleStringCommandParameter",
|
|
118
|
-
"Pn!&4\"8?#.$4%?&Mw'y"
|
|
119
|
-
];
|
|
120
|
-
const __ΩVariadicStringCommandParameter = [
|
|
121
|
-
() => __ΩBaseStringCommandParameter,
|
|
122
|
-
"default",
|
|
123
|
-
"The default value.",
|
|
124
|
-
true,
|
|
125
|
-
"variadic",
|
|
126
|
-
"Whether the option accepts multiple values.",
|
|
127
|
-
"VariadicStringCommandParameter",
|
|
128
|
-
"Pn!&F4\"8?#.$4%?&Mw'y"
|
|
129
|
-
];
|
|
130
|
-
const __ΩStringCommandParameter = [
|
|
131
|
-
() => __ΩSingleStringCommandParameter,
|
|
132
|
-
() => __ΩVariadicStringCommandParameter,
|
|
133
|
-
"StringCommandParameter",
|
|
134
|
-
"Pn!n\"Jw#y"
|
|
135
|
-
];
|
|
136
|
-
const __ΩBaseNumberCommandParameter = [
|
|
137
|
-
() => __ΩBaseCommandParameter,
|
|
138
|
-
"number",
|
|
139
|
-
"kind",
|
|
140
|
-
"The option kind.",
|
|
141
|
-
"default",
|
|
142
|
-
"The default value.",
|
|
143
|
-
"choices",
|
|
144
|
-
"The allowed choices for the option value.",
|
|
145
|
-
"BaseNumberCommandParameter",
|
|
146
|
-
"Pn!.\"4#?$P''FJ4%8?&'F4'8?(Mw)y"
|
|
147
|
-
];
|
|
148
|
-
const __ΩSingleNumberCommandParameter = [
|
|
149
|
-
() => __ΩBaseNumberCommandParameter,
|
|
150
|
-
"default",
|
|
151
|
-
"The default value.",
|
|
152
|
-
false,
|
|
153
|
-
"variadic",
|
|
154
|
-
"Whether the option accepts multiple values.",
|
|
155
|
-
"SingleNumberCommandParameter",
|
|
156
|
-
"Pn!'4\"8?#.$4%?&Mw'y"
|
|
157
|
-
];
|
|
158
|
-
const __ΩVariadicNumberCommandParameter = [
|
|
159
|
-
() => __ΩBaseNumberCommandParameter,
|
|
160
|
-
"default",
|
|
161
|
-
"The default value.",
|
|
162
|
-
true,
|
|
163
|
-
"variadic",
|
|
164
|
-
"Whether the option accepts multiple values.",
|
|
165
|
-
"VariadicNumberCommandParameter",
|
|
166
|
-
"Pn!'F4\"8?#.$4%?&Mw'y"
|
|
167
|
-
];
|
|
168
|
-
const __ΩNumberCommandParameter = [
|
|
169
|
-
() => __ΩSingleNumberCommandParameter,
|
|
170
|
-
() => __ΩVariadicNumberCommandParameter,
|
|
171
|
-
"NumberCommandParameter",
|
|
172
|
-
"Pn!n\"Jw#y"
|
|
173
|
-
];
|
|
174
|
-
const __ΩBaseBooleanCommandParameter = [
|
|
175
|
-
() => __ΩBaseCommandParameter,
|
|
176
|
-
"boolean",
|
|
177
|
-
"kind",
|
|
178
|
-
"The option kind.",
|
|
179
|
-
"default",
|
|
180
|
-
"The default value.",
|
|
181
|
-
"BaseBooleanCommandParameter",
|
|
182
|
-
"Pn!.\"4#?$P))FJ4%8?&Mw'y"
|
|
183
|
-
];
|
|
184
|
-
const __ΩSingleBooleanCommandParameter = [
|
|
185
|
-
() => __ΩBaseBooleanCommandParameter,
|
|
186
|
-
"default",
|
|
187
|
-
"The default value.",
|
|
188
|
-
false,
|
|
189
|
-
"variadic",
|
|
190
|
-
"Whether the option accepts multiple values.",
|
|
191
|
-
"SingleBooleanCommandParameter",
|
|
192
|
-
"Pn!)4\"8?#.$4%?&Mw'y"
|
|
193
|
-
];
|
|
194
|
-
const __ΩVariadicBooleanCommandParameter = [
|
|
195
|
-
() => __ΩBaseBooleanCommandParameter,
|
|
196
|
-
"default",
|
|
197
|
-
"The default value.",
|
|
198
|
-
true,
|
|
199
|
-
"variadic",
|
|
200
|
-
"Whether the option accepts multiple values.",
|
|
201
|
-
"VariadicBooleanCommandParameter",
|
|
202
|
-
"Pn!)F4\"8?#.$4%?&Mw'y"
|
|
203
|
-
];
|
|
204
|
-
const __ΩBooleanCommandParameter = [
|
|
205
|
-
() => __ΩSingleBooleanCommandParameter,
|
|
206
|
-
() => __ΩVariadicBooleanCommandParameter,
|
|
207
|
-
"BooleanCommandParameter",
|
|
208
|
-
"Pn!n\"Jw#y"
|
|
209
|
-
];
|
|
210
|
-
const __ΩCommandParameter = [
|
|
211
|
-
() => __ΩStringCommandParameter,
|
|
212
|
-
() => __ΩNumberCommandParameter,
|
|
213
|
-
() => __ΩBooleanCommandParameter,
|
|
214
|
-
"CommandParameter",
|
|
215
|
-
"Pn!n\"n#Jw$y"
|
|
216
|
-
];
|
|
217
|
-
const __ΩAsCommandParameterConfig = [
|
|
218
|
-
"T",
|
|
219
|
-
() => __ΩPick,
|
|
220
|
-
"kind",
|
|
221
|
-
"alias",
|
|
222
|
-
() => __ΩPartial,
|
|
223
|
-
() => __ΩOmit,
|
|
224
|
-
"kind",
|
|
225
|
-
"alias",
|
|
226
|
-
"alias",
|
|
227
|
-
"AsCommandParameterConfig",
|
|
228
|
-
"b!Pe\"!P.#.$Jo\"#e\"!P.'.(Jo&#o%\"PP&&FJ4)8MKw*y"
|
|
229
|
-
];
|
|
230
|
-
const __ΩStringCommandParameterConfig = [
|
|
231
|
-
() => __ΩAsCommandParameterConfig,
|
|
232
|
-
() => __ΩStringCommandParameter,
|
|
233
|
-
"StringCommandParameterConfig",
|
|
234
|
-
"n\"o!\"w#y"
|
|
235
|
-
];
|
|
236
|
-
const __ΩNumberCommandParameterConfig = [
|
|
237
|
-
() => __ΩAsCommandParameterConfig,
|
|
238
|
-
() => __ΩNumberCommandParameter,
|
|
239
|
-
"NumberCommandParameterConfig",
|
|
240
|
-
"n\"o!\"w#y"
|
|
241
|
-
];
|
|
242
|
-
const __ΩBooleanCommandParameterConfig = [
|
|
243
|
-
() => __ΩAsCommandParameterConfig,
|
|
244
|
-
() => __ΩBooleanCommandParameter,
|
|
245
|
-
"BooleanCommandParameterConfig",
|
|
246
|
-
"n\"o!\"w#y"
|
|
247
|
-
];
|
|
248
|
-
const __ΩCommandParameterConfig = [
|
|
249
|
-
() => __ΩStringCommandParameterConfig,
|
|
250
|
-
() => __ΩNumberCommandParameterConfig,
|
|
251
|
-
() => __ΩBooleanCommandParameterConfig,
|
|
252
|
-
"CommandParameterConfig",
|
|
253
|
-
"Pn!n\"n#Jw$y"
|
|
254
|
-
];
|
|
255
|
-
const __ΩBooleanCommandOption = [
|
|
256
|
-
() => __ΩSingleBooleanCommandParameter,
|
|
257
|
-
"isNegativeOf",
|
|
258
|
-
"The option this negates.",
|
|
259
|
-
"skipAddingNegative",
|
|
260
|
-
"Whether to skip adding a negative option.",
|
|
261
|
-
"BooleanCommandOption",
|
|
262
|
-
"Pn!&4\"8?#)4$8?%Mw&y"
|
|
263
|
-
];
|
|
264
|
-
const __ΩCommandOption = [
|
|
265
|
-
() => __ΩStringCommandParameter,
|
|
266
|
-
() => __ΩNumberCommandParameter,
|
|
267
|
-
() => __ΩBooleanCommandOption,
|
|
268
|
-
() => __ΩVariadicBooleanCommandParameter,
|
|
269
|
-
"CommandOption",
|
|
270
|
-
"Pn!n\"n#n$Jw%y"
|
|
271
|
-
];
|
|
272
|
-
const __ΩCommandOptionConfig = [
|
|
273
|
-
() => __ΩAsCommandParameterConfig,
|
|
274
|
-
() => __ΩCommandOption,
|
|
275
|
-
"CommandOptionConfig",
|
|
276
|
-
"n\"o!\"w#y"
|
|
277
|
-
];
|
|
278
|
-
const __ΩCommandArgument = [
|
|
279
|
-
() => __ΩStringCommandParameter,
|
|
280
|
-
() => __ΩNumberCommandParameter,
|
|
281
|
-
() => __ΩBooleanCommandParameter,
|
|
282
|
-
"CommandArgument",
|
|
283
|
-
"Pn!n\"n#Jw$y"
|
|
284
|
-
];
|
|
285
|
-
const __ΩCommandArgumentConfig = [
|
|
286
|
-
() => __ΩAsCommandParameterConfig,
|
|
287
|
-
() => __ΩCommandArgument,
|
|
288
|
-
"CommandArgumentConfig",
|
|
289
|
-
"n\"o!\"w#y"
|
|
290
|
-
];
|
|
291
|
-
const __ΩCommandBase = [
|
|
292
|
-
"id",
|
|
293
|
-
"The command id.",
|
|
294
|
-
"name",
|
|
295
|
-
"The command name.",
|
|
296
|
-
"path",
|
|
297
|
-
"The full command path value.",
|
|
298
|
-
"segments",
|
|
299
|
-
"The path segments.",
|
|
300
|
-
"title",
|
|
301
|
-
"The display title.",
|
|
302
|
-
"description",
|
|
303
|
-
"The command description.",
|
|
304
|
-
"alias",
|
|
305
|
-
"Alternative command names.",
|
|
306
|
-
"icon",
|
|
307
|
-
"The command icon.",
|
|
308
|
-
"reference",
|
|
309
|
-
"A URL to the command documentation or reference.",
|
|
310
|
-
"isVirtual",
|
|
311
|
-
"Whether the command is virtual.",
|
|
312
|
-
"CommandBase",
|
|
313
|
-
"PP&,J4!?\"&4#?$P&,J4%?&&F4'?(&4)8?*&4+8?,&F4-8?.&4/8?0&418?2)43?4Mw5y"
|
|
314
|
-
];
|
|
315
|
-
const __ΩCommandConfig = [
|
|
316
|
-
() => __ΩCommandBase,
|
|
317
|
-
"id",
|
|
318
|
-
"The command id.",
|
|
319
|
-
"entry",
|
|
320
|
-
"The resolved entry definition.",
|
|
321
|
-
"tags",
|
|
322
|
-
"Optional tags for the command.",
|
|
323
|
-
"file",
|
|
324
|
-
"source",
|
|
325
|
-
"A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.",
|
|
326
|
-
"CommandConfig",
|
|
327
|
-
"Pn!&4\"?#!4$?%&F4&8?'P.(&J4)8?*Mw+y"
|
|
328
|
-
];
|
|
329
|
-
const __ΩCommandTree = [
|
|
330
|
-
() => __ΩCommandConfig,
|
|
331
|
-
"title",
|
|
332
|
-
"The display title.",
|
|
333
|
-
"description",
|
|
334
|
-
"The command description.",
|
|
335
|
-
"alias",
|
|
336
|
-
"Alternative command names.",
|
|
337
|
-
"tags",
|
|
338
|
-
"A set of tags for the command.",
|
|
339
|
-
"file",
|
|
340
|
-
"source",
|
|
341
|
-
"A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.",
|
|
342
|
-
() => __ΩRecord,
|
|
343
|
-
() => __ΩCommandOption,
|
|
344
|
-
"options",
|
|
345
|
-
"The command options.",
|
|
346
|
-
() => __ΩCommandArgument,
|
|
347
|
-
"args",
|
|
348
|
-
"The positional arguments provided to the command.",
|
|
349
|
-
0,
|
|
350
|
-
"parent",
|
|
351
|
-
"The parent command.",
|
|
352
|
-
() => __ΩRecord,
|
|
353
|
-
0,
|
|
354
|
-
"children",
|
|
355
|
-
"Child commands.",
|
|
356
|
-
"CommandTree",
|
|
357
|
-
"Pn!P&4\"?#&4$?%&F4&?'&F4(?)P.*&J4+?,&n.o-#4/?0n1F42?3P,n4J45?6&n8o7#49?:MKw;y"
|
|
358
|
-
];
|
|
359
|
-
const __ΩSerializedCommandTree = [
|
|
360
|
-
() => __ΩOmit,
|
|
361
|
-
() => __ΩCommandTree,
|
|
362
|
-
"parent",
|
|
363
|
-
"children",
|
|
364
|
-
"parent",
|
|
365
|
-
"The parent command id.",
|
|
366
|
-
() => __ΩRecord,
|
|
367
|
-
0,
|
|
368
|
-
"children",
|
|
369
|
-
"Serialized child commands.",
|
|
370
|
-
"SerializedCommandTree",
|
|
371
|
-
"Pn\"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y"
|
|
372
|
-
];
|
|
373
|
-
const __ΩCommandMetadata = [
|
|
374
|
-
"title",
|
|
375
|
-
"The display name of the command.",
|
|
376
|
-
"description",
|
|
377
|
-
"A brief description of what the command does.",
|
|
378
|
-
"alias",
|
|
379
|
-
"One or more alternative names for the command.",
|
|
380
|
-
"tags",
|
|
381
|
-
"Optional tags for the command.",
|
|
382
|
-
"icon",
|
|
383
|
-
"An optional icon to visually represent the command in user interfaces.",
|
|
384
|
-
"reference",
|
|
385
|
-
"A URL to the command documentation or reference.",
|
|
386
|
-
"CommandMetadata",
|
|
387
|
-
"P&4!8?\"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y"
|
|
388
|
-
];
|
|
389
|
-
const __ΩCommandModule = [
|
|
390
|
-
() => __ΩCommandMetadata,
|
|
391
|
-
"metadata",
|
|
392
|
-
() => __ΩRecord,
|
|
393
|
-
() => __ΩCommandOptionConfig,
|
|
394
|
-
"JSONSchema7Object",
|
|
395
|
-
"StandardJSONSchemaV1",
|
|
396
|
-
"options",
|
|
397
|
-
() => __ΩCommandArgumentConfig,
|
|
398
|
-
"args",
|
|
399
|
-
"default",
|
|
400
|
-
"CommandModule",
|
|
401
|
-
"Pn!4\"8P&n$o##\"w%\"w&!J4'8Pn(F!\"w&!J4)8!4*8Mw+y"
|
|
402
|
-
];
|
|
403
|
-
|
|
404
|
-
//#endregion
|
|
405
|
-
export { CommandParameterKinds, __ΩAsCommandParameterConfig, __ΩBaseBooleanCommandParameter, __ΩBaseCommandParameter, __ΩBaseNumberCommandParameter, __ΩBaseSingleCommandParameter, __ΩBaseStringCommandParameter, __ΩBaseVariadicCommandParameter, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩBooleanCommandParameterConfig, __ΩCommandArgument, __ΩCommandArgumentConfig, __ΩCommandBase, __ΩCommandConfig, __ΩCommandMetadata, __ΩCommandModule, __ΩCommandOption, __ΩCommandOptionConfig, __ΩCommandParameter, __ΩCommandParameterConfig, __ΩCommandParameterKind, __ΩCommandParameterType, __ΩCommandTree, __ΩNumberCommandParameter, __ΩNumberCommandParameterConfig, __ΩSerializedCommandTree, __ΩSingleBooleanCommandParameter, __ΩSingleNumberCommandParameter, __ΩSingleStringCommandParameter, __ΩStringCommandParameter, __ΩStringCommandParameterConfig, __ΩVariadicBooleanCommandParameter, __ΩVariadicNumberCommandParameter, __ΩVariadicStringCommandParameter };
|
|
1
|
+
const e=[`T`,`K`,`Pick`,`l+e#!e"!fRb!b"Pde""N#!w#y`],t=[`T`,`Partial`,`l+e#!e"!fRb!Pde"!gN#"w"y`],n=[`T`,`K`,()=>e,()=>i,`Omit`,`b!b"e!!e!!ge!"o$#o##w%y`],r=[`K`,`T`,`Record`,`l'e#"Rb!b"Pde"!N#!w#y`],i=[`T`,`U`,`Exclude`,`l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)w#y`],a=[`CommandParameterType`,`P&')P&'JFJw!y`],o={string:`string`,number:`number`,boolean:`boolean`},s=[()=>o,()=>o,`CommandParameterKind`,`i!i"gfw#y`],c=[`name`,`The option name.`,()=>s,`kind`,`The option kind.`,`title`,`The display title.`,`description`,`The option description.`,`alias`,`Alternative option names.`,`default`,`The default value.`,!1,`env`,`The environment variable name or false to disable.`,`optional`,`Whether the option is optional.`,`variadic`,`Whether the option accepts multiple values.`,`BaseCommandParameter`,`P&4!?"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y`],l=[`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`BaseSingleCommandParameter`,`PP&')J4!8?".#4$?%Mw&y`],u=[`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`BaseVariadicCommandParameter`,`PP&F'F)FJ4!8?".#4$?%Mw&y`],d=[()=>c,`string`,`kind`,`The option kind.`,`default`,`The default value.`,`email`,`uri`,`uuid`,`ipv4`,`ipv6`,`date`,`time`,`date-time`,`duration`,`format`,`A standard string format to validate the option value against.`,`choices`,`The allowed choices for the option value.`,`BaseStringCommandParameter`,`Pn!."4#?$P&&FJ4%8?&P.'.(.).*.+.,.-.../J408?1&F428?3Mw4y`],f=[()=>d,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleStringCommandParameter`,`Pn!&4"8?#.$4%?&Mw'y`],p=[()=>d,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicStringCommandParameter`,`Pn!&F4"8?#.$4%?&Mw'y`],m=[()=>f,()=>p,`StringCommandParameter`,`Pn!n"Jw#y`],h=[()=>c,`number`,`kind`,`The option kind.`,`default`,`The default value.`,`choices`,`The allowed choices for the option value.`,`BaseNumberCommandParameter`,`Pn!."4#?$P''FJ4%8?&'F4'8?(Mw)y`],g=[()=>h,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleNumberCommandParameter`,`Pn!'4"8?#.$4%?&Mw'y`],_=[()=>h,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicNumberCommandParameter`,`Pn!'F4"8?#.$4%?&Mw'y`],v=[()=>g,()=>_,`NumberCommandParameter`,`Pn!n"Jw#y`],y=[()=>c,`boolean`,`kind`,`The option kind.`,`default`,`The default value.`,`BaseBooleanCommandParameter`,`Pn!."4#?$P))FJ4%8?&Mw'y`],b=[()=>y,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleBooleanCommandParameter`,`Pn!)4"8?#.$4%?&Mw'y`],x=[()=>y,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicBooleanCommandParameter`,`Pn!)F4"8?#.$4%?&Mw'y`],S=[()=>b,()=>x,`BooleanCommandParameter`,`Pn!n"Jw#y`],C=[()=>m,()=>v,()=>S,`CommandParameter`,`Pn!n"n#Jw$y`],w=[`T`,()=>e,`kind`,`alias`,()=>t,()=>n,`kind`,`alias`,`alias`,`AsCommandParameterConfig`,`b!Pe"!P.#.$Jo"#e"!P.'.(Jo&#o%"PP&&FJ4)8MKw*y`],T=[()=>w,()=>m,`StringCommandParameterConfig`,`n"o!"w#y`],E=[()=>w,()=>v,`NumberCommandParameterConfig`,`n"o!"w#y`],D=[()=>w,()=>S,`BooleanCommandParameterConfig`,`n"o!"w#y`],O=[()=>T,()=>E,()=>D,`CommandParameterConfig`,`Pn!n"n#Jw$y`],k=[()=>b,`isNegativeOf`,`The option this negates.`,`skipAddingNegative`,`Whether to skip adding a negative option.`,`BooleanCommandOption`,`Pn!&4"8?#)4$8?%Mw&y`],A=[()=>m,()=>v,()=>k,()=>x,`CommandOption`,`Pn!n"n#n$Jw%y`],j=[()=>w,()=>A,`CommandOptionConfig`,`n"o!"w#y`],M=[()=>m,()=>v,()=>S,`CommandArgument`,`Pn!n"n#Jw$y`],N=[()=>w,()=>M,`CommandArgumentConfig`,`n"o!"w#y`],P=[`id`,`The command id.`,`name`,`The command name.`,`path`,`The full command path value.`,`segments`,`The path segments.`,`title`,`The display title.`,`description`,`The command description.`,`alias`,`Alternative command names.`,`icon`,`The command icon.`,`reference`,`A URL to the command documentation or reference.`,`isVirtual`,`Whether the command is virtual.`,`CommandBase`,`PP&,J4!?"&4#?$P&,J4%?&&F4'?(&4)8?*&4+8?,&F4-8?.&4/8?0&418?2)43?4Mw5y`],F=[()=>P,`id`,`The command id.`,`entry`,`The resolved entry definition.`,`tags`,`Optional tags for the command.`,`file`,`source`,`A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.`,`CommandConfig`,`Pn!&4"?#!4$?%&F4&8?'P.(&J4)8?*Mw+y`],I=[()=>F,`title`,`The display title.`,`description`,`The command description.`,`alias`,`Alternative command names.`,`tags`,`A set of tags for the command.`,`file`,`source`,`A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.`,()=>r,()=>A,`options`,`The command options.`,()=>M,`args`,`The positional arguments provided to the command.`,0,`parent`,`The parent command.`,()=>r,0,`children`,`Child commands.`,`CommandTree`,`Pn!P&4"?#&4$?%&F4&?'&F4(?)P.*&J4+?,&n.o-#4/?0n1F42?3P,n4J45?6&n8o7#49?:MKw;y`],L=[()=>n,()=>I,`parent`,`children`,`parent`,`The parent command id.`,()=>r,0,`children`,`Serialized child commands.`,`SerializedCommandTree`,`Pn"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y`],R=[`title`,`The display name of the command.`,`description`,`A brief description of what the command does.`,`alias`,`One or more alternative names for the command.`,`tags`,`Optional tags for the command.`,`icon`,`An optional icon to visually represent the command in user interfaces.`,`reference`,`A URL to the command documentation or reference.`,`CommandMetadata`,`P&4!8?"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y`],z=[()=>R,`metadata`,()=>r,()=>j,`JSONSchema7Object`,`StandardJSONSchemaV1`,`options`,()=>N,`args`,`default`,`CommandModule`,`Pn!4"8P&n$o##"w%"w&!J4'8Pn(F!"w&!J4)8!4*8Mw+y`];export{o as CommandParameterKinds,w as __ΩAsCommandParameterConfig,y as __ΩBaseBooleanCommandParameter,c as __ΩBaseCommandParameter,h as __ΩBaseNumberCommandParameter,l as __ΩBaseSingleCommandParameter,d as __ΩBaseStringCommandParameter,u as __ΩBaseVariadicCommandParameter,k as __ΩBooleanCommandOption,S as __ΩBooleanCommandParameter,D as __ΩBooleanCommandParameterConfig,M as __ΩCommandArgument,N as __ΩCommandArgumentConfig,P as __ΩCommandBase,F as __ΩCommandConfig,R as __ΩCommandMetadata,z as __ΩCommandModule,A as __ΩCommandOption,j as __ΩCommandOptionConfig,C as __ΩCommandParameter,O as __ΩCommandParameterConfig,s as __ΩCommandParameterKind,a as __ΩCommandParameterType,I as __ΩCommandTree,v as __ΩNumberCommandParameter,E as __ΩNumberCommandParameterConfig,L as __ΩSerializedCommandTree,b as __ΩSingleBooleanCommandParameter,g as __ΩSingleNumberCommandParameter,f as __ΩSingleStringCommandParameter,m as __ΩStringCommandParameter,T as __ΩStringCommandParameterConfig,x as __ΩVariadicBooleanCommandParameter,_ as __ΩVariadicNumberCommandParameter,p as __ΩVariadicStringCommandParameter};
|
|
406
2
|
//# sourceMappingURL=command.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.mjs","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { StandardJSONSchemaV1 } from \"@standard-schema/spec\";\nimport type { JsonSchema7TupleType } from \"@stryke/json\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { JSONSchema7Object } from \"json-schema\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport type * as z3 from \"zod/v3\";\n\nexport type CommandParameterType =\n | string\n | number\n | boolean\n | (string | number)[];\n\nexport const CommandParameterKinds = {\n string: \"string\",\n number: \"number\",\n boolean: \"boolean\"\n} as const;\n\nexport type CommandParameterKind =\n (typeof CommandParameterKinds)[keyof typeof CommandParameterKinds];\n\nexport interface BaseCommandParameter {\n /**\n * The option name.\n */\n name: string;\n\n /**\n * The option kind.\n */\n kind: CommandParameterKind;\n\n /**\n * The display title.\n */\n title: string;\n\n /**\n * The option description.\n */\n description: string;\n\n /**\n * Alternative option names.\n */\n alias: string[];\n\n /**\n * The default value.\n */\n default?: string | number | boolean | string[] | number[] | boolean[];\n\n /**\n * The environment variable name or false to disable.\n */\n env: string | false;\n\n /**\n * Whether the option is optional.\n */\n optional: boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: boolean;\n}\n\nexport interface BaseSingleCommandParameter {\n /**\n * The default value.\n */\n default?: string | number | boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface BaseVariadicCommandParameter {\n /**\n * The default value.\n */\n default?: string[] | number[] | boolean[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport interface BaseStringCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"string\";\n\n /**\n * The default value.\n */\n default?: string | string[];\n\n /**\n * A standard string format to validate the option value against.\n */\n format?:\n | \"email\"\n | \"uri\"\n | \"uuid\"\n | \"ipv4\"\n | \"ipv6\"\n | \"date\"\n | \"time\"\n | \"date-time\"\n | \"duration\";\n\n /**\n * The allowed choices for the option value.\n */\n choices?: string[];\n}\n\nexport interface SingleStringCommandParameter extends BaseStringCommandParameter {\n /**\n * The default value.\n */\n default?: string;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicStringCommandParameter extends BaseStringCommandParameter {\n /**\n * The default value.\n */\n default?: string[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type StringCommandParameter =\n | SingleStringCommandParameter\n | VariadicStringCommandParameter;\n\nexport interface BaseNumberCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"number\";\n\n /**\n * The default value.\n */\n default?: number | number[];\n\n /**\n * The allowed choices for the option value.\n */\n choices?: number[];\n}\n\nexport interface SingleNumberCommandParameter extends BaseNumberCommandParameter {\n /**\n * The default value.\n */\n default?: number;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicNumberCommandParameter extends BaseNumberCommandParameter {\n /**\n * The default value.\n */\n default?: number[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type NumberCommandParameter =\n | SingleNumberCommandParameter\n | VariadicNumberCommandParameter;\n\nexport interface BaseBooleanCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"boolean\";\n\n /**\n * The default value.\n */\n default?: boolean | boolean[];\n}\n\nexport interface SingleBooleanCommandParameter extends BaseBooleanCommandParameter {\n /**\n * The default value.\n */\n default?: boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {\n /**\n * The default value.\n */\n default?: boolean[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type BooleanCommandParameter =\n | SingleBooleanCommandParameter\n | VariadicBooleanCommandParameter;\n\nexport type CommandParameter =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\n\nexport type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<\n T,\n \"kind\" | \"alias\"\n> &\n Partial<Omit<T, \"kind\" | \"alias\">> & {\n alias?: string | string[];\n };\n\nexport type StringCommandParameterConfig =\n AsCommandParameterConfig<StringCommandParameter>;\nexport type NumberCommandParameterConfig =\n AsCommandParameterConfig<NumberCommandParameter>;\nexport type BooleanCommandParameterConfig =\n AsCommandParameterConfig<BooleanCommandParameter>;\n\nexport type CommandParameterConfig =\n | StringCommandParameterConfig\n | NumberCommandParameterConfig\n | BooleanCommandParameterConfig;\n\nexport interface BooleanCommandOption extends SingleBooleanCommandParameter {\n /**\n * The option this negates.\n */\n isNegativeOf?: string;\n\n /**\n * Whether to skip adding a negative option.\n */\n skipAddingNegative?: boolean;\n}\n\nexport type CommandOption =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandOption\n | VariadicBooleanCommandParameter;\nexport type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;\n\nexport type CommandArgument =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\nexport type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;\n\nexport interface CommandBase {\n /**\n * The command id.\n */\n id: string | null;\n\n /**\n * The command name.\n */\n name: string;\n\n /**\n * The full command path value.\n */\n path: string | null;\n\n /**\n * The path segments.\n */\n segments: string[];\n\n /**\n * The display title.\n */\n title?: string;\n\n /**\n * The command description.\n */\n description?: string;\n\n /**\n * Alternative command names.\n */\n alias?: string[];\n\n /**\n * The command icon.\n */\n icon?: string;\n\n /**\n * A URL to the command documentation or reference.\n */\n reference?: string;\n\n /**\n * Whether the command is virtual.\n *\n * @remarks\n * 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.\n */\n isVirtual: boolean;\n}\n\nexport interface CommandConfig extends CommandBase {\n /**\n * The command id.\n */\n id: string;\n\n /**\n * The resolved entry definition.\n */\n entry: ResolvedEntryTypeDefinition;\n\n /**\n * Optional tags for the command.\n *\n * @remarks\n * 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.\n */\n tags?: string[];\n\n /**\n * A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.\n */\n source?: \"file\" | string;\n}\n\nexport type CommandTree = CommandConfig & {\n /**\n * The display title.\n */\n title: string;\n\n /**\n * The command description.\n */\n description: string;\n\n /**\n * Alternative command names.\n */\n alias: string[];\n\n /**\n * A set of tags for the command.\n *\n * @remarks\n * 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.\n */\n tags: string[];\n\n /**\n * A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.\n */\n source: \"file\" | string;\n\n /**\n * The command options.\n */\n options: Record<string, CommandOption>;\n\n /**\n * The positional arguments provided to the command.\n */\n args: CommandArgument[];\n\n /**\n * The parent command.\n */\n parent: null | CommandTree;\n\n /**\n * Child commands.\n */\n children: Record<string, CommandTree>;\n};\n\nexport type SerializedCommandTree = Omit<CommandTree, \"parent\" | \"children\"> & {\n /**\n * The parent command id.\n */\n parent: null | string;\n /**\n * Serialized child commands.\n */\n children: Record<string, SerializedCommandTree>;\n};\n\nexport interface CommandMetadata {\n /**\n * The display name of the command.\n *\n * @remarks\n * 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.\n */\n title?: string;\n\n /**\n * A brief description of what the command does.\n *\n * @remarks\n * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.\n */\n description?: string;\n\n /**\n * One or more alternative names for the command.\n */\n alias?: string | string[];\n\n /**\n * Optional tags for the command.\n *\n * @remarks\n * 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.\n */\n tags?: string[];\n\n /**\n * An optional icon to visually represent the command in user interfaces.\n *\n * @remarks\n * 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.\n */\n icon?: string;\n\n /**\n * A URL to the command documentation or reference.\n *\n * @remarks\n * 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 `{referenceLink}/command/subcommand`.\n */\n reference?: string;\n}\n\nexport interface CommandModule {\n metadata?: CommandMetadata;\n options?:\n | Record<string, CommandOptionConfig>\n | JSONSchema7Object\n | StandardJSONSchemaV1<Record<string, CommandParameterType>>\n | z3.AnyZodObject;\n args?:\n | CommandArgumentConfig[]\n | JsonSchema7TupleType\n | StandardJSONSchemaV1<CommandParameterType[]>\n | z3.AnyZodTuple;\n default?: AnyFunction;\n}\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAA4B;;;;;;AAE/D,MAAM,UAAU;CAAC;CAAG;OAAM;OAAiB;CAAA;CAAA;CAAA;;;;;;;AAE3C,MAAM,aAAS;CAAA;CAAS;CAAG;CAAY;CAA2B;AAClE,MAAI,0BAA4B,CAAC,wBAAqB,gBAAa;AAEnE,MAAK,wBAA0B;;CAE9B,QAAW;CACX,SAAY;CACZ;AACD,MAAC,0BAA+B;OAAG;OAAkB;CAAA;CAAA;CAAA;AAErD,MAAM,0BAAqB;CAAM;CAAG;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,gCAAgC;CAAC;CAAW;CAAoB;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,kCAA+B;CAAI;CAAW;CAAa;CAAA;CAAA;CAAA;CAAA;CAAA;AAEjE,MAAM,gCAA6B;OAAO;CAAW;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAErD,MAAM,kCAAQ;OAA8B;CAAiB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;AAI7D,MAAI,4BAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,gCAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;AAIJ,MAAE,oCAAgB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAElB,MAAE,4BAAiB;OAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;;;;AAInB,MAAG,mCAAoC;OAAO;CAAsB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpE,MAAM,qCAAgC;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtC,MAAK,6BAAe;OAAA;OAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,sBAAQ;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEd,MAAI,8BAAA;CAAA;OAAA;CAAA;CAAA;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,kCAAA;OAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;AAIJ,MAAK,mCAAiB;OAAA;OAAA;CAAA;CAAA;CAAA;AAEtB,MAAE,4BAAa;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEf,MAAI,0BAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,mBAAA;OAAA;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;AAIJ,MAAK,qBAAmB;OAAK;OAAA;OAAA;CAAA;CAAA;CAAA;AAE7B,MAAE,2BAAe;OAAA;OAAA;CAAA;CAAA;CAAA;AAEjB,MAAI,iBAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,mBAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIJ,MAAK,2BAAyB;OAAQ;OAAgB;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtD,MAAM,qBAAe;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAErB,MAAI,mBAAA;OAAA;CAAA;OAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
|
1
|
+
{"version":3,"file":"command.mjs","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { StandardJSONSchemaV1 } from \"@standard-schema/spec\";\nimport type { JsonSchema7TupleType } from \"@stryke/json\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { JSONSchema7Object } from \"json-schema\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport type * as z3 from \"zod/v3\";\n\nexport type CommandParameterType =\n | string\n | number\n | boolean\n | (string | number)[];\n\nexport const CommandParameterKinds = {\n string: \"string\",\n number: \"number\",\n boolean: \"boolean\"\n} as const;\n\nexport type CommandParameterKind =\n (typeof CommandParameterKinds)[keyof typeof CommandParameterKinds];\n\nexport interface BaseCommandParameter {\n /**\n * The option name.\n */\n name: string;\n\n /**\n * The option kind.\n */\n kind: CommandParameterKind;\n\n /**\n * The display title.\n */\n title: string;\n\n /**\n * The option description.\n */\n description: string;\n\n /**\n * Alternative option names.\n */\n alias: string[];\n\n /**\n * The default value.\n */\n default?: string | number | boolean | string[] | number[] | boolean[];\n\n /**\n * The environment variable name or false to disable.\n */\n env: string | false;\n\n /**\n * Whether the option is optional.\n */\n optional: boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: boolean;\n}\n\nexport interface BaseSingleCommandParameter {\n /**\n * The default value.\n */\n default?: string | number | boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface BaseVariadicCommandParameter {\n /**\n * The default value.\n */\n default?: string[] | number[] | boolean[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport interface BaseStringCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"string\";\n\n /**\n * The default value.\n */\n default?: string | string[];\n\n /**\n * A standard string format to validate the option value against.\n */\n format?:\n | \"email\"\n | \"uri\"\n | \"uuid\"\n | \"ipv4\"\n | \"ipv6\"\n | \"date\"\n | \"time\"\n | \"date-time\"\n | \"duration\";\n\n /**\n * The allowed choices for the option value.\n */\n choices?: string[];\n}\n\nexport interface SingleStringCommandParameter extends BaseStringCommandParameter {\n /**\n * The default value.\n */\n default?: string;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicStringCommandParameter extends BaseStringCommandParameter {\n /**\n * The default value.\n */\n default?: string[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type StringCommandParameter =\n | SingleStringCommandParameter\n | VariadicStringCommandParameter;\n\nexport interface BaseNumberCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"number\";\n\n /**\n * The default value.\n */\n default?: number | number[];\n\n /**\n * The allowed choices for the option value.\n */\n choices?: number[];\n}\n\nexport interface SingleNumberCommandParameter extends BaseNumberCommandParameter {\n /**\n * The default value.\n */\n default?: number;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicNumberCommandParameter extends BaseNumberCommandParameter {\n /**\n * The default value.\n */\n default?: number[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type NumberCommandParameter =\n | SingleNumberCommandParameter\n | VariadicNumberCommandParameter;\n\nexport interface BaseBooleanCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"boolean\";\n\n /**\n * The default value.\n */\n default?: boolean | boolean[];\n}\n\nexport interface SingleBooleanCommandParameter extends BaseBooleanCommandParameter {\n /**\n * The default value.\n */\n default?: boolean;\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: false;\n}\n\nexport interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {\n /**\n * The default value.\n */\n default?: boolean[];\n\n /**\n * Whether the option accepts multiple values.\n */\n variadic: true;\n}\n\nexport type BooleanCommandParameter =\n | SingleBooleanCommandParameter\n | VariadicBooleanCommandParameter;\n\nexport type CommandParameter =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\n\nexport type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<\n T,\n \"kind\" | \"alias\"\n> &\n Partial<Omit<T, \"kind\" | \"alias\">> & {\n alias?: string | string[];\n };\n\nexport type StringCommandParameterConfig =\n AsCommandParameterConfig<StringCommandParameter>;\nexport type NumberCommandParameterConfig =\n AsCommandParameterConfig<NumberCommandParameter>;\nexport type BooleanCommandParameterConfig =\n AsCommandParameterConfig<BooleanCommandParameter>;\n\nexport type CommandParameterConfig =\n | StringCommandParameterConfig\n | NumberCommandParameterConfig\n | BooleanCommandParameterConfig;\n\nexport interface BooleanCommandOption extends SingleBooleanCommandParameter {\n /**\n * The option this negates.\n */\n isNegativeOf?: string;\n\n /**\n * Whether to skip adding a negative option.\n */\n skipAddingNegative?: boolean;\n}\n\nexport type CommandOption =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandOption\n | VariadicBooleanCommandParameter;\nexport type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;\n\nexport type CommandArgument =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\nexport type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;\n\nexport interface CommandBase {\n /**\n * The command id.\n */\n id: string | null;\n\n /**\n * The command name.\n */\n name: string;\n\n /**\n * The full command path value.\n */\n path: string | null;\n\n /**\n * The path segments.\n */\n segments: string[];\n\n /**\n * The display title.\n */\n title?: string;\n\n /**\n * The command description.\n */\n description?: string;\n\n /**\n * Alternative command names.\n */\n alias?: string[];\n\n /**\n * The command icon.\n */\n icon?: string;\n\n /**\n * A URL to the command documentation or reference.\n */\n reference?: string;\n\n /**\n * Whether the command is virtual.\n *\n * @remarks\n * 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.\n */\n isVirtual: boolean;\n}\n\nexport interface CommandConfig extends CommandBase {\n /**\n * The command id.\n */\n id: string;\n\n /**\n * The resolved entry definition.\n */\n entry: ResolvedEntryTypeDefinition;\n\n /**\n * Optional tags for the command.\n *\n * @remarks\n * 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.\n */\n tags?: string[];\n\n /**\n * A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.\n */\n source?: \"file\" | string;\n}\n\nexport type CommandTree = CommandConfig & {\n /**\n * The display title.\n */\n title: string;\n\n /**\n * The command description.\n */\n description: string;\n\n /**\n * Alternative command names.\n */\n alias: string[];\n\n /**\n * A set of tags for the command.\n *\n * @remarks\n * 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.\n */\n tags: string[];\n\n /**\n * A string representing the source of the command, which can be \"file\", a specific plugin name, or any other string value that describes the source that added the command.\n */\n source: \"file\" | string;\n\n /**\n * The command options.\n */\n options: Record<string, CommandOption>;\n\n /**\n * The positional arguments provided to the command.\n */\n args: CommandArgument[];\n\n /**\n * The parent command.\n */\n parent: null | CommandTree;\n\n /**\n * Child commands.\n */\n children: Record<string, CommandTree>;\n};\n\nexport type SerializedCommandTree = Omit<CommandTree, \"parent\" | \"children\"> & {\n /**\n * The parent command id.\n */\n parent: null | string;\n /**\n * Serialized child commands.\n */\n children: Record<string, SerializedCommandTree>;\n};\n\nexport interface CommandMetadata {\n /**\n * The display name of the command.\n *\n * @remarks\n * 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.\n */\n title?: string;\n\n /**\n * A brief description of what the command does.\n *\n * @remarks\n * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.\n */\n description?: string;\n\n /**\n * One or more alternative names for the command.\n */\n alias?: string | string[];\n\n /**\n * Optional tags for the command.\n *\n * @remarks\n * 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.\n */\n tags?: string[];\n\n /**\n * An optional icon to visually represent the command in user interfaces.\n *\n * @remarks\n * 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.\n */\n icon?: string;\n\n /**\n * A URL to the command documentation or reference.\n *\n * @remarks\n * 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 `{referenceLink}/command/subcommand`.\n */\n reference?: string;\n}\n\nexport interface CommandModule {\n metadata?: CommandMetadata;\n options?:\n | Record<string, CommandOptionConfig>\n | JSONSchema7Object\n | StandardJSONSchemaV1<Record<string, CommandParameterType>>\n | z3.AnyZodObject;\n args?:\n | CommandArgumentConfig[]\n | JsonSchema7TupleType\n | StandardJSONSchemaV1<CommandParameterType[]>\n | z3.AnyZodTuple;\n default?: AnyFunction;\n}\n"],"mappings":"AAAA,MAAM,EAAU,CAAC,IAAK,IAAK,OAAQ,4BAA4B,8CAEzD,EAAU,CAAC,IAAG,QAAM,MAAiB,EAAA,OAAA,0BAAA,8CAErC,EAAS,CAAA,IAAS,IAAG,UAAY,sCAA2B,CAC9D,EAA4B,CAAC,uBAAqB,gBAAa,CAE9D,EAA0B,iBAE9B,OAAS,SACT,QAAU,UACV,CACA,EAA+B,KAAG,MAAkB,EAAA,uBAAA,YAAA,CAE/C,EAAqB,CAAM,OAAG,uBAAA,EAAA,OAAA,mBAAA,QAAA,qBAAA,cAAA,0BAAA,QAAA,4BAAA,UAAA,qBAAA,GAAA,MAAA,qDAAA,WAAA,kCAAA,WAAA,8CAAA,uBAAA,sEAAA,CAE9B,EAAgC,CAAC,UAAW,qBAAoB,GAAA,WAAA,8CAAA,6BAAA,wBAAA,CAEhE,EAA+B,CAAI,UAAW,qBAAa,GAAA,WAAA,8CAAA,+BAAA,2BAAA,CAE3D,EAA6B,KAAO,EAAW,SAAA,OAAA,mBAAA,UAAA,qBAAA,QAAA,MAAA,OAAA,OAAA,OAAA,OAAA,OAAA,YAAA,WAAA,SAAA,iEAAA,UAAA,4CAAA,6BAAA,0DAAA,CAE/C,EAAQ,KAA8B,EAAiB,UAAA,qBAAA,GAAA,WAAA,8CAAA,+BAAA,sBAAA,8JAIzD,EAAA,KAAA,MAAA,EAAA,yBAAA,YAAA,CAEA,EAAA,KAAA,EAAA,SAAA,OAAA,mBAAA,UAAA,qBAAA,UAAA,4CAAA,6BAAA,iCAAA,2JAIF,EAAgB,KAAA,EAAA,UAAA,qBAAA,GAAA,WAAA,8CAAA,iCAAA,uBAAA,CAEhB,EAAiB,KAAA,MAAA,EAAA,yBAAA,YAAA,sIAIhB,EAAoC,KAAO,EAAsB,UAAA,qBAAA,GAAA,WAAA,8CAAA,gCAAA,sBAAA,CAE9D,EAAgC,KAAA,EAAA,UAAA,qBAAA,GAAA,WAAA,8CAAA,kCAAA,uBAAA,CAEjC,EAAe,KAAA,MAAA,EAAA,0BAAA,YAAA,CAEd,EAAQ,KAAA,MAAA,MAAA,EAAA,mBAAA,cAAA,CAEV,EAAA,CAAA,QAAA,EAAA,OAAA,YAAA,MAAA,EAAA,OAAA,QAAA,QAAA,2BAAA,+CAAA,CAEA,EAAA,KAAA,MAAA,EAAA,+BAAA,WAAA,2DAIC,EAAiB,KAAA,MAAA,EAAA,gCAAA,WAAA,CAEpB,EAAa,KAAA,MAAA,MAAA,EAAA,yBAAA,cAAA,CAEX,EAAA,KAAA,EAAA,eAAA,2BAAA,qBAAA,4CAAA,uBAAA,sBAAA,CAEA,EAAA,KAAA,MAAA,MAAA,MAAA,EAAA,gBAAA,gBAAA,kDAIC,EAAmB,KAAK,MAAA,MAAA,EAAA,kBAAA,cAAA,CAE3B,EAAe,KAAA,MAAA,EAAA,wBAAA,WAAA,CAEb,EAAA,CAAA,KAAA,kBAAA,OAAA,oBAAA,OAAA,+BAAA,WAAA,qBAAA,QAAA,qBAAA,cAAA,2BAAA,QAAA,6BAAA,OAAA,oBAAA,YAAA,mDAAA,YAAA,kCAAA,cAAA,uEAAA,CAEA,EAAA,KAAA,EAAA,KAAA,kBAAA,QAAA,iCAAA,OAAA,iCAAA,OAAA,SAAA,4KAAA,gBAAA,qCAAA,2mBAIC,EAAyB,KAAQ,MAAgB,EAAA,SAAA,WAAA,SAAA,6BAAA,EAAA,EAAA,WAAA,6BAAA,wBAAA,uCAAA,CAEhD,EAAe,CAAA,QAAA,mCAAA,cAAA,gDAAA,QAAA,iDAAA,OAAA,iCAAA,OAAA,yEAAA,YAAA,mDAAA,kBAAA,iDAAA,CAEjB,EAAA,KAAA,EAAA,eAAA,MAAA,EAAA,oBAAA,uBAAA,cAAA,EAAA,OAAA,UAAA,gBAAA,gDAAA"}
|
package/dist/types/config.cjs
CHANGED
|
@@ -1,144 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
|
|
3
|
-
//#region src/types/config.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 __ΩRequired = [
|
|
16
|
-
"T",
|
|
17
|
-
"Required",
|
|
18
|
-
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
19
|
-
];
|
|
20
|
-
const __ΩOmit = [
|
|
21
|
-
"T",
|
|
22
|
-
"K",
|
|
23
|
-
() => __ΩPick,
|
|
24
|
-
() => __ΩExclude,
|
|
25
|
-
"Omit",
|
|
26
|
-
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
27
|
-
];
|
|
28
|
-
const __ΩRecord = [
|
|
29
|
-
"K",
|
|
30
|
-
"T",
|
|
31
|
-
"Record",
|
|
32
|
-
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
33
|
-
];
|
|
34
|
-
const __ΩExclude = [
|
|
35
|
-
"T",
|
|
36
|
-
"U",
|
|
37
|
-
"Exclude",
|
|
38
|
-
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
39
|
-
];
|
|
40
|
-
const __ΩBuildOptions = [
|
|
41
|
-
() => __ΩPick,
|
|
42
|
-
"root",
|
|
43
|
-
"name",
|
|
44
|
-
"title",
|
|
45
|
-
"description",
|
|
46
|
-
"logLevel",
|
|
47
|
-
"mode",
|
|
48
|
-
"skipCache",
|
|
49
|
-
"autoInstall",
|
|
50
|
-
"plugins",
|
|
51
|
-
"tsconfig",
|
|
52
|
-
"tsconfigRaw",
|
|
53
|
-
"BuildOptions",
|
|
54
|
-
"!P.\".#.$.%.&.'.(.).*.+.,Jo!#w-y"
|
|
55
|
-
];
|
|
56
|
-
const __ΩReferenceOptions = [
|
|
57
|
-
"app",
|
|
58
|
-
"A URL to the application documentation or reference.",
|
|
59
|
-
"commands",
|
|
60
|
-
"A URL to the application command specific documentation or reference.",
|
|
61
|
-
"ReferenceOptions",
|
|
62
|
-
"P&4!?\"&4#8?$Mw%y"
|
|
63
|
-
];
|
|
64
|
-
const __ΩBaseOptions = [
|
|
65
|
-
() => __ΩPartial,
|
|
66
|
-
() => __ΩBuildOptions,
|
|
67
|
-
"CommandOption",
|
|
68
|
-
"Context",
|
|
69
|
-
"context",
|
|
70
|
-
"CommandBase",
|
|
71
|
-
"input",
|
|
72
|
-
"",
|
|
73
|
-
false,
|
|
74
|
-
"globalOptions",
|
|
75
|
-
"A set of global command options to apply to each command.",
|
|
76
|
-
"isCaseSensitive",
|
|
77
|
-
true,
|
|
78
|
-
"Determines whether commands and option names are treated as case-sensitive.",
|
|
79
|
-
"bin",
|
|
80
|
-
"The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).",
|
|
81
|
-
true,
|
|
82
|
-
"autoAssignEnv",
|
|
83
|
-
"Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?",
|
|
84
|
-
() => __ΩReferenceOptions,
|
|
85
|
-
"reference",
|
|
86
|
-
"A URL to the application documentation or reference.",
|
|
87
|
-
"BaseOptions",
|
|
88
|
-
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8?+)4,8>-?.P&&FJ4/8?0P.1&J428?3Pn4&J458?6MKw7y"
|
|
89
|
-
];
|
|
90
|
-
const __ΩOptions = [
|
|
91
|
-
() => __ΩBaseOptions,
|
|
92
|
-
() => __ΩPartial,
|
|
93
|
-
"Options",
|
|
94
|
-
"Pn!!o\"\"Kw#y"
|
|
95
|
-
];
|
|
96
|
-
const __ΩOutputConfig = [
|
|
97
|
-
() => __ΩPick,
|
|
98
|
-
"path",
|
|
99
|
-
"copy",
|
|
100
|
-
"storage",
|
|
101
|
-
false,
|
|
102
|
-
"dts",
|
|
103
|
-
"An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.",
|
|
104
|
-
"OutputConfig",
|
|
105
|
-
"P!P.\".#.$Jo!#P.%4&8?'MKw(y"
|
|
106
|
-
];
|
|
107
|
-
const __ΩUserConfig = [
|
|
108
|
-
() => __ΩBaseOptions,
|
|
109
|
-
() => __ΩPartial,
|
|
110
|
-
() => __ΩPick,
|
|
111
|
-
"root",
|
|
112
|
-
() => __ΩOutputConfig,
|
|
113
|
-
"output",
|
|
114
|
-
"Configuration for the output of the build process",
|
|
115
|
-
"UserConfig",
|
|
116
|
-
"Pn!!o\"\"!.$o##Pn%4&8?'MKw(y"
|
|
117
|
-
];
|
|
118
|
-
const __ΩResolvedConfig = [
|
|
119
|
-
() => __ΩRequired,
|
|
120
|
-
() => __ΩOmit,
|
|
121
|
-
() => __ΩOptions,
|
|
122
|
-
"bin",
|
|
123
|
-
"reference",
|
|
124
|
-
() => __ΩRecord,
|
|
125
|
-
"bin",
|
|
126
|
-
"The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).",
|
|
127
|
-
() => __ΩReferenceOptions,
|
|
128
|
-
"reference",
|
|
129
|
-
"The URL(s) to the application documentation or reference.",
|
|
130
|
-
"appSpecificEnvPrefix",
|
|
131
|
-
"The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.",
|
|
132
|
-
() => __ΩUserConfig,
|
|
133
|
-
"userConfig",
|
|
134
|
-
"The user configuration for the Shell Shock process.",
|
|
135
|
-
"ResolvedConfig",
|
|
136
|
-
"P!!!n#P.$.%Jo\"#o!\"P&&o'?(n)4*?+&4,?-n.4/?0MKw1y"
|
|
137
|
-
];
|
|
138
|
-
|
|
139
|
-
//#endregion
|
|
140
|
-
exports.__ΩOptions = __ΩOptions;
|
|
141
|
-
exports.__ΩOutputConfig = __ΩOutputConfig;
|
|
142
|
-
exports.__ΩReferenceOptions = __ΩReferenceOptions;
|
|
143
|
-
exports.__ΩResolvedConfig = __ΩResolvedConfig;
|
|
144
|
-
exports.__ΩUserConfig = __ΩUserConfig;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=[`T`,`K`,`Pick`,`l+e#!e"!fRb!b"Pde""N#!w#y`],t=[`T`,`Partial`,`l+e#!e"!fRb!Pde"!gN#"w"y`],n=[`T`,`Required`,`l+e#!e"!fRb!Pde"!gN##w"y`],r=[`T`,`K`,()=>e,()=>a,`Omit`,`b!b"e!!e!!ge!"o$#o##w%y`],i=[`K`,`T`,`Record`,`l'e#"Rb!b"Pde"!N#!w#y`],a=[`T`,`U`,`Exclude`,`l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)w#y`],o=[()=>e,`root`,`name`,`title`,`description`,`logLevel`,`mode`,`skipCache`,`autoInstall`,`plugins`,`tsconfig`,`tsconfigRaw`,`BuildOptions`,`!P.".#.$.%.&.'.(.).*.+.,Jo!#w-y`],s=[`app`,`A URL to the application documentation or reference.`,`commands`,`A URL to the application command specific documentation or reference.`,`ReferenceOptions`,`P&4!?"&4#8?$Mw%y`],c=[()=>t,()=>o,`CommandOption`,`Context`,`context`,`CommandBase`,`input`,``,!1,`globalOptions`,`A set of global command options to apply to each command.`,`isCaseSensitive`,!0,`Determines whether commands and option names are treated as case-sensitive.`,`bin`,`The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).`,!0,`autoAssignEnv`,`Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?`,()=>s,`reference`,`A URL to the application documentation or reference.`,`BaseOptions`,`Pn"o!"PP"w#FP"w$2%"w&2'"w#F/(.)J4*8?+)4,8>-?.P&&FJ4/8?0P.1&J428?3Pn4&J458?6MKw7y`],l=[()=>c,()=>t,`Options`,`Pn!!o""Kw#y`],u=[()=>e,`path`,`copy`,`storage`,`sourceMap`,!1,`dts`,`An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.`,`OutputConfig`,`P!P.".#.$.%Jo!#P.&4'8?(MKw)y`],d=[()=>c,()=>t,()=>e,`root`,()=>u,`output`,`Configuration for the output of the build process`,`UserConfig`,`Pn!!o""!.$o##Pn%4&8?'MKw(y`],f=[()=>n,()=>r,()=>l,`bin`,`reference`,()=>i,`bin`,`The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).`,()=>s,`reference`,`The URL(s) to the application documentation or reference.`,`appSpecificEnvPrefix`,`The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.`,()=>d,`userConfig`,`The user configuration for the Shell Shock process.`,`ResolvedConfig`,`P!!!!n#P.$.%Jo"#o!"P&&o'?(n)4*?+&4,?-n.4/?0MKw1y`];exports.__ΩOptions=l,exports.__ΩOutputConfig=u,exports.__ΩReferenceOptions=s,exports.__ΩResolvedConfig=f,exports.__ΩUserConfig=d;
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.cjs";
|
|
2
2
|
import { Context } from "./context.cjs";
|
|
3
3
|
import { OutputConfig as OutputConfig$1 } from "powerlines";
|
|
4
|
+
import { AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types/plugin";
|
|
4
5
|
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
|
|
5
6
|
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
6
7
|
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
@@ -70,7 +71,7 @@ type Options = BaseOptions & Partial<NodeJsPluginOptions>;
|
|
|
70
71
|
/**
|
|
71
72
|
* The output configuration options for Shell Shock.
|
|
72
73
|
*/
|
|
73
|
-
type OutputConfig = Pick<OutputConfig$1, "path" | "copy" | "storage"> & {
|
|
74
|
+
type OutputConfig = Pick<OutputConfig$1, "path" | "copy" | "storage" | "sourceMap"> & {
|
|
74
75
|
/**
|
|
75
76
|
* An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
|
|
76
77
|
*/
|
|
@@ -88,7 +89,7 @@ type UserConfig = BaseOptions & Partial<NodeJsPluginUserConfig> & Pick<NodeJsPlu
|
|
|
88
89
|
/**
|
|
89
90
|
* The resolved configuration options for Shell Shock.
|
|
90
91
|
*/
|
|
91
|
-
type ResolvedConfig = TsdownPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "reference">> & {
|
|
92
|
+
type ResolvedConfig = TsdownPluginResolvedConfig & AlloyPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "reference">> & {
|
|
92
93
|
/**
|
|
93
94
|
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
94
95
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;KAiCK,YAAA,GAAe,IAAA,CAClB,sBAAA;AAAA,UAce,gBAAA;EAfZ;;;EAmBH,GAAA;EAlBsB;AAcxB;;;;;EAYE,QAAA;AAAA;AAAA,KAGG,WAAA,GAAc,OAAA,CAAQ,YAAA;EAAA;;;;;;EAOzB,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAuCnB;;;;;EA/B5B,eAAA;EARe;;;;;;;;;;EAoBf,GAAA;EAmB4B;AAM9B;;;;;;;;EAdE,aAAA;EAckC;;;;AAKpC;;EAXE,SAAA,GAAY,gBAAA;AAAA;;;;KAMF,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,mBAAA;;AAkB5C;;KAbY,YAAA,GAAe,IAAA,CACzB,cAAA;EAYuB;;;EANvB,GAAA;AAAA;;;;KAMU,UAAA,GAAa,WAAA,GACvB,OAAA,CAAQ,sBAAA,IACR,IAAA,CAAK,sBAAA;EADL;;;EAKE,MAAA,GAAS,YAAA;AAAA;;;;KAMD,cAAA,GAAiB,0BAAA,GAC3B,yBAAA,GACA,0BAAA,GACA,0BAAA,GACA,QAAA,CAAS,IAAA,CAAK,OAAA;EAJU;;;;;;;;;;EAetB,GAAA,EAAK,MAAA;EAeO;;;EAVZ,SAAA,EAAW,gBAAA;EAnBb;;;EAwBE,oBAAA;EArBO;;;EA0BP,UAAA,EAAY,UAAA;AAAA"}
|