@shell-shock/core 0.17.21 → 0.17.23

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 (307) hide show
  1. package/README.md +16 -7
  2. package/dist/api.cjs +4 -5
  3. package/dist/api.d.cts +1 -1
  4. package/dist/api.d.mts +1 -1
  5. package/dist/api.mjs +2 -2
  6. package/dist/command-B6KYexlV.d.mts +308 -0
  7. package/dist/command-B6KYexlV.d.mts.map +1 -0
  8. package/dist/command-CtfR7hKM.d.cts +308 -0
  9. package/dist/command-CtfR7hKM.d.cts.map +1 -0
  10. package/dist/components/command-validation-logic.cjs +153 -216
  11. package/dist/components/command-validation-logic.d.cts +2 -1
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +2 -1
  14. package/dist/components/command-validation-logic.mjs +153 -214
  15. package/dist/components/docs.cjs +6 -364
  16. package/dist/components/docs.d.cts +2 -3
  17. package/dist/components/docs.d.cts.map +1 -1
  18. package/dist/components/docs.d.mts +2 -3
  19. package/dist/components/docs.mjs +2 -356
  20. package/dist/components/exec-builtin.cjs +63 -100
  21. package/dist/components/exec-builtin.d.cts +1 -2
  22. package/dist/components/exec-builtin.d.cts.map +1 -1
  23. package/dist/components/exec-builtin.d.mts +1 -2
  24. package/dist/components/exec-builtin.mjs +7 -41
  25. package/dist/components/helpers.cjs +2 -52
  26. package/dist/components/helpers.d.cts +2 -1
  27. package/dist/components/helpers.d.cts.map +1 -1
  28. package/dist/components/helpers.d.mts +2 -1
  29. package/dist/components/helpers.mjs +2 -50
  30. package/dist/components/index.cjs +7 -23
  31. package/dist/components/index.mjs +9 -9
  32. package/dist/components/options-parser-logic.cjs +198 -420
  33. package/dist/components/options-parser-logic.d.cts +2 -5
  34. package/dist/components/options-parser-logic.d.cts.map +1 -1
  35. package/dist/components/options-parser-logic.d.mts +2 -5
  36. package/dist/components/options-parser-logic.mjs +192 -407
  37. package/dist/components/state-builtin.cjs +106 -164
  38. package/dist/components/state-builtin.d.cts +1 -2
  39. package/dist/components/state-builtin.d.cts.map +1 -1
  40. package/dist/components/state-builtin.d.mts +1 -2
  41. package/dist/components/state-builtin.mjs +12 -68
  42. package/dist/components/usage.cjs +4 -48
  43. package/dist/components/usage.d.cts +1 -2
  44. package/dist/components/usage.d.cts.map +1 -1
  45. package/dist/components/usage.d.mts +1 -2
  46. package/dist/components/usage.mjs +4 -46
  47. package/dist/components/utils-builtin.cjs +77 -144
  48. package/dist/components/utils-builtin.d.cts +1 -2
  49. package/dist/components/utils-builtin.d.cts.map +1 -1
  50. package/dist/components/utils-builtin.d.mts +1 -2
  51. package/dist/components/utils-builtin.mjs +9 -74
  52. package/dist/config-BIF9mEz0.d.cts +157 -0
  53. package/dist/config-BIF9mEz0.d.cts.map +1 -0
  54. package/dist/config-CnNYdfsL.d.mts +157 -0
  55. package/dist/config-CnNYdfsL.d.mts.map +1 -0
  56. package/dist/config.cjs +24 -58
  57. package/dist/config.d.cts +1 -2
  58. package/dist/config.d.cts.map +1 -1
  59. package/dist/config.d.mts +1 -2
  60. package/dist/config.mjs +23 -55
  61. package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
  62. package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
  63. package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
  64. package/dist/contexts/command.cjs +3 -9
  65. package/dist/contexts/command.d.cts +1 -2
  66. package/dist/contexts/command.d.cts.map +1 -1
  67. package/dist/contexts/command.d.mts +1 -2
  68. package/dist/contexts/command.mjs +2 -7
  69. package/dist/contexts/index.cjs +19 -1
  70. package/dist/contexts/index.d.cts +2 -1
  71. package/dist/contexts/index.d.mts +2 -1
  72. package/dist/contexts/index.mjs +2 -1
  73. package/dist/contexts/options.cjs +7 -30
  74. package/dist/contexts/options.d.cts +1 -2
  75. package/dist/contexts/options.d.cts.map +1 -1
  76. package/dist/contexts/options.d.mts +1 -2
  77. package/dist/contexts/options.mjs +7 -27
  78. package/dist/contexts/power-plant.cjs +19 -0
  79. package/dist/contexts/power-plant.d.cts +2 -0
  80. package/dist/contexts/power-plant.d.mts +2 -0
  81. package/dist/contexts/power-plant.mjs +5 -0
  82. package/dist/docs-C6ZvsVMu.cjs +278 -0
  83. package/dist/docs-CGQ2HtEY.mjs +249 -0
  84. package/dist/docs-CGQ2HtEY.mjs.map +1 -0
  85. package/dist/engine.cjs +5 -39
  86. package/dist/engine.d.cts +1 -2
  87. package/dist/engine.d.cts.map +1 -1
  88. package/dist/engine.d.mts +1 -2
  89. package/dist/engine.mjs +4 -37
  90. package/dist/generator.cjs +68 -0
  91. package/dist/generator.d.cts +15 -0
  92. package/dist/generator.d.cts.map +1 -0
  93. package/dist/generator.d.mts +15 -0
  94. package/dist/generator.d.mts.map +1 -0
  95. package/dist/generator.mjs +66 -0
  96. package/dist/generator.mjs.map +1 -0
  97. package/dist/{helpers/get-framework.cjs → get-framework-CxZc2krd.cjs} +7 -8
  98. package/dist/{helpers/get-framework.mjs → get-framework-Dlqz2hVZ.mjs} +3 -8
  99. package/dist/get-framework-Dlqz2hVZ.mjs.map +1 -0
  100. package/dist/helpers/power-plant.cjs +102 -0
  101. package/dist/helpers/power-plant.d.cts +61 -0
  102. package/dist/helpers/power-plant.d.cts.map +1 -0
  103. package/dist/helpers/power-plant.d.mts +61 -0
  104. package/dist/helpers/power-plant.d.mts.map +1 -0
  105. package/dist/helpers/power-plant.mjs +99 -0
  106. package/dist/helpers/power-plant.mjs.map +1 -0
  107. package/dist/index-D4klH_pj.d.mts +2 -0
  108. package/dist/index-DYOBadKY.d.cts +2 -0
  109. package/dist/index.cjs +1 -37
  110. package/dist/index.d.cts +4 -6
  111. package/dist/index.d.cts.map +1 -1
  112. package/dist/index.d.mts +4 -6
  113. package/dist/index.mjs +0 -35
  114. package/dist/package-B7Vu265G.mjs +6 -0
  115. package/dist/package-B7Vu265G.mjs.map +1 -0
  116. package/dist/{package.cjs → package-BLC4qc8t.cjs} +2 -4
  117. package/dist/plugin-B-hM2twc.mjs +1458 -0
  118. package/dist/plugin-B-hM2twc.mjs.map +1 -0
  119. package/dist/plugin-Bhfq0DMC.cjs +1490 -0
  120. package/dist/plugin-utils/index.cjs +359 -26
  121. package/dist/plugin-utils/index.d.cts +273 -9
  122. package/dist/plugin-utils/index.d.cts.map +1 -0
  123. package/dist/plugin-utils/index.d.mts +273 -9
  124. package/dist/plugin-utils/index.d.mts.map +1 -0
  125. package/dist/plugin-utils/index.mjs +346 -10
  126. package/dist/plugin-utils/index.mjs.map +1 -0
  127. package/dist/plugin.cjs +3 -496
  128. package/dist/plugin.d.cts +1 -3
  129. package/dist/plugin.d.cts.map +1 -1
  130. package/dist/plugin.d.mts +1 -3
  131. package/dist/plugin.mjs +2 -491
  132. package/dist/power-plant-LgxcvlMN.d.cts +4 -0
  133. package/dist/power-plant-LgxcvlMN.d.mts +4 -0
  134. package/dist/reflect-CSiffeL9.cjs +27 -0
  135. package/dist/reflect-DXKSFgvS.mjs +23 -0
  136. package/dist/reflect-DXKSFgvS.mjs.map +1 -0
  137. package/dist/schemas/env.cjs +91 -0
  138. package/dist/schemas/env.d.cts +145 -0
  139. package/dist/schemas/env.d.cts.map +1 -0
  140. package/dist/schemas/env.d.mts +145 -0
  141. package/dist/{types → schemas}/env.d.mts.map +1 -1
  142. package/dist/schemas/env.mjs +91 -0
  143. package/dist/schemas/index.cjs +4 -0
  144. package/dist/schemas/index.d.cts +2 -0
  145. package/dist/schemas/index.d.mts +2 -0
  146. package/dist/schemas/index.mjs +3 -0
  147. package/dist/types/command.cjs +0 -402
  148. package/dist/types/command.d.cts +2 -309
  149. package/dist/types/command.d.mts +2 -309
  150. package/dist/types/command.mjs +1 -368
  151. package/dist/types/config.cjs +0 -175
  152. package/dist/types/config.d.cts +2 -126
  153. package/dist/types/config.d.mts +2 -126
  154. package/dist/types/config.mjs +1 -164
  155. package/dist/types/context.cjs +0 -45
  156. package/dist/types/context.d.cts +2 -31
  157. package/dist/types/context.d.mts +2 -31
  158. package/dist/types/context.mjs +1 -41
  159. package/dist/types/index.cjs +3 -53
  160. package/dist/types/index.d.cts +4 -5
  161. package/dist/types/index.d.mts +4 -5
  162. package/dist/types/index.mjs +4 -5
  163. package/package.json +106 -42
  164. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  165. package/dist/api.cjs.map +0 -1
  166. package/dist/components/command-validation-logic.cjs.map +0 -1
  167. package/dist/components/docs.cjs.map +0 -1
  168. package/dist/components/docs.mjs.map +0 -1
  169. package/dist/components/exec-builtin.cjs.map +0 -1
  170. package/dist/components/helpers.cjs.map +0 -1
  171. package/dist/components/options-parser-logic.cjs.map +0 -1
  172. package/dist/components/state-builtin.cjs.map +0 -1
  173. package/dist/components/usage.cjs.map +0 -1
  174. package/dist/components/utils-builtin.cjs.map +0 -1
  175. package/dist/config.cjs.map +0 -1
  176. package/dist/contexts/command.cjs.map +0 -1
  177. package/dist/contexts/options.cjs.map +0 -1
  178. package/dist/engine.cjs.map +0 -1
  179. package/dist/helpers/automd.cjs +0 -193
  180. package/dist/helpers/automd.cjs.map +0 -1
  181. package/dist/helpers/automd.mjs +0 -190
  182. package/dist/helpers/automd.mjs.map +0 -1
  183. package/dist/helpers/docs-helpers.cjs +0 -24
  184. package/dist/helpers/docs-helpers.cjs.map +0 -1
  185. package/dist/helpers/docs-helpers.mjs +0 -24
  186. package/dist/helpers/docs-helpers.mjs.map +0 -1
  187. package/dist/helpers/get-framework.cjs.map +0 -1
  188. package/dist/helpers/get-framework.mjs.map +0 -1
  189. package/dist/helpers/paths.cjs +0 -137
  190. package/dist/helpers/paths.cjs.map +0 -1
  191. package/dist/helpers/paths.mjs +0 -134
  192. package/dist/helpers/paths.mjs.map +0 -1
  193. package/dist/helpers/persistence.cjs +0 -114
  194. package/dist/helpers/persistence.cjs.map +0 -1
  195. package/dist/helpers/persistence.mjs +0 -113
  196. package/dist/helpers/persistence.mjs.map +0 -1
  197. package/dist/helpers/update-package-json.cjs +0 -65
  198. package/dist/helpers/update-package-json.cjs.map +0 -1
  199. package/dist/helpers/update-package-json.mjs +0 -64
  200. package/dist/helpers/update-package-json.mjs.map +0 -1
  201. package/dist/helpers/utilities.cjs +0 -95
  202. package/dist/helpers/utilities.cjs.map +0 -1
  203. package/dist/helpers/utilities.mjs +0 -94
  204. package/dist/helpers/utilities.mjs.map +0 -1
  205. package/dist/helpers/validations.cjs +0 -71
  206. package/dist/helpers/validations.cjs.map +0 -1
  207. package/dist/helpers/validations.mjs +0 -70
  208. package/dist/helpers/validations.mjs.map +0 -1
  209. package/dist/index.cjs.map +0 -1
  210. package/dist/package.cjs.map +0 -1
  211. package/dist/package.mjs +0 -6
  212. package/dist/package.mjs.map +0 -1
  213. package/dist/plugin-utils/compute-bin.cjs +0 -49
  214. package/dist/plugin-utils/compute-bin.cjs.map +0 -1
  215. package/dist/plugin-utils/compute-bin.d.cts +0 -13
  216. package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
  217. package/dist/plugin-utils/compute-bin.d.mts +0 -13
  218. package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
  219. package/dist/plugin-utils/compute-bin.mjs +0 -49
  220. package/dist/plugin-utils/compute-bin.mjs.map +0 -1
  221. package/dist/plugin-utils/context-helpers.cjs.map +0 -1
  222. package/dist/plugin-utils/context-helpers.d.cts +0 -106
  223. package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
  224. package/dist/plugin-utils/context-helpers.d.mts +0 -106
  225. package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
  226. package/dist/plugin-utils/context-helpers.mjs.map +0 -1
  227. package/dist/plugin-utils/deepkit.cjs +0 -70
  228. package/dist/plugin-utils/deepkit.cjs.map +0 -1
  229. package/dist/plugin-utils/deepkit.d.cts +0 -23
  230. package/dist/plugin-utils/deepkit.d.cts.map +0 -1
  231. package/dist/plugin-utils/deepkit.d.mts +0 -23
  232. package/dist/plugin-utils/deepkit.d.mts.map +0 -1
  233. package/dist/plugin-utils/deepkit.mjs +0 -69
  234. package/dist/plugin-utils/deepkit.mjs.map +0 -1
  235. package/dist/plugin-utils/description-helpers.cjs +0 -112
  236. package/dist/plugin-utils/description-helpers.cjs.map +0 -1
  237. package/dist/plugin-utils/description-helpers.d.cts +0 -44
  238. package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
  239. package/dist/plugin-utils/description-helpers.d.mts +0 -44
  240. package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
  241. package/dist/plugin-utils/description-helpers.mjs +0 -108
  242. package/dist/plugin-utils/description-helpers.mjs.map +0 -1
  243. package/dist/plugin-utils/get-command-tree.cjs +0 -118
  244. package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
  245. package/dist/plugin-utils/get-command-tree.d.cts +0 -36
  246. package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
  247. package/dist/plugin-utils/get-command-tree.d.mts +0 -36
  248. package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
  249. package/dist/plugin-utils/get-command-tree.mjs +0 -115
  250. package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
  251. package/dist/plugin-utils/reflect.cjs +0 -54
  252. package/dist/plugin-utils/reflect.cjs.map +0 -1
  253. package/dist/plugin-utils/reflect.d.cts +0 -14
  254. package/dist/plugin-utils/reflect.d.cts.map +0 -1
  255. package/dist/plugin-utils/reflect.d.mts +0 -14
  256. package/dist/plugin-utils/reflect.d.mts.map +0 -1
  257. package/dist/plugin-utils/reflect.mjs +0 -53
  258. package/dist/plugin-utils/reflect.mjs.map +0 -1
  259. package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
  260. package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
  261. package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
  262. package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
  263. package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
  264. package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
  265. package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
  266. package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
  267. package/dist/plugin-utils/type-checks.cjs +0 -222
  268. package/dist/plugin-utils/type-checks.cjs.map +0 -1
  269. package/dist/plugin-utils/type-checks.d.cts +0 -41
  270. package/dist/plugin-utils/type-checks.d.cts.map +0 -1
  271. package/dist/plugin-utils/type-checks.d.mts +0 -41
  272. package/dist/plugin-utils/type-checks.d.mts.map +0 -1
  273. package/dist/plugin-utils/type-checks.mjs +0 -218
  274. package/dist/plugin-utils/type-checks.mjs.map +0 -1
  275. package/dist/plugin.cjs.map +0 -1
  276. package/dist/plugin.mjs.map +0 -1
  277. package/dist/resolver/deepkit.cjs +0 -110
  278. package/dist/resolver/deepkit.cjs.map +0 -1
  279. package/dist/resolver/deepkit.mjs +0 -109
  280. package/dist/resolver/deepkit.mjs.map +0 -1
  281. package/dist/resolver/helpers.cjs +0 -184
  282. package/dist/resolver/helpers.cjs.map +0 -1
  283. package/dist/resolver/helpers.mjs +0 -180
  284. package/dist/resolver/helpers.mjs.map +0 -1
  285. package/dist/resolver/resolve.cjs +0 -473
  286. package/dist/resolver/resolve.cjs.map +0 -1
  287. package/dist/resolver/resolve.mjs +0 -473
  288. package/dist/resolver/resolve.mjs.map +0 -1
  289. package/dist/types/command.cjs.map +0 -1
  290. package/dist/types/command.d.cts.map +0 -1
  291. package/dist/types/command.d.mts.map +0 -1
  292. package/dist/types/command.mjs.map +0 -1
  293. package/dist/types/config.cjs.map +0 -1
  294. package/dist/types/config.d.cts.map +0 -1
  295. package/dist/types/config.d.mts.map +0 -1
  296. package/dist/types/config.mjs.map +0 -1
  297. package/dist/types/context.cjs.map +0 -1
  298. package/dist/types/context.d.cts.map +0 -1
  299. package/dist/types/context.d.mts.map +0 -1
  300. package/dist/types/context.mjs.map +0 -1
  301. package/dist/types/env.cjs +0 -53
  302. package/dist/types/env.cjs.map +0 -1
  303. package/dist/types/env.d.cts +0 -71
  304. package/dist/types/env.d.cts.map +0 -1
  305. package/dist/types/env.d.mts +0 -71
  306. package/dist/types/env.mjs +0 -51
  307. /package/dist/{types → schemas}/env.mjs.map +0 -0
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
2
+ const require_context_helpers = require('../context-helpers-_wUuFRB8.cjs');
3
3
  const require_contexts_options = require('../contexts/options.cjs');
