@shell-shock/core 0.17.10 → 0.17.12

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 (257) hide show
  1. package/dist/api.cjs +31 -143
  2. package/dist/api.cjs.map +1 -0
  3. package/dist/api.d.cts +2 -77
  4. package/dist/api.d.cts.map +1 -1
  5. package/dist/api.d.mts +2 -76
  6. package/dist/api.d.mts.map +1 -1
  7. package/dist/api.mjs +30 -140
  8. package/dist/api.mjs.map +1 -1
  9. package/dist/components/command-validation-logic.cjs +14 -15
  10. package/dist/components/command-validation-logic.cjs.map +1 -0
  11. package/dist/components/command-validation-logic.d.cts +1 -3
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +1 -3
  14. package/dist/components/command-validation-logic.d.mts.map +1 -1
  15. package/dist/components/command-validation-logic.mjs +12 -13
  16. package/dist/components/command-validation-logic.mjs.map +1 -1
  17. package/dist/components/docs.cjs +6 -6
  18. package/dist/components/docs.cjs.map +1 -0
  19. package/dist/components/docs.d.cts +4 -5
  20. package/dist/components/docs.d.cts.map +1 -1
  21. package/dist/components/docs.d.mts +4 -5
  22. package/dist/components/docs.d.mts.map +1 -1
  23. package/dist/components/docs.mjs +4 -4
  24. package/dist/components/docs.mjs.map +1 -1
  25. package/dist/components/exec-builtin.cjs +9 -11
  26. package/dist/components/exec-builtin.cjs.map +1 -0
  27. package/dist/components/exec-builtin.d.cts +1 -2
  28. package/dist/components/exec-builtin.d.cts.map +1 -1
  29. package/dist/components/exec-builtin.d.mts +1 -2
  30. package/dist/components/exec-builtin.d.mts.map +1 -1
  31. package/dist/components/exec-builtin.mjs +7 -10
  32. package/dist/components/exec-builtin.mjs.map +1 -1
  33. package/dist/components/helpers.cjs +4 -5
  34. package/dist/components/helpers.cjs.map +1 -0
  35. package/dist/components/helpers.d.cts +6 -8
  36. package/dist/components/helpers.d.cts.map +1 -1
  37. package/dist/components/helpers.d.mts +6 -8
  38. package/dist/components/helpers.d.mts.map +1 -1
  39. package/dist/components/helpers.mjs +2 -3
  40. package/dist/components/helpers.mjs.map +1 -1
  41. package/dist/components/options-parser-logic.cjs +29 -30
  42. package/dist/components/options-parser-logic.cjs.map +1 -0
  43. package/dist/components/options-parser-logic.d.cts +8 -9
  44. package/dist/components/options-parser-logic.d.cts.map +1 -1
  45. package/dist/components/options-parser-logic.d.mts +8 -9
  46. package/dist/components/options-parser-logic.d.mts.map +1 -1
  47. package/dist/components/options-parser-logic.mjs +27 -28
  48. package/dist/components/options-parser-logic.mjs.map +1 -1
  49. package/dist/components/state-builtin.cjs +3 -2
  50. package/dist/components/state-builtin.cjs.map +1 -0
  51. package/dist/components/state-builtin.d.cts +4 -5
  52. package/dist/components/state-builtin.d.cts.map +1 -1
  53. package/dist/components/state-builtin.d.mts +4 -5
  54. package/dist/components/state-builtin.d.mts.map +1 -1
  55. package/dist/components/state-builtin.mjs +1 -1
  56. package/dist/components/state-builtin.mjs.map +1 -1
  57. package/dist/components/usage.cjs +4 -6
  58. package/dist/components/usage.cjs.map +1 -0
  59. package/dist/components/usage.d.cts +1 -2
  60. package/dist/components/usage.d.cts.map +1 -1
  61. package/dist/components/usage.d.mts +1 -2
  62. package/dist/components/usage.d.mts.map +1 -1
  63. package/dist/components/usage.mjs +2 -4
  64. package/dist/components/usage.mjs.map +1 -1
  65. package/dist/components/utils-builtin.cjs +5 -4
  66. package/dist/components/utils-builtin.cjs.map +1 -0
  67. package/dist/components/utils-builtin.d.cts +7 -8
  68. package/dist/components/utils-builtin.d.cts.map +1 -1
  69. package/dist/components/utils-builtin.d.mts +7 -8
  70. package/dist/components/utils-builtin.d.mts.map +1 -1
  71. package/dist/components/utils-builtin.mjs +3 -3
  72. package/dist/components/utils-builtin.mjs.map +1 -1
  73. package/dist/config.cjs +53 -19
  74. package/dist/config.cjs.map +1 -0
  75. package/dist/config.d.cts +29 -8
  76. package/dist/config.d.cts.map +1 -1
  77. package/dist/config.d.mts +29 -8
  78. package/dist/config.d.mts.map +1 -1
  79. package/dist/config.mjs +51 -18
  80. package/dist/config.mjs.map +1 -1
  81. package/dist/contexts/command.cjs +2 -2
  82. package/dist/contexts/command.cjs.map +1 -0
  83. package/dist/contexts/command.d.cts.map +1 -1
  84. package/dist/contexts/command.d.mts.map +1 -1
  85. package/dist/contexts/command.mjs.map +1 -1
  86. package/dist/contexts/options.cjs +4 -4
  87. package/dist/contexts/options.cjs.map +1 -0
  88. package/dist/contexts/options.d.cts.map +1 -1
  89. package/dist/contexts/options.d.mts.map +1 -1
  90. package/dist/contexts/options.mjs +2 -3
  91. package/dist/contexts/options.mjs.map +1 -1
  92. package/dist/engine.cjs +138 -0
  93. package/dist/engine.cjs.map +1 -0
  94. package/dist/engine.d.cts +79 -0
  95. package/dist/engine.d.cts.map +1 -0
  96. package/dist/engine.d.mts +79 -0
  97. package/dist/engine.d.mts.map +1 -0
  98. package/dist/engine.mjs +136 -0
  99. package/dist/engine.mjs.map +1 -0
  100. package/dist/helpers/automd.cjs +6 -7
  101. package/dist/helpers/automd.cjs.map +1 -0
  102. package/dist/helpers/automd.mjs +2 -3
  103. package/dist/helpers/automd.mjs.map +1 -1
  104. package/dist/helpers/docs-helpers.cjs +2 -2
  105. package/dist/helpers/docs-helpers.cjs.map +1 -0
  106. package/dist/helpers/docs-helpers.mjs.map +1 -1
  107. package/dist/helpers/get-framework.cjs +24 -0
  108. package/dist/helpers/get-framework.cjs.map +1 -0
  109. package/dist/helpers/get-framework.mjs +24 -0
  110. package/dist/helpers/get-framework.mjs.map +1 -0
  111. package/dist/helpers/paths.cjs +5 -5
  112. package/dist/helpers/paths.cjs.map +1 -0
  113. package/dist/helpers/paths.mjs +4 -4
  114. package/dist/helpers/paths.mjs.map +1 -1
  115. package/dist/helpers/persistence.cjs +4 -6
  116. package/dist/helpers/persistence.cjs.map +1 -0
  117. package/dist/helpers/persistence.mjs +3 -3
  118. package/dist/helpers/persistence.mjs.map +1 -1
  119. package/dist/helpers/update-package-json.cjs +2 -2
  120. package/dist/helpers/update-package-json.cjs.map +1 -0
  121. package/dist/helpers/update-package-json.mjs.map +1 -1
  122. package/dist/helpers/utilities.cjs +3 -3
  123. package/dist/helpers/utilities.cjs.map +1 -0
  124. package/dist/helpers/utilities.mjs +1 -1
  125. package/dist/helpers/utilities.mjs.map +1 -1
  126. package/dist/helpers/validations.cjs +3 -3
  127. package/dist/helpers/validations.cjs.map +1 -0
  128. package/dist/helpers/validations.mjs +1 -3
  129. package/dist/helpers/validations.mjs.map +1 -1
  130. package/dist/index.cjs +121 -51
  131. package/dist/index.cjs.map +1 -0
  132. package/dist/index.d.cts +80 -5
  133. package/dist/index.d.cts.map +1 -0
  134. package/dist/index.d.mts +80 -5
  135. package/dist/index.d.mts.map +1 -0
  136. package/dist/index.mjs +118 -6
  137. package/dist/index.mjs.map +1 -0
  138. package/dist/package.cjs +12 -0
  139. package/dist/package.cjs.map +1 -0
  140. package/dist/package.mjs +6 -0
  141. package/dist/package.mjs.map +1 -0
  142. package/dist/plugin-utils/compute-bin.cjs +8 -10
  143. package/dist/plugin-utils/compute-bin.cjs.map +1 -0
  144. package/dist/plugin-utils/compute-bin.d.cts +2 -2
  145. package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
  146. package/dist/plugin-utils/compute-bin.d.mts +2 -2
  147. package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
  148. package/dist/plugin-utils/compute-bin.mjs +6 -8
  149. package/dist/plugin-utils/compute-bin.mjs.map +1 -1
  150. package/dist/plugin-utils/context-helpers.cjs +7 -14
  151. package/dist/plugin-utils/context-helpers.cjs.map +1 -0
  152. package/dist/plugin-utils/context-helpers.d.cts +4 -4
  153. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  154. package/dist/plugin-utils/context-helpers.d.mts +4 -4
  155. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  156. package/dist/plugin-utils/context-helpers.mjs +5 -12
  157. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  158. package/dist/plugin-utils/deepkit.cjs +15 -16
  159. package/dist/plugin-utils/deepkit.cjs.map +1 -0
  160. package/dist/plugin-utils/deepkit.d.cts +5 -5
  161. package/dist/plugin-utils/deepkit.d.cts.map +1 -1
  162. package/dist/plugin-utils/deepkit.d.mts +5 -5
  163. package/dist/plugin-utils/deepkit.d.mts.map +1 -1
  164. package/dist/plugin-utils/deepkit.mjs +14 -15
  165. package/dist/plugin-utils/deepkit.mjs.map +1 -1
  166. package/dist/plugin-utils/description-helpers.cjs +2 -1
  167. package/dist/plugin-utils/description-helpers.cjs.map +1 -0
  168. package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
  169. package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
  170. package/dist/plugin-utils/description-helpers.mjs.map +1 -1
  171. package/dist/plugin-utils/get-command-tree.cjs +2 -1
  172. package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
  173. package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
  174. package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
  175. package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
  176. package/dist/plugin-utils/index.cjs +1 -1
  177. package/dist/plugin-utils/index.d.cts +2 -2
  178. package/dist/plugin-utils/index.d.mts +2 -2
  179. package/dist/plugin-utils/index.mjs +2 -2
  180. package/dist/plugin-utils/reflect.cjs +5 -5
  181. package/dist/plugin-utils/reflect.cjs.map +1 -0
  182. package/dist/plugin-utils/reflect.d.cts.map +1 -1
  183. package/dist/plugin-utils/reflect.d.mts.map +1 -1
  184. package/dist/plugin-utils/reflect.mjs +3 -5
  185. package/dist/plugin-utils/reflect.mjs.map +1 -1
  186. package/dist/plugin-utils/traverse-command-tree.cjs +2 -1
  187. package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
  188. package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
  189. package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
  190. package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
  191. package/dist/plugin-utils/type-checks.cjs +146 -17
  192. package/dist/plugin-utils/type-checks.cjs.map +1 -0
  193. package/dist/plugin-utils/type-checks.d.cts +5 -5
  194. package/dist/plugin-utils/type-checks.d.cts.map +1 -1
  195. package/dist/plugin-utils/type-checks.d.mts +5 -5
  196. package/dist/plugin-utils/type-checks.d.mts.map +1 -1
  197. package/dist/plugin-utils/type-checks.mjs +145 -16
  198. package/dist/plugin-utils/type-checks.mjs.map +1 -1
  199. package/dist/plugin.cjs +80 -56
  200. package/dist/plugin.cjs.map +1 -0
  201. package/dist/plugin.d.cts.map +1 -1
  202. package/dist/plugin.d.mts.map +1 -1
  203. package/dist/plugin.mjs +75 -52
  204. package/dist/plugin.mjs.map +1 -1
  205. package/dist/resolver/helpers.cjs +33 -24
  206. package/dist/resolver/helpers.cjs.map +1 -0
  207. package/dist/resolver/helpers.mjs +32 -22
  208. package/dist/resolver/helpers.mjs.map +1 -1
  209. package/dist/resolver/resolve.cjs +319 -61
  210. package/dist/resolver/resolve.cjs.map +1 -0
  211. package/dist/resolver/resolve.mjs +316 -58
  212. package/dist/resolver/resolve.mjs.map +1 -1
  213. package/dist/types/command.cjs +43 -82
  214. package/dist/types/command.cjs.map +1 -0
  215. package/dist/types/command.d.cts +61 -119
  216. package/dist/types/command.d.cts.map +1 -1
  217. package/dist/types/command.d.mts +61 -119
  218. package/dist/types/command.d.mts.map +1 -1
  219. package/dist/types/command.mjs +42 -80
  220. package/dist/types/command.mjs.map +1 -1
  221. package/dist/types/config.cjs +45 -4
  222. package/dist/types/config.cjs.map +1 -0
  223. package/dist/types/config.d.cts +16 -11
  224. package/dist/types/config.d.cts.map +1 -1
  225. package/dist/types/config.d.mts +16 -11
  226. package/dist/types/config.d.mts.map +1 -1
  227. package/dist/types/config.mjs +40 -4
  228. package/dist/types/config.mjs.map +1 -1
  229. package/dist/types/context.cjs +9 -1
  230. package/dist/types/context.cjs.map +1 -0
  231. package/dist/types/context.d.cts +3 -2
  232. package/dist/types/context.d.cts.map +1 -1
  233. package/dist/types/context.d.mts +3 -2
  234. package/dist/types/context.d.mts.map +1 -1
  235. package/dist/types/context.mjs +7 -1
  236. package/dist/types/context.mjs.map +1 -1
  237. package/dist/types/env.cjs +2 -1
  238. package/dist/types/env.cjs.map +1 -0
  239. package/dist/types/env.d.cts.map +1 -1
  240. package/dist/types/env.d.mts.map +1 -1
  241. package/dist/types/env.mjs.map +1 -1
  242. package/dist/types/index.cjs +6 -3
  243. package/dist/types/index.d.cts +4 -4
  244. package/dist/types/index.d.mts +4 -4
  245. package/dist/types/index.mjs +4 -4
  246. package/dist/types/options.cjs +2 -1
  247. package/dist/types/options.cjs.map +1 -0
  248. package/dist/types/options.d.cts.map +1 -1
  249. package/dist/types/options.d.mts.map +1 -1
  250. package/dist/types/options.mjs.map +1 -1
  251. package/package.json +43 -35
  252. package/dist/resolver/deepkit.cjs +0 -135
  253. package/dist/resolver/deepkit.mjs +0 -135
  254. package/dist/resolver/deepkit.mjs.map +0 -1
  255. package/dist/resolver/module.cjs +0 -145
  256. package/dist/resolver/module.mjs +0 -145
  257. package/dist/resolver/module.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"options-parser-logic.d.cts","names":[],"sources":["../../src/components/options-parser-logic.tsx"],"mappings":";;;;;UAiDiB,+BAAA;;;AAAjB;EAIE,OAAA,EAAS,WAAA;;;;EAKT,eAAA;AAAA;AAAA,iBAGc,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,iBAAA,CAAA,QAAA;AAAA,UA4BvB,yBAAA;EA7BD;;;EAiCd,OAAA,EAAS,WAAA;EAhCF;;;EAqCP,oBAAA;EArCsC;AA4BxC;;EAcE,eAAA;AAAA;AAAA,iBAGc,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,iBAAA,CAAA,QAAA;;;;iBA+LrD,aAAA,CAAA;EAAgB;AAAA;EAAY,MAAA,EAAQ,aAAA;AAAA,IAAa,iBAAA,CAAE,QAAA;AAAA,UAm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gB;AAAA;EAAY,MAAA,EAAQ,aAAa;AAAA,6BAAE,QAAA;AAAA,UAmClD,6BAAA;EA7NoD;;;EAiOnE,IAAA;EAjOmE;AAAA;AA0LrE;EA4CE,MAAA,EAAQ,aAAa;;;;;;EAOrB,eAAA;AAAA;;AAnDiE;AAmCnE;iBAsBgB,wBAAA,CAAyB,KAAA,EAAO,6BAA6B,4BAAA,QAAA;AAAA,UAoO5D,iCAAA;EAjPM;;;EAqPrB,IAAA;EA9OA;;AAAe;EAmPf,KAAA;EA7OsC;;;;;EAoPtC,eAAA;AAAA;AAAA,iBAGc,4BAAA,CACd,KAAA,EAAO,iCAAiC,4BAAA,QAAA;AAAA,iBAkE1B,2BAAA,CAA4B,KAAA;EAAS,OAAA,EAAS,WAAW;AAAA,6BAAE,QAAA;AAAA,UAwB1D,uBAAA,SAAgC,WAAA,CAC/C,IAAA,CAAK,WAAA;EA3GL;;;EAiHA,oBAAA;EArGe;AAGjB;;;;EAyGE,eAAA;AAAA;;;AAxGwC;iBA8G1B,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA;AAAA,UAsJhD,uBAAA;;;;EAIf,OAAA,EAAS,WAAW;EAtMsB;;;EA2M1C,oBAAA;EAnLe;;;;;EA0Lf,eAAA;AAAA;;;;iBAMc,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA"}
