powerlines 0.37.30 → 0.37.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.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.js +3 -3
- package/dist/{chunk-RGBI7UX7.cjs → chunk-3ZV6MOMH.cjs} +173 -216
- package/dist/{chunk-4JQPEMXH.js → chunk-D5W4OJQI.js} +3 -3
- package/dist/{chunk-YL3OE2WO.js → chunk-DFHVFK5Q.js} +160 -205
- package/dist/{chunk-QXPCHWBR.js → chunk-DJ4FRBNH.js} +3 -3
- package/dist/{chunk-2CQDJX6M.js → chunk-MJ7BK6OR.js} +3 -3
- package/dist/{chunk-52KPCXIK.cjs → chunk-OLOGZ27T.cjs} +5 -5
- package/dist/{chunk-5ENLYVSO.cjs → chunk-UO3UVXLR.cjs} +4 -4
- package/dist/{chunk-MQ6WRPXN.js → chunk-VURVUUYR.js} +3 -3
- package/dist/chunk-WD2SDIXV.cjs +12 -0
- package/dist/{chunk-NJHY3UUE.cjs → chunk-XR4OJDFT.cjs} +4 -4
- package/dist/chunk-XZI5Z56Q.cjs +12 -0
- package/dist/{chunk-E6S3W74I.js → chunk-Z4HHHZMP.js} +3 -3
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +2 -2
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +12 -12
- package/dist/lib/build/index.d.cts +1 -1
- package/dist/lib/build/index.d.ts +1 -1
- package/dist/lib/build/index.js +4 -4
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.d.cts +1 -1
- package/dist/lib/build/unbuild.d.ts +1 -1
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/{chunk-IRY6M7JO.cjs → chunk-2J3BIEL5.cjs} +13 -89
- package/dist/lib/chunk-2J3BIEL5.cjs.map +1 -0
- package/dist/lib/{chunk-7CCOJFAV.js → chunk-2JWZTFXS.js} +4 -4
- package/dist/lib/{chunk-7CCOJFAV.js.map → chunk-2JWZTFXS.js.map} +1 -1
- package/dist/lib/{chunk-FSQATFTG.js → chunk-2NYU6PWO.js} +3 -3
- package/dist/lib/{chunk-FSQATFTG.js.map → chunk-2NYU6PWO.js.map} +1 -1
- package/dist/lib/{chunk-TFOAWLRF.js → chunk-2Q4HYRK6.js} +3 -3
- package/dist/lib/{chunk-TFOAWLRF.js.map → chunk-2Q4HYRK6.js.map} +1 -1
- package/dist/lib/{chunk-3DYPJHNF.js → chunk-5X6JDPCN.js} +3 -3
- package/dist/lib/{chunk-3DYPJHNF.js.map → chunk-5X6JDPCN.js.map} +1 -1
- package/dist/lib/{chunk-37QKQRHL.js → chunk-ABGPMB5O.js} +3 -3
- package/dist/lib/{chunk-37QKQRHL.js.map → chunk-ABGPMB5O.js.map} +1 -1
- package/dist/lib/{chunk-O7HKPUBS.cjs → chunk-BCRIAJHV.cjs} +4 -4
- package/dist/lib/{chunk-O7HKPUBS.cjs.map → chunk-BCRIAJHV.cjs.map} +1 -1
- package/dist/lib/{chunk-7ZLMFCZF.js → chunk-CQMZHDZP.js} +3 -3
- package/dist/lib/{chunk-7ZLMFCZF.js.map → chunk-CQMZHDZP.js.map} +1 -1
- package/dist/lib/{chunk-JD3NTKZV.cjs → chunk-HFM5IVGD.cjs} +39 -33
- package/dist/lib/chunk-HFM5IVGD.cjs.map +1 -0
- package/dist/lib/{chunk-AJ4BVNZQ.js → chunk-HX5UF7YV.js} +36 -30
- package/dist/lib/chunk-HX5UF7YV.js.map +1 -0
- package/dist/lib/{chunk-NLYJSUUY.cjs → chunk-JF4ZEC67.cjs} +19 -19
- package/dist/lib/{chunk-NLYJSUUY.cjs.map → chunk-JF4ZEC67.cjs.map} +1 -1
- package/dist/lib/{chunk-PD6TYAFZ.cjs → chunk-KCMW3IVY.cjs} +4 -4
- package/dist/lib/{chunk-PD6TYAFZ.cjs.map → chunk-KCMW3IVY.cjs.map} +1 -1
- package/dist/lib/{chunk-W2573LNZ.js → chunk-L3BXKH76.js} +51 -48
- package/dist/lib/chunk-L3BXKH76.js.map +1 -0
- package/dist/lib/{chunk-BCHMMSWE.cjs → chunk-LV5UDNR3.cjs} +75 -72
- package/dist/lib/chunk-LV5UDNR3.cjs.map +1 -0
- package/dist/lib/{chunk-KLU5DWCZ.js → chunk-N37JIOZ4.js} +28 -8
- package/dist/lib/chunk-N37JIOZ4.js.map +1 -0
- package/dist/lib/{chunk-HUWGH27W.cjs → chunk-N3CUVN4G.cjs} +4 -4
- package/dist/lib/{chunk-HUWGH27W.cjs.map → chunk-N3CUVN4G.cjs.map} +1 -1
- package/dist/lib/{chunk-TAHP4BEC.cjs → chunk-NAMUQY7P.cjs} +4 -4
- package/dist/lib/{chunk-TAHP4BEC.cjs.map → chunk-NAMUQY7P.cjs.map} +1 -1
- package/dist/lib/{chunk-NGM47YES.cjs → chunk-O3ZBMF6Z.cjs} +6 -6
- package/dist/lib/{chunk-NGM47YES.cjs.map → chunk-O3ZBMF6Z.cjs.map} +1 -1
- package/dist/lib/{chunk-QNGZB26V.cjs → chunk-V5I52KN4.cjs} +4 -4
- package/dist/lib/{chunk-QNGZB26V.cjs.map → chunk-V5I52KN4.cjs.map} +1 -1
- package/dist/lib/{chunk-LLHPKFHC.js → chunk-WQRK3BBU.js} +13 -89
- package/dist/lib/chunk-WQRK3BBU.js.map +1 -0
- package/dist/lib/{chunk-NFUIYX77.js → chunk-X6CZ2G2G.js} +3 -3
- package/dist/lib/{chunk-NFUIYX77.js.map → chunk-X6CZ2G2G.js.map} +1 -1
- package/dist/lib/{chunk-FQZQA4EJ.cjs → chunk-Y36HVRRL.cjs} +29 -7
- package/dist/lib/chunk-Y36HVRRL.cjs.map +1 -0
- package/dist/lib/contexts/api-context.cjs +6 -6
- package/dist/lib/contexts/api-context.d.cts +1 -1
- package/dist/lib/contexts/api-context.d.ts +1 -1
- package/dist/lib/contexts/api-context.js +5 -5
- package/dist/lib/contexts/context.cjs +4 -4
- package/dist/lib/contexts/context.d.cts +5 -5
- package/dist/lib/contexts/context.d.ts +5 -5
- package/dist/lib/contexts/context.js +3 -3
- package/dist/lib/contexts/environment-context.cjs +5 -5
- package/dist/lib/contexts/environment-context.d.cts +1 -1
- package/dist/lib/contexts/environment-context.d.ts +1 -1
- package/dist/lib/contexts/environment-context.js +4 -4
- package/dist/lib/contexts/index.cjs +8 -8
- package/dist/lib/contexts/index.d.cts +1 -1
- package/dist/lib/contexts/index.d.ts +1 -1
- package/dist/lib/contexts/index.js +5 -5
- package/dist/lib/contexts/plugin-context.d.cts +1 -1
- package/dist/lib/contexts/plugin-context.d.ts +1 -1
- package/dist/lib/entry.cjs +17 -9
- package/dist/lib/entry.d.cts +16 -2
- package/dist/lib/entry.d.ts +16 -2
- package/dist/lib/entry.js +1 -1
- package/dist/lib/fs/index.cjs +2 -2
- package/dist/lib/fs/index.js +1 -1
- package/dist/lib/fs/vfs.cjs +2 -2
- package/dist/lib/fs/vfs.js +1 -1
- package/dist/lib/index.cjs +32 -24
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +9 -9
- package/dist/lib/{internal-DyXNBori.d.ts → internal-CFBs3Fok.d.cts} +1 -5
- package/dist/lib/{internal-Dt8PM9M2.d.cts → internal-Dlj-vo3a.d.ts} +1 -5
- package/dist/lib/unplugin/factory.cjs +7 -7
- package/dist/lib/unplugin/factory.js +6 -6
- package/dist/lib/unplugin/index.cjs +7 -7
- package/dist/lib/unplugin/index.js +6 -6
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/index.cjs +6 -6
- package/dist/lib/utilities/index.js +4 -4
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +8 -13
- package/dist/nuxt.js +4 -9
- package/dist/rolldown.cjs +6 -6
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/tsdown.cjs +4 -4
- package/dist/tsdown.js +3 -3
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/types/internal.d.cts +1 -5
- package/dist/types/internal.d.ts +1 -5
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.js +4 -4
- package/dist/vite.cjs +6 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-7VPSEJKY.cjs +0 -12
- package/dist/chunk-MBOC2GGZ.cjs +0 -12
- package/dist/lib/chunk-AJ4BVNZQ.js.map +0 -1
- package/dist/lib/chunk-BCHMMSWE.cjs.map +0 -1
- package/dist/lib/chunk-FQZQA4EJ.cjs.map +0 -1
- package/dist/lib/chunk-IRY6M7JO.cjs.map +0 -1
- package/dist/lib/chunk-JD3NTKZV.cjs.map +0 -1
- package/dist/lib/chunk-KLU5DWCZ.js.map +0 -1
- package/dist/lib/chunk-LLHPKFHC.js.map +0 -1
- package/dist/lib/chunk-W2573LNZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entryPoints","write","sourcemap","splitting","treeShaking","packages","platform","logLevel","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;;;AAgCA,eAAsB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AC3CJ,GAAAA,CAAIQ,CAAAA,YAAWA,OAAAA,CAAQN,IAAI,EAC3BC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAI,CAAChB,OAAOsB,WAAAA,IAAetB,MAAAA,CAAOsB,YAAYC,MAAAA,CAAOC,OAAAA,CAAAA,CAASZ,MAAAA,KAAW,CAAA,EAAG;AAC1E,IAAA,MAAM,IAAIb,KAAAA,CACR,CAAA,8BAAA,EACEN,IAAAA,CAAAA,+CAAAA,CAC+C,CAAA;AAErD,EAAA;AAEA,EAAA,OAAOO,MAAAA,CAAOsB,WAAAA,CAAYC,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AAjDsBjC,wBAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entryPoints","write","sourcemap","splitting","treeShaking","packages","platform","logLevel","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;;;AAgCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMH,OAAAA,CAAQI,EAAAA,CAAGC,QAAQJ,IAAAA,CAAAA;AACtC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQI,EAAAA,CAAGE,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA,CAAAA,uCAAAA,CAA6C,CAAA;AAEvE,EAAA;AAEA,EAAA,MAAMO,MAAAA,GAAS,MAAMC,aAAAA,CAAM;AACzB,IAAA,GAAGC,uCAAqBV,OAAAA,CAAAA;IACxBW,W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,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-KCMW3IVY.cjs","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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entryPoints: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n packages: \"external\",\n platform: \"node\",\n logLevel: \"silent\",\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getFileHeader } from './chunk-7R23HVGQ.js';
|
|
2
|
-
import { PowerlinesAPIContext } from './chunk-
|
|
3
|
-
import { isPluginConfig, findInvalidPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-
|
|
2
|
+
import { PowerlinesAPIContext } from './chunk-2JWZTFXS.js';
|
|
3
|
+
import { isPluginConfig, findInvalidPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-HX5UF7YV.js';
|
|
4
4
|
import { writeMetaFile } from './chunk-45D4XIOK.js';
|
|
5
5
|
import { createProgram } from './chunk-ZLWW2MXD.js';
|
|
6
6
|
import { isIncludeMatchFound, getParsedTypeScriptConfig, getTsconfigFilePath } from './chunk-FPFPUYXS.js';
|
|
@@ -44,6 +44,9 @@ import { StormJSON } from '@stryke/json/storm-json';
|
|
|
44
44
|
import { relativePath, findFilePath, findFileName } from '@stryke/path/file-path-fns';
|
|
45
45
|
import { titleCase } from '@stryke/string-format/title-case';
|
|
46
46
|
|
|
47
|
+
// package.json
|
|
48
|
+
var package_default = {
|
|
49
|
+
version: "0.37.31"};
|
|
47
50
|
function resolveModulePath(nodePath, state) {
|
|
48
51
|
if (!t.isStringLiteral(nodePath.node)) {
|
|
49
52
|
return;
|
|
@@ -465,14 +468,14 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
465
468
|
const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
|
|
466
469
|
api.#context.$$internal = {
|
|
467
470
|
api,
|
|
468
|
-
addPlugin: api.#addPlugin.bind(api)
|
|
469
|
-
entry: []
|
|
471
|
+
addPlugin: api.#addPlugin.bind(api)
|
|
470
472
|
};
|
|
473
|
+
api.context.info(`\u{1F50C} The Powerlines v${package_default.version} engine has started`);
|
|
471
474
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
472
475
|
await api.#addPlugin(plugin);
|
|
473
476
|
}
|
|
474
477
|
if (api.context.plugins.length === 0) {
|
|
475
|
-
api.context.
|
|
478
|
+
api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
|
|
476
479
|
}
|
|
477
480
|
const pluginConfig = await api.callHook("config", {
|
|
478
481
|
environment: await api.context.getEnvironment(),
|
|
@@ -495,11 +498,11 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
495
498
|
async prepare(inlineConfig = {
|
|
496
499
|
command: "prepare"
|
|
497
500
|
}) {
|
|
498
|
-
this.context.
|
|
499
|
-
this.context.
|
|
501
|
+
this.context.info(" \u{1F3D7}\uFE0F Preparing the Powerlines project");
|
|
502
|
+
this.context.debug(" \u2699\uFE0F Aggregating configuration options for the Powerlines project");
|
|
500
503
|
await this.context.withInlineConfig(inlineConfig);
|
|
501
504
|
await this.#executeEnvironments(async (context) => {
|
|
502
|
-
context.
|
|
505
|
+
context.debug(`Initializing the processing options for the Powerlines project.`);
|
|
503
506
|
await this.callHook("configResolved", {
|
|
504
507
|
environment: context,
|
|
505
508
|
order: "pre"
|
|
@@ -509,7 +512,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
509
512
|
environment: context,
|
|
510
513
|
order: "normal"
|
|
511
514
|
});
|
|
512
|
-
context.
|
|
515
|
+
context.debug(`The configuration provided ${toArray(context.config.entry).length} entry point(s), Powerlines has found ${context.entry.length} entry files(s) for the ${context.config.title} project${context.entry.length > 0 && context.entry.length < 10 ? `:
|
|
513
516
|
${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}.`);
|
|
514
517
|
await resolveTsconfig(context);
|
|
515
518
|
await installDependencies(context);
|
|
@@ -517,7 +520,7 @@ ${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.out
|
|
|
517
520
|
environment: context,
|
|
518
521
|
order: "post"
|
|
519
522
|
});
|
|
520
|
-
context.
|
|
523
|
+
context.trace(`Powerlines configuration has been resolved:
|
|
521
524
|
|
|
522
525
|
${formatLogMessage(context.config)}`);
|
|
523
526
|
if (!context.fs.existsSync(context.cachePath)) {
|
|
@@ -535,11 +538,11 @@ ${formatLogMessage(context.config)}`);
|
|
|
535
538
|
order: "normal"
|
|
536
539
|
});
|
|
537
540
|
if (context.config.output.dts !== false) {
|
|
538
|
-
context.
|
|
541
|
+
context.debug(`Preparing the TypeScript definitions for the Powerlines project.`);
|
|
539
542
|
if (context.fs.existsSync(context.dtsPath)) {
|
|
540
543
|
await context.fs.remove(context.dtsPath);
|
|
541
544
|
}
|
|
542
|
-
context.
|
|
545
|
+
context.debug("Transforming built-ins runtime modules files.");
|
|
543
546
|
const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
|
|
544
547
|
const result2 = await transformAsync(file.code.toString(), {
|
|
545
548
|
highlightCode: true,
|
|
@@ -572,7 +575,7 @@ ${formatLogMessage(context.config)}`);
|
|
|
572
575
|
context.warn(`File ID is missing for a built-in runtime file at ${file.path}.`);
|
|
573
576
|
file.id = replacePath(replacePath(file.path, context.workspaceConfig.workspaceRoot), context.builtinsPath);
|
|
574
577
|
}
|
|
575
|
-
context.
|
|
578
|
+
context.trace(`Writing transformed built-in runtime file ${file.id}.`);
|
|
576
579
|
await context.emitBuiltin(result2.code, file.id);
|
|
577
580
|
return file.path;
|
|
578
581
|
}));
|
|
@@ -591,9 +594,9 @@ ${formatLogMessage(context.config)}`);
|
|
|
591
594
|
[]
|
|
592
595
|
// [joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")]
|
|
593
596
|
);
|
|
594
|
-
context.
|
|
597
|
+
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
595
598
|
let types = await emitTypes(context, files);
|
|
596
|
-
context.
|
|
599
|
+
context.debug(`Generating TypeScript declaration file ${context.dtsPath}.`);
|
|
597
600
|
const directives = [];
|
|
598
601
|
const asNextParam = /* @__PURE__ */ __name((previousResult) => isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
|
|
599
602
|
let result = await this.callHook("types", {
|
|
@@ -670,7 +673,7 @@ ${formatTypes(types)}
|
|
|
670
673
|
if (!context.tsconfig) {
|
|
671
674
|
throw new Error("Failed to parse the TypeScript configuration file.");
|
|
672
675
|
}
|
|
673
|
-
this.context.
|
|
676
|
+
this.context.debug("Formatting files generated during the prepare step.");
|
|
674
677
|
await Promise.all([
|
|
675
678
|
formatFolder(context, context.builtinsPath),
|
|
676
679
|
formatFolder(context, context.entryPath)
|
|
@@ -682,7 +685,7 @@ ${formatTypes(types)}
|
|
|
682
685
|
await writeMetaFile(context);
|
|
683
686
|
context.persistedMeta = context.meta;
|
|
684
687
|
});
|
|
685
|
-
this.context.
|
|
688
|
+
this.context.info("\u2714 Powerlines preparation has completed successfully");
|
|
686
689
|
}
|
|
687
690
|
/**
|
|
688
691
|
* Create a new Powerlines project
|
|
@@ -694,17 +697,17 @@ ${formatTypes(types)}
|
|
|
694
697
|
* @returns A promise that resolves when the project has been created
|
|
695
698
|
*/
|
|
696
699
|
async new(inlineConfig) {
|
|
697
|
-
this.context.
|
|
700
|
+
this.context.info("\u{1F195} Creating a new Powerlines project");
|
|
698
701
|
await this.prepare(inlineConfig);
|
|
699
702
|
await this.#executeEnvironments(async (context) => {
|
|
700
|
-
context.
|
|
703
|
+
context.debug("Initializing the processing options for the Powerlines project.");
|
|
701
704
|
await this.callHook("new", {
|
|
702
705
|
environment: context,
|
|
703
706
|
order: "pre"
|
|
704
707
|
});
|
|
705
708
|
const files = await listFiles(joinPaths(context.powerlinesPath, "files/common/**/*.hbs"));
|
|
706
709
|
for (const file of files) {
|
|
707
|
-
context.
|
|
710
|
+
context.trace(`Adding template file to project: ${file}`);
|
|
708
711
|
const template = Handlebars.compile(file);
|
|
709
712
|
await context.fs.write(joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
710
713
|
}
|
|
@@ -715,14 +718,14 @@ ${formatTypes(types)}
|
|
|
715
718
|
if (context.config.projectType === "application") {
|
|
716
719
|
const files2 = await listFiles(joinPaths(context.powerlinesPath, "files/application/**/*.hbs"));
|
|
717
720
|
for (const file of files2) {
|
|
718
|
-
context.
|
|
721
|
+
context.trace(`Adding application template file: ${file}`);
|
|
719
722
|
const template = Handlebars.compile(file);
|
|
720
723
|
await context.fs.write(joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
721
724
|
}
|
|
722
725
|
} else {
|
|
723
726
|
const files2 = await listFiles(joinPaths(context.powerlinesPath, "files/library/**/*.hbs"));
|
|
724
727
|
for (const file of files2) {
|
|
725
|
-
context.
|
|
728
|
+
context.trace(`Adding library template file: ${file}`);
|
|
726
729
|
const template = Handlebars.compile(file);
|
|
727
730
|
await context.fs.write(joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
728
731
|
}
|
|
@@ -732,7 +735,7 @@ ${formatTypes(types)}
|
|
|
732
735
|
order: "post"
|
|
733
736
|
});
|
|
734
737
|
});
|
|
735
|
-
this.context.
|
|
738
|
+
this.context.debug("\u2714 Powerlines new command completed successfully");
|
|
736
739
|
}
|
|
737
740
|
/**
|
|
738
741
|
* Clean any previously prepared artifacts
|
|
@@ -746,10 +749,10 @@ ${formatTypes(types)}
|
|
|
746
749
|
async clean(inlineConfig = {
|
|
747
750
|
command: "clean"
|
|
748
751
|
}) {
|
|
749
|
-
this.context.
|
|
752
|
+
this.context.info("\u{1F9F9} Cleaning the previous Powerlines artifacts");
|
|
750
753
|
await this.prepare(inlineConfig);
|
|
751
754
|
await this.#executeEnvironments(async (context) => {
|
|
752
|
-
|
|
755
|
+
context.debug("Cleaning the project's dist and artifacts directories.");
|
|
753
756
|
await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
|
|
754
757
|
await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.output.artifactsPath));
|
|
755
758
|
await this.callHook("clean", {
|
|
@@ -757,7 +760,7 @@ ${formatTypes(types)}
|
|
|
757
760
|
sequential: false
|
|
758
761
|
});
|
|
759
762
|
});
|
|
760
|
-
this.context.
|
|
763
|
+
this.context.debug("\u2714 Powerlines cleaning completed successfully");
|
|
761
764
|
}
|
|
762
765
|
/**
|
|
763
766
|
* Lint the project
|
|
@@ -768,7 +771,7 @@ ${formatTypes(types)}
|
|
|
768
771
|
async lint(inlineConfig = {
|
|
769
772
|
command: "lint"
|
|
770
773
|
}) {
|
|
771
|
-
this.context.
|
|
774
|
+
this.context.info("\u{1F4CB} Linting the Powerlines project");
|
|
772
775
|
await this.prepare(inlineConfig);
|
|
773
776
|
await this.#executeEnvironments(async (context) => {
|
|
774
777
|
if (context.config.lint !== false) {
|
|
@@ -778,7 +781,7 @@ ${formatTypes(types)}
|
|
|
778
781
|
});
|
|
779
782
|
}
|
|
780
783
|
});
|
|
781
|
-
this.context.
|
|
784
|
+
this.context.debug("\u2714 Powerlines linting completed successfully");
|
|
782
785
|
}
|
|
783
786
|
/**
|
|
784
787
|
* Build the project
|
|
@@ -792,7 +795,7 @@ ${formatTypes(types)}
|
|
|
792
795
|
async build(inlineConfig = {
|
|
793
796
|
command: "build"
|
|
794
797
|
}) {
|
|
795
|
-
this.context.
|
|
798
|
+
this.context.info("\u{1F4E6} Building the Powerlines project");
|
|
796
799
|
await this.prepare(inlineConfig);
|
|
797
800
|
if (this.context.config.singleBuild) {
|
|
798
801
|
await this.#handleBuild(await this.#context.toEnvironment());
|
|
@@ -801,7 +804,7 @@ ${formatTypes(types)}
|
|
|
801
804
|
await this.#handleBuild(context);
|
|
802
805
|
});
|
|
803
806
|
}
|
|
804
|
-
this.context.
|
|
807
|
+
this.context.debug("\u2714 Powerlines build completed successfully");
|
|
805
808
|
}
|
|
806
809
|
/**
|
|
807
810
|
* Prepare the documentation for the project
|
|
@@ -812,10 +815,10 @@ ${formatTypes(types)}
|
|
|
812
815
|
async docs(inlineConfig = {
|
|
813
816
|
command: "docs"
|
|
814
817
|
}) {
|
|
815
|
-
this.context.
|
|
818
|
+
this.context.info("\u{1F4D3} Generating documentation for the Powerlines project");
|
|
816
819
|
await this.prepare(inlineConfig);
|
|
817
820
|
await this.#executeEnvironments(async (context) => {
|
|
818
|
-
context.
|
|
821
|
+
context.debug("Writing documentation for the Powerlines project artifacts.");
|
|
819
822
|
await this.prepare(inlineConfig);
|
|
820
823
|
await this.#executeEnvironments(async (context2) => {
|
|
821
824
|
await this.callHook("docs", {
|
|
@@ -823,7 +826,7 @@ ${formatTypes(types)}
|
|
|
823
826
|
});
|
|
824
827
|
});
|
|
825
828
|
});
|
|
826
|
-
this
|
|
829
|
+
this.context.debug("\u2714 Powerlines documentation generation completed successfully");
|
|
827
830
|
}
|
|
828
831
|
/**
|
|
829
832
|
* Deploy the project source code
|
|
@@ -836,14 +839,14 @@ ${formatTypes(types)}
|
|
|
836
839
|
async deploy(inlineConfig = {
|
|
837
840
|
command: "deploy"
|
|
838
841
|
}) {
|
|
839
|
-
this.context.
|
|
842
|
+
this.context.info("\u{1F680} Deploying the Powerlines project");
|
|
840
843
|
await this.prepare(inlineConfig);
|
|
841
844
|
await this.#executeEnvironments(async (context) => {
|
|
842
845
|
await this.callHook("deploy", {
|
|
843
846
|
environment: context
|
|
844
847
|
});
|
|
845
848
|
});
|
|
846
|
-
this.context.
|
|
849
|
+
this.context.debug("\u2714 Powerlines deploy completed successfully");
|
|
847
850
|
}
|
|
848
851
|
/**
|
|
849
852
|
* Finalization process
|
|
@@ -854,14 +857,14 @@ ${formatTypes(types)}
|
|
|
854
857
|
* @returns A promise that resolves when the finalization process has completed
|
|
855
858
|
*/
|
|
856
859
|
async finalize() {
|
|
857
|
-
this.context.
|
|
860
|
+
this.context.info("\u{1F3C1} Powerlines finalization processes started");
|
|
858
861
|
await this.#executeEnvironments(async (context) => {
|
|
859
862
|
await this.callHook("finalize", {
|
|
860
863
|
environment: context
|
|
861
864
|
});
|
|
862
865
|
await context.fs.dispose();
|
|
863
866
|
});
|
|
864
|
-
this.context.
|
|
867
|
+
this.context.debug("\u2714 Powerlines finalization completed successfully");
|
|
865
868
|
}
|
|
866
869
|
/**
|
|
867
870
|
* Invokes the configured plugin hooks
|
|
@@ -902,12 +905,12 @@ ${formatTypes(types)}
|
|
|
902
905
|
const sourcePath = appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
|
|
903
906
|
const destinationPath = joinPaths(appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
|
|
904
907
|
if (context.fs.existsSync(sourcePath) && sourcePath !== destinationPath) {
|
|
905
|
-
context.
|
|
908
|
+
context.debug(`Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
|
|
906
909
|
await context.fs.copy(sourcePath, destinationPath);
|
|
907
910
|
}
|
|
908
911
|
}
|
|
909
912
|
await Promise.all(context.config.output.assets.map(async (asset) => {
|
|
910
|
-
context.
|
|
913
|
+
context.trace(`Copying asset(s): ${chalk3.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths(replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk3.greenBright(joinPaths(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk3.yellowBright(i)).join(", ")})` : ""}`);
|
|
911
914
|
await context.fs.copy(asset, asset.output);
|
|
912
915
|
}));
|
|
913
916
|
await this.callHook("build", {
|
|
@@ -922,12 +925,12 @@ ${formatTypes(types)}
|
|
|
922
925
|
*/
|
|
923
926
|
async #getEnvironments() {
|
|
924
927
|
if (!this.context.config.environments || Object.keys(this.context.config.environments).length <= 1) {
|
|
925
|
-
this.context.
|
|
928
|
+
this.context.debug("No environments are configured for this Powerlines project. Using the default environment.");
|
|
926
929
|
return [
|
|
927
930
|
await this.context.getEnvironment()
|
|
928
931
|
];
|
|
929
932
|
}
|
|
930
|
-
this.context.
|
|
933
|
+
this.context.debug(`Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`);
|
|
931
934
|
return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name, config]) => {
|
|
932
935
|
const environment = await this.context.getEnvironmentSafe(name);
|
|
933
936
|
if (!environment) {
|
|
@@ -963,7 +966,7 @@ ${formatTypes(types)}
|
|
|
963
966
|
return;
|
|
964
967
|
}
|
|
965
968
|
for (const plugin of result) {
|
|
966
|
-
this.context.
|
|
969
|
+
this.context.debug(`Successfully initialized the ${chalk3.bold.cyanBright(plugin.name)} plugin`);
|
|
967
970
|
await this.context.addPlugin(plugin);
|
|
968
971
|
}
|
|
969
972
|
}
|
|
@@ -1050,10 +1053,10 @@ Please ensure the value is one of the following:
|
|
|
1050
1053
|
const result = [];
|
|
1051
1054
|
for (const plugin of plugins) {
|
|
1052
1055
|
if (checkDedupe(plugin, this.context.plugins)) {
|
|
1053
|
-
this.context.
|
|
1056
|
+
this.context.trace(`Duplicate ${chalk3.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1054
1057
|
} else {
|
|
1055
1058
|
result.push(plugin);
|
|
1056
|
-
this.context.
|
|
1059
|
+
this.context.trace(`Initializing the ${chalk3.bold.cyanBright(plugin.name)} plugin...`);
|
|
1057
1060
|
}
|
|
1058
1061
|
}
|
|
1059
1062
|
return result;
|
|
@@ -1070,12 +1073,12 @@ Please ensure the value is one of the following:
|
|
|
1070
1073
|
]
|
|
1071
1074
|
});
|
|
1072
1075
|
if (!isInstalled && this.context.config.skipInstalls !== true) {
|
|
1073
|
-
this.#context.
|
|
1076
|
+
this.#context.warn(`The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
|
|
1074
1077
|
const result = await install(pluginPath, {
|
|
1075
1078
|
cwd: this.context.config.projectRoot
|
|
1076
1079
|
});
|
|
1077
1080
|
if (isNumber(result.exitCode) && result.exitCode > 0) {
|
|
1078
|
-
this.#context.
|
|
1081
|
+
this.#context.error(result.stderr);
|
|
1079
1082
|
throw new Error(`An error occurred while installing the build plugin package "${pluginPath}" `);
|
|
1080
1083
|
}
|
|
1081
1084
|
}
|
|
@@ -1220,5 +1223,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
1220
1223
|
__name(createUnpluginFactory, "createUnpluginFactory");
|
|
1221
1224
|
|
|
1222
1225
|
export { createUnpluginFactory };
|
|
1223
|
-
//# sourceMappingURL=chunk-
|
|
1224
|
-
//# sourceMappingURL=chunk-
|
|
1226
|
+
//# sourceMappingURL=chunk-L3BXKH76.js.map
|
|
1227
|
+
//# sourceMappingURL=chunk-L3BXKH76.js.map
|