4
4
  const require_components_helpers = require('./helpers.cjs');
5
5
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
@@ -7,81 +7,44 @@ let _alloy_js_core = require("@alloy-js/core");
7
7
  let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
8
8
  let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
9
9
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
10
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
10
+ let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
11
11
  let _alloy_js_typescript = require("@alloy-js/typescript");
12
12
  let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
13
13
 
14
14
  //#region src/components/options-parser-logic.tsx
15
- function __assignType(fn, args) {
16
- fn.__type = args;
17
- return fn;
18
- }
19
- const __ΩDynamicSegmentsParserLogicProps = [
20
- "CommandTree",
21
- "command",
22
- "The command to generate the dynamic path segments parser logic for. This is used to access the command options and parameters when generating the parser logic for dynamic path segments.",
23
- "isCaseSensitive",
24
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
25
- "DynamicSegmentsParserLogicProps",
26
- "P\"w!4\"?#)4$?%Mw&y"
27
- ];
28
15
  function DynamicSegmentsParserLogic(props) {
29
16
  const { command } = props;
30
17
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
31
18
  get each() {
32
19
  return command.segments ?? [];
33
20
  },
34
- get children() {
35
- return __assignType((segment, index) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
36
- get when() {
37
- return require_context_helpers.isDynamicPathSegment(segment);
38
- },
39
- get children() {
40
- return [
41
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
42
- "let": true,
43
- get name() {
44
- return (0, _stryke_string_format_camel_case.camelCase)(require_context_helpers.getDynamicPathSegmentName(segment));
45
- },
46
- type: "string | undefined"
47
- }),
48
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
49
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
50
- condition: _alloy_js_core.code`args.length > ${2 + index} && args[${2 + index}]`,
51
- get children() {
52
- return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(require_context_helpers.getDynamicPathSegmentName(segment))} = args[${2 + index}];`;
53
- }
54
- }),
55
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
56
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
57
- ];
58
- }
59
- }), [
60
- "segment",
61
- "index",
62
- "",
63
- "P\"2!\"2\"\"/#"
64
- ]);
65
- }
21
+ children: (segment, index) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
22
+ get when() {
23
+ return require_context_helpers.isDynamicPathSegment(segment);
24
+ },
25
+ get children() {
26
+ return [
27
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
28
+ "let": true,
29
+ get name() {
30
+ return (0, _stryke_string_format_camel_case.camelCase)(require_context_helpers.getDynamicPathSegmentName(segment));
31
+ },
32
+ type: "string | undefined"
33
+ }),
34
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
35
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
36
+ condition: _alloy_js_core.code`args.length > ${2 + index} && args[${2 + index}]`,
37
+ get children() {
38
+ return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(require_context_helpers.getDynamicPathSegmentName(segment))} = args[${2 + index}];`;
39
+ }
40
+ }),
41
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
42
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
43
+ ];
44
+ }
45
+ })
66
46
  });
