@shell-shock/core 0.6.0 → 0.8.0
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/components/docs.cjs +1 -1
- package/dist/components/docs.cjs.map +1 -1
- package/dist/components/docs.d.cts +5 -5
- package/dist/components/docs.d.mts +5 -5
- package/dist/components/docs.mjs +1 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/helpers.cjs +15 -0
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +13 -0
- package/dist/components/helpers.d.cts.map +1 -0
- package/dist/components/helpers.d.mts +13 -0
- package/dist/components/helpers.d.mts.map +1 -0
- package/dist/components/helpers.mjs +14 -0
- package/dist/components/helpers.mjs.map +1 -0
- package/dist/components/index.cjs +5 -1
- package/dist/components/index.d.cts +3 -2
- package/dist/components/index.d.mts +3 -2
- package/dist/components/index.mjs +3 -2
- package/dist/components/options-parser-logic.cjs +156 -31
- package/dist/components/options-parser-logic.cjs.map +1 -1
- package/dist/components/options-parser-logic.d.cts +47 -8
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +53 -14
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +154 -31
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/usage.cjs +38 -5
- package/dist/components/usage.cjs.map +1 -1
- package/dist/components/usage.d.cts +2 -4
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +2 -4
- package/dist/components/usage.d.mts.map +1 -1
- package/dist/components/usage.mjs +40 -7
- package/dist/components/usage.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +31 -3
- package/dist/helpers/persistence.cjs.map +1 -1
- package/dist/helpers/persistence.mjs +31 -3
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/resolve-command.cjs +68 -47
- package/dist/helpers/resolve-command.cjs.map +1 -1
- package/dist/helpers/resolve-command.mjs +70 -49
- package/dist/helpers/resolve-command.mjs.map +1 -1
- package/dist/helpers/validations.cjs +13 -36
- package/dist/helpers/validations.cjs.map +1 -1
- package/dist/helpers/validations.mjs +12 -36
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/plugin-utils/context-helpers.cjs +3 -45
- package/dist/plugin-utils/context-helpers.cjs.map +1 -1
- package/dist/plugin-utils/context-helpers.d.cts +1 -37
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +1 -37
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +4 -44
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +0 -2
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +2 -2
- package/dist/plugin.cjs +9 -15
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +9 -15
- package/dist/plugin.mjs.map +1 -1
- package/dist/types/command.d.cts +206 -33
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +206 -33
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/runtime.d.cts +5 -15
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts +5 -15
- package/dist/types/runtime.d.mts.map +1 -1
- package/package.json +25 -11
package/dist/types/command.d.mts
CHANGED
|
@@ -1,94 +1,267 @@
|
|
|
1
|
-
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
1
|
+
import { ReflectionFunction, ReflectionKind, ReflectionParameter, ReflectionProperty, SerializedTypes } from "@powerlines/deepkit/vendor/type";
|
|
2
2
|
import { AnyFunction } from "@stryke/types/base";
|
|
3
3
|
import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
|
|
4
4
|
|
|
5
5
|
//#region src/types/command.d.ts
|
|
6
|
-
interface
|
|
6
|
+
interface BaseCommandParameter {
|
|
7
|
+
/**
|
|
8
|
+
* The option name.
|
|
9
|
+
*/
|
|
7
10
|
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* The option kind.
|
|
13
|
+
*/
|
|
8
14
|
kind: ReflectionKind;
|
|
15
|
+
/**
|
|
16
|
+
* The display title.
|
|
17
|
+
*/
|
|
9
18
|
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* The option description.
|
|
21
|
+
*/
|
|
10
22
|
description: string;
|
|
23
|
+
/**
|
|
24
|
+
* Alternative option names.
|
|
25
|
+
*/
|
|
11
26
|
alias: string[];
|
|
27
|
+
/**
|
|
28
|
+
* The environment variable name or false to disable.
|
|
29
|
+
*/
|
|
12
30
|
env: string | false;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the option is optional.
|
|
33
|
+
*/
|
|
13
34
|
optional: boolean;
|
|
14
35
|
}
|
|
15
|
-
interface
|
|
36
|
+
interface StringCommandParameter extends BaseCommandParameter {
|
|
37
|
+
/**
|
|
38
|
+
* The option kind.
|
|
39
|
+
*/
|
|
16
40
|
kind: ReflectionKind.string;
|
|
41
|
+
/**
|
|
42
|
+
* The default value.
|
|
43
|
+
*/
|
|
17
44
|
default?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the option accepts multiple values.
|
|
47
|
+
*/
|
|
18
48
|
variadic: boolean;
|
|
19
49
|
}
|
|
20
|
-
interface
|
|
50
|
+
interface NumberCommandParameter extends BaseCommandParameter {
|
|
51
|
+
/**
|
|
52
|
+
* The option kind.
|
|
53
|
+
*/
|
|
21
54
|
kind: ReflectionKind.number;
|
|
55
|
+
/**
|
|
56
|
+
* The default value.
|
|
57
|
+
*/
|
|
22
58
|
default?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the option accepts multiple values.
|
|
61
|
+
*/
|
|
23
62
|
variadic: boolean;
|
|
24
63
|
}
|
|
25
|
-
interface
|
|
64
|
+
interface BooleanCommandParameter extends BaseCommandParameter {
|
|
65
|
+
/**
|
|
66
|
+
* The option kind.
|
|
67
|
+
*/
|
|
26
68
|
kind: ReflectionKind.boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The default value.
|
|
71
|
+
*/
|
|
27
72
|
default?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The option this negates.
|
|
75
|
+
*/
|
|
28
76
|
isNegativeOf?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Whether to skip adding a negative option.
|
|
79
|
+
*/
|
|
80
|
+
skipAddingNegative?: boolean;
|
|
81
|
+
}
|
|
82
|
+
interface StringCommandOption extends StringCommandParameter {
|
|
83
|
+
/**
|
|
84
|
+
* The property reflection.
|
|
85
|
+
*/
|
|
86
|
+
reflection?: ReflectionProperty;
|
|
87
|
+
}
|
|
88
|
+
interface NumberCommandOption extends NumberCommandParameter {
|
|
89
|
+
/**
|
|
90
|
+
* The property reflection.
|
|
91
|
+
*/
|
|
92
|
+
reflection?: ReflectionProperty;
|
|
93
|
+
}
|
|
94
|
+
interface BooleanCommandOption extends BooleanCommandParameter {
|
|
95
|
+
/**
|
|
96
|
+
* The property reflection.
|
|
97
|
+
*/
|
|
98
|
+
reflection?: ReflectionProperty;
|
|
99
|
+
/**
|
|
100
|
+
* The option this negates.
|
|
101
|
+
*/
|
|
102
|
+
isNegativeOf?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to skip adding a negative option.
|
|
105
|
+
*/
|
|
29
106
|
skipAddingNegative?: boolean;
|
|
30
107
|
}
|
|
31
108
|
type CommandOption = StringCommandOption | NumberCommandOption | BooleanCommandOption;
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
|
|
109
|
+
interface StringCommandArgument extends StringCommandParameter {
|
|
110
|
+
/**
|
|
111
|
+
* The parameter reflection.
|
|
112
|
+
*/
|
|
113
|
+
reflection: ReflectionParameter;
|
|
114
|
+
}
|
|
115
|
+
interface NumberCommandArgument extends NumberCommandParameter {
|
|
116
|
+
/**
|
|
117
|
+
* The parameter reflection.
|
|
118
|
+
*/
|
|
119
|
+
reflection: ReflectionParameter;
|
|
120
|
+
}
|
|
121
|
+
interface BooleanCommandArgument extends BooleanCommandParameter {
|
|
122
|
+
/**
|
|
123
|
+
* The parameter reflection.
|
|
124
|
+
*/
|
|
125
|
+
reflection: ReflectionParameter;
|
|
35
126
|
}
|
|
127
|
+
type CommandArgument = StringCommandArgument | NumberCommandArgument | BooleanCommandArgument;
|
|
36
128
|
interface CommandBase {
|
|
129
|
+
/**
|
|
130
|
+
* The command id.
|
|
131
|
+
*/
|
|
37
132
|
id: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* The command name.
|
|
135
|
+
*/
|
|
38
136
|
name: string;
|
|
137
|
+
/**
|
|
138
|
+
* The full command path value.
|
|
139
|
+
*/
|
|
140
|
+
path: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* The path segments.
|
|
143
|
+
*/
|
|
144
|
+
segments: string[];
|
|
145
|
+
/**
|
|
146
|
+
* The display title.
|
|
147
|
+
*/
|
|
39
148
|
title?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The command description.
|
|
151
|
+
*/
|
|
40
152
|
description?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Alternative command names.
|
|
155
|
+
*/
|
|
41
156
|
alias?: string[];
|
|
42
|
-
|
|
157
|
+
/**
|
|
158
|
+
* The command icon.
|
|
159
|
+
*/
|
|
160
|
+
icon?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Whether the command is virtual.
|
|
163
|
+
*/
|
|
43
164
|
isVirtual: boolean;
|
|
44
165
|
}
|
|
45
166
|
interface CommandInput extends CommandBase {
|
|
167
|
+
/**
|
|
168
|
+
* The command id.
|
|
169
|
+
*/
|
|
46
170
|
id: string;
|
|
171
|
+
/**
|
|
172
|
+
* The resolved entry definition.
|
|
173
|
+
*/
|
|
47
174
|
entry: ResolvedEntryTypeDefinition;
|
|
48
175
|
}
|
|
49
|
-
type CommandDynamicSegment = {
|
|
50
|
-
name: string;
|
|
51
|
-
title: string;
|
|
52
|
-
description: string;
|
|
53
|
-
optional: boolean;
|
|
54
|
-
} & ({
|
|
55
|
-
default?: string;
|
|
56
|
-
catchAll: false;
|
|
57
|
-
variadic: false;
|
|
58
|
-
} | {
|
|
59
|
-
default?: string;
|
|
60
|
-
catchAll: true;
|
|
61
|
-
variadic: false;
|
|
62
|
-
} | {
|
|
63
|
-
default?: string[];
|
|
64
|
-
catchAll: true;
|
|
65
|
-
variadic: true;
|
|
66
|
-
});
|
|
67
|
-
interface CommandTreePath extends CommandPath {
|
|
68
|
-
dynamics: Record<string, CommandDynamicSegment>;
|
|
69
|
-
}
|
|
70
176
|
type CommandTree = CommandInput & {
|
|
177
|
+
/**
|
|
178
|
+
* The display title.
|
|
179
|
+
*/
|
|
71
180
|
title: string;
|
|
181
|
+
/**
|
|
182
|
+
* The command description.
|
|
183
|
+
*/
|
|
72
184
|
description: string;
|
|
185
|
+
/**
|
|
186
|
+
* Alternative command names.
|
|
187
|
+
*/
|
|
73
188
|
alias: string[];
|
|
74
|
-
|
|
189
|
+
/**
|
|
190
|
+
* The command options.
|
|
191
|
+
*/
|
|
75
192
|
options: Record<string, CommandOption>;
|
|
193
|
+
/**
|
|
194
|
+
* The positional arguments provided to the command.
|
|
195
|
+
*/
|
|
196
|
+
arguments: CommandArgument[];
|
|
197
|
+
/**
|
|
198
|
+
* The parent command.
|
|
199
|
+
*/
|
|
76
200
|
parent: null | CommandTree;
|
|
201
|
+
/**
|
|
202
|
+
* Child commands.
|
|
203
|
+
*/
|
|
77
204
|
children: Record<string, CommandTree>;
|
|
205
|
+
/**
|
|
206
|
+
* The command handler reflection.
|
|
207
|
+
*/
|
|
208
|
+
reflection: ReflectionFunction | null;
|
|
78
209
|
};
|
|
79
|
-
type
|
|
210
|
+
type SerializedCommandOption = Omit<CommandOption, "reflection">;
|
|
211
|
+
type SerializedCommandArgument = Omit<CommandArgument, "reflection">;
|
|
212
|
+
type SerializedCommandTree = Omit<CommandTree, "options" | "arguments" | "parent" | "children" | "reflection"> & {
|
|
213
|
+
/**
|
|
214
|
+
* The command options.
|
|
215
|
+
*/
|
|
216
|
+
options: Record<string, SerializedCommandOption>;
|
|
217
|
+
/**
|
|
218
|
+
* The positional arguments provided to the command.
|
|
219
|
+
*/
|
|
220
|
+
arguments: SerializedCommandArgument[];
|
|
221
|
+
/**
|
|
222
|
+
* The parent command id.
|
|
223
|
+
*/
|
|
80
224
|
parent: null | string;
|
|
225
|
+
/**
|
|
226
|
+
* Serialized child commands.
|
|
227
|
+
*/
|
|
81
228
|
children: Record<string, SerializedCommandTree>;
|
|
229
|
+
/**
|
|
230
|
+
* The command handler reflection.
|
|
231
|
+
*/
|
|
232
|
+
reflection?: SerializedTypes;
|
|
82
233
|
};
|
|
83
234
|
interface Metadata {
|
|
235
|
+
/**
|
|
236
|
+
* The display name of the command.
|
|
237
|
+
*
|
|
238
|
+
* @remarks
|
|
239
|
+
* 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.
|
|
240
|
+
*/
|
|
84
241
|
title?: string;
|
|
242
|
+
/**
|
|
243
|
+
* A brief description of what the command does.
|
|
244
|
+
*
|
|
245
|
+
* @remarks
|
|
246
|
+
* This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
|
|
247
|
+
*/
|
|
85
248
|
description?: string;
|
|
249
|
+
/**
|
|
250
|
+
* One or more alternative names for the command.
|
|
251
|
+
*/
|
|
86
252
|
alias?: string | string[];
|
|
253
|
+
/**
|
|
254
|
+
* An optional icon to visually represent the command in user interfaces.
|
|
255
|
+
*
|
|
256
|
+
* @remarks
|
|
257
|
+
* 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.
|
|
258
|
+
*/
|
|
259
|
+
icon?: string;
|
|
87
260
|
}
|
|
88
261
|
interface CommandModule {
|
|
89
262
|
metadata?: Metadata;
|
|
90
263
|
default?: AnyFunction;
|
|
91
264
|
}
|
|
92
265
|
//#endregion
|
|
93
|
-
export {
|
|
266
|
+
export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
|
|
94
267
|
//# sourceMappingURL=command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;;UA4BiB,oBAAA;;AAAjB;AA+BA;EAeiB,IAAA,EAAA,MAAA;EAeA;AAmBjB;AAOA;EAOiB,IAAA,EAtFT,cAsFS;EAeL;;;EAGR,KAAA,EAAA,MAAA;EAAoB;AAExB;AAOA;EAOiB,WAAA,EAAA,MAAA;EAOL;;;EAGR,KAAA,EAAA,MAAA,EAAA;EAAsB;AAE1B;AAuCA;EAWY,GAAA,EAAA,MAAA,GAAW,KAAA;EAAG;;;EAoBb,QAAA,EAAA,OAAA;;AAQc,UA3LV,sBAAA,SAA+B,oBA2LrB,CAAA;EAAf;;;EAOA,IAAA,EA9LJ,cAAA,CAAe,MA8LY;EAEvB;AAEZ;;EAAoC,OAAA,CAAA,EAAA,MAAA;EAOV;;;EAYC,QAAA,EAAA,OAAA;;AAIZ,UA9ME,sBAAA,SAA+B,oBA8MjC,CAAA;EAAe;AAG9B;AA+BA;QA5OQ,cAAA,CAAe;;;;;;;;;;UAWN,uBAAA,SAAgC;;;;QAIzC,cAAA,CAAe;;;;;;;;;;;;;;UAeN,mBAAA,SAA4B;;;;eAI9B;;UAGE,mBAAA,SAA4B;;;;eAI9B;;UAGE,oBAAA,SAA6B;;;;eAI/B;;;;;;;;;;KAWH,aAAA,GACR,sBACA,sBACA;UAEa,qBAAA,SAA8B;;;;cAIjC;;UAGG,qBAAA,SAA8B;;;;cAIjC;;UAGG,sBAAA,SAA+B;;;;cAIlC;;KAGF,eAAA,GACR,wBACA,wBACA;UAEa,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuCA,YAAA,SAAqB;;;;;;;;SAQ7B;;KAGG,WAAA,GAAc;;;;;;;;;;;;;;;;WAgBf,eAAe;;;;aAIb;;;;iBAII;;;;YAIL,eAAe;;;;cAIb;;KAGF,uBAAA,GAA0B,KAAK;KAE/B,yBAAA,GAA4B,KAAK;KAEjC,qBAAA,GAAwB,KAClC;;;;WAMS,eAAe;;;;aAIb;;;;;;;;YAQD,eAAe;;;;eAIZ;;UAGE,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+BA,aAAA;aACJ;YACD"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.cjs";
|
|
2
2
|
import { Context, UnresolvedContext } from "./context.cjs";
|
|
3
3
|
import { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.cjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.cjs";
|
|
5
|
-
|
|
5
|
+
import { CommandContext } from "./runtime.cjs";
|
|
6
|
+
export { BaseCommandOptions, BaseCommandParameter, BaseConfig, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.mjs";
|
|
2
2
|
import { Context, UnresolvedContext } from "./context.mjs";
|
|
3
3
|
import { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.mjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.mjs";
|
|
5
|
-
|
|
5
|
+
import { CommandContext } from "./runtime.mjs";
|
|
6
|
+
export { BaseCommandOptions, BaseCommandParameter, BaseConfig, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
package/dist/types/runtime.d.cts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
//#region src/types/runtime.d.ts
|
|
2
|
-
interface
|
|
2
|
+
interface CommandContext {
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The current command path within the runtime context.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
path: string;
|
|
7
7
|
/**
|
|
8
8
|
* The individual segments that make up the path.
|
|
9
9
|
*/
|
|
10
|
-
segments:
|
|
11
|
-
}
|
|
12
|
-
interface RuntimeContext<TOptions extends Record<string, string | number | boolean | string[] | number[]> = Record<string, string | number | boolean | string[] | number[]>, TPath extends RuntimePath = RuntimePath> {
|
|
13
|
-
/**
|
|
14
|
-
* The parsed command-line options.
|
|
15
|
-
*/
|
|
16
|
-
options: TOptions;
|
|
17
|
-
/**
|
|
18
|
-
* The current command path within the runtime context.
|
|
19
|
-
*/
|
|
20
|
-
path: TPath;
|
|
10
|
+
segments: string[];
|
|
21
11
|
}
|
|
22
12
|
//#endregion
|
|
23
|
-
export {
|
|
13
|
+
export { CommandContext };
|
|
24
14
|
//# sourceMappingURL=runtime.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":[],"mappings":";UAkBiB,
|
|
1
|
+
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":[],"mappings":";UAkBiB,cAAA;EAAA"}
|
package/dist/types/runtime.d.mts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
//#region src/types/runtime.d.ts
|
|
2
|
-
interface
|
|
2
|
+
interface CommandContext {
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The current command path within the runtime context.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
path: string;
|
|
7
7
|
/**
|
|
8
8
|
* The individual segments that make up the path.
|
|
9
9
|
*/
|
|
10
|
-
segments:
|
|
11
|
-
}
|
|
12
|
-
interface RuntimeContext<TOptions extends Record<string, string | number | boolean | string[] | number[]> = Record<string, string | number | boolean | string[] | number[]>, TPath extends RuntimePath = RuntimePath> {
|
|
13
|
-
/**
|
|
14
|
-
* The parsed command-line options.
|
|
15
|
-
*/
|
|
16
|
-
options: TOptions;
|
|
17
|
-
/**
|
|
18
|
-
* The current command path within the runtime context.
|
|
19
|
-
*/
|
|
20
|
-
path: TPath;
|
|
10
|
+
segments: string[];
|
|
21
11
|
}
|
|
22
12
|
//#endregion
|
|
23
|
-
export {
|
|
13
|
+
export { CommandContext };
|
|
24
14
|
//# sourceMappingURL=runtime.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":[],"mappings":";UAkBiB,
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":[],"mappings":";UAkBiB,cAAA;EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the core Shell Shock functionality used to build and manage a command-line application.",
|
|
6
6
|
"repository": {
|
|
@@ -88,6 +88,20 @@
|
|
|
88
88
|
"default": "./dist/components/docs.mjs"
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
+
"./components/helpers": {
|
|
92
|
+
"require": {
|
|
93
|
+
"types": "./dist/components/helpers.d.cts",
|
|
94
|
+
"default": "./dist/components/helpers.cjs"
|
|
95
|
+
},
|
|
96
|
+
"import": {
|
|
97
|
+
"types": "./dist/components/helpers.d.mts",
|
|
98
|
+
"default": "./dist/components/helpers.mjs"
|
|
99
|
+
},
|
|
100
|
+
"default": {
|
|
101
|
+
"types": "./dist/components/helpers.d.mts",
|
|
102
|
+
"default": "./dist/components/helpers.mjs"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
91
105
|
"./components/options-parser-logic": {
|
|
92
106
|
"require": {
|
|
93
107
|
"types": "./dist/components/options-parser-logic.d.cts",
|
|
@@ -350,13 +364,13 @@
|
|
|
350
364
|
"@alloy-js/core": "^0.22.0",
|
|
351
365
|
"@alloy-js/markdown": "^0.22.0",
|
|
352
366
|
"@alloy-js/typescript": "^0.22.0",
|
|
353
|
-
"@powerlines/deepkit": "^0.6.
|
|
354
|
-
"@powerlines/plugin-alloy": "^0.20.
|
|
355
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
356
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
357
|
-
"@powerlines/plugin-nodejs": "^0.1.
|
|
358
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
359
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
367
|
+
"@powerlines/deepkit": "^0.6.51",
|
|
368
|
+
"@powerlines/plugin-alloy": "^0.20.15",
|
|
369
|
+
"@powerlines/plugin-automd": "^0.1.271",
|
|
370
|
+
"@powerlines/plugin-deepkit": "^0.11.150",
|
|
371
|
+
"@powerlines/plugin-nodejs": "^0.1.176",
|
|
372
|
+
"@powerlines/plugin-plugin": "^0.12.222",
|
|
373
|
+
"@powerlines/plugin-tsdown": "^0.1.224",
|
|
360
374
|
"@stryke/cli": "0.13.12",
|
|
361
375
|
"@stryke/convert": "^0.6.38",
|
|
362
376
|
"@stryke/fs": "^0.33.40",
|
|
@@ -368,10 +382,10 @@
|
|
|
368
382
|
"@stryke/types": "^0.10.37",
|
|
369
383
|
"automd": "0.4.2",
|
|
370
384
|
"defu": "6.1.4",
|
|
371
|
-
"powerlines": "^0.38.
|
|
385
|
+
"powerlines": "^0.38.38",
|
|
372
386
|
"rolldown": "1.0.0-beta.52"
|
|
373
387
|
},
|
|
374
|
-
"devDependencies": { "@types/node": "^22.19.
|
|
388
|
+
"devDependencies": { "@types/node": "^22.19.10", "typescript": "^5.9.3" },
|
|
375
389
|
"publishConfig": { "access": "public" },
|
|
376
|
-
"gitHead": "
|
|
390
|
+
"gitHead": "a3710248496a9b6251c18d6ee4af3587a0dc1fa5"
|
|
377
391
|
}
|