@shell-shock/preset-cli 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the ⚡<b>Shell Shock</b> monorepo. The Shell Shock pack
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.1.5-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.2.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -1,11 +1,11 @@
1
- import * as _alloy_js_core1 from "@alloy-js/core";
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
2
  import { BannerFunctionDeclarationProps } from "@shell-shock/preset-script/components/banner-function-declaration";
3
3
 
4
4
  //#region src/components/banner-function-declaration.d.ts
5
5
  /**
6
6
  * A component to generate the `banner` function in the `shell-shock:console` builtin module.
7
7
  */
8
- declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core1.Children;
8
+ declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core0.Children;
9
9
  //#endregion
10
10
  export { BannerFunctionDeclaration };
11
11
  //# sourceMappingURL=banner-function-declaration.d.cts.map
@@ -1,11 +1,11 @@
1
- import * as _alloy_js_core0 from "@alloy-js/core";
1
+ import * as _alloy_js_core2 from "@alloy-js/core";
2
2
  import { BannerFunctionDeclarationProps } from "@shell-shock/preset-script/components/banner-function-declaration";
3
3
 
4
4
  //#region src/components/banner-function-declaration.d.ts
5
5
  /**
6
6
  * A component to generate the `banner` function in the `shell-shock:console` builtin module.
7
7
  */
8
- declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core0.Children;
8
+ declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core2.Children;
9
9
  //#endregion
10
10
  export { BannerFunctionDeclaration };
11
11
  //# sourceMappingURL=banner-function-declaration.d.mts.map