67
47
  }
68
- DynamicSegmentsParserLogic.__type = [
69
- () => __ΩDynamicSegmentsParserLogicProps,
70
- "props",
71
- "DynamicSegmentsParserLogic",
72
- "Pn!2\"\"/#"
73
- ];
74
- const __ΩArgumentsParserLogicProps = [
75
- "CommandTree",
76
- "command",
77
- "The command to generate the positional parameters parser logic for.",
78
- "appSpecificEnvPrefix",
79
- "The environment variable prefix to use for options that have an associated environment variable. This prefix will be used in the generated code to access the environment variables (e.g., `env.${appSpecificEnvPrefix}_OPTION_NAME`).",
80
- "isCaseSensitive",
81
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
82
- "ArgumentsParserLogicProps",
83
- "P\"w!4\"?#&4$?%)4&?'Mw(y"
84
- ];
85
48
  function ArgumentsParserLogic(props) {
86
49
  const { command, appSpecificEnvPrefix, isCaseSensitive } = props;
87
50
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
@@ -95,170 +58,137 @@ function ArgumentsParserLogic(props) {
95
58
  name: "optionsIndex",
96
59
  type: "number",
97
60
  get initializer() {
98
- return _alloy_js_core.code`Math.max(0, args.slice(${command.segments.length + 1}).findIndex(arg => arg.startsWith("-") && /^(${Object.values(command.options ?? {}).map(__assignType((option) => `${isCaseSensitive || option.name.length === 1 ? option.name : option.name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map(__assignType((a) => (isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", ""), [
99
- "a",
100
- "",
101
- "P\"2!\"/\""
102
- ])).join("|")}`, [
103
- "option",
104
- "",
105
- "P\"2!\"/\""
106
- ])).join("|")})=?.*$/.test(arg${isCaseSensitive ? "" : ".toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"}))) + ${command.segments.length + 1};`;
61
+ return _alloy_js_core.code`Math.max(0, args.slice(${command.segments.length + 1}).findIndex(arg => arg.startsWith("-") && /^(${Object.values(command.options ?? {}).map((option) => `${isCaseSensitive || option.name.length === 1 ? option.name : option.name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map((a) => (isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")).join("|")}`).join("|")})=?.*$/.test(arg${isCaseSensitive ? "" : ".toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"}))) + ${command.segments.length + 1};`;
107
62
  }
108
63
  }),
109
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
64
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
110
65
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
111
66
  "let": true,
112
67
  name: "argsIndex",
113
68
  type: "number",
114
69
  get initializer() {
115
- return _alloy_js_core.code`optionsIndex > ${command.segments.length + 1} ? ${command.segments.length + 1} : (Math.max(0, args.slice(optionsIndex).findLastIndex(arg => arg.startsWith("-") && /^(${Object.values(command.options ?? {}).map(__assignType((option) => `${isCaseSensitive || option.name.length === 1 ? option.name : option.name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map(__assignType((a) => (isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", ""), [
116
- "a",
117
- "",
118
- "P\"2!\"/\""
119
- ])).join("|")}`, [
120
- "option",
121
- "",
122
- "P\"2!\"/\""
123
- ])).join("|")})=?.*$/.test(arg${isCaseSensitive ? "" : ".toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"}))) + ${command.segments.length + 1});`;
70
+ return _alloy_js_core.code`optionsIndex > ${command.segments.length + 1} ? ${command.segments.length + 1} : (Math.max(0, args.slice(optionsIndex).findLastIndex(arg => arg.startsWith("-") && /^(${Object.values(command.options ?? {}).map((option) => `${isCaseSensitive || option.name.length === 1 ? option.name : option.name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map((a) => (isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || option.name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")).join("|")}`).join("|")})=?.*$/.test(arg${isCaseSensitive ? "" : ".toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"}))) + ${command.segments.length + 1});`;
124
71
  }
125
72
  }),
126
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
73
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
127
74
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
128
75
  get each() {
129
76
  return command.args ?? [];
130
77
  },
131
78
  hardline: true,
132
- get children() {
133
- return __assignType((arg, index) => [
134
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
135
- get when() {
136
- return (0, _stryke_type_checks_is_set_string.isSetString)(arg.env) || arg.default !== void 0 || arg.variadic;
137
- },
138
- get fallback() {
139
- return [
140
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`let ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}!: `),
141
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
142
- _alloy_js_core.code`; `
143
- ];
144
- },
145
- get children() {
146
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
147
- "let": true,
148
- get name() {
149
- return (0, _stryke_string_format_camel_case.camelCase)(arg.name);
79
+ children: (arg, index) => [
80
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
81
+ get when() {
82
+ return (0, _stryke_type_checks_is_set_string.isSetString)(arg.env) || arg.default !== void 0 || arg.variadic;
83
+ },
84
+ get fallback() {
85
+ return [
86
+ (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`let ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}!: `),
87
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
88
+ _alloy_js_core.code`; `
89
+ ];
90
+ },
91
+ get children() {
92
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
93
+ "let": true,
94
+ get name() {
95
+ return (0, _stryke_string_format_camel_case.camelCase)(arg.name);
96
+ },
97
+ get type() {
98
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg });
99
+ },
100
+ get initializer() {
101
+ return [
102
+ _alloy_js_core.code` ( `,
103
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
104
+ get when() {
105
+ return (0, _stryke_type_checks_is_set_string.isSetString)(arg.env);
106
+ },
107
+ get children() {
108
+ return _alloy_js_core.code`env.${appSpecificEnvPrefix}_${(0, _stryke_string_format_constant_case.constantCase)(String(arg.env))} ?? `;
109
+ }
110
+ }),
111
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
112
+ get when() {
113
+ return arg.default !== void 0 && (!arg.variadic || arg.default.length > 0);
114
+ },
115
+ get fallback() {
116
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
117
+ get when() {
118
+ return arg.variadic;
119
+ },
120
+ fallback: _alloy_js_core.code`undefined`,
121
+ children: _alloy_js_core.code`[]`
122
+ });
123
+ },
124
+ get children() {
125
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
126
+ get when() {
127
+ return arg.variadic;
128
+ },
129
+ get fallback() {
130
+ return arg.type === "string" ? _alloy_js_core.code`"${arg.default}"` : _alloy_js_core.code`${arg.default}`;
131
+ },
132
+ get children() {
133
+ return _alloy_js_core.code`[${arg.default?.map((value) => arg.type === "string" ? `"${value}"` : value).join(", ")}]`;
134
+ }
135
+ });
136
+ }
137
+ }),
138
+ _alloy_js_core.code`) as `,
139
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
140
+ _alloy_js_core.code`; `
141
+ ];
142
+ }
143
+ });
144
+ }
145
+ }),
146
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
147
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
148
+ condition: _alloy_js_core.code`argsIndex + ${index} < args.length && argsIndex + ${index} !== optionsIndex`,
149
+ get children() {
150
+ return [
151
+ (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = `),
152
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
153
+ get when() {
154
+ return arg.type === "string" || arg.type === "number";
150
155
  },
151
- get type() {
152
- return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg });
156
+ get fallback() {
157
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.BooleanInputParserLogic, { name: `args[argsIndex + ${index}] ` });
153
158
  },
154
- get initializer() {
155
- return [
156
- _alloy_js_core.code` ( `,
157
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
158
- get when() {
159
- return (0, _stryke_type_checks_is_set_string.isSetString)(arg.env);
160
- },
161
- get children() {
162
- return _alloy_js_core.code`env.${appSpecificEnvPrefix}_${(0, _stryke_string_format_constant_case.constantCase)(String(arg.env))} ?? `;
163
- }
164
- }),
165
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
166
- get when() {
167
- return arg.default !== void 0 && (!arg.variadic || arg.default.length > 0);
168
- },
169
- get fallback() {
170
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
171
- get when() {
172
- return arg.variadic;
173
- },
174
- fallback: _alloy_js_core.code`undefined`,
175
- children: _alloy_js_core.code`[]`
176
- });
177
- },
178
- get children() {
179
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
180
- get when() {
181
- return arg.variadic;
182
- },
183
- get fallback() {
184
- return arg.type === "string" ? _alloy_js_core.code`"${arg.default}"` : _alloy_js_core.code`${arg.default}`;
185
- },
186
- get children() {
187
- return _alloy_js_core.code`[${arg.default?.map(__assignType((value) => arg.type === "string" ? `"${value}"` : value, [
188
- "value",
189
- "",
190
- "P\"2!\"/\""
191
- ])).join(", ")}]`;
192
- }
193
- });
194
- }
195
- }),
196
- _alloy_js_core.code`) as `,
197
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
198
- _alloy_js_core.code`; `
199
- ];
159
+ get children() {
160
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
161
+ get when() {
162
+ return arg.variadic;
163
+ },
164
+ get fallback() {
165
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
166
+ get when() {
167
+ return arg.type === "number";
168
+ },
169
+ fallback: _alloy_js_core.code`args[argsIndex + ${index}] `,
170
+ children: _alloy_js_core.code`Number(args[argsIndex + ${index}]) `
171
+ });
172
+ },
173
+ get children() {
174
+ return _alloy_js_core.code`args.slice(argsIndex + ${index}, (optionsIndex > argsIndex ? optionsIndex : args.length) - ${command.args.length - index}).join(" ").split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean)`;
175
+ }
176
+ });
200
177
  }
201
- });
202
- }
203
- }),
204
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
205
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
206
- condition: _alloy_js_core.code`argsIndex + ${index} < args.length && argsIndex + ${index} !== optionsIndex`,
207
- get children() {
208
- return [
209
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = `),
210
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
211
- get when() {
212
- return arg.type === "string" || arg.type === "number";
213
- },
214
- get fallback() {
215
- return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.BooleanInputParserLogic, { name: `args[argsIndex + ${index}] ` });
216
- },
217
- get children() {
218
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
219
- get when() {
220
- return arg.variadic;
221
- },
222
- get fallback() {
223
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
224
- get when() {
225
- return arg.type === "number";
226
- },
227
- fallback: _alloy_js_core.code`args[argsIndex + ${index}] `,
228
- children: _alloy_js_core.code`Number(args[argsIndex + ${index}]) `
229
- });
230
- },
231
- get children() {
232
- return _alloy_js_core.code`args.slice(argsIndex + ${index}, (optionsIndex > argsIndex ? optionsIndex : args.length) - ${command.args.length - index}).join(" ").split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean)`;
233
- }
234
- });
235
- }
236
- }),
237
- _alloy_js_core.code` as `,
238
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
239
- _alloy_js_core.code`; `
240
- ];
241
- }
242
- }),
243
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
244
- ], [
245
- "arg",
246
- "index",
247
- "",
248
- "P\"2!\"2\"\"/#"
249
- ]);
250
- }
178
+ }),
179
+ _alloy_js_core.code` as `,
180
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
181
+ _alloy_js_core.code`; `
182
+ ];
183
+ }
184
+ }),
185
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
186
+ ]
251
187
  })
