@powerlines/engine 0.49.29 → 0.49.30

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 (168) hide show
  1. package/dist/api/build.cjs +9 -2
  2. package/dist/api/build.d.cts.map +1 -1
  3. package/dist/api/build.d.mts.map +1 -1
  4. package/dist/api/build.mjs +3 -1
  5. package/dist/api/build.mjs.map +1 -1
  6. package/dist/api/build.test.cjs +15 -0
  7. package/dist/api/build.test.d.cts +1 -0
  8. package/dist/api/build.test.d.mts +1 -0
  9. package/dist/api/build.test.mjs +17 -0
  10. package/dist/api/build.test.mjs.map +1 -0
  11. package/dist/api/clean.cjs +9 -1
  12. package/dist/api/clean.d.cts.map +1 -1
  13. package/dist/api/clean.d.mts.map +1 -1
  14. package/dist/api/clean.mjs +3 -1
  15. package/dist/api/clean.mjs.map +1 -1
  16. package/dist/api/clean.test.cjs +15 -0
  17. package/dist/api/clean.test.d.cts +1 -0
  18. package/dist/api/clean.test.d.mts +1 -0
  19. package/dist/api/clean.test.mjs +17 -0
  20. package/dist/api/clean.test.mjs.map +1 -0
  21. package/dist/api/create.cjs +9 -2
  22. package/dist/api/create.d.cts.map +1 -1
  23. package/dist/api/create.d.mts.map +1 -1
  24. package/dist/api/create.mjs +3 -1
  25. package/dist/api/create.mjs.map +1 -1
  26. package/dist/api/create.test.cjs +15 -0
  27. package/dist/api/create.test.d.cts +1 -0
  28. package/dist/api/create.test.d.mts +1 -0
  29. package/dist/api/create.test.mjs +17 -0
  30. package/dist/api/create.test.mjs.map +1 -0
  31. package/dist/api/deploy.cjs +9 -1
  32. package/dist/api/deploy.d.cts.map +1 -1
  33. package/dist/api/deploy.d.mts.map +1 -1
  34. package/dist/api/deploy.mjs +3 -1
  35. package/dist/api/deploy.mjs.map +1 -1
  36. package/dist/api/deploy.test.cjs +15 -0
  37. package/dist/api/deploy.test.d.cts +1 -0
  38. package/dist/api/deploy.test.d.mts +1 -0
  39. package/dist/api/deploy.test.mjs +17 -0
  40. package/dist/api/deploy.test.mjs.map +1 -0
  41. package/dist/api/docs.cjs +9 -1
  42. package/dist/api/docs.d.cts.map +1 -1
  43. package/dist/api/docs.d.mts.map +1 -1
  44. package/dist/api/docs.mjs +3 -1
  45. package/dist/api/docs.mjs.map +1 -1
  46. package/dist/api/docs.test.cjs +15 -0
  47. package/dist/api/docs.test.d.cts +1 -0
  48. package/dist/api/docs.test.d.mts +1 -0
  49. package/dist/api/docs.test.mjs +17 -0
  50. package/dist/api/docs.test.mjs.map +1 -0
  51. package/dist/api/lint.cjs +9 -1
  52. package/dist/api/lint.d.cts.map +1 -1
  53. package/dist/api/lint.d.mts.map +1 -1
  54. package/dist/api/lint.mjs +3 -1
  55. package/dist/api/lint.mjs.map +1 -1
  56. package/dist/api/lint.test.cjs +15 -0
  57. package/dist/api/lint.test.d.cts +1 -0
  58. package/dist/api/lint.test.d.mts +1 -0
  59. package/dist/api/lint.test.mjs +17 -0
  60. package/dist/api/lint.test.mjs.map +1 -0
  61. package/dist/api/prepare.cjs +9 -1
  62. package/dist/api/prepare.d.cts.map +1 -1
  63. package/dist/api/prepare.d.mts.map +1 -1
  64. package/dist/api/prepare.mjs +3 -1
  65. package/dist/api/prepare.mjs.map +1 -1
  66. package/dist/api/prepare.test.cjs +15 -0
  67. package/dist/api/prepare.test.d.cts +1 -0
  68. package/dist/api/prepare.test.d.mts +1 -0
  69. package/dist/api/prepare.test.mjs +17 -0
  70. package/dist/api/prepare.test.mjs.map +1 -0
  71. package/dist/api/test.cjs +9 -1
  72. package/dist/api/test.d.cts.map +1 -1
  73. package/dist/api/test.d.mts.map +1 -1
  74. package/dist/api/test.mjs +3 -1
  75. package/dist/api/test.mjs.map +1 -1
  76. package/dist/api/test.test.cjs +15 -0
  77. package/dist/api/test.test.d.cts +1 -0
  78. package/dist/api/test.test.d.mts +1 -0
  79. package/dist/api/test.test.mjs +17 -0
  80. package/dist/api/test.test.mjs.map +1 -0
  81. package/dist/api/types.cjs +9 -1
  82. package/dist/api/types.d.cts.map +1 -1
  83. package/dist/api/types.d.mts.map +1 -1
  84. package/dist/api/types.mjs +3 -1
  85. package/dist/api/types.mjs.map +1 -1
  86. package/dist/api/types.test.cjs +15 -0
  87. package/dist/api/types.test.d.cts +1 -0
  88. package/dist/api/types.test.d.mts +1 -0
  89. package/dist/api/types.test.mjs +17 -0
  90. package/dist/api/types.test.mjs.map +1 -0
  91. package/dist/api.cjs +10 -1
  92. package/dist/api.mjs +3 -1
  93. package/dist/api.mjs.map +1 -1
  94. package/dist/api.test.cjs +15 -0
  95. package/dist/api.test.d.cts +1 -0
  96. package/dist/api.test.d.mts +1 -0
  97. package/dist/api.test.mjs +17 -0
  98. package/dist/api.test.mjs.map +1 -0
  99. package/dist/{chunk-C_NdSu1c.cjs → chunk-CEeaYzDW.cjs} +19 -0
  100. package/dist/chunk-w6R9maHv.mjs +18 -0
  101. package/dist/context/engine-context.cjs +9 -2
  102. package/dist/context/engine-context.mjs +3 -1
  103. package/dist/context/engine-context.mjs.map +1 -1
  104. package/dist/context/engine-context.test.cjs +15 -0
  105. package/dist/context/engine-context.test.d.cts +1 -0
  106. package/dist/context/engine-context.test.d.mts +1 -0
  107. package/dist/context/engine-context.test.mjs +17 -0
  108. package/dist/context/engine-context.test.mjs.map +1 -0
  109. package/dist/engine-B5pbfMyg.d.cts.map +1 -1
  110. package/dist/{engine-DRAFIm5M.mjs → engine-CQbIlCXR.mjs} +8 -2
  111. package/dist/{engine-DRAFIm5M.mjs.map → engine-CQbIlCXR.mjs.map} +1 -1
  112. package/dist/engine-CeWEM0TT.d.mts.map +1 -1
  113. package/dist/{engine-BKEDCOCb.cjs → engine-D_B_s_Ai.cjs} +12 -1
  114. package/dist/engine-context-CaPJFek0.d.mts.map +1 -1
  115. package/dist/engine-context-DDbpdZHC.d.cts.map +1 -1
  116. package/dist/engine.cjs +1 -1
  117. package/dist/engine.mjs +1 -1
  118. package/dist/engine.test.cjs +15 -0
  119. package/dist/engine.test.d.cts +1 -0
  120. package/dist/engine.test.d.mts +1 -0
  121. package/dist/engine.test.mjs +17 -0
  122. package/dist/engine.test.mjs.map +1 -0
  123. package/dist/finalize-CuV0r3jg.d.cts.map +1 -1
  124. package/dist/finalize-CuV0r3jg.d.mts.map +1 -1
  125. package/dist/helpers/create-api.cjs +9 -1
  126. package/dist/helpers/create-api.mjs +3 -1
  127. package/dist/helpers/create-api.mjs.map +1 -1
  128. package/dist/helpers/create-api.test.cjs +15 -0
  129. package/dist/helpers/create-api.test.d.cts +1 -0
  130. package/dist/helpers/create-api.test.d.mts +1 -0
  131. package/dist/helpers/create-api.test.mjs +17 -0
  132. package/dist/helpers/create-api.test.mjs.map +1 -0
  133. package/dist/helpers/finalize.cjs +9 -1
  134. package/dist/helpers/finalize.mjs +3 -1
  135. package/dist/helpers/finalize.mjs.map +1 -1
  136. package/dist/helpers/finalize.test.cjs +15 -0
  137. package/dist/helpers/finalize.test.d.cts +1 -0
  138. package/dist/helpers/finalize.test.d.mts +1 -0
  139. package/dist/helpers/finalize.test.mjs +17 -0
  140. package/dist/helpers/finalize.test.mjs.map +1 -0
  141. package/dist/helpers/rpc.cjs +9 -1
  142. package/dist/helpers/rpc.mjs +3 -1
  143. package/dist/helpers/rpc.mjs.map +1 -1
  144. package/dist/helpers/rpc.test.cjs +15 -0
  145. package/dist/helpers/rpc.test.d.cts +1 -0
  146. package/dist/helpers/rpc.test.d.mts +1 -0
  147. package/dist/helpers/rpc.test.mjs +17 -0
  148. package/dist/helpers/rpc.test.mjs.map +1 -0
  149. package/dist/helpers/stream.cjs +13 -1
  150. package/dist/helpers/stream.mjs +7 -1
  151. package/dist/helpers/stream.mjs.map +1 -1
  152. package/dist/helpers/stream.test.cjs +15 -0
  153. package/dist/helpers/stream.test.d.cts +1 -0
  154. package/dist/helpers/stream.test.d.mts +1 -0
  155. package/dist/helpers/stream.test.mjs +17 -0
  156. package/dist/helpers/stream.test.mjs.map +1 -0
  157. package/dist/helpers/type-checks.test.cjs +28 -0
  158. package/dist/helpers/type-checks.test.d.cts +1 -0
  159. package/dist/helpers/type-checks.test.d.mts +1 -0
  160. package/dist/helpers/type-checks.test.mjs +30 -0
  161. package/dist/helpers/type-checks.test.mjs.map +1 -0
  162. package/dist/index-CBobV6Wm.d.mts.map +1 -1
  163. package/dist/index-QuLZgb8w.d.cts.map +1 -1
  164. package/dist/index.cjs +1 -1
  165. package/dist/index.mjs +1 -1
  166. package/dist/stream-B9jffNbk.d.cts.map +1 -1
  167. package/dist/stream-B9jffNbk.d.mts.map +1 -1
  168. package/package.json +19 -19
