@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 +1 @@
1
- {"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"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 { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Context, UnresolvedContext } from \"../types\";\n\n/**\n * Sorts command argument aliases, placing single-character aliases first, followed by multi-character aliases, and then sorting them alphabetically.\n *\n * @param aliases - An array of argument aliases to sort.\n * @returns A new array of sorted aliases.\n */\nexport function sortArgAliases(aliases: string[]): string[] {\n if (aliases.length === 0) {\n return [];\n }\n\n const result = aliases.filter(alias => alias.length === 1);\n result.push(...aliases.filter(alias => alias.length > 1));\n\n return result.sort((a, b) => a.localeCompare(b));\n}\n\n/**\n * Retrieves the application name from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The application name in kebab-case format.\n * @throws An error if no valid application name is found.\n */\nexport function getAppName(context: UnresolvedContext | Context): string {\n const result =\n context.config.name ||\n (isSetString(context.config.bin) ||\n (Array.isArray(context.config.bin) &&\n context.config.bin.length > 0 &&\n isSetString(context.config.bin[0]))\n ? isSetString(context.config.bin)\n ? context.config.bin\n : context.config.bin[0]\n : context.packageJson?.name);\n if (!isSetString(result)) {\n throw new Error(\n \"No application name found. Please provide a 'bin' option in the configuration or ensure the package.json has a valid 'name' field.\"\n );\n }\n\n return kebabCase(result);\n}\n\n/**\n * Retrieves the application title from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @param replaceCLI - Whether to replace CLI-related terms in the title with the application name.\n * @returns The application title in title-case format.\n */\nexport function getAppTitle(\n context: UnresolvedContext | Context,\n replaceCLI = false\n): string {\n const title =\n context.config.title ||\n titleCase(context.config.name || getAppName(context));\n\n return (\n replaceCLI\n ? title.replace(\n /(?:cli|command-line|command line)\\s*(?:interface\\s*)?(?:application|app)?$/gi,\n \"\"\n )\n : title\n ).trim();\n}\n\n/**\n * Retrieves the application description from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The application description.\n */\nexport function getAppDescription(\n context: UnresolvedContext | Context\n): string {\n return (\n context.config.description ||\n context.packageJson?.description ||\n `The ${getAppTitle(context, true)} command-line interface application.`\n );\n}\n\n/**\n * Retrieves the primary binary name for the application.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The primary binary name as a string.\n */\nexport function getAppBin(context: Context): string {\n return isSetObject(context.config.bin)\n ? Object.keys(context.config.bin)[0]!\n : kebabCase(getAppName(context));\n}\n\n/**\n * Determines if a given command path segment is variable (enclosed in square brackets).\n *\n * @example\n * ```typescript\n * isDynamicPathSegment(\"[user]\"); // true\n * isDynamicPathSegment(\"user\"); // false\n * ```\n *\n * @param path - The command path segment to check.\n * @returns True if the path is variable, false otherwise.\n */\nexport function isDynamicPathSegment(path: string): boolean {\n return path.startsWith(\"[\") && path.endsWith(\"]\");\n}\n\n/**\n * Extracts the variable name from a command path segment by removing enclosing square brackets.\n *\n * @example\n * ```typescript\n * getDynamicPathSegmentName(\"[user]\"); // \"user\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The variable name without square brackets.\n */\nexport function getDynamicPathSegmentName(path: string): string {\n return path.replaceAll(/^\\[+/g, \"\").replaceAll(/\\]+$/g, \"\");\n}\n\n/**\n * Determines if a given command path segment is a path segment group (enclosed in parentheses).\n *\n * @example\n * ```typescript\n * isPathSegmentGroup(\"(user)\"); // true\n * isPathSegmentGroup(\"[user]\"); // false\n * isPathSegmentGroup(\"user\"); // false\n * ```\n *\n * @param path - The command path segment to check.\n * @returns True if the path is a path segment group, false otherwise.\n */\nexport function isPathSegmentGroup(path: string): boolean {\n return (path.startsWith(\"(\") && path.endsWith(\")\")) || path.startsWith(\"_\");\n}\n\n/**\n * Extracts the group name from a command path segment by removing enclosing parentheses.\n *\n * @example\n * ```typescript\n * getPathSegmentGroupName(\"(admin)\"); // \"admin\"\n * getPathSegmentGroupName(\"((group))\"); // \"group\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The group name without parentheses.\n */\nexport function getPathSegmentGroupName(path: string): string {\n return path\n .replaceAll(/^\\(+/g, \"\")\n .replaceAll(/\\)+$/g, \"\")\n .replaceAll(/^_+/g, \"\");\n}\n\n/**\n * Extracts the variable name from a command path segment by removing enclosing square brackets.\n *\n * @example\n * ```typescript\n * getDynamicPathSegmentName(\"[user]\"); // \"user\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The variable name without square brackets.\n */\nexport function getPathSegmentName(path: string): string {\n return getPathSegmentGroupName(getDynamicPathSegmentName(path));\n}\n"],"mappings":";;;;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AA6BX,SAAgB,eAAY,SAAA;AACxB,KAAI,QAAK,WAAA,EACX,QAAA,EAAA;CAEE,MAAM,SAAS,QAAQ,OAAO,cAAa,UAAS,MAAI,WAAA,GAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;AACxD,QAAO,KAAK,GAAG,QAAQ,OAAO,cAAa,UAAS,MAAG,SAAA,GAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA,CAAA;;;;;;;;AAG3D,eAAA,SAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQA,SAAE,WAAA,SAAA;CACE,MAAM,SAAS,QAAQ,OAAO,SACzB,YAAM,QAAA,OAAA,IAAA,IACF,MAAM,QAAM,QAAA,OAAA,IAAA,IACT,QAAQ,OAAO,IAAI,SAAG,KACtB,YAAY,QAAQ,OAAI,IAAA,GAAA,GAC1B,YAAY,QAAQ,OAAG,IAAA,GACnB,QAAQ,OAAO,MACf,QAAQ,OAAO,IAAI,KACvB,QAAQ,aAAK;AACvB,KAAI,CAAC,YAAY,OAAO,CACpB,OAAM,IAAI,MAAM,qIAAU;AAE9B,QAAO,UAAQ,OAAA;;AAEnB,WAAK,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQL,SAAC,YAAA,SAAA,aAAA,OAAA;CACG,MAAM,QAAQ,QAAQ,OAAO,SACzB,UAAU,QAAQ,OAAO,QAAQ,WAAW,QAAQ,CAAC;AACzD,SAAQ,aACV,MAAA,QAAA,gFAAA,GAAA,GACQ,OAAO,MAAM;;AAEvB,YAAY,SAAO;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOnB,SAAa,kBAAA,SAAA;AACT,QAAQ,QAAQ,OAAC,eACb,QAAQ,aAAa,eACrB,OAAG,YAAA,SAAA,KAAA,CAAA;;AAEX,kBAAY,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOZ,SAAgB,UAAU,SAAS;AAC/B,QAAO,YAAY,QAAQ,OAAO,IAAC,GACrC,OAAA,KAAA,QAAA,OAAA,IAAA,CAAA,KACQ,UAAU,WAAW,QAAE,CAAA;;AAEjC,UAAU,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;AAaV,SAAE,qBAAA,MAAA;AACE,QAAO,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAG;;AAEpD,qBAAqB,SAAS;CAAC;CAAQ;CAAC;CAAA;;;;;;;;;;;;AAYxC,SAAC,0BAAA,MAAA;AACG,QAAO,KAAK,WAAW,SAAS,GAAG,CAAC,WAAU,SAAA,GAAA;;AAElD,0BAAE,SAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;;AAcF,SAAgB,mBAAmB,MAAM;AACvC,QAAA,KAAA,WAAA,IAAA,IAAA,KAAA,SAAA,IAAA,IAAA,KAAA,WAAA,IAAA;;AAEF,mBAAmB,SAAS;CAAC;CAAQ;CAAsB;CAAE;;;;;;;;;;;;;AAa7D,SAAgB,wBAAwB,MAAM;AAC1C,QAAO,KACT,WAAA,SAAA,GAAA,CACO,WAAW,SAAS,GAAG,CACvB,WAAW,QAAQ,GAAG;;;;;;;;;;;;;;;;;;AAc/B,SAAE,mBAAA,MAAA;AACE,QAAO,wBAAwB,0BAA0B,KAAC,CAAA;;AAE9D,mBAAmB,SAAQ;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"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 { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Context, UnresolvedContext } from \"../types\";\n\n/**\n * Sorts command argument aliases, placing single-character aliases first, followed by multi-character aliases, and then sorting them alphabetically.\n *\n * @param aliases - An array of argument aliases to sort.\n * @returns A new array of sorted aliases.\n */\nexport function sortArgAliases(aliases: string[]): string[] {\n if (aliases.length === 0) {\n return [];\n }\n\n const result = aliases.filter(alias => alias.length === 1);\n result.push(...aliases.filter(alias => alias.length > 1));\n\n return result.sort((a, b) => a.localeCompare(b));\n}\n\n/**\n * Retrieves the application name from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The application name in kebab-case format.\n * @throws An error if no valid application name is found.\n */\nexport function getAppName(context: UnresolvedContext | Context): string {\n const result =\n context.config.name ||\n (isSetString(context.config.bin) ||\n (Array.isArray(context.config.bin) &&\n context.config.bin.length > 0 &&\n isSetString(context.config.bin[0]))\n ? isSetString(context.config.bin)\n ? context.config.bin\n : context.config.bin[0]\n : context.packageJson?.name);\n if (!isSetString(result)) {\n throw new Error(\n \"No application name found. Please provide a 'bin' option in the configuration or ensure the package.json has a valid 'name' field.\"\n );\n }\n\n return kebabCase(result);\n}\n\n/**\n * Retrieves the application title from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @param replaceCLI - Whether to replace CLI-related terms in the title with the application name.\n * @returns The application title in title-case format.\n */\nexport function getAppTitle(\n context: UnresolvedContext | Context,\n replaceCLI = false\n): string {\n const title =\n context.config.title ||\n titleCase(context.config.name || getAppName(context));\n\n return (\n replaceCLI\n ? title.replace(\n /(?:cli|command-line|command line)\\s*(?:interface\\s*)?(?:application|app)?$/gi,\n \"\"\n )\n : title\n ).trim();\n}\n\n/**\n * Retrieves the application description from the context and configuration.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The application description.\n */\nexport function getAppDescription(\n context: UnresolvedContext | Context\n): string {\n return (\n context.config.description ||\n context.packageJson?.description ||\n `The ${getAppTitle(context, true)} command-line interface application.`\n );\n}\n\n/**\n * Retrieves the primary binary name for the application.\n *\n * @param context - The build context containing workspace and package information.\n * @returns The primary binary name as a string.\n */\nexport function getAppBin(context: Context): string {\n return isSetObject(context.config.bin)\n ? Object.keys(context.config.bin)[0]!\n : kebabCase(getAppName(context));\n}\n\n/**\n * Determines if a given command path segment is variable (enclosed in square brackets).\n *\n * @example\n * ```typescript\n * isDynamicPathSegment(\"[user]\"); // true\n * isDynamicPathSegment(\"user\"); // false\n * ```\n *\n * @param path - The command path segment to check.\n * @returns True if the path is variable, false otherwise.\n */\nexport function isDynamicPathSegment(path: string): boolean {\n return path.startsWith(\"[\") && path.endsWith(\"]\");\n}\n\n/**\n * Extracts the variable name from a command path segment by removing enclosing square brackets.\n *\n * @example\n * ```typescript\n * getDynamicPathSegmentName(\"[user]\"); // \"user\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The variable name without square brackets.\n */\nexport function getDynamicPathSegmentName(path: string): string {\n return path.replaceAll(/^\\[+/g, \"\").replaceAll(/\\]+$/g, \"\");\n}\n\n/**\n * Determines if a given command path segment is a path segment group (enclosed in parentheses).\n *\n * @example\n * ```typescript\n * isPathSegmentGroup(\"(user)\"); // true\n * isPathSegmentGroup(\"[user]\"); // false\n * isPathSegmentGroup(\"user\"); // false\n * ```\n *\n * @param path - The command path segment to check.\n * @returns True if the path is a path segment group, false otherwise.\n */\nexport function isPathSegmentGroup(path: string): boolean {\n return (path.startsWith(\"(\") && path.endsWith(\")\")) || path.startsWith(\"_\");\n}\n\n/**\n * Extracts the group name from a command path segment by removing enclosing parentheses.\n *\n * @example\n * ```typescript\n * getPathSegmentGroupName(\"(admin)\"); // \"admin\"\n * getPathSegmentGroupName(\"((group))\"); // \"group\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The group name without parentheses.\n */\nexport function getPathSegmentGroupName(path: string): string {\n return path\n .replaceAll(/^\\(+/g, \"\")\n .replaceAll(/\\)+$/g, \"\")\n .replaceAll(/^_+/g, \"\");\n}\n\n/**\n * Extracts the variable name from a command path segment by removing enclosing square brackets.\n *\n * @example\n * ```typescript\n * getDynamicPathSegmentName(\"[user]\"); // \"user\"\n * ```\n *\n * @param path - The command path segment.\n * @returns The variable name without square brackets.\n */\nexport function getPathSegmentName(path: string): string {\n return getPathSegmentGroupName(getDynamicPathSegmentName(path));\n}\n"],"mappings":";;;;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AA6BX,SAAc,eAAc,SAAA;AACxB,KAAA,QAAS,WAAA,EACX,QAAA,EAAA;CAEA,MAAM,SAAS,QAAQ,OAAO,cAAe,UAAS,MAAI,WAAA,GAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;AAC1D,QAAO,KAAO,GAAC,QAAQ,OAAO,cAAe,UAAS,MAAG,SAAA,GAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA,CAAA;;;;;;;;AAG3D,eAAA,SAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQA,SAAE,WAAA,SAAA;CACF,MAAO,SAAS,QAAW,OAAO,SAC1B,YAAO,QAAA,OAAA,IAAA,IACH,MAAO,QAAM,QAAA,OAAA,IAAA,IACT,QAAQ,OAAO,IAAI,SAAG,KAC3B,YAAgB,QAAO,OAAM,IAAA,GAAA,GAC1B,YAAW,QAAS,OAAG,IAAA,GACnB,QAAQ,OAAO,MACzB,QAAY,OAAQ,IAAO,KACzB,QAAQ,aAAO;AACrB,KAAI,CAAC,YAAS,OAAU,CACpB,OAAA,IAAQ,MAAA,qIAAkB;AAE9B,QAAM,UAAS,OAAA;;AAEnB,WAAK,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQL,SAAC,YAAA,SAAA,aAAA,OAAA;CACG,MAAM,QAAQ,QAAM,OAAM,SAC1B,UAAM,QAAa,OAAU,QAAQ,WAAK,QAAc,CAAA;AACxD,SAAQ,aACV,MAAA,QAAA,gFAAA,GAAA,GACK,OAAS,MAAA;;AAEhB,YAAY,SAAG;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOf,SAAI,kBAAA,SAAA;AACA,QAAI,QAAM,OAAO,eACb,QAAM,aAAY,eAClB,OAAG,YAAA,SAAA,KAAA,CAAA;;AAEX,kBAAQ,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOR,SAAU,UAAc,SAAM;AAC1B,QAAO,YAAK,QAAY,OAAA,IAAW,GACrC,OAAA,KAAA,QAAA,OAAA,IAAA,CAAA,KACK,UAAS,WAAA,QAAiB,CAAA;;AAEjC,UAAU,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;AAaV,SAAE,qBAAA,MAAA;AACF,QAAO,KAAS,WAAU,IAAA,IAAS,KAAA,SAAU,IAAO;;AAEpD,qBAAkB,SAAQ;CAAA;CAAa;CAAC;CAAA;;;;;;;;;;;;AAYxC,SAAC,0BAAA,MAAA;AACG,QAAM,KAAM,WAAK,SAAa,GAAA,CAAA,WAAgB,SAAA,GAAA;;AAElD,0BAAE,SAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;;AAcF,SAAgB,mBAAc,MAAQ;AACpC,QAAA,KAAA,WAAA,IAAA,IAAA,KAAA,SAAA,IAAA,IAAA,KAAA,WAAA,IAAA;;AAEF,mBAAc,SAAc;CAAC;CAAQ;CAAsB;CAAE;;;;;;;;;;;;;AAa7D,SAAgB,wBAAkB,MAAW;AACzC,QAAO,KACT,WAAA,SAAA,GAAA,CACK,WAAS,SAAA,GAAA,CACP,WAAM,QAAa,GAAG;;;;;;;;;;;;;;;;;;AAc/B,SAAE,mBAAA,MAAA;AACF,QAAO,wBAAS,0BAA6C,KAAC,CAAA;;AAE9D,mBAAmB,SAAQ;CAAA;CAAA;CAAA;CAAA"}
@@ -1,8 +1,8 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
2
  const require_types_command = require('../types/command.cjs');