252
188
  ];
253
189
  }
254
190
  });
255
191
  }
256
- ArgumentsParserLogic.__type = [
257
- () => __ΩArgumentsParserLogicProps,
258
- "props",
259
- "ArgumentsParserLogic",
260
- "Pn!2\"\"/#"
261
- ];
262
192
  /**
263
193
  * The command option interface property.
264
194
  */
@@ -331,36 +261,12 @@ function OptionsMember({ option }) {
331
261
  }
332
262
  })];
333
263
  }
334
- OptionsMember.__type = [
335
- "CommandOption",
336
- "option",
337
- "param0",
338
- "OptionsMember",
339
- "The command option interface property.",
340
- "PP\"w!4\"M2#\"/$?%"
341
- ];
342
- const __ΩOptionsMemberParserLogicProps = [
343
- "name",
344
- "The option name to generate the parser logic for.",
345
- "CommandOption",
346
- "option",
347
- "The command option to generate the parser logic for.",
348
- "isCaseSensitive",
349
- true,
350
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
351
- "OptionsMemberParserLogicProps",
352
- "P&4!?\"\"w#4$?%)4&>'?(Mw)y"
353
- ];
354
264
  /**
355
265
  * The command option property parser logic.
356
266
  */
357
267
  function OptionsMemberParserLogic(props) {
358
268
  const { name, option, isCaseSensitive } = props;
359
- const equalsRegex = `/^--?(${isCaseSensitive || name.length === 1 ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map(__assignType((a) => (isCaseSensitive || name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", ""), [
360
- "a",
361
- "",
362
- "P\"2!\"/\""
363
- ])).join("|")})=/`;
269
+ const equalsRegex = `/^--?(${isCaseSensitive || name.length === 1 ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}${option.alias && option.alias.length > 0 ? "|" : ""}${option.alias?.map((a) => (isCaseSensitive || name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")) === "?" ? "\\?" : isCaseSensitive || name.length === 1 ? a : a.toLowerCase().replaceAll("-", "").replaceAll("_", "")).join("|")})=/`;
364
270
  return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
365
271
  get when() {
366
272
  return option.type === "string" || option.type === "number";
@@ -408,11 +314,7 @@ function OptionsMemberParserLogic(props) {
408
314
  return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
409
315
  },
410
316
  get children() {
411
- return _alloy_js_core.code` as ${option.choices?.map(__assignType((choice) => (0, _stryke_type_checks_is_set_string.isSetString)(choice) ? `"${choice}"` : choice, [
412
- "choice",
413
- "",
414
- "P\"2!\"/\""
415
- ])).join(" | ")} `;
317
+ return _alloy_js_core.code` as ${option.choices?.map((choice) => (0, _stryke_type_checks_is_set_string.isSetString)(choice) ? `"${choice}"` : choice).join(" | ")} `;
416
318
  }
417
319
  }),
