@shell-shock/preset-cli 0.9.33 → 0.9.35

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 (65) hide show
  1. package/README.md +16 -7
  2. package/dist/command-entry-BCDDI3RN.mjs +548 -0
  3. package/dist/command-entry-BCDDI3RN.mjs.map +1 -0
  4. package/dist/command-entry-iZ5O5Iza.cjs +558 -0
  5. package/dist/components/banner-builtin.cjs +39 -14
  6. package/dist/components/banner-builtin.d.cts +1 -2
  7. package/dist/components/banner-builtin.d.cts.map +1 -1
  8. package/dist/components/banner-builtin.d.mts +1 -2
  9. package/dist/components/banner-builtin.mjs +6 -6
  10. package/dist/components/command-entry.cjs +2 -447
  11. package/dist/components/command-entry.d.cts +1 -2
  12. package/dist/components/command-entry.d.cts.map +1 -1
  13. package/dist/components/command-entry.d.mts +1 -2
  14. package/dist/components/command-entry.mjs +2 -446
  15. package/dist/components/command-router.cjs +6 -6
  16. package/dist/components/command-router.d.cts +0 -1
  17. package/dist/components/command-router.d.cts.map +1 -1
  18. package/dist/components/command-router.d.mts +0 -1
  19. package/dist/components/command-router.mjs +3 -3
  20. package/dist/components/index.cjs +3 -4
  21. package/dist/components/index.mjs +1 -2
  22. package/dist/components/update-builtin.cjs +7 -7
  23. package/dist/components/update-builtin.d.cts +0 -1
  24. package/dist/components/update-builtin.d.cts.map +1 -1
  25. package/dist/components/update-builtin.d.mts +0 -1
  26. package/dist/components/update-builtin.mjs +5 -5
  27. package/dist/components/virtual-command-entry.cjs +2 -114
  28. package/dist/components/virtual-command-entry.d.cts +1 -2
  29. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  30. package/dist/components/virtual-command-entry.d.mts +1 -2
  31. package/dist/components/virtual-command-entry.mjs +2 -113
  32. package/dist/generator.cjs +158 -0
  33. package/dist/generator.d.cts +16 -0
  34. package/dist/generator.d.cts.map +1 -0
  35. package/dist/generator.d.mts +16 -0
  36. package/dist/generator.d.mts.map +1 -0
  37. package/dist/generator.mjs +156 -0
  38. package/dist/generator.mjs.map +1 -0
  39. package/dist/helpers/get-global-options.cjs +1 -0
  40. package/dist/helpers/get-global-options.d.cts +15 -0
  41. package/dist/helpers/get-global-options.d.cts.map +1 -0
  42. package/dist/helpers/get-global-options.d.mts +15 -0
  43. package/dist/helpers/get-global-options.d.mts.map +1 -0
  44. package/dist/helpers/get-global-options.mjs +4 -4
  45. package/dist/index.cjs +20 -130
  46. package/dist/index.d.cts +3 -3
  47. package/dist/index.d.cts.map +1 -1
  48. package/dist/index.d.mts +3 -3
  49. package/dist/index.mjs +25 -129
  50. package/dist/plugin-BUwcMpPx.d.mts +100 -0
  51. package/dist/plugin-BUwcMpPx.d.mts.map +1 -0
  52. package/dist/plugin-Bsdv5DH-.d.cts +100 -0
  53. package/dist/plugin-Bsdv5DH-.d.cts.map +1 -0
  54. package/dist/types/index.cjs +1 -0
  55. package/dist/types/index.d.cts +1 -1
  56. package/dist/types/index.d.mts +1 -1
  57. package/dist/types/index.mjs +2 -0
  58. package/dist/types/plugin.d.cts +2 -101
  59. package/dist/types/plugin.d.mts +2 -101
  60. package/package.json +53 -25
  61. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  62. package/dist/components/command-entry.mjs.map +0 -1
  63. package/dist/components/virtual-command-entry.mjs.map +0 -1
  64. package/dist/types/plugin.d.cts.map +0 -1
  65. package/dist/types/plugin.d.mts.map +0 -1
