@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,309 +1,2 @@
1
- import { JsonSchemaStringFormat, SchemaInput } from "@powerlines/schema";
2
- import { ResolvedEntryFileReference } from "powerlines";
3
- import { AnyFunction, RequiredKeys } from "@stryke/types/base";
4
-
5
- //#region src/types/command.d.ts
6
- type CommandParameterType = "string" | "number" | "boolean";
7
- interface BaseCommandParameter {
8
- /**
9
- * The option name.
10
- */
11
- name: string;
12
- /**
13
- * The option kind.
14
- */
15
- type: CommandParameterType;
16
- /**
17
- * The display title.
18
- */
19
- title: string;
20
- /**
21
- * The option description.
22
- */
23
- description: string;
24
- /**
25
- * Alternative option names.
26
- */
27
- alias: string[];
28
- /**
29
- * The default value.
30
- */
31
- default?: string | number | boolean | string[] | number[] | boolean[];
32
- /**
33
- * The environment variable name or false to disable.
34
- */
35
- env: string | false;
36
- /**
37
- * Whether the option is required.
38
- */
39
- required: boolean;
40
- /**
41
- * Whether the option accepts multiple values.
42
- */
43
- variadic: boolean;
44
- }
45
- interface BaseSingleCommandParameter {
46
- /**
47
- * The default value.
48
- */
49
- default?: string | number | boolean;
50
- /**
51
- * Whether the option accepts multiple values.
52
- */
53
- variadic: false;
54
- }
55
- interface BaseVariadicCommandParameter {
56
- /**
57
- * The default value.
58
- */
59
- default?: string[] | number[] | boolean[];
60
- /**
61
- * Whether the option accepts multiple values.
62
- */
63
- variadic: true;
64
- }
65
- interface BaseStringCommandParameter extends BaseCommandParameter {
66
- /**
67
- * The option kind.
68
- */
69
- type: "string";
70
- /**
71
- * The default value.
72
- */
73
- default?: string | string[];
74
- /**
75
- * A standard string format to validate the option value against.
76
- */
77
- format?: JsonSchemaStringFormat | string;
78
- /**
79
- * The allowed choices for the option value.
80
- */
81
- choices?: string[];
82
- }
83
- interface SingleStringCommandParameter extends BaseStringCommandParameter {
84
- /**
85
- * The default value.
86
- */
87
- default?: string;
88
- /**
89
- * Whether the option accepts multiple values.
90
- */
91
- variadic: false;
92
- }
93
- interface VariadicStringCommandParameter extends BaseStringCommandParameter {
94
- /**
95
- * The default value.
96
- */
97
- default?: string[];
98
- /**
99
- * Whether the option accepts multiple values.
100
- */
101
- variadic: true;
102
- }
103
- type StringCommandParameter = SingleStringCommandParameter | VariadicStringCommandParameter;
104
- interface BaseNumberCommandParameter extends BaseCommandParameter {
105
- /**
106
- * The option kind.
107
- */
108
- type: "number";
109
- /**
110
- * The default value.
111
- */
112
- default?: number | number[];
113
- /**
114
- * The allowed choices for the option value.
115
- */
116
- choices?: number[];
117
- }
118
- interface SingleNumberCommandParameter extends BaseNumberCommandParameter {
119
- /**
120
- * The default value.
121
- */
122
- default?: number;
123
- /**
124
- * Whether the option accepts multiple values.
125
- */
126
- variadic: false;
127
- }
128
- interface VariadicNumberCommandParameter extends BaseNumberCommandParameter {
129
- /**
130
- * The default value.
131
- */
132
- default?: number[];
133
- /**
134
- * Whether the option accepts multiple values.
135
- */
136
- variadic: true;
137
- }
138
- type NumberCommandParameter = SingleNumberCommandParameter | VariadicNumberCommandParameter;
139
- interface BaseBooleanCommandParameter extends BaseCommandParameter {
140
- /**
141
- * The option kind.
142
- */
143
- type: "boolean";
144
- /**
145
- * The default value.
146
- */
147
- default?: boolean | boolean[];
148
- }
149
- interface SingleBooleanCommandParameter extends BaseBooleanCommandParameter {
150
- /**
151
- * The default value.
152
- */
153
- default?: boolean;
154
- /**
155
- * Whether the option accepts multiple values.
156
- */
157
- variadic: false;
158
- }
159
- interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {
160
- /**
161
- * The default value.
162
- */
163
- default?: boolean[];
164
- /**
165
- * Whether the option accepts multiple values.
166
- */
167
- variadic: true;
168
- }
169
- type BooleanCommandParameter = SingleBooleanCommandParameter | VariadicBooleanCommandParameter;
170
- type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
171
- type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "type"> & Partial<Omit<T, "type" | "alias">> & {
172
- alias?: string | string[];
173
- };
174
- type StringCommandParameterConfig = AsCommandParameterConfig<StringCommandParameter>;
175
- type NumberCommandParameterConfig = AsCommandParameterConfig<NumberCommandParameter>;
176
- type BooleanCommandParameterConfig = AsCommandParameterConfig<BooleanCommandParameter>;
177
- type CommandParameterConfig = StringCommandParameterConfig | NumberCommandParameterConfig | BooleanCommandParameterConfig;
178
- interface BooleanCommandOption extends SingleBooleanCommandParameter {
179
- /**
180
- * The option this negates.
181
- */
182
- isNegativeOf?: string;
183
- /**
184
- * Whether to skip adding a negative option.
185
- */
186
- skipAddingNegative?: boolean;
187
- }
188
- type CommandOption = StringCommandParameter | NumberCommandParameter | BooleanCommandOption | VariadicBooleanCommandParameter;
189
- type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;
190
- type CommandArgument = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
191
- type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;
192
- interface CommandMetadata {
193
- /**
194
- * The display name of the command.
195
- *
196
- * @remarks
197
- * This value will be used in various displays of the user interface and documentation. If not provided, a formatted value of the command name will be used.
198
- */
199
- title?: string;
200
- /**
201
- * A brief description of what the command does.
202
- *
203
- * @remarks
204
- * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
205
- */
206
- description?: string;
207
- /**
208
- * One or more alternative names for the command.
209
- */
210
- alias?: string | string[];
211
- /**
212
- * Optional tags for the command.
213
- *
214
- * @remarks
215
- * Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
216
- */
217
- tags?: string[];
218
- /**
219
- * An optional icon to visually represent the command in user interfaces.
220
- *
221
- * @remarks
222
- * This can be a string containing an emoji, a Unicode character, or any other symbol that helps to visually identify the command. If not provided, no icon will be displayed.
223
- */
224
- icon?: string;
225
- /**
226
- * A URL to the command documentation or reference.
227
- *
228
- * @remarks
229
- * This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
230
- */
231
- docs?: string;
232
- }
233
- interface CommandBase extends CommandMetadata {
234
- /**
235
- * The command id.
236
- */
237
- id: string | null;
238
- /**
239
- * The command name.
240
- */
241
- name: string;
242
- /**
243
- * The full command path value.
244
- */
245
- path: string | null;
246
- /**
247
- * The path segments.
248
- */
249
- segments: string[];
250
- /**
251
- * Alternative command names.
252
- */
253
- alias?: string[];
254
- /**
255
- * Whether the command is virtual.
256
- *
257
- * @remarks
258
- * Virtual commands are considered forks in the command tree and are not directly executable. They are used to group related subcommands together without having an actual command handler or entry point.
259
- */
260
- virtual: boolean;
261
- }
262
- interface CommandConfig extends CommandBase {
263
- /**
264
- * The command id.
265
- */
266
- id: string;
267
- /**
268
- * The resolved entry definition.
269
- */
270
- entry: ResolvedEntryFileReference;
271
- tags?: CommandMetadata["tags"];
272
- }
273
- type CommandTree = RequiredKeys<CommandConfig, "title" | "description" | "alias" | "tags"> & {
274
- /**
275
- * The command options.
276
- */
277
- options: Record<string, CommandOption>;
278
- /**
279
- * The positional arguments provided to the command.
280
- */
281
- args: CommandArgument[];
282
- /**
283
- * The parent command.
284
- */
285
- parent: null | CommandTree;
286
- /**
287
- * Child commands.
288
- */
289
- children: Record<string, CommandTree>;
290
- };
291
- type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
292
- /**
293
- * The parent command id.
294
- */
295
- parent: null | string;
296
- /**
297
- * Serialized child commands.
298
- */
299
- children: Record<string, SerializedCommandTree>;
300
- };
301
- interface CommandModule {
302
- metadata?: CommandMetadata;
303
- options?: Record<string, CommandOptionConfig> | SchemaInput;
304
- args?: (CommandArgumentConfig | SchemaInput)[];
305
- default?: AnyFunction;
306
- }
307
- //#endregion
308
- export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter };
309
- //# sourceMappingURL=command.d.mts.map
1
+ import { A as StringCommandParameterConfig, C as NumberCommandParameter, D as SingleNumberCommandParameter, E as SingleBooleanCommandParameter, M as VariadicNumberCommandParameter, N as VariadicStringCommandParameter, O as SingleStringCommandParameter, S as CommandTree, T as SerializedCommandTree, _ as CommandOption, a as BaseSingleCommandParameter, b as CommandParameterConfig, c as BooleanCommandOption, d as CommandArgument, f as CommandArgumentConfig, g as CommandModule, h as CommandMetadata, i as BaseNumberCommandParameter, j as VariadicBooleanCommandParameter, k as StringCommandParameter, l as BooleanCommandParameter, m as CommandConfig, n as BaseBooleanCommandParameter, o as BaseStringCommandParameter, p as CommandBase, r as BaseCommandParameter, s as BaseVariadicCommandParameter, t as AsCommandParameterConfig, u as BooleanCommandParameterConfig, v as CommandOptionConfig, w as NumberCommandParameterConfig, x as CommandParameterType, y as CommandParameter } from "../command-B6KYexlV.mjs";
2
+ export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter };
@@ -1,368 +1 @@
1
- //#region src/types/command.ts
2
- const __ΩPick = [
3
- "T",
4
- "K",
5
- "Pick",
6
- "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
7
- ];
8
- const __ΩPartial = [
9
- "T",
10
- "Partial",
11
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
12
- ];
13
- const __ΩOmit = [
14
- "T",
15
- "K",
16
- () => __ΩPick,
17
- () => __ΩExclude,
18
- "Omit",
19
- "b!b\"e!!e!!ge!\"o$#o##w%y"
20
- ];
21
- const __ΩRecord = [
22
- "K",
23
- "T",
24
- "Record",
25
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
26
- ];
27
- const __ΩExclude = [
28
- "T",
29
- "U",
30
- "Exclude",
31
- "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
32
- ];
33
- const __ΩCommandParameterType = [
34
- "string",
35
- "number",
36
- "boolean",
37
- "CommandParameterType",
38
- "P.!.\".#Jw$y"
39
- ];
40
- const __ΩBaseCommandParameter = [
41
- "name",
42
- "The option name.",
43
- () => __ΩCommandParameterType,
44
- "type",
45
- "The option kind.",
46
- "title",
47
- "The display title.",
48
- "description",
49
- "The option description.",
50
- "alias",
51
- "Alternative option names.",
52
- "default",
53
- "The default value.",
54
- false,
55
- "env",
56
- "The environment variable name or false to disable.",
57
- "required",
58
- "Whether the option is required.",
59
- "variadic",
60
- "Whether the option accepts multiple values.",
61
- "BaseCommandParameter",
62
- "P&4!?\"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y"
63
- ];
64
- const __ΩBaseSingleCommandParameter = [
65
- "default",
66
- "The default value.",
67
- false,
68
- "variadic",
69
- "Whether the option accepts multiple values.",
70
- "BaseSingleCommandParameter",
71
- "PP&')J4!8?\".#4$?%Mw&y"
72
- ];
73
- const __ΩBaseVariadicCommandParameter = [
74
- "default",
75
- "The default value.",
76
- true,
77
- "variadic",
78
- "Whether the option accepts multiple values.",
79
- "BaseVariadicCommandParameter",
80
- "PP&F'F)FJ4!8?\".#4$?%Mw&y"
81
- ];
82
- const __ΩBaseStringCommandParameter = [
83
- () => __ΩBaseCommandParameter,
84
- "string",
85
- "type",
86
- "The option kind.",
87
- "default",
88
- "The default value.",
89
- "format",
90
- "A standard string format to validate the option value against.",
91
- "choices",
92
- "The allowed choices for the option value.",
93
- "BaseStringCommandParameter",
94
- "Pn!.\"4#?$P&&FJ4%8?&P!&J4'8?(&F4)8?*Mw+y"
95
- ];
96
- const __ΩSingleStringCommandParameter = [
97
- () => __ΩBaseStringCommandParameter,
98
- "default",
99
- "The default value.",
100
- false,
101
- "variadic",
102
- "Whether the option accepts multiple values.",
103
- "SingleStringCommandParameter",
104
- "Pn!&4\"8?#.$4%?&Mw'y"
105
- ];
106
- const __ΩVariadicStringCommandParameter = [
107
- () => __ΩBaseStringCommandParameter,
108
- "default",
109
- "The default value.",
110
- true,
111
- "variadic",
112
- "Whether the option accepts multiple values.",
113
- "VariadicStringCommandParameter",
114
- "Pn!&F4\"8?#.$4%?&Mw'y"
115
- ];
116
- const __ΩStringCommandParameter = [
117
- () => __ΩSingleStringCommandParameter,
118
- () => __ΩVariadicStringCommandParameter,
119
- "StringCommandParameter",
120
- "Pn!n\"Jw#y"
121
- ];
122
- const __ΩBaseNumberCommandParameter = [
123
- () => __ΩBaseCommandParameter,
124
- "number",
125
- "type",
126
- "The option kind.",
127
- "default",
128
- "The default value.",
129
- "choices",
130
- "The allowed choices for the option value.",
131
- "BaseNumberCommandParameter",
132
- "Pn!.\"4#?$P''FJ4%8?&'F4'8?(Mw)y"
133
- ];
134
- const __ΩSingleNumberCommandParameter = [
135
- () => __ΩBaseNumberCommandParameter,
136
- "default",
137
- "The default value.",
138
- false,
139
- "variadic",
140
- "Whether the option accepts multiple values.",
141
- "SingleNumberCommandParameter",
142
- "Pn!'4\"8?#.$4%?&Mw'y"
143
- ];
144
- const __ΩVariadicNumberCommandParameter = [
145
- () => __ΩBaseNumberCommandParameter,
146
- "default",
147
- "The default value.",
148
- true,
149
- "variadic",
150
- "Whether the option accepts multiple values.",
151
- "VariadicNumberCommandParameter",
152
- "Pn!'F4\"8?#.$4%?&Mw'y"
153
- ];
154
- const __ΩNumberCommandParameter = [
155
- () => __ΩSingleNumberCommandParameter,
156
- () => __ΩVariadicNumberCommandParameter,
157
- "NumberCommandParameter",
158
- "Pn!n\"Jw#y"
159
- ];
160
- const __ΩBaseBooleanCommandParameter = [
161
- () => __ΩBaseCommandParameter,
162
- "boolean",
163
- "type",
164
- "The option kind.",
165
- "default",
166
- "The default value.",
167
- "BaseBooleanCommandParameter",
168
- "Pn!.\"4#?$P))FJ4%8?&Mw'y"
169
- ];
170
- const __ΩSingleBooleanCommandParameter = [
171
- () => __ΩBaseBooleanCommandParameter,
172
- "default",
173
- "The default value.",
174
- false,
175
- "variadic",
176
- "Whether the option accepts multiple values.",
177
- "SingleBooleanCommandParameter",
178
- "Pn!)4\"8?#.$4%?&Mw'y"
179
- ];
180
- const __ΩVariadicBooleanCommandParameter = [
181
- () => __ΩBaseBooleanCommandParameter,
182
- "default",
183
- "The default value.",
184
- true,
185
- "variadic",
186
- "Whether the option accepts multiple values.",
187
- "VariadicBooleanCommandParameter",
188
- "Pn!)F4\"8?#.$4%?&Mw'y"
189
- ];
190
- const __ΩBooleanCommandParameter = [
191
- () => __ΩSingleBooleanCommandParameter,
192
- () => __ΩVariadicBooleanCommandParameter,
193
- "BooleanCommandParameter",
194
- "Pn!n\"Jw#y"
195
- ];
196
- const __ΩCommandParameter = [
197
- () => __ΩStringCommandParameter,
198
- () => __ΩNumberCommandParameter,
199
- () => __ΩBooleanCommandParameter,
200
- "CommandParameter",
201
- "Pn!n\"n#Jw$y"
202
- ];
203
- const __ΩAsCommandParameterConfig = [
204
- "T",
205
- () => __ΩPick,
206
- "type",
207
- () => __ΩPartial,
208
- () => __ΩOmit,
209
- "type",
210
- "alias",
211
- "alias",
212
- "AsCommandParameterConfig",
213
- "b!Pe\"!.#o\"#e\"!P.&.'Jo%#o$\"PP&&FJ4(8MKw)y"
214
- ];
215
- const __ΩStringCommandParameterConfig = [
216
- () => __ΩAsCommandParameterConfig,
217
- () => __ΩStringCommandParameter,
218
- "StringCommandParameterConfig",
219
- "n\"o!\"w#y"
220
- ];
221
- const __ΩNumberCommandParameterConfig = [
222
- () => __ΩAsCommandParameterConfig,
223
- () => __ΩNumberCommandParameter,
224
- "NumberCommandParameterConfig",
225
- "n\"o!\"w#y"
226
- ];
227
- const __ΩBooleanCommandParameterConfig = [
228
- () => __ΩAsCommandParameterConfig,
229
- () => __ΩBooleanCommandParameter,
230
- "BooleanCommandParameterConfig",
231
- "n\"o!\"w#y"
232
- ];
233
- const __ΩCommandParameterConfig = [
234
- () => __ΩStringCommandParameterConfig,
235
- () => __ΩNumberCommandParameterConfig,
236
- () => __ΩBooleanCommandParameterConfig,
237
- "CommandParameterConfig",
238
- "Pn!n\"n#Jw$y"
239
- ];
240
- const __ΩBooleanCommandOption = [
241
- () => __ΩSingleBooleanCommandParameter,
242
- "isNegativeOf",
243
- "The option this negates.",
244
- "skipAddingNegative",
245
- "Whether to skip adding a negative option.",
246
- "BooleanCommandOption",
247
- "Pn!&4\"8?#)4$8?%Mw&y"
248
- ];
249
- const __ΩCommandOption = [
250
- () => __ΩStringCommandParameter,
251
- () => __ΩNumberCommandParameter,
252
- () => __ΩBooleanCommandOption,
253
- () => __ΩVariadicBooleanCommandParameter,
254
- "CommandOption",
255
- "Pn!n\"n#n$Jw%y"
256
- ];
257
- const __ΩCommandOptionConfig = [
258
- () => __ΩAsCommandParameterConfig,
259
- () => __ΩCommandOption,
260
- "CommandOptionConfig",
261
- "n\"o!\"w#y"
262
- ];
263
- const __ΩCommandArgument = [
264
- () => __ΩStringCommandParameter,
265
- () => __ΩNumberCommandParameter,
266
- () => __ΩBooleanCommandParameter,
267
- "CommandArgument",
268
- "Pn!n\"n#Jw$y"
269
- ];
270
- const __ΩCommandArgumentConfig = [
271
- () => __ΩAsCommandParameterConfig,
272
- () => __ΩCommandArgument,
273
- "CommandArgumentConfig",
274
- "n\"o!\"w#y"
275
- ];
276
- const __ΩCommandMetadata = [
277
- "title",
278
- "The display name of the command.",
279
- "description",
280
- "A brief description of what the command does.",
281
- "alias",
282
- "One or more alternative names for the command.",
283
- "tags",
284
- "Optional tags for the command.",
285
- "icon",
286
- "An optional icon to visually represent the command in user interfaces.",
287
- "docs",
288
- "A URL to the command documentation or reference.",
289
- "CommandMetadata",
290
- "P&4!8?\"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y"
291
- ];
292
- const __ΩCommandBase = [
293
- () => __ΩCommandMetadata,
294
- "id",
295
- "The command id.",
296
- "name",
297
- "The command name.",
298
- "path",
299
- "The full command path value.",
300
- "segments",
301
- "The path segments.",
302
- "alias",
303
- "Alternative command names.",
304
- "virtual",
305
- "Whether the command is virtual.",
306
- "CommandBase",
307
- "Pn!P&,J4\"?#&4$?%P&,J4&?'&F4(?)&F4*8?+)4,?-Mw.y"
308
- ];
309
- const __ΩCommandConfig = [
310
- () => __ΩCommandBase,
311
- "id",
312
- "The command id.",
313
- "entry",
314
- "The resolved entry definition.",
315
- () => __ΩCommandMetadata,
316
- "tags",
317
- "tags",
318
- "CommandConfig",
319
- "Pn!&4\"?#!4$?%n&.'f4(8Mw)y"
320
- ];
321
- const __ΩCommandTree = [
322
- () => __ΩRecord,
323
- () => __ΩCommandOption,
324
- "options",
325
- "The command options.",
326
- () => __ΩCommandArgument,
327
- "args",
328
- "The positional arguments provided to the command.",
329
- 0,
330
- "parent",
331
- "The parent command.",
332
- () => __ΩRecord,
333
- 0,
334
- "children",
335
- "Child commands.",
336
- "CommandTree",
337
- "P!P&n\"o!#4#?$n%F4&?'P,n(J4)?*&n,o+#4-?.MKw/y"
338
- ];
339
- const __ΩSerializedCommandTree = [
340
- () => __ΩOmit,
341
- () => __ΩCommandTree,
342
- "parent",
343
- "children",
344
- "parent",
345
- "The parent command id.",
346
- () => __ΩRecord,
347
- 0,
348
- "children",
349
- "Serialized child commands.",
350
- "SerializedCommandTree",
351
- "Pn\"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y"
352
- ];
353
- const __ΩCommandModule = [
354
- () => __ΩCommandMetadata,
355
- "metadata",
356
- () => __ΩRecord,
357
- () => __ΩCommandOptionConfig,
358
- "options",
359
- () => __ΩCommandArgumentConfig,
360
- "args",
361
- "default",
362
- "CommandModule",
363
- "Pn!4\"8P&n$o##!J4%8Pn&!JF4'8!4(8Mw)y"
364
- ];
365
-
366
- //#endregion
367
- export { __ΩAsCommandParameterConfig, __ΩBaseBooleanCommandParameter, __ΩBaseCommandParameter, __ΩBaseNumberCommandParameter, __ΩBaseSingleCommandParameter, __ΩBaseStringCommandParameter, __ΩBaseVariadicCommandParameter, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩBooleanCommandParameterConfig, __ΩCommandArgument, __ΩCommandArgumentConfig, __ΩCommandBase, __ΩCommandConfig, __ΩCommandMetadata, __ΩCommandModule, __ΩCommandOption, __ΩCommandOptionConfig, __ΩCommandParameter, __ΩCommandParameterConfig, __ΩCommandParameterType, __ΩCommandTree, __ΩNumberCommandParameter, __ΩNumberCommandParameterConfig, __ΩSerializedCommandTree, __ΩSingleBooleanCommandParameter, __ΩSingleNumberCommandParameter, __ΩSingleStringCommandParameter, __ΩStringCommandParameter, __ΩStringCommandParameterConfig, __ΩVariadicBooleanCommandParameter, __ΩVariadicNumberCommandParameter, __ΩVariadicStringCommandParameter };
368
- //# sourceMappingURL=command.mjs.map
1
+ export { };