418
320
  _alloy_js_core.code`); `
@@ -447,11 +349,7 @@ function OptionsMemberParserLogic(props) {
447
349
  return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
448
350
  },
449
351
  get children() {
450
- return _alloy_js_core.code` as ${option.choices?.map(__assignType((choice) => (0, _stryke_type_checks_is_set_string.isSetString)(choice) ? `"${choice}"` : choice, [
451
- "choice",
452
- "",
453
- "P\"2!\"/\""
454
- ])).join(" | ")} `;
352
+ return _alloy_js_core.code` as ${option.choices?.map((choice) => (0, _stryke_type_checks_is_set_string.isSetString)(choice) ? `"${choice}"` : choice).join(" | ")} `;
455
353
  }
456
354
  }),
457
355
  _alloy_js_core.code`); `
@@ -488,11 +386,7 @@ function OptionsMemberParserLogic(props) {
488
386
  return option.choices && option.choices.length > 0;
489
387
  },
490
388
  get children() {
491
- return _alloy_js_core.code` as ${option.choices?.map(__assignType((choice) => `"${choice}"`, [
492
- "choice",
493
- "",
494
- "P\"2!\"/\""
495
- ])).join(" | ")}`;
389
+ return _alloy_js_core.code` as ${option.choices?.map((choice) => `"${choice}"`).join(" | ")}`;
496
390
  }
