@shell-shock/core 0.12.2 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
  2. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  3. package/dist/api.cjs +3 -2
  4. package/dist/api.cjs.map +1 -1
  5. package/dist/api.d.cts +0 -1
  6. package/dist/api.d.cts.map +1 -1
  7. package/dist/api.d.mts +0 -1
  8. package/dist/api.d.mts.map +1 -1
  9. package/dist/api.mjs +1 -1
  10. package/dist/api.mjs.map +1 -1
  11. package/dist/components/command-validation-logic.cjs +54 -53
  12. package/dist/components/command-validation-logic.cjs.map +1 -1
  13. package/dist/components/command-validation-logic.d.cts +2 -3
  14. package/dist/components/command-validation-logic.d.cts.map +1 -1
  15. package/dist/components/command-validation-logic.d.mts +2 -3
  16. package/dist/components/command-validation-logic.d.mts.map +1 -1
  17. package/dist/components/command-validation-logic.mjs +1 -1
  18. package/dist/components/command-validation-logic.mjs.map +1 -1
  19. package/dist/components/docs.cjs +45 -44
  20. package/dist/components/docs.cjs.map +1 -1
  21. package/dist/components/docs.d.cts +5 -5
  22. package/dist/components/docs.d.cts.map +1 -1
  23. package/dist/components/docs.d.mts +5 -5
  24. package/dist/components/docs.d.mts.map +1 -1
  25. package/dist/components/docs.mjs.map +1 -1
  26. package/dist/components/helpers.cjs +16 -15
  27. package/dist/components/helpers.cjs.map +1 -1
  28. package/dist/components/helpers.d.cts +7 -8
  29. package/dist/components/helpers.d.cts.map +1 -1
  30. package/dist/components/helpers.d.mts +7 -8
  31. package/dist/components/helpers.d.mts.map +1 -1
  32. package/dist/components/helpers.mjs.map +1 -1
  33. package/dist/components/index.cjs +1 -0
  34. package/dist/components/options-parser-logic.cjs +187 -186
  35. package/dist/components/options-parser-logic.cjs.map +1 -1
  36. package/dist/components/options-parser-logic.d.cts +9 -9
  37. package/dist/components/options-parser-logic.d.cts.map +1 -1
  38. package/dist/components/options-parser-logic.d.mts +9 -9
  39. package/dist/components/options-parser-logic.d.mts.map +1 -1
  40. package/dist/components/options-parser-logic.mjs.map +1 -1
  41. package/dist/components/usage.cjs +21 -20
  42. package/dist/components/usage.cjs.map +1 -1
  43. package/dist/components/usage.d.cts +2 -2
  44. package/dist/components/usage.d.cts.map +1 -1
  45. package/dist/components/usage.d.mts.map +1 -1
  46. package/dist/components/usage.mjs.map +1 -1
  47. package/dist/components/utils-builtin.cjs +128 -127
  48. package/dist/components/utils-builtin.cjs.map +1 -1
  49. package/dist/components/utils-builtin.d.cts.map +1 -1
  50. package/dist/components/utils-builtin.d.mts.map +1 -1
  51. package/dist/components/utils-builtin.mjs +4 -4
  52. package/dist/components/utils-builtin.mjs.map +1 -1
  53. package/dist/config.cjs +1 -0
  54. package/dist/config.cjs.map +1 -1
  55. package/dist/config.d.cts +0 -1
  56. package/dist/config.d.cts.map +1 -1
  57. package/dist/config.d.mts +0 -1
  58. package/dist/config.d.mts.map +1 -1
  59. package/dist/config.mjs.map +1 -1
  60. package/dist/contexts/command.cjs +5 -4
  61. package/dist/contexts/command.cjs.map +1 -1
  62. package/dist/contexts/command.d.cts +0 -1
  63. package/dist/contexts/command.d.cts.map +1 -1
  64. package/dist/contexts/command.d.mts +0 -1
  65. package/dist/contexts/command.d.mts.map +1 -1
  66. package/dist/contexts/index.cjs +1 -0
  67. package/dist/contexts/options.cjs +12 -11
  68. package/dist/contexts/options.cjs.map +1 -1
  69. package/dist/contexts/options.d.cts +0 -1
  70. package/dist/contexts/options.d.cts.map +1 -1
  71. package/dist/contexts/options.d.mts +0 -1
  72. package/dist/contexts/options.d.mts.map +1 -1
  73. package/dist/contexts/options.mjs +3 -3
  74. package/dist/contexts/options.mjs.map +1 -1
  75. package/dist/helpers/automd.cjs +16 -16
  76. package/dist/helpers/automd.cjs.map +1 -1
  77. package/dist/helpers/automd.mjs.map +1 -1
  78. package/dist/helpers/docs-helpers.cjs +3 -3
  79. package/dist/helpers/docs-helpers.cjs.map +1 -1
  80. package/dist/helpers/docs-helpers.mjs.map +1 -1
  81. package/dist/helpers/paths.cjs +26 -26
  82. package/dist/helpers/paths.cjs.map +1 -1
  83. package/dist/helpers/paths.mjs +1 -1
  84. package/dist/helpers/paths.mjs.map +1 -1
  85. package/dist/helpers/persistence.cjs +3 -3
  86. package/dist/helpers/persistence.cjs.map +1 -1
  87. package/dist/helpers/persistence.mjs.map +1 -1
  88. package/dist/helpers/update-package-json.cjs +16 -16
  89. package/dist/helpers/update-package-json.cjs.map +1 -1
  90. package/dist/helpers/update-package-json.mjs.map +1 -1
  91. package/dist/helpers/utilities.cjs +9 -9
  92. package/dist/helpers/utilities.cjs.map +1 -1
  93. package/dist/helpers/utilities.mjs.map +1 -1
  94. package/dist/helpers/validations.cjs.map +1 -1
  95. package/dist/helpers/validations.mjs.map +1 -1
  96. package/dist/index.cjs +1 -1
  97. package/dist/index.d.cts +0 -1
  98. package/dist/index.d.mts +0 -1
  99. package/dist/plugin-utils/context-helpers.cjs +10 -10
  100. package/dist/plugin-utils/context-helpers.cjs.map +1 -1
  101. package/dist/plugin-utils/context-helpers.d.cts +0 -3
  102. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  103. package/dist/plugin-utils/context-helpers.d.mts +0 -3
  104. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  105. package/dist/plugin-utils/context-helpers.mjs +1 -1
  106. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  107. package/dist/plugin-utils/deepkit.cjs +18 -18
  108. package/dist/plugin-utils/deepkit.cjs.map +1 -1
  109. package/dist/plugin-utils/deepkit.d.cts +0 -1
  110. package/dist/plugin-utils/deepkit.d.cts.map +1 -1
  111. package/dist/plugin-utils/deepkit.d.mts +0 -1
  112. package/dist/plugin-utils/deepkit.d.mts.map +1 -1
  113. package/dist/plugin-utils/deepkit.mjs.map +1 -1
  114. package/dist/plugin-utils/description-helpers.cjs.map +1 -1
  115. package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
  116. package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
  117. package/dist/plugin-utils/description-helpers.mjs.map +1 -1
  118. package/dist/plugin-utils/get-command-tree.cjs.map +1 -1
  119. package/dist/plugin-utils/get-command-tree.d.cts +0 -1
  120. package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
  121. package/dist/plugin-utils/get-command-tree.d.mts +0 -1
  122. package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
  123. package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
  124. package/dist/plugin-utils/index.cjs +1 -0
  125. package/dist/plugin-utils/reflect.cjs.map +1 -1
  126. package/dist/plugin-utils/reflect.d.cts +0 -1
  127. package/dist/plugin-utils/reflect.d.cts.map +1 -1
  128. package/dist/plugin-utils/reflect.d.mts +0 -1
  129. package/dist/plugin-utils/reflect.d.mts.map +1 -1
  130. package/dist/plugin-utils/reflect.mjs.map +1 -1
  131. package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -1
  132. package/dist/plugin-utils/traverse-command-tree.d.cts +0 -1
  133. package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
  134. package/dist/plugin-utils/traverse-command-tree.d.mts +0 -1
  135. package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
  136. package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
  137. package/dist/plugin-utils/type-checks.cjs +7 -7
  138. package/dist/plugin-utils/type-checks.cjs.map +1 -1
  139. package/dist/plugin-utils/type-checks.d.cts +0 -1
  140. package/dist/plugin-utils/type-checks.d.cts.map +1 -1
  141. package/dist/plugin-utils/type-checks.d.mts +0 -1
  142. package/dist/plugin-utils/type-checks.d.mts.map +1 -1
  143. package/dist/plugin-utils/type-checks.mjs +1 -1
  144. package/dist/plugin-utils/type-checks.mjs.map +1 -1
  145. package/dist/plugin.cjs +68 -75
  146. package/dist/plugin.cjs.map +1 -1
  147. package/dist/plugin.d.cts +0 -1
  148. package/dist/plugin.d.cts.map +1 -1
  149. package/dist/plugin.d.mts +0 -1
  150. package/dist/plugin.d.mts.map +1 -1
  151. package/dist/plugin.mjs +23 -30
  152. package/dist/plugin.mjs.map +1 -1
  153. package/dist/resolver/deepkit.cjs +29 -29
  154. package/dist/resolver/deepkit.cjs.map +1 -1
  155. package/dist/resolver/deepkit.mjs.map +1 -1
  156. package/dist/resolver/helpers.cjs +17 -17
  157. package/dist/resolver/helpers.cjs.map +1 -1
  158. package/dist/resolver/helpers.mjs.map +1 -1
  159. package/dist/resolver/module.cjs +29 -29
  160. package/dist/resolver/module.cjs.map +1 -1
  161. package/dist/resolver/module.mjs +1 -1
  162. package/dist/resolver/module.mjs.map +1 -1
  163. package/dist/resolver/resolve.cjs +17 -17
  164. package/dist/resolver/resolve.cjs.map +1 -1
  165. package/dist/resolver/resolve.mjs +3 -3
  166. package/dist/resolver/resolve.mjs.map +1 -1
  167. package/dist/types/command.cjs +1 -0
  168. package/dist/types/command.cjs.map +1 -1
  169. package/dist/types/command.d.cts.map +1 -1
  170. package/dist/types/command.d.mts.map +1 -1
  171. package/dist/types/command.mjs.map +1 -1
  172. package/dist/types/config.cjs +1 -0
  173. package/dist/types/config.cjs.map +1 -1
  174. package/dist/types/config.d.cts.map +1 -1
  175. package/dist/types/config.d.mts.map +1 -1
  176. package/dist/types/config.mjs.map +1 -1
  177. package/dist/types/context.cjs +1 -0
  178. package/dist/types/context.cjs.map +1 -1
  179. package/dist/types/context.d.cts.map +1 -1
  180. package/dist/types/context.d.mts.map +1 -1
  181. package/dist/types/env.cjs +1 -0
  182. package/dist/types/env.d.cts.map +1 -1
  183. package/dist/types/env.d.mts.map +1 -1
  184. package/dist/types/index.cjs +1 -0
  185. package/dist/types/options.cjs +1 -0
  186. package/dist/types/options.d.cts.map +1 -1
  187. package/dist/types/options.d.mts.map +1 -1
  188. package/dist/types/runtime.cjs +1 -0
  189. package/dist/types/runtime.d.cts.map +1 -1
  190. package/dist/types/runtime.d.mts.map +1 -1
  191. package/package.json +23 -23
