@shell-shock/core 0.17.22 → 0.17.24

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 (306) hide show
  1. package/dist/api.cjs +4 -5
  2. package/dist/api.d.cts +1 -1
  3. package/dist/api.d.mts +1 -1
  4. package/dist/api.mjs +2 -2
  5. package/dist/command-B6KYexlV.d.mts +308 -0
  6. package/dist/command-B6KYexlV.d.mts.map +1 -0
  7. package/dist/command-CtfR7hKM.d.cts +308 -0
  8. package/dist/command-CtfR7hKM.d.cts.map +1 -0
  9. package/dist/components/command-validation-logic.cjs +153 -216
  10. package/dist/components/command-validation-logic.d.cts +2 -1
  11. package/dist/components/command-validation-logic.d.cts.map +1 -1
  12. package/dist/components/command-validation-logic.d.mts +2 -1
  13. package/dist/components/command-validation-logic.mjs +153 -214
  14. package/dist/components/docs.cjs +6 -364
  15. package/dist/components/docs.d.cts +2 -3
  16. package/dist/components/docs.d.cts.map +1 -1
  17. package/dist/components/docs.d.mts +2 -3
  18. package/dist/components/docs.mjs +2 -356
  19. package/dist/components/exec-builtin.cjs +63 -100
  20. package/dist/components/exec-builtin.d.cts +1 -2
  21. package/dist/components/exec-builtin.d.cts.map +1 -1
  22. package/dist/components/exec-builtin.d.mts +1 -2
  23. package/dist/components/exec-builtin.mjs +7 -41
  24. package/dist/components/helpers.cjs +2 -52
  25. package/dist/components/helpers.d.cts +2 -1
  26. package/dist/components/helpers.d.cts.map +1 -1
  27. package/dist/components/helpers.d.mts +2 -1
  28. package/dist/components/helpers.mjs +2 -50
  29. package/dist/components/index.cjs +7 -23
  30. package/dist/components/index.mjs +9 -9
  31. package/dist/components/options-parser-logic.cjs +198 -420
  32. package/dist/components/options-parser-logic.d.cts +2 -5
  33. package/dist/components/options-parser-logic.d.cts.map +1 -1
  34. package/dist/components/options-parser-logic.d.mts +2 -5
  35. package/dist/components/options-parser-logic.mjs +192 -407
  36. package/dist/components/state-builtin.cjs +106 -164
  37. package/dist/components/state-builtin.d.cts +1 -2
  38. package/dist/components/state-builtin.d.cts.map +1 -1
  39. package/dist/components/state-builtin.d.mts +1 -2
  40. package/dist/components/state-builtin.mjs +12 -68
  41. package/dist/components/usage.cjs +4 -48
  42. package/dist/components/usage.d.cts +1 -2
  43. package/dist/components/usage.d.cts.map +1 -1
  44. package/dist/components/usage.d.mts +1 -2
  45. package/dist/components/usage.mjs +4 -46
  46. package/dist/components/utils-builtin.cjs +77 -144
  47. package/dist/components/utils-builtin.d.cts +1 -2
  48. package/dist/components/utils-builtin.d.cts.map +1 -1
  49. package/dist/components/utils-builtin.d.mts +1 -2
  50. package/dist/components/utils-builtin.mjs +9 -74
  51. package/dist/config-BIF9mEz0.d.cts +157 -0
  52. package/dist/config-BIF9mEz0.d.cts.map +1 -0
  53. package/dist/config-CnNYdfsL.d.mts +157 -0
  54. package/dist/config-CnNYdfsL.d.mts.map +1 -0
  55. package/dist/config.cjs +24 -58
  56. package/dist/config.d.cts +1 -2
  57. package/dist/config.d.cts.map +1 -1
  58. package/dist/config.d.mts +1 -2
  59. package/dist/config.mjs +23 -55
  60. package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
  61. package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
  62. package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
  63. package/dist/contexts/command.cjs +3 -9
  64. package/dist/contexts/command.d.cts +1 -2
  65. package/dist/contexts/command.d.cts.map +1 -1
  66. package/dist/contexts/command.d.mts +1 -2
  67. package/dist/contexts/command.mjs +2 -7
  68. package/dist/contexts/index.cjs +19 -1
  69. package/dist/contexts/index.d.cts +2 -1
  70. package/dist/contexts/index.d.mts +2 -1
  71. package/dist/contexts/index.mjs +2 -1
  72. package/dist/contexts/options.cjs +7 -30
  73. package/dist/contexts/options.d.cts +1 -2
  74. package/dist/contexts/options.d.cts.map +1 -1
  75. package/dist/contexts/options.d.mts +1 -2
  76. package/dist/contexts/options.mjs +7 -27
  77. package/dist/contexts/power-plant.cjs +19 -0
  78. package/dist/contexts/power-plant.d.cts +2 -0
  79. package/dist/contexts/power-plant.d.mts +2 -0
  80. package/dist/contexts/power-plant.mjs +5 -0
  81. package/dist/docs-C6ZvsVMu.cjs +278 -0
  82. package/dist/docs-CGQ2HtEY.mjs +249 -0
  83. package/dist/docs-CGQ2HtEY.mjs.map +1 -0
  84. package/dist/engine.cjs +5 -39
  85. package/dist/engine.d.cts +1 -2
  86. package/dist/engine.d.cts.map +1 -1
  87. package/dist/engine.d.mts +1 -2
  88. package/dist/engine.mjs +4 -37
  89. package/dist/generator.cjs +68 -0
  90. package/dist/generator.d.cts +15 -0
  91. package/dist/generator.d.cts.map +1 -0
  92. package/dist/generator.d.mts +15 -0
  93. package/dist/generator.d.mts.map +1 -0
  94. package/dist/generator.mjs +66 -0
  95. package/dist/generator.mjs.map +1 -0
  96. package/dist/{helpers/get-framework.mjs → get-framework-Bde25gcE.mjs} +3 -8
  97. package/dist/get-framework-Bde25gcE.mjs.map +1 -0
  98. package/dist/{helpers/get-framework.cjs → get-framework-KhAcbWmi.cjs} +7 -8
  99. package/dist/helpers/power-plant.cjs +102 -0
  100. package/dist/helpers/power-plant.d.cts +61 -0
  101. package/dist/helpers/power-plant.d.cts.map +1 -0
  102. package/dist/helpers/power-plant.d.mts +61 -0
  103. package/dist/helpers/power-plant.d.mts.map +1 -0
  104. package/dist/helpers/power-plant.mjs +99 -0
  105. package/dist/helpers/power-plant.mjs.map +1 -0
  106. package/dist/index-D4klH_pj.d.mts +2 -0
  107. package/dist/index-DYOBadKY.d.cts +2 -0
  108. package/dist/index.cjs +1 -37
  109. package/dist/index.d.cts +4 -6
  110. package/dist/index.d.cts.map +1 -1
  111. package/dist/index.d.mts +4 -6
  112. package/dist/index.mjs +0 -35
  113. package/dist/package-BEuyOlNO.mjs +6 -0
  114. package/dist/package-BEuyOlNO.mjs.map +1 -0
  115. package/dist/{package.cjs → package-Bzt7_95T.cjs} +2 -4
  116. package/dist/plugin-DZxQWd06.cjs +1490 -0
  117. package/dist/plugin-Dz1jMeMo.mjs +1458 -0
  118. package/dist/plugin-Dz1jMeMo.mjs.map +1 -0
  119. package/dist/plugin-utils/index.cjs +359 -26
  120. package/dist/plugin-utils/index.d.cts +273 -9
  121. package/dist/plugin-utils/index.d.cts.map +1 -0
  122. package/dist/plugin-utils/index.d.mts +273 -9
  123. package/dist/plugin-utils/index.d.mts.map +1 -0
  124. package/dist/plugin-utils/index.mjs +346 -10
  125. package/dist/plugin-utils/index.mjs.map +1 -0
  126. package/dist/plugin.cjs +3 -496
  127. package/dist/plugin.d.cts +1 -3
  128. package/dist/plugin.d.cts.map +1 -1
  129. package/dist/plugin.d.mts +1 -3
  130. package/dist/plugin.mjs +2 -491
  131. package/dist/power-plant-LgxcvlMN.d.cts +4 -0
  132. package/dist/power-plant-LgxcvlMN.d.mts +4 -0
  133. package/dist/reflect-CSiffeL9.cjs +27 -0
  134. package/dist/reflect-DXKSFgvS.mjs +23 -0
  135. package/dist/reflect-DXKSFgvS.mjs.map +1 -0
  136. package/dist/schemas/env.cjs +91 -0
  137. package/dist/schemas/env.d.cts +145 -0
  138. package/dist/schemas/env.d.cts.map +1 -0
  139. package/dist/schemas/env.d.mts +145 -0
  140. package/dist/{types → schemas}/env.d.mts.map +1 -1
  141. package/dist/schemas/env.mjs +91 -0
  142. package/dist/schemas/index.cjs +4 -0
  143. package/dist/schemas/index.d.cts +2 -0
  144. package/dist/schemas/index.d.mts +2 -0
  145. package/dist/schemas/index.mjs +3 -0
  146. package/dist/types/command.cjs +0 -402
  147. package/dist/types/command.d.cts +2 -309
  148. package/dist/types/command.d.mts +2 -309
  149. package/dist/types/command.mjs +1 -368
  150. package/dist/types/config.cjs +0 -175
  151. package/dist/types/config.d.cts +2 -126
  152. package/dist/types/config.d.mts +2 -126
  153. package/dist/types/config.mjs +1 -164
  154. package/dist/types/context.cjs +0 -45
  155. package/dist/types/context.d.cts +2 -31
  156. package/dist/types/context.d.mts +2 -31
  157. package/dist/types/context.mjs +1 -41
  158. package/dist/types/index.cjs +3 -53
  159. package/dist/types/index.d.cts +4 -5
  160. package/dist/types/index.d.mts +4 -5
  161. package/dist/types/index.mjs +4 -5
  162. package/package.json +106 -42
  163. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  164. package/dist/api.cjs.map +0 -1
  165. package/dist/components/command-validation-logic.cjs.map +0 -1
  166. package/dist/components/docs.cjs.map +0 -1
  167. package/dist/components/docs.mjs.map +0 -1
  168. package/dist/components/exec-builtin.cjs.map +0 -1
  169. package/dist/components/helpers.cjs.map +0 -1
  170. package/dist/components/options-parser-logic.cjs.map +0 -1
  171. package/dist/components/state-builtin.cjs.map +0 -1
  172. package/dist/components/usage.cjs.map +0 -1
  173. package/dist/components/utils-builtin.cjs.map +0 -1
  174. package/dist/config.cjs.map +0 -1
  175. package/dist/contexts/command.cjs.map +0 -1
  176. package/dist/contexts/options.cjs.map +0 -1
  177. package/dist/engine.cjs.map +0 -1
  178. package/dist/helpers/automd.cjs +0 -193
  179. package/dist/helpers/automd.cjs.map +0 -1
  180. package/dist/helpers/automd.mjs +0 -190
  181. package/dist/helpers/automd.mjs.map +0 -1
  182. package/dist/helpers/docs-helpers.cjs +0 -24
  183. package/dist/helpers/docs-helpers.cjs.map +0 -1
  184. package/dist/helpers/docs-helpers.mjs +0 -24
  185. package/dist/helpers/docs-helpers.mjs.map +0 -1
  186. package/dist/helpers/get-framework.cjs.map +0 -1
  187. package/dist/helpers/get-framework.mjs.map +0 -1
  188. package/dist/helpers/paths.cjs +0 -137
  189. package/dist/helpers/paths.cjs.map +0 -1
  190. package/dist/helpers/paths.mjs +0 -134
  191. package/dist/helpers/paths.mjs.map +0 -1
  192. package/dist/helpers/persistence.cjs +0 -114
  193. package/dist/helpers/persistence.cjs.map +0 -1
  194. package/dist/helpers/persistence.mjs +0 -113
  195. package/dist/helpers/persistence.mjs.map +0 -1
  196. package/dist/helpers/update-package-json.cjs +0 -65
  197. package/dist/helpers/update-package-json.cjs.map +0 -1
  198. package/dist/helpers/update-package-json.mjs +0 -64
  199. package/dist/helpers/update-package-json.mjs.map +0 -1
  200. package/dist/helpers/utilities.cjs +0 -95
  201. package/dist/helpers/utilities.cjs.map +0 -1
  202. package/dist/helpers/utilities.mjs +0 -94
  203. package/dist/helpers/utilities.mjs.map +0 -1
  204. package/dist/helpers/validations.cjs +0 -71
  205. package/dist/helpers/validations.cjs.map +0 -1
  206. package/dist/helpers/validations.mjs +0 -70
  207. package/dist/helpers/validations.mjs.map +0 -1
  208. package/dist/index.cjs.map +0 -1
  209. package/dist/package.cjs.map +0 -1
  210. package/dist/package.mjs +0 -6
  211. package/dist/package.mjs.map +0 -1
  212. package/dist/plugin-utils/compute-bin.cjs +0 -49
  213. package/dist/plugin-utils/compute-bin.cjs.map +0 -1
  214. package/dist/plugin-utils/compute-bin.d.cts +0 -13
  215. package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
  216. package/dist/plugin-utils/compute-bin.d.mts +0 -13
  217. package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
  218. package/dist/plugin-utils/compute-bin.mjs +0 -49
  219. package/dist/plugin-utils/compute-bin.mjs.map +0 -1
  220. package/dist/plugin-utils/context-helpers.cjs.map +0 -1
  221. package/dist/plugin-utils/context-helpers.d.cts +0 -106
  222. package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
  223. package/dist/plugin-utils/context-helpers.d.mts +0 -106
  224. package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
  225. package/dist/plugin-utils/context-helpers.mjs.map +0 -1
  226. package/dist/plugin-utils/deepkit.cjs +0 -70
  227. package/dist/plugin-utils/deepkit.cjs.map +0 -1
  228. package/dist/plugin-utils/deepkit.d.cts +0 -23
  229. package/dist/plugin-utils/deepkit.d.cts.map +0 -1
  230. package/dist/plugin-utils/deepkit.d.mts +0 -23
  231. package/dist/plugin-utils/deepkit.d.mts.map +0 -1
  232. package/dist/plugin-utils/deepkit.mjs +0 -69
  233. package/dist/plugin-utils/deepkit.mjs.map +0 -1
  234. package/dist/plugin-utils/description-helpers.cjs +0 -112
  235. package/dist/plugin-utils/description-helpers.cjs.map +0 -1
  236. package/dist/plugin-utils/description-helpers.d.cts +0 -44
  237. package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
  238. package/dist/plugin-utils/description-helpers.d.mts +0 -44
  239. package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
  240. package/dist/plugin-utils/description-helpers.mjs +0 -108
  241. package/dist/plugin-utils/description-helpers.mjs.map +0 -1
  242. package/dist/plugin-utils/get-command-tree.cjs +0 -118
  243. package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
  244. package/dist/plugin-utils/get-command-tree.d.cts +0 -36
  245. package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
  246. package/dist/plugin-utils/get-command-tree.d.mts +0 -36
  247. package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
  248. package/dist/plugin-utils/get-command-tree.mjs +0 -115
  249. package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
  250. package/dist/plugin-utils/reflect.cjs +0 -54
  251. package/dist/plugin-utils/reflect.cjs.map +0 -1
  252. package/dist/plugin-utils/reflect.d.cts +0 -14
  253. package/dist/plugin-utils/reflect.d.cts.map +0 -1
  254. package/dist/plugin-utils/reflect.d.mts +0 -14
  255. package/dist/plugin-utils/reflect.d.mts.map +0 -1
  256. package/dist/plugin-utils/reflect.mjs +0 -53
  257. package/dist/plugin-utils/reflect.mjs.map +0 -1
  258. package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
  259. package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
  260. package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
  261. package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
  262. package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
  263. package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
  264. package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
  265. package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
  266. package/dist/plugin-utils/type-checks.cjs +0 -222
  267. package/dist/plugin-utils/type-checks.cjs.map +0 -1
  268. package/dist/plugin-utils/type-checks.d.cts +0 -41
  269. package/dist/plugin-utils/type-checks.d.cts.map +0 -1
  270. package/dist/plugin-utils/type-checks.d.mts +0 -41
  271. package/dist/plugin-utils/type-checks.d.mts.map +0 -1
  272. package/dist/plugin-utils/type-checks.mjs +0 -218
  273. package/dist/plugin-utils/type-checks.mjs.map +0 -1
  274. package/dist/plugin.cjs.map +0 -1
  275. package/dist/plugin.mjs.map +0 -1
  276. package/dist/resolver/deepkit.cjs +0 -110
  277. package/dist/resolver/deepkit.cjs.map +0 -1
  278. package/dist/resolver/deepkit.mjs +0 -109
  279. package/dist/resolver/deepkit.mjs.map +0 -1
  280. package/dist/resolver/helpers.cjs +0 -184
  281. package/dist/resolver/helpers.cjs.map +0 -1
  282. package/dist/resolver/helpers.mjs +0 -180
  283. package/dist/resolver/helpers.mjs.map +0 -1
  284. package/dist/resolver/resolve.cjs +0 -473
  285. package/dist/resolver/resolve.cjs.map +0 -1
  286. package/dist/resolver/resolve.mjs +0 -473
  287. package/dist/resolver/resolve.mjs.map +0 -1
  288. package/dist/types/command.cjs.map +0 -1
  289. package/dist/types/command.d.cts.map +0 -1
  290. package/dist/types/command.d.mts.map +0 -1
  291. package/dist/types/command.mjs.map +0 -1
  292. package/dist/types/config.cjs.map +0 -1
  293. package/dist/types/config.d.cts.map +0 -1
  294. package/dist/types/config.d.mts.map +0 -1
  295. package/dist/types/config.mjs.map +0 -1
  296. package/dist/types/context.cjs.map +0 -1
  297. package/dist/types/context.d.cts.map +0 -1
  298. package/dist/types/context.d.mts.map +0 -1
  299. package/dist/types/context.mjs.map +0 -1
  300. package/dist/types/env.cjs +0 -53
  301. package/dist/types/env.cjs.map +0 -1
  302. package/dist/types/env.d.cts +0 -71
  303. package/dist/types/env.d.cts.map +0 -1
  304. package/dist/types/env.d.mts +0 -71
  305. package/dist/types/env.mjs +0 -51
  306. /package/dist/{types → schemas}/env.mjs.map +0 -0