@@ -0,0 +1,17 @@
1
+ import { t as docs_exports } from "./docs.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/docs.test.ts
5
+ describe("base/engine/src/api/docs.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(docs_exports).toBeDefined();
8
+ expect(typeof docs_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(docs_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=docs.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.test.mjs","names":["moduleExports"],"sources":["../../src/api/docs.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./docs\";\n\ndescribe(\"base/engine/src/api/docs.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;AAGA,SAAS,qCAAqC;CAC5C,GAAG,8BAA8B;EAC/B,OAAOA,YAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,YAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,YAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
package/dist/api/lint.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
2
3
  const require_api_prepare = require('./prepare.cjs');
3
4
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
4
5
 
5
6
  //#region src/api/lint.ts
7
+ var lint_exports = /* @__PURE__ */ require_chunk.__exportAll({ lint: () => lint });
6
8
  /**
7
9
  * Lint the project's source files and report any issues found.
8
10
  *
@@ -24,4 +26,10 @@ async function lint(context) {
24
26
  }
25
27
 
26
28
  //#endregion
27
- exports.lint = lint;
29
+ exports.lint = lint;
30
+ Object.defineProperty(exports, 'lint_exports', {
31
+ enumerable: true,
32
+ get: function () {
33
+ return lint_exports;
34
+ }
35
+ });
@@ -1 +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"}
1
+ {"version":3,"file":"lint.d.cts","names":[],"sources":["../../src/api/lint.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +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"}
1
+ {"version":3,"file":"lint.d.mts","names":[],"sources":["../../src/api/lint.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
package/dist/api/lint.mjs CHANGED
@@ -1,7 +1,9 @@
1
+ import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
1
2
  import { prepare } from "./prepare.mjs";
2
3
  import { executeEnvironments } from "@powerlines/core/lib/environment";
3
4
 
4
5
  //#region src/api/lint.ts
6
+ var lint_exports = /* @__PURE__ */ __exportAll({ lint: () => lint });
5
7
  /**
6
8
  * Lint the project's source files and report any issues found.
7
9
  *
@@ -23,5 +25,5 @@ async function lint(context) {
23
25
  }
24
26
 
25
27
  //#endregion
26
- export { lint };
28
+ export { lint, lint_exports as t };
27
29
  //# sourceMappingURL=lint.mjs.map
@@ -1 +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,SAAS;CAErC,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
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,SAAS;CAErC,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_lint = require('./lint.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/lint.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/lint.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_lint.lint_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_lint.lint_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_lint.lint_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+ import { t as lint_exports } from "./lint.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/lint.test.ts
5
+ describe("base/engine/src/api/lint.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(lint_exports).toBeDefined();
8
+ expect(typeof lint_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(lint_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=lint.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.test.mjs","names":["moduleExports"],"sources":["../../src/api/lint.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./lint\";\n\ndescribe(\"base/engine/src/api/lint.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;AAGA,SAAS,qCAAqC;CAC5C,GAAG,8BAA8B;EAC/B,OAAOA,YAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,YAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,YAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
2
3
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
3
4
  let _stryke_path_replace = require("@stryke/path/replace");
4
5
  let _powerlines_core_lib_generate_types = require("@powerlines/core/lib/generate-types");
@@ -12,6 +13,7 @@ let _stryke_fs_helpers = require("@stryke/fs/helpers");
12
13
  let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
13
14
 
14
15
  //#region src/api/prepare.ts
16
+ var prepare_exports = /* @__PURE__ */ require_chunk.__exportAll({ prepare: () => prepare });
15
17
  /**
16
18
  * Prepare the project
17
19
  *
@@ -68,4 +70,10 @@ async function prepare(context, skipTypes = false) {
68
70
  }
69
71
 
70
72
  //#endregion
71
- exports.prepare = prepare;
73
+ exports.prepare = prepare;
74
+ Object.defineProperty(exports, 'prepare_exports', {
75
+ enumerable: true,
76
+ get: function () {
77
+ return prepare_exports;
78
+ }
79
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.d.cts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAyCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
1
+ {"version":3,"file":"prepare.d.cts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAyCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,EAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.d.mts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAyCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
1
+ {"version":3,"file":"prepare.d.mts","names":[],"sources":["../../src/api/prepare.ts"],"mappings":";;;;;;;AAyCA;;;iBAAsB,OAAA,yBACI,oBAAA,yBACD,mBAAA,EAEvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,GAC3C,SAAA,aAAiB,OAAA"}
@@ -1,3 +1,4 @@
1
+ import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
1
2
  import { executeEnvironments } from "@powerlines/core/lib/environment";
2
3
  import { replacePath } from "@stryke/path/replace";
3
4
  import { handleTypes } from "@powerlines/core/lib/generate-types";
@@ -11,6 +12,7 @@ import { createDirectory } from "@stryke/fs/helpers";
11
12
  import { isObject } from "@stryke/type-checks/is-object";
12
13
 
13
14
  //#region src/api/prepare.ts
15
+ var prepare_exports = /* @__PURE__ */ __exportAll({ prepare: () => prepare });
14
16
  /**
15
17
  * Prepare the project
16
18
  *
@@ -67,5 +69,5 @@ async function prepare(context, skipTypes = false) {
67
69
  }
68
70
 
69
71
  //#endregion
70
- export { prepare };
72
+ export { prepare, prepare_exports as t };
71
73
  //# sourceMappingURL=prepare.mjs.map
@@ -1 +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 { replacePath } from \"@stryke/path/replace\";\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 const entriesLength = isObject(env.config.input)\n ? Object.keys(env.config.input).length\n : toArray(env.config.input).length;\n env.debug(\n `The configuration provided ${entriesLength} entry point${\n entriesLength !== 1 ? \"s\" : \"\"\n }, Powerlines has found ${env.entry.length} entry file${\n env.entry.length !== 1 ? \"s\" : \"\"\n } for the ${env.config.title} project${\n env.entry.length > 0 && env.entry.length < 10\n ? `: \\n${env.entry\n .map(\n entry =>\n `- ${replacePath(entry.file, context.config.root)}${\n entry.output\n ? ` -> ${replacePath(\n entry.output,\n context.config.root\n )}`\n : \"\"\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":";;;;;;;;;;;;;;;;;;AAyCA,eAAsB,QAIpB,SACA,YAAY,OACZ;CACA,MAAM,QAAQ,QAAQ,MAAM,aAAa;CAEzC,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MACF,iEACF;EAEA,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,mBAAoD,GAAG;EAE7D,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,MAAM,SAAS,GAAG;GACxB,MAAM,gBAAgB,SAAS,IAAI,OAAO,KAAK,IAC3C,OAAO,KAAK,IAAI,OAAO,KAAK,EAAE,SAC9B,QAAQ,IAAI,OAAO,KAAK,EAAE;GAC9B,IAAI,MACF,8BAA8B,cAAc,cAC1C,kBAAkB,IAAI,MAAM,GAC7B,yBAAyB,IAAI,MAAM,OAAO,aACzC,IAAI,MAAM,WAAW,IAAI,MAAM,GAChC,WAAW,IAAI,OAAO,MAAM,UAC3B,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KACvC,OAAO,IAAI,MACR,KACC,UACE,KAAK,YAAY,MAAM,MAAM,QAAQ,OAAO,IAAI,IAC9C,MAAM,SACF,OAAO,YACL,MAAM,QACN,QAAQ,OAAO,IACjB,MACA,IAEV,EACC,KAAK,KAAK,MACb,IAER;EACF,OACE,IAAI,KACF,qCACE,IAAI,OAAO,MACZ,6HACH;EAGF,MAAM,gBAAiD,GAAG;EAC1D,MAAM,oBAAoB,GAAG;EAE7B,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,MAAM;GACR,MAAM,EACJ,UAAU,SACZ;GACA,SAAS,yDAAyD,aAChE,IAAI,MACN;EACF,CAAC;EAED,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,SAAS,GAClC,MAAM,gBAAgB,IAAI,SAAS;EAGrC,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,QAAQ,GACjC,MAAM,gBAAgB,IAAI,QAAQ;EAGpC,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EACD,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,CAAC,aAAa,IAAI,OAAO,OAAO,UAAU,OAC5C,MAAM,YAAY,SAAS,GAAG;EAGhC,QAAQ,MAAM,qDAAqD;EAEnE,MAAM,QAAQ,IAAI,CAChB,aAAa,KAAK,IAAI,YAAY,GAClC,aAAa,KAAK,IAAI,SAAS,CACjC,CAAC;EAED,MAAM,cAAc,GAAG;EACvB,IAAI,gBAAgB,IAAI;CAC1B,CAAC;CAED,MAAM;AACR"}
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 { replacePath } from \"@stryke/path/replace\";\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 const entriesLength = isObject(env.config.input)\n ? Object.keys(env.config.input).length\n : toArray(env.config.input).length;\n env.debug(\n `The configuration provided ${entriesLength} entry point${\n entriesLength !== 1 ? \"s\" : \"\"\n }, Powerlines has found ${env.entry.length} entry file${\n env.entry.length !== 1 ? \"s\" : \"\"\n } for the ${env.config.title} project${\n env.entry.length > 0 && env.entry.length < 10\n ? `: \\n${env.entry\n .map(\n entry =>\n `- ${replacePath(entry.file, context.config.root)}${\n entry.output\n ? ` -> ${replacePath(\n entry.output,\n context.config.root\n )}`\n : \"\"\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":";;;;;;;;;;;;;;;;;;;;AAyCA,eAAsB,QAIpB,SACA,YAAY,OACZ;CACA,MAAM,QAAQ,QAAQ,MAAM,aAAa;CAEzC,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MACF,iEACF;EAEA,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,mBAAoD,GAAG;EAE7D,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,MAAM,SAAS,GAAG;GACxB,MAAM,gBAAgB,SAAS,IAAI,OAAO,KAAK,IAC3C,OAAO,KAAK,IAAI,OAAO,KAAK,EAAE,SAC9B,QAAQ,IAAI,OAAO,KAAK,EAAE;GAC9B,IAAI,MACF,8BAA8B,cAAc,cAC1C,kBAAkB,IAAI,MAAM,GAC7B,yBAAyB,IAAI,MAAM,OAAO,aACzC,IAAI,MAAM,WAAW,IAAI,MAAM,GAChC,WAAW,IAAI,OAAO,MAAM,UAC3B,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KACvC,OAAO,IAAI,MACR,KACC,UACE,KAAK,YAAY,MAAM,MAAM,QAAQ,OAAO,IAAI,IAC9C,MAAM,SACF,OAAO,YACL,MAAM,QACN,QAAQ,OAAO,IACjB,MACA,IAEV,EACC,KAAK,KAAK,MACb,IAER;EACF,OACE,IAAI,KACF,qCACE,IAAI,OAAO,MACZ,6HACH;EAGF,MAAM,gBAAiD,GAAG;EAC1D,MAAM,oBAAoB,GAAG;EAE7B,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,MAAM;GACR,MAAM,EACJ,UAAU,SACZ;GACA,SAAS,yDAAyD,aAChE,IAAI,MACN;EACF,CAAC;EAED,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,SAAS,GAClC,MAAM,gBAAgB,IAAI,SAAS;EAGrC,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,QAAQ,GACjC,MAAM,gBAAgB,IAAI,QAAQ;EAGpC,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EACD,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,QAAQ,SAAS,WAAW;GAChC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,CAAC,aAAa,IAAI,OAAO,OAAO,UAAU,OAC5C,MAAM,YAAY,SAAS,GAAG;EAGhC,QAAQ,MAAM,qDAAqD;EAEnE,MAAM,QAAQ,IAAI,CAChB,aAAa,KAAK,IAAI,YAAY,GAClC,aAAa,KAAK,IAAI,SAAS,CACjC,CAAC;EAED,MAAM,cAAc,GAAG;EACvB,IAAI,gBAAgB,IAAI;CAC1B,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_prepare = require('./prepare.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/prepare.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/prepare.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_prepare.prepare_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_prepare.prepare_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_prepare.prepare_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+ import { t as prepare_exports } from "./prepare.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/prepare.test.ts
5
+ describe("base/engine/src/api/prepare.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(prepare_exports).toBeDefined();
8
+ expect(typeof prepare_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(prepare_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=prepare.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.test.mjs","names":["moduleExports"],"sources":["../../src/api/prepare.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./prepare\";\n\ndescribe(\"base/engine/src/api/prepare.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;AAGA,SAAS,wCAAwC;CAC/C,GAAG,8BAA8B;EAC/B,OAAOA,eAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,eAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,eAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
package/dist/api/test.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
2
3
  const require_api_prepare = require('./prepare.cjs');
3
4
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
4
5
 
5
6
  //#region src/api/test.ts
7
+ var test_exports = /* @__PURE__ */ require_chunk.__exportAll({ test: () => test });
6
8
  /**
7
9
  * Test the project's source files and report any issues found.
8
10
  *
@@ -24,4 +26,10 @@ async function test(context) {
24
26
  }
25
27
 
26
28
  //#endregion
27
- exports.test = test;
29
+ exports.test = test;
30
+ Object.defineProperty(exports, 'test_exports', {
31
+ enumerable: true,
32
+ get: function () {
33
+ return test_exports;
34
+ }
35
+ });
@@ -1 +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"}
1
+ {"version":3,"file":"test.d.cts","names":[],"sources":["../../src/api/test.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +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"}
1
+ {"version":3,"file":"test.d.mts","names":[],"sources":["../../src/api/test.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
package/dist/api/test.mjs CHANGED
@@ -1,7 +1,9 @@
1
+ import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
1
2
  import { prepare } from "./prepare.mjs";
2
3
  import { executeEnvironments } from "@powerlines/core/lib/environment";
3
4
 
4
5
  //#region src/api/test.ts
6
+ var test_exports = /* @__PURE__ */ __exportAll({ test: () => test });
5
7
  /**
6
8
  * Test the project's source files and report any issues found.
7
9
  *
@@ -23,5 +25,5 @@ async function test(context) {
23
25
  }
24
26
 
25
27
  //#endregion
26
- export { test };
28
+ export { test_exports as t, test };
27
29
  //# sourceMappingURL=test.mjs.map
@@ -1 +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,SAAS;CAErC,MAAM,QAAQ,OAAO;CACrB,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
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,SAAS;CAErC,MAAM,QAAQ,OAAO;CACrB,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ;GAC7B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_test = require('./test.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/test.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/test.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_test.test_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_test.test_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_test.test_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+ import { t as test_exports } from "./test.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/test.test.ts
5
+ describe("base/engine/src/api/test.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(test_exports).toBeDefined();
8
+ expect(typeof test_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(test_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=test.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.test.mjs","names":["moduleExports"],"sources":["../../src/api/test.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./test\";\n\ndescribe(\"base/engine/src/api/test.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;AAGA,SAAS,qCAAqC;CAC5C,GAAG,8BAA8B;EAC/B,OAAOA,YAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,YAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,YAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
2
3
  const require_api_prepare = require('./prepare.cjs');
3
4
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
4
5
  let _stryke_path_replace = require("@stryke/path/replace");
@@ -15,6 +16,7 @@ let _stryke_helpers_omit = require("@stryke/helpers/omit");
15
16
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
16
17
 
17
18
  //#region src/api/types.ts
19
+ var types_exports = /* @__PURE__ */ require_chunk.__exportAll({ types: () => types });
18
20
  /**
19
21
  * Generate runtime types for the Powerlines project.
20
22
  *
@@ -70,4 +72,10 @@ async function types(context) {
70
72
  }
71
73
 
72
74
  //#endregion
73
- exports.types = types;
75
+ exports.types = types;
76
+ Object.defineProperty(exports, 'types_exports', {
77
+ enumerable: true,
78
+ get: function () {
79
+ return types_exports;
80
+ }
81
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/api/types.ts"],"mappings":";;;;;;;AA+CA;;;;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/api/types.ts"],"mappings":";;;;;;;AA+CA;;;;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","names":[],"sources":["../../src/api/types.ts"],"mappings":";;;;;;;AA+CA;;;;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../src/api/types.ts"],"mappings":";;;;;;;AA+CA;;;;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1,3 +1,4 @@
1
+ import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
1
2
  import { prepare } from "./prepare.mjs";
2
3
  import { executeEnvironments } from "@powerlines/core/lib/environment";
3
4
  import { replacePath } from "@stryke/path/replace";
@@ -14,6 +15,7 @@ import { omit } from "@stryke/helpers/omit";
14
15
  import { isSetObject } from "@stryke/type-checks/is-set-object";
15
16
 
16
17
  //#region src/api/types.ts
18
+ var types_exports = /* @__PURE__ */ __exportAll({ types: () => types });
17
19
  /**
18
20
  * Generate runtime types for the Powerlines project.
19
21
  *
@@ -69,5 +71,5 @@ async function types(context) {
69
71
  }
70
72
 
71
73
  //#endregion
72
- export { types };
74
+ export { types_exports as t, types };
73
75
  //# sourceMappingURL=types.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","names":[],"sources":["../../src/api/types.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 { 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 { format } from \"@powerlines/core/lib/utilities/format\";\nimport { ExecutionContext } from \"@powerlines/core/types/context\";\nimport { formatLogMessage } from \"@storm-software/config-tools/logger\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { createDirectory } from \"@stryke/fs/helpers\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Generate runtime types for the Powerlines project.\n *\n * @remarks\n * 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.\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 types<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Type Generation\");\n context.debug(\n \" Aggregating configuration options for the Powerlines project\"\n );\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 const entriesLength = isObject(env.config.input)\n ? Object.keys(env.config.input).length\n : toArray(env.config.input).length;\n env.debug(\n `The configuration provided ${entriesLength} entry point${\n entriesLength !== 1 ? \"s\" : \"\"\n }, Powerlines has found ${env.entry.length} entry file${\n env.entry.length !== 1 ? \"s\" : \"\"\n } for the ${env.config.title} project${\n env.entry.length > 0 && env.entry.length < 10\n ? `: \\n${env.entry\n .map(\n entry =>\n `- ${replacePath(entry.file, context.config.root)}${\n entry.output\n ? ` -> ${replacePath(\n entry.output,\n context.config.root\n )}`\n : \"\"\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 context.trace(\n `Powerlines configuration has been resolved: \\n\\n${formatLogMessage({\n ...env.config,\n userConfig: isSetObject(env.config.userConfig)\n ? omit(env.config.userConfig, [\"plugins\"])\n : undefined,\n inlineConfig: isSetObject(env.config.inlineConfig)\n ? env.config.inlineConfig\n : undefined,\n plugins: env.plugins.map(plugin => plugin.name)\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 if (\n env.config.skipCache === true ||\n env.persistedMeta?.checksum !== env.meta.checksum\n ) {\n env.debug(\n `Using previously prepared files as the meta checksum has not changed.`\n );\n } else {\n env.info(\n `Running \\`prepare\\` command as the meta checksum has changed since the last run.`\n );\n\n await prepare(context, true);\n }\n\n await handleTypes(context, env);\n\n context.debug(\"Formatting files generated during the types step.\");\n\n await format(env, env.typesPath, (await env.fs.read(env.typesPath)) ?? \"\");\n\n await writeMetaFile(env);\n env.persistedMeta = env.meta;\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+CA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,iBAAiB;CAC7C,QAAQ,MACN,+DACF;CAEA,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MACF,iEACF;EAEA,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,mBAAoD,GAAG;EAE7D,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,MAAM,SAAS,GAAG;GACxB,MAAM,gBAAgB,SAAS,IAAI,OAAO,KAAK,IAC3C,OAAO,KAAK,IAAI,OAAO,KAAK,EAAE,SAC9B,QAAQ,IAAI,OAAO,KAAK,EAAE;GAC9B,IAAI,MACF,8BAA8B,cAAc,cAC1C,kBAAkB,IAAI,MAAM,GAC7B,yBAAyB,IAAI,MAAM,OAAO,aACzC,IAAI,MAAM,WAAW,IAAI,MAAM,GAChC,WAAW,IAAI,OAAO,MAAM,UAC3B,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KACvC,OAAO,IAAI,MACR,KACC,UACE,KAAK,YAAY,MAAM,MAAM,QAAQ,OAAO,IAAI,IAC9C,MAAM,SACF,OAAO,YACL,MAAM,QACN,QAAQ,OAAO,IACjB,MACA,IAEV,EACC,KAAK,KAAK,MACb,IAER;EACF,OACE,IAAI,KACF,qCACE,IAAI,OAAO,MACZ,6HACH;EAGF,MAAM,gBAAiD,GAAG;EAC1D,MAAM,oBAAoB,GAAG;EAE7B,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,QAAQ,MACN,mDAAmD,iBAAiB;GAClE,GAAG,IAAI;GACP,YAAY,YAAY,IAAI,OAAO,UAAU,IACzC,KAAK,IAAI,OAAO,YAAY,CAAC,SAAS,CAAC,IACvC;GACJ,cAAc,YAAY,IAAI,OAAO,YAAY,IAC7C,IAAI,OAAO,eACX;GACJ,SAAS,IAAI,QAAQ,KAAI,WAAU,OAAO,IAAI;EAChD,CAAC,GACH;EAEA,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,SAAS,GAClC,MAAM,gBAAgB,IAAI,SAAS;EAGrC,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,QAAQ,GACjC,MAAM,gBAAgB,IAAI,QAAQ;EAGpC,IACE,IAAI,OAAO,cAAc,QACzB,IAAI,eAAe,aAAa,IAAI,KAAK,UAEzC,IAAI,MACF,uEACF;OACK;GACL,IAAI,KACF,kFACF;GAEA,MAAM,QAAQ,SAAS,IAAI;EAC7B;EAEA,MAAM,YAAY,SAAS,GAAG;EAE9B,QAAQ,MAAM,mDAAmD;EAEjE,MAAM,OAAO,KAAK,IAAI,WAAY,MAAM,IAAI,GAAG,KAAK,IAAI,SAAS,KAAM,EAAE;EAEzE,MAAM,cAAc,GAAG;EACvB,IAAI,gBAAgB,IAAI;CAC1B,CAAC;CAED,MAAM;AACR"}
1
+ {"version":3,"file":"types.mjs","names":[],"sources":["../../src/api/types.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 { 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 { format } from \"@powerlines/core/lib/utilities/format\";\nimport { ExecutionContext } from \"@powerlines/core/types/context\";\nimport { formatLogMessage } from \"@storm-software/config-tools/logger\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { createDirectory } from \"@stryke/fs/helpers\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Generate runtime types for the Powerlines project.\n *\n * @remarks\n * 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.\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 types<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Type Generation\");\n context.debug(\n \" Aggregating configuration options for the Powerlines project\"\n );\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 const entriesLength = isObject(env.config.input)\n ? Object.keys(env.config.input).length\n : toArray(env.config.input).length;\n env.debug(\n `The configuration provided ${entriesLength} entry point${\n entriesLength !== 1 ? \"s\" : \"\"\n }, Powerlines has found ${env.entry.length} entry file${\n env.entry.length !== 1 ? \"s\" : \"\"\n } for the ${env.config.title} project${\n env.entry.length > 0 && env.entry.length < 10\n ? `: \\n${env.entry\n .map(\n entry =>\n `- ${replacePath(entry.file, context.config.root)}${\n entry.output\n ? ` -> ${replacePath(\n entry.output,\n context.config.root\n )}`\n : \"\"\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 context.trace(\n `Powerlines configuration has been resolved: \\n\\n${formatLogMessage({\n ...env.config,\n userConfig: isSetObject(env.config.userConfig)\n ? omit(env.config.userConfig, [\"plugins\"])\n : undefined,\n inlineConfig: isSetObject(env.config.inlineConfig)\n ? env.config.inlineConfig\n : undefined,\n plugins: env.plugins.map(plugin => plugin.name)\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 if (\n env.config.skipCache === true ||\n env.persistedMeta?.checksum !== env.meta.checksum\n ) {\n env.debug(\n `Using previously prepared files as the meta checksum has not changed.`\n );\n } else {\n env.info(\n `Running \\`prepare\\` command as the meta checksum has changed since the last run.`\n );\n\n await prepare(context, true);\n }\n\n await handleTypes(context, env);\n\n context.debug(\"Formatting files generated during the types step.\");\n\n await format(env, env.typesPath, (await env.fs.read(env.typesPath)) ?? \"\");\n\n await writeMetaFile(env);\n env.persistedMeta = env.meta;\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,iBAAiB;CAC7C,QAAQ,MACN,+DACF;CAEA,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MACF,iEACF;EAEA,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,mBAAoD,GAAG;EAE7D,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,MAAM,SAAS,GAAG;GACxB,MAAM,gBAAgB,SAAS,IAAI,OAAO,KAAK,IAC3C,OAAO,KAAK,IAAI,OAAO,KAAK,EAAE,SAC9B,QAAQ,IAAI,OAAO,KAAK,EAAE;GAC9B,IAAI,MACF,8BAA8B,cAAc,cAC1C,kBAAkB,IAAI,MAAM,GAC7B,yBAAyB,IAAI,MAAM,OAAO,aACzC,IAAI,MAAM,WAAW,IAAI,MAAM,GAChC,WAAW,IAAI,OAAO,MAAM,UAC3B,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KACvC,OAAO,IAAI,MACR,KACC,UACE,KAAK,YAAY,MAAM,MAAM,QAAQ,OAAO,IAAI,IAC9C,MAAM,SACF,OAAO,YACL,MAAM,QACN,QAAQ,OAAO,IACjB,MACA,IAEV,EACC,KAAK,KAAK,MACb,IAER;EACF,OACE,IAAI,KACF,qCACE,IAAI,OAAO,MACZ,6HACH;EAGF,MAAM,gBAAiD,GAAG;EAC1D,MAAM,oBAAoB,GAAG;EAE7B,MAAM,QAAQ,SAAS,kBAAkB;GACvC,aAAa;GACb,OAAO;EACT,CAAC;EAED,QAAQ,MACN,mDAAmD,iBAAiB;GAClE,GAAG,IAAI;GACP,YAAY,YAAY,IAAI,OAAO,UAAU,IACzC,KAAK,IAAI,OAAO,YAAY,CAAC,SAAS,CAAC,IACvC;GACJ,cAAc,YAAY,IAAI,OAAO,YAAY,IAC7C,IAAI,OAAO,eACX;GACJ,SAAS,IAAI,QAAQ,KAAI,WAAU,OAAO,IAAI;EAChD,CAAC,GACH;EAEA,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,SAAS,GAClC,MAAM,gBAAgB,IAAI,SAAS;EAGrC,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,QAAQ,GACjC,MAAM,gBAAgB,IAAI,QAAQ;EAGpC,IACE,IAAI,OAAO,cAAc,QACzB,IAAI,eAAe,aAAa,IAAI,KAAK,UAEzC,IAAI,MACF,uEACF;OACK;GACL,IAAI,KACF,kFACF;GAEA,MAAM,QAAQ,SAAS,IAAI;EAC7B;EAEA,MAAM,YAAY,SAAS,GAAG;EAE9B,QAAQ,MAAM,mDAAmD;EAEjE,MAAM,OAAO,KAAK,IAAI,WAAY,MAAM,IAAI,GAAG,KAAK,IAAI,SAAS,KAAM,EAAE;EAEzE,MAAM,cAAc,GAAG;EACvB,IAAI,gBAAgB,IAAI;CAC1B,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_types = require('./types.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/types.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/types.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_types.types_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_types.types_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_types.types_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+ import { t as types_exports } from "./types.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/types.test.ts
5
+ describe("base/engine/src/api/types.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(types_exports).toBeDefined();
8
+ expect(typeof types_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(types_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=types.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.test.mjs","names":["moduleExports"],"sources":["../../src/api/types.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./types\";\n\ndescribe(\"base/engine/src/api/types.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;AAGA,SAAS,sCAAsC;CAC7C,GAAG,8BAA8B;EAC/B,OAAOA,aAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,aAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,aAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
package/dist/api.cjs CHANGED
@@ -1,3 +1,5 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_chunk = require('./chunk-CEeaYzDW.cjs');
1
3
  const require_api_prepare = require('./api/prepare.cjs');
2
4
  const require_api_build = require('./api/build.cjs');
3
5
  const require_api_clean = require('./api/clean.cjs');
@@ -10,6 +12,7 @@ const require_api_types = require('./api/types.cjs');
10
12
  const require_helpers_create_api = require('./helpers/create-api.cjs');
11
13
 
12
14
  //#region src/api.ts
15
+ var api_exports = /* @__PURE__ */ require_chunk.__exportAll({ default: () => api_default });
13
16
  var api_default = require_helpers_create_api.createApi({
14
17
  types: require_api_types.types,
15
18
  prepare: require_api_prepare.prepare,
@@ -23,4 +26,10 @@ var api_default = require_helpers_create_api.createApi({
23
26
  });
24
27
 
25
28
  //#endregion
26
- module.exports = api_default;
29
+ Object.defineProperty(exports, 'api_exports', {
30
+ enumerable: true,
31
+ get: function () {
32
+ return api_exports;
33
+ }
34
+ });
35
+ exports.default = api_default;
package/dist/api.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { t as __exportAll } from "./chunk-w6R9maHv.mjs";
1
2
  import { prepare } from "./api/prepare.mjs";
2
3
  import { build } from "./api/build.mjs";
3
4
  import { clean } from "./api/clean.mjs";
@@ -10,6 +11,7 @@ import { types } from "./api/types.mjs";
10
11
  import { createApi } from "./helpers/create-api.mjs";
11
12
 
12
13
  //#region src/api.ts
14
+ var api_exports = /* @__PURE__ */ __exportAll({ default: () => api_default });
13
15
  var api_default = createApi({
14
16
  types,
15
17
  prepare,
@@ -23,5 +25,5 @@ var api_default = createApi({
23
25
  });
24
26
 
25
27
  //#endregion
26
- export { api_default as default };
28
+ export { api_default as default, api_exports as t };
27
29
  //# sourceMappingURL=api.mjs.map
package/dist/api.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.mjs","names":[],"sources":["../src/api.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, ExecutionOptions } from \"@powerlines/core\";\nimport { build } from \"./api/build\";\nimport { clean } from \"./api/clean\";\nimport { create } from \"./api/create\";\nimport { deploy } from \"./api/deploy\";\nimport { docs } from \"./api/docs\";\nimport { lint } from \"./api/lint\";\nimport { prepare } from \"./api/prepare\";\nimport { test } from \"./api/test\";\nimport { types } from \"./api/types\";\nimport { createApi } from \"./helpers/create-api\";\nimport { EngineResolvedConfig, EngineSystemContext } from \"./types\";\n\nexport default createApi<\n ExecutionContext<EngineResolvedConfig, EngineSystemContext>,\n ExecutionOptions\n>({\n types,\n prepare,\n create,\n clean,\n lint,\n test,\n build,\n docs,\n deploy\n});\n"],"mappings":";;;;;;;;;;;;AA+BA,kBAAe,UAGb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
1
+ {"version":3,"file":"api.mjs","names":[],"sources":["../src/api.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, ExecutionOptions } from \"@powerlines/core\";\nimport { build } from \"./api/build\";\nimport { clean } from \"./api/clean\";\nimport { create } from \"./api/create\";\nimport { deploy } from \"./api/deploy\";\nimport { docs } from \"./api/docs\";\nimport { lint } from \"./api/lint\";\nimport { prepare } from \"./api/prepare\";\nimport { test } from \"./api/test\";\nimport { types } from \"./api/types\";\nimport { createApi } from \"./helpers/create-api\";\nimport { EngineResolvedConfig, EngineSystemContext } from \"./types\";\n\nexport default createApi<\n ExecutionContext<EngineResolvedConfig, EngineSystemContext>,\n ExecutionOptions\n>({\n types,\n prepare,\n create,\n clean,\n lint,\n test,\n build,\n docs,\n deploy\n});\n"],"mappings":";;;;;;;;;;;;;;AA+BA,kBAAe,UAGb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ const require_api = require('./api.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api.test.ts
5
+ (0, vitest.describe)("base/engine/src/api.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api.api_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api.api_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api.api_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion