@powerlines/engine 0.14.5 → 0.15.1

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 (195) hide show
  1. package/dist/api/build.cjs +66 -0
  2. package/dist/api/build.d.cts +14 -0
  3. package/dist/api/build.d.cts.map +1 -0
  4. package/dist/api/build.d.mts +14 -0
  5. package/dist/api/build.d.mts.map +1 -0
  6. package/dist/api/build.mjs +64 -0
  7. package/dist/api/build.mjs.map +1 -0
  8. package/dist/api/clean.cjs +29 -0
  9. package/dist/api/clean.d.cts +14 -0
  10. package/dist/api/clean.d.cts.map +1 -0
  11. package/dist/api/clean.d.mts +14 -0
  12. package/dist/api/clean.d.mts.map +1 -0
  13. package/dist/api/clean.mjs +28 -0
  14. package/dist/api/clean.mjs.map +1 -0
  15. package/dist/api/create.cjs +59 -0
  16. package/dist/api/create.d.cts +14 -0
  17. package/dist/api/create.d.cts.map +1 -0
  18. package/dist/api/create.d.mts +14 -0
  19. package/dist/api/create.d.mts.map +1 -0
  20. package/dist/api/create.mjs +57 -0
  21. package/dist/api/create.mjs.map +1 -0
  22. package/dist/api/deploy.cjs +25 -0
  23. package/dist/api/deploy.d.cts +17 -0
  24. package/dist/api/deploy.d.cts.map +1 -0
  25. package/dist/api/deploy.d.mts +17 -0
  26. package/dist/api/deploy.d.mts.map +1 -0
  27. package/dist/api/deploy.mjs +24 -0
  28. package/dist/api/deploy.mjs.map +1 -0
  29. package/dist/api/docs.cjs +25 -0
  30. package/dist/api/docs.d.cts +17 -0
  31. package/dist/api/docs.d.cts.map +1 -0
  32. package/dist/api/docs.d.mts +17 -0
  33. package/dist/api/docs.d.mts.map +1 -0
  34. package/dist/api/docs.mjs +24 -0
  35. package/dist/api/docs.mjs.map +1 -0
  36. package/dist/api/lint.cjs +28 -0
  37. package/dist/api/lint.d.cts +17 -0
  38. package/dist/api/lint.d.cts.map +1 -0
  39. package/dist/api/lint.d.mts +17 -0
  40. package/dist/api/lint.d.mts.map +1 -0
  41. package/dist/api/lint.mjs +27 -0
  42. package/dist/api/lint.mjs.map +1 -0
  43. package/dist/api/prepare.cjs +69 -0
  44. package/dist/api/prepare.d.cts +14 -0
  45. package/dist/api/prepare.d.cts.map +1 -0
  46. package/dist/api/prepare.d.mts +14 -0
  47. package/dist/api/prepare.d.mts.map +1 -0
  48. package/dist/api/prepare.mjs +68 -0
  49. package/dist/api/prepare.mjs.map +1 -0
  50. package/dist/api/test.cjs +28 -0
  51. package/dist/api/test.d.cts +17 -0
  52. package/dist/api/test.d.cts.map +1 -0
  53. package/dist/api/test.d.mts +17 -0
  54. package/dist/api/test.d.mts.map +1 -0
  55. package/dist/api/test.mjs +27 -0
  56. package/dist/api/test.mjs.map +1 -0
  57. package/dist/api/types.cjs +71 -0
  58. package/dist/api/types.d.cts +17 -0
  59. package/dist/api/types.d.cts.map +1 -0
  60. package/dist/api/types.d.mts +17 -0
  61. package/dist/api/types.d.mts.map +1 -0
  62. package/dist/api/types.mjs +70 -0
  63. package/dist/api/types.mjs.map +1 -0
  64. package/dist/api-6w4hZL6n.d.cts +135 -0
  65. package/dist/api-6w4hZL6n.d.cts.map +1 -0
  66. package/dist/api-Cdw4v0W4.d.mts +135 -0
  67. package/dist/api-Cdw4v0W4.d.mts.map +1 -0
  68. package/dist/config-BNe23XHx.d.mts +204 -0
  69. package/dist/config-BNe23XHx.d.mts.map +1 -0
  70. package/dist/config-D6xUniHh.d.cts +204 -0
  71. package/dist/config-D6xUniHh.d.cts.map +1 -0
  72. package/dist/context/engine-context.cjs +175 -0
  73. package/dist/context/engine-context.d.cts +2 -0
  74. package/dist/context/engine-context.d.mts +2 -0
  75. package/dist/context/engine-context.mjs +173 -0
  76. package/dist/context/engine-context.mjs.map +1 -0
  77. package/dist/context/index.cjs +2 -9
  78. package/dist/context/index.d.cts +2 -660
  79. package/dist/context/index.d.mts +2 -660
  80. package/dist/context/index.mjs +2 -4
  81. package/dist/context-DzgsMSWr.d.mts +149 -0
  82. package/dist/context-DzgsMSWr.d.mts.map +1 -0
  83. package/dist/context-epL7NPvL.d.cts +149 -0
  84. package/dist/context-epL7NPvL.d.cts.map +1 -0
  85. package/dist/engine-context-DEotmVzB.d.mts +54 -0
  86. package/dist/engine-context-DEotmVzB.d.mts.map +1 -0
  87. package/dist/engine-context-Dw8odBCo.d.cts +54 -0
  88. package/dist/engine-context-Dw8odBCo.d.cts.map +1 -0
  89. package/dist/engine.cjs +268 -0
  90. package/dist/engine.d.cts +143 -0
  91. package/dist/engine.d.cts.map +1 -0
  92. package/dist/engine.d.mts +143 -0
  93. package/dist/engine.d.mts.map +1 -0
  94. package/dist/engine.mjs +264 -0
  95. package/dist/engine.mjs.map +1 -0
  96. package/dist/execution-host.cjs +44 -0
  97. package/dist/execution-host.d.cts +14 -0
  98. package/dist/execution-host.d.cts.map +1 -0
  99. package/dist/execution-host.d.mts +14 -0
  100. package/dist/execution-host.d.mts.map +1 -0
  101. package/dist/execution-host.mjs +36 -0
  102. package/dist/execution-host.mjs.map +1 -0
  103. package/dist/helpers/create-execution-host.cjs +51 -0
  104. package/dist/helpers/create-execution-host.d.cts +21 -0
  105. package/dist/helpers/create-execution-host.d.cts.map +1 -0
  106. package/dist/helpers/create-execution-host.d.mts +21 -0
  107. package/dist/helpers/create-execution-host.d.mts.map +1 -0
  108. package/dist/helpers/create-execution-host.mjs +50 -0
  109. package/dist/helpers/create-execution-host.mjs.map +1 -0
  110. package/dist/helpers/execution-host-worker.cjs +308 -0
  111. package/dist/helpers/execution-host-worker.d.cts +68 -0
  112. package/dist/helpers/execution-host-worker.d.cts.map +1 -0
  113. package/dist/helpers/execution-host-worker.d.mts +68 -0
  114. package/dist/helpers/execution-host-worker.d.mts.map +1 -0
  115. package/dist/helpers/execution-host-worker.mjs +307 -0
  116. package/dist/helpers/execution-host-worker.mjs.map +1 -0
  117. package/dist/helpers/finalize.cjs +27 -0
  118. package/dist/helpers/finalize.d.cts +12 -0
  119. package/dist/helpers/finalize.d.cts.map +1 -0
  120. package/dist/helpers/finalize.d.mts +12 -0
  121. package/dist/helpers/finalize.d.mts.map +1 -0
  122. package/dist/helpers/finalize.mjs +26 -0
  123. package/dist/helpers/finalize.mjs.map +1 -0
  124. package/dist/helpers/rpc.cjs +140 -0
  125. package/dist/helpers/rpc.d.cts +7 -0
  126. package/dist/helpers/rpc.d.cts.map +1 -0
  127. package/dist/helpers/rpc.d.mts +7 -0
  128. package/dist/helpers/rpc.d.mts.map +1 -0
  129. package/dist/helpers/rpc.mjs +139 -0
  130. package/dist/helpers/rpc.mjs.map +1 -0
  131. package/dist/index-CNgSR_kt.d.mts +1 -0
  132. package/dist/index-D_TYgLX3.d.cts +1 -0
  133. package/dist/index.cjs +13 -567
  134. package/dist/index.d.cts +9 -126
  135. package/dist/index.d.mts +9 -126
  136. package/dist/index.mjs +7 -567
  137. package/package.json +101 -129
  138. package/dist/_internal/worker.cjs +0 -4843
  139. package/dist/_internal/worker.d.cts +0 -38
  140. package/dist/_internal/worker.d.cts.map +0 -1
  141. package/dist/_internal/worker.d.mts +0 -38
  142. package/dist/_internal/worker.d.mts.map +0 -1
  143. package/dist/_internal/worker.mjs +0 -4804
  144. package/dist/_internal/worker.mjs.map +0 -1
  145. package/dist/api.cjs +0 -1274
  146. package/dist/api.d.cts +0 -265
  147. package/dist/api.d.cts.map +0 -1
  148. package/dist/api.d.mts +0 -265
  149. package/dist/api.d.mts.map +0 -1
  150. package/dist/api.mjs +0 -1270
  151. package/dist/api.mjs.map +0 -1
  152. package/dist/base-context-BUnL_9z8.mjs +0 -241
  153. package/dist/base-context-BUnL_9z8.mjs.map +0 -1
  154. package/dist/base-context-CFvO2N9I.cjs +0 -248
  155. package/dist/context/index.d.cts.map +0 -1
  156. package/dist/context/index.d.mts.map +0 -1
  157. package/dist/engine-context-BuD9AGfd.mjs +0 -41
  158. package/dist/engine-context-BuD9AGfd.mjs.map +0 -1
  159. package/dist/engine-context-NO6enYev.cjs +0 -45
  160. package/dist/execution-context-BgGV4xyW.cjs +0 -2614
  161. package/dist/execution-context-D_CXpe9I.mjs +0 -2570
  162. package/dist/execution-context-D_CXpe9I.mjs.map +0 -1
  163. package/dist/fs-D1nIP45P.mjs +0 -226
  164. package/dist/fs-D1nIP45P.mjs.map +0 -1
  165. package/dist/fs-XogSgMqT.cjs +0 -262
  166. package/dist/index.d.cts.map +0 -1
  167. package/dist/index.d.mts.map +0 -1
  168. package/dist/index.mjs.map +0 -1
  169. package/dist/schemas.cjs +0 -9
  170. package/dist/schemas.d.cts +0 -127
  171. package/dist/schemas.d.cts.map +0 -1
  172. package/dist/schemas.d.mts +0 -127
  173. package/dist/schemas.d.mts.map +0 -1
  174. package/dist/schemas.mjs +0 -3
  175. package/dist/storage/index.cjs +0 -9
  176. package/dist/storage/index.d.cts +0 -419
  177. package/dist/storage/index.d.cts.map +0 -1
  178. package/dist/storage/index.d.mts +0 -419
  179. package/dist/storage/index.d.mts.map +0 -1
  180. package/dist/storage/index.mjs +0 -3
  181. package/dist/ts-morph-BaLPVAdB.cjs +0 -114
  182. package/dist/ts-morph-D0CaA37w.mjs +0 -102
  183. package/dist/ts-morph-D0CaA37w.mjs.map +0 -1
  184. package/dist/tsconfig-Cstsoprg.mjs +0 -155
  185. package/dist/tsconfig-Cstsoprg.mjs.map +0 -1
  186. package/dist/tsconfig-DeyWQC2N.cjs +0 -198
  187. package/dist/typescript/index.cjs +0 -13
  188. package/dist/typescript/index.d.cts +0 -106
  189. package/dist/typescript/index.d.cts.map +0 -1
  190. package/dist/typescript/index.d.mts +0 -106
  191. package/dist/typescript/index.d.mts.map +0 -1
  192. package/dist/typescript/index.mjs +0 -4
  193. package/dist/virtual-BNdKVkRw.cjs +0 -548
  194. package/dist/virtual-gIlTc3Lj.mjs +0 -513
  195. package/dist/virtual-gIlTc3Lj.mjs.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
