@shell-shock/preset-cli 0.8.4 → 0.8.6

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 (54) hide show
  1. package/README.md +1 -1
  2. package/dist/components/{banner-function-declaration.cjs → banner-builtin.cjs} +47 -36
  3. package/dist/components/banner-builtin.d.cts +23 -0
  4. package/dist/components/banner-builtin.d.cts.map +1 -0
  5. package/dist/components/banner-builtin.d.mts +23 -0
  6. package/dist/components/banner-builtin.d.mts.map +1 -0
  7. package/dist/components/banner-builtin.mjs +88 -0
  8. package/dist/components/banner-builtin.mjs.map +1 -0
  9. package/dist/components/command-entry.cjs +182 -186
  10. package/dist/components/command-entry.d.cts +1 -1
  11. package/dist/components/command-entry.d.cts.map +1 -1
  12. package/dist/components/command-entry.d.mts.map +1 -1
  13. package/dist/components/command-entry.mjs +182 -186
  14. package/dist/components/command-entry.mjs.map +1 -1
  15. package/dist/components/command-router.cjs +1 -1
  16. package/dist/components/command-router.mjs +1 -1
  17. package/dist/components/command-router.mjs.map +1 -1
  18. package/dist/components/index.cjs +3 -2
  19. package/dist/components/index.d.cts +2 -2
  20. package/dist/components/index.d.mts +2 -2
  21. package/dist/components/index.mjs +2 -2
  22. package/dist/components/virtual-command-entry.cjs +18 -22
  23. package/dist/components/virtual-command-entry.d.cts +1 -1
  24. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  25. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  26. package/dist/components/virtual-command-entry.mjs +18 -22
  27. package/dist/components/virtual-command-entry.mjs.map +1 -1
  28. package/dist/index.cjs +37 -7
  29. package/dist/index.d.cts.map +1 -1
  30. package/dist/index.d.mts.map +1 -1
  31. package/dist/index.mjs +38 -8
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/plugin-banner/dist/components/banner-builtin.cjs +63 -0
  34. package/dist/plugin-banner/dist/components/banner-builtin.mjs +62 -0
  35. package/dist/plugin-banner/dist/components/banner-builtin.mjs.map +1 -0
  36. package/dist/plugin-banner/dist/components/banner-function-declaration.cjs +135 -0
  37. package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts +45 -0
  38. package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts.map +1 -0
  39. package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts +45 -0
  40. package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts.map +1 -0
  41. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs +133 -0
  42. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs.map +1 -0
  43. package/dist/plugin-help/dist/components/display.cjs +14 -0
  44. package/dist/plugin-help/dist/components/display.mjs +14 -0
  45. package/dist/plugin-help/dist/components/display.mjs.map +1 -1
  46. package/dist/plugin-help/dist/index.cjs +1 -1
  47. package/dist/plugin-help/dist/index.mjs +1 -1
  48. package/package.json +19 -19
  49. package/dist/components/banner-function-declaration.d.cts +0 -11
  50. package/dist/components/banner-function-declaration.d.cts.map +0 -1
  51. package/dist/components/banner-function-declaration.d.mts +0 -11
  52. package/dist/components/banner-function-declaration.d.mts.map +0 -1
  53. package/dist/components/banner-function-declaration.mjs +0 -78
  54. package/dist/components/banner-function-declaration.mjs.map +0 -1
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- const require_components_banner_function_declaration = require('./banner-function-declaration.cjs');
4
3
  const require_components_virtual_command_entry = require('./virtual-command-entry.cjs');
5
4
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
5
  let _alloy_js_core = require("@alloy-js/core");
@@ -66,6 +65,7 @@ function CommandEntry(props) {
66
65
  "createSpinner"
67
66
  ],
68
67
  utils: [
68
+ "sleep",
69
69
  "useApp",
70
70
  "useArgs",
71
71
  "hasFlag",
@@ -82,61 +82,58 @@ function CommandEntry(props) {
82
82
  "select",
83
83
  "confirm",
84
84
  "waitForKeyPress",
85
- "isCancel",
86
- "sleep"
85
+ "isCancel"
87
86
  ],
88
87
  [(0, _stryke_path_join.joinPaths)("help", ...command.segments.filter((segment) => !(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment)))]: ["showHelp"],
88
+ [(0, _stryke_path_join.joinPaths)("banner", ...command.segments.filter((segment) => !(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment)))]: ["showBanner"],
89
89
  upgrade: ["executeUpgrade"]
90
90
  });
91
91
  },