@@ -1,447 +1,3 @@
1
- import { VirtualCommandEntry } from "./virtual-command-entry.mjs";
2
- import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
3
- import { For, Match, Show, Switch, code, computed } from "@alloy-js/core";
4
- import { ElseIfClause, IfStatement } from "@alloy-js/typescript";
5
- import { formatDescription, formatShortDescription, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
6
- import { joinPaths } from "@stryke/path/join";
7
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
8
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
9
- import defu from "defu";
10
- import { EntryFile } from "@powerlines/plugin-alloy/typescript/components/entry-file";
11
- import { CommandValidationLogic } from "@shell-shock/core/components/command-validation-logic";
12
- import { CommandHandlerDeclaration } from "@shell-shock/preset-script/components/command-entry";
13
- import { findFilePath, relativePath } from "@stryke/path/find";
14
- import { replaceExtension } from "@stryke/path/replace";
15
- import { camelCase } from "@stryke/string-format/camel-case";
16
- import { pascalCase } from "@stryke/string-format/pascal-case";
1
+ import { t as CommandEntry } from "../command-entry-BCDDI3RN.mjs";
17
2
 
18
- //#region src/components/command-entry.tsx
19
- /**
20
- * The command entry point for the Shell Shock project.
21
- */
22
- function CommandEntry(props) {
23
- const { command, imports, builtinImports, ...rest } = props;
24
- const context = usePowerlines();
25
- const filePath = computed(() => joinPaths(command.segments.filter((segment) => !isDynamicPathSegment(segment)).join("/"), "index.ts"));
26
- const commandSourcePath = computed(() => replaceExtension(relativePath(joinPaths(context.entryPath, findFilePath(filePath.value)), command.entry.input?.file || command.entry.file)));
27
- const typeDefinition = computed(() => ({
28
- ...command.entry,
29
- output: command.id
30
- }));
31
- return [createComponent(EntryFile, mergeProps(rest, {
32
- get path() {
33
- return filePath.value;
34
- },
35
- get typeDefinition() {
36
- return typeDefinition.value;
37
- },
38
- get imports() {
39
- return defu(imports ?? {}, { [commandSourcePath.value.startsWith(".") ? commandSourcePath.value : `./${commandSourcePath.value}`]: `handle${pascalCase(command.name)}` });
40
- },
41
- get builtinImports() {
42
- return defu(builtinImports ?? {}, {
43
- env: [
44
- "env",
45
- "isDevelopment",
46
- "isDebug",
47
- "paths"
48
- ],
49
- console: [
50
- "debug",
51
- "info",
52
- "help",
53
- "warn",
54
- "error",
55
- "table",
56
- "italic",
57
- "cursor",
58
- "stripAnsi",
59
- "writeLine",
60
- "splitText",
61
- "textColors",
62
- "createSpinner"
63
- ],
64
- utils: [
65
- "sleep",
66
- "isMinimal",
67
- "isInteractive",
68
- "isUnicodeSupported"
69
- ],
70
- state: [
71
- {
72
- name: "GlobalOptions",
73
- type: true
74
- },
75
- "useGlobal",
76
- "useGlobalOptions",
77
- "withCommand",
78
- "useArgs",
79
- "hasFlag",
80
- "isHelp"
81
- ],
82
- prompts: [
83
- "text",
84
- "numeric",
85
- "toggle",
86
- "select",
87
- "confirm",
88
- "waitForKeyPress",
89
- "isCancel"
90
- ],
91
- [joinPaths("help", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showHelp"],
92
- [joinPaths("banner", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showBanner"],
93
- update: ["executeUpdate"]
94
- });
95
- },
96
- get children() {
97
- return [createComponent(Spacing, {}), createComponent(CommandHandlerDeclaration, {
98
- command,
99
- banner: code`await showBanner();
100
- await executeUpdate(); `,
101
- get children() {
102
- return [createComponent(IfStatement, {
103
- condition: code`!isInteractive`,
104
- get children() {
105
- return createComponent(CommandValidationLogic, { command });
106
- }
107
- }), createComponent(Show, {
108
- get when() {
109
- return Object.values(command.options ?? {}).filter((option) => option.required).length > 0 || Object.values(command.args ?? {}).filter((arg) => arg.required).length > 0;
110
- },
111
- get children() {
112
- return createComponent(ElseIfClause, {
113
- get condition() {
114
- return code`!isHelp() && (${Object.values(command.options ?? {}).filter((option) => option.required).map((option) => (option.type === "string" || option.type === "number") && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => option.required).length > 0 && Object.values(command.args ?? {}).filter((arg) => arg.required).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => arg.required).map((arg) => (arg.type === "string" || arg.type === "number") && arg.variadic ? `(!${camelCase(arg.name)} || ${camelCase(arg.name)}.length === 0)` : `${camelCase(arg.name)} === undefined`).join(" || ")}) `;
115
- },
116
- get children() {
117
- return [
118
- code`writeLine(""); `,
119
- createComponent(Spacing, {}),
120
- createComponent(For, {
121
- get each() {
122
- return Object.values(command.options ?? {});
123
- },
124
- doubleHardline: true,
125
- children: (option) => [createComponent(Show, {
126
- get when() {
127
- return option.required;
128
- },
129
- get children() {
130
- return [createComponent(IfStatement, {
131
- get condition() {
132
- return code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`}`;
133
- },
134
- get children() {
135
- return createComponent(Show, {
136
- get when() {
137
- return option.type === "boolean" || !option.choices || option.choices.length === 0;
138
- },
139
- get fallback() {
140
- return code`const value = await select({
141
- message: \`Please select a value for the \${italic("${option.name}")} option\`, ${option.description ? `description: \`${formatDescription(option.description)}\`,
142
- ` : ""}options: [ ${option.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${option.description ? `description: \`${formatShortDescription(option.description)}\`` : ""} }`).join(", ")} ]
143
- });
144
- if (isCancel(value)) {
145
- return;
146
- }
147
-
148
- options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} = value;
149
- `;
150
- },
151
- get children() {
152
- return createComponent(Switch, { get children() {
153
- return [
154
- createComponent(Match, {
155
- get when() {
156
- return option.type === "string";
157
- },
158
- get children() {
159
- return code`
160
- const value = await text({
161
- message: \`Please provide a value for the \${italic("${option.name}")} option\`,
162
- ${option.description ? `description: \`${formatDescription(option.description)}\`,
163
- ` : ""}validate(val) {
164
- if (!val || val.trim() === "") {
165
- return "A value must be provided for this option";
166
- }
167
-
168
- return null;
169
- }
170
- });
171
- if (isCancel(value)) {
172
- return;
173
- }
174
-
175
- options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} = value;
176
- `;
177
- }
178
- }),
179
- createComponent(Match, {
180
- get when() {
181
- return option.type === "number";
182
- },
183
- get children() {
184
- return code`
185
- const value = await numeric({
186
- message: \`Please provide a numeric value for the \${italic("${option.name}")} option\`,
187
- ${option.description ? `description: \`${formatDescription(option.description)}\`,
188
- ` : ""}
189
- });
190
- if (isCancel(value)) {
191
- return;
192
- }
193
-
194
- options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} = value;
195
- `;
196
- }
197
- }),
198
- createComponent(Match, {
199
- get when() {
200
- return option.type === "boolean";
201
- },
202
- get children() {
203
- return code`
204
- const value = await toggle({
205
- message: \`Please select a value for the \${italic("${option.name}")} option\`,
206
- ${option.description ? `description: \`${formatDescription(option.description)}\`,
207
- ` : ""}
208
- });
209
- if (isCancel(value)) {
210
- return;
211
- }
212
-
213
- options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} = value;
214
- `;
215
- }
216
- })
217
- ];
218
- } });
219
- }
220
- });
221
- }
222
- }), createComponent(Show, {
223
- get when() {
224
- return (option.type === "string" || option.type === "number") && option.variadic;
225
- },
226
- get children() {
227
- return createComponent(ElseIfClause, {
228
- get condition() {
229
- return code`options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`}.length === 0`;
230
- },
231
- get children() {
232
- return code`
233
- const value = await text({
234
- message: \`Please provide one or more${option.type === "number" ? " numeric" : ""} values for the \${italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
235
- ${option.description ? `description: \`${formatDescription(option.description)}\`,
236
- ` : ""}validate(val) {
237
- if (!val || val.trim() === "") {
238
- return "A value must be provided for this option";
239
- }
240
- if (val.split(",").map(v => v.trim()).filter(Boolean).length === 0) {
241
- return "At least one value must be provided for this option";
242
- }
243
- ${option.type === "number" ? `const invalidIndex = val.split(",").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));
244
- if (invalidIndex !== -1) {
245
- return \`Invalid numeric value provided for item #\${invalidIndex + 1} - all provided items must be a valid number\`;
246
- } ` : ""}
247
- return undefined;
248
- }
249
- });
250
- if (isCancel(value)) {
251
- return;
252
- }
253
-
254
- options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} = value.split(",").map(value => value.trim()).filter(Boolean)${option.type === "number" ? `.map(Number)` : ""} ;
255
- `;
256
- }
257
- });
258
- }
259
- })];
260
- }
261
- })]
262
- }),
263
- createComponent(Spacing, {}),
264
- createComponent(For, {
265
- get each() {
266
- return command.args;
267
- },
268
- doubleHardline: true,
269
- children: (arg) => [createComponent(Show, {
270
- get when() {
271
- return arg.required;
272
- },
273
- get children() {
274
- return [createComponent(IfStatement, {
275
- get condition() {
276
- return code`!${camelCase(arg.name)}`;
277
- },
278
- get children() {
279
- return createComponent(Show, {
280
- get when() {
281
- return arg.type === "boolean" || !arg.choices || arg.choices.length === 0;
282
- },
283
- get fallback() {
284
- return code`const value = await select({
285
- message: \`Please select a value for the \${italic("${arg.name}")} argument\`,${arg.description ? `description: \`${formatDescription(arg.description)}\`,
286
- ` : ""}
287
- options: [ ${arg.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`` : ""} }`).join(", ")} ]
288
- });
289
- if (isCancel(value)) {
290
- return;
291
- }
292
-
293
- ${camelCase(arg.name)} = value;
294
- `;
295
- },
296
- get children() {
297
- return createComponent(Switch, { get children() {
298
- return [
299
- createComponent(Match, {
300
- get when() {
301
- return arg.type === "string";
302
- },
303
- get children() {
304
- return code`
305
- const value = await text({
306
- message: \`Please provide a value for the \${italic("${arg.name}")} argument\`,
307
- ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
308
- ` : ""}validate(val) {
309
- if (!val || val.trim() === "") {
310
- return "A value must be provided for this argument";
311
- }
312
-
313
- return null;
314
- }
315
- });
316
- if (isCancel(value)) {
317
- return;
318
- }
319
-
320
- ${camelCase(arg.name)} = value;
321
- `;
322
- }
323
- }),
324
- createComponent(Match, {
325
- get when() {
326
- return arg.type === "number";
327
- },
328
- get children() {
329
- return code`
330
- const value = await numeric({
331
- message: \`Please provide a numeric value for the \${italic("${arg.name}")} argument\`,
332
- ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
333
- ` : ""}
334
- });
335
- if (isCancel(value)) {
336
- return;
337
- }
338
-
339
- ${camelCase(arg.name)} = value;
340
- `;
341
- }
342
- }),
343
- createComponent(Match, {
344
- get when() {
345
- return arg.type === "boolean";
346
- },
347
- get children() {
348
- return code`
349
- const value = await toggle({
350
- message: \`Please select a value for the \${italic("${arg.name}")} argument\`,
351
- ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
352
- ` : ""}
353
- });
354
- if (isCancel(value)) {
355
- return;
356
- }
357
-
358
- ${camelCase(arg.name)} = value;
359
- `;
360
- }
361
- })
362
- ];
363
- } });
364
- }
365
- });
366
- }
367
- }), createComponent(Show, {
368
- get when() {
369
- return arg.variadic;
370
- },
371
- get children() {
372
- return createComponent(ElseIfClause, {
373
- get condition() {
374
- return code`${camelCase(arg.name)}.length === 0`;
375
- },
376
- get children() {
377
- return code`
378
- const value = await text({
379
- message: \`Please provide one or more${arg.type === "number" ? " numeric" : ""} values for the \${italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
380
- ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
381
- ` : ""}validate(val) {
382
- if (!val || val.trim() === "") {
383
- return "A value must be provided for this argument";
384
- }
385
- if (val.split(",").map(v => v.trim()).filter(Boolean).length === 0) {
386
- return "At least one value must be provided for this argument";
387
- }
388
- ${arg.type === "number" ? `const invalidIndex = val.split(",").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));
389
- if (invalidIndex !== -1) {
390
- return \`Invalid numeric value provided for item #\${invalidIndex + 1} - all provided items must be a valid number\`;
391
- } ` : ""}
392
-
393
- return undefined;
394
- }
395
- });
396
- if (isCancel(value)) {
397
- return;
398
- }
399
-
400
- ${camelCase(arg.name)} = value.split(",").map(value => value.trim()).filter(Boolean)${arg.type === "number" ? `.map(Number)` : arg.type === "boolean" ? `.map(Boolean)` : ""} ;
401
- `;
402
- }
403
- });
404
- }
405
- })];
406
- }
407
- })]
408
- }),
409
- code`writeLine(""); `,
410
- createComponent(Spacing, {}),
411
- createComponent(CommandValidationLogic, { command }),
412
- createComponent(IfStatement, {
413
- condition: code`failures.length > 0`,
414
- get children() {
415
- return code`error(\`The following validation failures were found while processing the user provided input, and must be corrected before the \${italic("${command.title}")} command can be executed: \\n\\n\${failures.map(failure => " - " + failure).join("\\n")}\`);
416
- options.help = true; `;
417
- }
418
- })
419
- ];
420
- }
421
- });
422
- }
423
- })];
424
- }
425
- })];
426
- }
427
- })), createComponent(For, {
428
- get each() {
429
- return Object.values(command.children);
430
- },
431
- children: (child) => createComponent(Show, {
432
- get when() {
433
- return child.virtual;
434
- },
435
- get fallback() {
436
- return createComponent(CommandEntry, { command: child });
437
- },
438
- get children() {
439
- return createComponent(VirtualCommandEntry, { command: child });
440
- }
441
- })
442
- })];
443
- }
444
-
445
- //#endregion
446
- export { CommandEntry };
447
- //# sourceMappingURL=command-entry.mjs.map
3
+ export { CommandEntry };
@@ -1,16 +1,16 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
2
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
4
  let _alloy_js_core = require("@alloy-js/core");
4
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
5
- let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
6
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
6
+ let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
7
+ let _shell_shock_core_contexts_power_plant = require("@shell-shock/core/contexts/power-plant");
8
8
  let _shell_shock_preset_script_components = require("@shell-shock/preset-script/components");
9
9
 
10
10
  //#region src/components/command-router.tsx
11
11
  function CommandRouterSelectOptions(props) {
12
12
  const { commands } = props;
13
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
13
+ const context = (0, _shell_shock_core_contexts_power_plant.usePowerlines)();
14
14
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
15
15
  get each() {
16
16
  return Object.values(commands ?? {});
@@ -32,7 +32,7 @@ function CommandRouter(props) {
32
32
  segments,
33
33
  commands
34
34
  })),
35
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
35
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
36
36
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
37
37
  condition: _alloy_js_core.code`isInteractive && !isHelp()`,
38
38
  get children() {
@@ -75,7 +75,7 @@ function CommandRouter(props) {
75
75
  ];
76
76
  }
77
77
  }),
78
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
78
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
79
79
  ];
80
80
  }
81
81
 
@@ -1,6 +1,5 @@
1
1
  import { CommandTree } from "@shell-shock/core";
2
2
  import { CommandRouterProps } from "@shell-shock/preset-script/components";
3
-
4
3
  //#region src/components/command-router.d.ts
5
4
  interface CommandRouterSelectOptionsProps {
6
5
  commands?: Record<string, CommandTree>;
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;UA+BiB,+BAAA;EACf,QAAA,GAAW,MAAM,SAAS,WAAA;AAAA;AAAA,iBAGZ,0BAAA,CACd,KAAA,EAAO,+BAA+B,4BAAA,QAAA;;;;iBA8BxB,aAAA,CAAc,KAAA,EAAO,kBAAkB,4BAAA,QAAA"}
1
+ {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;UA+BiB;EACf,WAAW,eAAe;;iBAGZ,2BACd,OAAO,2DAA+B;;;;iBA8BxB,cAAc,OAAO,8CAAkB"}
@@ -1,6 +1,5 @@
1
1
  import { CommandRouterProps } from "@shell-shock/preset-script/components";
2
2
  import { CommandTree } from "@shell-shock/core";
3
-
4
3
  //#region src/components/command-router.d.ts
5
4
  interface CommandRouterSelectOptionsProps {
6
5
  commands?: Record<string, CommandTree>;
@@ -1,9 +1,9 @@
1
+ import { getAppBin } from "@shell-shock/core/plugin-utils";
1
2
  import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
3
  import { For, code } from "@alloy-js/core";
3
4
  import { IfStatement } from "@alloy-js/typescript";
4
- import { getAppBin } from "@shell-shock/core/plugin-utils";
5
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
+ import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
6
+ import { usePowerlines } from "@shell-shock/core/contexts/power-plant";
7
7
  import { CommandRouter as CommandRouter$1, CommandRouterBody } from "@shell-shock/preset-script/components";
8
8
 
9
9
  //#region src/components/command-router.tsx
@@ -1,15 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_components_banner_builtin = require('./banner-builtin.cjs');
3
3
  const require_components_command_router = require('./command-router.cjs');
4
- const require_components_virtual_command_entry = require('./virtual-command-entry.cjs');
5
- const require_components_command_entry = require('./command-entry.cjs');
4
+ const require_command_entry = require('../command-entry-iZ5O5Iza.cjs');
6
5
  const require_components_update_builtin = require('./update-builtin.cjs');
7
6
 
8
7
  exports.BannerBuiltin = require_components_banner_builtin.BannerBuiltin;
9
8
  exports.BannerFunctionBodyDeclaration = require_components_banner_builtin.BannerFunctionBodyDeclaration;
10
- exports.CommandEntry = require_components_command_entry.CommandEntry;
9
+ exports.CommandEntry = require_command_entry.CommandEntry;
11
10
  exports.CommandRouter = require_components_command_router.CommandRouter;
12
11
  exports.CommandRouterSelectOptions = require_components_command_router.CommandRouterSelectOptions;
13
12
  exports.ExecuteUpdateFunctionDeclaration = require_components_update_builtin.ExecuteUpdateFunctionDeclaration;
14
13
  exports.UpdateBuiltin = require_components_update_builtin.UpdateBuiltin;
15
- exports.VirtualCommandEntry = require_components_virtual_command_entry.VirtualCommandEntry;
14
+ exports.VirtualCommandEntry = require_command_entry.VirtualCommandEntry;
@@ -1,7 +1,6 @@
1
1
  import { BannerBuiltin, BannerFunctionBodyDeclaration } from "./banner-builtin.mjs";
2
2
  import { CommandRouter, CommandRouterSelectOptions } from "./command-router.mjs";
3
- import { VirtualCommandEntry } from "./virtual-command-entry.mjs";
4
- import { CommandEntry } from "./command-entry.mjs";
3
+ import { n as VirtualCommandEntry, t as CommandEntry } from "../command-entry-BCDDI3RN.mjs";
5
4
  import { ExecuteUpdateFunctionDeclaration, UpdateBuiltin } from "./update-builtin.mjs";
6
5
 
7
6
  export { BannerBuiltin, BannerFunctionBodyDeclaration, CommandEntry, CommandRouter, CommandRouterSelectOptions, ExecuteUpdateFunctionDeclaration, UpdateBuiltin, VirtualCommandEntry };
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
2
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
4
  let _alloy_js_core = require("@alloy-js/core");
4
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
5
- let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
6
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
6
+ let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
7
+ let _shell_shock_core_contexts_power_plant = require("@shell-shock/core/contexts/power-plant");
8
8
  let defu = require("defu");
9
9
  let _shell_shock_plugin_update_components_update_builtin = require("@shell-shock/plugin-update/components/update-builtin");
10
10
 
@@ -13,7 +13,7 @@ let _shell_shock_plugin_update_components_update_builtin = require("@shell-shock
13
13
  * A component to generate the `executeUpdate` function in the `shell-shock:update` builtin module.
14
14
  */
15
15
  function ExecuteUpdateFunctionDeclaration() {
16
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
16
+ const context = (0, _shell_shock_core_contexts_power_plant.usePowerlines)();
17
17
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
18
18
  get when() {
19
19
  return context.config.updateType !== false;
@@ -76,13 +76,13 @@ function ExecuteUpdateFunctionDeclaration() {
76
76
  } catch (err) {
77
77
  spinner.error(\`An error occurred while updating ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\`);
78
78
  debug(err);
79
- } `), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})];
79
+ } `), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})];
80
80
  },
81
81
  get children() {
82
82
  return [
83
83
  (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`spinner.stop();
84
84
  warn(\`A new version of ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} is available: \${red(\`v\${(result as CheckForUpdatesSuccessResult).currentVersion}\`)} \${textColors.body.tertiary("➜")} \${green(\`v\${(result as CheckForUpdatesSuccessResult).latestVersion}\`)}\${(result as CheckForUpdatesSuccessResult).package.date ? textColors.body.tertiary(\` (updated on \${(result as CheckForUpdatesSuccessResult).package.date})\`) : ""}${context.config.updateType !== false && context.config.updateType === "manual" ? ` \\nPlease run \`${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} update\` to update to the latest version.` : ""}\`); `),
85
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
85
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
86
86
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
87
87
  get when() {
88
88
  return context.config.updateType !== false && context.config.updateType === "confirm";
@@ -158,7 +158,7 @@ function UpdateBuiltin(props) {
158
158
  get children() {
159
159
  return [
160
160
  (0, _alloy_js_core_jsx_runtime.createComponent)(ExecuteUpdateFunctionDeclaration, {}),
161
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
161
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
162
162
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
163
163
  get when() {
164
164
  return Boolean(children);
@@ -1,5 +1,4 @@
1
1
  import { UpdateBuiltinProps } from "@shell-shock/plugin-update/components/update-builtin";
2
-
3
2
  //#region src/components/update-builtin.d.ts
4
3
  /**
5
4
  * A component to generate the `executeUpdate` function in the `shell-shock:update` builtin module.
@@ -1 +1 @@
1
- {"version":3,"file":"update-builtin.d.cts","names":[],"sources":["../../src/components/update-builtin.tsx"],"mappings":";;;;;AAqCA;iBAAgB,gCAAA,6BAAgC,QAAA;;;AAAA;iBAuJhC,aAAA,CAAc,KAAA,EAAO,kBAAkB,4BAAA,QAAA"}
1
+ {"version":3,"file":"update-builtin.d.cts","names":[],"sources":["../../src/components/update-builtin.tsx"],"mappings":";;;;;iBAqCgB,6DAAgC;;;;iBAuJhC,cAAc,OAAO,8CAAkB"}
@@ -1,5 +1,4 @@
1
1
  import { UpdateBuiltinProps } from "@shell-shock/plugin-update/components/update-builtin";
2
-
3
2
  //#region src/components/update-builtin.d.ts
4
3
  /**
5
4
  * A component to generate the `executeUpdate` function in the `shell-shock:update` builtin module.
@@ -1,10 +1,10 @@
1
+ import { getAppBin, getAppTitle } from "@shell-shock/core/plugin-utils";
1
2
  import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
3
  import { Show, code, splitProps } from "@alloy-js/core";
3
4
  import { ElseClause, ElseIfClause, FunctionDeclaration, IfStatement, VarDeclaration } from "@alloy-js/typescript";
4
- import { getAppBin, getAppTitle } from "@shell-shock/core/plugin-utils";
5
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
- import { defu as defu$1 } from "defu";
5
+ import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
6
+ import { usePowerlines } from "@shell-shock/core/contexts/power-plant";
7
+ import { defu } from "defu";
8
8
  import { UpdateBuiltin as UpdateBuiltin$1 } from "@shell-shock/plugin-update/components/update-builtin";
9
9
 
10
10
  //#region src/components/update-builtin.tsx
@@ -145,7 +145,7 @@ function UpdateBuiltin(props) {
145
145
  const [{ children, builtinImports }, rest] = splitProps(props, ["children", "builtinImports"]);
146
146
  return createComponent(UpdateBuiltin$1, mergeProps(rest, {
147
147
  get builtinImports() {
148
- return defu$1(builtinImports ?? {}, {
148
+ return defu(builtinImports ?? {}, {
149
149
  console: [
150
150
  "createSpinner",
151
151
  "debug",