@powerlines/engine 0.49.30 → 0.49.32
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.
- package/dist/api/build.cjs +2 -9
- package/dist/api/build.mjs +1 -3
- package/dist/api/build.mjs.map +1 -1
- package/dist/api/clean.cjs +1 -9
- package/dist/api/clean.mjs +1 -3
- package/dist/api/clean.mjs.map +1 -1
- package/dist/api/create.cjs +2 -9
- package/dist/api/create.mjs +1 -3
- package/dist/api/create.mjs.map +1 -1
- package/dist/api/deploy.cjs +1 -9
- package/dist/api/deploy.mjs +1 -3
- package/dist/api/deploy.mjs.map +1 -1
- package/dist/api/docs.cjs +1 -9
- package/dist/api/docs.mjs +1 -3
- package/dist/api/docs.mjs.map +1 -1
- package/dist/api/lint.cjs +1 -9
- package/dist/api/lint.mjs +1 -3
- package/dist/api/lint.mjs.map +1 -1
- package/dist/api/prepare.cjs +1 -9
- package/dist/api/prepare.mjs +1 -3
- package/dist/api/prepare.mjs.map +1 -1
- package/dist/api/test.cjs +1 -9
- package/dist/api/test.mjs +1 -3
- package/dist/api/test.mjs.map +1 -1
- package/dist/api/types.cjs +1 -9
- package/dist/api/types.mjs +1 -3
- package/dist/api/types.mjs.map +1 -1
- package/dist/api.cjs +1 -10
- package/dist/api.mjs +1 -3
- package/dist/api.mjs.map +1 -1
- package/dist/{chunk-CEeaYzDW.cjs → chunk-C_NdSu1c.cjs} +0 -19
- package/dist/context/engine-context.cjs +2 -9
- package/dist/context/engine-context.mjs +1 -3
- package/dist/context/engine-context.mjs.map +1 -1
- package/dist/{engine-D_B_s_Ai.cjs → engine-BKEDCOCb.cjs} +1 -12
- package/dist/{engine-CQbIlCXR.mjs → engine-DRAFIm5M.mjs} +2 -8
- package/dist/{engine-CQbIlCXR.mjs.map → engine-DRAFIm5M.mjs.map} +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.mjs +1 -1
- package/dist/helpers/create-api.cjs +1 -9
- package/dist/helpers/create-api.mjs +1 -3
- package/dist/helpers/create-api.mjs.map +1 -1
- package/dist/helpers/finalize.cjs +1 -9
- package/dist/helpers/finalize.mjs +1 -3
- package/dist/helpers/finalize.mjs.map +1 -1
- package/dist/helpers/rpc.cjs +1 -9
- package/dist/helpers/rpc.mjs +1 -3
- package/dist/helpers/rpc.mjs.map +1 -1
- package/dist/helpers/stream.cjs +1 -13
- package/dist/helpers/stream.mjs +1 -7
- package/dist/helpers/stream.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +21 -17
- package/dist/api/build.test.cjs +0 -15
- package/dist/api/build.test.d.cts +0 -1
- package/dist/api/build.test.d.mts +0 -1
- package/dist/api/build.test.mjs +0 -17
- package/dist/api/build.test.mjs.map +0 -1
- package/dist/api/clean.test.cjs +0 -15
- package/dist/api/clean.test.d.cts +0 -1
- package/dist/api/clean.test.d.mts +0 -1
- package/dist/api/clean.test.mjs +0 -17
- package/dist/api/clean.test.mjs.map +0 -1
- package/dist/api/create.test.cjs +0 -15
- package/dist/api/create.test.d.cts +0 -1
- package/dist/api/create.test.d.mts +0 -1
- package/dist/api/create.test.mjs +0 -17
- package/dist/api/create.test.mjs.map +0 -1
- package/dist/api/deploy.test.cjs +0 -15
- package/dist/api/deploy.test.d.cts +0 -1
- package/dist/api/deploy.test.d.mts +0 -1
- package/dist/api/deploy.test.mjs +0 -17
- package/dist/api/deploy.test.mjs.map +0 -1
- package/dist/api/docs.test.cjs +0 -15
- package/dist/api/docs.test.d.cts +0 -1
- package/dist/api/docs.test.d.mts +0 -1
- package/dist/api/docs.test.mjs +0 -17
- package/dist/api/docs.test.mjs.map +0 -1
- package/dist/api/lint.test.cjs +0 -15
- package/dist/api/lint.test.d.cts +0 -1
- package/dist/api/lint.test.d.mts +0 -1
- package/dist/api/lint.test.mjs +0 -17
- package/dist/api/lint.test.mjs.map +0 -1
- package/dist/api/prepare.test.cjs +0 -15
- package/dist/api/prepare.test.d.cts +0 -1
- package/dist/api/prepare.test.d.mts +0 -1
- package/dist/api/prepare.test.mjs +0 -17
- package/dist/api/prepare.test.mjs.map +0 -1
- package/dist/api/test.test.cjs +0 -15
- package/dist/api/test.test.d.cts +0 -1
- package/dist/api/test.test.d.mts +0 -1
- package/dist/api/test.test.mjs +0 -17
- package/dist/api/test.test.mjs.map +0 -1
- package/dist/api/types.test.cjs +0 -15
- package/dist/api/types.test.d.cts +0 -1
- package/dist/api/types.test.d.mts +0 -1
- package/dist/api/types.test.mjs +0 -17
- package/dist/api/types.test.mjs.map +0 -1
- package/dist/api.test.cjs +0 -15
- package/dist/api.test.d.cts +0 -1
- package/dist/api.test.d.mts +0 -1
- package/dist/api.test.mjs +0 -17
- package/dist/api.test.mjs.map +0 -1
- package/dist/chunk-w6R9maHv.mjs +0 -18
- package/dist/context/engine-context.test.cjs +0 -15
- package/dist/context/engine-context.test.d.cts +0 -1
- package/dist/context/engine-context.test.d.mts +0 -1
- package/dist/context/engine-context.test.mjs +0 -17
- package/dist/context/engine-context.test.mjs.map +0 -1
- package/dist/engine.test.cjs +0 -15
- package/dist/engine.test.d.cts +0 -1
- package/dist/engine.test.d.mts +0 -1
- package/dist/engine.test.mjs +0 -17
- package/dist/engine.test.mjs.map +0 -1
- package/dist/helpers/create-api.test.cjs +0 -15
- package/dist/helpers/create-api.test.d.cts +0 -1
- package/dist/helpers/create-api.test.d.mts +0 -1
- package/dist/helpers/create-api.test.mjs +0 -17
- package/dist/helpers/create-api.test.mjs.map +0 -1
- package/dist/helpers/finalize.test.cjs +0 -15
- package/dist/helpers/finalize.test.d.cts +0 -1
- package/dist/helpers/finalize.test.d.mts +0 -1
- package/dist/helpers/finalize.test.mjs +0 -17
- package/dist/helpers/finalize.test.mjs.map +0 -1
- package/dist/helpers/rpc.test.cjs +0 -15
- package/dist/helpers/rpc.test.d.cts +0 -1
- package/dist/helpers/rpc.test.d.mts +0 -1
- package/dist/helpers/rpc.test.mjs +0 -17
- package/dist/helpers/rpc.test.mjs.map +0 -1
- package/dist/helpers/stream.test.cjs +0 -15
- package/dist/helpers/stream.test.d.cts +0 -1
- package/dist/helpers/stream.test.d.mts +0 -1
- package/dist/helpers/stream.test.mjs +0 -17
- package/dist/helpers/stream.test.mjs.map +0 -1
- package/dist/helpers/type-checks.test.cjs +0 -28
- package/dist/helpers/type-checks.test.d.cts +0 -1
- package/dist/helpers/type-checks.test.d.mts +0 -1
- package/dist/helpers/type-checks.test.mjs +0 -30
- package/dist/helpers/type-checks.test.mjs.map +0 -1
package/dist/api/build.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-
|
|
2
|
+
const require_chunk = require('../chunk-C_NdSu1c.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,7 +14,6 @@ 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 });
|
|
18
17
|
async function handleBuild(context, env) {
|
|
19
18
|
await context.callHook("build", {
|
|
20
19
|
environment: env,
|
|
@@ -64,10 +63,4 @@ async function build(context) {
|
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
//#endregion
|
|
67
|
-
exports.build = build;
|
|
68
|
-
Object.defineProperty(exports, 'build_exports', {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return build_exports;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
66
|
+
exports.build = build;
|
package/dist/api/build.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { formatFolder } from "@powerlines/core";
|
|
4
3
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
@@ -12,7 +11,6 @@ import chalk from "chalk";
|
|
|
12
11
|
import { existsSync } from "node:fs";
|
|
13
12
|
|
|
14
13
|
//#region src/api/build.ts
|
|
15
|
-
var build_exports = /* @__PURE__ */ __exportAll({ build: () => build });
|
|
16
14
|
async function handleBuild(context, env) {
|
|
17
15
|
await context.callHook("build", {
|
|
18
16
|
environment: env,
|
|
@@ -62,5 +60,5 @@ async function build(context) {
|
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
//#endregion
|
|
65
|
-
export { build
|
|
63
|
+
export { build };
|
|
66
64
|
//# sourceMappingURL=build.mjs.map
|
package/dist/api/build.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/clean.cjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
let _stryke_path_join = require("@stryke/path/join");
|
|
6
5
|
|
|
7
6
|
//#region src/api/clean.ts
|
|
8
|
-
var clean_exports = /* @__PURE__ */ require_chunk.__exportAll({ clean: () => clean });
|
|
9
7
|
/**
|
|
10
8
|
* Clean any previously prepared artifacts
|
|
11
9
|
*
|
|
@@ -27,10 +25,4 @@ async function clean(context) {
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
//#endregion
|
|
30
|
-
exports.clean = clean;
|
|
31
|
-
Object.defineProperty(exports, 'clean_exports', {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return clean_exports;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
28
|
+
exports.clean = clean;
|
package/dist/api/clean.mjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
import { joinPaths } from "@stryke/path/join";
|
|
5
4
|
|
|
6
5
|
//#region src/api/clean.ts
|
|
7
|
-
var clean_exports = /* @__PURE__ */ __exportAll({ clean: () => clean });
|
|
8
6
|
/**
|
|
9
7
|
* Clean any previously prepared artifacts
|
|
10
8
|
*
|
|
@@ -26,5 +24,5 @@ async function clean(context) {
|
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
//#endregion
|
|
29
|
-
export { clean
|
|
27
|
+
export { clean };
|
|
30
28
|
//# sourceMappingURL=clean.mjs.map
|
package/dist/api/clean.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/create.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-
|
|
2
|
+
const require_chunk = require('../chunk-C_NdSu1c.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,7 +8,6 @@ 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 });
|
|
12
11
|
/**
|
|
13
12
|
* Create a new Powerlines project
|
|
14
13
|
*
|
|
@@ -57,10 +56,4 @@ async function create(context) {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
//#endregion
|
|
60
|
-
exports.create = create;
|
|
61
|
-
Object.defineProperty(exports, 'create_exports', {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () {
|
|
64
|
-
return create_exports;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
59
|
+
exports.create = create;
|
package/dist/api/create.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -6,7 +5,6 @@ import { listFiles } from "@stryke/fs/list-files";
|
|
|
6
5
|
import Handlebars from "handlebars";
|
|
7
6
|
|
|
8
7
|
//#region src/api/create.ts
|
|
9
|
-
var create_exports = /* @__PURE__ */ __exportAll({ create: () => create });
|
|
10
8
|
/**
|
|
11
9
|
* Create a new Powerlines project
|
|
12
10
|
*
|
|
@@ -55,5 +53,5 @@ async function create(context) {
|
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
//#endregion
|
|
58
|
-
export { create
|
|
56
|
+
export { create };
|
|
59
57
|
//# sourceMappingURL=create.mjs.map
|
package/dist/api/create.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/deploy.cjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
|
|
6
5
|
//#region src/api/deploy.ts
|
|
7
|
-
var deploy_exports = /* @__PURE__ */ require_chunk.__exportAll({ deploy: () => deploy });
|
|
8
6
|
/**
|
|
9
7
|
* Deploy the project's source files to the target environment.
|
|
10
8
|
*
|
|
@@ -23,10 +21,4 @@ async function deploy(context) {
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
//#endregion
|
|
26
|
-
exports.deploy = deploy;
|
|
27
|
-
Object.defineProperty(exports, 'deploy_exports', {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return deploy_exports;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
24
|
+
exports.deploy = deploy;
|
package/dist/api/deploy.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
|
|
5
4
|
//#region src/api/deploy.ts
|
|
6
|
-
var deploy_exports = /* @__PURE__ */ __exportAll({ deploy: () => deploy });
|
|
7
5
|
/**
|
|
8
6
|
* Deploy the project's source files to the target environment.
|
|
9
7
|
*
|
|
@@ -22,5 +20,5 @@ async function deploy(context) {
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
//#endregion
|
|
25
|
-
export { deploy
|
|
23
|
+
export { deploy };
|
|
26
24
|
//# sourceMappingURL=deploy.mjs.map
|
package/dist/api/deploy.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/docs.cjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
|
|
6
5
|
//#region src/api/docs.ts
|
|
7
|
-
var docs_exports = /* @__PURE__ */ require_chunk.__exportAll({ docs: () => docs });
|
|
8
6
|
/**
|
|
9
7
|
* Generate the project's documentation.
|
|
10
8
|
*
|
|
@@ -23,10 +21,4 @@ async function docs(context) {
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
//#endregion
|
|
26
|
-
exports.docs = docs;
|
|
27
|
-
Object.defineProperty(exports, 'docs_exports', {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return docs_exports;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
24
|
+
exports.docs = docs;
|
package/dist/api/docs.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
|
|
5
4
|
//#region src/api/docs.ts
|
|
6
|
-
var docs_exports = /* @__PURE__ */ __exportAll({ docs: () => docs });
|
|
7
5
|
/**
|
|
8
6
|
* Generate the project's documentation.
|
|
9
7
|
*
|
|
@@ -22,5 +20,5 @@ async function docs(context) {
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
//#endregion
|
|
25
|
-
export { docs
|
|
23
|
+
export { docs };
|
|
26
24
|
//# sourceMappingURL=docs.mjs.map
|
package/dist/api/docs.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/lint.cjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
|
|
6
5
|
//#region src/api/lint.ts
|
|
7
|
-
var lint_exports = /* @__PURE__ */ require_chunk.__exportAll({ lint: () => lint });
|
|
8
6
|
/**
|
|
9
7
|
* Lint the project's source files and report any issues found.
|
|
10
8
|
*
|
|
@@ -26,10 +24,4 @@ async function lint(context) {
|
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
//#endregion
|
|
29
|
-
exports.lint = lint;
|
|
30
|
-
Object.defineProperty(exports, 'lint_exports', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return lint_exports;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
27
|
+
exports.lint = lint;
|
package/dist/api/lint.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
|
|
5
4
|
//#region src/api/lint.ts
|
|
6
|
-
var lint_exports = /* @__PURE__ */ __exportAll({ lint: () => lint });
|
|
7
5
|
/**
|
|
8
6
|
* Lint the project's source files and report any issues found.
|
|
9
7
|
*
|
|
@@ -25,5 +23,5 @@ async function lint(context) {
|
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
//#endregion
|
|
28
|
-
export { lint
|
|
26
|
+
export { lint };
|
|
29
27
|
//# sourceMappingURL=lint.mjs.map
|
package/dist/api/lint.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/prepare.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
4
3
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
5
4
|
let _powerlines_core_lib_generate_types = require("@powerlines/core/lib/generate-types");
|
|
@@ -13,7 +12,6 @@ let _stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
|
13
12
|
let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
|
|
14
13
|
|
|
15
14
|
//#region src/api/prepare.ts
|
|
16
|
-
var prepare_exports = /* @__PURE__ */ require_chunk.__exportAll({ prepare: () => prepare });
|
|
17
15
|
/**
|
|
18
16
|
* Prepare the project
|
|
19
17
|
*
|
|
@@ -70,10 +68,4 @@ async function prepare(context, skipTypes = false) {
|
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
//#endregion
|
|
73
|
-
exports.prepare = prepare;
|
|
74
|
-
Object.defineProperty(exports, 'prepare_exports', {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () {
|
|
77
|
-
return prepare_exports;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
71
|
+
exports.prepare = prepare;
|
package/dist/api/prepare.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
3
2
|
import { replacePath } from "@stryke/path/replace";
|
|
4
3
|
import { handleTypes } from "@powerlines/core/lib/generate-types";
|
|
@@ -12,7 +11,6 @@ import { createDirectory } from "@stryke/fs/helpers";
|
|
|
12
11
|
import { isObject } from "@stryke/type-checks/is-object";
|
|
13
12
|
|
|
14
13
|
//#region src/api/prepare.ts
|
|
15
|
-
var prepare_exports = /* @__PURE__ */ __exportAll({ prepare: () => prepare });
|
|
16
14
|
/**
|
|
17
15
|
* Prepare the project
|
|
18
16
|
*
|
|
@@ -69,5 +67,5 @@ async function prepare(context, skipTypes = false) {
|
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
//#endregion
|
|
72
|
-
export { prepare
|
|
70
|
+
export { prepare };
|
|
73
71
|
//# sourceMappingURL=prepare.mjs.map
|
package/dist/api/prepare.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/test.cjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
|
|
6
5
|
//#region src/api/test.ts
|
|
7
|
-
var test_exports = /* @__PURE__ */ require_chunk.__exportAll({ test: () => test });
|
|
8
6
|
/**
|
|
9
7
|
* Test the project's source files and report any issues found.
|
|
10
8
|
*
|
|
@@ -26,10 +24,4 @@ async function test(context) {
|
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
//#endregion
|
|
29
|
-
exports.test = test;
|
|
30
|
-
Object.defineProperty(exports, 'test_exports', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return test_exports;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
27
|
+
exports.test = test;
|
package/dist/api/test.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
|
|
5
4
|
//#region src/api/test.ts
|
|
6
|
-
var test_exports = /* @__PURE__ */ __exportAll({ test: () => test });
|
|
7
5
|
/**
|
|
8
6
|
* Test the project's source files and report any issues found.
|
|
9
7
|
*
|
|
@@ -25,5 +23,5 @@ async function test(context) {
|
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
//#endregion
|
|
28
|
-
export {
|
|
26
|
+
export { test };
|
|
29
27
|
//# sourceMappingURL=test.mjs.map
|
package/dist/api/test.mjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/api/types.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_chunk = require('../chunk-CEeaYzDW.cjs');
|
|
3
2
|
const require_api_prepare = require('./prepare.cjs');
|
|
4
3
|
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
5
4
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
@@ -16,7 +15,6 @@ let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
|
16
15
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
17
16
|
|
|
18
17
|
//#region src/api/types.ts
|
|
19
|
-
var types_exports = /* @__PURE__ */ require_chunk.__exportAll({ types: () => types });
|
|
20
18
|
/**
|
|
21
19
|
* Generate runtime types for the Powerlines project.
|
|
22
20
|
*
|
|
@@ -72,10 +70,4 @@ async function types(context) {
|
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
//#endregion
|
|
75
|
-
exports.types = types;
|
|
76
|
-
Object.defineProperty(exports, 'types_exports', {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return types_exports;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
73
|
+
exports.types = types;
|
package/dist/api/types.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-w6R9maHv.mjs";
|
|
2
1
|
import { prepare } from "./prepare.mjs";
|
|
3
2
|
import { executeEnvironments } from "@powerlines/core/lib/environment";
|
|
4
3
|
import { replacePath } from "@stryke/path/replace";
|
|
@@ -15,7 +14,6 @@ import { omit } from "@stryke/helpers/omit";
|
|
|
15
14
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
16
15
|
|
|
17
16
|
//#region src/api/types.ts
|
|
18
|
-
var types_exports = /* @__PURE__ */ __exportAll({ types: () => types });
|
|
19
17
|
/**
|
|
20
18
|
* Generate runtime types for the Powerlines project.
|
|
21
19
|
*
|
|
@@ -71,5 +69,5 @@ async function types(context) {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
//#endregion
|
|
74
|
-
export {
|
|
72
|
+
export { types };
|
|
75
73
|
//# sourceMappingURL=types.mjs.map
|