powerlines 0.3.0 → 0.4.0
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/astro.cjs +8 -8
- package/dist/astro.d.cts +2 -2
- package/dist/astro.d.ts +2 -2
- package/dist/astro.js +5 -5
- package/dist/{chunk-M7LAFZJC.cjs → chunk-2HFMIZYO.cjs} +8 -8
- package/dist/{chunk-EODIWGJH.cjs → chunk-2WZTZIPL.cjs} +4 -4
- package/dist/{chunk-OE4YQRV3.js → chunk-4HA6WES7.js} +33 -32
- package/dist/{chunk-PCCYWWFV.cjs → chunk-4YWVR54C.cjs} +33 -32
- package/dist/{chunk-P5GGDZUL.cjs → chunk-4ZXJF3CL.cjs} +4 -4
- package/dist/{chunk-56HZJA6Y.js → chunk-5DH4T6HI.js} +3 -3
- package/dist/chunk-6FA3IOW2.cjs +12 -0
- package/dist/{chunk-LRMTFNMK.js → chunk-6XFFNJCS.js} +3 -3
- package/dist/{chunk-FPX2EVBU.cjs → chunk-A3H5EZ5M.cjs} +4 -4
- package/dist/{chunk-WZEUHWMP.js → chunk-AM4EJ45G.js} +3 -3
- package/dist/{chunk-JNJHD7IF.js → chunk-AWFN3GRI.js} +3 -3
- package/dist/{chunk-ICOR66M4.js → chunk-B4LIFIMY.js} +4 -4
- package/dist/chunk-EU27ZVAT.cjs +12 -0
- package/dist/{chunk-TNAS7QOH.cjs → chunk-FO3BCZ7I.cjs} +2 -2
- package/dist/{chunk-PYZBMYP5.cjs → chunk-G22O7YG6.cjs} +2 -2
- package/dist/{chunk-AWSOFXSZ.js → chunk-H6Q4VIN2.js} +3 -3
- package/dist/{chunk-3T4PHMIA.cjs → chunk-IG5EBLIY.cjs} +4 -4
- package/dist/{chunk-OL7A3UTX.js → chunk-K3M64YD3.js} +3 -3
- package/dist/chunk-KWL6GUEE.cjs +12 -0
- package/dist/{chunk-MCLMQP6E.cjs → chunk-LWR6R534.cjs} +4 -4
- package/dist/chunk-NLBJDVPY.js +31 -0
- package/dist/{chunk-V7LHKVYM.js → chunk-NX4KYNFX.js} +3 -3
- package/dist/chunk-O7I3HSK7.cjs +24 -0
- package/dist/chunk-OP7ENM3G.cjs +12 -0
- package/dist/{chunk-M5KSW26K.js → chunk-P44S6KC7.js} +2 -2
- package/dist/{chunk-QU4WXUK2.js → chunk-QIFYDXQR.js} +3 -3
- package/dist/chunk-QS4DORVI.cjs +34 -0
- package/dist/{chunk-X2ZKTEPA.js → chunk-SXQLYT2H.js} +2 -2
- package/dist/{chunk-TCSH3FQA.js → chunk-TBJ2VLKL.js} +3 -3
- package/dist/chunk-TIVHQTCA.cjs +12 -0
- package/dist/{chunk-VG7PGLU3.js → chunk-ZLDA32TD.js} +3 -3
- package/dist/{chunk-ICPUJUTG.js → chunk-ZU75LI5N.js} +3 -3
- package/dist/define-config.d.cts +2 -2
- package/dist/define-config.d.ts +2 -2
- package/dist/esbuild.cjs +7 -7
- package/dist/esbuild.d.cts +2 -2
- package/dist/esbuild.d.ts +2 -2
- package/dist/esbuild.js +4 -4
- package/dist/farm.cjs +4 -4
- package/dist/farm.d.cts +2 -2
- package/dist/farm.d.ts +2 -2
- package/dist/farm.js +3 -3
- package/dist/index.cjs +21 -21
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/internal/api.cjs +3 -3
- package/dist/internal/api.d.cts +2 -2
- package/dist/internal/api.d.ts +2 -2
- package/dist/internal/api.js +2 -2
- package/dist/lib/{chunk-WV4DZRNU.cjs → chunk-PTSKT4XY.cjs} +31 -30
- package/dist/lib/chunk-PTSKT4XY.cjs.map +1 -0
- package/dist/lib/{chunk-JZT4ZOXK.js → chunk-VGGQJDIU.js} +32 -31
- package/dist/lib/chunk-VGGQJDIU.js.map +1 -0
- package/dist/lib/{config-BH42eQeu.d.cts → config-COmv2gYP.d.cts} +14 -18
- package/dist/lib/{config-DwaKbb1W.d.ts → config-Du9blYJM.d.ts} +14 -18
- package/dist/lib/config-file.d.cts +2 -2
- package/dist/lib/config-file.d.ts +2 -2
- package/dist/lib/deepkit/index.d.cts +2 -2
- package/dist/lib/deepkit/index.d.ts +2 -2
- package/dist/lib/deepkit/reflect-type.d.cts +2 -2
- package/dist/lib/deepkit/reflect-type.d.ts +2 -2
- package/dist/lib/deepkit/resolve-reflections.d.cts +2 -2
- package/dist/lib/deepkit/resolve-reflections.d.ts +2 -2
- package/dist/lib/deepkit/transformer.d.cts +2 -2
- package/dist/lib/deepkit/transformer.d.ts +2 -2
- package/dist/lib/entry.d.cts +2 -2
- package/dist/lib/entry.d.ts +2 -2
- package/dist/lib/index.cjs +2 -2
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +1 -1
- package/dist/lib/logger.d.cts +2 -2
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/typescript/compiler-host.d.cts +2 -2
- package/dist/lib/typescript/compiler-host.d.ts +2 -2
- package/dist/lib/typescript/import-transformer.d.cts +2 -2
- package/dist/lib/typescript/import-transformer.d.ts +2 -2
- package/dist/lib/typescript/index.d.cts +2 -2
- package/dist/lib/typescript/index.d.ts +2 -2
- package/dist/lib/typescript/program.d.cts +2 -2
- package/dist/lib/typescript/program.d.ts +2 -2
- package/dist/lib/typescript/transpile.d.cts +2 -2
- package/dist/lib/typescript/transpile.d.ts +2 -2
- package/dist/lib/unplugin/factory.cjs +2 -2
- package/dist/lib/unplugin/factory.d.cts +2 -2
- package/dist/lib/unplugin/factory.d.ts +2 -2
- package/dist/lib/unplugin/factory.js +1 -1
- package/dist/lib/unplugin/index.cjs +2 -2
- package/dist/lib/unplugin/index.d.cts +2 -2
- package/dist/lib/unplugin/index.d.ts +2 -2
- package/dist/lib/unplugin/index.js +1 -1
- package/dist/lib/unplugin/plugin.d.cts +2 -2
- package/dist/lib/unplugin/plugin.d.ts +2 -2
- package/dist/lib/unplugin/resolve-id.d.cts +2 -2
- package/dist/lib/unplugin/resolve-id.d.ts +2 -2
- package/dist/lib/utilities/file-header.d.cts +2 -2
- package/dist/lib/utilities/file-header.d.ts +2 -2
- package/dist/lib/utilities/index.d.cts +2 -2
- package/dist/lib/utilities/index.d.ts +2 -2
- package/dist/lib/utilities/meta.d.cts +2 -2
- package/dist/lib/utilities/meta.d.ts +2 -2
- package/dist/lib/utilities/plugin-helpers.d.cts +2 -2
- package/dist/lib/utilities/plugin-helpers.d.ts +2 -2
- package/dist/lib/utilities/resolve-path.d.cts +2 -2
- package/dist/lib/utilities/resolve-path.d.ts +2 -2
- package/dist/lib/utilities/worker.d.cts +2 -2
- package/dist/lib/utilities/worker.d.ts +2 -2
- package/dist/lib/utilities/write-file.d.cts +2 -2
- package/dist/lib/utilities/write-file.d.ts +2 -2
- package/dist/next.cjs +8 -8
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +9 -9
- package/dist/nuxt.js +6 -6
- package/dist/{resolved-CXRrX1o1.d.cts → resolved-Cbv90ASf.d.cts} +15 -21
- package/dist/{resolved-BGRXu5is.d.ts → resolved-yKa67XHB.d.ts} +15 -21
- package/dist/rolldown.cjs +7 -7
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.d.ts +2 -2
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +7 -7
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.ts +2 -2
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +7 -7
- package/dist/rspack.d.cts +2 -2
- package/dist/rspack.d.ts +2 -2
- package/dist/rspack.js +4 -4
- package/dist/tsup.cjs +8 -8
- package/dist/tsup.js +5 -5
- package/dist/types/babel.d.cts +2 -2
- package/dist/types/babel.d.ts +2 -2
- package/dist/types/commands.d.cts +2 -2
- package/dist/types/commands.d.ts +2 -2
- package/dist/types/compiler.d.cts +2 -2
- package/dist/types/compiler.d.ts +2 -2
- package/dist/types/config.d.cts +2 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +2 -2
- package/dist/types/context.d.ts +2 -2
- package/dist/types/context.js +1 -1
- package/dist/types/hooks.d.cts +2 -2
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/index.cjs +4 -4
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/dist/types/plugin.cjs +2 -2
- package/dist/types/plugin.d.cts +2 -2
- package/dist/types/plugin.d.ts +2 -2
- package/dist/types/plugin.js +1 -1
- package/dist/types/resolved.d.cts +2 -2
- package/dist/types/resolved.d.ts +2 -2
- package/dist/types/unplugin.d.cts +2 -2
- package/dist/types/unplugin.d.ts +2 -2
- package/dist/unloader.cjs +7 -7
- package/dist/unloader.d.cts +2 -2
- package/dist/unloader.d.ts +2 -2
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +18 -18
- package/dist/unplugin.d.cts +2 -2
- package/dist/unplugin.d.ts +2 -2
- package/dist/unplugin.js +15 -15
- package/dist/vite.cjs +7 -7
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +7 -7
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +4 -4
- package/package.json +2 -2
- package/dist/chunk-5HUMTYPQ.cjs +0 -12
- package/dist/chunk-5KDXM73F.cjs +0 -12
- package/dist/chunk-7LMJKG7Q.cjs +0 -12
- package/dist/chunk-AKPS5IUC.cjs +0 -24
- package/dist/chunk-IRWJCRSN.cjs +0 -12
- package/dist/chunk-LBLKLGQF.cjs +0 -12
- package/dist/chunk-QW6XE4SD.cjs +0 -34
- package/dist/chunk-Y77AS64Z.js +0 -31
- package/dist/lib/chunk-JZT4ZOXK.js.map +0 -1
- package/dist/lib/chunk-WV4DZRNU.cjs.map +0 -1
|
@@ -59,7 +59,7 @@ import { Union } from 'unionfs';
|
|
|
59
59
|
import { isObject } from '@stryke/type-checks/is-object';
|
|
60
60
|
import { isDirectory } from '@stryke/fs/is-file';
|
|
61
61
|
import { readFile } from '@stryke/fs/read-file';
|
|
62
|
-
import {
|
|
62
|
+
import { parseVersion } from '@stryke/fs/semver-fns';
|
|
63
63
|
import { getParentPath } from '@stryke/path/get-parent-path';
|
|
64
64
|
import path from 'node:path';
|
|
65
65
|
import { hasPackageVersion, getPackageName, getPackageVersion } from '@stryke/string-format/package';
|
|
@@ -1289,16 +1289,23 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
1289
1289
|
static async from(workspaceRoot, config) {
|
|
1290
1290
|
const context = new _PowerlinesContext(await loadWorkspaceConfig(workspaceRoot, config.root));
|
|
1291
1291
|
await context.withUserConfig(config);
|
|
1292
|
-
context.
|
|
1293
|
-
if (!context.
|
|
1294
|
-
throw new Error("Could not resolve powerlines package location.");
|
|
1292
|
+
context.powerlinesPath = await resolvePackage("powerlines");
|
|
1293
|
+
if (!context.powerlinesPath) {
|
|
1294
|
+
throw new Error("Could not resolve `powerlines` package location.");
|
|
1295
1295
|
}
|
|
1296
1296
|
return context;
|
|
1297
1297
|
}
|
|
1298
|
+
/**
|
|
1299
|
+
* An object containing the dependencies that should be installed for the project
|
|
1300
|
+
*/
|
|
1298
1301
|
dependencies = {};
|
|
1302
|
+
/**
|
|
1303
|
+
* An object containing the development dependencies that should be installed for the project
|
|
1304
|
+
*/
|
|
1305
|
+
devDependencies = {};
|
|
1299
1306
|
reflections = {};
|
|
1300
1307
|
persistedMeta = void 0;
|
|
1301
|
-
|
|
1308
|
+
powerlinesPath;
|
|
1302
1309
|
packageJson;
|
|
1303
1310
|
projectJson = void 0;
|
|
1304
1311
|
resolver;
|
|
@@ -1388,7 +1395,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
1388
1395
|
* Get the path to the artifacts directory for the project
|
|
1389
1396
|
*/
|
|
1390
1397
|
get artifactsPath() {
|
|
1391
|
-
return joinPaths$1(this.workspaceConfig.workspaceRoot, this.config.projectRoot,
|
|
1398
|
+
return joinPaths$1(this.workspaceConfig.workspaceRoot, this.config.projectRoot, this.config.output.artifactsFolder);
|
|
1392
1399
|
}
|
|
1393
1400
|
/**
|
|
1394
1401
|
* Get the path to the builtin modules used by the project
|
|
@@ -1574,7 +1581,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
1574
1581
|
mode: "virtual",
|
|
1575
1582
|
dts: joinPaths$1(cacheKey.projectRoot, `${config.framework ?? "powerlines"}.d.ts`),
|
|
1576
1583
|
builtinPrefix: config.framework ?? "powerlines",
|
|
1577
|
-
|
|
1584
|
+
artifactsFolder: joinPaths$1(cacheKey.projectRoot, `.${config.framework ?? "powerlines"}`),
|
|
1578
1585
|
assets: [
|
|
1579
1586
|
{
|
|
1580
1587
|
glob: "LICENSE"
|
|
@@ -1788,9 +1795,9 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
1788
1795
|
static async fromConfig(workspaceConfig, config) {
|
|
1789
1796
|
const context = new _PowerlinesEnvironmentContext(config, workspaceConfig);
|
|
1790
1797
|
await context.init();
|
|
1791
|
-
context.
|
|
1792
|
-
if (!context.
|
|
1793
|
-
throw new Error("Could not resolve powerlines package location.");
|
|
1798
|
+
context.powerlinesPath = await resolvePackage("powerlines");
|
|
1799
|
+
if (!context.powerlinesPath) {
|
|
1800
|
+
throw new Error("Could not resolve `powerlines` package location.");
|
|
1794
1801
|
}
|
|
1795
1802
|
return context;
|
|
1796
1803
|
}
|
|
@@ -1908,9 +1915,9 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
1908
1915
|
static async from(workspaceRoot, config) {
|
|
1909
1916
|
const context = new _PowerlinesAPIContext(await loadWorkspaceConfig(workspaceRoot, config.root));
|
|
1910
1917
|
await context.withUserConfig(config);
|
|
1911
|
-
context.
|
|
1912
|
-
if (!context.
|
|
1913
|
-
throw new Error("Could not resolve powerlines package location.");
|
|
1918
|
+
context.powerlinesPath = await resolvePackage("powerlines");
|
|
1919
|
+
if (!context.powerlinesPath) {
|
|
1920
|
+
throw new Error("Could not resolve `powerlines` package location.");
|
|
1914
1921
|
}
|
|
1915
1922
|
return context;
|
|
1916
1923
|
}
|
|
@@ -2016,7 +2023,7 @@ async function installPackage(context, packageName, dev = false) {
|
|
|
2016
2023
|
} else {
|
|
2017
2024
|
context.log(LogLevelLabel.WARN, `The package "${packageName}" is not installed. Since the "skipInstalls" option is set to true, it will not be installed automatically.`);
|
|
2018
2025
|
}
|
|
2019
|
-
} else if (hasPackageVersion(packageName) && !process.env.
|
|
2026
|
+
} else if (hasPackageVersion(packageName) && !process.env.POWERLINES_SKIP_VERSION_CHECK) {
|
|
2020
2027
|
const isMatching = await doesPackageMatch(getPackageName(packageName), getPackageVersion(packageName), context.config.projectRoot);
|
|
2021
2028
|
if (!isMatching) {
|
|
2022
2029
|
const packageListing = await getPackageListing(getPackageName(packageName), {
|
|
@@ -2597,20 +2604,14 @@ __name(generateTypes, "generateTypes");
|
|
|
2597
2604
|
async function installDependencies(context) {
|
|
2598
2605
|
context.log(LogLevelLabel.TRACE, `Checking and installing missing project dependencies.`);
|
|
2599
2606
|
context.dependencies ??= {};
|
|
2600
|
-
context.dependencies
|
|
2601
|
-
type: "dependency"
|
|
2602
|
-
};
|
|
2607
|
+
context.dependencies.powerlines = "latest";
|
|
2603
2608
|
if (context.config.projectType === "application") {
|
|
2604
|
-
context.dependencies.unstorage =
|
|
2605
|
-
type: "dependency"
|
|
2606
|
-
};
|
|
2607
|
-
}
|
|
2608
|
-
context.log(LogLevelLabel.TRACE, `The following packages must be installed as dependencies:
|
|
2609
|
-
${Object.keys(context.dependencies).map((key) => ` - ${getPackageName(key)}${hasPackageVersion(key) || isSetObject(context.dependencies[key]) && isSetString(context.dependencies[key].version) ? ` v${isSetObject(context.dependencies[key]) && isSetString(context.dependencies[key].version) ? context.dependencies[key].version : getPackageVersion(key)}` : ""} (${(isString(context.dependencies[key]) ? context.dependencies[key] : context.dependencies[key]?.type) || "dependency"})`).join("\n")}`);
|
|
2610
|
-
for (const [key, value] of Object.entries(context.dependencies)) {
|
|
2611
|
-
const version = isSetObject(value) && isValidRange(value.version) && value.version || getPackageVersion(key);
|
|
2612
|
-
await installPackage(context, version ? `${getPackageName(key)}@${String(version)}` : getPackageName(key), (isSetString(value) ? value : value.type) === "devDependency");
|
|
2609
|
+
context.dependencies.unstorage = "latest";
|
|
2613
2610
|
}
|
|
2611
|
+
await Promise.all([
|
|
2612
|
+
Promise.all(Object.entries(context.dependencies).map(async ([name, version]) => installPackage(context, `${getPackageName(name)}@${String(version)}`, false))),
|
|
2613
|
+
Promise.all(Object.entries(context.devDependencies).map(async ([name, version]) => installPackage(context, `${getPackageName(name)}@${String(version)}`, true)))
|
|
2614
|
+
]);
|
|
2614
2615
|
}
|
|
2615
2616
|
__name(installDependencies, "installDependencies");
|
|
2616
2617
|
async function resolveTsconfigChanges(context) {
|
|
@@ -2922,7 +2923,7 @@ ${formatLogMessage(context.config)}`);
|
|
|
2922
2923
|
await this.#executeEnvironments(async (context) => {
|
|
2923
2924
|
context.log(LogLevelLabel.TRACE, `Initializing the processing options for the Powerlines project.`);
|
|
2924
2925
|
await this.callPreHook(context, "new");
|
|
2925
|
-
const files = await listFiles(joinPaths(context.
|
|
2926
|
+
const files = await listFiles(joinPaths(context.powerlinesPath, "files/common/**/*.hbs"));
|
|
2926
2927
|
for (const file of files) {
|
|
2927
2928
|
context.log(LogLevelLabel.TRACE, `Adding template file: ${file}`);
|
|
2928
2929
|
const template = Handlebars.compile(file);
|
|
@@ -2930,14 +2931,14 @@ ${formatLogMessage(context.config)}`);
|
|
|
2930
2931
|
}
|
|
2931
2932
|
await this.callNormalHook(context, "new");
|
|
2932
2933
|
if (context.config.projectType === "application") {
|
|
2933
|
-
const files2 = await listFiles(joinPaths(context.
|
|
2934
|
+
const files2 = await listFiles(joinPaths(context.powerlinesPath, "files/application/**/*.hbs"));
|
|
2934
2935
|
for (const file of files2) {
|
|
2935
2936
|
context.log(LogLevelLabel.TRACE, `Adding application template file: ${file}`);
|
|
2936
2937
|
const template = Handlebars.compile(file);
|
|
2937
2938
|
await writeFile(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
2938
2939
|
}
|
|
2939
2940
|
} else {
|
|
2940
|
-
const files2 = await listFiles(joinPaths(context.
|
|
2941
|
+
const files2 = await listFiles(joinPaths(context.powerlinesPath, "files/library/**/*.hbs"));
|
|
2941
2942
|
for (const file of files2) {
|
|
2942
2943
|
context.log(LogLevelLabel.TRACE, `Adding library template file: ${file}`);
|
|
2943
2944
|
const template = Handlebars.compile(file);
|
|
@@ -3444,5 +3445,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
3444
3445
|
__name(createUnpluginFactory, "createUnpluginFactory");
|
|
3445
3446
|
|
|
3446
3447
|
export { createUnpluginFactory };
|
|
3447
|
-
//# sourceMappingURL=chunk-
|
|
3448
|
-
//# sourceMappingURL=chunk-
|
|
3448
|
+
//# sourceMappingURL=chunk-VGGQJDIU.js.map
|
|
3449
|
+
//# sourceMappingURL=chunk-VGGQJDIU.js.map
|