@@ -1,6 +1,5 @@
1
1
  import { CommandParameter } from "../types/command.mjs";
2
- import "../types/index.mjs";
3
- import * as _alloy_js_core8 from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
4
3
 
5
4
  //#region src/components/helpers.d.ts
6
5
  interface BooleanInputParserLogicProps {
@@ -9,35 +8,35 @@ interface BooleanInputParserLogicProps {
9
8
  /**
10
9
  * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.
11
10
  */
12
- declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps): _alloy_js_core8.Children;
11
+ declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps): _alloy_js_core0.Children;
13
12
  /**
14
13
  * Write the logic to determine if the application is running in debug mode.
15
14
  *
16
15
  * @remarks
17
16
  * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
18
17
  */
19
- declare function IsDebug(): _alloy_js_core8.Children;
18
+ declare function IsDebug(): _alloy_js_core0.Children;
20
19
  /**
21
20
  * Write the logic to determine if the application is **not** running in debug mode.
22
21
  */
23
- declare function IsNotDebug(): _alloy_js_core8.Children;
22
+ declare function IsNotDebug(): _alloy_js_core0.Children;
24
23
  /**
25
24
  * Write the logic to determine if the application is running in verbose mode.
26
25
  *
27
26
  * @remarks
28
27
  * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
29
28
  */
