@shell-shock/core 0.17.21 → 0.17.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +16 -7
  2. package/dist/api.cjs +4 -5
  3. package/dist/api.d.cts +1 -1
  4. package/dist/api.d.mts +1 -1
  5. package/dist/api.mjs +2 -2
  6. package/dist/command-B6KYexlV.d.mts +308 -0
  7. package/dist/command-B6KYexlV.d.mts.map +1 -0
  8. package/dist/command-CtfR7hKM.d.cts +308 -0
  9. package/dist/command-CtfR7hKM.d.cts.map +1 -0
  10. package/dist/components/command-validation-logic.cjs +153 -216
  11. package/dist/components/command-validation-logic.d.cts +2 -1
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +2 -1
  14. package/dist/components/command-validation-logic.mjs +153 -214
  15. package/dist/components/docs.cjs +6 -364
  16. package/dist/components/docs.d.cts +2 -3
  17. package/dist/components/docs.d.cts.map +1 -1
  18. package/dist/components/docs.d.mts +2 -3
  19. package/dist/components/docs.mjs +2 -356
  20. package/dist/components/exec-builtin.cjs +63 -100
  21. package/dist/components/exec-builtin.d.cts +1 -2
  22. package/dist/components/exec-builtin.d.cts.map +1 -1
  23. package/dist/components/exec-builtin.d.mts +1 -2
  24. package/dist/components/exec-builtin.mjs +7 -41
  25. package/dist/components/helpers.cjs +2 -52
  26. package/dist/components/helpers.d.cts +2 -1
  27. package/dist/components/helpers.d.cts.map +1 -1
  28. package/dist/components/helpers.d.mts +2 -1
  29. package/dist/components/helpers.mjs +2 -50
  30. package/dist/components/index.cjs +7 -23
  31. package/dist/components/index.mjs +9 -9
  32. package/dist/components/options-parser-logic.cjs +198 -420
  33. package/dist/components/options-parser-logic.d.cts +2 -5
  34. package/dist/components/options-parser-logic.d.cts.map +1 -1
  35. package/dist/components/options-parser-logic.d.mts +2 -5
  36. package/dist/components/options-parser-logic.mjs +192 -407
  37. package/dist/components/state-builtin.cjs +106 -164
  38. package/dist/components/state-builtin.d.cts +1 -2
  39. package/dist/components/state-builtin.d.cts.map +1 -1
  40. package/dist/components/state-builtin.d.mts +1 -2
  41. package/dist/components/state-builtin.mjs +12 -68
  42. package/dist/components/usage.cjs +4 -48
  43. package/dist/components/usage.d.cts +1 -2
  44. package/dist/components/usage.d.cts.map +1 -1
  45. package/dist/components/usage.d.mts +1 -2
  46. package/dist/components/usage.mjs +4 -46
  47. package/dist/components/utils-builtin.cjs +77 -144
  48. package/dist/components/utils-builtin.d.cts +1 -2
  49. package/dist/components/utils-builtin.d.cts.map +1 -1
  50. package/dist/components/utils-builtin.d.mts +1 -2
  51. package/dist/components/utils-builtin.mjs +9 -74
  52. package/dist/config-BIF9mEz0.d.cts +157 -0
  53. package/dist/config-BIF9mEz0.d.cts.map +1 -0
  54. package/dist/config-CnNYdfsL.d.mts +157 -0
  55. package/dist/config-CnNYdfsL.d.mts.map +1 -0
  56. package/dist/config.cjs +24 -58
  57. package/dist/config.d.cts +1 -2
  58. package/dist/config.d.cts.map +1 -1
  59. package/dist/config.d.mts +1 -2
  60. package/dist/config.mjs +23 -55
  61. package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
  62. package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
  63. package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
  64. package/dist/contexts/command.cjs +3 -9
  65. package/dist/contexts/command.d.cts +1 -2
  66. package/dist/contexts/command.d.cts.map +1 -1
  67. package/dist/contexts/command.d.mts +1 -2
  68. package/dist/contexts/command.mjs +2 -7
  69. package/dist/contexts/index.cjs +19 -1
  70. package/dist/contexts/index.d.cts +2 -1
  71. package/dist/contexts/index.d.mts +2 -1
  72. package/dist/contexts/index.mjs +2 -1
  73. package/dist/contexts/options.cjs +7 -30
  74. package/dist/contexts/options.d.cts +1 -2
  75. package/dist/contexts/options.d.cts.map +1 -1
  76. package/dist/contexts/options.d.mts +1 -2
  77. package/dist/contexts/options.mjs +7 -27
  78. package/dist/contexts/power-plant.cjs +19 -0
  79. package/dist/contexts/power-plant.d.cts +2 -0
  80. package/dist/contexts/power-plant.d.mts +2 -0
  81. package/dist/contexts/power-plant.mjs +5 -0
  82. package/dist/docs-C6ZvsVMu.cjs +278 -0
  83. package/dist/docs-CGQ2HtEY.mjs +249 -0
  84. package/dist/docs-CGQ2HtEY.mjs.map +1 -0
  85. package/dist/engine.cjs +5 -39
  86. package/dist/engine.d.cts +1 -2
  87. package/dist/engine.d.cts.map +1 -1
  88. package/dist/engine.d.mts +1 -2
  89. package/dist/engine.mjs +4 -37
  90. package/dist/generator.cjs +68 -0
  91. package/dist/generator.d.cts +15 -0
  92. package/dist/generator.d.cts.map +1 -0
  93. package/dist/generator.d.mts +15 -0
  94. package/dist/generator.d.mts.map +1 -0
  95. package/dist/generator.mjs +66 -0
  96. package/dist/generator.mjs.map +1 -0
  97. package/dist/{helpers/get-framework.cjs → get-framework-CxZc2krd.cjs} +7 -8
  98. package/dist/{helpers/get-framework.mjs → get-framework-Dlqz2hVZ.mjs} +3 -8
  99. package/dist/get-framework-Dlqz2hVZ.mjs.map +1 -0
  100. package/dist/helpers/power-plant.cjs +102 -0
  101. package/dist/helpers/power-plant.d.cts +61 -0
  102. package/dist/helpers/power-plant.d.cts.map +1 -0
  103. package/dist/helpers/power-plant.d.mts +61 -0
  104. package/dist/helpers/power-plant.d.mts.map +1 -0
  105. package/dist/helpers/power-plant.mjs +99 -0
  106. package/dist/helpers/power-plant.mjs.map +1 -0
  107. package/dist/index-D4klH_pj.d.mts +2 -0
  108. package/dist/index-DYOBadKY.d.cts +2 -0
  109. package/dist/index.cjs +1 -37
  110. package/dist/index.d.cts +4 -6
  111. package/dist/index.d.cts.map +1 -1
  112. package/dist/index.d.mts +4 -6
  113. package/dist/index.mjs +0 -35
  114. package/dist/package-B7Vu265G.mjs +6 -0
  115. package/dist/package-B7Vu265G.mjs.map +1 -0
  116. package/dist/{package.cjs → package-BLC4qc8t.cjs} +2 -4
  117. package/dist/plugin-B-hM2twc.mjs +1458 -0
  118. package/dist/plugin-B-hM2twc.mjs.map +1 -0
  119. package/dist/plugin-Bhfq0DMC.cjs +1490 -0
  120. package/dist/plugin-utils/index.cjs +359 -26
  121. package/dist/plugin-utils/index.d.cts +273 -9
  122. package/dist/plugin-utils/index.d.cts.map +1 -0
  123. package/dist/plugin-utils/index.d.mts +273 -9
  124. package/dist/plugin-utils/index.d.mts.map +1 -0
  125. package/dist/plugin-utils/index.mjs +346 -10
  126. package/dist/plugin-utils/index.mjs.map +1 -0
  127. package/dist/plugin.cjs +3 -496
  128. package/dist/plugin.d.cts +1 -3
  129. package/dist/plugin.d.cts.map +1 -1
  130. package/dist/plugin.d.mts +1 -3
  131. package/dist/plugin.mjs +2 -491
  132. package/dist/power-plant-LgxcvlMN.d.cts +4 -0
  133. package/dist/power-plant-LgxcvlMN.d.mts +4 -0
  134. package/dist/reflect-CSiffeL9.cjs +27 -0
  135. package/dist/reflect-DXKSFgvS.mjs +23 -0
  136. package/dist/reflect-DXKSFgvS.mjs.map +1 -0
  137. package/dist/schemas/env.cjs +91 -0
  138. package/dist/schemas/env.d.cts +145 -0
  139. package/dist/schemas/env.d.cts.map +1 -0
  140. package/dist/schemas/env.d.mts +145 -0
  141. package/dist/{types → schemas}/env.d.mts.map +1 -1
  142. package/dist/schemas/env.mjs +91 -0
  143. package/dist/schemas/index.cjs +4 -0
  144. package/dist/schemas/index.d.cts +2 -0
  145. package/dist/schemas/index.d.mts +2 -0
  146. package/dist/schemas/index.mjs +3 -0
  147. package/dist/types/command.cjs +0 -402
  148. package/dist/types/command.d.cts +2 -309
  149. package/dist/types/command.d.mts +2 -309
  150. package/dist/types/command.mjs +1 -368
  151. package/dist/types/config.cjs +0 -175
  152. package/dist/types/config.d.cts +2 -126
  153. package/dist/types/config.d.mts +2 -126
  154. package/dist/types/config.mjs +1 -164
  155. package/dist/types/context.cjs +0 -45
  156. package/dist/types/context.d.cts +2 -31
  157. package/dist/types/context.d.mts +2 -31
  158. package/dist/types/context.mjs +1 -41
  159. package/dist/types/index.cjs +3 -53
  160. package/dist/types/index.d.cts +4 -5
  161. package/dist/types/index.d.mts +4 -5
  162. package/dist/types/index.mjs +4 -5
  163. package/package.json +106 -42
  164. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  165. package/dist/api.cjs.map +0 -1
  166. package/dist/components/command-validation-logic.cjs.map +0 -1
  167. package/dist/components/docs.cjs.map +0 -1
  168. package/dist/components/docs.mjs.map +0 -1
  169. package/dist/components/exec-builtin.cjs.map +0 -1
  170. package/dist/components/helpers.cjs.map +0 -1
  171. package/dist/components/options-parser-logic.cjs.map +0 -1
  172. package/dist/components/state-builtin.cjs.map +0 -1
  173. package/dist/components/usage.cjs.map +0 -1
  174. package/dist/components/utils-builtin.cjs.map +0 -1
  175. package/dist/config.cjs.map +0 -1
  176. package/dist/contexts/command.cjs.map +0 -1
  177. package/dist/contexts/options.cjs.map +0 -1
  178. package/dist/engine.cjs.map +0 -1
  179. package/dist/helpers/automd.cjs +0 -193
  180. package/dist/helpers/automd.cjs.map +0 -1
  181. package/dist/helpers/automd.mjs +0 -190
  182. package/dist/helpers/automd.mjs.map +0 -1
  183. package/dist/helpers/docs-helpers.cjs +0 -24
  184. package/dist/helpers/docs-helpers.cjs.map +0 -1
  185. package/dist/helpers/docs-helpers.mjs +0 -24
  186. package/dist/helpers/docs-helpers.mjs.map +0 -1
  187. package/dist/helpers/get-framework.cjs.map +0 -1
  188. package/dist/helpers/get-framework.mjs.map +0 -1
  189. package/dist/helpers/paths.cjs +0 -137
  190. package/dist/helpers/paths.cjs.map +0 -1
  191. package/dist/helpers/paths.mjs +0 -134
  192. package/dist/helpers/paths.mjs.map +0 -1
  193. package/dist/helpers/persistence.cjs +0 -114
  194. package/dist/helpers/persistence.cjs.map +0 -1
  195. package/dist/helpers/persistence.mjs +0 -113
  196. package/dist/helpers/persistence.mjs.map +0 -1
  197. package/dist/helpers/update-package-json.cjs +0 -65
  198. package/dist/helpers/update-package-json.cjs.map +0 -1
  199. package/dist/helpers/update-package-json.mjs +0 -64
  200. package/dist/helpers/update-package-json.mjs.map +0 -1
  201. package/dist/helpers/utilities.cjs +0 -95
  202. package/dist/helpers/utilities.cjs.map +0 -1
  203. package/dist/helpers/utilities.mjs +0 -94
  204. package/dist/helpers/utilities.mjs.map +0 -1
  205. package/dist/helpers/validations.cjs +0 -71
  206. package/dist/helpers/validations.cjs.map +0 -1
  207. package/dist/helpers/validations.mjs +0 -70
  208. package/dist/helpers/validations.mjs.map +0 -1
  209. package/dist/index.cjs.map +0 -1
  210. package/dist/package.cjs.map +0 -1
  211. package/dist/package.mjs +0 -6
  212. package/dist/package.mjs.map +0 -1
  213. package/dist/plugin-utils/compute-bin.cjs +0 -49
  214. package/dist/plugin-utils/compute-bin.cjs.map +0 -1
  215. package/dist/plugin-utils/compute-bin.d.cts +0 -13
  216. package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
  217. package/dist/plugin-utils/compute-bin.d.mts +0 -13
  218. package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
  219. package/dist/plugin-utils/compute-bin.mjs +0 -49
  220. package/dist/plugin-utils/compute-bin.mjs.map +0 -1
  221. package/dist/plugin-utils/context-helpers.cjs.map +0 -1
  222. package/dist/plugin-utils/context-helpers.d.cts +0 -106
  223. package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
  224. package/dist/plugin-utils/context-helpers.d.mts +0 -106
  225. package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
  226. package/dist/plugin-utils/context-helpers.mjs.map +0 -1
  227. package/dist/plugin-utils/deepkit.cjs +0 -70
  228. package/dist/plugin-utils/deepkit.cjs.map +0 -1
  229. package/dist/plugin-utils/deepkit.d.cts +0 -23
  230. package/dist/plugin-utils/deepkit.d.cts.map +0 -1
  231. package/dist/plugin-utils/deepkit.d.mts +0 -23
  232. package/dist/plugin-utils/deepkit.d.mts.map +0 -1
  233. package/dist/plugin-utils/deepkit.mjs +0 -69
  234. package/dist/plugin-utils/deepkit.mjs.map +0 -1
  235. package/dist/plugin-utils/description-helpers.cjs +0 -112
  236. package/dist/plugin-utils/description-helpers.cjs.map +0 -1
  237. package/dist/plugin-utils/description-helpers.d.cts +0 -44
  238. package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
  239. package/dist/plugin-utils/description-helpers.d.mts +0 -44
  240. package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
  241. package/dist/plugin-utils/description-helpers.mjs +0 -108
  242. package/dist/plugin-utils/description-helpers.mjs.map +0 -1
  243. package/dist/plugin-utils/get-command-tree.cjs +0 -118
  244. package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
  245. package/dist/plugin-utils/get-command-tree.d.cts +0 -36
  246. package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
  247. package/dist/plugin-utils/get-command-tree.d.mts +0 -36
  248. package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
  249. package/dist/plugin-utils/get-command-tree.mjs +0 -115
  250. package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
  251. package/dist/plugin-utils/reflect.cjs +0 -54
  252. package/dist/plugin-utils/reflect.cjs.map +0 -1
  253. package/dist/plugin-utils/reflect.d.cts +0 -14
  254. package/dist/plugin-utils/reflect.d.cts.map +0 -1
  255. package/dist/plugin-utils/reflect.d.mts +0 -14
  256. package/dist/plugin-utils/reflect.d.mts.map +0 -1
  257. package/dist/plugin-utils/reflect.mjs +0 -53
  258. package/dist/plugin-utils/reflect.mjs.map +0 -1
  259. package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
  260. package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
  261. package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
  262. package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
  263. package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
  264. package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
  265. package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
  266. package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
  267. package/dist/plugin-utils/type-checks.cjs +0 -222
  268. package/dist/plugin-utils/type-checks.cjs.map +0 -1
  269. package/dist/plugin-utils/type-checks.d.cts +0 -41
  270. package/dist/plugin-utils/type-checks.d.cts.map +0 -1
  271. package/dist/plugin-utils/type-checks.d.mts +0 -41
  272. package/dist/plugin-utils/type-checks.d.mts.map +0 -1
  273. package/dist/plugin-utils/type-checks.mjs +0 -218
  274. package/dist/plugin-utils/type-checks.mjs.map +0 -1
  275. package/dist/plugin.cjs.map +0 -1
  276. package/dist/plugin.mjs.map +0 -1
  277. package/dist/resolver/deepkit.cjs +0 -110
  278. package/dist/resolver/deepkit.cjs.map +0 -1
  279. package/dist/resolver/deepkit.mjs +0 -109
  280. package/dist/resolver/deepkit.mjs.map +0 -1
  281. package/dist/resolver/helpers.cjs +0 -184
  282. package/dist/resolver/helpers.cjs.map +0 -1
  283. package/dist/resolver/helpers.mjs +0 -180
  284. package/dist/resolver/helpers.mjs.map +0 -1
  285. package/dist/resolver/resolve.cjs +0 -473
  286. package/dist/resolver/resolve.cjs.map +0 -1
  287. package/dist/resolver/resolve.mjs +0 -473
  288. package/dist/resolver/resolve.mjs.map +0 -1
  289. package/dist/types/command.cjs.map +0 -1
  290. package/dist/types/command.d.cts.map +0 -1
  291. package/dist/types/command.d.mts.map +0 -1
  292. package/dist/types/command.mjs.map +0 -1
  293. package/dist/types/config.cjs.map +0 -1
  294. package/dist/types/config.d.cts.map +0 -1
  295. package/dist/types/config.d.mts.map +0 -1
  296. package/dist/types/config.mjs.map +0 -1
  297. package/dist/types/context.cjs.map +0 -1
  298. package/dist/types/context.d.cts.map +0 -1
  299. package/dist/types/context.d.mts.map +0 -1
  300. package/dist/types/context.mjs.map +0 -1
  301. package/dist/types/env.cjs +0 -53
  302. package/dist/types/env.cjs.map +0 -1
  303. package/dist/types/env.d.cts +0 -71
  304. package/dist/types/env.d.cts.map +0 -1
  305. package/dist/types/env.d.mts +0 -71
  306. package/dist/types/env.mjs +0 -51
  307. /package/dist/{types → schemas}/env.mjs.map +0 -0