@@ -1,4 +1,4 @@
1
- import { createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
2
  import { code, computed } from "@alloy-js/core";
3
3
  import { FunctionDeclaration } from "@alloy-js/typescript";
4
4
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
@@ -13,6 +13,7 @@ let __stryke_path_find = require("@stryke/path/find");
13
13
  let __stryke_path_join = require("@stryke/path/join");
14
14
  let __stryke_path_replace = require("@stryke/path/replace");
15
15
  let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
16
+ let __stryke_string_format_lower_case_first = require("@stryke/string-format/lower-case-first");
16
17
  let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
17
18
  let defu = require("defu");
18
19
  defu = require_rolldown_runtime.__toESM(defu);
@@ -47,7 +48,6 @@ function CommandEntry(props) {
47
48
  return (0, defu.default)(builtinImports ?? {}, {
48
49
  env: [
49
50
  "env",
50
- "isCI",
51
51
  "isDevelopment",
52
52
  "isDebug"
53
53
  ],
@@ -62,15 +62,19 @@ function CommandEntry(props) {
62
62
  "splitText",
63
63
  "text",
64
64
  "confirm",
65
- "isCancel"
65
+ "isCancel",
66
+ "intro",
67
+ "outro"
66
68
  ],
67
69
  utils: [
68
- "getArgs",
70
+ "useApp",
71
+ "useArgs",
69
72
  "hasFlag",
70
73
  "isMinimal",
71
74
  "isInteractive",
75
+ "isHelp",
72
76
  "isUnicodeSupported",
73
- "internal_commandContextStore"
77
+ "internal_commandContext"
74
78
  ]
75
79
  });
76
80
  },
@@ -87,41 +91,49 @@ function CommandEntry(props) {
87
91
  get children() {
88
92
  return (0, __alloy_js_core_jsx_runtime.createComponent)(__shell_shock_preset_script_components_command_entry.CommandValidationLogic, { command });
89
93
  }
90
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseClause, { get children() {
91
- return [
92
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
93
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
94
- get each() {
95
- return Object.values(command.options ?? {});
96
- },
97
- doubleHardline: true,
98
- children: (option) => [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
99
- get when() {
100
- return !option.optional;
94
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
95
+ get condition() {
96
+ return __alloy_js_core.code`!isHelp && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.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.arguments ?? {}).filter((argument) => !argument.optional).length > 0 ? " || " : ""}${Object.values(command.arguments ?? {}).filter((argument) => !argument.optional).map((argument) => (argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) && argument.variadic ? `(!${(0, __stryke_string_format_camel_case.camelCase)(argument.name)} || ${(0, __stryke_string_format_camel_case.camelCase)(argument.name)}.length === 0)` : `${(0, __stryke_string_format_camel_case.camelCase)(argument.name)} === undefined`).join(" || ")}) `;
97
+ },
98
+ get children() {
99
+ return [
100
+ __alloy_js_core.code`writeLine("");
101
+
102
+ intro("Select required input parameters"); `,
103
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
104
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
105
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
106
+ get each() {
107
+ return Object.values(command.options ?? {});
101
108
  },
102
- get children() {
103
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
104
- get condition() {
105
- return __alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`}`;
106
- },
107
- get children() {
108
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Switch, { get children() {
109
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
110
- get when() {
111
- return option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number;
112
- },
113
- get children() {
114
- return __alloy_js_core.code`
109
+ doubleHardline: true,
110
+ children: (option) => [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
111
+ get when() {
112
+ return !option.optional;
113
+ },
114
+ get children() {
115
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
116
+ get condition() {
117
+ return __alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`}`;
118
+ },
119
+ get children() {
120
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Switch, { get children() {
121
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
122
+ get when() {
123
+ return option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number;
124
+ },
125
+ get children() {
126
+ return __alloy_js_core.code`
115
127
  const value = await text({
116
- message: 'Please provide a value for the ${option.title} option:',
117
- validate(value) {
118
- if (isCancel(value)) {
128
+ message: 'Please provide a${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? " numeric" : ""} value for the "${option.name}" option${option.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(option.description).replace(/\.+$/, "")})` : ""}:',
129
+ validate(val) {
130
+ if (isCancel(val)) {
119
131
  return true;
120
132
  }
121
- if (!value || value.trim() === "") {
122
- return "A value is required for this option";
133
+ if (!val || val.trim() === "") {
134
+ return "A value must be provided for this option";
123
135
  }
124
- ${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `if (Number.isNaN(Number(value))) {
136
+ ${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `if (Number.isNaN(Number(val))) {
125
137
  return "The value provided must be a valid number";
126
138
  }` : ""}
127
139
  return undefined;
@@ -133,45 +145,45 @@ function CommandEntry(props) {
133
145
 
134
146
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`} = ${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `Number(value)` : "value"};
135
147
  `;
136
- }
137
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
138
- get when() {
139
- return option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
140
- },
141
- get children() {
142
- return __alloy_js_core.code`
148
+ }
149
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
150
+ get when() {
151
+ return option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
152
+ },
153
+ get children() {
154
+ return __alloy_js_core.code`
143
155
  options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`} = await confirm({
144
- message: 'Please select a value for the ${option.title} option:'
156
+ message: 'Please select a value for the "${option.name}" option${option.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(option.description).replace(/\.+$/, "")})` : ""}:'
145
157
  });
146
158
  `;
147
- }
148
- })];
149
- } });
150
- }
151
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
152
- get when() {
153
- return (option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) && option.variadic;
154
- },
155
- get children() {
156
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
157
- get condition() {
158
- return __alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
159
- },
160
- get children() {
161
- return __alloy_js_core.code`
159
+ }
160
+ })];
161
+ } });
162
+ }
163
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
164
+ get when() {
165
+ return (option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) && option.variadic;
166
+ },
167
+ get children() {
168
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
169
+ get condition() {
170
+ return __alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, __stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
171
+ },
172
+ get children() {
173
+ return __alloy_js_core.code`
162
174
  const value = await text({
163
- message: 'Please provide one or more values for the ${option.title} option (values are separated by a "," character):',
164
- validate(value) {
165
- if (isCancel(value)) {
175
+ message: 'Please provide one or more${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? " numeric" : ""} values for the "${option.name}" option${option.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(option.description).replace(/\.+$/, "")})` : ""} - values are separated by a "," character:',
176
+ validate(val) {
177
+ if (isCancel(val)) {
166
178
  return true;
167
179
  }
168
- if (!value || value.trim() === "") {
169
- return "A value is required for this option";
180
+ if (!val || val.trim() === "") {
181
+ return "A value must be provided for this option";
170
182
  }
171
- if (value.split(",").map(value => value.trim()).filter(Boolean).length === 0) {
172
- return "At least one value is required for this option";
183
+ if (val.split(",").map(v => v.trim()).filter(Boolean).length === 0) {
184
+ return "At least one value must be provided for this option";
173
185
  }
174
- ${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `const invalidIndex = value.split(",").map(value => value.trim()).filter(Boolean).findIndex(value => Number.isNaN(Number(value));
186
+ ${option.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `const invalidIndex = val.split(",").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));
175
187
  if (invalidIndex !== -1) {
176
188
  return \`Invalid numeric value provided for item #\${invalidIndex + 1} - all provided items must be a valid number\`;
177
189
  } ` : ""}
@@ -184,48 +196,48 @@ function CommandEntry(props) {
184
196
 
185
197
  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 === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `.map(Number)` : ""} ;
186
198
  `;
187
- }
188
- });
189
- }
190
- })];
191
- }
192
- })]
193
- }),
194
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
195
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
196
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
197
- get each() {
198
- return command.arguments;
199
- },
200
- doubleHardline: true,
201
- children: (argument) => [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
202
- get when() {
203
- return !argument.optional;
199
+ }
200
+ });
201
+ }
202
+ })];
203
+ }
204
+ })]
205
+ }),
206
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
207
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
208
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
209
+ get each() {
210
+ return command.arguments;
204
211
  },
205
- get children() {
206
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
207
- get condition() {
208
- return __alloy_js_core.code`!${(0, __stryke_string_format_camel_case.camelCase)(argument.name)}`;
209
- },
210
- get children() {
211
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Switch, { get children() {
212
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
213
- get when() {
214
- return argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number;
215
- },
216
- get children() {
217
- return __alloy_js_core.code`
212
+ doubleHardline: true,
213
+ children: (argument) => [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
214
+ get when() {
215
+ return !argument.optional;
216
+ },
217
+ get children() {
218
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
219
+ get condition() {
220
+ return __alloy_js_core.code`!${(0, __stryke_string_format_camel_case.camelCase)(argument.name)}`;
221
+ },
222
+ get children() {
223
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Switch, { get children() {
224
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
225
+ get when() {
226
+ return argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number;
227
+ },
228
+ get children() {
229
+ return __alloy_js_core.code`
218
230
  const value = await text({
219
- message: 'Please provide a value for the ${argument.title} positional argument:',
220
- validate(value) {
221
- if (isCancel(value)) {
231
+ message: 'Please provide a${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? " numeric" : ""} value for the "${argument.name}" argument${argument.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(argument.description).replace(/\.+$/, "")})` : ""}:',
232
+ validate(val) {
233
+ if (isCancel(val)) {
222
234
  return true;
223
235
  }
224
- if (!value || value.trim() === "") {
225
- return "A value is required for this positional argument";
236
+ if (!val || val.trim() === "") {
237
+ return "A value must be provided for this argument";
226
238
  }
227
- ${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `if (Number.isNaN(Number(value))) {
228
- return "The value provided must be a valid number";
239
+ ${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `if (Number.isNaN(Number(val))) {
240
+ return "The provided value must be a valid number";
229
241
  }` : ""}
230
242
  return undefined;
231
243
  }
@@ -236,45 +248,45 @@ function CommandEntry(props) {
236
248
 
237
249
  ${(0, __stryke_string_format_camel_case.camelCase)(argument.name)} = ${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `Number(value)` : "value"};
238
250
  `;
239
- }
240
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
241
- get when() {
242
- return argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
243
- },
244
- get children() {
245
- return __alloy_js_core.code`
251
+ }
252
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Match, {
253
+ get when() {
254
+ return argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
255
+ },
256
+ get children() {
257
+ return __alloy_js_core.code`
246
258
  ${(0, __stryke_string_format_camel_case.camelCase)(argument.name)} = await confirm({
247
- message: 'Please select a value for the ${argument.title} positional argument:'
259
+ message: 'Please select a value for the "${argument.name}" argument${argument.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(argument.description).replace(/\.+$/, "")})` : ""}:'
248
260
  });
249
261
  `;
250
- }
251
- })];
252
- } });
253
- }
254
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
255
- get when() {
256
- return (argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) && argument.variadic;
257
- },
258
- get children() {
259
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
260
- get condition() {
261
- return __alloy_js_core.code`${(0, __stryke_string_format_camel_case.camelCase)(argument.name)}.length === 0`;
262
- },
263
- get children() {
264
- return __alloy_js_core.code`
262
+ }
263
+ })];
264
+ } });
265
+ }
266
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
267
+ get when() {
268
+ return (argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) && argument.variadic;
269
+ },
270
+ get children() {
271
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
272
+ get condition() {
273
+ return __alloy_js_core.code`${(0, __stryke_string_format_camel_case.camelCase)(argument.name)}.length === 0`;
274
+ },
275
+ get children() {
276
+ return __alloy_js_core.code`
265
277
  const value = await text({
266
- message: 'Please provide one or more values for the ${argument.title} option (values are separated by a "," character):',
267
- validate(value) {
268
- if (isCancel(value)) {
278
+ message: 'Please provide one or more${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? " numeric" : ""} values for the "${argument.name}" argument${argument.description ? ` (${(0, __stryke_string_format_lower_case_first.lowerCaseFirst)(argument.description).replace(/\.+$/, "")})` : ""} - values are separated by a "," character:',
279
+ validate(val) {
280
+ if (isCancel(val)) {
269
281
  return true;
270
282
  }
271
- if (!value || value.trim() === "") {
272
- return "A value is required for this option";
283
+ if (!val || val.trim() === "") {
284
+ return "A value must be provided for this argument";
273
285
  }
274
- if (value.split(",").map(value => value.trim()).filter(Boolean).length === 0) {
275
- return "At least one value is required for this option";
286
+ if (val.split(",").map(v => v.trim()).filter(Boolean).length === 0) {
287
+ return "At least one value must be provided for this argument";
276
288
  }
277
- ${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `const invalidIndex = value.split(",").map(value => value.trim()).filter(Boolean).findIndex(value => Number.isNaN(Number(value));
289
+ ${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `const invalidIndex = val.split(",").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));
278
290
  if (invalidIndex !== -1) {
279
291
  return \`Invalid numeric value provided for item #\${invalidIndex + 1} - all provided items must be a valid number\`;
280
292
  } ` : ""}
@@ -288,15 +300,21 @@ function CommandEntry(props) {
288
300
 
289
301
  ${(0, __stryke_string_format_camel_case.camelCase)(argument.name)} = value.split(",").map(value => value.trim()).filter(Boolean)${argument.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? `.map(Number)` : ""} ;
290
302
  `;
291
- }
292
- });
293
- }
294
- })];
295
- }
296
- })]
297
- })
298
- ];
299
- } })];
303
+ }
304
+ });
305
+ }
306
+ })];
307
+ }
308
+ })]
309
+ }),
310
+ __alloy_js_core.code`outro("Completed providing all required input parameters");
311
+
312
+ writeLine(""); `,
313
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
314
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
315
+ ];
316
+ }
317
+ })];
300
318
  }
301
319
  })
302
320
  ];
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core0 from "@alloy-js/core";
1
+ import * as _alloy_js_core1 from "@alloy-js/core";
2
2
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
3
  import { CommandTree } from "@shell-shock/core/types/command";
4
4
 
@@ -9,7 +9,7 @@ interface CommandEntryProps extends Omit<EntryFileProps, "path" | "typeDefinitio
9
9
  /**
10
10
  * The command entry point for the Shell Shock project.
11
11
  */
12
- declare function CommandEntry(props: CommandEntryProps): _alloy_js_core0.Children;
12
+ declare function CommandEntry(props: CommandEntryProps): _alloy_js_core1.Children;
13
13
  //#endregion
14
14
  export { CommandEntry, CommandEntryProps };
15
15
  //# sourceMappingURL=command-entry.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.d.cts","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":[],"mappings":";;;;;UAwCiB,iBAAA,SAA0B,KACzC;WAGS;;AAJX;;;AAA2C,iBAU3B,YAAA,CAV2B,KAAA,EAUP,iBAVO,CAAA,EAUU,eAAA,CAAA,QAVV"}
1
+ {"version":3,"file":"command-entry.d.cts","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":[],"mappings":";;;;;UAyCiB,iBAAA,SAA0B,KACzC;WAGS;;AAJX;;;AAA2C,iBAU3B,YAAA,CAV2B,KAAA,EAUP,iBAVO,CAAA,EAUU,eAAA,CAAA,QAVV"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core1 from "@alloy-js/core";
1
+ import * as _alloy_js_core3 from "@alloy-js/core";
2
2
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
3
  import { CommandTree } from "@shell-shock/core/types/command";
4
4
 
@@ -9,7 +9,7 @@ interface CommandEntryProps extends Omit<EntryFileProps, "path" | "typeDefinitio
9
9
  /**
10
10
  * The command entry point for the Shell Shock project.
11
11
  */
12
- declare function CommandEntry(props: CommandEntryProps): _alloy_js_core1.Children;
12
+ declare function CommandEntry(props: CommandEntryProps): _alloy_js_core3.Children;
13
13
  //#endregion
14
14
  export { CommandEntry, CommandEntryProps };
15
15
  //# sourceMappingURL=command-entry.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":[],"mappings":";;;;;UAwCiB,iBAAA,SAA0B,KACzC;WAGS;;AAJX;;;AAA2C,iBAU3B,YAAA,CAV2B,KAAA,EAUP,iBAVO,CAAA,EAUU,eAAA,CAAA,QAVV"}
1
+ {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":[],"mappings":";;;;;UAyCiB,iBAAA,SAA0B,KACzC;WAGS;;AAJX;;;AAA2C,iBAU3B,YAAA,CAV2B,KAAA,EAUP,iBAVO,CAAA,EAUU,eAAA,CAAA,QAVV"}