package/dist/engine.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_get_framework = require('./helpers/get-framework.cjs');
2
+ const require_get_framework = require('./get-framework-KhAcbWmi.cjs');
3
3
  let _powerlines_engine = require("@powerlines/engine");
4
4
 
5
5
  //#region src/engine.ts
@@ -18,10 +18,11 @@ var Engine = class Engine {
18
18
  * @returns A promise that resolves to a {@link Engine} instance.
19
19
  */
20
20
  static async from(options) {
21
- return new Engine(await (0, _powerlines_engine.createEngine)({
21
+ const powerlines = await (0, _powerlines_engine.createEngine)({
22
22
  ...options,
23
23
  framework: require_get_framework.getFramework()
24
- }, "@shell-shock/core/api"));
24
+ }, "@shell-shock/core/api");
25
+ return new Engine(powerlines);
25
26
  }
26
27
  /**
27
28
  * Gets the current build context, which includes information about the project, environment, and configuration. This context is used internally by the Shell Shock API to manage the build process and provide relevant data to plugins and other components.
@@ -87,32 +88,6 @@ var Engine = class Engine {
87
88
  async finalize() {
88
89
  return this.#powerlines.finalize();
89
90
  }
90
- static __type = [
91
- "#powerlines",
92
- "EngineOptions",
93
- "options",
94
- () => Engine,
95
- "from",
96
- "Creates a new instance of the {@link Engine} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.",
97
- "powerlines",
98
- "constructor",
99
- "inlineConfig",
100
- "clean",
101
- "Executes the clean phase of the build process, which typically involves removing generated files and resetting the build environment. The `inlineConfig` parameter allows users to specify additional options or overrides for the clean operation.",
102
- "prepare",
103
- "Executes the prepare phase of the build process, which typically involves setting up the build environment and installing dependencies. The `inlineConfig` parameter allows users to specify additional options or overrides for the prepare operation.",
104
- "lint",
105
- "Executes the lint phase of the build process, which typically involves analyzing code for quality and style issues. The `inlineConfig` parameter allows users to specify additional options or overrides for the lint operation.",
106
- "build",
107
- "Executes the build phase of the build process, which typically involves compiling source code and generating output artifacts. The `inlineConfig` parameter allows users to specify additional options or overrides for the build operation.",
108
- "docs",
109
- "Executes the documentation generation phase of the build process, which typically involves creating API documentation and other project documentation. The `inlineConfig` parameter allows users to specify additional options or overrides for the documentation operation.",
110
- "finalize",
111
- "Executes the finalize phase of the build process, which typically involves cleanup tasks and final reporting. This method should be called after all other build phases have completed.",
112
- "Engine",
113
- "The Shell Shock Engine class.",
114
- "!3!P\"w\"2#P7$`0%s?&!P!2'\"0(P!2)$`0*?+P!2)$`0,?-P!2)$`0.?/P!2)$`00?1P!2)$`02?3P$`04?55w6?7"
115
- ];
116
91
  };
117
92
  /**
118
93
  * Creates a new {@link Engine} instance.
@@ -123,16 +98,7 @@ var Engine = class Engine {
123
98
  async function createEngine(options) {
124
99
  return Engine.from(options);
125
100
  }
126
- createEngine.__type = [
127
- "EngineOptions",
128
- "options",
129
- () => Engine,
130
- "createEngine",
131
- "Creates a new {@link Engine} instance.",
132
- "P\"w!2\"P7#`/$?%"
133
- ];
134
101
 
135
102
  //#endregion
136
103
  exports.Engine = Engine;
137
- exports.createEngine = createEngine;
138
- //# sourceMappingURL=engine.cjs.map
104
+ exports.createEngine = createEngine;
package/dist/engine.d.cts CHANGED
@@ -1,7 +1,6 @@
1
- import { EngineOptions } from "./types/config.cjs";
1
+ import { n as EngineOptions } from "./config-BIF9mEz0.cjs";
2
2
  import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
3
3
  import { EngineContext } from "@powerlines/engine";
4
-
5
4
  //#region src/engine.d.ts
6
5
  /**
7
6
  * The Shell Shock Engine class.
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.cts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;;AAoCA;;;;cAAa,MAAA;EAAA;EA0BW;;;;;;EAAA,OAjBF,IAAA,CAAK,OAAA,EAAS,aAAA,GAAgB,OAAA,CAAQ,MAAA;EA6DzB;;;;;EAAA,IA5CtB,OAAA,IAAW,aAAA;EAAA,QAIf,WAAA;;;;;;;EAUM,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAd/B;;;;;;EAwBT,OAAA,CAAQ,YAAA,EAAc,mBAAA,GAAsB,OAAA;EAAtB;;;;;;EAUtB,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAUtC;;;;;;EAAA,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAUF;;;;AASnB;AAWlC;EApBe,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;;;;;;EAStC,QAAA,IAAY,OAAA;AAAA;;;;;AAW+C;;iBAApD,YAAA,CAAa,OAAA,EAAS,aAAA,GAAgB,OAAA,CAAQ,MAAA"}
1
+ {"version":3,"file":"engine.d.cts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;;;;;cAoCa;;;;;;;;SASS,KAAK,SAAS,gBAAgB,QAAQ;;;;;;MAiB/C,WAAW;UAIf;;;;;;;EAUM,MAAM,cAAc,oBAAoB;;;;;;;EAUxC,QAAQ,cAAc,sBAAsB;;;;;;;EAU5C,KAAK,cAAc,mBAAmB;;;;;;;EAUtC,MAAM,cAAc,oBAAoB;;;;;;;EAUxC,KAAK,cAAc,mBAAmB;;;;;;EAStC,YAAY;;;;;;;;iBAWL,aAAa,SAAS,gBAAgB,QAAQ"}
package/dist/engine.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { EngineOptions } from "./types/config.mjs";
1
+ import { n as EngineOptions } from "./config-CnNYdfsL.mjs";
2
2
  import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
3
3
  import { EngineContext } from "@powerlines/engine";
4
-
5
4
  //#region src/engine.d.ts
6
5
  /**
7
6
  * The Shell Shock Engine class.
package/dist/engine.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getFramework } from "./helpers/get-framework.mjs";
1
+ import { t as getFramework } from "./get-framework-Bde25gcE.mjs";
2
2
  import { createEngine as createEngine$1 } from "@powerlines/engine";
3
3
 
4
4
  //#region src/engine.ts
@@ -17,10 +17,11 @@ var Engine = class Engine {
17
17
  * @returns A promise that resolves to a {@link Engine} instance.
18
18
  */
19
19
  static async from(options) {
20
- return new Engine(await createEngine$1({
20
+ const powerlines = await createEngine$1({
21
21
  ...options,
22
22
  framework: getFramework()
23
- }, "@shell-shock/core/api"));
23
+ }, "@shell-shock/core/api");
24
+ return new Engine(powerlines);
24
25
  }
25
26
  /**
26
27
  * Gets the current build context, which includes information about the project, environment, and configuration. This context is used internally by the Shell Shock API to manage the build process and provide relevant data to plugins and other components.
@@ -86,32 +87,6 @@ var Engine = class Engine {
86
87
  async finalize() {
87
88
  return this.#powerlines.finalize();
88
89
  }
89
- static __type = [
90
- "#powerlines",
91
- "EngineOptions",
92
- "options",
93
- () => Engine,
94
- "from",
95
- "Creates a new instance of the {@link Engine} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.",
96
- "powerlines",
97
- "constructor",
98
- "inlineConfig",
99
- "clean",
100
- "Executes the clean phase of the build process, which typically involves removing generated files and resetting the build environment. The `inlineConfig` parameter allows users to specify additional options or overrides for the clean operation.",
101
- "prepare",
102
- "Executes the prepare phase of the build process, which typically involves setting up the build environment and installing dependencies. The `inlineConfig` parameter allows users to specify additional options or overrides for the prepare operation.",
103
- "lint",
104
- "Executes the lint phase of the build process, which typically involves analyzing code for quality and style issues. The `inlineConfig` parameter allows users to specify additional options or overrides for the lint operation.",
105
- "build",
106
- "Executes the build phase of the build process, which typically involves compiling source code and generating output artifacts. The `inlineConfig` parameter allows users to specify additional options or overrides for the build operation.",
107
- "docs",
108
- "Executes the documentation generation phase of the build process, which typically involves creating API documentation and other project documentation. The `inlineConfig` parameter allows users to specify additional options or overrides for the documentation operation.",
109
- "finalize",
110
- "Executes the finalize phase of the build process, which typically involves cleanup tasks and final reporting. This method should be called after all other build phases have completed.",
111
- "Engine",
112
- "The Shell Shock Engine class.",
113
- "!3!P\"w\"2#P7$`0%s?&!P!2'\"0(P!2)$`0*?+P!2)$`0,?-P!2)$`0.?/P!2)$`00?1P!2)$`02?3P$`04?55w6?7"
114
- ];
115
90
  };
116
91
  /**
117
92
  * Creates a new {@link Engine} instance.
@@ -122,14 +97,6 @@ var Engine = class Engine {
122
97
  async function createEngine(options) {
123
98
  return Engine.from(options);
124
99
  }
125
- createEngine.__type = [
126
- "EngineOptions",
127
- "options",
128
- () => Engine,
129
- "createEngine",
130
- "Creates a new {@link Engine} instance.",
131
- "P\"w!2\"P7#`/$?%"
132
- ];
133
100
 
134
101
  //#endregion
135
102
  export { Engine, createEngine };
@@ -0,0 +1,68 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_package = require('./package-Bzt7_95T.cjs');
3
+ const require_components_exec_builtin = require('./components/exec-builtin.cjs');
4
+ const require_components_state_builtin = require('./components/state-builtin.cjs');
5
+ const require_components_utils_builtin = require('./components/utils-builtin.cjs');
6
+ const require_helpers_power_plant = require('./helpers/power-plant.cjs');
7
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
8
+
9
+ //#region src/generator.tsx
10
+ /**
11
+ * Power Plant generator for Shell Shock core built-in modules.
12
+ *
13
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
14
+ */
15
+ const coreBuiltinsGenerator = require_helpers_power_plant.defineCommandGenerator({
16
+ meta: {
17
+ name: "shell-shock-core-builtins",
18
+ title: "Shell Shock Core Builtins",
19
+ description: "Generates the base Shell Shock built-in modules (state, utils, exec) from the command tree specification.",
20
+ version: require_package.version,
21
+ tags: [
22
+ "shell-shock",
23
+ "core",
24
+ "alloy-js",
25
+ "builtins"
26
+ ],
27
+ links: [{
28
+ href: "https://github.com/storm-software/shell-shock",
29
+ description: "Shell Shock Repository"
30
+ }, {
31
+ href: "https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js",
32
+ description: "Power Plant Alloy-js Generator"
33
+ }]
34
+ },
35
+ generator: async (_commands, options) => {
36
+ await require_helpers_power_plant.renderCommandTemplate(options, [
37
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_state_builtin.StateBuiltin, {}),
38
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_utils_builtin.UtilsBuiltin, {}),
39
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_exec_builtin.ExecBuiltin, {})
40
+ ]);
41
+ }
42
+ });
43
+ /**
44
+ * Power Plant generator for Shell Shock command reference documentation.
45
+ */
46
+ const coreDocsGenerator = require_helpers_power_plant.defineCommandGenerator({
47
+ meta: {
48
+ name: "shell-shock-core-docs",
49
+ title: "Shell Shock Command Docs",
50
+ description: "Generates CLI command reference documentation from the command tree specification.",
51
+ version: require_package.version,
52
+ tags: [
53
+ "shell-shock",
54
+ "core",
55
+ "alloy-js",
56
+ "docs"
57
+ ]
58
+ },
59
+ generator: async (_commands, options) => {
60
+ if (!options.template) return;
61
+ await require_helpers_power_plant.renderCommandTemplate(options, options.template);
62
+ }
63
+ });
64
+
65
+ //#endregion
66
+ exports.coreBuiltinsGenerator = coreBuiltinsGenerator;
67
+ exports.default = coreBuiltinsGenerator;
68
+ exports.coreDocsGenerator = coreDocsGenerator;
@@ -0,0 +1,15 @@
1
+ import { CommandGeneratorOptions } from "./helpers/power-plant.cjs";
2
+ //#region src/generator.d.ts
3
+ /**
4
+ * Power Plant generator for Shell Shock core built-in modules.
5
+ *
6
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
7
+ */
8
+ declare const coreBuiltinsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, CommandGeneratorOptions, void>;
9
+ /**
10
+ * Power Plant generator for Shell Shock command reference documentation.
11
+ */
12
+ declare const coreDocsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, CommandGeneratorOptions, void>;
13
+ //#endregion
14
+ export { coreBuiltinsGenerator, coreBuiltinsGenerator as default, coreDocsGenerator };
15
+ //# sourceMappingURL=generator.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.cts","names":[],"sources":["../src/generator.tsx"],"mappings":";;;;;;;cAgCa,mDAAqB,sBAAA,6CAAA,wBAAA;;;;cAkCrB,+CAAiB,sBAAA,6CAAA,wBAAA"}
@@ -0,0 +1,15 @@
1
+ import { CommandGeneratorOptions } from "./helpers/power-plant.mjs";
2
+ //#region src/generator.d.ts
3
+ /**
4
+ * Power Plant generator for Shell Shock core built-in modules.
5
+ *
6
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
7
+ */
8
+ declare const coreBuiltinsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, CommandGeneratorOptions, void>;
9
+ /**
10
+ * Power Plant generator for Shell Shock command reference documentation.
11
+ */
12
+ declare const coreDocsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, CommandGeneratorOptions, void>;
13
+ //#endregion
14
+ export { coreBuiltinsGenerator, coreBuiltinsGenerator as default, coreDocsGenerator };
15
+ //# sourceMappingURL=generator.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.mts","names":[],"sources":["../src/generator.tsx"],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import { t as version } from "./package-BEuyOlNO.mjs";
2
+ import { ExecBuiltin } from "./components/exec-builtin.mjs";
3
+ import { StateBuiltin } from "./components/state-builtin.mjs";
4
+ import { UtilsBuiltin } from "./components/utils-builtin.mjs";
5
+ import { defineCommandGenerator, renderCommandTemplate } from "./helpers/power-plant.mjs";
6
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
7
+
8
+ //#region src/generator.tsx
9
+ /**
10
+ * Power Plant generator for Shell Shock core built-in modules.
11
+ *
12
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
13
+ */
14
+ const coreBuiltinsGenerator = defineCommandGenerator({
15
+ meta: {
16
+ name: "shell-shock-core-builtins",
17
+ title: "Shell Shock Core Builtins",
18
+ description: "Generates the base Shell Shock built-in modules (state, utils, exec) from the command tree specification.",
19
+ version,
20
+ tags: [
21
+ "shell-shock",
22
+ "core",
23
+ "alloy-js",
24
+ "builtins"
25
+ ],
26
+ links: [{
27
+ href: "https://github.com/storm-software/shell-shock",
28
+ description: "Shell Shock Repository"
29
+ }, {
30
+ href: "https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js",
31
+ description: "Power Plant Alloy-js Generator"
32
+ }]
33
+ },
34
+ generator: async (_commands, options) => {
35
+ await renderCommandTemplate(options, [
36
+ createComponent(StateBuiltin, {}),
37
+ createComponent(UtilsBuiltin, {}),
38
+ createComponent(ExecBuiltin, {})
39
+ ]);
40
+ }
41
+ });
42
+ /**
43
+ * Power Plant generator for Shell Shock command reference documentation.
44
+ */
45
+ const coreDocsGenerator = defineCommandGenerator({
46
+ meta: {
47
+ name: "shell-shock-core-docs",
48
+ title: "Shell Shock Command Docs",
49
+ description: "Generates CLI command reference documentation from the command tree specification.",
50
+ version,
51
+ tags: [
52
+ "shell-shock",
53
+ "core",
54
+ "alloy-js",
55
+ "docs"
56
+ ]
57
+ },
58
+ generator: async (_commands, options) => {
59
+ if (!options.template) return;
60
+ await renderCommandTemplate(options, options.template);
61
+ }
62
+ });
63
+
64
+ //#endregion
65
+ export { coreBuiltinsGenerator, coreBuiltinsGenerator as default, coreDocsGenerator };
66
+ //# sourceMappingURL=generator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { version } from "../package.mjs";
1
+ import { t as version } from "./package-BEuyOlNO.mjs";
2
2
 