+ import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/docs.d.ts
6
+ /**
7
+ * Generate the project's documentation.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the documentation generation process, orchestrating the execution of documentation hooks across different environments defined in the project configuration. It ensures that all relevant documentation operations are performed in a structured manner, allowing for pre-documentation, main documentation, and post-documentation hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the documentation operation, providing insights into the performance of the documentation process.
11
+ *
12
+ * @param context - The execution context for the documentation process, which provides access to the project configuration, environment, and utility functions for performing the documentation operation. The context is used to manage the state and behavior of the documentation process, allowing for hooks to be called at different stages of the documentation and for environment-specific configurations to be applied.
13
+ */
14
+ declare function docs<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { docs };
17
+ //# sourceMappingURL=docs.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/api/docs.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/docs.d.ts
6
+ /**
7
+ * Generate the project's documentation.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the documentation generation process, orchestrating the execution of documentation hooks across different environments defined in the project configuration. It ensures that all relevant documentation operations are performed in a structured manner, allowing for pre-documentation, main documentation, and post-documentation hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the documentation operation, providing insights into the performance of the documentation process.
11
+ *
12
+ * @param context - The execution context for the documentation process, which provides access to the project configuration, environment, and utility functions for performing the documentation operation. The context is used to manage the state and behavior of the documentation process, allowing for hooks to be called at different stages of the documentation and for environment-specific configurations to be applied.
13
+ */
14
+ declare function docs<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { docs };
17
+ //# sourceMappingURL=docs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.mts","names":[],"sources":["../../src/api/docs.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,24 @@
1
+ import { prepare } from "./prepare.mjs";
2
+ import { executeEnvironments } from "@powerlines/core/lib/environment";
3
+
4
+ //#region src/api/docs.ts
5
+ /**
6
+ * Generate the project's documentation.
7
+ *
8
+ * @remarks
9
+ * This function serves as the main entry point for the documentation generation process, orchestrating the execution of documentation hooks across different environments defined in the project configuration. It ensures that all relevant documentation operations are performed in a structured manner, allowing for pre-documentation, main documentation, and post-documentation hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the documentation operation, providing insights into the performance of the documentation process.
10
+ *
11
+ * @param context - The execution context for the documentation process, which provides access to the project configuration, environment, and utility functions for performing the documentation operation. The context is used to manage the state and behavior of the documentation process, allowing for hooks to be called at different stages of the documentation and for environment-specific configurations to be applied.
12
+ */
13
+ async function docs(context) {
14
+ const timer = context.timer("Documentation");
15
+ await prepare(context);
16
+ await executeEnvironments(context, async (env) => {
17
+ await context.callHook("docs", { environment: env });
18
+ });
19
+ timer();
20
+ }
21
+
22
+ //#endregion
23
+ export { docs };
24
+ //# sourceMappingURL=docs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.mjs","names":[],"sources":["../../src/api/docs.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutionContext } from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Generate the project's documentation.\n *\n * @remarks\n * This function serves as the main entry point for the documentation generation process, orchestrating the execution of documentation hooks across different environments defined in the project configuration. It ensures that all relevant documentation operations are performed in a structured manner, allowing for pre-documentation, main documentation, and post-documentation hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the documentation operation, providing insights into the performance of the documentation process.\n *\n * @param context - The execution context for the documentation process, which provides access to the project configuration, environment, and utility functions for performing the documentation operation. The context is used to manage the state and behavior of the documentation process, allowing for hooks to be called at different stages of the documentation and for environment-specific configurations to be applied.\n */\nexport async function docs<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Documentation\");\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n await executeEnvironments(context, async env => {\n await context.callHook(\"docs\", {\n environment: env\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,KAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;AAE5C,OAAM,QAAyC,QAAQ;AACvD,OAAM,oBAAoB,SAAS,OAAM,QAAO;AAC9C,QAAM,QAAQ,SAAS,QAAQ,EAC7B,aAAa,KACd,CAAC;GACF;AAEF,QAAO"}
@@ -0,0 +1,28 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-C0xms8kb.cjs');
3
+ const require_api_prepare = require('./prepare.cjs');
4
+ let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
5
+
6
+ //#region src/api/lint.ts
7
+ /**
8
+ * Lint the project's source files and report any issues found.
9
+ *
10
+ * @remarks
11
+ * This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.
12
+ *
13
+ * @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.
14
+ */
15
+ async function lint(context) {
16
+ const timer = context.timer("Linting");
17
+ await require_api_prepare.prepare(context);
18
+ await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
19
+ await context.callHook("lint", {
20
+ environment: env,
21
+ sequential: false
22
+ });
23
+ });
24
+ timer();
25
+ }
26
+
27
+ //#endregion
28
+ exports.lint = lint;
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
+ import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/lint.d.ts
6
+ /**
7
+ * Lint the project's source files and report any issues found.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.
11
+ *
12
+ * @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.
13
+ */
14
+ declare function lint<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { lint };
17
+ //# sourceMappingURL=lint.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.d.cts","names":[],"sources":["../../src/api/lint.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/lint.d.ts
6
+ /**
7
+ * Lint the project's source files and report any issues found.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.
11
+ *
12
+ * @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.
13
+ */
14
+ declare function lint<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { lint };
17
+ //# sourceMappingURL=lint.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.d.mts","names":[],"sources":["../../src/api/lint.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,27 @@
1
+ import { prepare } from "./prepare.mjs";
2
+ import { executeEnvironments } from "@powerlines/core/lib/environment";
3
+
4
+ //#region src/api/lint.ts
5
+ /**
6
+ * Lint the project's source files and report any issues found.
7
+ *
8
+ * @remarks
9
+ * This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.
10
+ *
11
+ * @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.
12
+ */
13
+ async function lint(context) {
14
+ const timer = context.timer("Linting");
15
+ await prepare(context);
16
+ await executeEnvironments(context, async (env) => {
17
+ await context.callHook("lint", {
18
+ environment: env,
19
+ sequential: false
20
+ });
21
+ });
22
+ timer();
23
+ }
24
+
25
+ //#endregion
26
+ export { lint };
27
+ //# sourceMappingURL=lint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.mjs","names":[],"sources":["../../src/api/lint.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutionContext } from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Lint the project's source files and report any issues found.\n *\n * @remarks\n * This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.\n *\n * @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.\n */\nexport async function lint<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Linting\");\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n await executeEnvironments(context, async env => {\n await context.callHook(\"lint\", {\n environment: env,\n sequential: false\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,KAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;AAEtC,OAAM,QAAyC,QAAQ;AACvD,OAAM,oBAAoB,SAAS,OAAM,QAAO;AAC9C,QAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;GACb,CAAC;GACF;AAEF,QAAO"}
@@ -0,0 +1,69 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-C0xms8kb.cjs');
3
+ let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
4
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
5
+ let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
6
+ let _powerlines_core_lib_generate_types = require("@powerlines/core/lib/generate-types");
7
+ let _powerlines_core_lib_install_dependencies = require("@powerlines/core/lib/install-dependencies");
8
+ let _powerlines_core_lib_meta = require("@powerlines/core/lib/meta");
9
+ let _powerlines_core_lib_typescript_tsconfig = require("@powerlines/core/lib/typescript/tsconfig");
10
+ let _powerlines_core_lib_utilities_format = require("@powerlines/core/lib/utilities/format");
11
+ let _stryke_fs_helpers = require("@stryke/fs/helpers");
12
+ let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
13
+
14
+ //#region src/api/prepare.ts
15
+ /**
16
+ * Prepare the project
17
+ *
18
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
19
+ */
20
+ async function prepare(context, skipTypes = false) {
21
+ const timer = context.timer("Preparation");
22
+ await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
23
+ env.debug(`Initializing the processing options for the Powerlines project.`);
24
+ await context.callHook("configResolved", {
25
+ environment: env,
26
+ order: "pre"
27
+ });
28
+ await (0, _powerlines_core_lib_typescript_tsconfig.initializeTsconfig)(env);
29
+ await context.callHook("configResolved", {
30
+ environment: env,
31
+ order: "normal"
32
+ });
33
+ if (env.entry.length > 0) env.debug(`The configuration provided ${(0, _stryke_type_checks_is_object.isObject)(env.config.input) ? Object.keys(env.config.input).length : (0, _stryke_convert_to_array.toArray)(env.config.input).length} entry point(s), Powerlines has found ${env.entry.length} entry files(s) for the ${env.config.title} project${env.entry.length > 0 && env.entry.length < 10 ? `: \n${env.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
34
+ else env.warn(`No entry files were found for the ${env.config.title} project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`);
35
+ await (0, _powerlines_core_lib_typescript_tsconfig.resolveTsconfig)(env);
36
+ await (0, _powerlines_core_lib_install_dependencies.installDependencies)(env);
37
+ await context.callHook("configResolved", {
38
+ environment: env,
39
+ order: "post"
40
+ });
41
+ env.trace({
42
+ meta: { category: "config" },
43
+ message: `Powerlines configuration after configResolved hook: \n${(0, _powerlines_core_plugin_utils.formatConfig)(env.config)}`
44
+ });
45
+ if (!env.fs.existsSync(env.cachePath)) await (0, _stryke_fs_helpers.createDirectory)(env.cachePath);
46
+ if (!env.fs.existsSync(env.dataPath)) await (0, _stryke_fs_helpers.createDirectory)(env.dataPath);
47
+ await context.callHook("prepare", {
48
+ environment: env,
49
+ order: "pre"
50
+ });
51
+ await context.callHook("prepare", {
52
+ environment: env,
53
+ order: "normal"
54
+ });
55
+ await context.callHook("prepare", {
56
+ environment: env,
57
+ order: "post"
58
+ });
59
+ if (!skipTypes && env.config.output.types !== false) await (0, _powerlines_core_lib_generate_types.handleTypes)(context, env);
60
+ context.debug("Formatting files generated during the prepare step.");
61
+ await Promise.all([(0, _powerlines_core_lib_utilities_format.formatFolder)(env, env.builtinsPath), (0, _powerlines_core_lib_utilities_format.formatFolder)(env, env.entryPath)]);
62
+ await (0, _powerlines_core_lib_meta.writeMetaFile)(env);
63
+ env.persistedMeta = env.meta;
64
+ });
65
+ timer();
66
+ }
67
+
68
+ //#endregion
69
+ exports.prepare = prepare;
@@ -0,0 +1,14 @@
1
+ import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
+ import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/prepare.d.ts
6
+ /**
7
+ * Prepare the project
8
+ *
9
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
10
+ */
11
+ declare function prepare<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>, skipTypes?: boolean): Promise<void>;
12
+ //#endregion
13
+ export { prepare };
14
+ //# sourceMappingURL=prepare.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.d.cts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAwCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
@@ -0,0 +1,14 @@
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/prepare.d.ts
6
+ /**
7
+ * Prepare the project
8
+ *
9
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
10
+ */
11
+ declare function prepare<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>, skipTypes?: boolean): Promise<void>;
12
+ //#endregion
13
+ export { prepare };
14
+ //# sourceMappingURL=prepare.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.d.mts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAwCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
@@ -0,0 +1,68 @@
1
+ import { formatConfig } from "@powerlines/core/plugin-utils";
2
+ import { toArray } from "@stryke/convert/to-array";
3
+ import { executeEnvironments } from "@powerlines/core/lib/environment";
4
+ import { handleTypes } from "@powerlines/core/lib/generate-types";
5
+ import { installDependencies } from "@powerlines/core/lib/install-dependencies";
6
+ import { writeMetaFile } from "@powerlines/core/lib/meta";
7
+ import { initializeTsconfig, resolveTsconfig } from "@powerlines/core/lib/typescript/tsconfig";
8
+ import { formatFolder } from "@powerlines/core/lib/utilities/format";
9
+ import { createDirectory } from "@stryke/fs/helpers";
10
+ import { isObject } from "@stryke/type-checks/is-object";
11
+
12
+ //#region src/api/prepare.ts
13
+ /**
14
+ * Prepare the project
15
+ *
16
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
17
+ */
18
+ async function prepare(context, skipTypes = false) {
19
+ const timer = context.timer("Preparation");
20
+ await executeEnvironments(context, async (env) => {
21
+ env.debug(`Initializing the processing options for the Powerlines project.`);
22
+ await context.callHook("configResolved", {
23
+ environment: env,
24
+ order: "pre"
25
+ });
26
+ await initializeTsconfig(env);
27
+ await context.callHook("configResolved", {
28
+ environment: env,
29
+ order: "normal"
30
+ });
31
+ if (env.entry.length > 0) env.debug(`The configuration provided ${isObject(env.config.input) ? Object.keys(env.config.input).length : toArray(env.config.input).length} entry point(s), Powerlines has found ${env.entry.length} entry files(s) for the ${env.config.title} project${env.entry.length > 0 && env.entry.length < 10 ? `: \n${env.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
32
+ else env.warn(`No entry files were found for the ${env.config.title} project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`);
33
+ await resolveTsconfig(env);
34
+ await installDependencies(env);
35
+ await context.callHook("configResolved", {
36
+ environment: env,
37
+ order: "post"
38
+ });
39
+ env.trace({
40
+ meta: { category: "config" },
41
+ message: `Powerlines configuration after configResolved hook: \n${formatConfig(env.config)}`
42
+ });
43
+ if (!env.fs.existsSync(env.cachePath)) await createDirectory(env.cachePath);
44
+ if (!env.fs.existsSync(env.dataPath)) await createDirectory(env.dataPath);
45
+ await context.callHook("prepare", {
46
+ environment: env,
47
+ order: "pre"
48
+ });
49
+ await context.callHook("prepare", {
50
+ environment: env,
51
+ order: "normal"
52
+ });
53
+ await context.callHook("prepare", {
54
+ environment: env,
55
+ order: "post"
56
+ });
57
+ if (!skipTypes && env.config.output.types !== false) await handleTypes(context, env);
58
+ context.debug("Formatting files generated during the prepare step.");
59
+ await Promise.all([formatFolder(env, env.builtinsPath), formatFolder(env, env.entryPath)]);
60
+ await writeMetaFile(env);
61
+ env.persistedMeta = env.meta;
62
+ });
63
+ timer();
64
+ }
65
+
66
+ //#endregion
67
+ export { prepare };
68
+ //# sourceMappingURL=prepare.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.mjs","names":[],"sources":["../../src/api/prepare.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ExecutionContext } from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { handleTypes } from \"@powerlines/core/lib/generate-types\";\nimport { installDependencies } from \"@powerlines/core/lib/install-dependencies\";\nimport { writeMetaFile } from \"@powerlines/core/lib/meta\";\nimport {\n initializeTsconfig,\n resolveTsconfig\n} from \"@powerlines/core/lib/typescript/tsconfig\";\nimport { formatFolder } from \"@powerlines/core/lib/utilities/format\";\nimport { formatConfig } from \"@powerlines/core/plugin-utils\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { createDirectory } from \"@stryke/fs/helpers\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\n\n/**\n * Prepare the project\n *\n * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.\n */\nexport async function prepare<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(\n context: ExecutionContext<TResolvedConfig, TSystemContext>,\n skipTypes = false\n) {\n const timer = context.timer(\"Preparation\");\n\n await executeEnvironments(context, async env => {\n env.debug(\n `Initializing the processing options for the Powerlines project.`\n );\n\n await context.callHook(\"configResolved\", {\n environment: env,\n order: \"pre\"\n });\n\n await initializeTsconfig<TResolvedConfig, TSystemContext>(env);\n\n await context.callHook(\"configResolved\", {\n environment: env,\n order: \"normal\"\n });\n\n if (env.entry.length > 0) {\n env.debug(\n `The configuration provided ${\n isObject(env.config.input)\n ? Object.keys(env.config.input).length\n : toArray(env.config.input).length\n } entry point(s), Powerlines has found ${\n env.entry.length\n } entry files(s) for the ${env.config.title} project${\n env.entry.length > 0 && env.entry.length < 10\n ? `: \\n${env.entry\n .map(\n entry =>\n `- ${entry.file}${\n entry.output ? ` -> ${entry.output}` : \"\"\n }`\n )\n .join(\" \\n\")}`\n : \"\"\n }`\n );\n } else {\n env.warn(\n `No entry files were found for the ${\n env.config.title\n } project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`\n );\n }\n\n await resolveTsconfig<TResolvedConfig, TSystemContext>(env);\n await installDependencies(env);\n\n await context.callHook(\"configResolved\", {\n environment: env,\n order: \"post\"\n });\n\n env.trace({\n meta: {\n category: \"config\"\n },\n message: `Powerlines configuration after configResolved hook: \\n${formatConfig(\n env.config\n )}`\n });\n\n if (!env.fs.existsSync(env.cachePath)) {\n await createDirectory(env.cachePath);\n }\n\n if (!env.fs.existsSync(env.dataPath)) {\n await createDirectory(env.dataPath);\n }\n\n await context.callHook(\"prepare\", {\n environment: env,\n order: \"pre\"\n });\n await context.callHook(\"prepare\", {\n environment: env,\n order: \"normal\"\n });\n\n await context.callHook(\"prepare\", {\n environment: env,\n order: \"post\"\n });\n\n if (!skipTypes && env.config.output.types !== false) {\n await handleTypes(context, env);\n }\n\n context.debug(\"Formatting files generated during the prepare step.\");\n\n await Promise.all([\n formatFolder(env, env.builtinsPath),\n formatFolder(env, env.entryPath)\n ]);\n\n await writeMetaFile(env);\n env.persistedMeta = env.meta;\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,eAAsB,QAIpB,SACA,YAAY,OACZ;CACA,MAAM,QAAQ,QAAQ,MAAM,cAAc;AAE1C,OAAM,oBAAoB,SAAS,OAAM,QAAO;AAC9C,MAAI,MACF,kEACD;AAED,QAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;GACR,CAAC;AAEF,QAAM,mBAAoD,IAAI;AAE9D,QAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;GACR,CAAC;AAEF,MAAI,IAAI,MAAM,SAAS,EACrB,KAAI,MACF,8BACE,SAAS,IAAI,OAAO,MAAM,GACtB,OAAO,KAAK,IAAI,OAAO,MAAM,CAAC,SAC9B,QAAQ,IAAI,OAAO,MAAM,CAAC,OAC/B,wCACC,IAAI,MAAM,OACX,0BAA0B,IAAI,OAAO,MAAM,UAC1C,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KACvC,OAAO,IAAI,MACR,KACC,UACE,KAAK,MAAM,OACT,MAAM,SAAS,OAAO,MAAM,WAAW,KAE5C,CACA,KAAK,MAAM,KACd,KAEP;MAED,KAAI,KACF,qCACE,IAAI,OAAO,MACZ,8HACF;AAGH,QAAM,gBAAiD,IAAI;AAC3D,QAAM,oBAAoB,IAAI;AAE9B,QAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;GACR,CAAC;AAEF,MAAI,MAAM;GACR,MAAM,EACJ,UAAU,UACX;GACD,SAAS,yDAAyD,aAChE,IAAI,OACL;GACF,CAAC;AAEF,MAAI,CAAC,IAAI,GAAG,WAAW,IAAI,UAAU,CACnC,OAAM,gBAAgB,IAAI,UAAU;AAGtC,MAAI,CAAC,IAAI,GAAG,WAAW,IAAI,SAAS,CAClC,OAAM,gBAAgB,IAAI,SAAS;AAGrC,QAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;GACR,CAAC;AACF,QAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;GACR,CAAC;AAEF,QAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;GACR,CAAC;AAEF,MAAI,CAAC,aAAa,IAAI,OAAO,OAAO,UAAU,MAC5C,OAAM,YAAY,SAAS,IAAI;AAGjC,UAAQ,MAAM,sDAAsD;AAEpE,QAAM,QAAQ,IAAI,CAChB,aAAa,KAAK,IAAI,aAAa,EACnC,aAAa,KAAK,IAAI,UAAU,CACjC,CAAC;AAEF,QAAM,cAAc,IAAI;AACxB,MAAI,gBAAgB,IAAI;GACxB;AAEF,QAAO"}
@@ -0,0 +1,28 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-C0xms8kb.cjs');
3
+ const require_api_prepare = require('./prepare.cjs');
4
+ let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
5
+
6
+ //#region src/api/test.ts
7
+ /**
8
+ * Test the project's source files and report any issues found.
9
+ *
10
+ * @remarks
11
+ * This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.
12
+ *
13
+ * @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.
14
+ */
15
+ async function test(context) {
16
+ const timer = context.timer("Testing");
17
+ await require_api_prepare.prepare(context);
18
+ await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
19
+ await context.callHook("test", {
20
+ environment: env,
21
+ sequential: false
22
+ });
23
+ });
24
+ timer();
25
+ }
26
+
27
+ //#endregion
28
+ exports.test = test;
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
+ import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/test.d.ts
6
+ /**
7
+ * Test the project's source files and report any issues found.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.
11
+ *
12
+ * @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.
13
+ */
14
+ declare function test<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { test };
17
+ //# sourceMappingURL=test.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.cts","names":[],"sources":["../../src/api/test.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { ExecutionContext } from "@powerlines/core";
4
+
5
+ //#region src/api/test.d.ts
6
+ /**
7
+ * Test the project's source files and report any issues found.
8
+ *
9
+ * @remarks
10
+ * This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.
11
+ *
12
+ * @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.
13
+ */
14
+ declare function test<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { test };
17
+ //# sourceMappingURL=test.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.mts","names":[],"sources":["../../src/api/test.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,27 @@
1
+ import { prepare } from "./prepare.mjs";
2
+ import { executeEnvironments } from "@powerlines/core/lib/environment";
3
+
4
+ //#region src/api/test.ts
5
+ /**
6
+ * Test the project's source files and report any issues found.
7
+ *
8
+ * @remarks
9
+ * This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.
10
+ *
11
+ * @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.
12
+ */
13
+ async function test(context) {
14
+ const timer = context.timer("Testing");
15
+ await prepare(context);
16
+ await executeEnvironments(context, async (env) => {
17
+ await context.callHook("test", {
18
+ environment: env,
19
+ sequential: false
20
+ });
21
+ });
22
+ timer();
23
+ }
24
+
25
+ //#endregion
26
+ export { test };
27
+ //# sourceMappingURL=test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.mjs","names":[],"sources":["../../src/api/test.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutionContext } from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Test the project's source files and report any issues found.\n *\n * @remarks\n * This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.\n *\n * @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.\n */\nexport async function test<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Testing\");\n\n await prepare(context);\n await executeEnvironments(context, async env => {\n await context.callHook(\"test\", {\n environment: env,\n sequential: false\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,KAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;AAEtC,OAAM,QAAQ,QAAQ;AACtB,OAAM,oBAAoB,SAAS,OAAM,QAAO;AAC9C,QAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;GACb,CAAC;GACF;AAEF,QAAO"}
@@ -0,0 +1,71 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-C0xms8kb.cjs');
3
+ const require_api_prepare = require('./prepare.cjs');
4
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
5
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
6
+ let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
7
+ let _powerlines_core_lib_generate_types = require("@powerlines/core/lib/generate-types");
8
+ let _powerlines_core_lib_install_dependencies = require("@powerlines/core/lib/install-dependencies");
9
+ let _powerlines_core_lib_meta = require("@powerlines/core/lib/meta");
10
+ let _powerlines_core_lib_typescript_tsconfig = require("@powerlines/core/lib/typescript/tsconfig");
11
+ let _powerlines_core_lib_utilities_format = require("@powerlines/core/lib/utilities/format");
12
+ let _stryke_fs_helpers = require("@stryke/fs/helpers");
13
+ let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
14
+ let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
15
+ let _stryke_helpers_omit = require("@stryke/helpers/omit");
16
+
17
+ //#region src/api/types.ts
18
+ /**
19
+ * Generate runtime types for the Powerlines project.
20
+ *
21
+ * @remarks
22
+ * This function is responsible for generating TypeScript declaration files based on the project's configuration and environment. It executes hooks at various stages of the type generation process, allowing for customization and extension by plugins. The generated types are formatted and written to the appropriate location in the project's file system, ensuring that they are available for use by other parts of the Powerlines system and by end-users of the project.
23
+ *
24
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
25
+ */
26
+ async function types(context) {
27
+ const timer = context.timer("Type Generation");
28
+ context.debug(" Aggregating configuration options for the Powerlines project");
29
+ await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
30
+ env.debug(`Initializing the processing options for the Powerlines project.`);
31
+ await context.callHook("configResolved", {
32
+ environment: env,
33
+ order: "pre"
34
+ });
35
+ await (0, _powerlines_core_lib_typescript_tsconfig.initializeTsconfig)(env);
36
+ await context.callHook("configResolved", {
37
+ environment: env,
38
+ order: "normal"
39
+ });
40
+ if (env.entry.length > 0) env.debug(`The configuration provided ${(0, _stryke_type_checks_is_object.isObject)(env.config.input) ? Object.keys(env.config.input).length : (0, _stryke_convert_to_array.toArray)(env.config.input).length} entry point(s), Powerlines has found ${env.entry.length} entry files(s) for the ${env.config.title} project${env.entry.length > 0 && env.entry.length < 10 ? `: \n${env.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
41
+ else env.warn(`No entry files were found for the ${env.config.title} project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`);
42
+ await (0, _powerlines_core_lib_typescript_tsconfig.resolveTsconfig)(env);
43
+ await (0, _powerlines_core_lib_install_dependencies.installDependencies)(env);
44
+ await context.callHook("configResolved", {
45
+ environment: env,
46
+ order: "post"
47
+ });
48
+ context.trace(`Powerlines configuration has been resolved: \n\n${(0, _storm_software_config_tools_logger.formatLogMessage)({
49
+ ...env.config,
50
+ userConfig: (0, _stryke_type_checks_is_set_object.isSetObject)(env.config.userConfig) ? (0, _stryke_helpers_omit.omit)(env.config.userConfig, ["plugins"]) : void 0,
51
+ inlineConfig: (0, _stryke_type_checks_is_set_object.isSetObject)(env.config.inlineConfig) ? env.config.inlineConfig : void 0,
52
+ plugins: env.plugins.map((plugin) => plugin.name)
53
+ })}`);
54
+ if (!env.fs.existsSync(env.cachePath)) await (0, _stryke_fs_helpers.createDirectory)(env.cachePath);
55
+ if (!env.fs.existsSync(env.dataPath)) await (0, _stryke_fs_helpers.createDirectory)(env.dataPath);
56
+ if (env.config.skipCache === true || env.persistedMeta?.checksum !== env.meta.checksum) env.debug(`Using previously prepared files as the meta checksum has not changed.`);
57
+ else {
58
+ env.info(`Running \`prepare\` command as the meta checksum has changed since the last run.`);
59
+ await require_api_prepare.prepare(context, true);
60
+ }
61
+ await (0, _powerlines_core_lib_generate_types.handleTypes)(context, env);
62
+ context.debug("Formatting files generated during the types step.");
63
+ await (0, _powerlines_core_lib_utilities_format.format)(env, env.typesPath, await env.fs.read(env.typesPath) ?? "");
64
+ await (0, _powerlines_core_lib_meta.writeMetaFile)(env);
65
+ env.persistedMeta = env.meta;
66
+ });
67
+ timer();
68
+ }
69
+
70
+ //#endregion
71
+ exports.types = types;
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
+ import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
+ import { ExecutionContext } from "@powerlines/core/types/context";
4
+
5
+ //#region src/api/types.d.ts
6
+ /**
7
+ * Generate runtime types for the Powerlines project.
8
+ *
9
+ * @remarks
10
+ * This function is responsible for generating TypeScript declaration files based on the project's configuration and environment. It executes hooks at various stages of the type generation process, allowing for customization and extension by plugins. The generated types are formatted and written to the appropriate location in the project's file system, ensuring that they are available for use by other parts of the Powerlines system and by end-users of the project.
11
+ *
12
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
13
+ */
14
+ declare function types<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { types };
17
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/api/types.ts"],"mappings":";;;;;;;AA8CA;;;;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -0,0 +1,17 @@
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { ExecutionContext } from "@powerlines/core/types/context";
4
+
5
+ //#region src/api/types.d.ts
6
+ /**
7
+ * Generate runtime types for the Powerlines project.
8
+ *
9
+ * @remarks
10
+ * This function is responsible for generating TypeScript declaration files based on the project's configuration and environment. It executes hooks at various stages of the type generation process, allowing for customization and extension by plugins. The generated types are formatted and written to the appropriate location in the project's file system, ensuring that they are available for use by other parts of the Powerlines system and by end-users of the project.
11
+ *
12
+ * @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
13
+ */
14
+ declare function types<TResolvedConfig extends EngineResolvedConfig, TSystemContext extends EngineSystemContext>(context: ExecutionContext<TResolvedConfig, TSystemContext>): Promise<void>;
15
+ //#endregion
16
+ export { types };
17
+ //# sourceMappingURL=types.d.mts.map