497
391
  }),
498
392
  _alloy_js_core.code`; `
@@ -561,11 +455,7 @@ function OptionsMemberParserLogic(props) {
561
455
  return option.choices && option.choices.length > 0;
562
456
  },
563
457
  get children() {
564
- return _alloy_js_core.code` as ${option.choices?.map(__assignType((choice) => `"${choice}"`, [
565
- "choice",
566
- "",
567
- "P\"2!\"/\""
568
- ])).join(" | ")}`;
458
+ return _alloy_js_core.code` as ${option.choices?.map((choice) => `"${choice}"`).join(" | ")}`;
569
459
  }
570
460
  }),
571
461
  _alloy_js_core.code`; `
@@ -675,24 +565,6 @@ function OptionsMemberParserLogic(props) {
675
565
  }
676
566
  })];
677
567
  }
678
- OptionsMemberParserLogic.__type = [
679
- () => __ΩOptionsMemberParserLogicProps,
680
- "props",
681
- "OptionsMemberParserLogic",
682
- "The command option property parser logic.",
683
- "Pn!2\"\"/#?$"
684
- ];
685
- const __ΩOptionsMemberParserConditionProps = [
686
- "name",
687
- "The option name to generate the parser logic for.",
688
- "alias",
689
- "Aliases for the option, which will also be parsed in the generated code. This will affect how the generated code compares command-line arguments to option names and aliases.",
690
- "isCaseSensitive",
691
- true,
692
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
693
- "OptionsMemberParserConditionProps",
694
- "P&4!?\"&F4#8?$)4%>&?'Mw(y"
695
- ];
696
568
  function OptionsMemberParserCondition(props) {
697
569
  const { name, alias: aliasProp, isCaseSensitive } = props;
698
570
  return [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${isCaseSensitive ? "arg.startsWith(\"--" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}" || ${isCaseSensitive ? "arg.startsWith(\"-" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive ? name : name.toLowerCase().replaceAll("-", "").replaceAll("_", "")}"`), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
@@ -702,33 +574,17 @@ function OptionsMemberParserCondition(props) {
702
574
  get children() {
703
575
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
704
576
  each: aliasProp ?? [],
705
- get children() {
706
- return __assignType((alias) => _alloy_js_core.code` || ${isCaseSensitive || alias.length === 1 ? "arg.startsWith(\"--" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive || alias.length === 1 ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}" || ${isCaseSensitive || alias.length === 1 ? "arg.startsWith(\"-" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive || alias.length === 1 ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}"`, [
707
- "alias",
708
- "",
709
- "P\"2!\"/\""
710
- ]);
711
- }
577
+ children: (alias) => _alloy_js_core.code` || ${isCaseSensitive || alias.length === 1 ? "arg.startsWith(\"--" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive || alias.length === 1 ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}" || ${isCaseSensitive || alias.length === 1 ? "arg.startsWith(\"-" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\""}${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}=") || ${isCaseSensitive || alias.length === 1 ? "arg" : "arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")"} === "${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll("-", "").replaceAll("_", "")}"`
712
578
  });
713
579
  }
714
580
  })];