@@ -1,70 +0,0 @@
1
- const require_type_checks = require('./type-checks.cjs');
2
- let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
4
-
5
- //#region src/plugin-utils/deepkit.ts
6
- /**
7
- * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
8
- *
9
- * @param command - The command parameter or kind to extract the reflection kind from.
10
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
11
- * @returns The extracted {@link ReflectionKind}.
12
- */
13
- function extractReflectionKind(command, checkVariadic = true) {
14
- if (require_type_checks.isCommandParameterType(command) && command === "string" || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.type === "string") return checkVariadic && command.variadic ? _powerlines_deepkit_vendor_type.ReflectionKind.array : _powerlines_deepkit_vendor_type.ReflectionKind.string;
15
- else if (require_type_checks.isCommandParameterType(command) && command === "number" || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.type === "number") return checkVariadic && command.variadic ? _powerlines_deepkit_vendor_type.ReflectionKind.array : _powerlines_deepkit_vendor_type.ReflectionKind.number;
16
- else if (require_type_checks.isCommandParameterType(command) && command === "boolean" || (0, _stryke_type_checks_is_set_object.isSetObject)(command) && command.type === "boolean") return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
17
- else return _powerlines_deepkit_vendor_type.ReflectionKind.string;
18
- }
19
- extractReflectionKind.__type = [
20
- "BaseCommandParameter",
21
- "CommandParameterType",
22
- "command",
23
- "checkVariadic",
24
- "extractReflectionKind",
25
- "Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.",
26
- "PP\"w!\"w\"J2#\"2$!/%?&"
27
- ];
28
- /**
29
- * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
30
- *
31
- * @param command - The command parameter or kind to extract the type from.
32
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
33
- * @returns The extracted {@link Type}.
34
- */
35
- function extractType(command, checkVariadic = true) {
36
- const reflectionKind = extractReflectionKind(command, checkVariadic);
37
- if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.string) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string };
38
- else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.number) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.number };
39
- else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.boolean) return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.boolean };
40
- else if (reflectionKind === _powerlines_deepkit_vendor_type.ReflectionKind.array) if (require_type_checks.isCommandParameterType(command)) return {
41
- kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
42
- type: extractType({ type: command }, false)
43
- };
44
- else if ((0, _stryke_type_checks_is_set_object.isSetObject)(command)) return {
45
- kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
46
- type: extractType({
47
- ...command,
48
- type: command.type
49
- }, false)
50
- };
51
- else return {
52
- kind: _powerlines_deepkit_vendor_type.ReflectionKind.array,
53
- type: { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string }
54
- };
55
- else return { kind: _powerlines_deepkit_vendor_type.ReflectionKind.string };
56
- }
57
- extractType.__type = [
58
- "BaseCommandParameter",
59
- "CommandParameterType",
60
- "command",
61
- "checkVariadic",
62
- "extractType",
63
- "Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.",
64
- "PP\"w!\"w\"J2#\"2$!/%?&"
65
- ];
66
-
67
- //#endregion
68
- exports.extractReflectionKind = extractReflectionKind;
69
- exports.extractType = extractType;
70
- //# sourceMappingURL=deepkit.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepkit.cjs","names":[],"sources":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { BaseCommandParameter, CommandParameterType } from "../types/command.cjs";
2
- import { ReflectionKind, Type } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/plugin-utils/deepkit.d.ts
5
- /**
6
- * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
7
- *
8
- * @param command - The command parameter or kind to extract the reflection kind from.
9
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
10
- * @returns The extracted {@link ReflectionKind}.
11
- */
12
- declare function extractReflectionKind(command: BaseCommandParameter | CommandParameterType, checkVariadic?: boolean): ReflectionKind;
13
- /**
14
- * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
15
- *
16
- * @param command - The command parameter or kind to extract the type from.
17
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
18
- * @returns The extracted {@link Type}.
19
- */
20
- declare function extractType(command: BaseCommandParameter | CommandParameterType, checkVariadic?: boolean): Type;
21
- //#endregion
22
- export { extractReflectionKind, extractType };
23
- //# sourceMappingURL=deepkit.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepkit.d.cts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"mappings":";;;;;AAmCA;;;;;;iBAAgB,qBAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,cAAA;;;;;;;;iBAgCa,WAAA,CACd,OAAA,EAAS,oBAAA,GAAuB,oBAAA,EAChC,aAAA,aACC,IAAA"}
@@ -1,23 +0,0 @@
1
- import { BaseCommandParameter, CommandParameterType } from "../types/command.mjs";
2
- import { ReflectionKind, Type } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/plugin-utils/deepkit.d.ts
5
- /**
6
- * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
7
- *
8
- * @param command - The command parameter or kind to extract the reflection kind from.
9
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
10
- * @returns The extracted {@link ReflectionKind}.
11
- */
12
- declare function extractReflectionKind(command: BaseCommandParameter | CommandParameterType, checkVariadic?: boolean): ReflectionKind;
13
- /**
14
- * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
15
- *
16
- * @param command - The command parameter or kind to extract the type from.
17
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
18
- * @returns The extracted {@link Type}.
19
- */
20
- declare function extractType(command: BaseCommandParameter | CommandParameterType, checkVariadic?: boolean): Type;
21
- //#endregion
22
- export { extractReflectionKind, extractType };
23
- //# sourceMappingURL=deepkit.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepkit.d.mts","names":[],"sources":["../../src/plugin-utils/deepkit.ts"],"mappings":""}
@@ -1,69 +0,0 @@
1
- import { isCommandParameterType } from "./type-checks.mjs";
2
- import { isSetObject } from "@stryke/type-checks/is-set-object";
3
- import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
4
-
5
- //#region src/plugin-utils/deepkit.ts
6
- /**
7
- * Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
8
- *
9
- * @param command - The command parameter or kind to extract the reflection kind from.
10
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
11
- * @returns The extracted {@link ReflectionKind}.
12
- */
13
- function extractReflectionKind(command, checkVariadic = true) {
14
- if (isCommandParameterType(command) && command === "string" || isSetObject(command) && command.type === "string") return checkVariadic && command.variadic ? ReflectionKind.array : ReflectionKind.string;
15
- else if (isCommandParameterType(command) && command === "number" || isSetObject(command) && command.type === "number") return checkVariadic && command.variadic ? ReflectionKind.array : ReflectionKind.number;
16
- else if (isCommandParameterType(command) && command === "boolean" || isSetObject(command) && command.type === "boolean") return ReflectionKind.boolean;
17
- else return ReflectionKind.string;
18
- }
19
- extractReflectionKind.__type = [
20
- "BaseCommandParameter",
21
- "CommandParameterType",
22
- "command",
23
- "checkVariadic",
24
- "extractReflectionKind",
25
- "Extracts a {@link ReflectionKind} from a {@link BaseCommandParameter} or {@link CommandParameterType}.",
26
- "PP\"w!\"w\"J2#\"2$!/%?&"
27
- ];
28
- /**
29
- * Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.
30
- *
31
- * @param command - The command parameter or kind to extract the type from.
32
- * @param checkVariadic - Whether to check for variadic parameters (arrays).
33
- * @returns The extracted {@link Type}.
34
- */
35
- function extractType(command, checkVariadic = true) {
36
- const reflectionKind = extractReflectionKind(command, checkVariadic);
37
- if (reflectionKind === ReflectionKind.string) return { kind: ReflectionKind.string };
38
- else if (reflectionKind === ReflectionKind.number) return { kind: ReflectionKind.number };
39
- else if (reflectionKind === ReflectionKind.boolean) return { kind: ReflectionKind.boolean };
40
- else if (reflectionKind === ReflectionKind.array) if (isCommandParameterType(command)) return {
41
- kind: ReflectionKind.array,
42
- type: extractType({ type: command }, false)
43
- };
44
- else if (isSetObject(command)) return {
45
- kind: ReflectionKind.array,
46
- type: extractType({
47
- ...command,
48
- type: command.type
49
- }, false)
50
- };
51
- else return {
52
- kind: ReflectionKind.array,
53
- type: { kind: ReflectionKind.string }
54
- };
55
- else return { kind: ReflectionKind.string };
56
- }
57
- extractType.__type = [
58
- "BaseCommandParameter",
59
- "CommandParameterType",
60
- "command",
61
- "checkVariadic",
62
- "extractType",
63
- "Extracts a {@link Type} from a {@link BaseCommandParameter} or {@link CommandParameterType}.",
64
- "PP\"w!\"w\"J2#\"2$!/%?&"
65
- ];
66
-
67
- //#endregion
68
- export { extractReflectionKind, extractType };
69
- //# sourceMappingURL=deepkit.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepkit.mjs","names":[],"sources":[],"mappings":""}
@@ -1,112 +0,0 @@
1
-
2
- //#region src/plugin-utils/description-helpers.ts
3
- const __ΩFormatDescriptionOptions = [
4
- "replaceNewlines",
5
- true,
6
- "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.",
7
- "collapseWhitespace",
8
- "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.",
9
- "FormatDescriptionOptions",
10
- "P)4!8>\"?#)4$8>\"?%Mw&y"
11
- ];
12
- /**
13
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
14
- *
15
- * @remarks
16
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
17
- *
18
- * @param description - The full description string.
19
- * @returns The formatted description string.
20
- */
21
- function formatDescriptionWhitespace(description, options = {}) {
22
- let formattedDescription = description.trim();
23
- if (options.replaceNewlines) formattedDescription = formattedDescription.replace(/\s*\n\s*/g, " ");
24
- if (options.collapseWhitespace) formattedDescription = formattedDescription.replace(/\s{2,}/g, " ");
25
- return formattedDescription.trim();
26
- }
27
- formatDescriptionWhitespace.__type = [
28
- "description",
29
- () => __ΩFormatDescriptionOptions,
30
- "options",
31
- () => ({}),
32
- "formatDescriptionWhitespace",
33
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
34
- "P&2!n\"2#>$&/%?&"
35
- ];
36
- /**
37
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
38
- *
39
- * @remarks
40
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
41
- *
42
- * @param description - The full description string.
43
- * @returns The formatted description string.
44
- */
45
- function formatDescriptionEscapes(description) {
46
- return description.replaceAll("'", "\\'").replaceAll("\"", "\\\"").replaceAll("`", "\\`").replace(/\$\{/g, "\\${");
47
- }
48
- formatDescriptionEscapes.__type = [
49
- "description",
50
- "formatDescriptionEscapes",
51
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
52
- "P&2!&/\"?#"
53
- ];
54
- /**
55
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
56
- *
57
- * @remarks
58
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
59
- *
60
- * @param description - The full description string.
61
- * @returns The formatted description string.
62
- */
63
- function formatDescription(description, options = {}) {
64
- return formatDescriptionEscapes(formatDescriptionWhitespace(description, options));
65
- }
66
- formatDescription.__type = [
67
- "description",
68
- () => __ΩFormatDescriptionOptions,
69
- "options",
70
- () => ({}),
71
- "formatDescription",
72
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
73
- "P&2!n\"2#>$&/%?&"
74
- ];
75
- const __ΩFormatShortDescriptionOptions = [
76
- () => __ΩFormatDescriptionOptions,
77
- "length",
78
- 62,
79
- "The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.",
80
- "FormatShortDescriptionOptions",
81
- "Pn!'4\"8>#?$Mw%y"
82
- ];
83
- /**
84
- * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.
85
- *
86
- * @param description - The full description string.
87
- * @param options - Options for formatting the short description, including the maximum length.
88
- * @returns The extracted short description.
89
- */
90
- function formatShortDescription(description, options = {}) {
91
- const length = options.length ?? 62;
92
- const formattedDescription = formatDescriptionWhitespace(description, options);
93
- let result = ((formattedDescription.indexOf("\n") < length - 3 || formattedDescription.search(/[.!?\n]\s*\S/) > length - 3 ? formattedDescription.match(/^.*[.!?\n]\s?\S/)?.[0]?.trim()?.slice(0, -1)?.trim() : void 0) || formattedDescription).trim();
94
- if (result.trim().length > length) result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;
95
- return formatDescriptionEscapes(result);
96
- }
97
- formatShortDescription.__type = [
98
- "description",
99
- () => __ΩFormatShortDescriptionOptions,
100
- "options",
101
- () => ({}),
102
- "formatShortDescription",
103
- "Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.",
104
- "P&2!n\"2#>$&/%?&"
105
- ];
106
-
107
- //#endregion
108
- exports.__ΩFormatDescriptionOptions = __ΩFormatDescriptionOptions;
109
- exports.__ΩFormatShortDescriptionOptions = __ΩFormatShortDescriptionOptions;
110
- exports.formatDescription = formatDescription;
111
- exports.formatShortDescription = formatShortDescription;
112
- //# sourceMappingURL=description-helpers.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-helpers.cjs","names":[],"sources":[],"mappings":""}
@@ -1,44 +0,0 @@
1
- //#region src/plugin-utils/description-helpers.d.ts
2
- interface FormatDescriptionOptions {
3
- /**
4
- * 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.
5
- *
6
- * @defaultValue false
7
- */
8
- replaceNewlines?: boolean;
9
- /**
10
- * 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.
11
- *
12
- * @defaultValue false
13
- */
14
- collapseWhitespace?: boolean;
15
- }
16
- /**
17
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
18
- *
19
- * @remarks
20
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
21
- *
22
- * @param description - The full description string.
23
- * @returns The formatted description string.
24
- */
25
- declare function formatDescription(description: string, options?: FormatDescriptionOptions): string;
26
- interface FormatShortDescriptionOptions extends FormatDescriptionOptions {
27
- /**
28
- * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.
29
- *
30
- * @defaultValue 62
31
- */
32
- length?: number;
33
- }
34
- /**
35
- * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.
36
- *
37
- * @param description - The full description string.
38
- * @param options - Options for formatting the short description, including the maximum length.
39
- * @returns The extracted short description.
40
- */
41
- declare function formatShortDescription(description: string, options?: FormatShortDescriptionOptions): string;
42
- //#endregion
43
- export { FormatDescriptionOptions, FormatShortDescriptionOptions, formatDescription, formatShortDescription };
44
- //# sourceMappingURL=description-helpers.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"mappings":";UAkBiB,wBAAA;EAAA;;;;AAaG;EAPlB,eAAA;EA4D+B;;;;;EArD/B,kBAAkB;AAAA;AAuDoB;AAOxC;;;;AAMQ;AAUR;;;AAvBwC,iBAFxB,iBAAA,CACd,WAAA,UACA,OAAA,GAAS,wBAA6B;AAAA,UAOvB,6BAAA,SAAsC,wBAAwB;EAkBpE;;;AAAkC;;EAZ3C,MAAM;AAAA;;;;;;;;iBAUQ,sBAAA,CACd,WAAA,UACA,OAAA,GAAS,6BAAkC"}
@@ -1,44 +0,0 @@
1
- //#region src/plugin-utils/description-helpers.d.ts
2
- interface FormatDescriptionOptions {
3
- /**
4
- * 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.
5
- *
6
- * @defaultValue false
7
- */
8
- replaceNewlines?: boolean;
9
- /**
10
- * 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.
11
- *
12
- * @defaultValue false
13
- */
14
- collapseWhitespace?: boolean;
15
- }
16
- /**
17
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
18
- *
19
- * @remarks
20
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
21
- *
22
- * @param description - The full description string.
23
- * @returns The formatted description string.
24
- */
25
- declare function formatDescription(description: string, options?: FormatDescriptionOptions): string;
26
- interface FormatShortDescriptionOptions extends FormatDescriptionOptions {
27
- /**
28
- * The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.
29
- *
30
- * @defaultValue 62
31
- */
32
- length?: number;
33
- }
34
- /**
35
- * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.
36
- *
37
- * @param description - The full description string.
38
- * @param options - Options for formatting the short description, including the maximum length.
39
- * @returns The extracted short description.
40
- */
41
- declare function formatShortDescription(description: string, options?: FormatShortDescriptionOptions): string;
42
- //#endregion
43
- export { FormatDescriptionOptions, FormatShortDescriptionOptions, formatDescription, formatShortDescription };
44
- //# sourceMappingURL=description-helpers.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/description-helpers.ts"],"mappings":""}
@@ -1,108 +0,0 @@
1
- //#region src/plugin-utils/description-helpers.ts
2
- const __ΩFormatDescriptionOptions = [
3
- "replaceNewlines",
4
- true,
5
- "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.",
6
- "collapseWhitespace",
7
- "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.",
8
- "FormatDescriptionOptions",
9
- "P)4!8>\"?#)4$8>\"?%Mw&y"
10
- ];
11
- /**
12
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
13
- *
14
- * @remarks
15
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
16
- *
17
- * @param description - The full description string.
18
- * @returns The formatted description string.
19
- */
20
- function formatDescriptionWhitespace(description, options = {}) {
21
- let formattedDescription = description.trim();
22
- if (options.replaceNewlines) formattedDescription = formattedDescription.replace(/\s*\n\s*/g, " ");
23
- if (options.collapseWhitespace) formattedDescription = formattedDescription.replace(/\s{2,}/g, " ");
24
- return formattedDescription.trim();
25
- }
26
- formatDescriptionWhitespace.__type = [
27
- "description",
28
- () => __ΩFormatDescriptionOptions,
29
- "options",
30
- () => ({}),
31
- "formatDescriptionWhitespace",
32
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
33
- "P&2!n\"2#>$&/%?&"
34
- ];
35
- /**
36
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
37
- *
38
- * @remarks
39
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
40
- *
41
- * @param description - The full description string.
42
- * @returns The formatted description string.
43
- */
44
- function formatDescriptionEscapes(description) {
45
- return description.replaceAll("'", "\\'").replaceAll("\"", "\\\"").replaceAll("`", "\\`").replace(/\$\{/g, "\\${");
46
- }
47
- formatDescriptionEscapes.__type = [
48
- "description",
49
- "formatDescriptionEscapes",
50
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
51
- "P&2!&/\"?#"
52
- ];
53
- /**
54
- * Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.
55
- *
56
- * @remarks
57
- * This is useful for ensuring that descriptions are concise and well-formatted when displayed in the CLI or documentation.
58
- *
59
- * @param description - The full description string.
60
- * @returns The formatted description string.
61
- */
62
- function formatDescription(description, options = {}) {
63
- return formatDescriptionEscapes(formatDescriptionWhitespace(description, options));
64
- }
65
- formatDescription.__type = [
66
- "description",
67
- () => __ΩFormatDescriptionOptions,
68
- "options",
69
- () => ({}),
70
- "formatDescription",
71
- "Formats a description string by trimming whitespace, replacing newlines with spaces (optionally), collapsing multiple spaces into a single space (optionally), and escaping special characters.",
72
- "P&2!n\"2#>$&/%?&"
73
- ];
74
- const __ΩFormatShortDescriptionOptions = [
75
- () => __ΩFormatDescriptionOptions,
76
- "length",
77
- 62,
78
- "The maximum length of the short description. If the first sentence exceeds this length, it will be truncated.",
79
- "FormatShortDescriptionOptions",
80
- "Pn!'4\"8>#?$Mw%y"
81
- ];
82
- /**
83
- * Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.
84
- *
85
- * @param description - The full description string.
86
- * @param options - Options for formatting the short description, including the maximum length.
87
- * @returns The extracted short description.
88
- */
89
- function formatShortDescription(description, options = {}) {
90
- const length = options.length ?? 62;
91
- const formattedDescription = formatDescriptionWhitespace(description, options);
92
- let result = ((formattedDescription.indexOf("\n") < length - 3 || formattedDescription.search(/[.!?\n]\s*\S/) > length - 3 ? formattedDescription.match(/^.*[.!?\n]\s?\S/)?.[0]?.trim()?.slice(0, -1)?.trim() : void 0) || formattedDescription).trim();
93
- if (result.trim().length > length) result = `${result.substring(0, Math.max(0, length - 3)).trim()}...`;
94
- return formatDescriptionEscapes(result);
95
- }
96
- formatShortDescription.__type = [
97
- "description",
98
- () => __ΩFormatShortDescriptionOptions,
99
- "options",
100
- () => ({}),
101
- "formatShortDescription",
102
- "Extracts the short description from a longer description string. The short description is typically the first sentence or the first line of the description.",
103
- "P&2!n\"2#>$&/%?&"
104
- ];
105
-
106
- //#endregion
107
- export { __ΩFormatDescriptionOptions, __ΩFormatShortDescriptionOptions, formatDescription, formatShortDescription };
108
- //# sourceMappingURL=description-helpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-helpers.mjs","names":[],"sources":[],"mappings":""}
@@ -1,118 +0,0 @@
1
- const require_context_helpers = require('./context-helpers.cjs');
2
- const require_traverse_command_tree = require('./traverse-command-tree.cjs');
3
-
4
- //#region src/plugin-utils/get-command-tree.ts
5
- function __assignType(fn, args) {
6
- fn.__type = args;
7
- return fn;
8
- }
9
- /**
10
- * Retrieves a specific command tree based on the provided path.
11
- *
12
- * @param context - The build context containing the command definitions.
13
- * @param path - An array of strings representing the command path.
14
- * @returns The command tree at the specified path, or null if not found.
15
- */
16
- function getCommandTree(context, path = []) {
17
- if (path.length === 0) return null;
18
- let currentTree = context.commands[path[0]] ?? null;
19
- if (path.length > 1) {
20
- const segments = path.slice(1).filter(__assignType((segment) => !require_context_helpers.isDynamicPathSegment(segment), [
21
- "segment",
22
- "",
23
- "P\"2!\"/\""
24
- ]));
25
- for (const segment of segments) if (currentTree?.children && Object.prototype.hasOwnProperty.call(currentTree.children, segment)) currentTree = currentTree.children[segment] ?? null;
26
- else return null;
27
- }
28
- return currentTree;
29
- }
30
- getCommandTree.__type = [
31
- "Context",
32
- "context",
33
- "path",
34
- "CommandTree",
35
- "getCommandTree",
36
- "Retrieves a specific command tree based on the provided path.",
37
- "P\"w!2\"\"2#P\"w$,J/%?&"
38
- ];
39
- /**
40
- * Retrieves a list of all command trees defined in the context.
41
- *
42
- * @param context - The build context containing the command definitions.
43
- * @returns A promise that resolves to an array of all command trees in the context.
44
- */
45
- async function getCommandList(context) {
46
- const commandList = [];
47
- await require_traverse_command_tree.traverseCommands(context, __assignType((commandTree) => {
48
- commandList.push(commandTree);
49
- }, [
50
- "commandTree",
51
- "",
52
- "P\"2!\"/\""
53
- ]));
54
- return commandList;
55
- }
56
- getCommandList.__type = [
57
- "Context",
58
- "context",
59
- "CommandTree",
60
- "getCommandList",
61
- "Retrieves a list of all command trees defined in the context.",
62
- "P\"w!2\"\"w#F`/$?%"
63
- ];
64
- /**
65
- * Retrieves a list of all command paths defined in the context.
66
- *
67
- * @param context - The build context containing the command definitions.
68
- * @returns A promise that resolves to an array of all command paths in the context.
69
- */
70
- async function getCommandPaths(context) {
71
- const commandPaths = [];
72
- await require_traverse_command_tree.traverseCommands(context, __assignType((commandTree) => {
73
- if (commandTree.path) commandPaths.push(commandTree.path);
74
- }, [
75
- "commandTree",
76
- "",
77
- "P\"2!\"/\""
78
- ]));
79
- return commandPaths;
80
- }
81
- getCommandPaths.__type = [
82
- "Context",
83
- "context",
84
- "getCommandPaths",
85
- "Retrieves a list of all command paths defined in the context.",
86
- "P\"w!2\"&F`/#?$"
87
- ];
88
- /**
89
- * Retrieves a list of all command segments defined in the context.
90
- *
91
- * @param context - The build context containing the command definitions.
92
- * @returns A promise that resolves to an array of all command segments in the context.
93
- */
94
- async function getCommandSegments(context) {
95
- const commandSegments = [];
96
- await require_traverse_command_tree.traverseCommands(context, __assignType((commandTree) => {
97
- if (commandTree.path) commandSegments.push(commandTree.segments);
98
- }, [
99
- "commandTree",
100
- "",
101
- "P\"2!\"/\""
102
- ]));
103
- return commandSegments;
104
- }
105
- getCommandSegments.__type = [
106
- "Context",
107
- "context",
108
- "getCommandSegments",
109
- "Retrieves a list of all command segments defined in the context.",
110
- "P\"w!2\"&FF`/#?$"
111
- ];
112
-
113
- //#endregion
114
- exports.getCommandList = getCommandList;
115
- exports.getCommandPaths = getCommandPaths;
116
- exports.getCommandSegments = getCommandSegments;
117
- exports.getCommandTree = getCommandTree;
118
- //# sourceMappingURL=get-command-tree.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-command-tree.cjs","names":[],"sources":[],"mappings":""}