@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.
Files changed (77) 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 +5 -1
  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 +156 -31
  20. package/dist/components/options-parser-logic.cjs.map +1 -1
  21. package/dist/components/options-parser-logic.d.cts +47 -8
  22. package/dist/components/options-parser-logic.d.cts.map +1 -1
  23. package/dist/components/options-parser-logic.d.mts +53 -14
  24. package/dist/components/options-parser-logic.d.mts.map +1 -1
  25. package/dist/components/options-parser-logic.mjs +154 -31
  26. package/dist/components/options-parser-logic.mjs.map +1 -1
  27. package/dist/components/usage.cjs +38 -5
  28. package/dist/components/usage.cjs.map +1 -1
  29. package/dist/components/usage.d.cts +2 -4
  30. package/dist/components/usage.d.cts.map +1 -1
  31. package/dist/components/usage.d.mts +2 -4
  32. package/dist/components/usage.d.mts.map +1 -1
  33. package/dist/components/usage.mjs +40 -7
  34. package/dist/components/usage.mjs.map +1 -1
  35. package/dist/helpers/persistence.cjs +31 -3
  36. package/dist/helpers/persistence.cjs.map +1 -1
  37. package/dist/helpers/persistence.mjs +31 -3
  38. package/dist/helpers/persistence.mjs.map +1 -1
  39. package/dist/helpers/resolve-command.cjs +68 -47
  40. package/dist/helpers/resolve-command.cjs.map +1 -1
  41. package/dist/helpers/resolve-command.mjs +70 -49
  42. package/dist/helpers/resolve-command.mjs.map +1 -1
  43. package/dist/helpers/validations.cjs +13 -36
  44. package/dist/helpers/validations.cjs.map +1 -1
  45. package/dist/helpers/validations.mjs +12 -36
  46. package/dist/helpers/validations.mjs.map +1 -1
  47. package/dist/index.d.cts +3 -2
  48. package/dist/index.d.mts +3 -2
  49. package/dist/plugin-utils/context-helpers.cjs +3 -45
  50. package/dist/plugin-utils/context-helpers.cjs.map +1 -1
  51. package/dist/plugin-utils/context-helpers.d.cts +1 -37
  52. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  53. package/dist/plugin-utils/context-helpers.d.mts +1 -37
  54. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  55. package/dist/plugin-utils/context-helpers.mjs +4 -44
  56. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  57. package/dist/plugin-utils/index.cjs +0 -2
  58. package/dist/plugin-utils/index.d.cts +2 -2
  59. package/dist/plugin-utils/index.d.mts +2 -2
  60. package/dist/plugin-utils/index.mjs +2 -2
  61. package/dist/plugin.cjs +9 -15
  62. package/dist/plugin.cjs.map +1 -1
  63. package/dist/plugin.d.cts.map +1 -1
  64. package/dist/plugin.d.mts.map +1 -1
  65. package/dist/plugin.mjs +9 -15
  66. package/dist/plugin.mjs.map +1 -1
  67. package/dist/types/command.d.cts +206 -33
  68. package/dist/types/command.d.cts.map +1 -1
  69. package/dist/types/command.d.mts +206 -33
  70. package/dist/types/command.d.mts.map +1 -1
  71. package/dist/types/index.d.cts +3 -2
  72. package/dist/types/index.d.mts +3 -2
  73. package/dist/types/runtime.d.cts +5 -15
  74. package/dist/types/runtime.d.cts.map +1 -1
  75. package/dist/types/runtime.d.mts +5 -15
  76. package/dist/types/runtime.d.mts.map +1 -1
  77. package/package.json +25 -11
@@ -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 BaseCommandOption {
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 StringCommandOption extends BaseCommandOption {
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 NumberCommandOption extends BaseCommandOption {
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 BooleanCommandOption extends BaseCommandOption {
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 CommandPath {
33
- value: string | null;
34
- segments: string[];
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
- path: CommandPath;
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
- path: CommandTreePath;
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 SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
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 { BaseCommandOption, BooleanCommandOption, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandOption, SerializedCommandTree, StringCommandOption };
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":";;;;;UAsBiB,iBAAA;;EAAA,IAAA,EAET,cAF0B;EAU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;;WAMS,eAAe;;;;aAIb;;;;;;;;YAQD,eAAe;;;;eAIZ;;UAGE,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+BA,aAAA;aACJ;YACD"}
@@ -1,5 +1,6 @@
1
- import { BaseCommandOption, BooleanCommandOption, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandOption, SerializedCommandTree, StringCommandOption } 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 { BaseCommandOption, BaseCommandOptions, BaseConfig, BooleanCommandOption, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandPath, CommandTree, CommandTreePath, Context, Metadata, NumberCommandOption, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandOption, 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 { BaseCommandOption, BooleanCommandOption, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandPath, CommandTree, CommandTreePath, Metadata, NumberCommandOption, SerializedCommandTree, StringCommandOption } 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 { BaseCommandOption, BaseCommandOptions, BaseConfig, BooleanCommandOption, CommandBase, CommandDynamicSegment, CommandInput, CommandModule, CommandOption, CommandPath, CommandTree, CommandTreePath, Context, Metadata, NumberCommandOption, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandOption, 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.6.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
- "devDependencies": { "@types/node": "^22.19.9", "typescript": "^5.9.3" },
388
+ "devDependencies": { "@types/node": "^22.19.10", "typescript": "^5.9.3" },
375
389
  "publishConfig": { "access": "public" },
376
- "gitHead": "56bc5ad6b21f20ec50ff934e8227f8b21751fc66"
390
+ "gitHead": "a3710248496a9b6251c18d6ee4af3587a0dc1fa5"
377
391
  }