92
92
  get children() {
93
- return [
94
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_banner_function_declaration.BannerFunctionDeclaration, { command }),
95
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
96
- (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components_command_entry.CommandHandlerDeclaration, {
97
- command,
98
- banner: _alloy_js_core.code`await banner();
93
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components_command_entry.CommandHandlerDeclaration, {
94
+ command,
95
+ banner: _alloy_js_core.code`await showBanner();
99
96
  await executeUpgrade(); `,
100
- get children() {
101
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
102
- condition: _alloy_js_core.code`!isInteractive`,
103
- get children() {
104
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_command_validation_logic.CommandValidationLogic, { command });
105
- }
106
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
107
- get when() {
108
- return Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 || Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0;
109
- },
110
- get children() {
111
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
112
- get condition() {
113
- return _alloy_js_core.code`!isHelp && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? `(!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} || ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0)` : `${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} === undefined`).join(" || ")}) `;
114
- },
115
- get children() {
116
- return [
117
- _alloy_js_core.code`writeLine(""); `,
118
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
119
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
120
- get each() {
121
- return Object.values(command.options ?? {});
97
+ get children() {
98
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
99
+ condition: _alloy_js_core.code`!isInteractive`,
100
+ get children() {
101
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_command_validation_logic.CommandValidationLogic, { command });
102
+ }
103
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
104
+ get when() {
105
+ return Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 || Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0;
106
+ },
107
+ get children() {
108
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
109
+ get condition() {
110
+ return _alloy_js_core.code`!isHelp && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? `(!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} || ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0)` : `${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} === undefined`).join(" || ")}) `;
111
+ },
112
+ get children() {
113
+ return [
114
+ _alloy_js_core.code`writeLine(""); `,
115
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
116
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
117
+ get each() {
118
+ return Object.values(command.options ?? {});
119
+ },
120
+ doubleHardline: true,
121
+ children: (option) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
122
+ get when() {
123
+ return !option.optional;
122
124
  },
123
- doubleHardline: true,
124
- children: (option) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
125
- get when() {
126
- return !option.optional;
127
- },
128
- get children() {
129
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
130
- get condition() {
131
- return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}`;
132
- },
133
- get children() {
134
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
135
- get when() {
136
- return option.kind === _shell_shock_core.CommandParameterKinds.boolean || !option.choices || option.choices.length === 0;
137
- },
138
- get fallback() {
139
- return _alloy_js_core.code`const value = await select({
125
+ get children() {
126
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
127
+ get condition() {
128
+ return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}`;
129
+ },
130
+ get children() {
131
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
132
+ get when() {
133
+ return option.kind === _shell_shock_core.CommandParameterKinds.boolean || !option.choices || option.choices.length === 0;
134
+ },
135
+ get fallback() {
136
+ return _alloy_js_core.code`const value = await select({
140
137
  message: \`Please select a value for the \${colors.italic("${option.name}")} option\`, ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
141
138
  ` : ""}options: [ ${option.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(option.description)}\`` : ""} }`).join(", ")} ]
142
139
  });
@@ -146,16 +143,16 @@ function CommandEntry(props) {
146
143
 
147
144
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} = value;
148
145
  `;
149
- },
150
- get children() {
151
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Switch, { get children() {
152
- return [
153
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
154
- get when() {
155
- return option.kind === _shell_shock_core.CommandParameterKinds.string;
156
- },
157
- get children() {
158
- return _alloy_js_core.code`
146
+ },
147
+ get children() {
148
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Switch, { get children() {
149
+ return [
150
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
151
+ get when() {
152
+ return option.kind === _shell_shock_core.CommandParameterKinds.string;
153
+ },
154
+ get children() {
155
+ return _alloy_js_core.code`
159
156
  const value = await text({
160
157
  message: \`Please provide a value for the \${colors.italic("${option.name}")} option\`,
161
158
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
@@ -173,14 +170,14 @@ function CommandEntry(props) {
173
170
 
174
171
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} = value;
175
172
  `;
176
- }
177
- }),
178
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
179
- get when() {
180
- return option.kind === _shell_shock_core.CommandParameterKinds.number;
181
- },
182
- get children() {
183
- return _alloy_js_core.code`
173
+ }
174
+ }),
175
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
176
+ get when() {
177
+ return option.kind === _shell_shock_core.CommandParameterKinds.number;
178
+ },
179
+ get children() {
180
+ return _alloy_js_core.code`
184
181
  const value = await numeric({
185
182
  message: \`Please provide a numeric value for the \${colors.italic("${option.name}")} option\`,
186
183
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
@@ -192,14 +189,14 @@ function CommandEntry(props) {
192
189
 
193
190
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} = value;
194
191
  `;
195
- }
196
- }),
197
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
198
- get when() {
199
- return option.kind === _shell_shock_core.CommandParameterKinds.boolean;
200
- },
201
- get children() {
202
- return _alloy_js_core.code`
192
+ }
193
+ }),
194
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
195
+ get when() {
196
+ return option.kind === _shell_shock_core.CommandParameterKinds.boolean;
197
+ },
198
+ get children() {
199
+ return _alloy_js_core.code`
203
200
  const value = await toggle({
204
201
  message: \`Please select a value for the \${colors.italic("${option.name}")} option\`,
205
202
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
@@ -211,24 +208,24 @@ function CommandEntry(props) {
211
208
 
212
209
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} = value;
213
210
  `;
214
- }
215
- })
216
- ];
217
- } });
218
- }
219
- });
220
- }
221
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
222
- get when() {
223
- return (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic;
224
- },
225
- get children() {
226
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
227
- get condition() {
228
- return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
229
- },
230
- get children() {
231
- return _alloy_js_core.code`
211
+ }
212
+ })
213
+ ];
214
+ } });
215
+ }
216
+ });
217
+ }
218
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
219
+ get when() {
220
+ return (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic;
221
+ },
222
+ get children() {
223
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
224
+ get condition() {
225
+ return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
226
+ },
227
+ get children() {
228
+ return _alloy_js_core.code`
232
229
  const value = await text({
233
230
  message: \`Please provide one or more${option.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
234
231
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
@@ -252,35 +249,35 @@ function CommandEntry(props) {
252
249
 
253
250
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} = value.split(",").map(value => value.trim()).filter(Boolean)${option.kind === _shell_shock_core.CommandParameterKinds.number ? `.map(Number)` : ""} ;
254
251
  `;
255
- }
256
- });
257
- }
258
- })];
259
- }
260
- })]
261
- }),
262
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
263
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
264
- get each() {
265
- return command.args;
252
+ }
253
+ });
254
+ }
255
+ })];
256
+ }
257
+ })]
258
+ }),
259
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
260
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
261
+ get each() {
262
+ return command.args;
263
+ },
264
+ doubleHardline: true,
265
+ children: (arg) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
266
+ get when() {
267
+ return !arg.optional;
266
268
  },