3
3
  //#region src/helpers/get-framework.ts
4
4
  /**
@@ -13,12 +13,7 @@ function getFramework() {
13
13
  orgId: "storm-software"
14
14
  };
15
15
  }
16
- getFramework.__type = [
17
- "getFramework",
18
- "Retrieves the framework information for Shell Shock.",
19
- "P!/!?\""
20
- ];
21
16
 
22
17
  //#endregion
23
- export { getFramework };
24
- //# sourceMappingURL=get-framework.mjs.map
18
+ export { getFramework as t };
19
+ //# sourceMappingURL=get-framework-Bde25gcE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-framework-Bde25gcE.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- const require_package = require('../package.cjs');
1
+ const require_package = require('./package-Bzt7_95T.cjs');
2
2
 
3
3
  //#region src/helpers/get-framework.ts
4
4
  /**
@@ -13,12 +13,11 @@ function getFramework() {
13
13
  orgId: "storm-software"
14
14
  };
15
15
  }
16
- getFramework.__type = [
17
- "getFramework",
18
- "Retrieves the framework information for Shell Shock.",
19
- "P!/!?\""
20
- ];
21
16
 
22
17
  //#endregion
23
- exports.getFramework = getFramework;
24
- //# sourceMappingURL=get-framework.cjs.map
18
+ Object.defineProperty(exports, 'getFramework', {
19
+ enumerable: true,
20
+ get: function () {
21
+ return getFramework;
22
+ }
23
+ });
@@ -0,0 +1,102 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _power_plant_core = require("@power-plant/core");
3
+ let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
4
+ let _shell_shock_schema = require("@shell-shock/schema");
5
+ let zod = require("zod");
6
+
7
+ //#region src/helpers/power-plant.ts
8
+ /**
9
+ * Options passed to Shell Shock Alloy-js generators.
10
+ */
11
+ function serializeCommand(command) {
12
+ return {
13
+ ...command,
14
+ parent: command.parent?.name ? command.parent.name : null,
15
+ children: Object.fromEntries(Object.entries(command.children || {}).map(([name, child]) => [name, serializeCommand(child)]))
16
+ };
17
+ }
18
+ /**
19
+ * Serializes `context.commands` into a JSON-safe Power Plant spec document.
20
+ */
21
+ function serializeCommands(commands) {
22
+ return Object.fromEntries(Object.entries(commands ?? {}).map(([name, command]) => [name, serializeCommand(command)]));
23
+ }
24
+ const serializedCommandSchema = (0, _power_plant_core.defineSchema)({
25
+ meta: {
26
+ name: "command-schema-serialized",
27
+ title: "Shell Shock Serialized Command Tree Schema",
28
+ version: "1.0",
29
+ description: "JSON-safe Shell Shock command tree specification used as Power Plant generator input.",
30
+ tags: [
31
+ "shell-shock",
32
+ "command-tree",
33
+ "cli"
34
+ ]
35
+ },
36
+ schema: zod.z.toJSONSchema(_shell_shock_schema.serializedCommandsSchema)
37
+ });
38
+ /**
39
+ * Creates a Power Plant generator that renders Alloy-js templates from a
40
+ * Shell Shock command tree specification.
41
+ *
42
+ * @param config - Generator metadata and the Alloy render implementation.
43
+ * @returns A Power Plant generator configuration object.
44
+ *
45
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
46
+ * @see https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-alloy/src/render.tsx
47
+ */
48
+ function defineCommandGenerator(config) {
49
+ return (0, _power_plant_core.defineGenerator)({
50
+ ...config,
51
+ schema: serializedCommandSchema,
52
+ output: (0, _power_plant_core.defineOutput)(() => void 0),
53
+ generator: async (commands, options) => {
54
+ return await config.generator(commands, options) ?? {};
55
+ }
56
+ });
57
+ }
58
+ /**
59
+ * Executes a command-tree Power Plant generator with `context.commands` as input.
60
+ *
61
+ * @remarks
62
+ * Calls {@link execute} from `@power-plant/core` directly (no Powerlines
63
+ * Power Plant plugin). Alloy templates still emit via `context` / plugin-alloy.
64
+ *
65
+ * @param context - The Shell Shock plugin context.
66
+ * @param generator - The generator configuration to execute.
67
+ * @param options - Extra generator options (merged with `{ context }`).
68
+ *
69
+ * @see https://github.com/storm-software/power-plant/blob/main/packages/base/core/src/execute.ts
70
+ */
71
+ async function executeCommandGenerator(context, generator, options) {
72
+ await (0, _power_plant_core.execute)({
73
+ ...generator,
74
+ input: serializeCommands(context.commands)
75
+ }, {
76
+ cwd: context.config.cwd,
77
+ logger: {
78
+ debug: (message) => context.debug(message),
79
+ info: (message) => context.info(message),
80
+ warn: (message) => context.warn(message),
81
+ error: (message) => context.error(message)
82
+ },
83
+ context,
84
+ ...options
85
+ });
86
+ }
87
+ /**
88
+ * Renders Alloy-js children through the Powerlines Alloy render bridge.
89
+ *
90
+ * @remarks
91
+ * Prefer this inside Power Plant generators so builtins/entries emit correctly
92
+ * via the Powerlines plugin context (see plugin-alloy `render`).
93
+ */
94
+ async function renderCommandTemplate(options, template) {
95
+ await (0, _powerlines_plugin_alloy_render.render)(options.context, options.template ?? template, {});
96
+ }
97
+
98
+ //#endregion
99
+ exports.defineCommandGenerator = defineCommandGenerator;
100
+ exports.executeCommandGenerator = executeCommandGenerator;
101
+ exports.renderCommandTemplate = renderCommandTemplate;
102
+ exports.serializeCommands = serializeCommands;
@@ -0,0 +1,61 @@
1
+ import { S as CommandTree } from "../command-CtfR7hKM.cjs";
2
+ import { d as CommandGeneratorOptions$1, f as Context } from "../config-BIF9mEz0.cjs";
3
+ import { Children } from "@alloy-js/core";
4
+ import { GeneratorConfigObject, GeneratorFunctionResult } from "@power-plant/core";
5
+ import { SerializedCommands } from "@shell-shock/schema";
6
+ //#region src/helpers/power-plant.d.ts
7
+ /**
8
+ * Options passed to Shell Shock Alloy-js generators.
9
+ */
10
+ interface CommandGeneratorOptions extends CommandGeneratorOptions$1 {
11
+ /**
12
+ * The Powerlines / Shell Shock plugin context used for Alloy emission.
13
+ */
14
+ context: Context;
15
+ /**
16
+ * Optional Alloy-js template override.
17
+ */
18
+ template?: Children;
19
+ }
20
+ /**
21
+ * Serializes `context.commands` into a JSON-safe Power Plant spec document.
22
+ */
23
+ declare function serializeCommands(commands: Record<string, CommandTree>): SerializedCommands;
24
+ /**
25
+ * Creates a Power Plant generator that renders Alloy-js templates from a
26
+ * Shell Shock command tree specification.
27
+ *
28
+ * @param config - Generator metadata and the Alloy render implementation.
29
+ * @returns A Power Plant generator configuration object.
30
+ *
31
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
32
+ * @see https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-alloy/src/render.tsx
33
+ */
34
+ declare function defineCommandGenerator<TOptions extends CommandGeneratorOptions = CommandGeneratorOptions>(config: Omit<GeneratorConfigObject<SerializedCommands, TOptions, void>, "schema" | "generator"> & {
35
+ generator: (commands: SerializedCommands, options: TOptions) => Promise<void | GeneratorFunctionResult<SerializedCommands, TOptions>> | void;
36
+ }): GeneratorConfigObject<SerializedCommands, TOptions, void>;
37
+ /**
38
+ * Executes a command-tree Power Plant generator with `context.commands` as input.
39
+ *
40
+ * @remarks
41
+ * Calls {@link execute} from `@power-plant/core` directly (no Powerlines
42
+ * Power Plant plugin). Alloy templates still emit via `context` / plugin-alloy.
43
+ *
44
+ * @param context - The Shell Shock plugin context.
45
+ * @param generator - The generator configuration to execute.
46
+ * @param options - Extra generator options (merged with `{ context }`).
47
+ *
48
+ * @see https://github.com/storm-software/power-plant/blob/main/packages/base/core/src/execute.ts
49
+ */
50
+ declare function executeCommandGenerator<TOptions extends CommandGeneratorOptions = CommandGeneratorOptions>(context: Context, generator: GeneratorConfigObject<SerializedCommands, TOptions, void>, options?: Omit<TOptions, "context">): Promise<void>;
51
+ /**
52
+ * Renders Alloy-js children through the Powerlines Alloy render bridge.
53
+ *
54
+ * @remarks
55
+ * Prefer this inside Power Plant generators so builtins/entries emit correctly
56
+ * via the Powerlines plugin context (see plugin-alloy `render`).
57
+ */
58
+ declare function renderCommandTemplate(options: CommandGeneratorOptions, template: Children): Promise<void>;
59
+ //#endregion
60
+ export { CommandGeneratorOptions, defineCommandGenerator, executeCommandGenerator, renderCommandTemplate, serializeCommands };
61
+ //# sourceMappingURL=power-plant.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"power-plant.d.cts","names":[],"sources":["../../src/helpers/power-plant.ts"],"mappings":";;;;;;;;;UA2DiB,gCAAgC;;;;EAI/C,SAAS;;;;EAKT,WAAW;;;;;iBAmBG,kBACd,UAAU,eAAe,eACxB;;;;;;;;;;;iBA+Ba,uBACd,iBAAiB,0BAA0B,yBAE3C,QAAQ,KACN,sBAAsB,oBAAoB;EAG1C,YACE,UAAU,oBACV,SAAS,aACN,eAAe,wBAClB,oBACA;IAGH,sBAAsB,oBAAoB;;;;;;;;;;;;;;iBA4BvB,wBACpB,iBAAiB,0BAA0B,yBAE3C,SAAS,SACT,WAAW,sBAAsB,oBAAoB,iBACrD,UAAU,KAAK,uBACd;;;;;;;;iBA8BmB,sBACpB,SAAS,yBACT,UAAU,WACT"}
@@ -0,0 +1,61 @@
1
+ import { S as CommandTree } from "../command-B6KYexlV.mjs";
2
+ import { d as CommandGeneratorOptions$1, f as Context } from "../config-CnNYdfsL.mjs";
3
+ import { Children } from "@alloy-js/core";
4
+ import { GeneratorConfigObject, GeneratorFunctionResult } from "@power-plant/core";
5
+ import { SerializedCommands } from "@shell-shock/schema";
6
+ //#region src/helpers/power-plant.d.ts
7
+ /**
8
+ * Options passed to Shell Shock Alloy-js generators.
9
+ */
10
+ interface CommandGeneratorOptions extends CommandGeneratorOptions$1 {
11
+ /**
12
+ * The Powerlines / Shell Shock plugin context used for Alloy emission.
13
+ */
14
+ context: Context;
15
+ /**
16
+ * Optional Alloy-js template override.
17
+ */
18
+ template?: Children;
19
+ }
20
+ /**
21
+ * Serializes `context.commands` into a JSON-safe Power Plant spec document.
22
+ */
23
+ declare function serializeCommands(commands: Record<string, CommandTree>): SerializedCommands;
24
+ /**
25
+ * Creates a Power Plant generator that renders Alloy-js templates from a
26
+ * Shell Shock command tree specification.
27
+ *
28
+ * @param config - Generator metadata and the Alloy render implementation.
29
+ * @returns A Power Plant generator configuration object.
30
+ *
31
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
32
+ * @see https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-alloy/src/render.tsx
33
+ */
34
+ declare function defineCommandGenerator<TOptions extends CommandGeneratorOptions = CommandGeneratorOptions>(config: Omit<GeneratorConfigObject<SerializedCommands, TOptions, void>, "schema" | "generator"> & {
35
+ generator: (commands: SerializedCommands, options: TOptions) => Promise<void | GeneratorFunctionResult<SerializedCommands, TOptions>> | void;
36
+ }): GeneratorConfigObject<SerializedCommands, TOptions, void>;
37
+ /**
38
+ * Executes a command-tree Power Plant generator with `context.commands` as input.
39
+ *
40
+ * @remarks
41
+ * Calls {@link execute} from `@power-plant/core` directly (no Powerlines
42
+ * Power Plant plugin). Alloy templates still emit via `context` / plugin-alloy.
43
+ *
44
+ * @param context - The Shell Shock plugin context.
45
+ * @param generator - The generator configuration to execute.
46
+ * @param options - Extra generator options (merged with `{ context }`).
47
+ *
48
+ * @see https://github.com/storm-software/power-plant/blob/main/packages/base/core/src/execute.ts
49
+ */
50
+ declare function executeCommandGenerator<TOptions extends CommandGeneratorOptions = CommandGeneratorOptions>(context: Context, generator: GeneratorConfigObject<SerializedCommands, TOptions, void>, options?: Omit<TOptions, "context">): Promise<void>;
51
+ /**
52
+ * Renders Alloy-js children through the Powerlines Alloy render bridge.
53
+ *
54
+ * @remarks
55
+ * Prefer this inside Power Plant generators so builtins/entries emit correctly
56
+ * via the Powerlines plugin context (see plugin-alloy `render`).
57
+ */
58
+ declare function renderCommandTemplate(options: CommandGeneratorOptions, template: Children): Promise<void>;
59
+ //#endregion
60
+ export { CommandGeneratorOptions, defineCommandGenerator, executeCommandGenerator, renderCommandTemplate, serializeCommands };
61
+ //# sourceMappingURL=power-plant.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"power-plant.d.mts","names":[],"sources":["../../src/helpers/power-plant.ts"],"mappings":""}