30
- declare function IsVerbose(): _alloy_js_core8.Children;
29
+ declare function IsVerbose(): _alloy_js_core0.Children;
31
30
  /**
32
31
  * Write the logic to determine if the application is **not** running in verbose mode.
33
32
  */
34
- declare function IsNotVerbose(): _alloy_js_core8.Children;
33
+ declare function IsNotVerbose(): _alloy_js_core0.Children;
35
34
  /**
36
35
  * Write the type declaration for a command parameter based on its configuration.
37
36
  */
38
37
  declare function CommandParameterType(props: {
39
38
  parameter: CommandParameter;
40
- }): _alloy_js_core8.Children;
39
+ }): _alloy_js_core0.Children;
41
40
  //#endregion
42
41
  export { BooleanInputParserLogic, BooleanInputParserLogicProps, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose };
43
42
  //# sourceMappingURL=helpers.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":[],"mappings":";;;;;UAsBiB,4BAAA;;;;AAAjB;AAOA;AA0BgB,iBA1BA,uBAAA,CA0BO,KAAA,EA1BwB,4BA0BxB,CAAA,EA1BoD,eAAA,CAAA,QA0BpD;AAOvB;AAgBA;AAaA;AAaA;;;iBAjDgB,OAAA,CAAA,GAAO,eAAA,CAAA;;;;iBAOP,UAAA,CAAA,GAAU,eAAA,CAAA;;;;;;;iBAgBV,SAAA,CAAA,GAAS,eAAA,CAAA;;;;iBAaT,YAAA,CAAA,GAAY,eAAA,CAAA;;;;iBAaZ,oBAAA;aAAyC;IAAgB,eAAA,CAAE"}
