@shell-shock/core 0.17.1 → 0.17.3
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/api.cjs +5 -4
- package/dist/api.mjs +4 -2
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +44 -11
- package/dist/components/command-validation-logic.mjs +44 -10
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +1 -2
- package/dist/components/exec-builtin.cjs +1 -2
- package/dist/components/helpers.cjs +1 -2
- package/dist/components/options-parser-logic.cjs +1 -2
- package/dist/components/state-builtin.cjs +1 -2
- package/dist/components/state-builtin.mjs +1 -1
- package/dist/components/usage.cjs +1 -2
- package/dist/components/utils-builtin.cjs +1 -7
- package/dist/components/utils-builtin.mjs +0 -5
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +3 -3
- package/dist/config.mjs +2 -1
- package/dist/contexts/command.cjs +6 -3
- package/dist/contexts/command.mjs +5 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/options.cjs +6 -3
- package/dist/contexts/options.mjs +5 -1
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/helpers/automd.cjs +1 -2
- package/dist/helpers/docs-helpers.cjs +3 -3
- package/dist/helpers/docs-helpers.mjs +2 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/paths.cjs +3 -3
- package/dist/helpers/paths.mjs +2 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +7 -5
- package/dist/helpers/persistence.mjs +6 -3
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +1 -2
- package/dist/helpers/utilities.cjs +3 -3
- package/dist/helpers/utilities.mjs +2 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +1 -2
- package/dist/plugin-utils/context-helpers.cjs +21 -12
- package/dist/plugin-utils/context-helpers.mjs +20 -10
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +5 -6
- package/dist/plugin-utils/deepkit.mjs +5 -5
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +14 -8
- package/dist/plugin-utils/description-helpers.mjs +13 -6
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +5 -4
- package/dist/plugin-utils/get-command-tree.mjs +4 -2
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/reflect.cjs +3 -3
- package/dist/plugin-utils/reflect.mjs +2 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +5 -4
- package/dist/plugin-utils/traverse-command-tree.mjs +4 -2
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +11 -7
- package/dist/plugin-utils/type-checks.mjs +10 -5
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +5 -5
- package/dist/plugin.mjs +5 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/deepkit.cjs +4 -9
- package/dist/resolver/deepkit.mjs +4 -8
- package/dist/resolver/deepkit.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +5 -4
- package/dist/resolver/helpers.mjs +4 -2
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/module.cjs +1 -2
- package/dist/resolver/resolve.cjs +8 -5
- package/dist/resolver/resolve.mjs +7 -3
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +65 -12
- package/dist/types/command.d.cts +9 -1
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +9 -1
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +64 -10
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +19 -7
- package/dist/types/config.d.cts +1 -1
- package/dist/types/config.d.mts +1 -1
- package/dist/types/config.mjs +18 -5
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +6 -3
- package/dist/types/context.mjs +5 -1
- package/dist/types/env.cjs +8 -3
- package/dist/types/env.d.cts +3 -1
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +3 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +7 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/options.cjs +1 -2
- package/package.json +11 -11
- 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/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/helpers/automd.cjs.map +0 -1
- package/dist/helpers/docs-helpers.cjs.map +0 -1
- package/dist/helpers/paths.cjs.map +0 -1
- package/dist/helpers/persistence.cjs.map +0 -1
- package/dist/helpers/update-package-json.cjs.map +0 -1
- package/dist/helpers/utilities.cjs.map +0 -1
- package/dist/helpers/validations.cjs.map +0 -1
- package/dist/plugin-utils/context-helpers.cjs.map +0 -1
- package/dist/plugin-utils/deepkit.cjs.map +0 -1
- package/dist/plugin-utils/description-helpers.cjs.map +0 -1
- package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/reflect.cjs.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/type-checks.cjs.map +0 -1
- package/dist/plugin.cjs.map +0 -1
- package/dist/resolver/deepkit.cjs.map +0 -1
- package/dist/resolver/helpers.cjs.map +0 -1
- package/dist/resolver/module.cjs.map +0 -1
- package/dist/resolver/resolve.cjs.map +0 -1
- package/dist/types/command.cjs.map +0 -1
- package/dist/types/config.cjs.map +0 -1
- package/dist/types/context.cjs.map +0 -1
- package/dist/types/env.cjs.map +0 -1
- package/dist/types/options.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"mappings":";;;;;;;;KAyBY,oBAAA;AAAA,cAMC,qBAAA;EAAA;;;;KAMD,oBAAA,WACF,qBAAA,eAAoC,qBAAA;AAAA,UAE7B,oBAAA;EALP;;;EASR,IAAA;;;;EAKA,IAAA,EAAM,oBAAA;EAZI;;;EAiBV,KAAA;EAhBiE;AAEnE;;EAmBE,WAAA;EAV0B;;;EAe1B,KAAA;EAVA;;;EAeA,GAAA;EAKA;;;EAAA,QAAA;EAQe;;;EAHf,QAAA;AAAA;AAAA,UAGe,sBAAA,SAA+B,oBAAA;EAS9C;;;EALA,IAAA;EAwBO;AAGT;;EAtBE,OAAA;EAsBkE;;;EAjBlE,MAAA;EA+BA;;;EAjBA,OAAA;AAAA;AAAA,UAGe,sBAAA,SAA+B,oBAAA;EAiBqB;;;EAbnE,IAAA;EAsBO;;AAGT;EApBE,OAAA;;;;EAKA,OAAA;AAAA;AAAA,UAGe,uBAAA,SAAgC,oBAAA;EAa7C;;;EATF,IAAA;EAWyB;AAE3B;;EARE,OAAA;AAAA;AAAA,KAGU,gBAAA,GACR,sBAAA,GACA,sBAAA,GACA,uBAAA;AAAA,KAEQ,wBAAA,WAAmC,oBAAA,IAAwB,IAAA,CACrE,CAAA,sBAGA,OAAA,CAAQ,IAAA,CAAK,CAAA;EACX,KAAA;AAAA;AAAA,KAGQ,4BAAA,GACV,wBAAA,CAAyB,sBAAA;AAAA,KACf,4BAAA,GACV,wBAAA,CAAyB,sBAAA;AAAA,KACf,6BAAA,GACV,wBAAA,CAAyB,uBAAA;AAAA,KAEf,sBAAA,GACR,4BAAA,GACA,4BAAA,GACA,6BAAA;AAAA,UAEa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A;AAAA,KAGU,WAAA,GAAc,aAAA;EAlFkD;AAE5E;;EAoFE,KAAA;EApF0B;;;EAyF1B,WAAA;EAtEA;;;EA2EA,KAAA;EAvDA;;;;;AAgBF;EA+CE,IAAA;;;;EAKA,MAAA;EA3CA;;;EAgDA,OAAA,EAAS,MAAA,SAAe,aAAA;EAnClB;;AAGR;EAqCE,IAAA,EAAM,eAAA;;;;EAKN,MAAA,SAAe,WAAA;EALT;;;EAUN,QAAA,EAAU,MAAA,SAAe,WAAA;AAAA;AAAA,KAGf,qBAAA,GAAwB,IAAA,CAAK,WAAA;EAlDf;;;EAsDxB,MAAA;EAhCA;;;EAoCA,QAAA,EAAU,MAAA,SAAe,qBAAA;AAAA;AAAA,UAGV,eAAA;EAxBT;;;;;;EA+BN,KAAA;EArBoC;AAGtC;;;;;EA0BE,WAAA;EAlBU;;;EAuBV,KAAA;EA/BuC;;;;;;EAuCvC,IAAA;EA5Be;;;;;;EAoCf,IAAA;EARA;;;;;AAmBF;EAHE,SAAA;AAAA;AAAA,UAGe,aAAA;EACf,QAAA,GAAW,eAAA;EACX,OAAA,GACI,MAAA,SAAe,mBAAA,IACf,iBAAA,GACA,oBAAA,CAAqB,MAAA,SAAe,oBAAA,KACpC,EAAA,CAAG,YAAA;EACP,IAAA,GACI,qBAAA,KACA,oBAAA,GACA,oBAAA,CAAqB,oBAAA,MACrB,EAAA,CAAG,WAAA;EACP,OAAA,GAAU,WAAA;AAAA"}
|
package/dist/types/command.d.mts
CHANGED
|
@@ -172,6 +172,10 @@ interface CommandConfig extends CommandBase {
|
|
|
172
172
|
* 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.
|
|
173
173
|
*/
|
|
174
174
|
tags?: string[];
|
|
175
|
+
/**
|
|
176
|
+
* 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.
|
|
177
|
+
*/
|
|
178
|
+
source?: "file" | string;
|
|
175
179
|
}
|
|
176
180
|
type CommandTree = CommandConfig & {
|
|
177
181
|
/**
|
|
@@ -187,12 +191,16 @@ type CommandTree = CommandConfig & {
|
|
|
187
191
|
*/
|
|
188
192
|
alias: string[];
|
|
189
193
|
/**
|
|
190
|
-
*
|
|
194
|
+
* A set of tags for the command.
|
|
191
195
|
*
|
|
192
196
|
* @remarks
|
|
193
197
|
* 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.
|
|
194
198
|
*/
|
|
195
199
|
tags: string[];
|
|
200
|
+
/**
|
|
201
|
+
* 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.
|
|
202
|
+
*/
|
|
203
|
+
source: "file" | string;
|
|
196
204
|
/**
|
|
197
205
|
* The command options.
|
|
198
206
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"mappings":";;;;;;;;KAyBY,oBAAA;AAAA,cAMC,qBAAA;EAAA;;;;KAMD,oBAAA,WACF,qBAAA,eAAoC,qBAAA;AAAA,UAE7B,oBAAA;EALP;;;EASR,IAAA;;;;EAKA,IAAA,EAAM,oBAAA;EAZI;;;EAiBV,KAAA;EAhBiE;AAEnE;;EAmBE,WAAA;EAV0B;;;EAe1B,KAAA;EAVA;;;EAeA,GAAA;EAKA;;;EAAA,QAAA;EAQe;;;EAHf,QAAA;AAAA;AAAA,UAGe,sBAAA,SAA+B,oBAAA;EAS9C;;;EALA,IAAA;EAwBO;AAGT;;EAtBE,OAAA;EAsBkE;;;EAjBlE,MAAA;EA+BA;;;EAjBA,OAAA;AAAA;AAAA,UAGe,sBAAA,SAA+B,oBAAA;EAiBqB;;;EAbnE,IAAA;EAsBO;;AAGT;EApBE,OAAA;;;;EAKA,OAAA;AAAA;AAAA,UAGe,uBAAA,SAAgC,oBAAA;EAa7C;;;EATF,IAAA;EAWyB;AAE3B;;EARE,OAAA;AAAA;AAAA,KAGU,gBAAA,GACR,sBAAA,GACA,sBAAA,GACA,uBAA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command.mjs
CHANGED
|
@@ -44,23 +44,33 @@ const __ΩCommandParameterKind = [
|
|
|
44
44
|
];
|
|
45
45
|
const __ΩBaseCommandParameter = [
|
|
46
46
|
"name",
|
|
47
|
+
"The option name.",
|
|
47
48
|
() => __ΩCommandParameterKind,
|
|
48
49
|
"kind",
|
|
50
|
+
"The option kind.",
|
|
49
51
|
"title",
|
|
52
|
+
"The display title.",
|
|
50
53
|
"description",
|
|
54
|
+
"The option description.",
|
|
51
55
|
"alias",
|
|
56
|
+
"Alternative option names.",
|
|
52
57
|
false,
|
|
53
58
|
"env",
|
|
59
|
+
"The environment variable name or false to disable.",
|
|
54
60
|
"optional",
|
|
61
|
+
"Whether the option is optional.",
|
|
55
62
|
"variadic",
|
|
63
|
+
"Whether the option accepts multiple values.",
|
|
56
64
|
"BaseCommandParameter",
|
|
57
|
-
"P&4
|
|
65
|
+
"P&4!?\"n#4$?%&4&?'&4(?)&F4*?+P&.,J4-?.)4/?0)41?2Mw3y"
|
|
58
66
|
];
|
|
59
67
|
const __ΩStringCommandParameter = [
|
|
60
68
|
() => __ΩBaseCommandParameter,
|
|
61
69
|
"string",
|
|
62
70
|
"kind",
|
|
71
|
+
"The option kind.",
|
|
63
72
|
"default",
|
|
73
|
+
"The default value.",
|
|
64
74
|
"email",
|
|
65
75
|
"uri",
|
|
66
76
|
"uuid",
|
|
@@ -71,26 +81,33 @@ const __ΩStringCommandParameter = [
|
|
|
71
81
|
"date-time",
|
|
72
82
|
"duration",
|
|
73
83
|
"format",
|
|
84
|
+
"A standard string format to validate the option value against.",
|
|
74
85
|
"choices",
|
|
86
|
+
"The allowed choices for the option value.",
|
|
75
87
|
"StringCommandParameter",
|
|
76
|
-
"Pn!.\"4
|
|
88
|
+
"Pn!.\"4#?$&4%8?&P.'.(.).*.+.,.-.../J408?1&F428?3Mw4y"
|
|
77
89
|
];
|
|
78
90
|
const __ΩNumberCommandParameter = [
|
|
79
91
|
() => __ΩBaseCommandParameter,
|
|
80
92
|
"number",
|
|
81
93
|
"kind",
|
|
94
|
+
"The option kind.",
|
|
82
95
|
"default",
|
|
96
|
+
"The default value.",
|
|
83
97
|
"choices",
|
|
98
|
+
"The allowed choices for the option value.",
|
|
84
99
|
"NumberCommandParameter",
|
|
85
|
-
"Pn!.\"4
|
|
100
|
+
"Pn!.\"4#?$'4%8?&'F4'8?(Mw)y"
|
|
86
101
|
];
|
|
87
102
|
const __ΩBooleanCommandParameter = [
|
|
88
103
|
() => __ΩBaseCommandParameter,
|
|
89
104
|
"boolean",
|
|
90
105
|
"kind",
|
|
106
|
+
"The option kind.",
|
|
91
107
|
"default",
|
|
108
|
+
"The default value.",
|
|
92
109
|
"BooleanCommandParameter",
|
|
93
|
-
"Pn!.\"4
|
|
110
|
+
"Pn!.\"4#?$)4%8?&Mw'y"
|
|
94
111
|
];
|
|
95
112
|
const __ΩCommandParameter = [
|
|
96
113
|
() => __ΩStringCommandParameter,
|
|
@@ -140,9 +157,11 @@ const __ΩCommandParameterConfig = [
|
|
|
140
157
|
const __ΩBooleanCommandOption = [
|
|
141
158
|
() => __ΩBooleanCommandParameter,
|
|
142
159
|
"isNegativeOf",
|
|
160
|
+
"The option this negates.",
|
|
143
161
|
"skipAddingNegative",
|
|
162
|
+
"Whether to skip adding a negative option.",
|
|
144
163
|
"BooleanCommandOption",
|
|
145
|
-
"Pn!&4\"8)4
|
|
164
|
+
"Pn!&4\"8?#)4$8?%Mw&y"
|
|
146
165
|
];
|
|
147
166
|
const __ΩCommandOption = [
|
|
148
167
|
() => __ΩStringCommandParameter,
|
|
@@ -172,44 +191,71 @@ const __ΩCommandArgumentConfig = [
|
|
|
172
191
|
];
|
|
173
192
|
const __ΩCommandBase = [
|
|
174
193
|
"id",
|
|
194
|
+
"The command id.",
|
|
175
195
|
"name",
|
|
196
|
+
"The command name.",
|
|
176
197
|
"path",
|
|
198
|
+
"The full command path value.",
|
|
177
199
|
"segments",
|
|
200
|
+
"The path segments.",
|
|
178
201
|
"title",
|
|
202
|
+
"The display title.",
|
|
179
203
|
"description",
|
|
204
|
+
"The command description.",
|
|
180
205
|
"alias",
|
|
206
|
+
"Alternative command names.",
|
|
181
207
|
"icon",
|
|
208
|
+
"The command icon.",
|
|
182
209
|
"reference",
|
|
210
|
+
"A URL to the command documentation or reference.",
|
|
183
211
|
"isVirtual",
|
|
212
|
+
"Whether the command is virtual.",
|
|
184
213
|
"CommandBase",
|
|
185
|
-
"PP&,J4
|
|
214
|
+
"PP&,J4!?\"&4#?$P&,J4%?&&F4'?(&4)8?*&4+8?,&F4-8?.&4/8?0&418?2)43?4Mw5y"
|
|
186
215
|
];
|
|
187
216
|
const __ΩCommandConfig = [
|
|
188
217
|
() => __ΩCommandBase,
|
|
189
218
|
"id",
|
|
219
|
+
"The command id.",
|
|
190
220
|
"entry",
|
|
221
|
+
"The resolved entry definition.",
|
|
191
222
|
"tags",
|
|
223
|
+
"Optional tags for the command.",
|
|
224
|
+
"file",
|
|
225
|
+
"source",
|
|
226
|
+
"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.",
|
|
192
227
|
"CommandConfig",
|
|
193
|
-
"Pn!&4\"
|
|
228
|
+
"Pn!&4\"?#!4$?%&F4&8?'P.(&J4)8?*Mw+y"
|
|
194
229
|
];
|
|
195
230
|
const __ΩCommandTree = [
|
|
196
231
|
() => __ΩCommandConfig,
|
|
197
232
|
"title",
|
|
233
|
+
"The display title.",
|
|
198
234
|
"description",
|
|
235
|
+
"The command description.",
|
|
199
236
|
"alias",
|
|
237
|
+
"Alternative command names.",
|
|
200
238
|
"tags",
|
|
239
|
+
"A set of tags for the command.",
|
|
240
|
+
"file",
|
|
241
|
+
"source",
|
|
242
|
+
"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.",
|
|
201
243
|
() => __ΩRecord,
|
|
202
244
|
() => __ΩCommandOption,
|
|
203
245
|
"options",
|
|
246
|
+
"The command options.",
|
|
204
247
|
() => __ΩCommandArgument,
|
|
205
248
|
"args",
|
|
249
|
+
"The positional arguments provided to the command.",
|
|
206
250
|
0,
|
|
207
251
|
"parent",
|
|
252
|
+
"The parent command.",
|
|
208
253
|
() => __ΩRecord,
|
|
209
254
|
0,
|
|
210
255
|
"children",
|
|
256
|
+
"Child commands.",
|
|
211
257
|
"CommandTree",
|
|
212
|
-
"Pn!P&4\"
|
|
258
|
+
"Pn!P&4\"?#&4$?%&F4&?'&F4(?)P.*&J4+?,&n.o-#4/?0n1F42?3P,n4J45?6&n8o7#49?:MKw;y"
|
|
213
259
|
];
|
|
214
260
|
const __ΩSerializedCommandTree = [
|
|
215
261
|
() => __ΩOmit,
|
|
@@ -217,21 +263,29 @@ const __ΩSerializedCommandTree = [
|
|
|
217
263
|
"parent",
|
|
218
264
|
"children",
|
|
219
265
|
"parent",
|
|
266
|
+
"The parent command id.",
|
|
220
267
|
() => __ΩRecord,
|
|
221
268
|
0,
|
|
222
269
|
"children",
|
|
270
|
+
"Serialized child commands.",
|
|
223
271
|
"SerializedCommandTree",
|
|
224
|
-
"Pn\"P.#.$Jo!#PP,&J4
|
|
272
|
+
"Pn\"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y"
|
|
225
273
|
];
|
|
226
274
|
const __ΩCommandMetadata = [
|
|
227
275
|
"title",
|
|
276
|
+
"The display name of the command.",
|
|
228
277
|
"description",
|
|
278
|
+
"A brief description of what the command does.",
|
|
229
279
|
"alias",
|
|
280
|
+
"One or more alternative names for the command.",
|
|
230
281
|
"tags",
|
|
282
|
+
"Optional tags for the command.",
|
|
231
283
|
"icon",
|
|
284
|
+
"An optional icon to visually represent the command in user interfaces.",
|
|
232
285
|
"reference",
|
|
286
|
+
"A URL to the command documentation or reference.",
|
|
233
287
|
"CommandMetadata",
|
|
234
|
-
"P&4!8&4
|
|
288
|
+
"P&4!8?\"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y"
|
|
235
289
|
];
|
|
236
290
|
const __ΩCommandModule = [
|
|
237
291
|
() => __ΩCommandMetadata,
|
|
@@ -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 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 StringCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"string\";\n\n /**\n * The default value.\n */\n default?: 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 NumberCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"number\";\n\n /**\n * The default value.\n */\n default?: number;\n\n /**\n * The allowed choices for the option value.\n */\n choices?: number[];\n}\n\nexport interface BooleanCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"boolean\";\n\n /**\n * The default value.\n */\n default?: boolean;\n}\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 BooleanCommandParameter {\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;\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\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 * 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 * 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;OAAG;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,4BAA4B;OAAO;CAAyB;CAAI;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,4BAA4B;OAAO;CAAwB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEjE,MAAM,6BAA6B;OAAO;CAAW;CAAA;CAAA;CAAA;CAAA;CAAA;AAErD,MAAM,sBAAQ;OAAA;OAA+C;OAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;;AAI7D,MAAI,kCAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,kCAAA;OAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;AAIJ,MAAE,4BAAgB;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAElB,MAAE,0BAAiB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAInB,MAAG,yBAA4B;OAAO;OAA8B;CAAA;CAAA;CAAA;AAEpE,MAAM,qBAAW;OAAA;OAAqB;OAAA;CAAA;CAAA;CAAA;AAEtC,MAAK,2BAAe;OAAA;OAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,iBAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEd,MAAI,mBAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEJ,MAAI,iBAAA;OAAA;CAAA;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;AAIJ,MAAK,qBAAiB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAE,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 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 StringCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"string\";\n\n /**\n * The default value.\n */\n default?: 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 NumberCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"number\";\n\n /**\n * The default value.\n */\n default?: number;\n\n /**\n * The allowed choices for the option value.\n */\n choices?: number[];\n}\n\nexport interface BooleanCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"boolean\";\n\n /**\n * The default value.\n */\n default?: boolean;\n}\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 BooleanCommandParameter {\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;\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;AAEpC,MAAM,4BAA4B;OAAO;CAAyB;CAAI;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CA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CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAE,mBAAa;OAAA;CAAA;OAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/config.cjs
CHANGED
|
@@ -55,9 +55,11 @@ const __ΩBuildOptions = [
|
|
|
55
55
|
];
|
|
56
56
|
const __ΩReferenceOptions = [
|
|
57
57
|
"app",
|
|
58
|
+
"A URL to the application documentation or reference.",
|
|
58
59
|
"commands",
|
|
60
|
+
"A URL to the application command specific documentation or reference.",
|
|
59
61
|
"ReferenceOptions",
|
|
60
|
-
"P&4
|
|
62
|
+
"P&4!?\"&4#8?$Mw%y"
|
|
61
63
|
];
|
|
62
64
|
const __ΩBaseOptions = [
|
|
63
65
|
() => __ΩPartial,
|
|
@@ -70,15 +72,20 @@ const __ΩBaseOptions = [
|
|
|
70
72
|
"",
|
|
71
73
|
false,
|
|
72
74
|
"globalOptions",
|
|
75
|
+
"A set of global command options to apply to each command.",
|
|
73
76
|
"isCaseSensitive",
|
|
74
77
|
true,
|
|
78
|
+
"Determines whether commands and option names are treated as case-sensitive.",
|
|
75
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).",
|
|
76
81
|
true,
|
|
77
82
|
"autoAssignEnv",
|
|
83
|
+
"Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?",
|
|
78
84
|
() => __ΩReferenceOptions,
|
|
79
85
|
"reference",
|
|
86
|
+
"A URL to the application documentation or reference.",
|
|
80
87
|
"BaseOptions",
|
|
81
|
-
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4
|
|
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"
|
|
82
89
|
];
|
|
83
90
|
const __ΩOptions = [
|
|
84
91
|
() => __ΩBaseOptions,
|
|
@@ -93,8 +100,9 @@ const __ΩOutputConfig = [
|
|
|
93
100
|
"storage",
|
|
94
101
|
false,
|
|
95
102
|
"dts",
|
|
103
|
+
"An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.",
|
|
96
104
|
"OutputConfig",
|
|
97
|
-
"P!P.\".#.$Jo!#P.%4&
|
|
105
|
+
"P!P.\".#.$Jo!#P.%4&8?'MKw(y"
|
|
98
106
|
];
|
|
99
107
|
const __ΩUserConfig = [
|
|
100
108
|
() => __ΩBaseOptions,
|
|
@@ -103,8 +111,9 @@ const __ΩUserConfig = [
|
|
|
103
111
|
"root",
|
|
104
112
|
() => __ΩOutputConfig,
|
|
105
113
|
"output",
|
|
114
|
+
"Configuration for the output of the build process",
|
|
106
115
|
"UserConfig",
|
|
107
|
-
"Pn!!o\"\"!.$o##Pn%4&
|
|
116
|
+
"Pn!!o\"\"!.$o##Pn%4&8?'MKw(y"
|
|
108
117
|
];
|
|
109
118
|
const __ΩResolvedConfig = [
|
|
110
119
|
() => __ΩRequired,
|
|
@@ -114,13 +123,17 @@ const __ΩResolvedConfig = [
|
|
|
114
123
|
"reference",
|
|
115
124
|
() => __ΩRecord,
|
|
116
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).",
|
|
117
127
|
() => __ΩReferenceOptions,
|
|
118
128
|
"reference",
|
|
129
|
+
"The URL(s) to the application documentation or reference.",
|
|
119
130
|
"appSpecificEnvPrefix",
|
|
131
|
+
"The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.",
|
|
120
132
|
() => __ΩUserConfig,
|
|
121
133
|
"userConfig",
|
|
134
|
+
"The user configuration for the Shell Shock process.",
|
|
122
135
|
"ResolvedConfig",
|
|
123
|
-
"P!!!n#P.$.%Jo\"#o!\"P&&o'n
|
|
136
|
+
"P!!!n#P.$.%Jo\"#o!\"P&&o'?(n)4*?+&4,?-n.4/?0MKw1y"
|
|
124
137
|
];
|
|
125
138
|
|
|
126
139
|
//#endregion
|
|
@@ -128,5 +141,4 @@ exports.__ΩOptions = __ΩOptions;
|
|
|
128
141
|
exports.__ΩOutputConfig = __ΩOutputConfig;
|
|
129
142
|
exports.__ΩReferenceOptions = __ΩReferenceOptions;
|
|
130
143
|
exports.__ΩResolvedConfig = __ΩResolvedConfig;
|
|
131
|
-
exports.__ΩUserConfig = __ΩUserConfig;
|
|
132
|
-
//# sourceMappingURL=config.cjs.map
|
|
144
|
+
exports.__ΩUserConfig = __ΩUserConfig;
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,7 +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 { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd
|
|
4
|
+
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
|
|
5
5
|
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
6
6
|
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
7
7
|
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.mjs";
|
|
2
2
|
import { Context } from "./context.mjs";
|
|
3
3
|
import { OutputConfig as OutputConfig$1 } from "powerlines";
|
|
4
|
-
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd
|
|
4
|
+
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
|
|
5
5
|
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
6
6
|
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
7
7
|
|
package/dist/types/config.mjs
CHANGED
|
@@ -53,9 +53,11 @@ const __ΩBuildOptions = [
|
|
|
53
53
|
];
|
|
54
54
|
const __ΩReferenceOptions = [
|
|
55
55
|
"app",
|
|
56
|
+
"A URL to the application documentation or reference.",
|
|
56
57
|
"commands",
|
|
58
|
+
"A URL to the application command specific documentation or reference.",
|
|
57
59
|
"ReferenceOptions",
|
|
58
|
-
"P&4
|
|
60
|
+
"P&4!?\"&4#8?$Mw%y"
|
|
59
61
|
];
|
|
60
62
|
const __ΩBaseOptions = [
|
|
61
63
|
() => __ΩPartial,
|
|
@@ -68,15 +70,20 @@ const __ΩBaseOptions = [
|
|
|
68
70
|
"",
|
|
69
71
|
false,
|
|
70
72
|
"globalOptions",
|
|
73
|
+
"A set of global command options to apply to each command.",
|
|
71
74
|
"isCaseSensitive",
|
|
72
75
|
true,
|
|
76
|
+
"Determines whether commands and option names are treated as case-sensitive.",
|
|
73
77
|
"bin",
|
|
78
|
+
"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).",
|
|
74
79
|
true,
|
|
75
80
|
"autoAssignEnv",
|
|
81
|
+
"Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?",
|
|
76
82
|
() => __ΩReferenceOptions,
|
|
77
83
|
"reference",
|
|
84
|
+
"A URL to the application documentation or reference.",
|
|
78
85
|
"BaseOptions",
|
|
79
|
-
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4
|
|
86
|
+
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8?+)4,8>-?.P&&FJ4/8?0P.1&J428?3Pn4&J458?6MKw7y"
|
|
80
87
|
];
|
|
81
88
|
const __ΩOptions = [
|
|
82
89
|
() => __ΩBaseOptions,
|
|
@@ -91,8 +98,9 @@ const __ΩOutputConfig = [
|
|
|
91
98
|
"storage",
|
|
92
99
|
false,
|
|
93
100
|
"dts",
|
|
101
|
+
"An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.",
|
|
94
102
|
"OutputConfig",
|
|
95
|
-
"P!P.\".#.$Jo!#P.%4&
|
|
103
|
+
"P!P.\".#.$Jo!#P.%4&8?'MKw(y"
|
|
96
104
|
];
|
|
97
105
|
const __ΩUserConfig = [
|
|
98
106
|
() => __ΩBaseOptions,
|
|
@@ -101,8 +109,9 @@ const __ΩUserConfig = [
|
|
|
101
109
|
"root",
|
|
102
110
|
() => __ΩOutputConfig,
|
|
103
111
|
"output",
|
|
112
|
+
"Configuration for the output of the build process",
|
|
104
113
|
"UserConfig",
|
|
105
|
-
"Pn!!o\"\"!.$o##Pn%4&
|
|
114
|
+
"Pn!!o\"\"!.$o##Pn%4&8?'MKw(y"
|
|
106
115
|
];
|
|
107
116
|
const __ΩResolvedConfig = [
|
|
108
117
|
() => __ΩRequired,
|
|
@@ -112,13 +121,17 @@ const __ΩResolvedConfig = [
|
|
|
112
121
|
"reference",
|
|
113
122
|
() => __ΩRecord,
|
|
114
123
|
"bin",
|
|
124
|
+
"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).",
|
|
115
125
|
() => __ΩReferenceOptions,
|
|
116
126
|
"reference",
|
|
127
|
+
"The URL(s) to the application documentation or reference.",
|
|
117
128
|
"appSpecificEnvPrefix",
|
|
129
|
+
"The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.",
|
|
118
130
|
() => __ΩUserConfig,
|
|
119
131
|
"userConfig",
|
|
132
|
+
"The user configuration for the Shell Shock process.",
|
|
120
133
|
"ResolvedConfig",
|
|
121
|
-
"P!!!n#P.$.%Jo\"#o!\"P&&o'n
|
|
134
|
+
"P!!!n#P.$.%Jo\"#o!\"P&&o'?(n)4*?+&4,?-n.4/?0MKw1y"
|
|
122
135
|
];
|
|
123
136
|
|
|
124
137
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd\";\nimport type {\n NodeJsPluginOptions,\n NodeJsPluginResolvedConfig,\n NodeJsPluginUserConfig\n} from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type {\n TsdownPluginResolvedConfig,\n TsdownPluginUserConfig\n} from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { OutputConfig as PowerlinesOutputConfig } from \"powerlines\";\nimport type { CommandBase, CommandOption } from \"./command\";\nimport type { Context } from \"./context\";\n\ntype BuildOptions = Pick<\n TsdownPluginUserConfig,\n | \"root\"\n | \"name\"\n | \"title\"\n | \"description\"\n | \"logLevel\"\n | \"mode\"\n | \"skipCache\"\n | \"autoInstall\"\n | \"plugins\"\n | \"tsconfig\"\n | \"tsconfigRaw\"\n>;\n\nexport interface ReferenceOptions {\n /**\n * A URL to the application documentation or reference.\n */\n app: string;\n\n /**\n * A URL to the application command specific documentation or reference.\n *\n * @remarks\n * This URL is expected to contain the token `{command}`, which will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{reference}/command/subcommand`.\n */\n commands?: string;\n}\n\ntype BaseOptions = Partial<BuildOptions> & {\n /**\n * A set of global command options to apply to each command.\n *\n * @remarks\n * Each command will inherit these global options. To disable the addition of these global options, set this property to `false`, or provide a custom set of options/a function that returns them. A `GlobalOptions` interface will be created by the `shell-shock types` command and added to the generated `shell-shock.d.ts` file.\n */\n globalOptions?:\n | CommandOption[]\n | ((context: Context, input: CommandBase) => CommandOption[])\n | false;\n\n /**\n * Determines whether commands and option names are treated as case-sensitive.\n *\n * @defaultValue `false`\n */\n isCaseSensitive?: boolean;\n\n /**\n * 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).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin?: string | string[];\n\n /**\n * Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?\n *\n * @remarks\n * If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `\"configPath\"` and the `autoAssignEnv` is `\"MY_APP_\"`, Shell Shock will look for an environment variable named `\"MY_APP_CONFIG_PATH\"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.\n *\n * @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa\n * @see https://stringcase.org/cases/constant/\n */\n autoAssignEnv?: true | string;\n\n /**\n * A URL to the application 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 application. 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 `{reference}/command/subcommand`.\n */\n reference?: ReferenceOptions | string;\n};\n\n/**\n * The plugin options for Shell Shock.\n */\nexport type Options = BaseOptions & Partial<NodeJsPluginOptions>;\n\n/**\n * The output configuration options for Shell Shock.\n */\nexport type OutputConfig = Pick<\n PowerlinesOutputConfig,\n \"path\" | \"copy\" | \"storage\"\n> & {\n /**\n * An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.\n */\n dts?: false;\n};\n\n/**\n * The user configuration options for Shell Shock.\n */\nexport type UserConfig = BaseOptions &\n Partial<NodeJsPluginUserConfig> &\n Pick<NodeJsPluginUserConfig, \"root\"> & {\n /**\n * Configuration for the output of the build process\n */\n output?: OutputConfig;\n };\n\n/**\n * The resolved configuration options for Shell Shock.\n */\nexport type ResolvedConfig = TsdownPluginResolvedConfig &\n AutoMDPluginResolvedConfig &\n NodeJsPluginResolvedConfig &\n Required<Omit<Options, \"bin\" | \"reference\">> & {\n /**\n * 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).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin: Record<string, string>;\n\n /**\n * The URL(s) to the application documentation or reference.\n */\n reference: ReferenceOptions;\n\n /**\n * The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.\n */\n appSpecificEnvPrefix: string;\n\n /**\n * The user configuration for the Shell Shock process.\n */\n userConfig: UserConfig;\n };\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAA4B;;;;;;AAE/D,MAAM,cAAc;CAAA;CAAM;CAAW;CAAM;;;;;;;;;AAE3C,MAAM,YAAS;CAAA;CAAS;CAAG;CAAY;CAAqB;AAC5D,MAAI,aAAc;CAAA;CAAM;CAAA;CAAe;CAA4B;AACnE,MAAM,kBAAkB;OAAC;CAAa;CAAS;CAAA;CAAa;CAAO;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AACnE,MAAK,sBAAuB;CAAC;CAAE;CAA+C;CAAA;CAAA;CAAA;CAAA;AAE9E,MAAC,iBAAsB;OAAI;OAAqB;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AACjD,MAAC,aAAkB;OAAO;OAAoB;CAAc;CAAO;CAAA;AAEnE,MAAC,kBAAuB;OAAG;CAAQ;CAAa;CAAK;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAErD,MAAM,gBAAQ;OAAa;OAAS;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,oBAAoB;OAAO;OAAmB;OAAe;CAAG;CAAA;OAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/context.cjs
CHANGED
|
@@ -11,15 +11,19 @@ const __ΩContext = [
|
|
|
11
11
|
"ResolvedConfig",
|
|
12
12
|
"TResolvedConfig",
|
|
13
13
|
"commandsPath",
|
|
14
|
+
"The root path where commands are located.",
|
|
14
15
|
"CommandOption",
|
|
15
16
|
"options",
|
|
17
|
+
"The default command arguments to apply to all application commands.",
|
|
16
18
|
"CommandConfig",
|
|
17
19
|
"inputs",
|
|
20
|
+
"The list of commands discovered in the project.",
|
|
18
21
|
() => __ΩRecord,
|
|
19
22
|
"CommandTree",
|
|
20
23
|
"commands",
|
|
24
|
+
"The command-line application structure.",
|
|
21
25
|
"Context",
|
|
22
|
-
"\"w!c\"P!!P&4
|
|
26
|
+
"\"w!c\"P!!P&4#?$\"w%F4&?'\"w(F4)?*&\"w,o+#4-?.MKw/y"
|
|
23
27
|
];
|
|
24
28
|
const __ΩUnresolvedContext = [
|
|
25
29
|
"ResolvedConfig",
|
|
@@ -30,5 +34,4 @@ const __ΩUnresolvedContext = [
|
|
|
30
34
|
|
|
31
35
|
//#endregion
|
|
32
36
|
exports.__ΩContext = __ΩContext;
|
|
33
|
-
exports.__ΩUnresolvedContext = __ΩUnresolvedContext;
|
|
34
|
-
//# sourceMappingURL=context.cjs.map
|
|
37
|
+
exports.__ΩUnresolvedContext = __ΩUnresolvedContext;
|
package/dist/types/context.mjs
CHANGED
|
@@ -9,15 +9,19 @@ const __ΩContext = [
|
|
|
9
9
|
"ResolvedConfig",
|
|
10
10
|
"TResolvedConfig",
|
|
11
11
|
"commandsPath",
|
|
12
|
+
"The root path where commands are located.",
|
|
12
13
|
"CommandOption",
|
|
13
14
|
"options",
|
|
15
|
+
"The default command arguments to apply to all application commands.",
|
|
14
16
|
"CommandConfig",
|
|
15
17
|
"inputs",
|
|
18
|
+
"The list of commands discovered in the project.",
|
|
16
19
|
() => __ΩRecord,
|
|
17
20
|
"CommandTree",
|
|
18
21
|
"commands",
|
|
22
|
+
"The command-line application structure.",
|
|
19
23
|
"Context",
|
|
20
|
-
"\"w!c\"P!!P&4
|
|
24
|
+
"\"w!c\"P!!P&4#?$\"w%F4&?'\"w(F4)?*&\"w,o+#4-?.MKw/y"
|
|
21
25
|
];
|
|
22
26
|
const __ΩUnresolvedContext = [
|
|
23
27
|
"ResolvedConfig",
|
package/dist/types/env.cjs
CHANGED
|
@@ -3,15 +3,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
//#region src/types/env.ts
|
|
4
4
|
const __ΩShellShockEnv = [
|
|
5
5
|
"PATHEXT",
|
|
6
|
+
"The system PATHEXT variable, used to determine which file extensions are considered executable on Windows.",
|
|
6
7
|
"PATH",
|
|
8
|
+
"The system PATH variable, used to locate executable files.",
|
|
7
9
|
"npm_config_user_agent",
|
|
10
|
+
"The npm user agent string, which can be used to detect if the environment is running within an npm script.",
|
|
8
11
|
"npm_config_fund",
|
|
12
|
+
"The npm_config_fund environment variable, which can be used to control npm's funding behavior.",
|
|
9
13
|
"npm_execpath",
|
|
14
|
+
"The npm execution path, which can be used to determine the location of the npm executable.",
|
|
10
15
|
"COMSPEC",
|
|
16
|
+
"The COMSPEC environment variable, which specifies the command-line interpreter to use on Windows.",
|
|
11
17
|
"ShellShockEnv",
|
|
12
|
-
"P
|
|
18
|
+
"P!&4!8?\"&4#8?$&4%8?&&4'8?(&4)8?*&4+8?,Mw-y"
|
|
13
19
|
];
|
|
14
20
|
|
|
15
21
|
//#endregion
|
|
16
|
-
exports.__ΩShellShockEnv = __ΩShellShockEnv;
|
|
17
|
-
//# sourceMappingURL=env.cjs.map
|
|
22
|
+
exports.__ΩShellShockEnv = __ΩShellShockEnv;
|
package/dist/types/env.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { EnvInterface } from "@powerlines/plugin-env/types/runtime";
|
|
2
|
+
|
|
1
3
|
//#region src/types/env.d.ts
|
|
2
|
-
interface ShellShockEnv {
|
|
4
|
+
interface ShellShockEnv extends EnvInterface {
|
|
3
5
|
/**
|
|
4
6
|
* The system PATHEXT variable, used to determine which file extensions are considered executable on Windows.
|
|
5
7
|
*
|
package/dist/types/env.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/types/env.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/types/env.ts"],"mappings":";;;UAqBiB,aAAA,SAAsB,YAAA;;AAAvC;;;;;;;;;EAWE,OAAA;EAyDA;;;;;;;EAhDA,IAAA;;;;;;;;;;;EAYA,qBAAA;;;;;;;;;;;EAYA,eAAA;;;;;;;;;;;EAYA,YAAA;;;;;;;;;;;EAYA,OAAA;AAAA"}
|
package/dist/types/env.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { EnvInterface } from "@powerlines/plugin-env/types/runtime";
|
|
2
|
+
|
|
1
3
|
//#region src/types/env.d.ts
|
|
2
|
-
interface ShellShockEnv {
|
|
4
|
+
interface ShellShockEnv extends EnvInterface {
|
|
3
5
|
/**
|
|
4
6
|
* The system PATHEXT variable, used to determine which file extensions are considered executable on Windows.
|
|
5
7
|
*
|
package/dist/types/env.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/types/env.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/types/env.ts"],"mappings":";;;UAqBiB,aAAA,SAAsB,YAAA;;AAAvC;;;;;;;;;EAWE,OAAA;EAyDA;;;;;;;EAhDA,IAAA;;;;;;;;;;;EAYA,qBAAA;;;;;;;;;;;EAYA,eAAA;;;;;;;;;;;EAYA,YAAA;;;;;;;;;;;EAYA,OAAA;AAAA"}
|