267
- doubleHardline: true,
268
- children: (arg) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
269
- get when() {
270
- return !arg.optional;
271
- },
272
- get children() {
273
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
274
- get condition() {
275
- return _alloy_js_core.code`!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}`;
276
- },
277
- get children() {
278
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
279
- get when() {
280
- return arg.kind === _shell_shock_core.CommandParameterKinds.boolean || !arg.choices || arg.choices.length === 0;
281
- },
282
- get fallback() {
283
- return _alloy_js_core.code`const value = await select({
269
+ get children() {
270
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
271
+ get condition() {
272
+ return _alloy_js_core.code`!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}`;
273
+ },
274
+ get children() {
275
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
276
+ get when() {
277
+ return arg.kind === _shell_shock_core.CommandParameterKinds.boolean || !arg.choices || arg.choices.length === 0;
278
+ },
279
+ get fallback() {
280
+ return _alloy_js_core.code`const value = await select({
284
281
  message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(arg.description)}\`,
285
282
  ` : ""}
286
283
  options: [ ${arg.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`` : ""} }`).join(", ")} ]
@@ -291,16 +288,16 @@ function CommandEntry(props) {
291
288
 
292
289
  ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = value;
293
290
  `;
294
- },
295
- get children() {
296
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Switch, { get children() {
297
- return [
298
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
299
- get when() {
300
- return arg.kind === _shell_shock_core.CommandParameterKinds.string;
301
- },
302
- get children() {
303
- return _alloy_js_core.code`
291
+ },
292
+ get children() {
293
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Switch, { get children() {
294
+ return [
295
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
296
+ get when() {
297
+ return arg.kind === _shell_shock_core.CommandParameterKinds.string;
298
+ },
299
+ get children() {
300
+ return _alloy_js_core.code`
304
301
  const value = await text({
305
302
  message: \`Please provide a value for the \${colors.italic("${arg.name}")} argument\`,
306
303
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
@@ -318,14 +315,14 @@ function CommandEntry(props) {
318
315
 
319
316
  ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = value;
320
317
  `;
321
- }
322
- }),
323
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
324
- get when() {
325
- return arg.kind === _shell_shock_core.CommandParameterKinds.number;
326
- },
327
- get children() {
328
- return _alloy_js_core.code`
318
+ }
319
+ }),
320
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
321
+ get when() {
322
+ return arg.kind === _shell_shock_core.CommandParameterKinds.number;
323
+ },
324
+ get children() {
325
+ return _alloy_js_core.code`
329
326
  const value = await numeric({
330
327
  message: \`Please provide a numeric value for the \${colors.italic("${arg.name}")} argument\`,
331
328
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
@@ -337,14 +334,14 @@ function CommandEntry(props) {
337
334
 
338
335
  ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = value;
339
336
  `;
340
- }
341
- }),
342
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
343
- get when() {
344
- return arg.kind === _shell_shock_core.CommandParameterKinds.boolean;
345
- },
346
- get children() {
347
- return _alloy_js_core.code`
337
+ }
338
+ }),
339
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Match, {
340
+ get when() {
341
+ return arg.kind === _shell_shock_core.CommandParameterKinds.boolean;
342
+ },
343
+ get children() {
344
+ return _alloy_js_core.code`
348
345
  const value = await toggle({
349
346
  message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,
350
347
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
@@ -356,24 +353,24 @@ function CommandEntry(props) {
356
353
 
357
354
  ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = value;
358
355
  `;
359
- }
360
- })
361
- ];
362
- } });
363
- }
364
- });
365
- }
366
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
367
- get when() {
368
- return (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic;
369
- },
370
- get children() {
371
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
372
- get condition() {
373
- return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0`;
374
- },
375
- get children() {
376
- return _alloy_js_core.code`
356
+ }
357
+ })
358
+ ];
359
+ } });
360
+ }
361
+ });
362
+ }
363
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
364
+ get when() {
365
+ return (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic;
366
+ },
367
+ get children() {
368
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
369
+ get condition() {
370
+ return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0`;
371
+ },
372
+ get children() {
373
+ return _alloy_js_core.code`
377
374
  const value = await text({
378
375
  message: \`Please provide one or more${arg.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
379
376
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
@@ -398,29 +395,28 @@ function CommandEntry(props) {
398
395
 
399
396
  ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = value.split(",").map(value => value.trim()).filter(Boolean)${arg.kind === _shell_shock_core.CommandParameterKinds.number ? `.map(Number)` : ""} ;
400
397
  `;
401
- }
402
- });
403
- }
404
- })];
405
- }
406
- })]
407
- }),
408
- _alloy_js_core.code`writeLine(""); `,
409
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
410
- (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_command_validation_logic.CommandValidationLogic, { command }),
411
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
412
- condition: _alloy_js_core.code`failures.length > 0`,
413
- children: _alloy_js_core.code`error("The following validation failures were found while processing the user provided input, and must be corrected before the command-line process can be executed: \\n\\n" + failures.map(failure => " - " + failure).join("\\n"));
398
+ }
399
+ });
400
+ }
401
+ })];
402
+ }
403
+ })]
404
+ }),
405
+ _alloy_js_core.code`writeLine(""); `,
406
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
407
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_command_validation_logic.CommandValidationLogic, { command }),
408
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
409
+ condition: _alloy_js_core.code`failures.length > 0`,
410
+ children: _alloy_js_core.code`error("The following validation failures were found while processing the user provided input, and must be corrected before the command-line process can be executed: \\n\\n" + failures.map(failure => " - " + failure).join("\\n"));
414
411
  options.help = true; `
415
- })
416
- ];
417
- }
418
- });
419
- }
420
- })];
421
- }
422
- })
423
- ];
412
+ })
413
+ ];
414
+ }
415
+ });
416
+ }
417
+ })];
418
+ }
419
+ })];
424
420
  }
425
421
  })), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
426
422
  get each() {
@@ -1,6 +1,6 @@
1
1
  import * as _alloy_js_core0 from "@alloy-js/core";
2
- import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
2
  import { CommandTree } from "@shell-shock/core";
3
+ import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
4
4
 
5
5
  //#region src/components/command-entry.d.ts
6
6
  interface CommandEntryProps extends Omit<EntryFileProps, "path" | "typeDefinition"> {
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.d.cts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":";;;;;UA+CiB,iBAAA,SAA0B,IAAA,CACzC,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"command-entry.d.cts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":";;;;;UA8CiB,iBAAA,SAA0B,IAAA,CACzC,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":";;;;;UA+CiB,iBAAA,SAA0B,IAAA,CACzC,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":";;;;;UA8CiB,iBAAA,SAA0B,IAAA,CACzC,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA"}