1
+ {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/components/helpers.tsx"],"mappings":";;;;UAsBiB,4BAAA;EACf,IAAA;AAAA;;AADF;;iBAOgB,uBAAA,CAAwB,KAAA,EAAO,4BAAA,GAA4B,eAAA,CAAA,QAAA;;;AAA3E;;;;iBA0BgB,OAAA,CAAA,GAAO,eAAA,CAAA,QAAA;;;;iBAOP,UAAA,CAAA,GAAU,eAAA,CAAA,QAAA;AAP1B;;;;;AAOA;AAPA,iBAuBgB,SAAA,CAAA,GAAS,eAAA,CAAA,QAAA;;;;iBAaT,YAAA,CAAA,GAAY,eAAA,CAAA,QAAA;;;;iBAaZ,oBAAA,CAAqB,KAAA;EAAS,SAAA,EAAW,gBAAA;AAAA,IAAgB,eAAA,CAAE,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.mjs","names":["code","CommandParameterKinds","BooleanInputParserLogic","props","name","IsDebug","IsNotDebug","_$createComponent","IsVerbose","IsNotVerbose","CommandParameterType","parameter","kind","string","number","choices","length","map","choice","join","boolean","variadic","optional"],"sources":["../../src/components/helpers.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 } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.variadic\n ? \"[]\"\n : \"\"\n }${parameter.optional ? \" | undefined\" : \"\"}`;\n}\n"],"mappings":";;;;;;;;AA6BA,SAAgBE,wBAAwBC,OAAqC;CAC3E,MAAM,EAAEC,SAASD;AAEjB,QAAA,CACKH,IAAI,MAAMI,KAAI,MAAOA,KAAI,gCAC1BA,KAAI,4BACuBA,KAAI,6BAC/BA,KAAI,cACSA,KAAI,4BACjBA,KAAI,8BAEJA,KAAI,oBACeA,KAAI,mCACvBA,KAAI,gEAEJA,KAAI,0BACqBA,KAAI,SAAS;;;;;;;;AAU5C,SAAgBC,UAAU;AACxB,QAAOL,IAAI;;;;;AAMb,SAAgBM,aAAa;AAC3B,QAAA;EAEKN,IAAI;EAAIO,gBACRF,SAAO,EAAA,CAAA;EACPL,IAAI;EAAG;;;;;;;;AAWd,SAAgBQ,YAAY;AAC1B,QAAA;EAEKR,IAAI;EAAIO,gBACRF,SAAO,EAAA,CAAA;EACPL,IAAI;EAA4D;;;;;AAQvE,SAAgBS,eAAe;AAC7B,QAAA;EAEKT,IAAI;EAAIO,gBACRC,WAAS,EAAA,CAAA;EACTR,IAAI;EAAG;;;;;AAQd,SAAgBU,qBAAqBP,OAAwC;CAC3E,MAAM,EAAEQ,cAAcR;AAEtB,QAAOH,IAAI,IACRW,UAAUC,SAASX,sBAAsBY,UACxCF,UAAUC,SAASX,sBAAsBa,WAC3CH,UAAUI,WACVJ,UAAUI,QAAQC,SAAS,IACvBL,UAAUI,QACPE,KAAIC,WAAW,OAAOA,WAAW,WAAW,IAAIA,OAAM,KAAMA,OAAQ,CACpEC,KAAK,MAAM,GACdR,UAAUC,SAASX,sBAAsBmB,UACvC,YACAT,UAAUC,SAASX,sBAAsBa,SACvC,WACA,YAEPH,UAAUC,SAASX,sBAAsBY,UACxCF,UAAUC,SAASX,sBAAsBa,WAC3CH,UAAUU,WACN,OACA,KACHV,UAAUW,WAAW,iBAAiB"}
1
+ {"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/components/helpers.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 } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.variadic\n ? \"[]\"\n : \"\"\n }${parameter.optional ? \" | undefined\" : \"\"}`;\n}\n"],"mappings":";;;;;;;;AA6BA,SAAgB,wBAAwB,OAAqC;CAC3E,MAAM,WAEN;AACA,QAAK,CAAA,IAAO,MAAG,KAAQ,MAAG,KAAM,gCAA8B,KAAA,4BAAA,KAAA,6BAAA,KAAA,cAAA,KAAA,4BAAA,KAAA,8BAAA,KAAA,oBAAA,KAAA,mCAAA,KAAA,gEAAA,KAAA,0BAAA,KAAA,SAAA;;;;;;;;AAShE,SAAM,UAAA;AACJ,QAAI,IAAA;;;;;AAMN,SAAE,aAAA;AACA,QAAO;EAAA,IAAI;EAAM,gBAAmB,SAAC,EAAA,CAAW;EAAC,IAAG;EAAA;;;;;;;;AAStD,SAAE,YAAA;AACA,QAAO;EAAA,IAAI;EAAM,gBAAmB,SAAC,EAAA,CAAW;EAAC,IAAK;EAA2B;;;;;AAMnF,SAAgB,eAAA;AACd,QAAK;EAAA,IAAO;EAAA,gBAAA,WAAA,EAAA,CAAA;EAAA,IAAA;EAAA;;;;;AAMd,SAAa,qBAAsB,OAEhC;CACD,MAAM,EACN,cACI;AACJ,QAAO,IAAA,IAAA,UAAA,SAAA,sBAAA,UAAA,UAAA,SAAA,sBAAA,WAAA,UAAA,WAAA,UAAA,QAAA,SAAA,IAAA,UAAA,QAAA,KAAA,WAAA,OAAA,WAAA,WAAA,IAAA,OAAA,KAAA,OAAA,CAAA,KAAA,MAAA,GAAA,UAAA,SAAA,sBAAA,UAAA,YAAA,UAAA,SAAA,sBAAA,SAAA,WAAA,YAAA,UAAA,SAAA,sBAAA,UAAA,UAAA,SAAA,sBAAA,WAAA,UAAA,WAAA,OAAA,KAAA,UAAA,WAAA,iBAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_components_usage = require('./usage.cjs');
2
3
  const require_components_docs = require('./docs.cjs');
3
4
  const require_components_utils_builtin = require('./utils-builtin.cjs');