@shell-shock/core 0.7.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.
Files changed (76) hide show
  1. package/dist/components/docs.cjs +1 -1
  2. package/dist/components/docs.cjs.map +1 -1
  3. package/dist/components/docs.d.cts +5 -5
  4. package/dist/components/docs.d.mts +5 -5
  5. package/dist/components/docs.mjs +1 -1
  6. package/dist/components/docs.mjs.map +1 -1
  7. package/dist/components/helpers.cjs +15 -0
  8. package/dist/components/helpers.cjs.map +1 -0
  9. package/dist/components/helpers.d.cts +13 -0
  10. package/dist/components/helpers.d.cts.map +1 -0
  11. package/dist/components/helpers.d.mts +13 -0
  12. package/dist/components/helpers.d.mts.map +1 -0
  13. package/dist/components/helpers.mjs +14 -0
  14. package/dist/components/helpers.mjs.map +1 -0
  15. package/dist/components/index.cjs +4 -2
  16. package/dist/components/index.d.cts +3 -2
  17. package/dist/components/index.d.mts +3 -2
  18. package/dist/components/index.mjs +3 -2
  19. package/dist/components/options-parser-logic.cjs +121 -97
  20. package/dist/components/options-parser-logic.cjs.map +1 -1
  21. package/dist/components/options-parser-logic.d.cts +25 -17
  22. package/dist/components/options-parser-logic.d.cts.map +1 -1
  23. package/dist/components/options-parser-logic.d.mts +25 -17
  24. package/dist/components/options-parser-logic.d.mts.map +1 -1
  25. package/dist/components/options-parser-logic.mjs +120 -96
  26. package/dist/components/options-parser-logic.mjs.map +1 -1
  27. package/dist/components/usage.cjs +33 -1
  28. package/dist/components/usage.cjs.map +1 -1
  29. package/dist/components/usage.d.cts +2 -2
  30. package/dist/components/usage.d.cts.map +1 -1
  31. package/dist/components/usage.d.mts +2 -2
  32. package/dist/components/usage.mjs +35 -3
  33. package/dist/components/usage.mjs.map +1 -1
  34. package/dist/helpers/persistence.cjs +4 -21
  35. package/dist/helpers/persistence.cjs.map +1 -1
  36. package/dist/helpers/persistence.mjs +4 -21
  37. package/dist/helpers/persistence.mjs.map +1 -1
  38. package/dist/helpers/resolve-command.cjs +15 -55
  39. package/dist/helpers/resolve-command.cjs.map +1 -1
  40. package/dist/helpers/resolve-command.mjs +16 -56
  41. package/dist/helpers/resolve-command.mjs.map +1 -1
  42. package/dist/helpers/validations.cjs +13 -36
  43. package/dist/helpers/validations.cjs.map +1 -1
  44. package/dist/helpers/validations.mjs +12 -36
  45. package/dist/helpers/validations.mjs.map +1 -1
  46. package/dist/index.d.cts +3 -2
  47. package/dist/index.d.mts +3 -2
  48. package/dist/plugin-utils/context-helpers.cjs +3 -45
  49. package/dist/plugin-utils/context-helpers.cjs.map +1 -1
  50. package/dist/plugin-utils/context-helpers.d.cts +1 -37
  51. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  52. package/dist/plugin-utils/context-helpers.d.mts +1 -37
  53. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  54. package/dist/plugin-utils/context-helpers.mjs +4 -44
  55. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  56. package/dist/plugin-utils/index.cjs +0 -2
  57. package/dist/plugin-utils/index.d.cts +2 -2
  58. package/dist/plugin-utils/index.d.mts +2 -2
  59. package/dist/plugin-utils/index.mjs +2 -2
  60. package/dist/plugin.cjs +9 -15
  61. package/dist/plugin.cjs.map +1 -1
  62. package/dist/plugin.d.cts.map +1 -1
  63. package/dist/plugin.d.mts.map +1 -1
  64. package/dist/plugin.mjs +9 -15
  65. package/dist/plugin.mjs.map +1 -1
  66. package/dist/types/command.d.cts +26 -118
  67. package/dist/types/command.d.cts.map +1 -1
  68. package/dist/types/command.d.mts +26 -118
  69. package/dist/types/command.d.mts.map +1 -1
  70. package/dist/types/index.d.cts +3 -2
  71. package/dist/types/index.d.mts +3 -2
  72. package/dist/types/runtime.d.cts +5 -15
  73. package/dist/types/runtime.d.cts.map +1 -1
  74. package/dist/types/runtime.d.mts +5 -15
  75. package/dist/types/runtime.d.mts.map +1 -1
  76. package/package.json +24 -10