@@ -1,5 +1,4 @@
1
1
  import { CommandOption, CommandTree } from "../types/command.mjs";
2
- import * as _$_alloy_js_core0 from "@alloy-js/core";
3
2
  import { PartialKeys } from "@stryke/types/base";
4
3
 
5
4
  //#region src/components/options-parser-logic.d.ts
@@ -13,7 +12,7 @@ interface DynamicSegmentsParserLogicProps {
13
12
  */
14
13
  isCaseSensitive: boolean;
15
14
  }
16
- declare function DynamicSegmentsParserLogic(props: DynamicSegmentsParserLogicProps): _$_alloy_js_core0.Children;
15
+ declare function DynamicSegmentsParserLogic(props: DynamicSegmentsParserLogicProps): import("@alloy-js/core").Children;
17
16
  interface ArgumentsParserLogicProps {
18
17
  /**
19
18
  * The command to generate the positional parameters parser logic for.
@@ -28,7 +27,7 @@ interface ArgumentsParserLogicProps {
28
27
  */
29
28
  isCaseSensitive: boolean;
30
29
  }
31
- declare function ArgumentsParserLogic(props: ArgumentsParserLogicProps): _$_alloy_js_core0.Children;
30
+ declare function ArgumentsParserLogic(props: ArgumentsParserLogicProps): import("@alloy-js/core").Children;
32
31
  /**
33
32
  * The command option interface property.
34
33
  */
