@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
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-C_NdSu1c.cjs');
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
3
3
  const require_api_prepare = require('./prepare.cjs');
4
4
  let _powerlines_core = require("@powerlines/core");
5
5
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
@@ -14,6 +14,7 @@ chalk = require_chunk.__toESM(chalk, 1);
14
14
  let node_fs = require("node:fs");
15
15
 
16
16
  //#region src/api/build.ts
17
+ var build_exports = /* @__PURE__ */ require_chunk.__exportAll({ build: () => build });
17
18
  async function handleBuild(context, env) {
18
19
  await context.callHook("build", {
19
20
  environment: env,
@@ -63,4 +64,10 @@ async function build(context) {
63
64
  }
64
65
 
65
66
  //#endregion
66
- exports.build = build;
67
+ exports.build = build;
68
+ Object.defineProperty(exports, 'build_exports', {
69
+ enumerable: true,
70
+ get: function () {
71
+ return build_exports;
72
+ }
73
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.cts","names":[],"sources":["../../src/api/build.ts"],"mappings":";;;;;;;AA6IA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"build.d.cts","names":[],"sources":["../../src/api/build.ts"],"mappings":";;;;;;;AA6IA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.mts","names":[],"sources":["../../src/api/build.ts"],"mappings":";;;;;;;AA6IA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"build.d.mts","names":[],"sources":["../../src/api/build.ts"],"mappings":";;;;;;;AA6IA;;;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 { formatFolder } from "@powerlines/core";
3
4
  import { executeEnvironments } from "@powerlines/core/lib/environment";
@@ -11,6 +12,7 @@ import chalk from "chalk";
11
12
  import { existsSync } from "node:fs";
12
13
 
13
14
  //#region src/api/build.ts
15
+ var build_exports = /* @__PURE__ */ __exportAll({ build: () => build });
14
16
  async function handleBuild(context, env) {
15
17
  await context.callHook("build", {
16
18
  environment: env,
@@ -60,5 +62,5 @@ async function build(context) {
60
62
  }
61
63
 
62
64
  //#endregion
63
- export { build };
65
+ export { build, build_exports as t };
64
66
  //# sourceMappingURL=build.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.mjs","names":[],"sources":["../../src/api/build.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 {\n EnvironmentContext,\n ExecutionContext,\n formatFolder\n} from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { copyFiles } from \"@stryke/fs/copy-file\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport chalk from \"chalk\";\nimport { existsSync } from \"node:fs\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\nasync function handleBuild<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(\n context: ExecutionContext<TResolvedConfig, TSystemContext>,\n env: EnvironmentContext<TResolvedConfig, TSystemContext>\n) {\n await context.callHook(\"build\", {\n environment: env,\n order: \"pre\"\n });\n\n env.debug(\n \"Formatting the generated entry files before the build process starts.\"\n );\n await formatFolder(env, env.entryPath);\n\n await context.callHook(\"build\", {\n environment: env,\n order: \"normal\"\n });\n\n if (env.config.output.copy) {\n env.debug(\"Copying project's files from build output directory.\");\n\n const destinationPath = isParentPath(\n appendPath(env.config.output.path, env.config.cwd),\n appendPath(env.config.root, env.config.cwd)\n )\n ? joinPaths(\n env.config.output.copy.path,\n relativePath(\n appendPath(env.config.root, env.config.cwd),\n appendPath(env.config.output.path, env.config.cwd)\n )\n )\n : joinPaths(env.config.output.copy.path, \"dist\");\n const sourcePath = env.config.output.path;\n\n if (existsSync(sourcePath) && sourcePath !== destinationPath) {\n env.debug(\n `Copying files from project's build output directory (${\n env.config.output.path\n }) to the project's copy/publish directory (${destinationPath}).`\n );\n\n await copyFiles(sourcePath, destinationPath);\n } else {\n env.warn(\n `The source path for the copy operation ${\n !existsSync(sourcePath)\n ? \"does not exist\"\n : \"is the same as the destination path\"\n }. Source: ${sourcePath}, Destination: ${\n destinationPath\n }. Skipping copying of build output files.`\n );\n }\n\n if (\n env.config.output.copy.assets &&\n Array.isArray(env.config.output.copy.assets)\n ) {\n await Promise.all(\n env.config.output.copy.assets.map(async asset => {\n env.trace(\n `Copying asset(s): ${chalk.redBright(\n env.config.cwd === asset.input\n ? asset.glob\n : appendPath(\n asset.glob,\n replacePath(asset.input, env.config.cwd)\n )\n )} -> ${chalk.greenBright(\n appendPath(asset.glob, replacePath(asset.output, env.config.cwd))\n )} ${\n Array.isArray(asset.ignore) && asset.ignore.length > 0\n ? ` (ignoring: ${asset.ignore\n .map(i => chalk.yellowBright(i))\n .join(\", \")})`\n : \"\"\n }`\n );\n\n await env.fs.copy(asset, asset.output);\n })\n );\n }\n } else {\n env.debug(\n \"No copy configuration found for the project output. Skipping the copying of build output files.\"\n );\n }\n\n await context.callHook(\"build\", {\n environment: env,\n order: \"post\"\n });\n}\n\n/**\n * Build 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 build<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Building\");\n\n await context.generateChecksum();\n if (\n context.meta.checksum !== context.persistedMeta?.checksum ||\n context.config.skipCache\n ) {\n context.info(\n !context.persistedMeta?.checksum\n ? \"No previous build cache found. Preparing the project for the initial build.\"\n : context.meta.checksum !== context.persistedMeta.checksum\n ? \"The project has been modified since the last time `prepare` was ran. Re-preparing the project.\"\n : \"The project is configured to skip cache. Re-preparing the project.\"\n );\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n }\n\n if (context.config.singleBuild) {\n await handleBuild<TResolvedConfig, TSystemContext>(\n context,\n await context.toEnvironment()\n );\n } else {\n await executeEnvironments(context, async env => {\n await handleBuild<TResolvedConfig, TSystemContext>(context, env);\n });\n }\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,eAAe,YAIb,SACA,KACA;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;CAED,IAAI,MACF,uEACF;CACA,MAAM,aAAa,KAAK,IAAI,SAAS;CAErC,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;CAED,IAAI,IAAI,OAAO,OAAO,MAAM;EAC1B,IAAI,MAAM,sDAAsD;EAEhE,MAAM,kBAAkB,aACtB,WAAW,IAAI,OAAO,OAAO,MAAM,IAAI,OAAO,GAAG,GACjD,WAAW,IAAI,OAAO,MAAM,IAAI,OAAO,GAAG,CAC5C,IACI,UACE,IAAI,OAAO,OAAO,KAAK,MACvB,aACE,WAAW,IAAI,OAAO,MAAM,IAAI,OAAO,GAAG,GAC1C,WAAW,IAAI,OAAO,OAAO,MAAM,IAAI,OAAO,GAAG,CACnD,CACF,IACA,UAAU,IAAI,OAAO,OAAO,KAAK,MAAM,MAAM;EACjD,MAAM,aAAa,IAAI,OAAO,OAAO;EAErC,IAAI,WAAW,UAAU,KAAK,eAAe,iBAAiB;GAC5D,IAAI,MACF,wDACE,IAAI,OAAO,OAAO,KACnB,6CAA6C,gBAAgB,GAChE;GAEA,MAAM,UAAU,YAAY,eAAe;EAC7C,OACE,IAAI,KACF,0CACE,CAAC,WAAW,UAAU,IAClB,mBACA,sCACL,YAAY,WAAW,iBACtB,gBACD,0CACH;EAGF,IACE,IAAI,OAAO,OAAO,KAAK,UACvB,MAAM,QAAQ,IAAI,OAAO,OAAO,KAAK,MAAM,GAE3C,MAAM,QAAQ,IACZ,IAAI,OAAO,OAAO,KAAK,OAAO,IAAI,OAAM,UAAS;GAC/C,IAAI,MACF,qBAAqB,MAAM,UACzB,IAAI,OAAO,QAAQ,MAAM,QACrB,MAAM,OACN,WACE,MAAM,MACN,YAAY,MAAM,OAAO,IAAI,OAAO,GAAG,CACzC,CACN,EAAE,MAAM,MAAM,YACZ,WAAW,MAAM,MAAM,YAAY,MAAM,QAAQ,IAAI,OAAO,GAAG,CAAC,CAClE,EAAE,GACA,MAAM,QAAQ,MAAM,MAAM,KAAK,MAAM,OAAO,SAAS,IACjD,eAAe,MAAM,OAClB,KAAI,MAAK,MAAM,aAAa,CAAC,CAAC,EAC9B,KAAK,IAAI,EAAE,KACd,IAER;GAEA,MAAM,IAAI,GAAG,KAAK,OAAO,MAAM,MAAM;EACvC,CAAC,CACH;CAEJ,OACE,IAAI,MACF,iGACF;CAGF,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;AACH;;;;;;AAOA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;CAEtC,MAAM,QAAQ,iBAAiB;CAC/B,IACE,QAAQ,KAAK,aAAa,QAAQ,eAAe,YACjD,QAAQ,OAAO,WACf;EACA,QAAQ,KACN,CAAC,QAAQ,eAAe,WACpB,gFACA,QAAQ,KAAK,aAAa,QAAQ,cAAc,WAC9C,mGACA,oEACR;EAEA,MAAM,QAAyC,OAAO;CACxD;CAEA,IAAI,QAAQ,OAAO,aACjB,MAAM,YACJ,SACA,MAAM,QAAQ,cAAc,CAC9B;MAEA,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,YAA6C,SAAS,GAAG;CACjE,CAAC;CAGH,MAAM;AACR"}
1
+ {"version":3,"file":"build.mjs","names":[],"sources":["../../src/api/build.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 {\n EnvironmentContext,\n ExecutionContext,\n formatFolder\n} from \"@powerlines/core\";\nimport { executeEnvironments } from \"@powerlines/core/lib/environment\";\nimport { copyFiles } from \"@stryke/fs/copy-file\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport chalk from \"chalk\";\nimport { existsSync } from \"node:fs\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\nasync function handleBuild<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(\n context: ExecutionContext<TResolvedConfig, TSystemContext>,\n env: EnvironmentContext<TResolvedConfig, TSystemContext>\n) {\n await context.callHook(\"build\", {\n environment: env,\n order: \"pre\"\n });\n\n env.debug(\n \"Formatting the generated entry files before the build process starts.\"\n );\n await formatFolder(env, env.entryPath);\n\n await context.callHook(\"build\", {\n environment: env,\n order: \"normal\"\n });\n\n if (env.config.output.copy) {\n env.debug(\"Copying project's files from build output directory.\");\n\n const destinationPath = isParentPath(\n appendPath(env.config.output.path, env.config.cwd),\n appendPath(env.config.root, env.config.cwd)\n )\n ? joinPaths(\n env.config.output.copy.path,\n relativePath(\n appendPath(env.config.root, env.config.cwd),\n appendPath(env.config.output.path, env.config.cwd)\n )\n )\n : joinPaths(env.config.output.copy.path, \"dist\");\n const sourcePath = env.config.output.path;\n\n if (existsSync(sourcePath) && sourcePath !== destinationPath) {\n env.debug(\n `Copying files from project's build output directory (${\n env.config.output.path\n }) to the project's copy/publish directory (${destinationPath}).`\n );\n\n await copyFiles(sourcePath, destinationPath);\n } else {\n env.warn(\n `The source path for the copy operation ${\n !existsSync(sourcePath)\n ? \"does not exist\"\n : \"is the same as the destination path\"\n }. Source: ${sourcePath}, Destination: ${\n destinationPath\n }. Skipping copying of build output files.`\n );\n }\n\n if (\n env.config.output.copy.assets &&\n Array.isArray(env.config.output.copy.assets)\n ) {\n await Promise.all(\n env.config.output.copy.assets.map(async asset => {\n env.trace(\n `Copying asset(s): ${chalk.redBright(\n env.config.cwd === asset.input\n ? asset.glob\n : appendPath(\n asset.glob,\n replacePath(asset.input, env.config.cwd)\n )\n )} -> ${chalk.greenBright(\n appendPath(asset.glob, replacePath(asset.output, env.config.cwd))\n )} ${\n Array.isArray(asset.ignore) && asset.ignore.length > 0\n ? ` (ignoring: ${asset.ignore\n .map(i => chalk.yellowBright(i))\n .join(\", \")})`\n : \"\"\n }`\n );\n\n await env.fs.copy(asset, asset.output);\n })\n );\n }\n } else {\n env.debug(\n \"No copy configuration found for the project output. Skipping the copying of build output files.\"\n );\n }\n\n await context.callHook(\"build\", {\n environment: env,\n order: \"post\"\n });\n}\n\n/**\n * Build 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 build<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Building\");\n\n await context.generateChecksum();\n if (\n context.meta.checksum !== context.persistedMeta?.checksum ||\n context.config.skipCache\n ) {\n context.info(\n !context.persistedMeta?.checksum\n ? \"No previous build cache found. Preparing the project for the initial build.\"\n : context.meta.checksum !== context.persistedMeta.checksum\n ? \"The project has been modified since the last time `prepare` was ran. Re-preparing the project.\"\n : \"The project is configured to skip cache. Re-preparing the project.\"\n );\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n }\n\n if (context.config.singleBuild) {\n await handleBuild<TResolvedConfig, TSystemContext>(\n context,\n await context.toEnvironment()\n );\n } else {\n await executeEnvironments(context, async env => {\n await handleBuild<TResolvedConfig, TSystemContext>(context, env);\n });\n }\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoCA,eAAe,YAIb,SACA,KACA;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;CAED,IAAI,MACF,uEACF;CACA,MAAM,aAAa,KAAK,IAAI,SAAS;CAErC,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;CAED,IAAI,IAAI,OAAO,OAAO,MAAM;EAC1B,IAAI,MAAM,sDAAsD;EAEhE,MAAM,kBAAkB,aACtB,WAAW,IAAI,OAAO,OAAO,MAAM,IAAI,OAAO,GAAG,GACjD,WAAW,IAAI,OAAO,MAAM,IAAI,OAAO,GAAG,CAC5C,IACI,UACE,IAAI,OAAO,OAAO,KAAK,MACvB,aACE,WAAW,IAAI,OAAO,MAAM,IAAI,OAAO,GAAG,GAC1C,WAAW,IAAI,OAAO,OAAO,MAAM,IAAI,OAAO,GAAG,CACnD,CACF,IACA,UAAU,IAAI,OAAO,OAAO,KAAK,MAAM,MAAM;EACjD,MAAM,aAAa,IAAI,OAAO,OAAO;EAErC,IAAI,WAAW,UAAU,KAAK,eAAe,iBAAiB;GAC5D,IAAI,MACF,wDACE,IAAI,OAAO,OAAO,KACnB,6CAA6C,gBAAgB,GAChE;GAEA,MAAM,UAAU,YAAY,eAAe;EAC7C,OACE,IAAI,KACF,0CACE,CAAC,WAAW,UAAU,IAClB,mBACA,sCACL,YAAY,WAAW,iBACtB,gBACD,0CACH;EAGF,IACE,IAAI,OAAO,OAAO,KAAK,UACvB,MAAM,QAAQ,IAAI,OAAO,OAAO,KAAK,MAAM,GAE3C,MAAM,QAAQ,IACZ,IAAI,OAAO,OAAO,KAAK,OAAO,IAAI,OAAM,UAAS;GAC/C,IAAI,MACF,qBAAqB,MAAM,UACzB,IAAI,OAAO,QAAQ,MAAM,QACrB,MAAM,OACN,WACE,MAAM,MACN,YAAY,MAAM,OAAO,IAAI,OAAO,GAAG,CACzC,CACN,EAAE,MAAM,MAAM,YACZ,WAAW,MAAM,MAAM,YAAY,MAAM,QAAQ,IAAI,OAAO,GAAG,CAAC,CAClE,EAAE,GACA,MAAM,QAAQ,MAAM,MAAM,KAAK,MAAM,OAAO,SAAS,IACjD,eAAe,MAAM,OAClB,KAAI,MAAK,MAAM,aAAa,CAAC,CAAC,EAC9B,KAAK,IAAI,EAAE,KACd,IAER;GAEA,MAAM,IAAI,GAAG,KAAK,OAAO,MAAM,MAAM;EACvC,CAAC,CACH;CAEJ,OACE,IAAI,MACF,iGACF;CAGF,MAAM,QAAQ,SAAS,SAAS;EAC9B,aAAa;EACb,OAAO;CACT,CAAC;AACH;;;;;;AAOA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;CAEtC,MAAM,QAAQ,iBAAiB;CAC/B,IACE,QAAQ,KAAK,aAAa,QAAQ,eAAe,YACjD,QAAQ,OAAO,WACf;EACA,QAAQ,KACN,CAAC,QAAQ,eAAe,WACpB,gFACA,QAAQ,KAAK,aAAa,QAAQ,cAAc,WAC9C,mGACA,oEACR;EAEA,MAAM,QAAyC,OAAO;CACxD;CAEA,IAAI,QAAQ,OAAO,aACjB,MAAM,YACJ,SACA,MAAM,QAAQ,cAAc,CAC9B;MAEA,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,YAA6C,SAAS,GAAG;CACjE,CAAC;CAGH,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_build = require('./build.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/build.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/build.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_build.build_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_build.build_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_build.build_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 build_exports } from "./build.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/build.test.ts
5
+ describe("base/engine/src/api/build.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(build_exports).toBeDefined();
8
+ expect(typeof build_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(build_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=build.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.test.mjs","names":["moduleExports"],"sources":["../../src/api/build.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./build\";\n\ndescribe(\"base/engine/src/api/build.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"}
@@ -1,9 +1,11 @@
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_join = require("@stryke/path/join");
5
6
 
6
7
  //#region src/api/clean.ts
8
+ var clean_exports = /* @__PURE__ */ require_chunk.__exportAll({ clean: () => clean });
7
9
  /**
8
10
  * Clean any previously prepared artifacts
9
11
  *
@@ -25,4 +27,10 @@ async function clean(context) {
25
27
  }
26
28
 
27
29
  //#endregion
28
- exports.clean = clean;
30
+ exports.clean = clean;
31
+ Object.defineProperty(exports, 'clean_exports', {
32
+ enumerable: true,
33
+ get: function () {
34
+ return clean_exports;
35
+ }
36
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"clean.d.cts","names":[],"sources":["../../src/api/clean.ts"],"mappings":";;;;;;;AA8BA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"clean.d.cts","names":[],"sources":["../../src/api/clean.ts"],"mappings":";;;;;;;AA8BA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"clean.d.mts","names":[],"sources":["../../src/api/clean.ts"],"mappings":";;;;;;;AA8BA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"clean.d.mts","names":[],"sources":["../../src/api/clean.ts"],"mappings":";;;;;;;AA8BA;;;iBAAsB,KAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1,8 +1,10 @@
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 { joinPaths } from "@stryke/path/join";
4
5
 
5
6
  //#region src/api/clean.ts
7
+ var clean_exports = /* @__PURE__ */ __exportAll({ clean: () => clean });
6
8
  /**
7
9
  * Clean any previously prepared artifacts
8
10
  *
@@ -24,5 +26,5 @@ async function clean(context) {
24
26
  }
25
27
 
26
28
  //#endregion
27
- export { clean };
29
+ export { clean, clean_exports as t };
28
30
  //# sourceMappingURL=clean.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean.mjs","names":[],"sources":["../../src/api/clean.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 { joinPaths } from \"@stryke/path/join\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Clean any previously prepared artifacts\n *\n * @param context - The execution context for the clean process, which provides access to the project configuration, environment, and utility functions for performing the clean operation. The context is used to manage the state and behavior of the clean process, allowing for hooks to be called at different stages of the clean and for environment-specific configurations to be applied.\n */\nexport async function clean<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Cleaning\");\n\n await prepare<TResolvedConfig, TSystemContext>(context, true);\n await executeEnvironments(context, async env => {\n env.debug(\"Cleaning the project's dist and artifacts directories.\");\n\n await env.fs.remove(joinPaths(env.config.cwd, env.config.output.path));\n await env.fs.remove(\n joinPaths(\n env.config.cwd,\n env.config.root,\n env.config.output.artifactsPath\n )\n );\n\n await context.callHook(\"clean\", {\n environment: env,\n sequential: false\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;AA8BA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;CAEtC,MAAM,QAAyC,SAAS,IAAI;CAC5D,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MAAM,wDAAwD;EAElE,MAAM,IAAI,GAAG,OAAO,UAAU,IAAI,OAAO,KAAK,IAAI,OAAO,OAAO,IAAI,CAAC;EACrE,MAAM,IAAI,GAAG,OACX,UACE,IAAI,OAAO,KACX,IAAI,OAAO,MACX,IAAI,OAAO,OAAO,aACpB,CACF;EAEA,MAAM,QAAQ,SAAS,SAAS;GAC9B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
1
+ {"version":3,"file":"clean.mjs","names":[],"sources":["../../src/api/clean.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 { joinPaths } from \"@stryke/path/join\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Clean any previously prepared artifacts\n *\n * @param context - The execution context for the clean process, which provides access to the project configuration, environment, and utility functions for performing the clean operation. The context is used to manage the state and behavior of the clean process, allowing for hooks to be called at different stages of the clean and for environment-specific configurations to be applied.\n */\nexport async function clean<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Cleaning\");\n\n await prepare<TResolvedConfig, TSystemContext>(context, true);\n await executeEnvironments(context, async env => {\n env.debug(\"Cleaning the project's dist and artifacts directories.\");\n\n await env.fs.remove(joinPaths(env.config.cwd, env.config.output.path));\n await env.fs.remove(\n joinPaths(\n env.config.cwd,\n env.config.root,\n env.config.output.artifactsPath\n )\n );\n\n await context.callHook(\"clean\", {\n environment: env,\n sequential: false\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,eAAsB,MAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,UAAU;CAEtC,MAAM,QAAyC,SAAS,IAAI;CAC5D,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MAAM,wDAAwD;EAElE,MAAM,IAAI,GAAG,OAAO,UAAU,IAAI,OAAO,KAAK,IAAI,OAAO,OAAO,IAAI,CAAC;EACrE,MAAM,IAAI,GAAG,OACX,UACE,IAAI,OAAO,KACX,IAAI,OAAO,MACX,IAAI,OAAO,OAAO,aACpB,CACF;EAEA,MAAM,QAAQ,SAAS,SAAS;GAC9B,aAAa;GACb,YAAY;EACd,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_clean = require('./clean.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/clean.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/clean.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_clean.clean_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_clean.clean_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_clean.clean_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 clean_exports } from "./clean.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/clean.test.ts
5
+ describe("base/engine/src/api/clean.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(clean_exports).toBeDefined();
8
+ expect(typeof clean_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(clean_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=clean.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clean.test.mjs","names":["moduleExports"],"sources":["../../src/api/clean.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./clean\";\n\ndescribe(\"base/engine/src/api/clean.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"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-C_NdSu1c.cjs');
2
+ const require_chunk = require('../chunk-CEeaYzDW.cjs');
3
3
  const require_api_prepare = require('./prepare.cjs');
4
4
  let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
5
5
  let _stryke_path_join = require("@stryke/path/join");
@@ -8,6 +8,7 @@ let handlebars = require("handlebars");
8
8
  handlebars = require_chunk.__toESM(handlebars, 1);
9
9
 
10
10
  //#region src/api/create.ts
11
+ var create_exports = /* @__PURE__ */ require_chunk.__exportAll({ create: () => create });
11
12
  /**
12
13
  * Create a new Powerlines project
13
14
  *
@@ -56,4 +57,10 @@ async function create(context) {
56
57
  }
57
58
 
58
59
  //#endregion
59
- exports.create = create;
60
+ exports.create = create;
61
+ Object.defineProperty(exports, 'create_exports', {
62
+ enumerable: true,
63
+ get: function () {
64
+ return create_exports;
65
+ }
66
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.cts","names":[],"sources":["../../src/api/create.ts"],"mappings":";;;;;;;AAgCA;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"create.d.cts","names":[],"sources":["../../src/api/create.ts"],"mappings":";;;;;;;AAgCA;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.mts","names":[],"sources":["../../src/api/create.ts"],"mappings":";;;;;;;AAgCA;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"create.d.mts","names":[],"sources":["../../src/api/create.ts"],"mappings":";;;;;;;AAgCA;;;iBAAsB,MAAA,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 { joinPaths } from "@stryke/path/join";
@@ -5,6 +6,7 @@ import { listFiles } from "@stryke/fs/list-files";
5
6
  import Handlebars from "handlebars";
6
7
 
7
8
  //#region src/api/create.ts
9
+ var create_exports = /* @__PURE__ */ __exportAll({ create: () => create });
8
10
  /**
9
11
  * Create a new Powerlines project
10
12
  *
@@ -53,5 +55,5 @@ async function create(context) {
53
55
  }
54
56
 
55
57
  //#endregion
56
- export { create };
58
+ export { create, create_exports as t };
57
59
  //# sourceMappingURL=create.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.mjs","names":[],"sources":["../../src/api/create.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport Handlebars from \"handlebars\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Create a new Powerlines project\n *\n * @param context - The execution context for the create process, which provides access to the project configuration, environment, and utility functions for performing the create operation. The context is used to manage the state and behavior of the create process, allowing for hooks to be called at different stages of the create and for environment-specific configurations to be applied.\n */\nexport async function create<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Create a New Project Generation\");\n\n await prepare<TResolvedConfig, TSystemContext>(context, true);\n await executeEnvironments(context, async env => {\n env.debug(\"Initializing the processing options for the project.\");\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"pre\"\n });\n\n const files = await listFiles(\n joinPaths(env.powerlinesPath, \"files/common/**/*.hbs\")\n );\n for (const file of files) {\n env.trace(`Adding template file to project: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"normal\"\n });\n\n if (env.config.projectType === \"application\") {\n const appFiles = await listFiles(\n joinPaths(env.powerlinesPath, \"files/application/**/*.hbs\")\n );\n for (const file of appFiles) {\n env.trace(`Adding application template file: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n } else {\n const libFiles = await listFiles(\n joinPaths(env.powerlinesPath, \"files/library/**/*.hbs\")\n );\n for (const file of libFiles) {\n env.trace(`Adding library template file: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n }\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"post\"\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,OAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,iCAAiC;CAE7D,MAAM,QAAyC,SAAS,IAAI;CAC5D,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MAAM,sDAAsD;EAEhE,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,QAAQ,MAAM,UAClB,UAAU,IAAI,gBAAgB,uBAAuB,CACvD;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,IAAI,MAAM,oCAAoC,MAAM;GAEpD,MAAM,WAAW,WAAW,QAAQ,IAAI;GACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;EACF;EAEA,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,OAAO,gBAAgB,eAAe;GAC5C,MAAM,WAAW,MAAM,UACrB,UAAU,IAAI,gBAAgB,4BAA4B,CAC5D;GACA,KAAK,MAAM,QAAQ,UAAU;IAC3B,IAAI,MAAM,qCAAqC,MAAM;IAErD,MAAM,WAAW,WAAW,QAAQ,IAAI;IACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;GACF;EACF,OAAO;GACL,MAAM,WAAW,MAAM,UACrB,UAAU,IAAI,gBAAgB,wBAAwB,CACxD;GACA,KAAK,MAAM,QAAQ,UAAU;IAC3B,IAAI,MAAM,iCAAiC,MAAM;IAEjD,MAAM,WAAW,WAAW,QAAQ,IAAI;IACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;GACF;EACF;EAEA,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
1
+ {"version":3,"file":"create.mjs","names":[],"sources":["../../src/api/create.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport Handlebars from \"handlebars\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { prepare } from \"./prepare\";\n\n/**\n * Create a new Powerlines project\n *\n * @param context - The execution context for the create process, which provides access to the project configuration, environment, and utility functions for performing the create operation. The context is used to manage the state and behavior of the create process, allowing for hooks to be called at different stages of the create and for environment-specific configurations to be applied.\n */\nexport async function create<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Create a New Project Generation\");\n\n await prepare<TResolvedConfig, TSystemContext>(context, true);\n await executeEnvironments(context, async env => {\n env.debug(\"Initializing the processing options for the project.\");\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"pre\"\n });\n\n const files = await listFiles(\n joinPaths(env.powerlinesPath, \"files/common/**/*.hbs\")\n );\n for (const file of files) {\n env.trace(`Adding template file to project: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"normal\"\n });\n\n if (env.config.projectType === \"application\") {\n const appFiles = await listFiles(\n joinPaths(env.powerlinesPath, \"files/application/**/*.hbs\")\n );\n for (const file of appFiles) {\n env.trace(`Adding application template file: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n } else {\n const libFiles = await listFiles(\n joinPaths(env.powerlinesPath, \"files/library/**/*.hbs\")\n );\n for (const file of libFiles) {\n env.trace(`Adding library template file: ${file}`);\n\n const template = Handlebars.compile(file);\n await env.fs.write(\n joinPaths(env.config.root, file.replace(\".hbs\", \"\")),\n template(env)\n );\n }\n }\n\n await context.callHook(\"create\", {\n environment: env,\n order: \"post\"\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;AAgCA,eAAsB,OAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,iCAAiC;CAE7D,MAAM,QAAyC,SAAS,IAAI;CAC5D,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,IAAI,MAAM,sDAAsD;EAEhE,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;EAED,MAAM,QAAQ,MAAM,UAClB,UAAU,IAAI,gBAAgB,uBAAuB,CACvD;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,IAAI,MAAM,oCAAoC,MAAM;GAEpD,MAAM,WAAW,WAAW,QAAQ,IAAI;GACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;EACF;EAEA,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;EAED,IAAI,IAAI,OAAO,gBAAgB,eAAe;GAC5C,MAAM,WAAW,MAAM,UACrB,UAAU,IAAI,gBAAgB,4BAA4B,CAC5D;GACA,KAAK,MAAM,QAAQ,UAAU;IAC3B,IAAI,MAAM,qCAAqC,MAAM;IAErD,MAAM,WAAW,WAAW,QAAQ,IAAI;IACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;GACF;EACF,OAAO;GACL,MAAM,WAAW,MAAM,UACrB,UAAU,IAAI,gBAAgB,wBAAwB,CACxD;GACA,KAAK,MAAM,QAAQ,UAAU;IAC3B,IAAI,MAAM,iCAAiC,MAAM;IAEjD,MAAM,WAAW,WAAW,QAAQ,IAAI;IACxC,MAAM,IAAI,GAAG,MACX,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,QAAQ,EAAE,CAAC,GACnD,SAAS,GAAG,CACd;GACF;EACF;EAEA,MAAM,QAAQ,SAAS,UAAU;GAC/B,aAAa;GACb,OAAO;EACT,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_create = require('./create.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/create.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/create.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_create.create_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_create.create_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_create.create_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 create_exports } from "./create.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/create.test.ts
5
+ describe("base/engine/src/api/create.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(create_exports).toBeDefined();
8
+ expect(typeof create_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(create_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=create.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.test.mjs","names":["moduleExports"],"sources":["../../src/api/create.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./create\";\n\ndescribe(\"base/engine/src/api/create.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,uCAAuC;CAC9C,GAAG,8BAA8B;EAC/B,OAAOA,cAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,cAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,cAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -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/deploy.ts
7
+ var deploy_exports = /* @__PURE__ */ require_chunk.__exportAll({ deploy: () => deploy });
6
8
  /**
7
9
  * Deploy the project's source files to the target environment.
8
10
  *
@@ -21,4 +23,10 @@ async function deploy(context) {
21
23
  }
22
24
 
23
25
  //#endregion
24
- exports.deploy = deploy;
26
+ exports.deploy = deploy;
27
+ Object.defineProperty(exports, 'deploy_exports', {
28
+ enumerable: true,
29
+ get: function () {
30
+ return deploy_exports;
31
+ }
32
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.cts","names":[],"sources":["../../src/api/deploy.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"deploy.d.cts","names":[],"sources":["../../src/api/deploy.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.mts","names":[],"sources":["../../src/api/deploy.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,CAAA,CACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
1
+ {"version":3,"file":"deploy.d.mts","names":[],"sources":["../../src/api/deploy.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,MAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
@@ -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/deploy.ts
6
+ var deploy_exports = /* @__PURE__ */ __exportAll({ deploy: () => deploy });
5
7
  /**
6
8
  * Deploy the project's source files to the target environment.
7
9
  *
@@ -20,5 +22,5 @@ async function deploy(context) {
20
22
  }
21
23
 
22
24
  //#endregion
23
- export { deploy };
25
+ export { deploy, deploy_exports as t };
24
26
  //# sourceMappingURL=deploy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.mjs","names":[],"sources":["../../src/api/deploy.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 * Deploy the project's source files to the target environment.\n *\n * @remarks\n * This function serves as the main entry point for the deployment process, orchestrating the execution of deployment hooks across different environments defined in the project configuration. It ensures that all relevant deployment operations are performed in a structured manner, allowing for pre-deployment, main deployment, and post-deployment hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the deployment operation, providing insights into the performance of the deployment process.\n *\n * @param context - The execution context for the deploy process, which provides access to the project configuration, environment, and utility functions for performing the deploy operation. The context is used to manage the state and behavior of the deploy process, allowing for hooks to be called at different stages of the deploy and for environment-specific configurations to be applied.\n */\nexport async function deploy<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Deployment\");\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n await executeEnvironments(context, async env => {\n await context.callHook(\"deploy\", {\n environment: env\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,eAAsB,OAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,YAAY;CAExC,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,UAAU,EAC/B,aAAa,IACf,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
1
+ {"version":3,"file":"deploy.mjs","names":[],"sources":["../../src/api/deploy.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 * Deploy the project's source files to the target environment.\n *\n * @remarks\n * This function serves as the main entry point for the deployment process, orchestrating the execution of deployment hooks across different environments defined in the project configuration. It ensures that all relevant deployment operations are performed in a structured manner, allowing for pre-deployment, main deployment, and post-deployment hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the deployment operation, providing insights into the performance of the deployment process.\n *\n * @param context - The execution context for the deploy process, which provides access to the project configuration, environment, and utility functions for performing the deploy operation. The context is used to manage the state and behavior of the deploy process, allowing for hooks to be called at different stages of the deploy and for environment-specific configurations to be applied.\n */\nexport async function deploy<\n TResolvedConfig extends EngineResolvedConfig,\n TSystemContext extends EngineSystemContext\n>(context: ExecutionContext<TResolvedConfig, TSystemContext>) {\n const timer = context.timer(\"Deployment\");\n\n await prepare<TResolvedConfig, TSystemContext>(context);\n await executeEnvironments(context, async env => {\n await context.callHook(\"deploy\", {\n environment: env\n });\n });\n\n timer();\n}\n"],"mappings":";;;;;;;;;;;;;;AAgCA,eAAsB,OAGpB,SAA4D;CAC5D,MAAM,QAAQ,QAAQ,MAAM,YAAY;CAExC,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,UAAU,EAC/B,aAAa,IACf,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_deploy = require('./deploy.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/deploy.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/deploy.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_deploy.deploy_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_deploy.deploy_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_deploy.deploy_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 deploy_exports } from "./deploy.mjs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ //#region src/api/deploy.test.ts
5
+ describe("base/engine/src/api/deploy.ts", () => {
6
+ it("loads module exports", () => {
7
+ expect(deploy_exports).toBeDefined();
8
+ expect(typeof deploy_exports).toBe("object");
9
+ });
10
+ it("has at least one runtime export", () => {
11
+ expect(Object.keys(deploy_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
16
+ export { };
17
+ //# sourceMappingURL=deploy.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.test.mjs","names":["moduleExports"],"sources":["../../src/api/deploy.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./deploy\";\n\ndescribe(\"base/engine/src/api/deploy.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,uCAAuC;CAC9C,GAAG,8BAA8B;EAC/B,OAAOA,cAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,cAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,cAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
package/dist/api/docs.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/docs.ts
7
+ var docs_exports = /* @__PURE__ */ require_chunk.__exportAll({ docs: () => docs });
6
8
  /**
7
9
  * Generate the project's documentation.
8
10
  *
@@ -21,4 +23,10 @@ async function docs(context) {
21
23
  }
22
24
 
23
25
  //#endregion
24
- exports.docs = docs;
26
+ exports.docs = docs;
27
+ Object.defineProperty(exports, 'docs_exports', {
28
+ enumerable: true,
29
+ get: function () {
30
+ return docs_exports;
31
+ }
32
+ });
@@ -1 +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"}
1
+ {"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/api/docs.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":"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"}
1
+ {"version":3,"file":"docs.d.mts","names":[],"sources":["../../src/api/docs.ts"],"mappings":";;;;;;;AAgCA;;;;;;iBAAsB,IAAA,yBACI,oBAAA,yBACD,mBAAA,EACvB,OAAA,EAAS,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IAAe,OAAA"}
package/dist/api/docs.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/docs.ts
6
+ var docs_exports = /* @__PURE__ */ __exportAll({ docs: () => docs });
5
7
  /**
6
8
  * Generate the project's documentation.
7
9
  *
@@ -20,5 +22,5 @@ async function docs(context) {
20
22
  }
21
23
 
22
24
  //#endregion
23
- export { docs };
25
+ export { docs, docs_exports as t };
24
26
  //# sourceMappingURL=docs.mjs.map
@@ -1 +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,eAAe;CAE3C,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ,EAC7B,aAAa,IACf,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
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,eAAe;CAE3C,MAAM,QAAyC,OAAO;CACtD,MAAM,oBAAoB,SAAS,OAAM,QAAO;EAC9C,MAAM,QAAQ,SAAS,QAAQ,EAC7B,aAAa,IACf,CAAC;CACH,CAAC;CAED,MAAM;AACR"}
@@ -0,0 +1,15 @@
1
+ const require_api_docs = require('./docs.cjs');
2
+ let vitest = require("vitest");
3
+
4
+ //#region src/api/docs.test.ts
5
+ (0, vitest.describe)("base/engine/src/api/docs.ts", () => {
6
+ (0, vitest.it)("loads module exports", () => {
7
+ (0, vitest.expect)(require_api_docs.docs_exports).toBeDefined();
8
+ (0, vitest.expect)(typeof require_api_docs.docs_exports).toBe("object");
9
+ });
10
+ (0, vitest.it)("has at least one runtime export", () => {
11
+ (0, vitest.expect)(Object.keys(require_api_docs.docs_exports).length).toBeGreaterThan(0);
12
+ });
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };