@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,45 +1,17 @@
1
+ import { BuiltinFile, usePowerlines } from "../contexts/power-plant.mjs";
1
2
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
3
  import { Show, code, splitProps } from "@alloy-js/core";
3
- import defu$1 from "defu";
4
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
5
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
4
+ import { defu } from "defu";
5
+ import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
6
6
  import { FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, VarDeclaration } from "@alloy-js/typescript";
7
- import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
8
- import { TSDoc, TSDocInternal, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
7
+ import { TSDoc, TSDocInternal, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns } from "@power-plant/alloy-js/typescript/components/tsdoc";
9
8
 
10
9
  //#region src/components/utils-builtin.tsx
11
- const __ΩOmit = [
12
- "T",
13
- "K",
14
- () => __ΩPick,
15
- () => __ΩExclude,
16
- "Omit",
17
- "b!b\"e!!e!!ge!\"o$#o##w%y"
18
- ];
19
- const __ΩPick = [
20
- "T",
21
- "K",
22
- "Pick",
23
- "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
24
- ];
25
- const __ΩExclude = [
26
- "T",
27
- "U",
28
- "Exclude",
29
- "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
30
- ];
31
- const __ΩUtilsBuiltinProps = [
32
- () => __ΩOmit,
33
- "id",
34
- "description",
35
- "UtilsBuiltinProps",
36
- "P!P.\".#Jo!#Mw$y"
37
- ];
38
10
  /**
39
11
  * Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.
40
12
  */
41
13
  function FindSuggestionsDeclaration() {
42
- const context = (usePowerlines.Ω = [["Context", "\"w!"]], usePowerlines());
14
+ const context = usePowerlines();
43
15
  return [
44
16
  createComponent(VarDeclaration, {
45
17
  "const": true,
@@ -233,11 +205,6 @@ function FindSuggestionsDeclaration() {
233
205
  })
234
206
  ];
235
207
  }
236
- FindSuggestionsDeclaration.__type = [
237
- "FindSuggestionsDeclaration",
238
- "Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.",
239
- "P\"/!?\""
240
- ];
241
208
  /**
242
209
  * Generates utilities for detecting terminal size and whether the process is running in the foreground, which can be used to determine how to render output (e.g., whether to use a progress bar or spinner).
243
210
  */
@@ -381,11 +348,6 @@ function TerminalSizeDeclaration() {
381
348
  })
382
349
  ];
383
350
  }
384
- TerminalSizeDeclaration.__type = [
385
- "TerminalSizeDeclaration",
386
- "Generates utilities for detecting terminal size and whether the process is running in the foreground, which can be used to determine how to render output (e.g., whether to use a progress bar or spinner).",
387
- "P\"/!?\""
388
- ];
389
351
  /**
390
352
  * Generates utilities for detecting terminal color support.
391
353
  */
@@ -416,11 +378,6 @@ function EnvSupportUtilities() {
416
378
  })
417
379
  ];
418
380
  }
419
- EnvSupportUtilities.__type = [
420
- "EnvSupportUtilities",
421
- "Generates utilities for detecting terminal color support.",
422
- "P\"/!?\""
423
- ];
424
381
  /**
425
382
  * Generates utilities for detecting terminal color support.
426
383
  */
@@ -618,11 +575,6 @@ function ColorSupportUtilities() {
618
575
  })
619
576
  ];
620
577
  }
621
- ColorSupportUtilities.__type = [
622
- "ColorSupportUtilities",
623
- "Generates utilities for detecting terminal color support.",
624
- "P\"/!?\""
625
- ];
626
578
  /**
627
579
  * Generates utilities for detecting terminal color support.
628
580
  */
@@ -731,16 +683,11 @@ function HyperlinkSupportUtilities() {
731
683
  })
732
684
  ];
733
685
  }
734
- HyperlinkSupportUtilities.__type = [
735
- "HyperlinkSupportUtilities",
736
- "Generates utilities for detecting terminal color support.",
737
- "P\"/!?\""
738
- ];
739
686
  /**
740
687
  * Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.
741
688
  */