3
3
  const require_type_checks = require('./type-checks.cjs');
4
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
5
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
4
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
5
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
6
6
 
7
7
  //#region src/plugin-utils/deepkit.ts
8
8
  /**
@@ -13,17 +13,17 @@ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type"
13
13
  * @returns The extracted {@link ReflectionKind}.
14
14
  */
15
15
  function extractReflectionKind(command, checkVariadic = true) {
16
- if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.string || (0, __stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.string) return checkVariadic && command.variadic ? __powerlines_deepkit_vendor_type.ReflectionKind.array : __powerlines_deepkit_vendor_type.ReflectionKind.string;
17
- else if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.number || (0, __stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.number) return checkVariadic && command.variadic ? __powerlines_deepkit_vendor_type.ReflectionKind.array : __powerlines_deepkit_vendor_type.ReflectionKind.number;
18
- else if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.boolean || (0, __stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.boolean) return __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
19
- else return __powerlines_deepkit_vendor_type.ReflectionKind.string;
16
+ if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.string || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.string) return checkVariadic && command.variadic ? _powerlines_deepkit_vendor_type.ReflectionKind.array : _powerlines_deepkit_vendor_type.ReflectionKind.string;
17
+ else if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.number || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.number) return checkVariadic && command.variadic ? _powerlines_deepkit_vendor_type.ReflectionKind.array : _powerlines_deepkit_vendor_type.ReflectionKind.number;
18
+ else if (require_type_checks.isCommandParameterKind(command) && command === require_types_command.CommandParameterKinds.boolean || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.kind === require_types_command.CommandParameterKinds.boolean) return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
19
+ else return _powerlines_deepkit_vendor_type.ReflectionKind.string;
20
20
  }
21
21
  extractReflectionKind.__type = [
22
22
  "BaseCommandParameter",
23
23
  "CommandParameterKind",
24
24
  "command",
25
25
  "checkVariadic",
26
- () => __powerlines_deepkit_vendor_type.__ΩReflectionKind,
26
+ () => _powerlines_deepkit_vendor_type.__ΩReflectionKind,
27
27
  "extractReflectionKind",
28
28
  "PP\"w!\"w\"J2#\"2$n%/&"
29
29
  ];
@@ -36,25 +36,25 @@ extractReflectionKind.__type = [
36
36
  */
37
37
  function extractType(command, checkVariadic = true) {
38
38
  const reflectionKind = extractReflectionKind(command, checkVariadic);
39
- if (reflectionKind === __powerlines_deepkit_vendor_type.ReflectionKind.string) return { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string };
40
- else if (reflectionKind === __powerlines_deepkit_vendor_type.ReflectionKind.number) return { kind: __powerlines_deepkit_vendor_type.ReflectionKind.number };
41
- else if (reflectionKind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean) return { kind: __powerlines_deepkit_vendor_type.ReflectionKind.boolean };
42
- else if (reflectionKind === __powerlines_deepkit_vendor_type.ReflectionKind.array) if (require_type_checks.isCommandParameterKind(command)) return {
43
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.array,
39
+ if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.string) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string };
40
+ else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.number) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.number };
41
+ else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.boolean) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.boolean };
42
+ else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.array) if (require_type_checks.isCommandParameterKind(command)) return {
43
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
44
44
  type: extractType({ kind: command }, false)
45
45
  };
46
- else if ((0, __stryke_type_checks_is_set_object.isSetObject)(command)) return {
47
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.array,
46
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(command)) return {
47
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
48
48
  type: extractType({
49
49
  ...command,
50
50
  kind: command.kind
51
51
  }, false)
52
52
  };
53
53
  else return {
54
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.array,
55
- type: { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string }
54
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
55
+ type: { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string }
56
56
  };
57
- else return { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string };
57
+ else return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string };
58
58
  }
