@shell-shock/core 0.17.10 → 0.17.12

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 (257) hide show
  1. package/dist/api.cjs +31 -143
  2. package/dist/api.cjs.map +1 -0
  3. package/dist/api.d.cts +2 -77
  4. package/dist/api.d.cts.map +1 -1
  5. package/dist/api.d.mts +2 -76
  6. package/dist/api.d.mts.map +1 -1
  7. package/dist/api.mjs +30 -140
  8. package/dist/api.mjs.map +1 -1
  9. package/dist/components/command-validation-logic.cjs +14 -15
  10. package/dist/components/command-validation-logic.cjs.map +1 -0
  11. package/dist/components/command-validation-logic.d.cts +1 -3
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +1 -3
  14. package/dist/components/command-validation-logic.d.mts.map +1 -1
  15. package/dist/components/command-validation-logic.mjs +12 -13
  16. package/dist/components/command-validation-logic.mjs.map +1 -1
  17. package/dist/components/docs.cjs +6 -6
  18. package/dist/components/docs.cjs.map +1 -0
  19. package/dist/components/docs.d.cts +4 -5
  20. package/dist/components/docs.d.cts.map +1 -1
  21. package/dist/components/docs.d.mts +4 -5
  22. package/dist/components/docs.d.mts.map +1 -1
  23. package/dist/components/docs.mjs +4 -4
  24. package/dist/components/docs.mjs.map +1 -1
  25. package/dist/components/exec-builtin.cjs +9 -11
  26. package/dist/components/exec-builtin.cjs.map +1 -0
  27. package/dist/components/exec-builtin.d.cts +1 -2
  28. package/dist/components/exec-builtin.d.cts.map +1 -1
  29. package/dist/components/exec-builtin.d.mts +1 -2
  30. package/dist/components/exec-builtin.d.mts.map +1 -1
  31. package/dist/components/exec-builtin.mjs +7 -10
  32. package/dist/components/exec-builtin.mjs.map +1 -1
  33. package/dist/components/helpers.cjs +4 -5
  34. package/dist/components/helpers.cjs.map +1 -0
  35. package/dist/components/helpers.d.cts +6 -8
  36. package/dist/components/helpers.d.cts.map +1 -1
  37. package/dist/components/helpers.d.mts +6 -8
  38. package/dist/components/helpers.d.mts.map +1 -1
  39. package/dist/components/helpers.mjs +2 -3
  40. package/dist/components/helpers.mjs.map +1 -1
  41. package/dist/components/options-parser-logic.cjs +29 -30
  42. package/dist/components/options-parser-logic.cjs.map +1 -0
  43. package/dist/components/options-parser-logic.d.cts +8 -9
  44. package/dist/components/options-parser-logic.d.cts.map +1 -1
  45. package/dist/components/options-parser-logic.d.mts +8 -9
  46. package/dist/components/options-parser-logic.d.mts.map +1 -1
  47. package/dist/components/options-parser-logic.mjs +27 -28
  48. package/dist/components/options-parser-logic.mjs.map +1 -1
  49. package/dist/components/state-builtin.cjs +3 -2
  50. package/dist/components/state-builtin.cjs.map +1 -0
  51. package/dist/components/state-builtin.d.cts +4 -5
  52. package/dist/components/state-builtin.d.cts.map +1 -1
  53. package/dist/components/state-builtin.d.mts +4 -5
  54. package/dist/components/state-builtin.d.mts.map +1 -1
  55. package/dist/components/state-builtin.mjs +1 -1
  56. package/dist/components/state-builtin.mjs.map +1 -1
  57. package/dist/components/usage.cjs +4 -6
  58. package/dist/components/usage.cjs.map +1 -0
  59. package/dist/components/usage.d.cts +1 -2
  60. package/dist/components/usage.d.cts.map +1 -1
  61. package/dist/components/usage.d.mts +1 -2
  62. package/dist/components/usage.d.mts.map +1 -1
  63. package/dist/components/usage.mjs +2 -4
  64. package/dist/components/usage.mjs.map +1 -1
  65. package/dist/components/utils-builtin.cjs +5 -4
  66. package/dist/components/utils-builtin.cjs.map +1 -0
  67. package/dist/components/utils-builtin.d.cts +7 -8
  68. package/dist/components/utils-builtin.d.cts.map +1 -1
  69. package/dist/components/utils-builtin.d.mts +7 -8
  70. package/dist/components/utils-builtin.d.mts.map +1 -1
  71. package/dist/components/utils-builtin.mjs +3 -3
  72. package/dist/components/utils-builtin.mjs.map +1 -1
  73. package/dist/config.cjs +53 -19
  74. package/dist/config.cjs.map +1 -0
  75. package/dist/config.d.cts +29 -8
  76. package/dist/config.d.cts.map +1 -1
  77. package/dist/config.d.mts +29 -8
  78. package/dist/config.d.mts.map +1 -1
  79. package/dist/config.mjs +51 -18
  80. package/dist/config.mjs.map +1 -1
  81. package/dist/contexts/command.cjs +2 -2
  82. package/dist/contexts/command.cjs.map +1 -0
  83. package/dist/contexts/command.d.cts.map +1 -1
  84. package/dist/contexts/command.d.mts.map +1 -1
  85. package/dist/contexts/command.mjs.map +1 -1
  86. package/dist/contexts/options.cjs +4 -4
  87. package/dist/contexts/options.cjs.map +1 -0
  88. package/dist/contexts/options.d.cts.map +1 -1
  89. package/dist/contexts/options.d.mts.map +1 -1
  90. package/dist/contexts/options.mjs +2 -3
  91. package/dist/contexts/options.mjs.map +1 -1
  92. package/dist/engine.cjs +138 -0
  93. package/dist/engine.cjs.map +1 -0
  94. package/dist/engine.d.cts +79 -0
  95. package/dist/engine.d.cts.map +1 -0
  96. package/dist/engine.d.mts +79 -0
  97. package/dist/engine.d.mts.map +1 -0
  98. package/dist/engine.mjs +136 -0
  99. package/dist/engine.mjs.map +1 -0
  100. package/dist/helpers/automd.cjs +6 -7
  101. package/dist/helpers/automd.cjs.map +1 -0
  102. package/dist/helpers/automd.mjs +2 -3
  103. package/dist/helpers/automd.mjs.map +1 -1
  104. package/dist/helpers/docs-helpers.cjs +2 -2
  105. package/dist/helpers/docs-helpers.cjs.map +1 -0
  106. package/dist/helpers/docs-helpers.mjs.map +1 -1
  107. package/dist/helpers/get-framework.cjs +24 -0
  108. package/dist/helpers/get-framework.cjs.map +1 -0
  109. package/dist/helpers/get-framework.mjs +24 -0
  110. package/dist/helpers/get-framework.mjs.map +1 -0
  111. package/dist/helpers/paths.cjs +5 -5
  112. package/dist/helpers/paths.cjs.map +1 -0
  113. package/dist/helpers/paths.mjs +4 -4
  114. package/dist/helpers/paths.mjs.map +1 -1
  115. package/dist/helpers/persistence.cjs +4 -6
  116. package/dist/helpers/persistence.cjs.map +1 -0
  117. package/dist/helpers/persistence.mjs +3 -3
  118. package/dist/helpers/persistence.mjs.map +1 -1
  119. package/dist/helpers/update-package-json.cjs +2 -2
  120. package/dist/helpers/update-package-json.cjs.map +1 -0
  121. package/dist/helpers/update-package-json.mjs.map +1 -1
  122. package/dist/helpers/utilities.cjs +3 -3
  123. package/dist/helpers/utilities.cjs.map +1 -0
  124. package/dist/helpers/utilities.mjs +1 -1
  125. package/dist/helpers/utilities.mjs.map +1 -1
  126. package/dist/helpers/validations.cjs +3 -3
  127. package/dist/helpers/validations.cjs.map +1 -0
  128. package/dist/helpers/validations.mjs +1 -3
  129. package/dist/helpers/validations.mjs.map +1 -1
  130. package/dist/index.cjs +121 -51
  131. package/dist/index.cjs.map +1 -0
  132. package/dist/index.d.cts +80 -5
  133. package/dist/index.d.cts.map +1 -0
  134. package/dist/index.d.mts +80 -5
  135. package/dist/index.d.mts.map +1 -0
  136. package/dist/index.mjs +118 -6
  137. package/dist/index.mjs.map +1 -0
  138. package/dist/package.cjs +12 -0
  139. package/dist/package.cjs.map +1 -0
  140. package/dist/package.mjs +6 -0
  141. package/dist/package.mjs.map +1 -0
  142. package/dist/plugin-utils/compute-bin.cjs +8 -10
  143. package/dist/plugin-utils/compute-bin.cjs.map +1 -0
  144. package/dist/plugin-utils/compute-bin.d.cts +2 -2
  145. package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
  146. package/dist/plugin-utils/compute-bin.d.mts +2 -2
  147. package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
  148. package/dist/plugin-utils/compute-bin.mjs +6 -8
  149. package/dist/plugin-utils/compute-bin.mjs.map +1 -1
  150. package/dist/plugin-utils/context-helpers.cjs +7 -14
  151. package/dist/plugin-utils/context-helpers.cjs.map +1 -0
  152. package/dist/plugin-utils/context-helpers.d.cts +4 -4
  153. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  154. package/dist/plugin-utils/context-helpers.d.mts +4 -4
  155. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  156. package/dist/plugin-utils/context-helpers.mjs +5 -12
  157. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  158. package/dist/plugin-utils/deepkit.cjs +15 -16
  159. package/dist/plugin-utils/deepkit.cjs.map +1 -0
  160. package/dist/plugin-utils/deepkit.d.cts +5 -5
  161. package/dist/plugin-utils/deepkit.d.cts.map +1 -1
  162. package/dist/plugin-utils/deepkit.d.mts +5 -5
  163. package/dist/plugin-utils/deepkit.d.mts.map +1 -1
  164. package/dist/plugin-utils/deepkit.mjs +14 -15
  165. package/dist/plugin-utils/deepkit.mjs.map +1 -1
  166. package/dist/plugin-utils/description-helpers.cjs +2 -1
  167. package/dist/plugin-utils/description-helpers.cjs.map +1 -0
  168. package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
  169. package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
  170. package/dist/plugin-utils/description-helpers.mjs.map +1 -1
  171. package/dist/plugin-utils/get-command-tree.cjs +2 -1
  172. package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
  173. package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
  174. package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
  175. package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
  176. package/dist/plugin-utils/index.cjs +1 -1
  177. package/dist/plugin-utils/index.d.cts +2 -2
  178. package/dist/plugin-utils/index.d.mts +2 -2
  179. package/dist/plugin-utils/index.mjs +2 -2
  180. package/dist/plugin-utils/reflect.cjs +5 -5
  181. package/dist/plugin-utils/reflect.cjs.map +1 -0
  182. package/dist/plugin-utils/reflect.d.cts.map +1 -1
  183. package/dist/plugin-utils/reflect.d.mts.map +1 -1
  184. package/dist/plugin-utils/reflect.mjs +3 -5
  185. package/dist/plugin-utils/reflect.mjs.map +1 -1
  186. package/dist/plugin-utils/traverse-command-tree.cjs +2 -1
  187. package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
  188. package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
  189. package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
  190. package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
  191. package/dist/plugin-utils/type-checks.cjs +146 -17
  192. package/dist/plugin-utils/type-checks.cjs.map +1 -0
  193. package/dist/plugin-utils/type-checks.d.cts +5 -5
  194. package/dist/plugin-utils/type-checks.d.cts.map +1 -1
  195. package/dist/plugin-utils/type-checks.d.mts +5 -5
  196. package/dist/plugin-utils/type-checks.d.mts.map +1 -1
  197. package/dist/plugin-utils/type-checks.mjs +145 -16
  198. package/dist/plugin-utils/type-checks.mjs.map +1 -1
  199. package/dist/plugin.cjs +80 -56
  200. package/dist/plugin.cjs.map +1 -0
  201. package/dist/plugin.d.cts.map +1 -1
  202. package/dist/plugin.d.mts.map +1 -1
  203. package/dist/plugin.mjs +75 -52
  204. package/dist/plugin.mjs.map +1 -1
  205. package/dist/resolver/helpers.cjs +33 -24
  206. package/dist/resolver/helpers.cjs.map +1 -0
  207. package/dist/resolver/helpers.mjs +32 -22
  208. package/dist/resolver/helpers.mjs.map +1 -1
  209. package/dist/resolver/resolve.cjs +319 -61
  210. package/dist/resolver/resolve.cjs.map +1 -0
  211. package/dist/resolver/resolve.mjs +316 -58
  212. package/dist/resolver/resolve.mjs.map +1 -1
  213. package/dist/types/command.cjs +43 -82
  214. package/dist/types/command.cjs.map +1 -0
  215. package/dist/types/command.d.cts +61 -119
  216. package/dist/types/command.d.cts.map +1 -1
  217. package/dist/types/command.d.mts +61 -119
  218. package/dist/types/command.d.mts.map +1 -1
  219. package/dist/types/command.mjs +42 -80
  220. package/dist/types/command.mjs.map +1 -1
  221. package/dist/types/config.cjs +45 -4
  222. package/dist/types/config.cjs.map +1 -0
  223. package/dist/types/config.d.cts +16 -11
  224. package/dist/types/config.d.cts.map +1 -1
  225. package/dist/types/config.d.mts +16 -11
  226. package/dist/types/config.d.mts.map +1 -1
  227. package/dist/types/config.mjs +40 -4
  228. package/dist/types/config.mjs.map +1 -1
  229. package/dist/types/context.cjs +9 -1
  230. package/dist/types/context.cjs.map +1 -0
  231. package/dist/types/context.d.cts +3 -2
  232. package/dist/types/context.d.cts.map +1 -1
  233. package/dist/types/context.d.mts +3 -2
  234. package/dist/types/context.d.mts.map +1 -1
  235. package/dist/types/context.mjs +7 -1
  236. package/dist/types/context.mjs.map +1 -1
  237. package/dist/types/env.cjs +2 -1
  238. package/dist/types/env.cjs.map +1 -0
  239. package/dist/types/env.d.cts.map +1 -1
  240. package/dist/types/env.d.mts.map +1 -1
  241. package/dist/types/env.mjs.map +1 -1
  242. package/dist/types/index.cjs +6 -3
  243. package/dist/types/index.d.cts +4 -4
  244. package/dist/types/index.d.mts +4 -4
  245. package/dist/types/index.mjs +4 -4
  246. package/dist/types/options.cjs +2 -1
  247. package/dist/types/options.cjs.map +1 -0
  248. package/dist/types/options.d.cts.map +1 -1
  249. package/dist/types/options.d.mts.map +1 -1
  250. package/dist/types/options.mjs.map +1 -1
  251. package/package.json +43 -35
  252. package/dist/resolver/deepkit.cjs +0 -135
  253. package/dist/resolver/deepkit.mjs +0 -135
  254. package/dist/resolver/deepkit.mjs.map +0 -1
  255. package/dist/resolver/module.cjs +0 -145
  256. package/dist/resolver/module.mjs +0 -145
  257. package/dist/resolver/module.mjs.map +0 -1