@@ -3,7 +3,7 @@ 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 BaseCommandArgument {
6
+ interface BaseCommandParameter {
7
7
  /**
8
8
  * The option name.
9
9
  */
@@ -33,7 +33,7 @@ interface BaseCommandArgument {
33
33
  */
34
34
  optional: boolean;
35
35
  }
36
- interface StringCommandArgument extends BaseCommandArgument {
36
+ interface StringCommandParameter extends BaseCommandParameter {
37
37
  /**
38
38
  * The option kind.
39
39
  */
@@ -47,7 +47,7 @@ interface StringCommandArgument extends BaseCommandArgument {
47
47
  */
48
48
  variadic: boolean;
49
49
  }
50
- interface NumberCommandArgument extends BaseCommandArgument {
50
+ interface NumberCommandParameter extends BaseCommandParameter {
51
51
  /**
52
52
  * The option kind.
53
53
  */
@@ -61,7 +61,7 @@ interface NumberCommandArgument extends BaseCommandArgument {
61
61
  */
62
62
  variadic: boolean;
63
63
  }
64
- interface BooleanCommandArgument extends BaseCommandArgument {
64
+ interface BooleanCommandParameter extends BaseCommandParameter {
65
65
  /**
66
66
  * The option kind.
67
67
  */
@@ -79,19 +79,19 @@ interface BooleanCommandArgument extends BaseCommandArgument {
79
79
  */
80
80
  skipAddingNegative?: boolean;
81
81
  }
82
- interface StringCommandOption extends StringCommandArgument {
82
+ interface StringCommandOption extends StringCommandParameter {
83
83
  /**
84
84
  * The property reflection.
85
85
  */
86
86
  reflection?: ReflectionProperty;
87
87
  }
88
- interface NumberCommandOption extends NumberCommandArgument {
88
+ interface NumberCommandOption extends NumberCommandParameter {
89
89
  /**
90
90
  * The property reflection.
91
91
  */
92
92
  reflection?: ReflectionProperty;
93
93
  }
94
- interface BooleanCommandOption extends BooleanCommandArgument {
94
+ interface BooleanCommandOption extends BooleanCommandParameter {
95
95
  /**
96
96
  * The property reflection.
97
97
  */
@@ -106,35 +106,25 @@ interface BooleanCommandOption extends BooleanCommandArgument {
106
106
  skipAddingNegative?: boolean;
107
107
  }
108
108
  type CommandOption = StringCommandOption | NumberCommandOption | BooleanCommandOption;
109
- interface StringCommandParameter extends StringCommandArgument {
109
+ interface StringCommandArgument extends StringCommandParameter {
110
110
  /**
111
111
  * The parameter reflection.
112
112
  */
113
113
  reflection: ReflectionParameter;
114
114
  }
115
- interface NumberCommandParameter extends NumberCommandArgument {
115
+ interface NumberCommandArgument extends NumberCommandParameter {
116
116
  /**
117
117
  * The parameter reflection.
118
118
  */
119
119
  reflection: ReflectionParameter;
120
120
  }
121
- interface BooleanCommandParameter extends BooleanCommandArgument {
121
+ interface BooleanCommandArgument extends BooleanCommandParameter {
122
122
  /**
123
123
  * The parameter reflection.
124
124
  */
125
125
  reflection: ReflectionParameter;
126
126
  }
127
- type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
128
- interface CommandPath {
129
- /**
130
- * The full path value.
131
- */
132
- value: string | null;
133
- /**
134
- * The path segments.
135
- */
136
- segments: string[];
137
- }
127
+ type CommandArgument = StringCommandArgument | NumberCommandArgument | BooleanCommandArgument;
138
128
  interface CommandBase {
139
129
  /**
140
130
  * The command id.
@@ -144,6 +134,14 @@ interface CommandBase {
144
134
  * The command name.
145
135
  */
146
136
  name: string;
137
+ /**
138
+ * The full command path value.
139
+ */
140
+ path: string | null;
141
+ /**
142
+ * The path segments.
143
+ */
144
+ segments: string[];
147
145
  /**
148
146
  * The display title.
149
147
  */
@@ -160,10 +158,6 @@ interface CommandBase {
160
158
  * The command icon.
161
159
  */
162
160
  icon?: string;
163
- /**
164
- * The command path.
165
- */
166
- path: CommandPath;
167
161
  /**
168
162
  * Whether the command is virtual.
169
163
  */
@@ -179,80 +173,6 @@ interface CommandInput extends CommandBase {
179
173
  */
180
174
  entry: ResolvedEntryTypeDefinition;
181
175
  }
182
- /**
183
- * Represents a dynamic command segment with metadata and matching behavior.
184
- */
185
- type CommandDynamicSegment = {
186
- /**
187
- * The parameter reflection.
188
- */
189
- reflection?: ReflectionParameter;
190
- /**
191
- * The segment value.
192
- */
193
- segment: string;
194
- /**
195
- * The segment name.
196
- */
197
- name: string;
198
- /**
199
- * The segment title.
200
- */
201
- title: string;
202
- /**
203
- * The segment description.
204
- */
205
- description: string;
206
- /**
207
- * Whether the segment is optional.
208
- */
209
- optional: boolean;
210
- } & ({
211
- /**
212
- * The default value.
213
- */
214
- default?: string;
215
- /**
216
- * Whether the segment is a catch-all.
217
- */
218
- catchAll: false;
219
- /**
220
- * Whether the segment is variadic.
221
- */
222
- variadic: false;
223
- } | {
224
- /**
225
- * The default value.
226
- */
227
- default?: string;
228
- /**
229
- * Whether the segment is a catch-all.
230
- */
231
- catchAll: true;
232
- /**
233
- * Whether the segment is variadic.
234
- */
235
- variadic: false;
236
- } | {
237
- /**
238
- * The default values.
239
- */
240
- default?: string[];
241
- /**
242
- * Whether the segment is a catch-all.
243
- */
244
- catchAll: true;
245
- /**
246
- * Whether the segment is variadic.
247
- */
248
- variadic: true;
249
- });
250
- interface CommandTreePath extends CommandPath {
251
- /**
252
- * Dynamic segment definitions.
253
- */
254
- dynamics: Record<string, CommandDynamicSegment>;
255
- }
256
176
  type CommandTree = CommandInput & {
257
177
  /**
258
178
  * The display title.
@@ -266,18 +186,14 @@ type CommandTree = CommandInput & {
266
186
  * Alternative command names.
267
187
  */
268
188
  alias: string[];
269
- /**
270
- * The command path with dynamics.
271
- */
272
- path: CommandTreePath;
273
189
  /**
274
190
  * The command options.
275
191
  */
276
192
  options: Record<string, CommandOption>;
277
193
  /**
278
- * The positional parameter options provided to the command.
194
+ * The positional arguments provided to the command.
279
195
  */
280
- params: CommandParameter[];
196
+ arguments: CommandArgument[];
281
197
  /**
282
198
  * The parent command.
283
199
  */
@@ -292,24 +208,16 @@ type CommandTree = CommandInput & {
292
208
  reflection: ReflectionFunction | null;
293
209
  };
294
210
  type SerializedCommandOption = Omit<CommandOption, "reflection">;
295
- type SerializedCommandDynamicSegment = Omit<CommandDynamicSegment, "reflection">;
296
- type SerializedCommandTreePath = Omit<CommandTreePath, "dynamics"> & {
297
- dynamics: Record<string, SerializedCommandDynamicSegment>;
298
- };
299
- type SerializedCommandParameter = Omit<CommandParameter, "reflection">;
300
- type SerializedCommandTree = Omit<CommandTree, "options" | "path" | "params" | "parent" | "children" | "reflection"> & {
211
+ type SerializedCommandArgument = Omit<CommandArgument, "reflection">;
212
+ type SerializedCommandTree = Omit<CommandTree, "options" | "arguments" | "parent" | "children" | "reflection"> & {
301
213
  /**
302
214
  * The command options.
303
215
  */
304
216
  options: Record<string, SerializedCommandOption>;
305
217
  /**
306
- * The command path with dynamics.
307
- */
308
- path: SerializedCommandTreePath;
309
- /**
310
- * The positional parameter options provided to the command.
218
+ * The positional arguments provided to the command.
311
219
  */
312
- params: SerializedCommandParameter[];
220
+ arguments: SerializedCommandArgument[];
313
221
  /**
314
222
  * The parent command id.
315
223
  */
@@ -355,5 +263,5 @@ interface CommandModule {
355
263
  default?: AnyFunction;
356
264
  }
357
265
  //#endregion
358
- export { BaseCommandArgument, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandParameter, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandDynamicSegment, SerializedCommandOption, SerializedCommandParameter, SerializedCommandTree, SerializedCommandTreePath, StringCommandArgument, StringCommandOption, StringCommandParameter };
266
+ export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
359
267
  //# sourceMappingURL=command.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;;UA4BiB,mBAAA;;AAAjB;AA+BA;EAeiB,IAAA,EAAA,MAAA;EAeA;AAmBjB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ACA,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"}
@@ -1,5 +1,6 @@
1
- import { BaseCommandArgument, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandParameter, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandDynamicSegment, SerializedCommandOption, SerializedCommandParameter, SerializedCommandTree, SerializedCommandTreePath, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.cjs";
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
- export { BaseCommandArgument, BaseCommandOptions, BaseConfig, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandParameter, CommandPath, CommandTree, CommandTreePath, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandDynamicSegment, SerializedCommandOption, SerializedCommandParameter, SerializedCommandTree, SerializedCommandTreePath, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
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 };
@@ -1,5 +1,6 @@
1
- import { BaseCommandArgument, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandParameter, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandDynamicSegment, SerializedCommandOption, SerializedCommandParameter, SerializedCommandTree, SerializedCommandTreePath, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.mjs";
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
- export { BaseCommandArgument, BaseCommandOptions, BaseConfig, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandParameter, CommandPath, CommandTree, CommandTreePath, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandDynamicSegment, SerializedCommandOption, SerializedCommandParameter, SerializedCommandTree, SerializedCommandTreePath, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
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 };
@@ -1,24 +1,14 @@
1
1
  //#region src/types/runtime.d.ts
2
- interface RuntimePath {
2
+ interface CommandContext {
3
3
  /**
4
- * The full path as a string value.
4
+ * The current command path within the runtime context.
5
5
  */
6
- value: string;
6
+ path: string;
7
7
  /**
8
8
  * The individual segments that make up the path.
9
9
  */
10
- segments: (string | string[])[];
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 { RuntimeContext, RuntimePath };
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,WAAA;EAAA;AAYjB;;EAIM,KAAA,EAAA,MAAA;EACU;;;EAUR,QAAA,EAAA,CAAA,MAAA,GAAA,MAAA,EAAA,CAAA,EAAA;;UAfS,gCACE,kEAGb,+EACU,cAAc;;;;WAKnB;;;;QAKH"}
1
+ {"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":[],"mappings":";UAkBiB,cAAA;EAAA"}
@@ -1,24 +1,14 @@
1
1
  //#region src/types/runtime.d.ts
2
- interface RuntimePath {
2
+ interface CommandContext {
3
3
  /**
4
- * The full path as a string value.
4
+ * The current command path within the runtime context.
5
5
  */
6
- value: string;
6
+ path: string;
7
7
  /**
8
8
  * The individual segments that make up the path.
9
9
  */
10
- segments: (string | string[])[];
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 { RuntimeContext, RuntimePath };
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,WAAA;EAAA;AAYjB;;EAIM,KAAA,EAAA,MAAA;EACU;;;EAUR,QAAA,EAAA,CAAA,MAAA,GAAA,MAAA,EAAA,CAAA,EAAA;;UAfS,gCACE,kEAGb,+EACU,cAAc;;;;WAKnB;;;;QAKH"}
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.7.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.50",
354
- "@powerlines/plugin-alloy": "^0.20.14",
355
- "@powerlines/plugin-automd": "^0.1.270",
356
- "@powerlines/plugin-deepkit": "^0.11.149",
357
- "@powerlines/plugin-nodejs": "^0.1.175",
358
- "@powerlines/plugin-plugin": "^0.12.221",
359
- "@powerlines/plugin-tsdown": "^0.1.223",
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.37",
385
+ "powerlines": "^0.38.38",
372
386
  "rolldown": "1.0.0-beta.52"
373
387
  },
374
388
  "devDependencies": { "@types/node": "^22.19.10", "typescript": "^5.9.3" },
375
389
  "publishConfig": { "access": "public" },
376
- "gitHead": "b7429d401477d60e5e8ff9daa437ccd748732ca4"
390
+ "gitHead": "a3710248496a9b6251c18d6ee4af3587a0dc1fa5"
377
391
  }