715
581
  }
716
- OptionsMemberParserCondition.__type = [
717
- () => __ΩOptionsMemberParserConditionProps,
718
- "props",
719
- "OptionsMemberParserCondition",
720
- "Pn!2\"\"/#"
721
- ];
722
582
  function OptionsInterfaceDeclaration(props) {
723
583
  const { command } = props;
724
- const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(command.options).map(__assignType(([name, option]) => ({
584
+ const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(command.options).map(([name, option]) => ({
725
585
  ...option,
726
586
  name
727
- }), [
728
- "param0",
729
- "",
730
- "P\"2!\"/\""
731
- ]))));
587
+ }))));
732
588
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
733
589
  "export": true,
734
590
  get name() {
@@ -741,75 +597,37 @@ function OptionsInterfaceDeclaration(props) {
741
597
  return Object.values(options.value);
742
598
  },
743
599
  hardline: true,
744
- get children() {
745
- return __assignType((option) => (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMember, { option }), [
746
- "option",
747
- "",
748
- "P\"2!\"/\""
749
- ]);
750
- }
600
+ children: (option) => (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMember, { option })
751
601
  });
752
602
  }
753
603
  });
754
604
  }
755
- OptionsInterfaceDeclaration.__type = [
756
- "CommandTree",
757
- "command",
758
- "props",
759
- "OptionsInterfaceDeclaration",
760
- "PP\"w!4\"M2#\"/$"
761
- ];
762
- const __ΩOptionsParserLogicProps = [
763
- "appSpecificEnvPrefix",
764
- "The environment variable prefix to use for options that have an associated environment variable. This prefix will be used in the generated code to access the environment variables (e.g., `env.${appSpecificEnvPrefix}_OPTION_NAME`).",
765
- "isCaseSensitive",
766
- true,
767
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
768
- "OptionsParserLogicProps",
769
- "P!&4!?\")4#8>$?%Mw&y"
770
- ];
771
605
  /**
772
606
  * The command options parser logic.
773
607
  */
774
608
  function OptionsParserLogic(props) {
775
609
  const { segments = [], options: _options, name: _name, appSpecificEnvPrefix, isCaseSensitive = false } = props;
776
- const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(_options).map(__assignType(([name, option]) => ({
610
+ const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(_options).map(([name, option]) => ({
777
611
  ...option,
778
612
  name
779
- }), [
780
- "param0",
781
- "",
782
- "P\"2!\"/\""
783
- ]))));
613
+ }))));
784
614
  return [
785
615
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
786
616
  "const": true,
787
617
  name: "options",
788
618
  get initializer() {
789
619
  return _alloy_js_core.code` {
790
- ${segments.length > 0 ? "...useGlobalOptions(), " : ""}${Object.entries(options.value).filter(__assignType(([, option]) => option.env || option.default !== void 0 || (option.type === "string" || option.type === "number") && option.variadic, [
791
- "param0",
792
- "",
793
- "P\"2!\"/\""
794
- ])).map(__assignType(([name, option]) => {
620
+ ${segments.length > 0 ? "...useGlobalOptions(), " : ""}${Object.entries(options.value).filter(([, option]) => option.env || option.default !== void 0 || (option.type === "string" || option.type === "number") && option.variadic).map(([name, option]) => {
795
621
  if (option.type === "string") return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env}` : ""}${option.variadic ? option.default !== void 0 ? `${option.env ? " ?? " : ""}${JSON.stringify(option.default)}` : option.env ? " ?? []" : "[]" : option.default !== void 0 ? `${option.env ? " ?? " : ""}"${option.default}"` : ""}, `;
796
622
  else if (option.type === "number") return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env}` : ""}${option.variadic ? option.default && Array.isArray(option.default) ? `${option.env ? " ?? " : ""}${JSON.stringify(option.default)}` : option.env ? " ?? []" : "[]" : option.default !== void 0 ? `${option.env ? " ?? " : ""}${option.default}` : ""}, `;
797
623
  else if (option.type === "boolean") return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env} ?? ` : ""}${option.default ? "true" : "false"},`;
798
624
  return "";
799
- }, [
800
- "param0",
801
- "",
802
- "P\"2!\"/\""
803
- ])).join("")}
625
+ }).join("")}
804
626
  } as unknown as ${segments.length > 0 ? (0, _stryke_string_format_pascal_case.pascalCase)(_name) : "Global"}Options;`;