@@ -36,7 +35,7 @@ declare function OptionsMember({
36
35
  option
37
36
  }: {
38
37
  option: CommandOption;
39
- }): _$_alloy_js_core0.Children;
38
+ }): import("@alloy-js/core").Children;
40
39
  interface OptionsMemberParserLogicProps {
41
40
  /**
42
41
  * The option name to generate the parser logic for.
@@ -56,7 +55,7 @@ interface OptionsMemberParserLogicProps {
56
55
  /**
57
56
  * The command option property parser logic.
58
57
  */
59
- declare function OptionsMemberParserLogic(props: OptionsMemberParserLogicProps): _$_alloy_js_core0.Children;
58
+ declare function OptionsMemberParserLogic(props: OptionsMemberParserLogicProps): import("@alloy-js/core").Children;
60
59
  interface OptionsMemberParserConditionProps {
61
60
  /**
62
61
  * The option name to generate the parser logic for.
@@ -73,10 +72,10 @@ interface OptionsMemberParserConditionProps {
73
72
  */
74
73
  isCaseSensitive: boolean;
75
74
  }
76
- declare function OptionsMemberParserCondition(props: OptionsMemberParserConditionProps): _$_alloy_js_core0.Children;
75
+ declare function OptionsMemberParserCondition(props: OptionsMemberParserConditionProps): import("@alloy-js/core").Children;
77
76
  declare function OptionsInterfaceDeclaration(props: {
78
77
  command: CommandTree;
79
- }): _$_alloy_js_core0.Children;
78
+ }): import("@alloy-js/core").Children;
80
79
  interface OptionsParserLogicProps extends PartialKeys<Pick<CommandTree, "segments" | "options" | "name">, "segments" | "name"> {
81
80
  /**
82
81
  * 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`).
@@ -92,7 +91,7 @@ interface OptionsParserLogicProps extends PartialKeys<Pick<CommandTree, "segment
92
91
  /**
93
92
  * The command options parser logic.
94
93
  */
95
- declare function OptionsParserLogic(props: OptionsParserLogicProps): _$_alloy_js_core0.Children;
94
+ declare function OptionsParserLogic(props: OptionsParserLogicProps): import("@alloy-js/core").Children;
96
95
  interface CommandParserLogicProps {
97
96
  /**
98
97
  * The command to generate the parser logic for.
@@ -112,7 +111,7 @@ interface CommandParserLogicProps {
112
111
  /**
113
112
  * The command parser logic, which includes parsing dynamic path segments, positional parameters, and options.
114
113
  */
115
- declare function CommandParserLogic(props: CommandParserLogicProps): _$_alloy_js_core0.Children;
114
+ declare function CommandParserLogic(props: CommandParserLogicProps): import("@alloy-js/core").Children;
116
115
  //#endregion
117
116
  export { ArgumentsParserLogic, ArgumentsParserLogicProps, CommandParserLogic, CommandParserLogicProps, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps };
118
117
  //# sourceMappingURL=options-parser-logic.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options-parser-logic.d.mts","names":[],"sources":["../../src/components/options-parser-logic.tsx"],"mappings":";;;;;UAiDiB,+BAAA;;;AAAjB;EAIE,OAAA,EAAS,WAAA;;;;EAKT,eAAA;AAAA;AAAA,iBAGc,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,iBAAA,CAAA,QAAA;AAAA,UA4BvB,yBAAA;EA7BD;;;EAiCd,OAAA,EAAS,WAAA;EAhCF;;;EAqCP,oBAAA;EArCsC;AA4BxC;;EAcE,eAAA;AAAA;AAAA,iBAGc,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,iBAAA,CAAA,QAAA;;;;iBA+LrD,aAAA,CAAA;EAAgB;AAAA;EAAY,MAAA,EAAQ,aAAA;AAAA,IAAa,iBAAA,CAAE,QAAA;AAAA,UAmClD,6BAAA;;;;EAIf,IAAA;EAtOmE;;;EA2OnE,MAAA,EAAQ,aAAA;EA5CmB;;;;;EAmD3B,eAAA;AAAA;;;;iBAMc,wBAAA,CAAyB,KAAA,EAAO,6BAAA,GAA6B,iBAAA,CAAA,QAAA;AAAA,UA0O5D,iCAAA;EAnSgD;;AAmCjE;EAoQE,IAAA;;;;EAKA,KAAA;EAhQQ;;;;AAaV;EA0PE,eAAA;AAAA;AAAA,iBAGc,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,iBAAA,CAAA,QAAA;AAAA,iBAkE1B,2BAAA,CAA4B,KAAA;EAAS,OAAA,EAAS,WAAA;AAAA,IAAW,iBAAA,CAAE,QAAA;AAAA,UAwB1D,uBAAA,SAAgC,WAAA,CAC/C,IAAA,CAAK,WAAA;EAzVsE;AA0O7E;;EAqHE,oBAAA;EArHgD;;;;;EA4HhD,eAAA;AAAA;;;;iBAMc,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,iBAAA,CAAA,QAAA;AAAA,UAuJhD,uBAAA;EArQyB;;;EAyQxC,OAAA,EAAS,WAAA;EAvMgC;;;EA4MzC,oBAAA;EA5M4D;;;;;EAmN5D,eAAA;AAAA;;;;iBAMc,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"options-parser-logic.d.mts","names":[],"sources":["../../src/components/options-parser-logic.tsx"],"mappings":""}
@@ -1,12 +1,11 @@
1
1
  import { getDynamicPathSegmentName, isDynamicPathSegment } from "../plugin-utils/context-helpers.mjs";
2
- import { CommandParameterKinds } from "../types/command.mjs";
3
2
  import { computedOptions } from "../contexts/options.mjs";
4
3
  import { BooleanInputParserLogic, CommandParameterType } from "./helpers.mjs";
5
4
  import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
5
+ import { For, Show, code, computed } from "@alloy-js/core";
6
6
  import { camelCase } from "@stryke/string-format/camel-case";
7
7
  import { constantCase } from "@stryke/string-format/constant-case";
8
8
  import { isSetString } from "@stryke/type-checks/is-set-string";
9
- import { For, Show, code, computed } from "@alloy-js/core";
10
9
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
11
10
  import { ElseClause, ElseIfClause, IfStatement, InterfaceDeclaration, InterfaceMember, VarDeclaration } from "@alloy-js/typescript";
12
11
  import { pascalCase } from "@stryke/string-format/pascal-case";
@@ -181,10 +180,10 @@ function ArgumentsParserLogic(props) {
181
180
  return arg.variadic;
182
181
  },
183
182
  get fallback() {
184
- return arg.kind === CommandParameterKinds.string ? code`"${arg.default}"` : code`${arg.default}`;
183
+ return arg.type === "string" ? code`"${arg.default}"` : code`${arg.default}`;
185
184
  },
186
185
  get children() {
187
- return code`[${arg.default?.map(__assignType((value) => arg.kind === CommandParameterKinds.string ? `"${value}"` : value, [
186
+ return code`[${arg.default?.map(__assignType((value) => arg.type === "string" ? `"${value}"` : value, [
188
187
  "value",
189
188
  "",
190
189
  "P\"2!\"/\""
@@ -209,7 +208,7 @@ function ArgumentsParserLogic(props) {
209
208
  memo(() => code`${camelCase(arg.name)} = `),
210
209
  createComponent(Show, {
211
210
  get when() {
212
- return arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number;
211
+ return arg.type === "string" || arg.type === "number";
213
212
  },
214
213
  get fallback() {
215
214
  return createComponent(BooleanInputParserLogic, { name: `args[argsIndex + ${index}] ` });
@@ -222,7 +221,7 @@ function ArgumentsParserLogic(props) {
222
221
  get fallback() {
223
222
  return createComponent(Show, {
224
223
  get when() {
225
- return arg.kind === CommandParameterKinds.number;
224
+ return arg.type === "number";
226
225
  },
227
226
  fallback: code`args[argsIndex + ${index}] `,
228
227
  children: code`Number(args[argsIndex + ${index}]) `
@@ -272,7 +271,7 @@ function OptionsMember({ option }) {
272
271
  return [
273
272
  createComponent(Show, {
274
273
  get when() {
275
- return option.kind === CommandParameterKinds.string;
274
+ return option.type === "string";
276
275
  },
277
276
  get children() {
278
277
  return createComponent(InterfaceMember, {
@@ -284,14 +283,14 @@ function OptionsMember({ option }) {
284
283
  return createComponent(CommandParameterType, { parameter: option });
285
284
  },
286
285
  get optional() {
287
- return option.optional;
286
+ return !option.required;
288
287
  }
289
288
  });
290
289
  }
291
290
  }),
292
291
  createComponent(Show, {
293
292
  get when() {
294
- return option.kind === CommandParameterKinds.number;
293
+ return option.type === "number";
295
294
  },
296
295
  get children() {
297
296
  return createComponent(InterfaceMember, {
@@ -303,14 +302,14 @@ function OptionsMember({ option }) {
303
302
  return createComponent(CommandParameterType, { parameter: option });
304
303
  },
305
304
  get optional() {
306
- return option.optional;
305
+ return !option.required;
307
306
  }
308
307
  });
309
308
  }
310
309
  }),
311
310
  createComponent(Show, {
312
311
  get when() {
313
- return option.kind === CommandParameterKinds.boolean;
312
+ return option.type === "boolean";
314
313
  },
315
314
  get children() {
316
315
  return createComponent(InterfaceMember, {
@@ -322,7 +321,7 @@ function OptionsMember({ option }) {
322
321
  return createComponent(CommandParameterType, { parameter: option });
323
322
  },
324
323
  get optional() {
325
- return option.optional;
324
+ return !option.required;
326
325
  }
327
326
  });
328
327
  }
@@ -363,7 +362,7 @@ function OptionsMemberParserLogic(props) {
363
362
  ])).join("|")})=/`;
364
363
  return [createComponent(Show, {
365
364
  get when() {
366
- return option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number;
365
+ return option.type === "string" || option.type === "number";
367
366
  },
368
367
  get children() {
369
368
  return [createComponent(Show, {
@@ -393,19 +392,19 @@ function OptionsMemberParserLogic(props) {
393
392
  }),
394
393
  createComponent(Show, {
395
394
  get when() {
396
- return option.kind === CommandParameterKinds.string;
395
+ return option.type === "string";
397
396
  },
398
397
  children: code`...arg.replace(${equalsRegex}, "").split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean) `
399
398
  }),
400
399
  createComponent(Show, {
401
400
  get when() {
402
- return option.kind === CommandParameterKinds.number;
401
+ return option.type === "number";
403
402
  },
404
403
  children: code`...arg.replace(${equalsRegex}, "").split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean).map(Number).filter(value => !Number.isNaN(value)) `
405
404
  }),
406
405
  createComponent(Show, {
407
406
  get when() {
408
- return (option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number) && option.choices && option.choices.length > 0;
407
+ return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
409
408
  },
410
409
  get children() {
411
410
  return code` as ${option.choices?.map(__assignType((choice) => isSetString(choice) ? `"${choice}"` : choice, [
@@ -432,19 +431,19 @@ function OptionsMemberParserLogic(props) {
432
431
  }),
433
432
  createComponent(Show, {
434
433
  get when() {
435
- return option.kind === CommandParameterKinds.string;
434
+ return option.type === "string";
436
435
  },
437
436
  children: code`...args[++i].split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean) `
438
437
  }),
439
438
  createComponent(Show, {
440
439
  get when() {
441
- return option.kind === CommandParameterKinds.number;
440
+ return option.type === "number";
442
441
  },
443
442
  children: code`...args[++i].split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean).map(Number).filter(value => !Number.isNaN(value)) `
444
443
  }),
445
444
  createComponent(Show, {
446
445
  get when() {
447
- return (option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number) && option.choices && option.choices.length > 0;
446
+ return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
448
447
  },
449
448
  get children() {
450
449
  return code` as ${option.choices?.map(__assignType((choice) => isSetString(choice) ? `"${choice}"` : choice, [
@@ -471,7 +470,7 @@ function OptionsMemberParserLogic(props) {
471
470
  get children() {
472
471
  return [createComponent(Show, {
473
472
  get when() {
474
- return option.kind === CommandParameterKinds.string;
473
+ return option.type === "string";
475
474
  },
476
475
  get children() {
477
476
  return [
@@ -500,7 +499,7 @@ function OptionsMemberParserLogic(props) {
500
499
  }
501
500
  }), createComponent(Show, {
502
501
  get when() {
503
- return option.kind === CommandParameterKinds.number;
502
+ return option.type === "number";
504
503
  },
505
504
  get children() {
506
505
  return [
@@ -544,7 +543,7 @@ function OptionsMemberParserLogic(props) {
544
543
  get children() {
545
544
  return [createComponent(Show, {
546
545
  get when() {
547
- return option.kind === CommandParameterKinds.string;
546
+ return option.type === "string";
548
547
  },
549
548
  get children() {
550
549
  return [
@@ -573,7 +572,7 @@ function OptionsMemberParserLogic(props) {
573
572
  }
574
573
  }), createComponent(Show, {
575
574
  get when() {
576
- return option.kind === CommandParameterKinds.number;
575
+ return option.type === "number";
577
576
  },
578
577
  get children() {
579
578
  return [
@@ -619,7 +618,7 @@ function OptionsMemberParserLogic(props) {
619
618
  }
620
619
  }), createComponent(Show, {
621
620
  get when() {
622
- return option.kind === CommandParameterKinds.boolean;
621
+ return option.type === "boolean";
623
622
  },
624
623
  get children() {
625
624
  return [
@@ -787,14 +786,14 @@ function OptionsParserLogic(props) {
787
786
  name: "options",
788
787
  get initializer() {
789
788
  return code` {
790
- ${segments.length > 0 ? "...useGlobalOptions(), " : ""}${Object.entries(options.value).filter(__assignType(([, option]) => option.env || option.default !== void 0 || (option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number) && option.variadic, [
789
+ ${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
790
  "param0",
792
791
  "",
793
792
  "P\"2!\"/\""
794
793
  ])).map(__assignType(([name, option]) => {
795
- if (option.kind === CommandParameterKinds.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
- else if (option.kind === CommandParameterKinds.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
- else if (option.kind === CommandParameterKinds.boolean) return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env} ?? ` : ""}${option.default ? "true" : "false"},`;
794
+ 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}"` : ""}, `;
795
+ 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}` : ""}, `;
796
+ else if (option.type === "boolean") return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env} ?? ` : ""}${option.default ? "true" : "false"},`;
798
797
  return "";
799
798
  }, [
800
799
  "param0",
@@ -1 +1 @@
1
- {"version":3,"file":"options-parser-logic.mjs","names":[],"sources":["../../src/components/options-parser-logic.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport {\n ElseClause,\n ElseIfClause,\n IfStatement,\n InterfaceDeclaration,\n InterfaceMember,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { PartialKeys } from \"@stryke/types/base\";\nimport { computedOptions } from \"../contexts/options\";\nimport {\n getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"../plugin-utils/context-helpers\";\nimport type {\n BaseVariadicCommandParameter,\n BooleanCommandOption,\n CommandOption,\n CommandTree,\n NumberCommandParameter,\n StringCommandParameter\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport { BooleanInputParserLogic, CommandParameterType } from \"./helpers\";\n\nexport interface DynamicSegmentsParserLogicProps {\n /**\n * 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.\n */\n command: CommandTree;\n\n /**\n * 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.\n */\n isCaseSensitive: boolean;\n}\n\nexport function DynamicSegmentsParserLogic(\n props: DynamicSegmentsParserLogicProps\n) {\n const { command } = props;\n\n return (\n <For each={command.segments ?? []}>\n {(segment, index) => (\n <Show when={isDynamicPathSegment(segment)}>\n <VarDeclaration\n let\n name={camelCase(getDynamicPathSegmentName(segment))}\n type=\"string | undefined\"\n />\n <hbr />\n <IfStatement\n condition={code`args.length > ${2 + index} && args[${2 + index}]`}>\n {code`${camelCase(\n getDynamicPathSegmentName(segment)\n )} = args[${2 + index}];`}\n </IfStatement>\n <hbr />\n <hbr />\n </Show>\n )}\n </For>\n );\n}\n\nexport interface ArgumentsParserLogicProps {\n /**\n * The command to generate the positional parameters parser logic for.\n */\n command: CommandTree;\n\n /**\n * 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`).\n */\n appSpecificEnvPrefix: string;\n\n /**\n * 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.\n */\n isCaseSensitive: boolean;\n}\n\nexport function ArgumentsParserLogic(props: ArgumentsParserLogicProps) {\n const { command, appSpecificEnvPrefix, isCaseSensitive } = props;\n\n return (\n <Show when={command.args && command.args.length > 0}>\n <VarDeclaration\n let\n name=\"optionsIndex\"\n type=\"number\"\n initializer={code`Math.max(0, args.slice(${\n command.segments.length + 1\n }).findIndex(arg => arg.startsWith(\"-\") && /^(${Object.values(\n command.options ?? {}\n )\n .map(\n option =>\n `${\n isCaseSensitive || option.name.length === 1\n ? option.name\n : option.name\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }${option.alias && option.alias.length > 0 ? \"|\" : \"\"}${option.alias\n ?.map(a =>\n (isCaseSensitive || option.name.length === 1\n ? a\n : a\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")) === \"?\"\n ? \"\\\\?\"\n : isCaseSensitive || option.name.length === 1\n ? a\n : a.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n )\n .join(\"|\")}`\n )\n .join(\"|\")})=?.*$/.test(arg${\n isCaseSensitive\n ? \"\"\n : '.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n }))) + ${command.segments.length + 1};`}\n />\n <Spacing />\n <VarDeclaration\n let\n name=\"argsIndex\"\n type=\"number\"\n initializer={code`optionsIndex > ${\n command.segments.length + 1\n } ? ${command.segments.length + 1} : (Math.max(0, args.slice(optionsIndex).findLastIndex(arg => arg.startsWith(\"-\") && /^(${Object.values(\n command.options ?? {}\n )\n .map(\n option =>\n `${\n isCaseSensitive || option.name.length === 1\n ? option.name\n : option.name\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }${option.alias && option.alias.length > 0 ? \"|\" : \"\"}${option.alias\n ?.map(a =>\n (isCaseSensitive || option.name.length === 1\n ? a\n : a\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")) === \"?\"\n ? \"\\\\?\"\n : isCaseSensitive || option.name.length === 1\n ? a\n : a.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n )\n .join(\"|\")}`\n )\n .join(\"|\")})=?.*$/.test(arg${\n isCaseSensitive\n ? \"\"\n : '.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n }))) + ${command.segments.length + 1});`}\n />\n <Spacing />\n <For each={command.args ?? []} hardline>\n {(arg, index) => (\n <>\n <Show\n when={\n isSetString(arg.env) ||\n arg.default !== undefined ||\n arg.variadic\n }\n fallback={\n <>\n {code`let ${camelCase(arg.name)}!: `}\n <CommandParameterType parameter={arg} />\n {code`; `}\n </>\n }>\n <VarDeclaration\n let\n name={camelCase(arg.name)}\n type={<CommandParameterType parameter={arg} />}\n initializer={\n <>\n {code` ( `}\n <Show when={isSetString(arg.env)}>\n {code`env.${appSpecificEnvPrefix}_${constantCase(String(arg.env))} ?? `}\n </Show>\n <Show\n when={\n arg.default !== undefined &&\n (!arg.variadic ||\n (arg as BaseVariadicCommandParameter).default!\n .length > 0)\n }\n fallback={\n <Show when={arg.variadic} fallback={code`undefined`}>\n {code`[]`}\n </Show>\n }>\n <Show\n when={arg.variadic}\n fallback={\n arg.kind === CommandParameterKinds.string\n ? code`\"${arg.default}\"`\n : code`${arg.default}`\n }>\n {code`[${(arg as BaseVariadicCommandParameter).default\n ?.map(value =>\n arg.kind === CommandParameterKinds.string\n ? `\"${value}\"`\n : value\n )\n .join(\", \")}]`}\n </Show>\n </Show>\n {code`) as `}\n <CommandParameterType parameter={arg} />\n {code`; `}\n </>\n }\n />\n </Show>\n <Spacing />\n <IfStatement\n condition={code`argsIndex + ${index} < args.length && argsIndex + ${index} !== optionsIndex`}>\n {code`${camelCase(arg.name)} = `}\n <Show\n when={\n arg.kind === CommandParameterKinds.string ||\n arg.kind === CommandParameterKinds.number\n }\n fallback={\n <BooleanInputParserLogic\n name={`args[argsIndex + ${index}] `}\n />\n }>\n <Show\n when={arg.variadic}\n fallback={\n <Show\n when={arg.kind === CommandParameterKinds.number}\n fallback={code`args[argsIndex + ${index}] `}>\n {code`Number(args[argsIndex + ${index}]) `}\n </Show>\n }>\n {code`args.slice(argsIndex + ${\n index\n }, (optionsIndex > argsIndex ? optionsIndex : args.length) - ${\n command.args.length - index\n }).join(\" \").split(\",\").map(item => item.trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")).filter(Boolean)`}\n </Show>\n </Show>\n {code` as `}\n <CommandParameterType parameter={arg} />\n {code`; `}\n </IfStatement>\n <Spacing />\n </>\n )}\n </For>\n </Show>\n );\n}\n\n/**\n * The command option interface property.\n */\nexport function OptionsMember({ option }: { option: CommandOption }) {\n const doc = option.description || `The ${option.title} command option.`;\n\n return (\n <>\n <Show when={Boolean(option.name)}>\n <Show when={option.kind === CommandParameterKinds.string}>\n <InterfaceMember\n name={option.name}\n doc={doc}\n type={<CommandParameterType parameter={option} />}\n optional={option.optional}\n />\n </Show>\n <Show when={option.kind === CommandParameterKinds.number}>\n <InterfaceMember\n name={option.name}\n doc={doc}\n type={<CommandParameterType parameter={option} />}\n optional={option.optional}\n />\n </Show>\n <Show when={option.kind === CommandParameterKinds.boolean}>\n <InterfaceMember\n name={option.name}\n doc={doc}\n type={<CommandParameterType parameter={option} />}\n optional={option.optional}\n />\n </Show>\n </Show>\n </>\n );\n}\n\nexport interface OptionsMemberParserLogicProps {\n /**\n * The option name to generate the parser logic for.\n */\n name: string;\n\n /**\n * The command option to generate the parser logic for.\n */\n option: CommandOption;\n\n /**\n * 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.\n *\n * @defaultValue false\n */\n isCaseSensitive: boolean;\n}\n\n/**\n * The command option property parser logic.\n */\nexport function OptionsMemberParserLogic(props: OptionsMemberParserLogicProps) {\n const { name, option, isCaseSensitive } = props;\n\n const equalsRegex = `/^--?(${\n isCaseSensitive || name.length === 1\n ? name\n : name.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n }${option.alias && option.alias.length > 0 ? \"|\" : \"\"}${option.alias\n ?.map(a =>\n (isCaseSensitive || name.length === 1\n ? a\n : a.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")) === \"?\"\n ? \"\\\\?\"\n : isCaseSensitive || name.length === 1\n ? a\n : a.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n )\n .join(\"|\")})=/`;\n\n return (\n <>\n <Show\n when={\n option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number\n }>\n <Show\n when={\n (option as StringCommandParameter | NumberCommandParameter).variadic\n }>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name} ??= []; `}>\n {code`options[\"${name}\"] ??= []; `}\n </Show>\n <hbr />\n <IfStatement\n condition={`${equalsRegex}.test(${\n isCaseSensitive\n ? \"arg\"\n : '\"-\" + arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n })`}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}.push(`}>\n {code`options[\"${name}\"].push(`}\n </Show>\n <Show when={option.kind === CommandParameterKinds.string}>\n {code`...arg.replace(${equalsRegex}, \"\").split(\",\").map(item => item.trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")).filter(Boolean) `}\n </Show>\n <Show when={option.kind === CommandParameterKinds.number}>\n {code`...arg.replace(${equalsRegex}, \"\").split(\",\").map(item => item.trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")).filter(Boolean).map(Number).filter(value => !Number.isNaN(value)) `}\n </Show>\n <Show\n when={\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.choices &&\n option.choices.length > 0\n }>\n {code` as ${(\n option as StringCommandParameter | NumberCommandParameter\n ).choices\n ?.map(choice => (isSetString(choice) ? `\"${choice}\"` : choice))\n .join(\" | \")} `}\n </Show>\n {code`); `}\n </IfStatement>\n <ElseIfClause condition={`args.length > i + 1`}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}.push(`}>\n {code`options[\"${name}\"].push(`}\n </Show>\n <Show when={option.kind === CommandParameterKinds.string}>\n {code`...args[++i].split(\",\").map(item => item.trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")).filter(Boolean) `}\n </Show>\n <Show when={option.kind === CommandParameterKinds.number}>\n {code`...args[++i].split(\",\").map(item => item.trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")).filter(Boolean).map(Number).filter(value => !Number.isNaN(value)) `}\n </Show>\n <Show\n when={\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.choices &&\n option.choices.length > 0\n }>\n {code` as ${(\n option as StringCommandParameter | NumberCommandParameter\n ).choices\n ?.map(choice => (isSetString(choice) ? `\"${choice}\"` : choice))\n .join(\" | \")} `}\n </Show>\n {code`); `}\n </ElseIfClause>\n </Show>\n <Show\n when={\n !(option as StringCommandParameter | NumberCommandParameter)\n .variadic\n }>\n <IfStatement\n condition={`${equalsRegex}.test(${\n isCaseSensitive\n ? \"arg\"\n : '\"-\" + arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n })`}>\n <Show when={option.kind === CommandParameterKinds.string}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}`}>\n {code`options[\"${name}\"]`}\n </Show>\n {code` = arg.replace(${equalsRegex}, \"\").trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")`}\n <Show\n when={\n (option as StringCommandParameter).choices &&\n (option as StringCommandParameter).choices!.length > 0\n }>\n {code` as ${(option as StringCommandParameter).choices\n ?.map(choice => `\"${choice}\"`)\n .join(\" | \")}`}\n </Show>\n {code`; `}\n </Show>\n <Show when={option.kind === CommandParameterKinds.number}>\n <VarDeclaration\n const\n name=\"value\"\n initializer={code` Number(arg.replace(${equalsRegex}, \"\").trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")); `}\n />\n <hbr />\n <IfStatement condition={`!Number.isNaN(value)`}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}`}>\n {code`options[\"${name}\"]`}\n </Show>\n {code` = value`}\n <Show\n when={\n (option as NumberCommandParameter).choices &&\n (option as NumberCommandParameter).choices!.length > 0\n }>\n {code` as ${(option as NumberCommandParameter).choices?.join(\" | \")}`}\n </Show>\n {code`; `}\n </IfStatement>\n </Show>\n </IfStatement>\n <ElseIfClause condition={`args.length > i + 1`}>\n <Show when={option.kind === CommandParameterKinds.string}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}`}>\n {code`options[\"${name}\"]`}\n </Show>\n {code` = args[++i].trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")`}\n <Show\n when={\n (option as StringCommandParameter).choices &&\n (option as StringCommandParameter).choices!.length > 0\n }>\n {code` as ${(option as StringCommandParameter).choices?.map(choice => `\"${choice}\"`).join(\" | \")}`}\n </Show>\n {code`; `}\n </Show>\n <Show when={option.kind === CommandParameterKinds.number}>\n <VarDeclaration\n const\n name=\"value\"\n initializer={code` Number(args[++i].trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\")); `}\n />\n <hbr />\n <IfStatement condition={`!Number.isNaN(value)`}>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name}`}>\n {code`options[\"${name}\"]`}\n </Show>\n {code` = value`}\n <Show\n when={\n (option as NumberCommandParameter).choices &&\n (option as NumberCommandParameter).choices!.length > 0\n }>\n {code` as ${(option as NumberCommandParameter).choices?.join(\" | \")}`}\n </Show>\n {code`; `}\n </IfStatement>\n </Show>\n </ElseIfClause>\n <hbr />\n </Show>\n </Show>\n <Show when={option.kind === CommandParameterKinds.boolean}>\n <IfStatement\n condition={`${equalsRegex}.test(${isCaseSensitive ? \"arg\" : '\"-\" + arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'})`}>\n <VarDeclaration\n const\n name=\"value\"\n initializer={code` arg.replace(${equalsRegex}, \"\").trim().replace(/^(\"|')/, \"\").replace(/(\"|')$/, \"\").toLowerCase(); `}\n />\n <hbr />\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name} = `}>\n {code`options[\"${name}\"] = `}\n </Show>\n <BooleanInputParserLogic name=\"value\" />\n </IfStatement>\n <ElseClause>\n <Show\n when={name.includes(\"?\") || name.includes(\"-\")}\n fallback={code`options.${name} = true; `}>\n {code`options[\"${name}\"] = true; `}\n </Show>\n </ElseClause>\n <Show when={Boolean((option as BooleanCommandOption).isNegativeOf)}>\n <hbr />\n <Show\n when={\n (option as BooleanCommandOption).isNegativeOf!.includes(\"?\") ||\n (option as BooleanCommandOption).isNegativeOf!.includes(\"-\")\n }\n fallback={code`options.${(option as BooleanCommandOption).isNegativeOf} = false; `}>\n {code`options[\"${(option as BooleanCommandOption).isNegativeOf}\"] = false; `}\n </Show>\n </Show>\n </Show>\n </>\n );\n}\n\nexport interface OptionsMemberParserConditionProps {\n /**\n * The option name to generate the parser logic for.\n */\n name: string;\n\n /**\n * 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.\n */\n alias?: string[];\n\n /**\n * 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.\n *\n * @defaultValue false\n */\n isCaseSensitive: boolean;\n}\n\nexport function OptionsMemberParserCondition(\n props: OptionsMemberParserConditionProps\n) {\n const { name, alias: aliasProp, isCaseSensitive } = props;\n\n return (\n <>\n {code`${\n isCaseSensitive\n ? 'arg.startsWith(\"--'\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\"'\n }${isCaseSensitive ? name : name.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")}=\") || ${\n isCaseSensitive\n ? \"arg\"\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n isCaseSensitive\n ? name\n : name.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n }\" || ${\n isCaseSensitive\n ? 'arg.startsWith(\"-'\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\"'\n }${isCaseSensitive ? name : name.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")}=\") || ${\n isCaseSensitive\n ? \"arg\"\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n isCaseSensitive\n ? name\n : name.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n }\"`}\n <Show when={aliasProp && aliasProp.length > 0}>\n <For each={aliasProp ?? []}>\n {alias =>\n code` || ${\n isCaseSensitive || alias.length === 1\n ? 'arg.startsWith(\"--'\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\"'\n }${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")}=\") || ${\n isCaseSensitive || alias.length === 1\n ? \"arg\"\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n isCaseSensitive || alias.length === 1\n ? alias\n : alias.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n }\" || ${\n isCaseSensitive || alias.length === 1\n ? 'arg.startsWith(\"-'\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\").startsWith(\"'\n }${isCaseSensitive || alias.length === 1 ? alias : alias.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")}=\") || ${\n isCaseSensitive || alias.length === 1\n ? \"arg\"\n : 'arg.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n isCaseSensitive || alias.length === 1\n ? alias\n : alias.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")\n }\"`\n }\n </For>\n </Show>\n </>\n );\n}\n\nexport function OptionsInterfaceDeclaration(props: { command: CommandTree }) {\n const { command } = props;\n\n const options = computed(() =>\n computedOptions(\n Object.entries(command.options).map(([name, option]) => ({\n ...option,\n name\n }))\n )\n );\n\n return (\n <InterfaceDeclaration\n export\n name={`${pascalCase(command.name)}Options`}\n extends=\"GlobalOptions\">\n <For each={Object.values(options.value)} hardline>\n {option => <OptionsMember option={option} />}\n </For>\n </InterfaceDeclaration>\n );\n}\n\nexport interface OptionsParserLogicProps extends PartialKeys<\n Pick<CommandTree, \"segments\" | \"options\" | \"name\">,\n \"segments\" | \"name\"\n> {\n /**\n * 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`).\n */\n appSpecificEnvPrefix: string;\n\n /**\n * 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.\n *\n * @defaultValue false\n */\n isCaseSensitive?: boolean;\n}\n\n/**\n * The command options parser logic.\n */\nexport function OptionsParserLogic(props: OptionsParserLogicProps) {\n const {\n segments = [],\n options: _options,\n name: _name,\n appSpecificEnvPrefix,\n isCaseSensitive = false\n } = props;\n\n const options = computed(() =>\n computedOptions(\n Object.entries(_options).map(([name, option]) => ({\n ...option,\n name\n }))\n )\n );\n\n return (\n <>\n <VarDeclaration\n const\n name=\"options\"\n initializer={code` {\n ${\n segments.length > 0 ? \"...useGlobalOptions(), \" : \"\"\n }${Object.entries(options.value)\n .filter(\n ([, option]) =>\n option.env ||\n option.default !== undefined ||\n ((option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.variadic)\n )\n .map(([name, option]) => {\n if (option.kind === CommandParameterKinds.string) {\n return ` ${\n name.includes(\"?\") || name.includes(\"-\")\n ? `\"${name}\"`\n : `${name}`\n }: ${\n option.env ? `env.${appSpecificEnvPrefix}_${option.env}` : \"\"\n }${\n option.variadic\n ? option.default !== undefined\n ? `${\n option.env ? \" ?? \" : \"\"\n }${JSON.stringify(option.default)}`\n : option.env\n ? \" ?? []\"\n : \"[]\"\n : option.default !== undefined\n ? `${option.env ? \" ?? \" : \"\"}\"${option.default}\"`\n : \"\"\n }, `;\n } else if (option.kind === CommandParameterKinds.number) {\n return ` ${name.includes(\"?\") || name.includes(\"-\") ? `\"${name}\"` : `${name}`}: ${\n option.env ? `env.${appSpecificEnvPrefix}_${option.env}` : \"\"\n }${\n option.variadic\n ? option.default && Array.isArray(option.default)\n ? `${\n option.env ? \" ?? \" : \"\"\n }${JSON.stringify(option.default)}`\n : option.env\n ? \" ?? []\"\n : \"[]\"\n : option.default !== undefined\n ? `${option.env ? \" ?? \" : \"\"}${option.default}`\n : \"\"\n }, `;\n } else if (option.kind === CommandParameterKinds.boolean) {\n return ` ${name.includes(\"?\") || name.includes(\"-\") ? `\"${name}\"` : `${name}`}: ${\n option.env\n ? `env.${appSpecificEnvPrefix}_${option.env} ?? `\n : \"\"\n }${option.default ? \"true\" : \"false\"},`;\n }\n\n return \"\";\n })\n .join(\"\")}\n } as unknown as ${segments.length > 0 ? pascalCase(_name) : \"Global\"}Options;`}\n />\n <Spacing />\n {code`for (let i = 0; i < args.slice(${\n segments.filter(segment => isDynamicPathSegment(segment)).length\n }).length; i++) { `}\n <hbr />\n <VarDeclaration\n const\n name=\"arg\"\n type=\"string\"\n initializer={code` args[i].length > 3 && args[i].startsWith(\"--\")\n ? \\`--\\${args[i].slice(2).replaceAll(\"-\", \"\")${\n isCaseSensitive\n ? \"\"\n : '.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n }}\\`\n : args[i].length > 2 && args[i].startsWith(\"-\")\n ? \\`-\\${args[i].slice(1).replaceAll(\"-\", \"\")}\\`\n : args[i]; `}\n />\n <hbr />\n <For each={Object.entries(options.value)} hardline>\n {([name, option], i) => (\n <Show\n when={i === 0}\n fallback={\n <ElseIfClause\n condition={\n <>\n <OptionsMemberParserCondition\n name={name}\n alias={option.alias}\n isCaseSensitive={isCaseSensitive}\n />\n </>\n }>\n <OptionsMemberParserLogic\n name={name}\n option={option}\n isCaseSensitive={isCaseSensitive}\n />\n </ElseIfClause>\n }>\n <IfStatement\n condition={\n <OptionsMemberParserCondition\n name={name}\n alias={option.alias}\n isCaseSensitive={isCaseSensitive}\n />\n }>\n <OptionsMemberParserLogic\n name={name}\n option={option}\n isCaseSensitive={isCaseSensitive}\n />\n </IfStatement>\n </Show>\n )}\n </For>\n <hbr />\n {code` } `}\n <hbr />\n </>\n );\n}\n\nexport interface CommandParserLogicProps {\n /**\n * The command to generate the parser logic for.\n */\n command: CommandTree;\n\n /**\n * 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`).\n */\n appSpecificEnvPrefix: string;\n\n /**\n * 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.\n *\n * @defaultValue false\n */\n isCaseSensitive?: boolean;\n}\n\n/**\n * The command parser logic, which includes parsing dynamic path segments, positional parameters, and options.\n */\nexport function CommandParserLogic(props: CommandParserLogicProps) {\n const { command, appSpecificEnvPrefix, isCaseSensitive = false } = props;\n\n return (\n <>\n <DynamicSegmentsParserLogic\n command={command}\n isCaseSensitive={isCaseSensitive}\n />\n <Spacing />\n <OptionsParserLogic\n name={command.name}\n options={command.options}\n segments={command.segments}\n appSpecificEnvPrefix={appSpecificEnvPrefix}\n isCaseSensitive={isCaseSensitive}\n />\n <Spacing />\n <ArgumentsParserLogic\n command={command}\n appSpecificEnvPrefix={appSpecificEnvPrefix}\n isCaseSensitive={isCaseSensitive}\n />\n <Spacing />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEE,IAAG,SAAS;;;AA+Bd,MAAM,qCAA8B;CAAQ;CAAS;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAErD,SAAE,2BAAyB,OAAA;CACzB,MAAA,EACA,YACI;AACJ,QAAA,gBAAA,KAA4B;EAC5B,IAAA,OAAA;AACA,UAAA,QAAa,YAAA,EAAA;;EAEb,IAAA,WAAA;AACA,UAAA,cAAA,SAAA,UAAA,gBAAA,MAAA;IACM,IAAG,OAAM;AACR,YAAA,qBAA6B,QAAI;;;AAGnC,YAAU;MAAA,gBAAA,gBAAgC;OAC7C,OAAA;OACK,IAAO,OAAI;AAChB,eAAA,UAAA,0BAAA,QAAA,CAAA;;;OAGA,CAAA;MAAA,gBAAA,OAAA,EAAA,CAAA;MAAA,gBAAA,aAAA;OACQ,WAAK,IAAQ,iBAAkB,IAAA,MAAW,WAAM,IAAS,MAAC;OAClE,IAAA,WAAA;AACF,eAAiB,IAAA,GAAO,UAAA,0BAAA,QAAA,CAAA,CAAA,UAAA,IAAA,MAAA;;;;;;;IAInB,CAAC,EAAC;IAAA;IAAA;IAAA;IAAA;IAAA,CAAA;;EAEP,CAAA;;AAEF,2BAAS,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AACT,MAAK,+BAAgC;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtC,SAAc,qBAAM,OAAqB;CACvC,MAAM,EACJ,SACA,sBACA,oBACE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A,CAAC;EAAE,gBAAa,SAAA,EAAA,CAAA;EAAA,gBAAA,sBAAA;GACf;GACgB;GACpB;;;;;AAGA,mBAAe,SAAQ;OAAY;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"options-parser-logic.mjs","names":[],"sources":[],"mappings":""}
@@ -5,9 +5,9 @@ const require_contexts_options = require('../contexts/options.cjs');
5
5
  require('../plugin-utils/index.cjs');
6
6
  const require_components_options_parser_logic = require('./options-parser-logic.cjs');
7
7
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
8
+ let _alloy_js_core = require("@alloy-js/core");
8
9
  let defu = require("defu");
9
10
  defu = require_runtime.__toESM(defu);
10
- let _alloy_js_core = require("@alloy-js/core");
11
11
  let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
12
12
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
13
13
  let _alloy_js_typescript = require("@alloy-js/typescript");
@@ -646,4 +646,5 @@ exports.ArgsUtilities = ArgsUtilities;
646
646
  exports.ContextUtilities = ContextUtilities;
647
647
  exports.GlobalTypeDefinitions = GlobalTypeDefinitions;
648
648
  exports.StateBuiltin = StateBuiltin;
649
- exports.__ΩStateBuiltinProps = __ΩStateBuiltinProps;
649
+ exports.__ΩStateBuiltinProps = __ΩStateBuiltinProps;
650
+ //# sourceMappingURL=state-builtin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-builtin.cjs","names":[],"sources":[],"mappings":""}
@@ -1,18 +1,17 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
2
 
4
3
  //#region src/components/state-builtin.d.ts
5
- declare function GlobalTypeDefinitions(): _$_alloy_js_core0.Children;
4
+ declare function GlobalTypeDefinitions(): import("@alloy-js/core").Children;
6
5
  /**
7
6
  * Generates utilities for detecting terminal color support.
8
7
  */
9
- declare function ArgsUtilities(): _$_alloy_js_core0.Children;
10
- declare function ContextUtilities(): _$_alloy_js_core0.Children;
8
+ declare function ArgsUtilities(): import("@alloy-js/core").Children;
9
+ declare function ContextUtilities(): import("@alloy-js/core").Children;
11
10
  interface StateBuiltinProps extends Omit<BuiltinFileProps, "id" | "description"> {}
12
11
  /**
13
12
  * A built-in module for handling application state utilities in Shell Shock.
14
13
  */
15
- declare function StateBuiltin(props: StateBuiltinProps): _$_alloy_js_core0.Children;
14
+ declare function StateBuiltin(props: StateBuiltinProps): import("@alloy-js/core").Children;
16
15
  //#endregion
17
16
  export { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin, StateBuiltinProps };
18
17
  //# sourceMappingURL=state-builtin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state-builtin.d.cts","names":[],"sources":["../../src/components/state-builtin.tsx"],"mappings":";;;;iBA6CgB,qBAAA,CAAA,GAAqB,iBAAA,CAAA,QAAA;;;AAArC;iBA2FgB,aAAA,CAAA,GAAa,iBAAA,CAAA,QAAA;AAAA,iBAqBb,gBAAA,CAAA,GAAgB,iBAAA,CAAA,QAAA;AAAA,UAiUf,iBAAA,SAA0B,IAAA,CACzC,gBAAA;AAvVF;;;AAAA,iBA8VgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"state-builtin.d.cts","names":[],"sources":["../../src/components/state-builtin.tsx"],"mappings":";;;iBA6CgB,qBAAA,6BAAqB,QAAA;;AAArC;;iBA2FgB,aAAA,6BAAa,QAAA;AAAA,iBAqBb,gBAAA,6BAAgB,QAAA;AAAA,UAiUf,iBAAA,SAA0B,IAAI,CAC7C,gBAAA;;;;iBAOc,YAAA,CAAa,KAAA,EAAO,iBAAiB,4BAAA,QAAA"}
@@ -1,18 +1,17 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
2
 
4
3
  //#region src/components/state-builtin.d.ts
5
- declare function GlobalTypeDefinitions(): _$_alloy_js_core0.Children;
4
+ declare function GlobalTypeDefinitions(): import("@alloy-js/core").Children;
6
5
  /**
7
6
  * Generates utilities for detecting terminal color support.
8
7
  */
9
- declare function ArgsUtilities(): _$_alloy_js_core0.Children;
10
- declare function ContextUtilities(): _$_alloy_js_core0.Children;
8
+ declare function ArgsUtilities(): import("@alloy-js/core").Children;
9
+ declare function ContextUtilities(): import("@alloy-js/core").Children;
11
10
  interface StateBuiltinProps extends Omit<BuiltinFileProps, "id" | "description"> {}
12
11
  /**
13
12
  * A built-in module for handling application state utilities in Shell Shock.
14
13
  */
15
- declare function StateBuiltin(props: StateBuiltinProps): _$_alloy_js_core0.Children;
14
+ declare function StateBuiltin(props: StateBuiltinProps): import("@alloy-js/core").Children;
16
15
  //#endregion
17
16
  export { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin, StateBuiltinProps };
18
17
  //# sourceMappingURL=state-builtin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state-builtin.d.mts","names":[],"sources":["../../src/components/state-builtin.tsx"],"mappings":";;;;iBA6CgB,qBAAA,CAAA,GAAqB,iBAAA,CAAA,QAAA;;;AAArC;iBA2FgB,aAAA,CAAA,GAAa,iBAAA,CAAA,QAAA;AAAA,iBAqBb,gBAAA,CAAA,GAAgB,iBAAA,CAAA,QAAA;AAAA,UAiUf,iBAAA,SAA0B,IAAA,CACzC,gBAAA;AAvVF;;;AAAA,iBA8VgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"state-builtin.d.mts","names":[],"sources":["../../src/components/state-builtin.tsx"],"mappings":""}
@@ -3,8 +3,8 @@ import { computedOptions } from "../contexts/options.mjs";
3
3
  import "../plugin-utils/index.mjs";
4
4
  import { OptionsMember, OptionsParserLogic } from "./options-parser-logic.mjs";
5
5
  import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
6
- import defu$1 from "defu";
7
6
  import { For, Show, code, computed, splitProps } from "@alloy-js/core";
7
+ import defu$1 from "defu";
8
8
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
9
9
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
10
10
  import { FunctionDeclaration, InterfaceDeclaration, InterfaceMember, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
@@ -1 +1 @@
1
- {"version":3,"file":"state-builtin.mjs","names":[],"sources":["../../src/components/state-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Show, splitProps } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n InterfaceDeclaration,\n InterfaceMember,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocInternal,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport defu from \"defu\";\nimport { computedOptions } from \"../contexts/options\";\nimport { getAppBin } from \"../plugin-utils\";\nimport { getAppTitle } from \"../plugin-utils/context-helpers\";\nimport type { Context } from \"../types\";\nimport { OptionsMember, OptionsParserLogic } from \"./options-parser-logic\";\n\nexport function GlobalTypeDefinitions() {\n const context = usePowerlines<Context>();\n\n const options = computed(() => computedOptions(context.globalOptions));\n\n return (\n <>\n <TSDoc\n heading={`An object representing the global options available for every command in the ${getAppTitle(\n context,\n true\n )} command-line application.`}\n />\n <InterfaceDeclaration export name=\"GlobalOptions\">\n <For each={Object.values(options.value)} hardline>\n {option => <OptionsMember option={option} />}\n </For>\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"The context object for the current command execution, containing the command path and segments.\" />\n <InterfaceDeclaration\n export\n name=\"CommandContext\"\n typeParameters={[\n {\n name: \"THandler\",\n extends: \"(...params: any[]) => any\",\n default: \"any\"\n }\n ]}>\n <TSDoc\n heading={`The full command path as a string. For example, if the user runs \\`${getAppBin(\n context\n )} foo bar\\`, this would be \\`foo bar\\`. This is useful for commands that need to know their full invocation path, such as for help text or for commands that have dynamic behavior based on their position in the command hierarchy.`}\n />\n <InterfaceMember name=\"path\" type=\"string\" />\n <Spacing />\n <TSDoc\n heading={`An array of command path segments. For example, if the user runs \\`${getAppBin(\n context\n )} foo bar\\`, this would be \\`[\"foo\", \"bar\"]\\`. This is useful for commands that need to know their individual path segments, such as for dynamic routing or for commands that have behavior based on specific segments in the command hierarchy.`}\n />\n <InterfaceMember name=\"segments\" type=\"string[]\" />\n <Spacing />\n <TSDoc\n heading={`The parameters for the current command's handler function.`}\n />\n <InterfaceMember name=\"params\" type=\"Parameters<THandler>\" />\n </InterfaceDeclaration>\n <Spacing />\n <TypeDeclaration export name=\"GlobalContextStatus\">\n {code`\"initializing\" | \"preparing\" | \"executing\" | \"completed\"`}\n </TypeDeclaration>\n <Spacing />\n <TSDoc\n heading={`The state object for the ${getAppTitle(context)} application context.`}\n />\n <InterfaceDeclaration export name=\"GlobalContextState\">\n <TSDoc heading=\"The unique identifier for the current execution context.\" />\n <InterfaceMember name=\"executionId\" type=\"string\" />\n <Spacing />\n <TSDoc heading=\"The status of the current execution context.\" />\n <InterfaceMember name=\"status\" type=\"GlobalContextStatus\" />\n <Spacing />\n <TSDoc heading=\"Indicates whether the current execution context has encountered an error.\" />\n <InterfaceMember name=\"isError\" type=\"boolean\" />\n <Spacing />\n <TSDoc heading=\"A map containing arbitrary data associated with the current execution context.\" />\n <InterfaceMember name=\"meta\" type=\"Map<string, unknown>\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc\n heading={`The context object for the ${getAppTitle(context)} application.`}\n />\n <InterfaceDeclaration export name=\"GlobalContext\">\n <TSDoc heading=\"The global options shared across all commands in the application.\" />\n <InterfaceMember name=\"options\" type=\"GlobalOptions\" />\n <Spacing />\n <TSDoc heading=\"The raw command-line arguments passed to the application.\" />\n <InterfaceMember name=\"inputArgs\" type=\"string[]\" />\n <Spacing />\n <TSDoc heading=\"The state of the current execution context.\" />\n <InterfaceMember name=\"state\" type=\"GlobalContextState\" />\n </InterfaceDeclaration>\n </>\n );\n}\n\n/**\n * Generates utilities for detecting terminal color support.\n */\nexport function ArgsUtilities() {\n return (\n <>\n <TSDoc heading=\"Retrieves the command-line arguments from Deno or Node.js environments.\">\n <TSDocRemarks>\n {`This function is only intended for internal use. Please use \\`useArgs()\\` instead.`}\n </TSDocRemarks>\n <Spacing />\n <TSDocInternal />\n <Spacing />\n <TSDocReturns>\n {`An array of command-line arguments from Deno or Node.js environments.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration name=\"getInputArgs\" returnType=\"string[]\">\n {code`return ((globalThis as { Deno?: { args: string[] } })?.Deno?.args ?? process.argv ?? []) as string[];`}\n </FunctionDeclaration>\n </>\n );\n}\n\nexport function ContextUtilities() {\n const context = usePowerlines<Context>();\n\n const options = computed(() =>\n Object.fromEntries(\n context.globalOptions.map(option => [option.name, option])\n )\n );\n\n return (\n <>\n <Spacing />\n\n <TSDoc\n heading={`The global ${getAppTitle(context)} application context store instance.`}>\n <TSDocInternal />\n </TSDoc>\n <VarDeclaration export const name=\"unstable_globalStore\">\n {code` new AsyncLocalStorage<GlobalContext>({ name: \"globalStore\" }); `}\n </VarDeclaration>\n <Spacing />\n <TSDoc\n heading={`Get the ${getAppTitle(\n context\n )} application context for the current application.`}>\n <TSDocReturns>\n {`The ${getAppTitle(\n context\n )} application context for the current application or undefined if the context is not available.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"useGlobal\" returnType=\"GlobalContext\">\n {code`return unstable_globalStore.getStore() as GlobalContext;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the command-line arguments from the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocReturns>\n {\"An array of command-line arguments from the application context.\"}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"useArgs\" returnType=\"string[]\">\n {code`return useGlobal()?.inputArgs ?? getInputArgs();`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the command-line global options from the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocReturns>\n {\n \"An object containing the global options from the application context.\"\n }\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"useGlobalOptions\"\n returnType=\"GlobalOptions\">\n {code`return useGlobal()?.options ?? {};`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the state of the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocReturns>{\"The state of the application context.\"}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"useState\"\n returnType=\"GlobalContextState\">\n {code`return useGlobal()?.state;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility function to update the state of the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocRemarks>\n {`This function will throw an error if the global context is not available, so it should only be used within a valid context scope, such as within a command handler or within the \\`withGlobal()\\` function.`}\n </TSDocRemarks>\n <Spacing />\n <TSDocParam name=\"update\">\n {`The new state or a function that receives the previous state and returns the new state. This allows for both direct state updates and functional updates based on the previous state.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"setState\"\n parameters={[\n {\n name: \"update\",\n type: \"Partial<GlobalContextState> | ((prev: GlobalContextState) => GlobalContextState)\"\n }\n ]}>\n {code`const prev = useGlobal()?.state;\n if (!prev) {\n throw new Error(\n \\`The ${getAppTitle(\n context\n )} application context is not available. Make sure to call setState() within a valid context scope.\\`\n );\n }\n\n useGlobal().state = typeof update === \"function\" ? update(prev) : { ...prev, ...update }; `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the execution ID of the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocReturns>\n {\"The execution ID of the application context.\"}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"useExecutionId\" returnType=\"string\">\n {code`return useState().executionId;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the metadata of the ${getAppTitle(\n context\n )} application context.`}>\n <TSDocReturns>\n {\"The metadata of the application context.\"}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"useMeta\"\n returnType=\"Map<string, unknown>\">\n {code`return useState().meta;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility hook function to get the current status of the ${getAppTitle(\n context\n )} application.`}>\n <TSDocReturns>{\"The current status of the application.\"}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"useStatus\"\n returnType=\"GlobalContextStatus\">\n {code`return useState().status;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`The global ${getAppTitle(context)} - command context store instance.`}>\n <TSDocInternal />\n </TSDoc>\n <VarDeclaration export name=\"unstable_commandStore\">\n {code`new AsyncLocalStorage<CommandContext>({ name: \"commandStore\" });`}\n </VarDeclaration>\n <Spacing />\n <TSDoc\n heading={`Get the ${getAppTitle(context)} - command context for the current application.`}>\n <TSDocReturns>\n {`The ${getAppTitle(context)} - command context for the current application.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"useCommand\" returnType=\"CommandContext\">\n {code`const result = unstable_commandStore.getStore();\nif (!result) {\n throw new Error(\n \\`The ${getAppTitle(context)} - command context is not available. Make sure to call useCommand() within a valid context scope.\\`\n );\n}\nreturn result;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"A utility hook function to get the individual segments of the current command path.\">\n <TSDocReturns>{\"An array of command path segments.\"}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"useSegments\" returnType=\"string[]\">\n {code`return useCommand().segments;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"A utility hook function to get the full command path as a string.\">\n <TSDocReturns>\n {`The full command path as a string. For example, if the user runs \\`${getAppBin(\n context\n )} foo bar\\`, this would return \\`\"foo bar\"\\`. This is useful for commands that need to know their full invocation path, such as for help text or for commands that have dynamic behavior based on their position in the command hierarchy.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"usePath\" returnType=\"string\">\n {code`return useCommand().path;`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"Checks if a specific flag is present in the command-line arguments.\">\n <TSDocLink>\n {\"https://github.com/sindresorhus/has-flag/blob/main/index.js\"}\n </TSDocLink>\n <TSDocParam name=\"flag\">\n {\n 'The flag (or an array of flags/aliases) to check for, e.g., \"color\", \"no-color\".'\n }\n </TSDocParam>\n <TSDocParam name=\"argv\">\n {\n \"The command-line arguments to check against. Defaults to global Deno args or process args.\"\n }\n </TSDocParam>\n <TSDocReturns>\n {\"True if the flag is present, false otherwise.\"}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"hasFlag\"\n parameters={[\n { name: \"flag\", type: \"string | string[]\" },\n {\n name: \"argv\",\n type: \"string[]\",\n default: \"useArgs()\"\n }\n ]}>\n <VarDeclaration\n const\n name=\"position\"\n type=\"number\"\n initializer={code`(Array.isArray(flag) ? flag : [flag]).reduce((ret, f) => {\n const pos = argv.findIndex(arg => (f.startsWith(\"-\") ? \"\" : (f.length === 1 ? \"-\" : \"--\") + f)?.toLowerCase() === arg?.toLowerCase() || arg?.toLowerCase().startsWith((f.length === 1 ? \"-\" : \"--\") + f + \"=\"));\n return pos !== -1 ? pos : ret;\n }, -1);`}\n />\n <hbr />\n {code`return position !== -1 && argv.indexOf(\"--\") === -1 || position < argv.indexOf(\"--\");`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"A utility function to determine if the help flag is present or if the command is in an error state during preparation.\">\n <TSDocReturns>\n {`True if the help flag is present or if the command is in an error state during preparation, false otherwise. This can be used to conditionally display help text or to alter command behavior when the user is likely seeking help.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration export name=\"isHelp\" returnType=\"boolean\">\n {code`return !isCI && (hasFlag([\"help\", \"h\", \"?\"]) || (useStatus() === \"preparing\" && useState().isError)); `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility function to wrap the ${getAppTitle(\n context\n )} application within the global context scope.`}>\n <TSDocParam name=\"handler\">\n {`The callback function to run within the global context scope. This function will receive the global context as its argument, allowing it to access any properties or utilities defined on the context. The callback function can be asynchronous and can return a value or a promise.`}\n </TSDocParam>\n <TSDocReturns>\n {`The result of the callback function, which can be a value or a promise that resolves to a value.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"withGlobal\"\n parameters={[{ name: \"handler\", type: \"() => any\" }]}\n returnType=\"Promise<void>\">\n <VarDeclaration\n const\n name=\"args\"\n initializer={code`getInputArgs(); `}\n />\n <Spacing />\n <OptionsParserLogic\n options={options.value}\n appSpecificEnvPrefix={context.config.appSpecificEnvPrefix}\n isCaseSensitive={context.config.isCaseSensitive}\n />\n <Spacing />\n {code`\n return unstable_globalStore.run({ options, inputArgs: args, state: { executionId: randomUUID(), status: \"initializing\", isError: false, meta: new Map() } as GlobalContextState }, handler);`}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc\n heading={`A utility function to wrap a ${getAppTitle(\n context\n )} application command handler within the command context scope.`}>\n <TSDocParam name=\"handler\">\n {`The callback function to run within the command context scope. This function will receive the command context as its argument, allowing it to access any properties or utilities defined on the context. The callback function can be asynchronous and can return a value or a promise.`}\n </TSDocParam>\n <TSDocReturns>\n {`The result of the callback function, which can be a value or a promise that resolves to a value.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"withCommand\"\n typeParameters={[\n {\n name: \"THandler\",\n extends: \"(this: CommandContext, ...params: any[]) => any\",\n default: \"(this: CommandContext, ...params: any[]) => any\"\n }\n ]}\n parameters={[\n { name: \"path\", type: \"string\" },\n { name: \"segments\", type: \"string[]\" },\n { name: \"params\", type: \"Parameters<THandler>\" },\n { name: \"handler\", type: \"THandler\" }\n ]}\n returnType=\"Promise<{ error: string | Error | null }>\">\n {code`setState({ status: \"preparing\", isError: false });\n\n const ctx = { path, segments, params } as CommandContext<THandler>;\n const result = await Promise.resolve(unstable_commandStore.run(ctx, () => Reflect.apply(handler, ctx, params)));\n if (result instanceof Error || (typeof result === \"object\" && ((result as { error: unknown }).error instanceof Error || typeof (result as { error: unknown }).error === \"string\"))) {\n setState({ status: \"completed\", isError: true });\n return { error: result instanceof Error ? result : (result as { error: Error | string }).error };\n }\n\n setState({ status: \"completed\", isError: false });\n return { error: null }; `}\n </FunctionDeclaration>\n </>\n );\n}\n\nexport interface StateBuiltinProps extends Omit<\n BuiltinFileProps,\n \"id\" | \"description\"\n> {}\n\n/**\n * A built-in module for handling application state utilities in Shell Shock.\n */\nexport function StateBuiltin(props: StateBuiltinProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <BuiltinFile\n id=\"state\"\n description=\"A module that provides context hooks and utilities for accessing the application state.\"\n {...rest}\n imports={defu(rest.imports ?? {}, {\n \"node:async_hooks\": [\"AsyncLocalStorage\"],\n \"node:crypto\": [\"randomUUID\"]\n })}\n builtinImports={defu(rest.builtinImports ?? {}, {\n env: [\"isCI\", \"env\"]\n })}>\n <GlobalTypeDefinitions />\n <Spacing />\n <ArgsUtilities />\n <Spacing />\n <ContextUtilities />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,UAAU;CAAC;CAAG;CAAM;CAAS;CAAQ;;;;;;;AAE3C,SAAM,aAAS,IAAW,MAAM;AAC/B,IAAG,SAAU;AACb,QAAQ;;AA8BT,SAAE,wBAAA;CACA,MAAM,WAAW,cAAc,IAAA,CAAA,CAAA,WAAW,OAAW,CAAA,EAAA,eAAM;CAC7D,MAAO,UAAW,eAAK,gBAAA,QAAA,cAAA,CAAA;AACvB,QAAS;EAAA,gBAAkB,OAAQ,EACnC,IAAQ,UAAU;AACZ,UAAG,gFAAoD,YAAA,SAAA,KAAA,CAAA;KAE7D,CAAA;EAAM,gBAAkB,sBAAqB;;GAE7C,MAAO;GACL,IAAM,WAAU;;KAEV,IAAA,OAAU;;;KAGb,UAAA;KACE,IAAA,WAAA;AACC,aAAS,cAAW,WAAY,gBAAY,eAAqB,EACxD,QACP,CAAA,EAAA;OAAA;OAAA;OAAA;OAAA,CAAA;;KAEH,CAAA;;GAEJ,CAAC;EAAE,gBAAa,SAAc,EAAA,CAAA;EAAA,gBAAgB,OAAQ,EACrD,SAAO,mGACR,CAAC;EAAE,gBAAO,sBAAA;GACT,UAAI;GACJ,MAAG;GACH,gBAAgB,CAAC;IACf,MAAC;IACD,SAAE;IACF,SAAQ;IACT,CAAC;GACF,IAAI,WAAE;AACJ,WAAM;KAAA,gBAAgB,OAAA,EACpB,IAAI,UAAU;AACZ,aAAE,sEAAa,UAAA,QAAA,CAAA;QAElB,CAAC;KAAE,gBAAA,iBAAA;MACF,MAAC;MACD,MAAE;MACH,CAAC;KAAE,gBAAE,SAAA,EAAA,CAAA;KAAA,gBAAA,OAAA,EACJ,IAAI,UAAU;AACb,aAAA,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