package/dist/config.d.cts CHANGED
@@ -1,16 +1,37 @@
1
- import { UserConfig } from "./types/config.cjs";
1
+ import { EngineOptions, Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.cjs";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  /**
5
- * A utility function to define a Shell Shock user configuration.
5
+ * 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.
6
6
  *
7
- * @remarks
8
- * This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
7
+ * @example
8
+ * ```ts
9
+ * import { defineConfig } from '@shell-shock/core/config';
9
10
  *
10
- * @param config - A partial user configuration object.
11
- * @returns A complete user configuration object.
11
+ * export default defineConfig({
12
+ * // Your configuration here
13
+ * });
14
+ *
15
+ * // Or with a function
16
+ * export default defineConfig((env) => {
17
+ * console.log(`Running command: ${env.command} in mode: ${env.mode}`);
18
+ * return {
19
+ * // Your configuration here
20
+ * };
21
+ * });
22
+ * ```
23
+ *
24
+ * @param config - The user configuration object or a function that returns it.
25
+ * @returns The provided configuration, unmodified.
12
26
  */
13
- declare function defineConfig(config: Partial<UserConfig>): UserConfig;
27
+ declare function defineConfig(config: UserConfig): UserConfig;
28
+ declare function defineConfig(config: UserConfig[]): UserConfig[];
29
+ declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
30
+ declare function defineConfig(config: Promise<UserConfig[]>): Promise<UserConfig[]>;
31
+ declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
32
+ declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
33
+ declare function defineConfig(config: UserConfigFn): UserConfigFn;
34
+ declare function defineConfig(config: UserConfigExport): UserConfigExport;
14
35
  //#endregion
15
- export { defineConfig };
36
+ export { type EngineOptions, type Options, type OutputConfig, type ReferenceOptions, type ResolvedConfig, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, defineConfig };
16
37
  //# sourceMappingURL=config.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;;;;AA6BA;;;;;;;iBAAgB,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,UAAA,IAAc,UAAA"}
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"}
package/dist/config.d.mts CHANGED
@@ -1,16 +1,37 @@
1
- import { UserConfig } from "./types/config.mjs";
1
+ import { EngineOptions, Options, OutputConfig, ReferenceOptions, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise } from "./types/config.mjs";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  /**
5
- * A utility function to define a Shell Shock user configuration.
5
+ * 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.
6
6
  *
7
- * @remarks
8
- * This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
7
+ * @example
8
+ * ```ts
9
+ * import { defineConfig } from '@shell-shock/core/config';
9
10
  *
10
- * @param config - A partial user configuration object.
11
- * @returns A complete user configuration object.
11
+ * export default defineConfig({
12
+ * // Your configuration here
13
+ * });
14
+ *
15
+ * // Or with a function
16
+ * export default defineConfig((env) => {
17
+ * console.log(`Running command: ${env.command} in mode: ${env.mode}`);
18
+ * return {
19
+ * // Your configuration here
20
+ * };
21
+ * });
22
+ * ```
23
+ *
24
+ * @param config - The user configuration object or a function that returns it.
25
+ * @returns The provided configuration, unmodified.
12
26
  */
13
- declare function defineConfig(config: Partial<UserConfig>): UserConfig;
27
+ declare function defineConfig(config: UserConfig): UserConfig;
28
+ declare function defineConfig(config: UserConfig[]): UserConfig[];
29
+ declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
30
+ declare function defineConfig(config: Promise<UserConfig[]>): Promise<UserConfig[]>;
31
+ declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
32
+ declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
33
+ declare function defineConfig(config: UserConfigFn): UserConfigFn;
34
+ declare function defineConfig(config: UserConfigExport): UserConfigExport;
14
35
  //#endregion
15
- export { defineConfig };
36
+ export { type EngineOptions, type Options, type OutputConfig, type ReferenceOptions, type ResolvedConfig, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, defineConfig };
16
37
  //# sourceMappingURL=config.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":";;;;;AA6BA;;;;;;;iBAAgB,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,UAAA,IAAc,UAAA"}
1
+ {"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":""}
package/dist/config.mjs CHANGED
@@ -1,28 +1,61 @@
1
1
  //#region src/config.ts
2
- const __ΩPartial = [
3
- "T",
4
- "Partial",
5
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
6
- ];
7
- /**
8
- * A utility function to define a Shell Shock user configuration.
9
- *
10
- * @remarks
11
- * This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.
12
- *
13
- * @param config - A partial user configuration object.
14
- * @returns A complete user configuration object.
15
- */
2
+ defineConfig.__type = [
3
+ "UserConfig",
4
+ "config",
5
+ "defineConfig",
6
+ "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.",
7
+ "P\"w!2\"\"w!/#?$"
8
+ ];
9
+ defineConfig.__type = [
10
+ "UserConfig",
11
+ "config",
12
+ "defineConfig",
13
+ "P\"w!F2\"\"w!F/#"
14
+ ];
15
+ defineConfig.__type = [
16
+ "UserConfig",
17
+ "config",
18
+ "defineConfig",
19
+ "P\"w!`2\"\"w!`/#"
20
+ ];
21
+ defineConfig.__type = [
22
+ "UserConfig",
23
+ "config",
24
+ "defineConfig",
25
+ "P\"w!F`2\"\"w!F`/#"
26
+ ];
27
+ defineConfig.__type = [
28
+ "UserConfigFnObject",
29
+ "config",
30
+ "defineConfig",
31
+ "P\"w!2\"\"w!/#"
32
+ ];
33
+ defineConfig.__type = [
34
+ "UserConfigFnPromise",
35
+ "config",
36
+ "defineConfig",
37
+ "P\"w!2\"\"w!/#"
38
+ ];
39
+ defineConfig.__type = [
40
+ "UserConfigFn",
41
+ "config",
42
+ "defineConfig",
43
+ "P\"w!2\"\"w!/#"
44
+ ];
45
+ defineConfig.__type = [
46
+ "UserConfigExport",
47
+ "config",
48
+ "defineConfig",
49
+ "P\"w!2\"\"w!/#"
50
+ ];
16
51
  function defineConfig(config) {
17
52
  return config;
18
53
  }
19
54
  defineConfig.__type = [
20
- () => __ΩPartial,
21
- "UserConfig",
55
+ "UserConfigExport",
22
56
  "config",
23
57
  "defineConfig",
24
- "A utility function to define a Shell Shock user configuration.",
25
- "P\"w\"o!\"2#\"w\"/$?%"
58
+ "P\"w!2\"\"w!/#"
26
59
  ];
27
60
 
28
61
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { UserConfig } from \"./types/config\";\n\n/**\n * A utility function to define a Shell Shock user configuration.\n *\n * @remarks\n * This function is used to create a user configuration object for Shell Shock projects. It ensures that the configuration adheres to the expected structure.\n *\n * @param config - A partial user configuration object.\n * @returns A complete user configuration object.\n */\nexport function defineConfig(config: Partial<UserConfig>): UserConfig {\n return config as UserConfig;\n}\n"],"mappings":";AAAA,MAAM,aAAa;CAAC;CAAK;CAAW;CAA2B;;;;;;;;;;AAU/D,SAAgB,aAAW,QAAQ;AAClC,QAAA"}
1
+ {"version":3,"file":"config.mjs","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/contexts/command.ts
@@ -23,4 +22,5 @@ useCommand.__type = [
23
22
 
24
23
  //#endregion
25
24
  exports.CommandContext = CommandContext;
26
- exports.useCommand = useCommand;
25
+ exports.useCommand = useCommand;
26
+ //# sourceMappingURL=command.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.cts","names":[],"sources":["../../src/contexts/command.ts"],"mappings":";;;;;;AAyBA;cAAa,cAAA,EAAgB,gBAAA,CAAiB,WAAA;;;;AAQ9C;;iBAAgB,UAAA,CAAA,GAAU,WAAA"}
1
+ {"version":3,"file":"command.d.cts","names":[],"sources":["../../src/contexts/command.ts"],"mappings":";;;;;;AAyBA;cAAa,cAAA,EAAgB,gBAAgB,CAAC,WAAA;;;AAAW;AAQzD;;iBAAgB,UAAA,IAAU,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.mts","names":[],"sources":["../../src/contexts/command.ts"],"mappings":";;;;;;AAyBA;cAAa,cAAA,EAAgB,gBAAA,CAAiB,WAAA;;;;AAQ9C;;iBAAgB,UAAA,CAAA,GAAU,WAAA"}
1
+ {"version":3,"file":"command.d.mts","names":[],"sources":["../../src/contexts/command.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"command.mjs","names":[],"sources":["../../src/contexts/command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createNamedContext, useContext } from \"@alloy-js/core\";\nimport type { CommandTree } from \"../types/command\";\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const CommandContext: ComponentContext<CommandTree | undefined> =\n createNamedContext<CommandTree | undefined>(\"Command\");\n\n/**\n * Hook to access the Command context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useCommand() {\n return useContext<CommandTree | undefined>(CommandContext)!;\n}\n"],"mappings":";;;;;;;;;;;;;AA4BE,QAAA,WAAA,IAAA,CAAA,CAAA,eAAA,UAAA,CAAA,EAAA,WAAA,eAAA;;AAEF,WAAC,SAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"command.mjs","names":[],"sources":[],"mappings":""}
@@ -1,11 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- const require_types_command = require('../types/command.cjs');
3
+ let _alloy_js_core = require("@alloy-js/core");
4
4
  let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
5
5
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
6
6
  let defu = require("defu");
7
7
  defu = require_runtime.__toESM(defu, 1);
8
- let _alloy_js_core = require("@alloy-js/core");
9
8
 
10
9
  //#region src/contexts/options.ts
11
10
  function __assignType(fn, args) {
@@ -35,7 +34,7 @@ useExistingOptions.__type = [
35
34
  function computedOptions(options) {
36
35
  return options.reduce(__assignType((ret, option) => {
37
36
  ret[(0, _stryke_string_format_camel_case.camelCase)(option.name)] ??= (0, defu.default)({ name: (0, _stryke_string_format_camel_case.camelCase)(option.name) }, ret[option.name] ?? {}, option);
38
- if (option.kind === require_types_command.CommandParameterKinds.boolean && !option.variadic && option.isNegativeOf) ret[(0, _stryke_string_format_camel_case.camelCase)(option.isNegativeOf)] = (0, defu.default)({ name: (0, _stryke_string_format_camel_case.camelCase)(option.isNegativeOf) }, ret[option.isNegativeOf] ?? {}, {
37
+ if (option.type === "boolean" && !option.variadic && option.isNegativeOf) ret[(0, _stryke_string_format_camel_case.camelCase)(option.isNegativeOf)] = (0, defu.default)({ name: (0, _stryke_string_format_camel_case.camelCase)(option.isNegativeOf) }, ret[option.isNegativeOf] ?? {}, {
39
38
  ...option,
40
39
  env: (0, _stryke_type_checks_is_set_string.isSetString)(option.env) ? `NO_${option.env}` : false,
41
40
  description: `${option.description.replace(/\.+$/, "")}. This property is the negative form of ${option.name}.`,
@@ -60,4 +59,5 @@ computedOptions.__type = [
60
59
  //#endregion
61
60
  exports.ExistingOptionsContext = ExistingOptionsContext;
62
61
  exports.computedOptions = computedOptions;
63
- exports.useExistingOptions = useExistingOptions;
62
+ exports.useExistingOptions = useExistingOptions;
63
+ //# sourceMappingURL=options.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.cts","names":[],"sources":["../../src/contexts/options.ts"],"mappings":";;;;;;AA6BA;cAAa,sBAAA,EAAwB,gBAAA;;;;AAWrC;;;;;iBAAgB,kBAAA,CAAA;AAAA,iBAIA,eAAA,CAAgB,OAAA,EAAS,aAAA,KAAe,MAAA,SAAA,aAAA"}
1
+ {"version":3,"file":"options.d.cts","names":[],"sources":["../../src/contexts/options.ts"],"mappings":";;;;;;AA4BA;cAAa,sBAAA,EAAwB,gBAAgB;;;AAAA;AAWrD;;;;AAAkC;iBAAlB,kBAAA;AAAA,iBAIA,eAAA,CAAgB,OAAA,EAAS,aAAA,KAAe,MAAA,SAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.mts","names":[],"sources":["../../src/contexts/options.ts"],"mappings":";;;;;;AA6BA;cAAa,sBAAA,EAAwB,gBAAA;;;;AAWrC;;;;;iBAAgB,kBAAA,CAAA;AAAA,iBAIA,eAAA,CAAgB,OAAA,EAAS,aAAA,KAAe,MAAA,SAAA,aAAA"}
1
+ {"version":3,"file":"options.d.mts","names":[],"sources":["../../src/contexts/options.ts"],"mappings":""}
@@ -1,8 +1,7 @@
1
- import { CommandParameterKinds } from "../types/command.mjs";
1
+ import { createNamedContext, useContext } from "@alloy-js/core";
2
2
  import { camelCase } from "@stryke/string-format/camel-case";
3
3
  import { isSetString } from "@stryke/type-checks/is-set-string";
4
4
  import defu$1 from "defu";
5
- import { createNamedContext, useContext } from "@alloy-js/core";
6
5
 
7
6
  //#region src/contexts/options.ts
8
7
  function __assignType(fn, args) {
@@ -32,7 +31,7 @@ useExistingOptions.__type = [
32
31
  function computedOptions(options) {
33
32
  return options.reduce(__assignType((ret, option) => {
34
33
  ret[camelCase(option.name)] ??= defu$1({ name: camelCase(option.name) }, ret[option.name] ?? {}, option);
35
- if (option.kind === CommandParameterKinds.boolean && !option.variadic && option.isNegativeOf) ret[camelCase(option.isNegativeOf)] = defu$1({ name: camelCase(option.isNegativeOf) }, ret[option.isNegativeOf] ?? {}, {
34
+ if (option.type === "boolean" && !option.variadic && option.isNegativeOf) ret[camelCase(option.isNegativeOf)] = defu$1({ name: camelCase(option.isNegativeOf) }, ret[option.isNegativeOf] ?? {}, {
36
35
  ...option,
37
36
  env: isSetString(option.env) ? `NO_${option.env}` : false,
38
37
  description: `${option.description.replace(/\.+$/, "")}. This property is the negative form of ${option.name}.`,
@@ -1 +1 @@
1
- {"version":3,"file":"options.mjs","names":[],"sources":["../../src/contexts/options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createNamedContext, useContext } from \"@alloy-js/core\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport type { BooleanCommandOption, CommandOption } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ExistingOptionsContext: ComponentContext<string[]> =\n createNamedContext<string[]>(\"ExistingOptions\", []);\n\n/**\n * Hook to access the ExistingOptions context.\n *\n * @remarks\n * This context provides a list of option names that already exist on the interface definition.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useExistingOptions() {\n return useContext<string[]>(ExistingOptionsContext)!;\n}\n\nexport function computedOptions(options: CommandOption[]) {\n return options.reduce(\n (ret, option) => {\n ret[camelCase(option.name)] ??= defu(\n {\n name: camelCase(option.name)\n },\n ret[option.name] ?? {},\n option\n );\n\n if (\n option.kind === CommandParameterKinds.boolean &&\n !option.variadic &&\n option.isNegativeOf\n ) {\n ret[camelCase(option.isNegativeOf)] = defu(\n {\n name: camelCase(option.isNegativeOf)\n },\n ret[option.isNegativeOf] ?? {},\n {\n ...option,\n env: isSetString(option.env) ? `NO_${option.env}` : false,\n description: `${option.description.replace(\n /\\.+$/,\n \"\"\n )}. This property is the negative form of ${option.name}.`,\n isNegativeOf: camelCase(option.name),\n default: !option.default\n }\n ) as BooleanCommandOption;\n }\n\n return ret;\n },\n {} as Record<string, CommandOption>\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE9B,QAAO;;;;;AAUT,MAAa,0BAAsB,mBAAkB,IAAA,CAAA,CAAA,KAAA,CAAA,EAAA,mBAAA,mBAAA,EAAA,CAAA;;;;;;;;;AASrD,SAAS,qBAA4B;AACrC,QAAO,WAAW,IAAK,CAAA,CAAA,KAAA,CAAA,EAAA,WAAA,uBAAA;;AAEvB,mBAAS,SAAA;CAAA;CAAuC;CAAQ;CAAA;;AAEtD,QAAA,QAAA,OAAA,cAAA,KAAA,WAAA;AACC,MAAI,UAAW,OAAA,KAAU,MAAQ,OAAK,EACvC,MAAA,UAAA,OAAA,KAAA,EACF,EAAO,IAAA,OAAM,SAAA,EAAA,EAAA,OAAwB;AACnC,MAAA,OAAA,SAAmB,sBAAW,WAAqB,CAAA,OAAA,YAAA,OAAA,6DAEnD,MAAA,UAAA,OAAA,aAAA,EACK,EAAC,IAAG,OAAO,iBAAmB,EAAC,EAAA;GACrC,GAAA;GACG,KAAA,YAAA,OAAA,IAAA,GAAA,MAAA,OAAA,QAAA;GACI,aAAQ,GAAQ,OAAO,YAAW,QAAM,QAAK,GAAQ,CAAA,0CAAiC,OAAA,KAAA;GAC7F,cAAA,UAAA,OAAA,KAAA;GACG,SAAU,CAAA,OAAS;GACrB,CAAA;AAEA,SAAO;IACT;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA;;AAEA,gBAAgB,SAAA;CAAA;CAAyB;CAAa;CAAI;CAAA"}
1
+ {"version":3,"file":"options.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,138 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_get_framework = require('./helpers/get-framework.cjs');
3
+ let _powerlines_engine = require("@powerlines/engine");
4
+
5
+ //#region src/engine.ts
6
+ /**
7
+ * The Shell Shock Engine class.
8
+ *
9
+ * @remarks
10
+ * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
11
+ */
12
+ var Engine = class Engine {
13
+ #powerlines;
14
+ /**
15
+ * 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.
16
+ *
17
+ * @param options - The user configuration options.
18
+ * @returns A promise that resolves to a {@link Engine} instance.
19
+ */
20
+ static async from(options) {
21
+ return new Engine(await (0, _powerlines_engine.createEngine)({
22
+ ...options,
23
+ framework: require_get_framework.getFramework()
24
+ }, "@shell-shock/core/api"));
25
+ }
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.
28
+ *
29
+ * @returns The current build context.
30
+ */
31
+ get context() {
32
+ return this.#powerlines.context;
33
+ }
34
+ constructor(powerlines) {
35
+ this.#powerlines = powerlines;
36
+ }
37
+ /**
38
+ * 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.
39
+ *
40
+ * @param inlineConfig - The inline configuration options for the clean operation.
41
+ * @returns A promise that resolves when the clean operation is complete.
42
+ */
43
+ async clean(inlineConfig) {
44
+ return this.#powerlines.clean(inlineConfig);
45
+ }
46
+ /**
47
+ * 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.
48
+ *
49
+ * @param inlineConfig - The inline configuration options for the prepare operation.
50
+ * @returns A promise that resolves when the prepare operation is complete.
51
+ */
52
+ async prepare(inlineConfig) {
53
+ return this.#powerlines.prepare(inlineConfig);
54
+ }
55
+ /**
56
+ * 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.
57
+ *
58
+ * @param inlineConfig - The inline configuration options for the lint operation.
59
+ * @returns A promise that resolves when the lint operation is complete.
60
+ */
61
+ async lint(inlineConfig) {
62
+ return this.#powerlines.lint(inlineConfig);
63
+ }
64
+ /**
65
+ * 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.
66
+ *
67
+ * @param inlineConfig - The inline configuration options for the build operation.
68
+ * @returns A promise that resolves when the build operation is complete.
69
+ */
70
+ async build(inlineConfig) {
71
+ return this.#powerlines.build(inlineConfig);
72
+ }
73
+ /**
74
+ * 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.
75
+ *
76
+ * @param inlineConfig - The inline configuration options for the documentation operation.
77
+ * @returns A promise that resolves when the documentation generation is complete.
78
+ */
79
+ async docs(inlineConfig) {
80
+ return this.#powerlines.docs(inlineConfig);
81
+ }
82
+ /**
83
+ * 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.
84
+ *
85
+ * @returns A promise that resolves when the finalize operation is complete.
86
+ */
87
+ async finalize() {
88
+ return this.#powerlines.finalize();
89
+ }
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
+ };
117
+ /**
118
+ * Creates a new {@link Engine} instance.
119
+ *
120
+ * @param options - The user configuration options.
121
+ * @returns A promise that resolves to a {@link Engine} instance.
122
+ */
123
+ async function createEngine(options) {
124
+ return Engine.from(options);
125
+ }
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
+
135
+ //#endregion
136
+ exports.Engine = Engine;
137
+ exports.createEngine = createEngine;
138
+ //# sourceMappingURL=engine.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.cjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,79 @@
1
+ import { EngineOptions } from "./types/config.cjs";
2
+ import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
3
+ import { EngineContext } from "@powerlines/engine";
4
+
5
+ //#region src/engine.d.ts
6
+ /**
7
+ * The Shell Shock Engine class.
8
+ *
9
+ * @remarks
10
+ * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
11
+ */
12
+ declare class Engine {
13
+ #private;
14
+ /**
15
+ * 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.
16
+ *
17
+ * @param options - The user configuration options.
18
+ * @returns A promise that resolves to a {@link Engine} instance.
19
+ */
20
+ static from(options: EngineOptions): Promise<Engine>;
21
+ /**
22
+ * 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.
23
+ *
24
+ * @returns The current build context.
25
+ */
26
+ get context(): EngineContext;
27
+ private constructor();
28
+ /**
29
+ * 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.
30
+ *
31
+ * @param inlineConfig - The inline configuration options for the clean operation.
32
+ * @returns A promise that resolves when the clean operation is complete.
33
+ */
34
+ clean(inlineConfig: CleanInlineConfig): Promise<void>;
35
+ /**
36
+ * 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.
37
+ *
38
+ * @param inlineConfig - The inline configuration options for the prepare operation.
39
+ * @returns A promise that resolves when the prepare operation is complete.
40
+ */
41
+ prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
42
+ /**
43
+ * 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.
44
+ *
45
+ * @param inlineConfig - The inline configuration options for the lint operation.
46
+ * @returns A promise that resolves when the lint operation is complete.
47
+ */
48
+ lint(inlineConfig: LintInlineConfig): Promise<void>;
49
+ /**
50
+ * 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.
51
+ *
52
+ * @param inlineConfig - The inline configuration options for the build operation.
53
+ * @returns A promise that resolves when the build operation is complete.
54
+ */
55
+ build(inlineConfig: BuildInlineConfig): Promise<void>;
56
+ /**
57
+ * 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.
58
+ *
59
+ * @param inlineConfig - The inline configuration options for the documentation operation.
60
+ * @returns A promise that resolves when the documentation generation is complete.
61
+ */
62
+ docs(inlineConfig: DocsInlineConfig): Promise<void>;
63
+ /**
64
+ * 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.
65
+ *
66
+ * @returns A promise that resolves when the finalize operation is complete.
67
+ */
68
+ finalize(): Promise<void>;
69
+ }
70
+ /**
71
+ * Creates a new {@link Engine} instance.
72
+ *
73
+ * @param options - The user configuration options.
74
+ * @returns A promise that resolves to a {@link Engine} instance.
75
+ */
76
+ declare function createEngine(options: EngineOptions): Promise<Engine>;
77
+ //#endregion
78
+ export { Engine, createEngine };
79
+ //# sourceMappingURL=engine.d.cts.map
@@ -0,0 +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"}
@@ -0,0 +1,79 @@
1
+ import { EngineOptions } from "./types/config.mjs";
2
+ import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
3
+ import { EngineContext } from "@powerlines/engine";
4
+
5
+ //#region src/engine.d.ts
6
+ /**
7
+ * The Shell Shock Engine class.
8
+ *
9
+ * @remarks
10
+ * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
11
+ */
12
+ declare class Engine {
13
+ #private;
14
+ /**
15
+ * 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.
16
+ *
17
+ * @param options - The user configuration options.
18
+ * @returns A promise that resolves to a {@link Engine} instance.
19
+ */
20
+ static from(options: EngineOptions): Promise<Engine>;
21
+ /**
22
+ * 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.
23
+ *
24
+ * @returns The current build context.
25
+ */
26
+ get context(): EngineContext;
27
+ private constructor();
28
+ /**
29
+ * 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.
30
+ *
31
+ * @param inlineConfig - The inline configuration options for the clean operation.
32
+ * @returns A promise that resolves when the clean operation is complete.
33
+ */
34
+ clean(inlineConfig: CleanInlineConfig): Promise<void>;
35
+ /**
36
+ * 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.
37
+ *
38
+ * @param inlineConfig - The inline configuration options for the prepare operation.
39
+ * @returns A promise that resolves when the prepare operation is complete.
40
+ */
41
+ prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
42
+ /**
43
+ * 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.
44
+ *
45
+ * @param inlineConfig - The inline configuration options for the lint operation.
46
+ * @returns A promise that resolves when the lint operation is complete.
47
+ */
48
+ lint(inlineConfig: LintInlineConfig): Promise<void>;
49
+ /**
50
+ * 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.
51
+ *
52
+ * @param inlineConfig - The inline configuration options for the build operation.
53
+ * @returns A promise that resolves when the build operation is complete.
54
+ */
55
+ build(inlineConfig: BuildInlineConfig): Promise<void>;
56
+ /**
57
+ * 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.
58
+ *
59
+ * @param inlineConfig - The inline configuration options for the documentation operation.
60
+ * @returns A promise that resolves when the documentation generation is complete.
61
+ */
62
+ docs(inlineConfig: DocsInlineConfig): Promise<void>;
63
+ /**
64
+ * 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.
65
+ *
66
+ * @returns A promise that resolves when the finalize operation is complete.
67
+ */
68
+ finalize(): Promise<void>;
69
+ }
70
+ /**
71
+ * Creates a new {@link Engine} instance.
72
+ *
73
+ * @param options - The user configuration options.
74
+ * @returns A promise that resolves to a {@link Engine} instance.
75
+ */
76
+ declare function createEngine(options: EngineOptions): Promise<Engine>;
77
+ //#endregion
78
+ export { Engine, createEngine };
79
+ //# sourceMappingURL=engine.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.mts","names":[],"sources":["../src/engine.ts"],"mappings":""}