59
59
  extractType.__type = [
60
60
  "BaseCommandParameter",
@@ -1 +1 @@
1
- {"version":3,"file":"deepkit.cjs","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"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 type { Type } from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type {\n BaseCommandParameter,\n CommandParameterKind,\n StringCommandParameter\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport { isCommandParameterKind } from \"./type-checks\";\n\n/**\n * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the reflection kind from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link ReflectionKind}.\n */\nexport function extractReflectionKind(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): ReflectionKind {\n if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.string) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.string)\n ) {\n return checkVariadic && (command as StringCommandParameter).variadic\n ? ReflectionKind.array\n : ReflectionKind.string;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.number) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.number)\n ) {\n return checkVariadic && (command as any).variadic\n ? ReflectionKind.array\n : ReflectionKind.number;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.boolean) ||\n (isSetObject(command) && command.kind === CommandParameterKinds.boolean)\n ) {\n return ReflectionKind.boolean;\n } else {\n return ReflectionKind.string;\n }\n}\n\n/**\n * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the type from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link Type}.\n */\nexport function extractType(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): Type {\n const reflectionKind = extractReflectionKind(command, checkVariadic);\n if (reflectionKind === ReflectionKind.string) {\n return { kind: ReflectionKind.string };\n } else if (reflectionKind === ReflectionKind.number) {\n return { kind: ReflectionKind.number };\n } else if (reflectionKind === ReflectionKind.boolean) {\n return { kind: ReflectionKind.boolean };\n } else if (reflectionKind === ReflectionKind.array) {\n if (isCommandParameterKind(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n kind: command\n } as BaseCommandParameter,\n false\n )\n };\n } else if (isSetObject(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n ...command,\n kind: command.kind\n } as BaseCommandParameter,\n false\n )\n };\n } else {\n return {\n kind: ReflectionKind.array,\n type: { kind: ReflectionKind.string }\n };\n }\n } else {\n return { kind: ReflectionKind.string };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcI,KAAK,2CAAuB,QAAI,0HAEf,QAAQ,wEAErB,QAAO,iBAAiB,QAAQ,WAC1B,gDAAe,QACf,gDAAe;UAEf,2CAAQ,QAAA,IACd,YAAY,4CAAE,8DACD,QAAE,IACX,QAAQ,SAAK,4CAAA,OACjB,QAAO,iBAAiB,QAAQ,WAC1B,gDAAe;UAGf,2CAAuB,QAAQ,IAC5C,YAAA,4CAAA,+DACoB,QAAQ,IAAI,QAAQ,SAAS,4CAAsB,QAChE,QAAO,gDAAe;KAGtB,QAAO,gDAAe;;AAG9B,sBAAkB,SAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;AAQlB,SAAgB,YAAW,SAAA,gBAAA,MAAA;CACvB,MAAM,iBAAiB,sBAAE,SAAA,cAAA;AACzB,KAAI,mBAAI,gDAAA,OACJ,QAAO,EAAE,MAAM,gDAAe,QAAA;UAEzB,mBAAmB,gDAAe,OACvC,QAAO,EAAE,MAAM,gDAAe,QAAQ;UAEjC,mBAAmB,gDAAe,QACvC,QAAO,EAAE,MAAM,gDAAI,SAAA;UAEf,mBAAA,gDAAA,MACJ,KAAI,2CAAuB,QAAG,CAC1B,QAAO;EACH,MAAM,gDAAe;EACjC,MAAA,YAAA,EACgB,MAAM,SACjB,EAAA,MAAA;EACI;8DAEb,QAAA;EAEE,MAAA,gDAAA;EACc,MAAM,YAAY;GACjC,GAAA;GACmB,MAAM,QAAQ;GACjB,EAAE,MAAK;EACX;KAGD,QAAO;EACH,MAAK,gDAAA;EACb,MAAA,EAAA,MAAA,gDAAA,QAAA;EACK;KAIL,QAAO,EAAE,MAAM,gDAAe,QAAI;;AAG1C,YAAY,SAAS;CAAC;CAAwB;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"deepkit.cjs","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"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 type { Type } from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type {\n BaseCommandParameter,\n CommandParameterKind,\n StringCommandParameter\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport { isCommandParameterKind } from \"./type-checks\";\n\n/**\n * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the reflection kind from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link ReflectionKind}.\n */\nexport function extractReflectionKind(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): ReflectionKind {\n if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.string) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.string)\n ) {\n return checkVariadic && (command as StringCommandParameter).variadic\n ? ReflectionKind.array\n : ReflectionKind.string;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.number) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.number)\n ) {\n return checkVariadic && (command as any).variadic\n ? ReflectionKind.array\n : ReflectionKind.number;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.boolean) ||\n (isSetObject(command) && command.kind === CommandParameterKinds.boolean)\n ) {\n return ReflectionKind.boolean;\n } else {\n return ReflectionKind.string;\n }\n}\n\n/**\n * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the type from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link Type}.\n */\nexport function extractType(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): Type {\n const reflectionKind = extractReflectionKind(command, checkVariadic);\n if (reflectionKind === ReflectionKind.string) {\n return { kind: ReflectionKind.string };\n } else if (reflectionKind === ReflectionKind.number) {\n return { kind: ReflectionKind.number };\n } else if (reflectionKind === ReflectionKind.boolean) {\n return { kind: ReflectionKind.boolean };\n } else if (reflectionKind === ReflectionKind.array) {\n if (isCommandParameterKind(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n kind: command\n } as BaseCommandParameter,\n false\n )\n };\n } else if (isSetObject(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n ...command,\n kind: command.kind\n } as BaseCommandParameter,\n false\n )\n };\n } else {\n return {\n kind: ReflectionKind.array,\n type: { kind: ReflectionKind.string }\n };\n }\n } else {\n return { kind: ReflectionKind.string };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcC,KAAK,2CAAqB,QAAS,yHAEf,QAAQ,wEAEtB,QAAO,iBAAc,QAAW,WAC9B,+CAAiB,QACjB,+CAAoB;UAE3B,2CAAoB,QAAA,IACpB,YAAA,4CAAoB,6DACpB,QAAA,IACS,QAAM,SAAQ,4CAAA,OACjB,QAAC,iBAAuB,QAAQ,WAC/B,+CAAA;UAGK,2CAAuB,QAAQ,IAC5C,YAAA,4CAAA,8DACmB,QAAI,IAAQ,QAAS,SAAS,4CAAe,QAC7D,QAAM,+CAAgB;KAGnB,QAAQ,+CAAC;;AAGhB,sBAAkB,SAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;AAQlB,SAAQ,YAAe,SAAA,gBAAA,MAAA;CACnB,MAAI,iBAAe,sBAAM,SAAA,cAAA;AACzB,KAAI,mBAAI,+CAAA,OACP,QAAA,EAAA,MAAA,+CAAiC,QAAA;UAEjC,mBAAuB,+CAAA,OACrB,QAAQ,EAAE,MAAC,+CAAoB,QAAQ;UAEnC,mBAAkB,+CAAgB,QACrC,QAAA,EAAA,MAAe,+CAAA,SAAA;UAEX,mBAAA,+CAAA,MACP,KAAA,2CAA8B,QAAG,CAChC,QAAY;EACF,MAAC,+CAAoB;EACjC,MAAA,YAAA,EACO,MAAe,SACjB,EAAA,MAAA;EACE;6DAEX,QAAA;EAEE,MAAA,+CAAA;EACc,MAAK,YAAa;GACjC,GAAA;GACmB,MAAI,QAAQ;GACtB,EAAA,MAAe;EACb;KAGD,QAAA;EACK,MAAE,+CAAA;EACV,MAAA,EAAA,MAAA,+CAAA,QAAA;EACA;KAIJ,QAAS,EAAI,MAAE,+CAAe,QAAQ;;AAG1C,YAAY,SAAC;CAAA;CAAiC;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA"}
@@ -2,7 +2,6 @@ import { BaseCommandParameter, CommandParameterKind } from "../types/command.cjs
2
2
  import { ReflectionKind, Type } from "@powerlines/deepkit/vendor/type";
3
3
 
4
4
  //#region src/plugin-utils/deepkit.d.ts
5
-
6
5
  /**
7
6
  * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"deepkit.d.cts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"sourcesContent":[],"mappings":";;;;;;AAoCA;;;;;AAwCA;AACW,iBAzCK,qBAAA,CAyCL,OAAA,EAxCA,oBAwCA,GAxCuB,oBAwCvB,EAAA,aAAA,CAAA,EAAA,OAAA,CAAA,EAtCR,cAsCQ;;;;;;;;iBADK,WAAA,UACL,uBAAuB,gDAE/B"}
1
+ {"version":3,"file":"deepkit.d.cts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"mappings":";;;;;AAoCA;;;;;;iBAAgB,qBAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,cAAA;;;;;;;;iBAqCa,WAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,IAAA"}
@@ -2,7 +2,6 @@ import { BaseCommandParameter, CommandParameterKind } from "../types/command.mjs
2
2
  import { ReflectionKind, Type } from "@powerlines/deepkit/vendor/type";
3
3
 
4
4
  //#region src/plugin-utils/deepkit.d.ts
5
-
6
5
  /**
7
6
  * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"deepkit.d.mts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"sourcesContent":[],"mappings":";;;;;;AAoCA;;;;;AAwCA;AACW,iBAzCK,qBAAA,CAyCL,OAAA,EAxCA,oBAwCA,GAxCuB,oBAwCvB,EAAA,aAAA,CAAA,EAAA,OAAA,CAAA,EAtCR,cAsCQ;;;;;;;;iBADK,WAAA,UACL,uBAAuB,gDAE/B"}
1
+ {"version":3,"file":"deepkit.d.mts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"mappings":";;;;;AAoCA;;;;;;iBAAgB,qBAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,cAAA;;;;;;;;iBAqCa,WAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"deepkit.mjs","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"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 type { Type } from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type {\n BaseCommandParameter,\n CommandParameterKind,\n StringCommandParameter\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport { isCommandParameterKind } from \"./type-checks\";\n\n/**\n * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the reflection kind from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link ReflectionKind}.\n */\nexport function extractReflectionKind(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): ReflectionKind {\n if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.string) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.string)\n ) {\n return checkVariadic && (command as StringCommandParameter).variadic\n ? ReflectionKind.array\n : ReflectionKind.string;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.number) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.number)\n ) {\n return checkVariadic && (command as any).variadic\n ? ReflectionKind.array\n : ReflectionKind.number;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.boolean) ||\n (isSetObject(command) && command.kind === CommandParameterKinds.boolean)\n ) {\n return ReflectionKind.boolean;\n } else {\n return ReflectionKind.string;\n }\n}\n\n/**\n * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the type from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link Type}.\n */\nexport function extractType(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): Type {\n const reflectionKind = extractReflectionKind(command, checkVariadic);\n if (reflectionKind === ReflectionKind.string) {\n return { kind: ReflectionKind.string };\n } else if (reflectionKind === ReflectionKind.number) {\n return { kind: ReflectionKind.number };\n } else if (reflectionKind === ReflectionKind.boolean) {\n return { kind: ReflectionKind.boolean };\n } else if (reflectionKind === ReflectionKind.array) {\n if (isCommandParameterKind(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n kind: command\n } as BaseCommandParameter,\n false\n )\n };\n } else if (isSetObject(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n ...command,\n kind: command.kind\n } as BaseCommandParameter,\n false\n )\n };\n } else {\n return {\n kind: ReflectionKind.array,\n type: { kind: ReflectionKind.string }\n };\n }\n } else {\n return { kind: ReflectionKind.string };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAcI,KAAK,uBAAuB,QAAI,gDAE3B,YAAY,QAAQ,kDAErB,QAAO,iBAAiB,QAAQ,WAC1B,eAAe,QACf,eAAe;UAEf,uBAAQ,QAAA,IACd,YAAY,sBAAE,UACb,YAAY,QAAE,IACX,QAAQ,SAAK,sBAAA,OACjB,QAAO,iBAAiB,QAAQ,WAC1B,eAAe;UAGf,uBAAuB,QAAQ,IAC5C,YAAA,sBAAA,WACQ,YAAY,QAAQ,IAAI,QAAQ,SAAS,sBAAsB,QAChE,QAAO,eAAe;KAGtB,QAAO,eAAe;;AAG9B,sBAAkB,SAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;AAQlB,SAAgB,YAAW,SAAA,gBAAA,MAAA;CACvB,MAAM,iBAAiB,sBAAE,SAAA,cAAA;AACzB,KAAI,mBAAI,eAAA,OACJ,QAAO,EAAE,MAAM,eAAe,QAAA;UAEzB,mBAAmB,eAAe,OACvC,QAAO,EAAE,MAAM,eAAe,QAAQ;UAEjC,mBAAmB,eAAe,QACvC,QAAO,EAAE,MAAM,eAAI,SAAA;UAEf,mBAAA,eAAA,MACJ,KAAI,uBAAuB,QAAG,CAC1B,QAAO;EACH,MAAM,eAAe;EACjC,MAAA,YAAA,EACgB,MAAM,SACjB,EAAA,MAAA;EACI;UAEb,YAAA,QAAA;EAEE,MAAA,eAAA;EACc,MAAM,YAAY;GACjC,GAAA;GACmB,MAAM,QAAQ;GACjB,EAAE,MAAK;EACX;KAGD,QAAO;EACH,MAAK,eAAA;EACb,MAAA,EAAA,MAAA,eAAA,QAAA;EACK;KAIL,QAAO,EAAE,MAAM,eAAe,QAAI;;AAG1C,YAAY,SAAS;CAAC;CAAwB;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"deepkit.mjs","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"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 type { Type } from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type {\n BaseCommandParameter,\n CommandParameterKind,\n StringCommandParameter\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport { isCommandParameterKind } from \"./type-checks\";\n\n/**\n * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the reflection kind from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link ReflectionKind}.\n */\nexport function extractReflectionKind(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): ReflectionKind {\n if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.string) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.string)\n ) {\n return checkVariadic && (command as StringCommandParameter).variadic\n ? ReflectionKind.array\n : ReflectionKind.string;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.number) ||\n (isSetObject(command as BaseCommandParameter) &&\n (command as BaseCommandParameter).kind === CommandParameterKinds.number)\n ) {\n return checkVariadic && (command as any).variadic\n ? ReflectionKind.array\n : ReflectionKind.number;\n } else if (\n (isCommandParameterKind(command) &&\n command === CommandParameterKinds.boolean) ||\n (isSetObject(command) && command.kind === CommandParameterKinds.boolean)\n ) {\n return ReflectionKind.boolean;\n } else {\n return ReflectionKind.string;\n }\n}\n\n/**\n * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterKind}.\n *\n * @param command - The command parameter or kind to extract the type from.\n * @param checkVariadic - Whether to check for variadic parameters (arrays).\n * @returns The extracted {@link Type}.\n */\nexport function extractType(\n command: BaseCommandParameter | CommandParameterKind,\n checkVariadic = true\n): Type {\n const reflectionKind = extractReflectionKind(command, checkVariadic);\n if (reflectionKind === ReflectionKind.string) {\n return { kind: ReflectionKind.string };\n } else if (reflectionKind === ReflectionKind.number) {\n return { kind: ReflectionKind.number };\n } else if (reflectionKind === ReflectionKind.boolean) {\n return { kind: ReflectionKind.boolean };\n } else if (reflectionKind === ReflectionKind.array) {\n if (isCommandParameterKind(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n kind: command\n } as BaseCommandParameter,\n false\n )\n };\n } else if (isSetObject(command)) {\n return {\n kind: ReflectionKind.array,\n type: extractType(\n {\n ...command,\n kind: command.kind\n } as BaseCommandParameter,\n false\n )\n };\n } else {\n return {\n kind: ReflectionKind.array,\n type: { kind: ReflectionKind.string }\n };\n }\n } else {\n return { kind: ReflectionKind.string };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAcC,KAAK,uBAAqB,QAAS,gDAE3B,YAAY,QAAQ,kDAEtB,QAAO,iBAAc,QAAW,WAC9B,eAAiB,QACjB,eAAoB;UAE3B,uBAAoB,QAAA,IACpB,YAAA,sBAAoB,UACpB,YAAA,QAAA,IACS,QAAM,SAAQ,sBAAA,OACjB,QAAC,iBAAuB,QAAQ,WAC/B,eAAA;UAGK,uBAAuB,QAAQ,IAC5C,YAAA,sBAAA,WACQ,YAAW,QAAI,IAAQ,QAAS,SAAS,sBAAe,QAC7D,QAAM,eAAgB;KAGnB,QAAQ,eAAC;;AAGhB,sBAAkB,SAAA;CAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;;AAQlB,SAAQ,YAAe,SAAA,gBAAA,MAAA;CACnB,MAAI,iBAAe,sBAAM,SAAA,cAAA;AACzB,KAAI,mBAAI,eAAA,OACP,QAAA,EAAA,MAAA,eAAiC,QAAA;UAEjC,mBAAuB,eAAA,OACrB,QAAQ,EAAE,MAAC,eAAoB,QAAQ;UAEnC,mBAAkB,eAAgB,QACrC,QAAA,EAAA,MAAe,eAAA,SAAA;UAEX,mBAAA,eAAA,MACP,KAAA,uBAA8B,QAAG,CAChC,QAAY;EACF,MAAC,eAAoB;EACjC,MAAA,YAAA,EACO,MAAe,SACjB,EAAA,MAAA;EACE;UAEX,YAAA,QAAA;EAEE,MAAA,eAAA;EACc,MAAK,YAAa;GACjC,GAAA;GACmB,MAAI,QAAQ;GACtB,EAAA,MAAe;EACb;KAGD,QAAA;EACK,MAAE,eAAA;EACV,MAAA,EAAA,MAAA,eAAA,QAAA;EACA;KAIJ,QAAS,EAAI,MAAE,eAAe,QAAQ;;AAG1C,YAAY,SAAC;CAAA;CAAiC;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"description-helpers.cjs","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"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\nexport interface FormatDescriptionOptions {\n /**\n * If true, replaces newlines in the description with spaces. This is useful for ensuring that descriptions are displayed as a single line in contexts where multiline descriptions may not be supported or may cause formatting issues.\n *\n * @defaultValue false\n */\n replaceNewlines?: boolean;\n\n /**\n * If true, collapses multiple consecutive spaces in the description into a single space. This helps to ensure that descriptions are concise and do not contain unnecessary whitespace.\n *\n * @defaultValue false\n */\n collapseWhitespace?: boolean;\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionWhitespace(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n let formattedDescription = description.trim();\n if (options.replaceNewlines) {\n formattedDescription = formattedDescription.replace(/\\s*\\n\\s*/g, \" \");\n }\n if (options.collapseWhitespace) {\n formattedDescription = formattedDescription.replace(/\\s{2,}/g, \" \");\n }\n\n return formattedDescription.trim();\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionEscapes(description: string): string {\n return description\n .replaceAll(\"'\", \"\\\\'\")\n .replaceAll('\"', '\\\\\"')\n .replaceAll(\"`\", \"\\\\`\")\n .replace(/\\$\\{/g, \"\\\\${\");\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nexport function formatDescription(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n return formatDescriptionEscapes(\n formatDescriptionWhitespace(description, options)\n );\n}\n\nexport interface FormatShortDescriptionOptions extends FormatDescriptionOptions {\n /**\n * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.\n *\n * @defaultValue 60\n */\n length?: number;\n}\n\n/**\n * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.\n *\n * @param description - The full description string.\n * @param options - Options for formatting the short description, including the maximum length.\n * @returns The extracted short description.\n */\nexport function formatShortDescription(\n description: string,\n options: FormatShortDescriptionOptions = {}\n): string {\n const length = options.length ?? 60;\n const formattedDescription = formatDescriptionWhitespace(\n description,\n options\n );\n\n const firstSentenceMatch =\n formattedDescription.indexOf(\"\\n\") < length + 1 ||\n formattedDescription.search(/[.!?\\n]\\s*\\S/) > length + 1\n ? formattedDescription\n .trim()\n .match(/^.*[.!?\\n]\\s?\\S/)?.[0]\n ?.trim()\n ?.slice(0, -1)\n ?.trim()\n : undefined;\n\n let result = (firstSentenceMatch || formattedDescription).trim();\n if (result.trim().length > length) {\n result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;\n }\n\n return formatDescriptionEscapes(result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,SAAG,4BAAA,aAAA,UAAA,EAAA,EAAA;CACC,IAAI,uBAAe,YAAA,MAAA;AACnB,KAAA,QAAA,gBACI,wBAAsB,qBAAA,QAAA,aAAA,IAAA;gCAG5B,wBAAA,qBAAA,QAAA,WAAA,IAAA;AAED,QAAA,qBAAA,MAAA;;AAED,4BAA4B,SAAS;CAAC;OAAqB;CAA6B;QAAkB,EAAE;CAAG;CAAW;CAAA;;;;;;;;;;AAU1H,SAAS,yBAAsB,aAAA;AAC3B,QAAO,YACT,WAAA,KAAA,MAAA,CACO,WAAW,MAAK,OAAM,CACtB,WAAW,KAAK,MAAM,CAC7B,QAAA,SAAA,OAAA;;AAEF,yBAAyB,SAAS;CAAC;CAAC;CAAA;CAAA;;;;;;;;;;AAUpC,SAAgB,kBAAkB,aAAU,UAAA,EAAA,EAAA;AAC1C,QAAA,yBAAA,4BAAA,aAAA,QAAA,CAAA;;AAEF,kBAAkB,SAAC;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA;AACnB,MAAM,mCAAoB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAS1B,SAAU,uBAAA,aAAA,UAAA,EAAA,EAAA;CACN,MAAM,SAAS,QAAQ,UAAU;CACpC,MAAA,uBAAA,4BAAA,aAAA,QAAA;CAUE,IAAA,WAT4B,qBAAoB,QAAA,KAAA,GAAA,SAAA,KAC3C,qBAAqB,OAAO,eAAQ,GAAA,SAAA,IAC1C,qBACW,MAAM,CACN,MAAM,kBAAE,GAAA,IACP,MAAM,EACV,MAAA,GAAA,GAAA,EACI,MAAM,GACV,WACP,sBAAA,MAAA;AACH,KAAA,OAAA,MAAA,CAAA,SAAA;AAGI,QAAA,yBAAA,OAAA;;AAEJ,uBAAG,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"description-helpers.cjs","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"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\nexport interface FormatDescriptionOptions {\n /**\n * If true, replaces newlines in the description with spaces. This is useful for ensuring that descriptions are displayed as a single line in contexts where multiline descriptions may not be supported or may cause formatting issues.\n *\n * @defaultValue false\n */\n replaceNewlines?: boolean;\n\n /**\n * If true, collapses multiple consecutive spaces in the description into a single space. This helps to ensure that descriptions are concise and do not contain unnecessary whitespace.\n *\n * @defaultValue false\n */\n collapseWhitespace?: boolean;\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionWhitespace(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n let formattedDescription = description.trim();\n if (options.replaceNewlines) {\n formattedDescription = formattedDescription.replace(/\\s*\\n\\s*/g, \" \");\n }\n if (options.collapseWhitespace) {\n formattedDescription = formattedDescription.replace(/\\s{2,}/g, \" \");\n }\n\n return formattedDescription.trim();\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionEscapes(description: string): string {\n return description\n .replaceAll(\"'\", \"\\\\'\")\n .replaceAll('\"', '\\\\\"')\n .replaceAll(\"`\", \"\\\\`\")\n .replace(/\\$\\{/g, \"\\\\${\");\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nexport function formatDescription(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n return formatDescriptionEscapes(\n formatDescriptionWhitespace(description, options)\n );\n}\n\nexport interface FormatShortDescriptionOptions extends FormatDescriptionOptions {\n /**\n * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.\n *\n * @defaultValue 60\n */\n length?: number;\n}\n\n/**\n * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.\n *\n * @param description - The full description string.\n * @param options - Options for formatting the short description, including the maximum length.\n * @returns The extracted short description.\n */\nexport function formatShortDescription(\n description: string,\n options: FormatShortDescriptionOptions = {}\n): string {\n const length = options.length ?? 60;\n const formattedDescription = formatDescriptionWhitespace(\n description,\n options\n );\n\n const firstSentenceMatch =\n formattedDescription.indexOf(\"\\n\") < length + 1 ||\n formattedDescription.search(/[.!?\\n]\\s*\\S/) > length + 1\n ? formattedDescription\n .trim()\n .match(/^.*[.!?\\n]\\s?\\S/)?.[0]\n ?.trim()\n ?.slice(0, -1)\n ?.trim()\n : undefined;\n\n let result = (firstSentenceMatch || formattedDescription).trim();\n if (result.trim().length > length) {\n result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;\n }\n\n return formatDescriptionEscapes(result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,SAAG,4BAAA,aAAA,UAAA,EAAA,EAAA;CACC,IAAE,uBAAa,YAAA,MAAA;AACf,KAAA,QAAA,gBACF,wBAA4B,qBAAA,QAAA,aAAA,IAAA;gCAG5B,wBAAA,qBAAA,QAAA,WAAA,IAAA;AAED,QAAA,qBAAA,MAAA;;AAED,4BAAsB,SAAc;CAAA;OAAiB;CAAgC;QAAqB,EAAE;CAAC;CAAa;CAAA;;;;;;;;;;AAU1H,SAAM,yBAAyB,aAAA;AAC3B,QAAA,YACF,WAAA,KAAA,MAAA,CACI,WAAQ,MAAA,OAAA,CACV,WAAA,KAAqB,MAAE,CACzB,QAAA,SAAA,OAAA;;AAEF,yBAAS,SAAyB;CAAC;CAAC;CAAA;CAAA;;;;;;;;;;AAUpC,SAAgB,kBAAU,aAAkB,UAAA,EAAA,EAAA;AAC1C,QAAA,yBAAA,4BAAA,aAAA,QAAA,CAAA;;AAEF,kBAAS,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA;AACT,MAAK,mCAAqB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAS1B,SAAI,uBAAA,aAAA,UAAA,EAAA,EAAA;CACD,MAAO,SAAQ,QAAI,UAAc;CACnC,MAAA,uBAAA,4BAAA,aAAA,QAAA;CAUE,IAAA,WATyB,qBAAuB,QAAA,KAAA,GAAA,SAAA,KAC/C,qBAAsB,OAAA,eAAkB,GAAA,SAAA,IAC1C,qBACK,MAAS,CACH,MAAE,kBAAM,GAAA,IACV,MAAA,EACD,MAAA,GAAA,GAAA,EACD,MAAA,GACL,WACD,sBAAA,MAAA;AACH,KAAA,OAAA,MAAA,CAAA,SAAA;AAGI,QAAA,yBAAA,OAAA;;AAEJ,uBAAG,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"description-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"sourcesContent":[],"mappings":";UAkBiB,wBAAA;EAAA;AAkEjB;AASA;AAgBA;;;;;;;;;;;;;;;;;;;iBAzBgB,iBAAA,gCAEL;UAOM,6BAAA,SAAsC;;;;;;;;;;;;;;;iBAgBvC,sBAAA,gCAEL"}
1
+ {"version":3,"file":"description-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"mappings":";UAkBiB,wBAAA;EAAA;;;;;EAMf,eAAA;EA4D+B;;;;;EArD/B,kBAAA;AAAA;;AA8DF;;;;;AAgBA;;;iBAzBgB,iBAAA,CACd,WAAA,UACA,OAAA,GAAS,wBAAA;AAAA,UAOM,6BAAA,SAAsC,wBAAA;EAkB5C;;;;;EAZT,MAAA;AAAA;;;;;;;;iBAUc,sBAAA,CACd,WAAA,UACA,OAAA,GAAS,6BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"description-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"sourcesContent":[],"mappings":";UAkBiB,wBAAA;EAAA;AAkEjB;AASA;AAgBA;;;;;;;;;;;;;;;;;;;iBAzBgB,iBAAA,gCAEL;UAOM,6BAAA,SAAsC;;;;;;;;;;;;;;;iBAgBvC,sBAAA,gCAEL"}
1
+ {"version":3,"file":"description-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"mappings":";UAkBiB,wBAAA;EAAA;;;;;EAMf,eAAA;EA4D+B;;;;;EArD/B,kBAAA;AAAA;;AA8DF;;;;;AAgBA;;;iBAzBgB,iBAAA,CACd,WAAA,UACA,OAAA,GAAS,wBAAA;AAAA,UAOM,6BAAA,SAAsC,wBAAA;EAkB5C;;;;;EAZT,MAAA;AAAA;;;;;;;;iBAUc,sBAAA,CACd,WAAA,UACA,OAAA,GAAS,6BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"description-helpers.mjs","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"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\nexport interface FormatDescriptionOptions {\n /**\n * If true, replaces newlines in the description with spaces. This is useful for ensuring that descriptions are displayed as a single line in contexts where multiline descriptions may not be supported or may cause formatting issues.\n *\n * @defaultValue false\n */\n replaceNewlines?: boolean;\n\n /**\n * If true, collapses multiple consecutive spaces in the description into a single space. This helps to ensure that descriptions are concise and do not contain unnecessary whitespace.\n *\n * @defaultValue false\n */\n collapseWhitespace?: boolean;\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionWhitespace(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n let formattedDescription = description.trim();\n if (options.replaceNewlines) {\n formattedDescription = formattedDescription.replace(/\\s*\\n\\s*/g, \" \");\n }\n if (options.collapseWhitespace) {\n formattedDescription = formattedDescription.replace(/\\s{2,}/g, \" \");\n }\n\n return formattedDescription.trim();\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionEscapes(description: string): string {\n return description\n .replaceAll(\"'\", \"\\\\'\")\n .replaceAll('\"', '\\\\\"')\n .replaceAll(\"`\", \"\\\\`\")\n .replace(/\\$\\{/g, \"\\\\${\");\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nexport function formatDescription(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n return formatDescriptionEscapes(\n formatDescriptionWhitespace(description, options)\n );\n}\n\nexport interface FormatShortDescriptionOptions extends FormatDescriptionOptions {\n /**\n * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.\n *\n * @defaultValue 60\n */\n length?: number;\n}\n\n/**\n * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.\n *\n * @param description - The full description string.\n * @param options - Options for formatting the short description, including the maximum length.\n * @returns The extracted short description.\n */\nexport function formatShortDescription(\n description: string,\n options: FormatShortDescriptionOptions = {}\n): string {\n const length = options.length ?? 60;\n const formattedDescription = formatDescriptionWhitespace(\n description,\n options\n );\n\n const firstSentenceMatch =\n formattedDescription.indexOf(\"\\n\") < length + 1 ||\n formattedDescription.search(/[.!?\\n]\\s*\\S/) > length + 1\n ? formattedDescription\n .trim()\n .match(/^.*[.!?\\n]\\s?\\S/)?.[0]\n ?.trim()\n ?.slice(0, -1)\n ?.trim()\n : undefined;\n\n let result = (firstSentenceMatch || formattedDescription).trim();\n if (result.trim().length > length) {\n result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;\n }\n\n return formatDescriptionEscapes(result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAG,4BAAA,aAAA,UAAA,EAAA,EAAA;CACC,IAAI,uBAAe,YAAA,MAAA;AACnB,KAAA,QAAA,gBACI,wBAAsB,qBAAA,QAAA,aAAA,IAAA;gCAG5B,wBAAA,qBAAA,QAAA,WAAA,IAAA;AAED,QAAA,qBAAA,MAAA;;AAED,4BAA4B,SAAS;CAAC;OAAqB;CAA6B;QAAkB,EAAE;CAAG;CAAW;CAAA;;;;;;;;;;AAU1H,SAAS,yBAAsB,aAAA;AAC3B,QAAO,YACT,WAAA,KAAA,MAAA,CACO,WAAW,MAAK,OAAM,CACtB,WAAW,KAAK,MAAM,CAC7B,QAAA,SAAA,OAAA;;AAEF,yBAAyB,SAAS;CAAC;CAAC;CAAA;CAAA;;;;;;;;;;AAUpC,SAAgB,kBAAkB,aAAU,UAAA,EAAA,EAAA;AAC1C,QAAA,yBAAA,4BAAA,aAAA,QAAA,CAAA;;AAEF,kBAAkB,SAAC;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA;AACnB,MAAM,mCAAoB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAS1B,SAAU,uBAAA,aAAA,UAAA,EAAA,EAAA;CACN,MAAM,SAAS,QAAQ,UAAU;CACpC,MAAA,uBAAA,4BAAA,aAAA,QAAA;CAUE,IAAA,WAT4B,qBAAoB,QAAA,KAAA,GAAA,SAAA,KAC3C,qBAAqB,OAAO,eAAQ,GAAA,SAAA,IAC1C,qBACW,MAAM,CACN,MAAM,kBAAE,GAAA,IACP,MAAM,EACV,MAAA,GAAA,GAAA,EACI,MAAM,GACV,WACP,sBAAA,MAAA;AACH,KAAA,OAAA,MAAA,CAAA,SAAA;AAGI,QAAA,yBAAA,OAAA;;AAEJ,uBAAG,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"description-helpers.mjs","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"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\nexport interface FormatDescriptionOptions {\n /**\n * If true, replaces newlines in the description with spaces. This is useful for ensuring that descriptions are displayed as a single line in contexts where multiline descriptions may not be supported or may cause formatting issues.\n *\n * @defaultValue false\n */\n replaceNewlines?: boolean;\n\n /**\n * If true, collapses multiple consecutive spaces in the description into a single space. This helps to ensure that descriptions are concise and do not contain unnecessary whitespace.\n *\n * @defaultValue false\n */\n collapseWhitespace?: boolean;\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionWhitespace(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n let formattedDescription = description.trim();\n if (options.replaceNewlines) {\n formattedDescription = formattedDescription.replace(/\\s*\\n\\s*/g, \" \");\n }\n if (options.collapseWhitespace) {\n formattedDescription = formattedDescription.replace(/\\s{2,}/g, \" \");\n }\n\n return formattedDescription.trim();\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nfunction formatDescriptionEscapes(description: string): string {\n return description\n .replaceAll(\"'\", \"\\\\'\")\n .replaceAll('\"', '\\\\\"')\n .replaceAll(\"`\", \"\\\\`\")\n .replace(/\\$\\{/g, \"\\\\${\");\n}\n\n/**\n * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.\n *\n * @remarks\n * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.\n *\n * @param description - The full description string.\n * @returns The formatted description string.\n */\nexport function formatDescription(\n description: string,\n options: FormatDescriptionOptions = {}\n): string {\n return formatDescriptionEscapes(\n formatDescriptionWhitespace(description, options)\n );\n}\n\nexport interface FormatShortDescriptionOptions extends FormatDescriptionOptions {\n /**\n * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.\n *\n * @defaultValue 60\n */\n length?: number;\n}\n\n/**\n * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.\n *\n * @param description - The full description string.\n * @param options - Options for formatting the short description, including the maximum length.\n * @returns The extracted short description.\n */\nexport function formatShortDescription(\n description: string,\n options: FormatShortDescriptionOptions = {}\n): string {\n const length = options.length ?? 60;\n const formattedDescription = formatDescriptionWhitespace(\n description,\n options\n );\n\n const firstSentenceMatch =\n formattedDescription.indexOf(\"\\n\") < length + 1 ||\n formattedDescription.search(/[.!?\\n]\\s*\\S/) > length + 1\n ? formattedDescription\n .trim()\n .match(/^.*[.!?\\n]\\s?\\S/)?.[0]\n ?.trim()\n ?.slice(0, -1)\n ?.trim()\n : undefined;\n\n let result = (firstSentenceMatch || formattedDescription).trim();\n if (result.trim().length > length) {\n result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;\n }\n\n return formatDescriptionEscapes(result);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAG,4BAAA,aAAA,UAAA,EAAA,EAAA;CACC,IAAE,uBAAa,YAAA,MAAA;AACf,KAAA,QAAA,gBACF,wBAA4B,qBAAA,QAAA,aAAA,IAAA;gCAG5B,wBAAA,qBAAA,QAAA,WAAA,IAAA;AAED,QAAA,qBAAA,MAAA;;AAED,4BAAsB,SAAc;CAAA;OAAiB;CAAgC;QAAqB,EAAE;CAAC;CAAa;CAAA;;;;;;;;;;AAU1H,SAAM,yBAAyB,aAAA;AAC3B,QAAA,YACF,WAAA,KAAA,MAAA,CACI,WAAQ,MAAA,OAAA,CACV,WAAA,KAAqB,MAAE,CACzB,QAAA,SAAA,OAAA;;AAEF,yBAAS,SAAyB;CAAC;CAAC;CAAA;CAAA;;;;;;;;;;AAUpC,SAAgB,kBAAU,aAAkB,UAAA,EAAA,EAAA;AAC1C,QAAA,yBAAA,4BAAA,aAAA,QAAA,CAAA;;AAEF,kBAAS,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA;AACT,MAAK,mCAAqB;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAS1B,SAAI,uBAAA,aAAA,UAAA,EAAA,EAAA;CACD,MAAO,SAAQ,QAAI,UAAc;CACnC,MAAA,uBAAA,4BAAA,aAAA,QAAA;CAUE,IAAA,WATyB,qBAAuB,QAAA,KAAA,GAAA,SAAA,KAC/C,qBAAsB,OAAA,eAAkB,GAAA,SAAA,IAC1C,qBACK,MAAS,CACH,MAAE,kBAAM,GAAA,IACV,MAAA,EACD,MAAA,GAAA,GAAA,EACD,MAAA,GACL,WACD,sBAAA,MAAA;AACH,KAAA,OAAA,MAAA,CAAA,SAAA;AAGI,QAAA,yBAAA,OAAA;;AAEJ,uBAAG,SAAA;CAAA;OAAA;CAAA;QAAA,EAAA;CAAA;CAAA;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-command-tree.cjs","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"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 type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\nimport { isDynamicPathSegment } from \"./context-helpers\";\nimport { traverseCommands } from \"./traverse-command-tree\";\n\n/**\n * Retrieves a specific command tree based on the provided path.\n *\n * @param context - The build context containing the command definitions.\n * @param path - An array of strings representing the command path.\n * @returns The command tree at the specified path, or null if not found.\n */\nexport function getCommandTree(\n context: Context,\n path = [] as string[]\n): CommandTree | null {\n if (path.length === 0) {\n return null;\n }\n\n let currentTree: CommandTree | null = context.commands[path[0]!] ?? null;\n if (path.length > 1) {\n const segments = path\n .slice(1)\n .filter(segment => !isDynamicPathSegment(segment));\n for (const segment of segments) {\n if (\n currentTree?.children &&\n Object.prototype.hasOwnProperty.call(currentTree.children, segment)\n ) {\n currentTree = currentTree.children[segment] ?? null;\n } else {\n return null;\n }\n }\n }\n\n return currentTree;\n}\n\n/**\n * Retrieves a list of all command trees defined in the context.\n *\n * @param context - The build context containing the command definitions.\n * @returns A promise that resolves to an array of all command trees in the context.\n */\nexport async function getCommandList(context: Context): Promise<CommandTree[]> {\n const commandList: CommandTree[] = [];\n await traverseCommands(context, commandTree => {\n commandList.push(commandTree);\n });\n\n return commandList;\n}\n"],"mappings":";;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;;;AAYP,KAAI,KAAK,WAAW;;AAIpB,KAAI,KAAK,SAAS,GAAG;EACjB,MAAM,WAAW,KACZ,MAAM,EAAE,CACR,OAAO,cAAa,YAAW,CAAC,6CAAa,QAAA,EAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;iCAExD,KAAA,aAAA,YACc,OAAO,UAAU,eAAe,KAAK,YAAU,UAAA,QAAA,CAC9D,eAAA,YAAA,SAAA,YAAA;MAGe,QAAO;;AAInB,QAAO;;AAEX,eAAe,SAAS;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOzB,eAAc,eAAA,SAAA;CACV,MAAM,cAAc,EAAE;AACtB,OAAM,+CAAiB,SAAS,cAAA,gBAAA;AAC5B,cAAC,KAAA,YAAA;IACF;EAAC;EAAe;EAAI;EAAI,CAAA,CAAA;AAC3B,QAAO;;AAEX,eAAe,SAAS;CAAC;CAAW;CAAW;CAAY;CAAA;CAAA"}
1
+ {"version":3,"file":"get-command-tree.cjs","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"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 type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\nimport { isDynamicPathSegment } from \"./context-helpers\";\nimport { traverseCommands } from \"./traverse-command-tree\";\n\n/**\n * Retrieves a specific command tree based on the provided path.\n *\n * @param context - The build context containing the command definitions.\n * @param path - An array of strings representing the command path.\n * @returns The command tree at the specified path, or null if not found.\n */\nexport function getCommandTree(\n context: Context,\n path = [] as string[]\n): CommandTree | null {\n if (path.length === 0) {\n return null;\n }\n\n let currentTree: CommandTree | null = context.commands[path[0]!] ?? null;\n if (path.length > 1) {\n const segments = path\n .slice(1)\n .filter(segment => !isDynamicPathSegment(segment));\n for (const segment of segments) {\n if (\n currentTree?.children &&\n Object.prototype.hasOwnProperty.call(currentTree.children, segment)\n ) {\n currentTree = currentTree.children[segment] ?? null;\n } else {\n return null;\n }\n }\n }\n\n return currentTree;\n}\n\n/**\n * Retrieves a list of all command trees defined in the context.\n *\n * @param context - The build context containing the command definitions.\n * @returns A promise that resolves to an array of all command trees in the context.\n */\nexport async function getCommandList(context: Context): Promise<CommandTree[]> {\n const commandList: CommandTree[] = [];\n await traverseCommands(context, commandTree => {\n commandList.push(commandTree);\n });\n\n return commandList;\n}\n"],"mappings":";;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;;;AAYV,KAAK,KAAO,WAAW;;AAIxB,KAAO,KAAM,SAAC,GAAW;EAClB,MAAO,WAAU,KACf,MAAA,EAAA,CACA,OAAA,cAAwB,YAAW,CAAC,6CAAa,QAAA,EAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;iCAExD,KAAA,aAAA,YACa,OAAQ,UAAS,eAAc,KAAI,YAAa,UAAA,QAAA,CAC9D,eAAA,YAAA,SAAA,YAAA;MAGe,QAAO;;AAIrB,QAAS;;AAEX,eAAW,SAAa;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOzB,eAAc,eAAA,SAAA;CACV,MAAG,cAAiB,EAAE;AACtB,OAAK,+CAAiB,SAAU,cAAA,gBAAA;AAC5B,cAAC,KAAA,YAAA;IACF;EAAC;EAAa;EAAA;EAAU,CAAA,CAAA;AAC3B,QAAI;;AAER,eAAQ,SAAc;CAAA;CAAY;CAAS;CAAgB;CAAA;CAAA"}
@@ -2,7 +2,6 @@ import { CommandTree } from "../types/command.cjs";
2
2
  import { Context } from "../types/context.cjs";
3
3
 
4
4
  //#region src/plugin-utils/get-command-tree.d.ts
5
-
6
5
  /**
7
6
  * Retrieves a specific command tree based on the provided path.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-command-tree.d.cts","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;AAkCA;;;;AAA+D,iBAlC/C,cAAA,CAkC+C,OAAA,EAjCpD,OAiCoD,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EA/B5D,WA+B4D,GAAA,IAAA;;;;;;;iBAAzC,cAAA,UAAwB,UAAU,QAAQ"}
1
+ {"version":3,"file":"get-command-tree.d.cts","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"mappings":";;;;;;AA8BA;;;;;iBAAgB,cAAA,CACd,OAAA,EAAS,OAAA,EACT,IAAA,cACC,WAAA;;;;;AA+BH;;iBAAsB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,OAAA,CAAQ,WAAA"}
@@ -2,7 +2,6 @@ import { CommandTree } from "../types/command.mjs";
2
2
  import { Context } from "../types/context.mjs";
3
3
 
4
4
  //#region src/plugin-utils/get-command-tree.d.ts
5
-
6
5
  /**
7
6
  * Retrieves a specific command tree based on the provided path.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-command-tree.d.mts","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;AAkCA;;;;AAA+D,iBAlC/C,cAAA,CAkC+C,OAAA,EAjCpD,OAiCoD,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EA/B5D,WA+B4D,GAAA,IAAA;;;;;;;iBAAzC,cAAA,UAAwB,UAAU,QAAQ"}
1
+ {"version":3,"file":"get-command-tree.d.mts","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"mappings":";;;;;;AA8BA;;;;;iBAAgB,cAAA,CACd,OAAA,EAAS,OAAA,EACT,IAAA,cACC,WAAA;;;;;AA+BH;;iBAAsB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,OAAA,CAAQ,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-command-tree.mjs","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"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 type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\nimport { isDynamicPathSegment } from \"./context-helpers\";\nimport { traverseCommands } from \"./traverse-command-tree\";\n\n/**\n * Retrieves a specific command tree based on the provided path.\n *\n * @param context - The build context containing the command definitions.\n * @param path - An array of strings representing the command path.\n * @returns The command tree at the specified path, or null if not found.\n */\nexport function getCommandTree(\n context: Context,\n path = [] as string[]\n): CommandTree | null {\n if (path.length === 0) {\n return null;\n }\n\n let currentTree: CommandTree | null = context.commands[path[0]!] ?? null;\n if (path.length > 1) {\n const segments = path\n .slice(1)\n .filter(segment => !isDynamicPathSegment(segment));\n for (const segment of segments) {\n if (\n currentTree?.children &&\n Object.prototype.hasOwnProperty.call(currentTree.children, segment)\n ) {\n currentTree = currentTree.children[segment] ?? null;\n } else {\n return null;\n }\n }\n }\n\n return currentTree;\n}\n\n/**\n * Retrieves a list of all command trees defined in the context.\n *\n * @param context - The build context containing the command definitions.\n * @returns A promise that resolves to an array of all command trees in the context.\n */\nexport async function getCommandList(context: Context): Promise<CommandTree[]> {\n const commandList: CommandTree[] = [];\n await traverseCommands(context, commandTree => {\n commandList.push(commandTree);\n });\n\n return commandList;\n}\n"],"mappings":";;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;;;AAYP,KAAI,KAAK,WAAW;;AAIpB,KAAI,KAAK,SAAS,GAAG;EACjB,MAAM,WAAW,KACZ,MAAM,EAAE,CACR,OAAO,cAAa,YAAW,CAAC,qBAAa,QAAA,EAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;iCAExD,KAAA,aAAA,YACc,OAAO,UAAU,eAAe,KAAK,YAAU,UAAA,QAAA,CAC9D,eAAA,YAAA,SAAA,YAAA;MAGe,QAAO;;AAInB,QAAO;;AAEX,eAAe,SAAS;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOzB,eAAc,eAAA,SAAA;CACV,MAAM,cAAc,EAAE;AACtB,OAAM,iBAAiB,SAAS,cAAA,gBAAA;AAC5B,cAAC,KAAA,YAAA;IACF;EAAC;EAAe;EAAI;EAAI,CAAA,CAAA;AAC3B,QAAO;;AAEX,eAAe,SAAS;CAAC;CAAW;CAAW;CAAY;CAAA;CAAA"}
1
+ {"version":3,"file":"get-command-tree.mjs","names":[],"sources":["../../src/plugin-utils/get-command-tree.ts"],"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 type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\nimport { isDynamicPathSegment } from \"./context-helpers\";\nimport { traverseCommands } from \"./traverse-command-tree\";\n\n/**\n * Retrieves a specific command tree based on the provided path.\n *\n * @param context - The build context containing the command definitions.\n * @param path - An array of strings representing the command path.\n * @returns The command tree at the specified path, or null if not found.\n */\nexport function getCommandTree(\n context: Context,\n path = [] as string[]\n): CommandTree | null {\n if (path.length === 0) {\n return null;\n }\n\n let currentTree: CommandTree | null = context.commands[path[0]!] ?? null;\n if (path.length > 1) {\n const segments = path\n .slice(1)\n .filter(segment => !isDynamicPathSegment(segment));\n for (const segment of segments) {\n if (\n currentTree?.children &&\n Object.prototype.hasOwnProperty.call(currentTree.children, segment)\n ) {\n currentTree = currentTree.children[segment] ?? null;\n } else {\n return null;\n }\n }\n }\n\n return currentTree;\n}\n\n/**\n * Retrieves a list of all command trees defined in the context.\n *\n * @param context - The build context containing the command definitions.\n * @returns A promise that resolves to an array of all command trees in the context.\n */\nexport async function getCommandList(context: Context): Promise<CommandTree[]> {\n const commandList: CommandTree[] = [];\n await traverseCommands(context, commandTree => {\n commandList.push(commandTree);\n });\n\n return commandList;\n}\n"],"mappings":";;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;;;AAYV,KAAK,KAAO,WAAW;;AAIxB,KAAO,KAAM,SAAC,GAAW;EAClB,MAAO,WAAU,KACf,MAAA,EAAA,CACA,OAAA,cAAwB,YAAW,CAAC,qBAAa,QAAA,EAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;iCAExD,KAAA,aAAA,YACa,OAAQ,UAAS,eAAc,KAAI,YAAa,UAAA,QAAA,CAC9D,eAAA,YAAA,SAAA,YAAA;MAGe,QAAO;;AAIrB,QAAS;;AAEX,eAAW,SAAa;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOzB,eAAc,eAAA,SAAA;CACV,MAAG,cAAiB,EAAE;AACtB,OAAK,iBAAiB,SAAU,cAAA,gBAAA;AAC5B,cAAC,KAAA,YAAA;IACF;EAAC;EAAa;EAAA;EAAU,CAAA,CAAA;AAC3B,QAAI;;AAER,eAAQ,SAAc;CAAA;CAAY;CAAS;CAAgB;CAAA;CAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_context_helpers = require('./context-helpers.cjs');
2
3
  const require_reflect = require('./reflect.cjs');
3
4
  const require_type_checks = require('./type-checks.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"reflect.cjs","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"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 type { CommandOption } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * Sort command options alphabetically by name, placing boolean options with negatives appropriately.\n *\n * @param options - The array of command options to sort.\n * @returns A new array of sorted command options.\n */\nexport function sortOptions(options: CommandOption[]): CommandOption[] {\n if (!options || options.length === 0) {\n return [];\n }\n\n return options\n .filter(\n arg => arg.kind !== CommandParameterKinds.boolean || !arg.isNegativeOf\n )\n .sort((a, b) => a.name.localeCompare(b.name))\n .reduce((ret, arg) => {\n ret.push(arg);\n\n if (arg.kind === CommandParameterKinds.boolean) {\n // Add the negative argument if it exists\n const negativeArg = options.find(\n a =>\n a.kind === CommandParameterKinds.boolean &&\n a.isNegativeOf === arg.name\n );\n if (negativeArg) {\n ret.push(negativeArg);\n }\n }\n\n return ret;\n }, [] as CommandOption[]);\n}\n"],"mappings":";;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AASX,SAAgB,YAAY,SAAS;AACjC,KAAI,CAAC,WAAW,QAAQ,WAAW;gBAI9B,OAAO,cAAa,QAAO,IAAI,SAAS,4CAAqB,WAAA,CAAA,IAAA,cAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;;;;;KAE7D,OAAO,cAAc,KAAK,QAAQ;AACnC,MAAI,KAAK,IAAI;;GAGT,MAAM,cAAc,QAAQ,KAAK,cAAa,MAAK,EAAE,SAAS,4CAAsB,WAC/F,EAAA,iBAAA,IAAA,MAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA;AACW,OAAI,YACA,KAAI,KAAK,YAAY;;AAG7B,SAAO;IACR;EAAC;EAAK;EAAA;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"reflect.cjs","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"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 type { CommandOption } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * Sort command options alphabetically by name, placing boolean options with negatives appropriately.\n *\n * @param options - The array of command options to sort.\n * @returns A new array of sorted command options.\n */\nexport function sortOptions(options: CommandOption[]): CommandOption[] {\n if (!options || options.length === 0) {\n return [];\n }\n\n return options\n .filter(\n arg => arg.kind !== CommandParameterKinds.boolean || !arg.isNegativeOf\n )\n .sort((a, b) => a.name.localeCompare(b.name))\n .reduce((ret, arg) => {\n ret.push(arg);\n\n if (arg.kind === CommandParameterKinds.boolean) {\n // Add the negative argument if it exists\n const negativeArg = options.find(\n a =>\n a.kind === CommandParameterKinds.boolean &&\n a.isNegativeOf === arg.name\n );\n if (negativeArg) {\n ret.push(negativeArg);\n }\n }\n\n return ret;\n }, [] as CommandOption[]);\n}\n"],"mappings":";;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AASX,SAAgB,YAAW,SAAQ;AAClC,KAAO,CAAC,WAAW,QAAO,WAAQ;gBAI1B,OAAO,cAAa,QAAO,IAAI,SAAS,4CAAqB,WAAA,CAAA,IAAA,cAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;;;;;KAE/D,OAAO,cAAgB,KAAK,QAAI;AAC/B,MAAC,KAAA,IAAA;;GAGD,MAAQ,cAAQ,QAAe,KAAG,cAAc,MAAO,EAAC,SAAQ,4CAAe,WACtF,EAAA,iBAAA,IAAA,MAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA;AACS,OAAA,YACI,KAAI,KAAM,YAAU;;AAG3B,SAAQ;IACX;EAAA;EAAS;EAAA;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { CommandOption } from "../types/command.cjs";
2
2
 
3
3
  //#region src/plugin-utils/reflect.d.ts
4
-
5
4
  /**
6
5
  * Sort command options alphabetically by name, placing boolean options with negatives appropriately.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"reflect.d.cts","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,WAAA,UAAqB,kBAAkB"}
1
+ {"version":3,"file":"reflect.d.cts","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,WAAA,CAAY,OAAA,EAAS,aAAA,KAAkB,aAAA"}
@@ -1,7 +1,6 @@
1
1
  import { CommandOption } from "../types/command.mjs";
2
2
 
3
3
  //#region src/plugin-utils/reflect.d.ts
4
-
5
4
  /**
6
5
  * Sort command options alphabetically by name, placing boolean options with negatives appropriately.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"reflect.d.mts","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,WAAA,UAAqB,kBAAkB"}
1
+ {"version":3,"file":"reflect.d.mts","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,WAAA,CAAY,OAAA,EAAS,aAAA,KAAkB,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"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 type { CommandOption } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * Sort command options alphabetically by name, placing boolean options with negatives appropriately.\n *\n * @param options - The array of command options to sort.\n * @returns A new array of sorted command options.\n */\nexport function sortOptions(options: CommandOption[]): CommandOption[] {\n if (!options || options.length === 0) {\n return [];\n }\n\n return options\n .filter(\n arg => arg.kind !== CommandParameterKinds.boolean || !arg.isNegativeOf\n )\n .sort((a, b) => a.name.localeCompare(b.name))\n .reduce((ret, arg) => {\n ret.push(arg);\n\n if (arg.kind === CommandParameterKinds.boolean) {\n // Add the negative argument if it exists\n const negativeArg = options.find(\n a =>\n a.kind === CommandParameterKinds.boolean &&\n a.isNegativeOf === arg.name\n );\n if (negativeArg) {\n ret.push(negativeArg);\n }\n }\n\n return ret;\n }, [] as CommandOption[]);\n}\n"],"mappings":";;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AASX,SAAgB,YAAY,SAAS;AACjC,KAAI,CAAC,WAAW,QAAQ,WAAW;gBAI9B,OAAO,cAAa,QAAO,IAAI,SAAS,sBAAqB,WAAA,CAAA,IAAA,cAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;;;;;KAE7D,OAAO,cAAc,KAAK,QAAQ;AACnC,MAAI,KAAK,IAAI;;GAGT,MAAM,cAAc,QAAQ,KAAK,cAAa,MAAK,EAAE,SAAS,sBAAsB,WAC/F,EAAA,iBAAA,IAAA,MAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA;AACW,OAAI,YACA,KAAI,KAAK,YAAY;;AAG7B,SAAO;IACR;EAAC;EAAK;EAAA;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/plugin-utils/reflect.ts"],"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 type { CommandOption } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * Sort command options alphabetically by name, placing boolean options with negatives appropriately.\n *\n * @param options - The array of command options to sort.\n * @returns A new array of sorted command options.\n */\nexport function sortOptions(options: CommandOption[]): CommandOption[] {\n if (!options || options.length === 0) {\n return [];\n }\n\n return options\n .filter(\n arg => arg.kind !== CommandParameterKinds.boolean || !arg.isNegativeOf\n )\n .sort((a, b) => a.name.localeCompare(b.name))\n .reduce((ret, arg) => {\n ret.push(arg);\n\n if (arg.kind === CommandParameterKinds.boolean) {\n // Add the negative argument if it exists\n const negativeArg = options.find(\n a =>\n a.kind === CommandParameterKinds.boolean &&\n a.isNegativeOf === arg.name\n );\n if (negativeArg) {\n ret.push(negativeArg);\n }\n }\n\n return ret;\n }, [] as CommandOption[]);\n}\n"],"mappings":";;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AASX,SAAgB,YAAW,SAAQ;AAClC,KAAO,CAAC,WAAW,QAAO,WAAQ;gBAI1B,OAAO,cAAa,QAAO,IAAI,SAAS,sBAAqB,WAAA,CAAA,IAAA,cAAA;EAAA;EAAA;EAAA;EAAA,CAAA,CAAA;;;;;KAE/D,OAAO,cAAgB,KAAK,QAAI;AAC/B,MAAC,KAAA,IAAA;;GAGD,MAAQ,cAAQ,QAAe,KAAG,cAAc,MAAO,EAAC,SAAQ,sBAAe,WACtF,EAAA,iBAAA,IAAA,MAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA;AACS,OAAA,YACI,KAAI,KAAM,YAAU;;AAG3B,SAAQ;IACX;EAAA;EAAS;EAAA;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-command-tree.cjs","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"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 type { MaybePromise } from \"@stryke/types/base\";\nimport type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\n\n/**\n * Traverses a command tree and applies a visitor function to each node.\n *\n * @param commandTree - The command tree to traverse.\n * @param visitor - The visitor function to apply to each node.\n */\nexport async function traverseCommandTree(\n commandTree: CommandTree,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!commandTree.children) {\n return;\n }\n\n await Promise.all(\n Object.values(commandTree.children).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n\n/**\n * Traverses all commands in the context and applies a visitor function to each command tree.\n *\n * @param context - The build context containing the command definitions.\n * @param visitor - The visitor function to apply to each command tree.\n */\nexport async function traverseCommands<TContext extends Context>(\n context: TContext,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!context.commands) {\n return;\n }\n\n await Promise.all(\n Object.values(context.commands).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n"],"mappings":";;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AAQX,eAAsB,oBAAoB,aAAa,SAAS;AAC5D,KAAI,CAAC,YAAY,SACb;AAEJ,OAAM,QAAQ,IAAI,OAAO,OAAO,YAAA,SAAA,CAAA,IAAA,aAAA,OAAA,cAAA;;AAE5B,QAAM,oBAAoB,WAAW,QAAQ;;;;;;;AAGrD,oBAAoB,SAAS;CAAC;CAAe;CAAM;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOnD,eAAsB,iBAAiB,SAAS,SAAS;AACvD,KAAA,CAAA,QAAA,SACM;AAEJ,OAAM,QAAQ,IAAI,OAAO,OAAO,QAAQ,SAAO,CAAA,IAAA,aAAA,OAAA,cAAA;AAC3C,QAAM,QAAG,QAAA,QAAA,UAAA,CAAA;AACT,QAAM,oBAAe,WAAA,QAAA;IACtB;EAAC;EAAE;EAAA;EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"traverse-command-tree.cjs","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"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 type { MaybePromise } from \"@stryke/types/base\";\nimport type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\n\n/**\n * Traverses a command tree and applies a visitor function to each node.\n *\n * @param commandTree - The command tree to traverse.\n * @param visitor - The visitor function to apply to each node.\n */\nexport async function traverseCommandTree(\n commandTree: CommandTree,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!commandTree.children) {\n return;\n }\n\n await Promise.all(\n Object.values(commandTree.children).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n\n/**\n * Traverses all commands in the context and applies a visitor function to each command tree.\n *\n * @param context - The build context containing the command definitions.\n * @param visitor - The visitor function to apply to each command tree.\n */\nexport async function traverseCommands<TContext extends Context>(\n context: TContext,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!context.commands) {\n return;\n }\n\n await Promise.all(\n Object.values(context.commands).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n"],"mappings":";;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AAQX,eAAsB,oBAAoB,aAAU,SAAS;AAC5D,KAAA,CAAA,YAAoB,SACb;AAEP,OAAK,QAAQ,IAAA,OAAa,OAAS,YAAA,SAAA,CAAA,IAAA,aAAA,OAAA,cAAA;;AAE5B,QAAM,oBAAoB,WAAW,QAAQ;;;;;;;AAGrD,oBAAc,SAAc;CAAA;CAAe;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOnD,eAAoB,iBAAY,SAAY,SAAa;AACvD,KAAA,CAAA,QAAA,SACK;AAEL,OAAQ,QAAQ,IAAA,OAAW,OAAK,QAAA,SAAiB,CAAA,IAAA,aAAA,OAAA,cAAA;AAChD,QAAQ,QAAM,QAAA,QAAA,UAAA,CAAA;AACV,QAAA,oBAAsB,WAAA,QAAA;IACzB;EAAA;EAAM;EAAA;EAAA,CAAA,CAAA,CAAA"}
@@ -3,7 +3,6 @@ import { Context } from "../types/context.cjs";
3
3
  import { MaybePromise } from "@stryke/types/base";
4
4
 
5
5
  //#region src/plugin-utils/traverse-command-tree.d.ts
6
-
7
6
  /**
8
7
  * Traverses a command tree and applies a visitor function to each node.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-command-tree.d.cts","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;;AAGG,iBAHmB,mBAAA,CAGnB,WAAA,EAFY,WAEZ,EAAA,OAAA,EAAA,CAAA,IAAA,EADe,WACf,EAAA,GAD+B,YAC/B,CAAA,IAAA,CAAA,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA;;AAmBH;;;;;AAGG,iBAHmB,gBAGnB,CAAA,iBAHqD,OAGrD,CAAA,CAAA,OAAA,EAFQ,QAER,EAAA,OAAA,EAAA,CAAA,IAAA,EADe,WACf,EAAA,GAD+B,YAC/B,CAAA,IAAA,CAAA,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"traverse-command-tree.d.cts","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"mappings":";;;;;;;AA4BA;;;;iBAAsB,mBAAA,CACpB,WAAA,EAAa,WAAA,EACb,OAAA,GAAU,IAAA,EAAM,WAAA,KAAgB,YAAA,SAC/B,OAAA;;;;;;;iBAmBmB,gBAAA,kBAAkC,OAAA,CAAA,CACtD,OAAA,EAAS,QAAA,EACT,OAAA,GAAU,IAAA,EAAM,WAAA,KAAgB,YAAA,SAC/B,OAAA"}
@@ -3,7 +3,6 @@ import { Context } from "../types/context.mjs";
3
3
  import { MaybePromise } from "@stryke/types/base";
4
4
 
5
5
  //#region src/plugin-utils/traverse-command-tree.d.ts
6
-
7
6
  /**
8
7
  * Traverses a command tree and applies a visitor function to each node.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-command-tree.d.mts","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;;AAGG,iBAHmB,mBAAA,CAGnB,WAAA,EAFY,WAEZ,EAAA,OAAA,EAAA,CAAA,IAAA,EADe,WACf,EAAA,GAD+B,YAC/B,CAAA,IAAA,CAAA,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA;;AAmBH;;;;;AAGG,iBAHmB,gBAGnB,CAAA,iBAHqD,OAGrD,CAAA,CAAA,OAAA,EAFQ,QAER,EAAA,OAAA,EAAA,CAAA,IAAA,EADe,WACf,EAAA,GAD+B,YAC/B,CAAA,IAAA,CAAA,CAAA,EAAA,OAAA,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"traverse-command-tree.d.mts","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"mappings":";;;;;;;AA4BA;;;;iBAAsB,mBAAA,CACpB,WAAA,EAAa,WAAA,EACb,OAAA,GAAU,IAAA,EAAM,WAAA,KAAgB,YAAA,SAC/B,OAAA;;;;;;;iBAmBmB,gBAAA,kBAAkC,OAAA,CAAA,CACtD,OAAA,EAAS,QAAA,EACT,OAAA,GAAU,IAAA,EAAM,WAAA,KAAgB,YAAA,SAC/B,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse-command-tree.mjs","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"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 type { MaybePromise } from \"@stryke/types/base\";\nimport type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\n\n/**\n * Traverses a command tree and applies a visitor function to each node.\n *\n * @param commandTree - The command tree to traverse.\n * @param visitor - The visitor function to apply to each node.\n */\nexport async function traverseCommandTree(\n commandTree: CommandTree,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!commandTree.children) {\n return;\n }\n\n await Promise.all(\n Object.values(commandTree.children).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n\n/**\n * Traverses all commands in the context and applies a visitor function to each command tree.\n *\n * @param context - The build context containing the command definitions.\n * @param visitor - The visitor function to apply to each command tree.\n */\nexport async function traverseCommands<TContext extends Context>(\n context: TContext,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!context.commands) {\n return;\n }\n\n await Promise.all(\n Object.values(context.commands).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n"],"mappings":";AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AAQX,eAAsB,oBAAoB,aAAa,SAAS;AAC5D,KAAI,CAAC,YAAY,SACb;AAEJ,OAAM,QAAQ,IAAI,OAAO,OAAO,YAAA,SAAA,CAAA,IAAA,aAAA,OAAA,cAAA;;AAE5B,QAAM,oBAAoB,WAAW,QAAQ;;;;;;;AAGrD,oBAAoB,SAAS;CAAC;CAAe;CAAM;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOnD,eAAsB,iBAAiB,SAAS,SAAS;AACvD,KAAA,CAAA,QAAA,SACM;AAEJ,OAAM,QAAQ,IAAI,OAAO,OAAO,QAAQ,SAAO,CAAA,IAAA,aAAA,OAAA,cAAA;AAC3C,QAAM,QAAG,QAAA,QAAA,UAAA,CAAA;AACT,QAAM,oBAAe,WAAA,QAAA;IACtB;EAAC;EAAE;EAAA;EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"traverse-command-tree.mjs","names":[],"sources":["../../src/plugin-utils/traverse-command-tree.ts"],"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 type { MaybePromise } from \"@stryke/types/base\";\nimport type { CommandTree } from \"../types/command\";\nimport type { Context } from \"../types/context\";\n\n/**\n * Traverses a command tree and applies a visitor function to each node.\n *\n * @param commandTree - The command tree to traverse.\n * @param visitor - The visitor function to apply to each node.\n */\nexport async function traverseCommandTree(\n commandTree: CommandTree,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!commandTree.children) {\n return;\n }\n\n await Promise.all(\n Object.values(commandTree.children).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n\n/**\n * Traverses all commands in the context and applies a visitor function to each command tree.\n *\n * @param context - The build context containing the command definitions.\n * @param visitor - The visitor function to apply to each command tree.\n */\nexport async function traverseCommands<TContext extends Context>(\n context: TContext,\n visitor: (node: CommandTree) => MaybePromise<void>\n): Promise<void> {\n if (!context.commands) {\n return;\n }\n\n await Promise.all(\n Object.values(context.commands).map(async childTree => {\n await Promise.resolve(visitor(childTree));\n await traverseCommandTree(childTree, visitor);\n })\n );\n}\n"],"mappings":";AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AAQX,eAAsB,oBAAoB,aAAU,SAAS;AAC5D,KAAA,CAAA,YAAoB,SACb;AAEP,OAAK,QAAQ,IAAA,OAAa,OAAS,YAAA,SAAA,CAAA,IAAA,aAAA,OAAA,cAAA;;AAE5B,QAAM,oBAAoB,WAAW,QAAQ;;;;;;;AAGrD,oBAAc,SAAc;CAAA;CAAe;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOnD,eAAoB,iBAAY,SAAY,SAAa;AACvD,KAAA,CAAA,QAAA,SACK;AAEL,OAAQ,QAAQ,IAAA,OAAW,OAAK,QAAA,SAAiB,CAAA,IAAA,aAAA,OAAA,cAAA;AAChD,QAAQ,QAAM,QAAA,QAAA,UAAA,CAAA;AACV,QAAA,oBAAsB,WAAA,QAAA;IACzB;EAAA;EAAM;EAAA;EAAA,CAAA,CAAA,CAAA"}
@@ -1,8 +1,8 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
2
  const require_types_command = require('../types/command.cjs');
3
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
4
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
- let __stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
3
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
4
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
5
+ let _stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
6
6
 
7
7
  //#region src/plugin-utils/type-checks.ts
8
8
  /**
@@ -12,7 +12,7 @@ let __stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
12
12
  * @returns True if the value is a valid {@link CommandParameterKind} type, false otherwise.
13
13
  */
14
14
  function isCommandParameterKind(obj) {
15
- return (0, __stryke_type_checks_is_set_string.isSetString)(obj) && [
15
+ return (0, _stryke_type_checks_is_set_string.isSetString)(obj) && [
16
16
  require_types_command.CommandParameterKinds.string,
17
17
  require_types_command.CommandParameterKinds.number,
18
18
  require_types_command.CommandParameterKinds.boolean
@@ -30,7 +30,7 @@ isCommandParameterKind.__type = [
30
30
  * @returns True if the value is a valid {@link CommandParameterConfig} type, false otherwise.
31
31
  */
32
32
  function isCommandParameterConfig(obj) {
33
- return (0, __stryke_type_checks_is_set_object.isSetObject)(obj) && "kind" in obj && isCommandParameterKind(obj.kind);
33
+ return (0, _stryke_type_checks_is_set_object.isSetObject)(obj) && "kind" in obj && isCommandParameterKind(obj.kind);
34
34
  }
35
35
  isCommandParameterConfig.__type = [
36
36
  "obj",
@@ -44,7 +44,7 @@ isCommandParameterConfig.__type = [
44
44
  * @returns True if the value is a valid {@link CommandParameter} type, false otherwise.
45
45
  */
46
46
  function isCommandParameter(obj) {
47
- return isCommandParameterConfig(obj) && "name" in obj && (0, __stryke_type_checks_is_set_string.isSetString)(obj.name) && "title" in obj && (0, __stryke_type_checks_is_set_string.isSetString)(obj.title) && "description" in obj && (0, __stryke_type_checks_is_set_string.isSetString)(obj.description) && "alias" in obj && Array.isArray(obj.alias) && "env" in obj && ((0, __stryke_type_checks_is_set_string.isSetString)(obj.env) || obj.env === false) && "optional" in obj && (0, __stryke_type_checks_is_boolean.isBoolean)(obj.optional) && "variadic" in obj && (0, __stryke_type_checks_is_boolean.isBoolean)(obj.variadic);
47
+ return isCommandParameterConfig(obj) && "name" in obj && (0, _stryke_type_checks_is_set_string.isSetString)(obj.name) && "title" in obj && (0, _stryke_type_checks_is_set_string.isSetString)(obj.title) && "description" in obj && (0, _stryke_type_checks_is_set_string.isSetString)(obj.description) && "alias" in obj && Array.isArray(obj.alias) && "env" in obj && ((0, _stryke_type_checks_is_set_string.isSetString)(obj.env) || obj.env === false) && "optional" in obj && (0, _stryke_type_checks_is_boolean.isBoolean)(obj.optional) && "variadic" in obj && (0, _stryke_type_checks_is_boolean.isBoolean)(obj.variadic);
48
48
  }
49
49
  isCommandParameter.__type = [
50
50
  "obj",