742
689
  function ResolveModuleFunctionDeclaration() {
743
- const context = (usePowerlines.Ω = [["Context", "\"w!"]], usePowerlines());
690
+ const context = usePowerlines();
744
691
  return [
745
692
  createComponent(Spacing, {}),
746
693
  createComponent(InterfaceDeclaration, {
@@ -1730,11 +1677,6 @@ function ResolveModuleFunctionDeclaration() {
1730
1677
  })
1731
1678
  ];
1732
1679
  }
1733
- ResolveModuleFunctionDeclaration.__type = [
1734
- "ResolveModuleFunctionDeclaration",
1735
- "Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.",
1736
- "P\"/!?\""
1737
- ];
1738
1680
  /**
1739
1681
  * A built-in utilities module for Shell Shock.
1740
1682
  */
@@ -1745,7 +1687,7 @@ function UtilsBuiltin(props) {
1745
1687
  description: "A collection of helper utilities that ease command-line application development."
1746
1688
  }, rest, {
1747
1689
  get imports() {
1748
- return defu$1(rest.imports ?? {}, {
1690
+ return defu(rest.imports ?? {}, {
1749
1691
  "node:os": "os",
1750
1692
  "node:process": "process",
1751
1693
  "node:path": [
@@ -1771,7 +1713,7 @@ function UtilsBuiltin(props) {
1771
1713
  });
1772
1714
  },
1773
1715
  get builtinImports() {
1774
- return defu$1(rest.builtinImports ?? {}, {
1716
+ return defu(rest.builtinImports ?? {}, {
1775
1717
  env: [
1776
1718
  "env",
1777
1719
  "isCI",
@@ -1828,14 +1770,7 @@ function UtilsBuiltin(props) {
1828
1770
  }
1829
1771
  }));
1830
1772
  }
1831
- UtilsBuiltin.__type = [
1832
- () => __ΩUtilsBuiltinProps,
1833
- "props",
1834
- "UtilsBuiltin",
1835
- "A built-in utilities module for Shell Shock.",
1836
- "Pn!2\"\"/#?$"
1837
- ];
1838
1773
 
1839
1774
  //#endregion
1840
- export { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, TerminalSizeDeclaration, UtilsBuiltin, __ΩUtilsBuiltinProps };
1775
+ export { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, TerminalSizeDeclaration, UtilsBuiltin };
1841
1776
  //# sourceMappingURL=utils-builtin.mjs.map
@@ -0,0 +1,157 @@
1
+ import { S as CommandTree, _ as CommandOption, m as CommandConfig, p as CommandBase } from "./command-CtfR7hKM.cjs";
2
+ import { RequiredKeys } from "@stryke/types/base";
3
+ import { ConfigParams, ExecutionContext, OutputConfig, PluginContext, UnresolvedContext, UserConfig } from "powerlines";
4
+ import { AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types/plugin";
5
+ import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
6
+ import { NodeJsPluginOptions, NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
7
+ import { TsdownPluginResolvedConfig } from "@powerlines/plugin-tsdown/types/plugin";
8
+ import { PackageJson } from "@stryke/types/package-json";
9
+ import { EngineOptions } from "powerlines/engine";
10
+ import { AlloyPluginContext } from "@powerlines/plugin-alloy";
11
+ import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types";
12
+ import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
13
+ //#region src/types/context.d.ts
14
+ /**
15
+ * Options passed to Shell Shock Power Plant generators.
16
+ */
17
+ interface CommandGeneratorOptions {
18
+ context: PluginContext;
19
+ template?: unknown;
20
+ }
21
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & AlloyPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
22
+ /**
23
+ * The root path where commands are located.
24
+ */
25
+ commandsPath: string;
26
+ /**
27
+ * The default command arguments to apply to all application commands.
28
+ */
29
+ globalOptions: CommandOption[];
30
+ /**
31
+ * The list of commands discovered in the project.
32
+ */
33
+ inputs: CommandConfig[];
34
+ /**
35
+ * The command-line application structure.
36
+ */
37
+ commands: Record<string, CommandTree>;
38
+ };
39
+ type ExecutionContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = ExecutionContext<TResolvedConfig>;
40
+ type UnresolvedContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext<TResolvedConfig>;
41
+ //#endregion
42
+ //#region src/types/config.d.ts
43
+ type BuildOptions = Pick<UserConfig, "name" | "title" | "description" | "input" | "output" | "logLevel" | "mode" | "define" | "inject" | "resolve" | "organization" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
44
+ interface DocsOptions {
45
+ /**
46
+ * A URL to the application documentation or reference.
47
+ */
48
+ app: string;
49
+ /**
50
+ * A URL to the application command specific documentation or reference.
51
+ *
52
+ * @remarks
53
+ * This URL is expected to contain the token `{command}` or `{cmd}`, which 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`.
54
+ */
55
+ commands?: string;
56
+ }
57
+ interface BaseOptions {
58
+ /**
59
+ * A set of global command options to apply to each command.
60
+ *
61
+ * @remarks
62
+ * Each command will inherit these global options. To disable the addition of these global options, set this property to `false`, or provide a custom set of options/a function that returns them. A `GlobalOptions` interface will be created by the `shell-shock types` command and added to the generated `shell-shock.d.ts` file.
63
+ */
64
+ globalOptions?: CommandOption[] | ((context: Context<any>, input: CommandBase) => CommandOption[]) | false;
65
+ /**
66
+ * Determines whether commands and option names are treated as case-sensitive.
67
+ *
68
+ * @defaultValue `false`
69
+ */
70
+ isCaseSensitive?: boolean;
71
+ /**
72
+ * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
73
+ *
74
+ * @remarks
75
+ * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
76
+ *
77
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
78
+ * @see https://yarnpkg.com/cli/bin
79
+ * @see https://pnpm.io/package_json#bin
80
+ */
81
+ bin?: string | string[];
82
+ /**
83
+ * Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
84
+ *
85
+ * @remarks
86
+ * If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
87
+ *
88
+ * @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
89
+ * @see https://stringcase.org/cases/constant/
90
+ */
91
+ autoAssignEnv?: true | string;
92
+ /**
93
+ * A URL to the command-line interface application's reference documentation.
94
+ *
95
+ * @remarks
96
+ * This URL can be used in various displays of the user interface and documentation to provide users with a reference for the application. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` (or `{cmd}`) 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`.
97
+ */
98
+ docs?: DocsOptions | string;
99
+ }
100
+ /**
101
+ * The plugin options for Shell Shock.
102
+ */
103
+ type Options = BaseOptions & Partial<NodeJsPluginOptions>;
104
+ /**
105
+ * The output configuration options for Shell Shock.
106
+ */
107
+ type OutputConfig$1 = Pick<OutputConfig, "path" | "copy" | "storage" | "sourceMap"> & {
108
+ /**
109
+ * An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
110
+ */
111
+ dts?: false;
112
+ };
113
+ /**
114
+ * The user configuration options for Shell Shock.
115
+ */
116
+ type UserConfig$1 = BaseOptions & RequiredKeys<BuildOptions, "name"> & {
117
+ /**
118
+ * Configuration for the output of the build process
119
+ */
120
+ output?: OutputConfig$1;
121
+ };
122
+ type UserConfigFnObject = (env: ConfigParams) => UserConfig$1 | UserConfig$1[];
123
+ type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig$1 | UserConfig$1[]>;
124
+ type UserConfigFn = (env: ConfigParams) => UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]>;
125
+ type UserConfigExport = UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
126
+ type EngineOptions$1 = Omit<EngineOptions, "root" | "name" | "framework">;
127
+ /**
128
+ * The resolved configuration options for Shell Shock.
129
+ */
130
+ type ResolvedConfig = TsdownPluginResolvedConfig & AlloyPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "docs">> & {
131
+ /**
132
+ * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
133
+ *
134
+ * @remarks
135
+ * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
136
+ *
137
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
138
+ * @see https://yarnpkg.com/cli/bin
139
+ * @see https://pnpm.io/package_json#bin
140
+ */
141
+ bin: PackageJson["bin"];
142
+ /**
143
+ * The URL(s) to the command-line interface application's reference documentation.
144
+ */
145
+ docs: DocsOptions;
146
+ /**
147
+ * The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
148
+ */
149
+ appSpecificEnvPrefix: string;
150
+ /**
151
+ * The user configuration for the Shell Shock process.
152
+ */
153
+ userConfig: UserConfig$1;
154
+ };
155
+ //#endregion
156
+ export { ResolvedConfig as a, UserConfigFn as c, CommandGeneratorOptions as d, Context as f, OutputConfig$1 as i, UserConfigFnObject as l, UnresolvedContext$1 as m, EngineOptions$1 as n, UserConfig$1 as o, ExecutionContext$1 as p, Options as r, UserConfigExport as s, DocsOptions as t, UserConfigFnPromise as u };
157
+ //# sourceMappingURL=config-BIF9mEz0.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BIF9mEz0.d.cts","names":[],"sources":["../src/types/context.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;UAgCiB;EACf,SAAS;EACT;;KAGU,QAAQ,wBAAwB,iBAAiB,kBAC3D,oBAAoB,mBAClB,mBAAmB,mBACnB,oBAAoB;;;;EAIlB;;;;EAKA,eAAe;;;;EAKf,QAAQ;;;;EAKR,UAAU,eAAe;;KAGnB,mBACV,wBAAwB,iBAAiB,kBACvC,iBAA2B;KAEnB,oBACV,wBAAwB,iBAAiB,kBACvC,kBAA4B;;;KChC3B,eAAe,KAClB;UAmBe;;;;EAIf;;;;;;;EAQA;;UAGQ;;;;;;;EAOR,gBACI,oBACE,SAAS,cAAc,OAAO,gBAAgB;;;;;;EAQpD;;;;;;;;;;;EAYA;;;;;;;;;;EAWA;;;;;;;EAQA,OAAO;;;;;KAMG,UAAU,cAAc,QAAQ;;;;KAKhC,iBAAe,KACzB;;;;EAMA;;;;;KAMU,eAAa,cACvB,aAAa;;;;EAIX,SAAS;;KAGD,sBACV,KAAK,iBACF,eAAa;KACN,uBACV,KAAK,iBACF,QAAQ,eAAa;KACd,gBACV,KAAK,iBACF,eAAa,iBAAe,QAAQ,eAAa;KAE1C,mBACR,eACA,iBACA,QAAQ,eAAa,kBACrB,qBACA,sBACA;KAEQ,kBAAgB,KAC1B;;;;KAOU,iBAAiB,6BAC3B,4BACA,6BACA,6BACA,SAAS,KAAK;;;;;;;;;;;EAWZ,KAAK;;;;EAKL,MAAM;;;;EAKN;;;;EAKA,YAAY"}
@@ -0,0 +1,157 @@
1
+ import { S as CommandTree, _ as CommandOption, m as CommandConfig, p as CommandBase } from "./command-B6KYexlV.mjs";
2
+ import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
3
+ import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
4
+ import { ConfigParams, ExecutionContext, OutputConfig, PluginContext, UnresolvedContext, UserConfig } from "powerlines";
5
+ import { RequiredKeys } from "@stryke/types/base";
6
+ import { AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types/plugin";
7
+ import { NodeJsPluginOptions, NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
8
+ import { TsdownPluginResolvedConfig } from "@powerlines/plugin-tsdown/types/plugin";
9
+ import { PackageJson } from "@stryke/types/package-json";
10
+ import { EngineOptions } from "powerlines/engine";
11
+ import { AlloyPluginContext } from "@powerlines/plugin-alloy";
12
+ import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types";
13
+ //#region src/types/context.d.ts
14
+ /**
15
+ * Options passed to Shell Shock Power Plant generators.
16
+ */
17
+ interface CommandGeneratorOptions {
18
+ context: PluginContext;
19
+ template?: unknown;
20
+ }
21
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & AlloyPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
22
+ /**
23
+ * The root path where commands are located.
24
+ */
25
+ commandsPath: string;
26
+ /**
27
+ * The default command arguments to apply to all application commands.
28
+ */
29
+ globalOptions: CommandOption[];
30
+ /**
31
+ * The list of commands discovered in the project.
32
+ */
33
+ inputs: CommandConfig[];
34
+ /**
35
+ * The command-line application structure.
36
+ */
37
+ commands: Record<string, CommandTree>;
38
+ };
39
+ type ExecutionContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = ExecutionContext<TResolvedConfig>;
40
+ type UnresolvedContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext<TResolvedConfig>;
41
+ //#endregion
42
+ //#region src/types/config.d.ts
43
+ type BuildOptions = Pick<UserConfig, "name" | "title" | "description" | "input" | "output" | "logLevel" | "mode" | "define" | "inject" | "resolve" | "organization" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
44
+ interface DocsOptions {
45
+ /**
46
+ * A URL to the application documentation or reference.
47
+ */
48
+ app: string;
49
+ /**
50
+ * A URL to the application command specific documentation or reference.
51
+ *
52
+ * @remarks
53
+ * This URL is expected to contain the token `{command}` or `{cmd}`, which 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`.
54
+ */
55
+ commands?: string;
56
+ }
57
+ interface BaseOptions {
58
+ /**
59
+ * A set of global command options to apply to each command.
60
+ *
61
+ * @remarks
62
+ * Each command will inherit these global options. To disable the addition of these global options, set this property to `false`, or provide a custom set of options/a function that returns them. A `GlobalOptions` interface will be created by the `shell-shock types` command and added to the generated `shell-shock.d.ts` file.
63
+ */
64
+ globalOptions?: CommandOption[] | ((context: Context<any>, input: CommandBase) => CommandOption[]) | false;
65
+ /**
66
+ * Determines whether commands and option names are treated as case-sensitive.
67
+ *
68
+ * @defaultValue `false`
69
+ */
70
+ isCaseSensitive?: boolean;
71
+ /**
72
+ * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
73
+ *
74
+ * @remarks
75
+ * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
76
+ *
77
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
78
+ * @see https://yarnpkg.com/cli/bin
79
+ * @see https://pnpm.io/package_json#bin
80
+ */
81
+ bin?: string | string[];
82
+ /**
83
+ * Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
84
+ *
85
+ * @remarks
86
+ * If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
87
+ *
88
+ * @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
89
+ * @see https://stringcase.org/cases/constant/
90
+ */
91
+ autoAssignEnv?: true | string;
92
+ /**
93
+ * A URL to the command-line interface application's reference documentation.
94
+ *
95
+ * @remarks
96
+ * This URL can be used in various displays of the user interface and documentation to provide users with a reference for the application. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` (or `{cmd}`) 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`.
97
+ */
98
+ docs?: DocsOptions | string;
99
+ }
100
+ /**
101
+ * The plugin options for Shell Shock.
102
+ */
103
+ type Options = BaseOptions & Partial<NodeJsPluginOptions>;
104
+ /**
105
+ * The output configuration options for Shell Shock.
106
+ */
107
+ type OutputConfig$1 = Pick<OutputConfig, "path" | "copy" | "storage" | "sourceMap"> & {
108
+ /**
109
+ * An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
110
+ */
111
+ dts?: false;
112
+ };
113
+ /**
114
+ * The user configuration options for Shell Shock.
115
+ */
116
+ type UserConfig$1 = BaseOptions & RequiredKeys<BuildOptions, "name"> & {
117
+ /**
118
+ * Configuration for the output of the build process
119
+ */
120
+ output?: OutputConfig$1;
121
+ };
122
+ type UserConfigFnObject = (env: ConfigParams) => UserConfig$1 | UserConfig$1[];
123
+ type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig$1 | UserConfig$1[]>;
124
+ type UserConfigFn = (env: ConfigParams) => UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]>;
125
+ type UserConfigExport = UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
126
+ type EngineOptions$1 = Omit<EngineOptions, "root" | "name" | "framework">;
127
+ /**
128
+ * The resolved configuration options for Shell Shock.
129
+ */
130
+ type ResolvedConfig = TsdownPluginResolvedConfig & AlloyPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "docs">> & {
131
+ /**
132
+ * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
133
+ *
134
+ * @remarks
135
+ * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
136
+ *
137
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
138
+ * @see https://yarnpkg.com/cli/bin
139
+ * @see https://pnpm.io/package_json#bin
140
+ */
141
+ bin: PackageJson["bin"];
142
+ /**
143
+ * The URL(s) to the command-line interface application's reference documentation.
144
+ */
145
+ docs: DocsOptions;
146
+ /**
147
+ * The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
148
+ */
149
+ appSpecificEnvPrefix: string;
150
+ /**
151
+ * The user configuration for the Shell Shock process.
152
+ */
153
+ userConfig: UserConfig$1;
154
+ };
155
+ //#endregion
156
+ export { ResolvedConfig as a, UserConfigFn as c, CommandGeneratorOptions as d, Context as f, OutputConfig$1 as i, UserConfigFnObject as l, UnresolvedContext$1 as m, EngineOptions$1 as n, UserConfig$1 as o, ExecutionContext$1 as p, Options as r, UserConfigExport as s, DocsOptions as t, UserConfigFnPromise as u };
157
+ //# sourceMappingURL=config-CnNYdfsL.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-CnNYdfsL.d.mts","names":[],"sources":["../src/types/context.ts","../src/types/config.ts"],"mappings":""}
package/dist/config.cjs CHANGED
@@ -1,65 +1,31 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
2
  //#region src/config.ts
4
- defineConfig.__type = [
5
- "UserConfig",
6
- "config",
7
- "defineConfig",
8
- "Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.",
9
- "P\"w!2\"\"w!/#?$"
10
- ];
11
- defineConfig.__type = [
12
- "UserConfig",
13
- "config",
14
- "defineConfig",
15
- "P\"w!F2\"\"w!F/#"
16
- ];
17
- defineConfig.__type = [
18
- "UserConfig",
19
- "config",
20
- "defineConfig",
21
- "P\"w!`2\"\"w!`/#"
22
- ];
23
- defineConfig.__type = [
24
- "UserConfig",
25
- "config",
26
- "defineConfig",
27
- "P\"w!F`2\"\"w!F`/#"
28
- ];
29
- defineConfig.__type = [
30
- "UserConfigFnObject",
31
- "config",
32
- "defineConfig",
33
- "P\"w!2\"\"w!/#"
34
- ];
35
- defineConfig.__type = [
36
- "UserConfigFnPromise",
37
- "config",
38
- "defineConfig",
39
- "P\"w!2\"\"w!/#"
40
- ];
41
- defineConfig.__type = [
42
- "UserConfigFn",
43
- "config",
44
- "defineConfig",
45
- "P\"w!2\"\"w!/#"
46
- ];
47
- defineConfig.__type = [
48
- "UserConfigExport",
49
- "config",
50
- "defineConfig",
51
- "P\"w!2\"\"w!/#"
52
- ];
3
+ /**
4
+ * Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { defineConfig } from '@shell-shock/core/config';
9
+ *
10
+ * export default defineConfig({
11
+ * // Your configuration here
12
+ * });
13
+ *
14
+ * // Or with a function
15
+ * export default defineConfig((env) => {
16
+ * console.log(`Running command: ${env.command} in mode: ${env.mode}`);
17
+ * return {
18
+ * // Your configuration here
19
+ * };
20
+ * });
21
+ * ```
22
+ *
23
+ * @param config - The user configuration object or a function that returns it.
24
+ * @returns The provided configuration, unmodified.
25
+ */
53
26
  function defineConfig(config) {
54
27
  return config;
55
28
  }
56
- defineConfig.__type = [
57
- "UserConfigExport",
58
- "config",
59
- "defineConfig",
60
- "P\"w!2\"\"w!/#"
61
- ];
62
29
 
63
30
  //#endregion
64
- exports.defineConfig = defineConfig;
65
- //# sourceMappingURL=config.cjs.map
31
+ exports.defineConfig = defineConfig;
package/dist/config.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { DocsOptions, EngineOptions, Options, OutputConfig, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.cjs";
2
-
1
+ import { a as ResolvedConfig, c as UserConfigFn, i as OutputConfig, l as UserConfigFnObject, n as EngineOptions, o as UserConfig, r as Options, s as UserConfigExport, t as DocsOptions, u as UserConfigFnPromise } from "./config-BIF9mEz0.cjs";
3
2
  //#region src/config.d.ts
4
3
  /**
5
4
  * Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;;;AAmDA;;;;;;;;AAA4D;AAC5D;;;;;;;;AAA8D;AAC9D;;;;iBAFgB,YAAA,CAAa,MAAA,EAAQ,UAAA,GAAa,UAAU;AAAA,iBAC5C,YAAA,CAAa,MAAA,EAAQ,UAAA,KAAe,UAAU;AAAA,iBAC9C,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,UAAA,IAAc,OAAA,CAAQ,UAAA;AAAA,iBACnD,YAAA,CACd,MAAA,EAAQ,OAAA,CAAQ,UAAA,MACf,OAAA,CAAQ,UAAA;AAAA,iBACK,YAAA,CAAa,MAAA,EAAQ,kBAAA,GAAqB,kBAAkB;AAAA,iBAC5D,YAAA,CAAa,MAAA,EAAQ,mBAAA,GAAsB,mBAAmB;AAAA,iBAC9D,YAAA,CAAa,MAAA,EAAQ,YAAA,GAAe,YAAY;AAAA,iBAChD,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAgB"}
1
+ {"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;iBAmDgB,aAAa,QAAQ,aAAa;iBAClC,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,QAAQ,cAAc,QAAQ;iBACnD,aACd,QAAQ,QAAQ,gBACf,QAAQ;iBACK,aAAa,QAAQ,qBAAqB;iBAC1C,aAAa,QAAQ,sBAAsB;iBAC3C,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,mBAAmB"}
package/dist/config.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { DocsOptions, EngineOptions, Options, OutputConfig, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.mjs";
2
-
1
+ import { a as ResolvedConfig, c as UserConfigFn, i as OutputConfig, l as UserConfigFnObject, n as EngineOptions, o as UserConfig, r as Options, s as UserConfigExport, t as DocsOptions, u as UserConfigFnPromise } from "./config-CnNYdfsL.mjs";
3
2
  //#region src/config.d.ts
4
3
  /**
5
4
  * Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.