805
627
  }
806
628
  }),
807
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
808
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`for (let i = 0; i < args.slice(${segments.filter(__assignType((segment) => require_context_helpers.isDynamicPathSegment(segment), [
809
- "segment",
810
- "",
811
- "P\"2!\"/\""
812
- ])).length}).length; i++) { `),
629
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
630
+ (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`for (let i = 0; i < args.slice(${segments.filter((segment) => require_context_helpers.isDynamicPathSegment(segment)).length}).length; i++) { `),
813
631
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
814
632
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
815
633
  "const": true,
@@ -827,81 +645,55 @@ function OptionsParserLogic(props) {
827
645
  return Object.entries(options.value);
828
646
  },
829
647
  hardline: true,
830
- get children() {
831
- return __assignType(([name, option], i) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
832
- when: i === 0,
833
- get fallback() {
834
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
835
- get condition() {
836
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserCondition, {
837
- name,
838
- get alias() {
839
- return option.alias;
840
- },
841
- isCaseSensitive
842
- })];
843
- },
844
- get children() {
845
- return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserLogic, {
846
- name,
847
- option,
848
- isCaseSensitive
849
- });
850
- }
851
- });
852
- },
853
- get children() {
854
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
855
- get condition() {
856
- return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserCondition, {
857
- name,
858
- get alias() {
859
- return option.alias;
860
- },
861
- isCaseSensitive
862
- });
863
- },
864
- get children() {
865
- return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserLogic, {
866
- name,
867
- option,
868
- isCaseSensitive
869
- });
870
- }
871
- });
872
- }
873
- }), [
874
- "param0",
875
- "i",
876
- "",
877
- "P\"2!\"2\"\"/#"
878
- ]);
879
- }
648
+ children: ([name, option], i) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
649
+ when: i === 0,
650
+ get fallback() {
651
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
652
+ get condition() {
653
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserCondition, {
654
+ name,
655
+ get alias() {
656
+ return option.alias;
657
+ },
658
+ isCaseSensitive
659
+ })];
660
+ },
661
+ get children() {
662
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserLogic, {
663
+ name,
664
+ option,
665
+ isCaseSensitive
666
+ });
667
+ }
668
+ });
669
+ },
670
+ get children() {
671
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
672
+ get condition() {
673
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserCondition, {
674
+ name,
675
+ get alias() {
676
+ return option.alias;
677
+ },
678
+ isCaseSensitive
679
+ });
680
+ },
681
+ get children() {
682
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsMemberParserLogic, {
683
+ name,
684
+ option,
685
+ isCaseSensitive
686
+ });
687
+ }
688
+ });
689
+ }
690
+ })
880
691
  }),
881
692
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
882
693
  _alloy_js_core.code` } `,
883
694
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
884
695
  ];
885
696
  }
886
- OptionsParserLogic.__type = [
887
- () => __ΩOptionsParserLogicProps,
888
- "props",
889
- "OptionsParserLogic",
890
- "The command options parser logic.",
891
- "Pn!2\"\"/#?$"
892
- ];
893
- const __ΩCommandParserLogicProps = [
894
- "CommandTree",
895
- "command",
896
- "The command to generate the parser logic for.",
897
- "appSpecificEnvPrefix",
898
- "The environment variable prefix to use for options that have an associated environment variable. This prefix will be used in the generated code to access the environment variables (e.g., `env.${appSpecificEnvPrefix}_OPTION_NAME`).",
899
- "isCaseSensitive",
900
- true,
901
- "Whether the command options should be parsed in a case-sensitive manner. This will affect how the generated code compares command-line arguments to option names and aliases.",
902
- "CommandParserLogicProps",
903
- "P\"w!4\"?#&4$?%)4&8>'?(Mw)y"
904
- ];
905
697
  /**
906
698
  * The command parser logic, which includes parsing dynamic path segments, positional parameters, and options.
907
699
  */
@@ -912,7 +704,7 @@ function CommandParserLogic(props) {
912
704
  command,
913
705
  isCaseSensitive
914
706
  }),
915
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
707
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
916
708
  (0, _alloy_js_core_jsx_runtime.createComponent)(OptionsParserLogic, {
917
709
  get name() {
918
710
  return command.name;
@@ -926,22 +718,15 @@ function CommandParserLogic(props) {
926
718
  appSpecificEnvPrefix,
927
719
  isCaseSensitive
928
720
  }),
929
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
721
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
930
722
  (0, _alloy_js_core_jsx_runtime.createComponent)(ArgumentsParserLogic, {
931
723
  command,
932
724
  appSpecificEnvPrefix,
933
725
  isCaseSensitive
934
726
  }),
935
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
727
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
936
728
  ];
937
729
  }
938
- CommandParserLogic.__type = [
939
- () => __ΩCommandParserLogicProps,
940
- "props",
941
- "CommandParserLogic",
942
- "The command parser logic, which includes parsing dynamic path segments, positional parameters, and options.",
943
- "Pn!2\"\"/#?$"
944
- ];
945
730
 
946
731
  //#endregion
947
732
  exports.ArgumentsParserLogic = ArgumentsParserLogic;
@@ -951,11 +736,4 @@ exports.OptionsInterfaceDeclaration = OptionsInterfaceDeclaration;
951
736
  exports.OptionsMember = OptionsMember;
952
737
  exports.OptionsMemberParserCondition = OptionsMemberParserCondition;
953
738
  exports.OptionsMemberParserLogic = OptionsMemberParserLogic;
954
- exports.OptionsParserLogic = OptionsParserLogic;
955
- exports.__ΩArgumentsParserLogicProps = __ΩArgumentsParserLogicProps;
956
- exports.__ΩCommandParserLogicProps = __ΩCommandParserLogicProps;
957
- exports.__ΩDynamicSegmentsParserLogicProps = __ΩDynamicSegmentsParserLogicProps;
958
- exports.__ΩOptionsMemberParserConditionProps = __ΩOptionsMemberParserConditionProps;
959
- exports.__ΩOptionsMemberParserLogicProps = __ΩOptionsMemberParserLogicProps;
960
- exports.__ΩOptionsParserLogicProps = __ΩOptionsParserLogicProps;
961
- //# sourceMappingURL=options-parser-logic.cjs.map
739
+ exports.OptionsParserLogic = OptionsParserLogic;