@powerlines/nx 0.11.220 → 0.11.222
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/CHANGELOG.md +21 -0
- package/dist/{chunk-E3WT4AQR.js → chunk-3SNFDQEM.js} +2 -2
- package/dist/{chunk-Z5G2DQQE.mjs → chunk-5DJ7NANG.mjs} +1 -1
- package/dist/{chunk-TUMRUZ4M.js → chunk-5NTN2EU4.js} +2 -2
- package/dist/{chunk-OX5V5IMP.mjs → chunk-7JSSYBGU.mjs} +1 -1
- package/dist/{chunk-HNRM52ID.js → chunk-ADMWJVSB.js} +31 -31
- package/dist/{chunk-CON4PH6V.js → chunk-JMPYKLTR.js} +2 -2
- package/dist/{chunk-OBQF6HPF.mjs → chunk-JNVDFQTY.mjs} +2 -2
- package/dist/{chunk-GJ62I4AV.js → chunk-NXR5JH7F.js} +2 -2
- package/dist/{chunk-5UVD555E.js → chunk-O7Z4RX77.js} +30 -30
- package/dist/{chunk-6TYW2FMC.js → chunk-OFHFZ5IV.js} +2 -2
- package/dist/{chunk-KWMCNI6Q.mjs → chunk-PM55S4AK.mjs} +1 -1
- package/dist/{chunk-IA3YWWWC.mjs → chunk-RLYU2FOM.mjs} +29 -29
- package/dist/{chunk-QN6ZKFPV.mjs → chunk-SQV3SFA4.mjs} +1 -1
- package/dist/{chunk-5VLSWKPN.mjs → chunk-U4JIT4YZ.mjs} +1 -1
- package/dist/{chunk-RBM4GHDX.mjs → chunk-VYOHHZ4P.mjs} +1 -1
- package/dist/{chunk-TSCKHENO.js → chunk-X666OUXC.js} +2 -2
- package/dist/executors.js +12 -12
- package/dist/executors.mjs +7 -7
- package/dist/index.js +15 -15
- package/dist/index.mjs +9 -9
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/executors/build/executor.js +5 -5
- package/dist/src/executors/build/executor.mjs +3 -3
- package/dist/src/executors/clean/executor.js +5 -5
- package/dist/src/executors/clean/executor.mjs +3 -3
- package/dist/src/executors/docs/executor.js +5 -5
- package/dist/src/executors/docs/executor.mjs +3 -3
- package/dist/src/executors/lint/executor.js +5 -5
- package/dist/src/executors/lint/executor.mjs +3 -3
- package/dist/src/executors/prepare/executor.js +5 -5
- package/dist/src/executors/prepare/executor.mjs +3 -3
- package/dist/src/helpers/plugin-utilities.d.mts +0 -9
- package/dist/src/helpers/plugin-utilities.d.ts +0 -9
- package/dist/src/helpers/plugin-utilities.js +5 -5
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/plugin/index.js +4 -4
- package/dist/src/plugin/index.mjs +3 -3
- package/dist/src/types/plugin.d.mts +15 -6
- package/dist/src/types/plugin.d.ts +15 -6
- package/package.json +11 -11
- /package/dist/{chunk-FSGRYCTL.js → chunk-RLODK6TM.js} +0 -0
- /package/dist/{chunk-JL4HQ7ZD.mjs → chunk-W75JGXP2.mjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.11.221](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.221) (02/28/2026)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **nx:** Added formatting to plugin verbose logging ([babaea49a](https://github.com/storm-software/powerlines/commit/babaea49a))
|
|
10
|
+
- **powerlines:** Clean up build plugin peer dependency versions ([c9c7d0c1f](https://github.com/storm-software/powerlines/commit/c9c7d0c1f))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **nx:** Resolved issues with verbose Nx plugin options ([b91e1ad52](https://github.com/storm-software/powerlines/commit/b91e1ad52))
|
|
15
|
+
|
|
16
|
+
### Updated Dependencies
|
|
17
|
+
|
|
18
|
+
- Updated **powerlines** to **v0.39.2**
|
|
19
|
+
|
|
20
|
+
## [0.11.220](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.220) (02/28/2026)
|
|
21
|
+
|
|
22
|
+
### Miscellaneous
|
|
23
|
+
|
|
24
|
+
- **nx:** Small change to default value comment ([db243fb81](https://github.com/storm-software/powerlines/commit/db243fb81))
|
|
25
|
+
|
|
5
26
|
## [0.11.219](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.219) (02/28/2026)
|
|
6
27
|
|
|
7
28
|
### Miscellaneous
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkO7Z4RX77_js = require('./chunk-O7Z4RX77.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
var defu = require('defu');
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
22
|
-
var executor =
|
|
22
|
+
var executor = chunkO7Z4RX77_js.withExecutor("prepare", executorFn);
|
|
23
23
|
var executor_default = executor;
|
|
24
24
|
|
|
25
25
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkO7Z4RX77_js = require('./chunk-O7Z4RX77.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/docs/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkO7Z4RX77_js.withExecutor("docs", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRLODK6TM_js = require('./chunk-RLODK6TM.js');
|
|
4
4
|
var chunkIQVSZEQ6_js = require('./chunk-IQVSZEQ6.js');
|
|
5
5
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
6
6
|
var devkit = require('@nx/devkit');
|
|
@@ -34,18 +34,19 @@ function getNxPluginInputs(framework) {
|
|
|
34
34
|
}
|
|
35
35
|
chunkSHUYVCID_js.__name(getNxPluginInputs, "getNxPluginInputs");
|
|
36
36
|
function createNxPlugin(opts) {
|
|
37
|
+
const framework = opts?.framework || "powerlines";
|
|
38
|
+
const title = `${titleCase.titleCase(framework)} Nx Plugin`;
|
|
37
39
|
try {
|
|
38
|
-
const framework = opts?.framework || "powerlines";
|
|
39
40
|
const name = opts?.name || `${framework}/nx/plugin`;
|
|
40
41
|
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
41
42
|
const targetInputs = getNxTargetInputs(framework);
|
|
42
43
|
const pluginInputs = getNxPluginInputs(framework);
|
|
43
|
-
if (opts?.verboseOutput) {
|
|
44
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase.titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
45
|
-
}
|
|
46
44
|
return [
|
|
47
45
|
pluginInputs,
|
|
48
46
|
async (configFiles, options, contextV2) => {
|
|
47
|
+
if (options?.verboseOutput) {
|
|
48
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
|
|
49
|
+
}
|
|
49
50
|
const envPaths = getEnvPaths.getEnvPaths({
|
|
50
51
|
orgId: "storm-software",
|
|
51
52
|
appId: framework,
|
|
@@ -59,7 +60,7 @@ function createNxPlugin(opts) {
|
|
|
59
60
|
debug: !!options?.debug,
|
|
60
61
|
interopDefault: true,
|
|
61
62
|
fsCache: joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
|
|
62
|
-
maxLength:
|
|
63
|
+
maxLength: chunkRLODK6TM_js.ROOT_HASH_LENGTH
|
|
63
64
|
}), "jiti"),
|
|
64
65
|
moduleCache: true
|
|
65
66
|
});
|
|
@@ -67,44 +68,44 @@ function createNxPlugin(opts) {
|
|
|
67
68
|
try {
|
|
68
69
|
const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
69
70
|
if (!projectRoot) {
|
|
70
|
-
console.error(`[${
|
|
71
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
71
72
|
return {};
|
|
72
73
|
}
|
|
73
74
|
const root = pluginHelpers.getRoot(projectRoot, context);
|
|
74
|
-
if (
|
|
75
|
-
console.debug(`[${
|
|
75
|
+
if (options?.verboseOutput) {
|
|
76
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
76
77
|
}
|
|
77
|
-
const userConfig = await
|
|
78
|
+
const userConfig = await chunkRLODK6TM_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
78
79
|
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
79
|
-
if (
|
|
80
|
-
console.warn(`[${
|
|
80
|
+
if (options?.verboseOutput) {
|
|
81
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
81
82
|
}
|
|
82
83
|
return {};
|
|
83
84
|
}
|
|
84
85
|
const packageJsonContent = await promises.readFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
85
86
|
if (!packageJsonContent) {
|
|
86
|
-
if (
|
|
87
|
-
console.warn(`[${
|
|
87
|
+
if (options?.verboseOutput) {
|
|
88
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
88
89
|
}
|
|
89
90
|
return {};
|
|
90
91
|
}
|
|
91
92
|
const packageJson = JSON.parse(packageJsonContent);
|
|
92
93
|
if (!userConfig.configFile && !packageJson?.storm) {
|
|
93
|
-
if (
|
|
94
|
-
console.debug(`[${
|
|
94
|
+
if (options?.verboseOutput) {
|
|
95
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
95
96
|
}
|
|
96
97
|
return {};
|
|
97
98
|
}
|
|
98
99
|
const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
99
100
|
if (!projectConfig) {
|
|
100
|
-
if (
|
|
101
|
-
console.warn(`[${
|
|
101
|
+
if (options?.verboseOutput) {
|
|
102
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
102
103
|
}
|
|
103
104
|
return {};
|
|
104
105
|
}
|
|
105
106
|
const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
|
|
106
|
-
if (
|
|
107
|
-
console.debug(`[${
|
|
107
|
+
if (options?.verboseOutput) {
|
|
108
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
108
109
|
}
|
|
109
110
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
110
111
|
targets[options?.clean?.targetName || "clean"] = {
|
|
@@ -336,8 +337,8 @@ function createNxPlugin(opts) {
|
|
|
336
337
|
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
|
|
337
338
|
overwrite: true
|
|
338
339
|
});
|
|
339
|
-
if (
|
|
340
|
-
console.debug(`[${
|
|
340
|
+
if (options?.verboseOutput) {
|
|
341
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
341
342
|
}
|
|
342
343
|
return {
|
|
343
344
|
projects: {
|
|
@@ -351,20 +352,19 @@ function createNxPlugin(opts) {
|
|
|
351
352
|
}
|
|
352
353
|
};
|
|
353
354
|
} catch (error) {
|
|
354
|
-
console.error(`[${
|
|
355
|
-
|
|
355
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
|
|
356
|
+
throw new Error(`The ${title} failed to process the project configuration for file ${configFile}. See previous logs for more details.`, {
|
|
357
|
+
cause: error instanceof Error ? error : void 0
|
|
358
|
+
});
|
|
356
359
|
}
|
|
357
360
|
}, configFiles, options, contextV2);
|
|
358
361
|
}
|
|
359
362
|
];
|
|
360
363
|
} catch (error) {
|
|
361
|
-
console.error(`[${
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
return [];
|
|
366
|
-
}
|
|
367
|
-
];
|
|
364
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
365
|
+
throw new Error(`Failed to initialize the ${title}. See previous logs for more details.`, {
|
|
366
|
+
cause: error instanceof Error ? error : void 0
|
|
367
|
+
});
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
chunkSHUYVCID_js.__name(createNxPlugin, "createNxPlugin");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkO7Z4RX77_js = require('./chunk-O7Z4RX77.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/clean/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkO7Z4RX77_js.withExecutor("clean", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { replacePathTokens, extendLog, format, loadWorkspaceConfig, resolveEntriesSync, CACHE_HASH_LENGTH, ROOT_HASH_LENGTH, createLog, loadUserConfigFile, getUniqueInputs, GLOBAL_ENVIRONMENT, getFileHeader, formatFolder, DEFAULT_ENVIRONMENT } from './chunk-
|
|
1
|
+
import { replacePathTokens, extendLog, format, loadWorkspaceConfig, resolveEntriesSync, CACHE_HASH_LENGTH, ROOT_HASH_LENGTH, createLog, loadUserConfigFile, getUniqueInputs, GLOBAL_ENVIRONMENT, getFileHeader, formatFolder, DEFAULT_ENVIRONMENT } from './chunk-W75JGXP2.mjs';
|
|
2
2
|
import { __name } from './chunk-O6YSETKJ.mjs';
|
|
3
3
|
import { writeError } from '@storm-software/config-tools/logger';
|
|
4
4
|
import { withRunExecutor } from '@storm-software/workspace-tools/base/base-executor';
|
|
@@ -74,7 +74,7 @@ import 'unplugin';
|
|
|
74
74
|
|
|
75
75
|
// ../powerlines/package.json
|
|
76
76
|
var package_default = {
|
|
77
|
-
version: "0.39.
|
|
77
|
+
version: "0.39.2"};
|
|
78
78
|
var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
|
|
79
79
|
static {
|
|
80
80
|
__name(this, "VirtualFileSystemHost");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkADMWJVSB_js = require('./chunk-ADMWJVSB.js');
|
|
4
4
|
|
|
5
5
|
// src/plugin/index.ts
|
|
6
|
-
var createNodesV2 =
|
|
6
|
+
var createNodesV2 = chunkADMWJVSB_js.createNxPlugin({
|
|
7
7
|
framework: "powerlines"
|
|
8
8
|
});
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRLODK6TM_js = require('./chunk-RLODK6TM.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
var logger = require('@storm-software/config-tools/logger');
|
|
6
6
|
var baseExecutor = require('@storm-software/workspace-tools/base/base-executor');
|
|
@@ -102,7 +102,7 @@ var $__namespace = /*#__PURE__*/_interopNamespace($);
|
|
|
102
102
|
|
|
103
103
|
// ../powerlines/package.json
|
|
104
104
|
var package_default = {
|
|
105
|
-
version: "0.39.
|
|
105
|
+
version: "0.39.2"};
|
|
106
106
|
var VirtualFileSystemHost = class extends tsMorph.InMemoryFileSystemHost {
|
|
107
107
|
static {
|
|
108
108
|
chunkSHUYVCID_js.__name(this, "VirtualFileSystemHost");
|
|
@@ -602,7 +602,7 @@ ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${
|
|
|
602
602
|
chunkSHUYVCID_js.__name(installDependencies, "installDependencies");
|
|
603
603
|
function getPrefixedRootHash(name, rootHash) {
|
|
604
604
|
const combined = `${kebabCase.kebabCase(name)}_${rootHash}`;
|
|
605
|
-
return combined.length >
|
|
605
|
+
return combined.length > chunkRLODK6TM_js.ROOT_HASH_LENGTH ? combined.slice(0, chunkRLODK6TM_js.ROOT_HASH_LENGTH) : combined;
|
|
606
606
|
}
|
|
607
607
|
chunkSHUYVCID_js.__name(getPrefixedRootHash, "getPrefixedRootHash");
|
|
608
608
|
async function writeMetaFile(context) {
|
|
@@ -861,7 +861,7 @@ function createEnvironment(name, userConfig) {
|
|
|
861
861
|
}
|
|
862
862
|
chunkSHUYVCID_js.__name(createEnvironment, "createEnvironment");
|
|
863
863
|
function createDefaultEnvironment(userConfig) {
|
|
864
|
-
return createEnvironment(
|
|
864
|
+
return createEnvironment(chunkRLODK6TM_js.DEFAULT_ENVIRONMENT, userConfig);
|
|
865
865
|
}
|
|
866
866
|
chunkSHUYVCID_js.__name(createDefaultEnvironment, "createDefaultEnvironment");
|
|
867
867
|
function resolveOptions(options) {
|
|
@@ -1654,7 +1654,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1654
1654
|
* @returns The normalized path.
|
|
1655
1655
|
*/
|
|
1656
1656
|
#normalizePath(path) {
|
|
1657
|
-
return normalizePath(path.includes("{") || path.includes("}") ?
|
|
1657
|
+
return normalizePath(path.includes("{") || path.includes("}") ? chunkRLODK6TM_js.replacePathTokens(this.#context, path) : path, this.#context.builtinsPath, this.#context.config.framework);
|
|
1658
1658
|
}
|
|
1659
1659
|
/**
|
|
1660
1660
|
* Gets the storage adapter and relative key for a given key.
|
|
@@ -1943,7 +1943,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1943
1943
|
return ret;
|
|
1944
1944
|
}, {});
|
|
1945
1945
|
}
|
|
1946
|
-
this.#log =
|
|
1946
|
+
this.#log = chunkRLODK6TM_js.extendLog(this.#context.log, "file-system");
|
|
1947
1947
|
}
|
|
1948
1948
|
/**
|
|
1949
1949
|
* Asynchronously checks if a file exists in the virtual file system (VFS).
|
|
@@ -2308,7 +2308,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2308
2308
|
let code = data;
|
|
2309
2309
|
try {
|
|
2310
2310
|
if (!options.skipFormat) {
|
|
2311
|
-
code = await
|
|
2311
|
+
code = await chunkRLODK6TM_js.format(this.#context, resolvedPath, data);
|
|
2312
2312
|
}
|
|
2313
2313
|
} catch (err) {
|
|
2314
2314
|
if ([
|
|
@@ -2453,7 +2453,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2453
2453
|
async resolve(id, importer, options = {}) {
|
|
2454
2454
|
let path = id;
|
|
2455
2455
|
if (path.includes("{") || path.includes("}")) {
|
|
2456
|
-
path =
|
|
2456
|
+
path = chunkRLODK6TM_js.replacePathTokens(this.#context, path);
|
|
2457
2457
|
}
|
|
2458
2458
|
if (options.skipAlias !== true) {
|
|
2459
2459
|
path = this.resolveAlias(path);
|
|
@@ -2526,7 +2526,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2526
2526
|
resolveSync(id, importer, options = {}) {
|
|
2527
2527
|
let path = id;
|
|
2528
2528
|
if (path.includes("{") || path.includes("}")) {
|
|
2529
|
-
path =
|
|
2529
|
+
path = chunkRLODK6TM_js.replacePathTokens(this.#context, path);
|
|
2530
2530
|
}
|
|
2531
2531
|
if (options.skipAlias !== true) {
|
|
2532
2532
|
path = this.resolveAlias(path);
|
|
@@ -2722,7 +2722,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2722
2722
|
* @returns A promise that resolves to the new context.
|
|
2723
2723
|
*/
|
|
2724
2724
|
static async from(workspaceRoot, config) {
|
|
2725
|
-
const context = new _PowerlinesContext(await
|
|
2725
|
+
const context = new _PowerlinesContext(await chunkRLODK6TM_js.loadWorkspaceConfig(workspaceRoot, config.root));
|
|
2726
2726
|
await context.withUserConfig(config);
|
|
2727
2727
|
const powerlinesPath = await resolve.resolvePackage("powerlines");
|
|
2728
2728
|
if (!powerlinesPath) {
|
|
@@ -2790,7 +2790,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2790
2790
|
*/
|
|
2791
2791
|
get entry() {
|
|
2792
2792
|
const entry = this.resolvedEntry;
|
|
2793
|
-
return
|
|
2793
|
+
return chunkRLODK6TM_js.resolveEntriesSync(this, entry && entry.length > 0 ? entry : Array.isArray(this.config.input) || isSetObject.isSetObject(this.config.input) && !isRegexp.isRegExp(this.config.input) ? this.config.input : toArray.toArray(this.config.input));
|
|
2794
2794
|
}
|
|
2795
2795
|
/**
|
|
2796
2796
|
* The TypeScript configuration parsed from the tsconfig file
|
|
@@ -2838,10 +2838,10 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2838
2838
|
workspaceRoot: this.workspaceConfig?.workspaceRoot,
|
|
2839
2839
|
root: this.config?.root
|
|
2840
2840
|
}, {
|
|
2841
|
-
maxLength:
|
|
2841
|
+
maxLength: chunkRLODK6TM_js.ROOT_HASH_LENGTH
|
|
2842
2842
|
}),
|
|
2843
2843
|
configHash: murmurhash.murmurhash(this.config, {
|
|
2844
|
-
maxLength:
|
|
2844
|
+
maxLength: chunkRLODK6TM_js.CACHE_HASH_LENGTH
|
|
2845
2845
|
})
|
|
2846
2846
|
};
|
|
2847
2847
|
}
|
|
@@ -2922,7 +2922,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2922
2922
|
checksum: this.#checksum,
|
|
2923
2923
|
config: this.meta.configHash
|
|
2924
2924
|
}, {
|
|
2925
|
-
maxLength:
|
|
2925
|
+
maxLength: chunkRLODK6TM_js.CACHE_HASH_LENGTH
|
|
2926
2926
|
}));
|
|
2927
2927
|
}
|
|
2928
2928
|
/**
|
|
@@ -3450,7 +3450,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3450
3450
|
* @returns A logger function
|
|
3451
3451
|
*/
|
|
3452
3452
|
createLog(name = null) {
|
|
3453
|
-
return
|
|
3453
|
+
return chunkRLODK6TM_js.createLog(name, {
|
|
3454
3454
|
...this.config,
|
|
3455
3455
|
logLevel: isNull.isNull(this.config.logLevel) ? "silent" : this.config.logLevel
|
|
3456
3456
|
});
|
|
@@ -3462,7 +3462,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3462
3462
|
* @returns A logger function
|
|
3463
3463
|
*/
|
|
3464
3464
|
extendLog(name) {
|
|
3465
|
-
return
|
|
3465
|
+
return chunkRLODK6TM_js.extendLog(this.log, name);
|
|
3466
3466
|
}
|
|
3467
3467
|
/**
|
|
3468
3468
|
* Generates a checksum representing the current context state
|
|
@@ -3553,7 +3553,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3553
3553
|
return ret;
|
|
3554
3554
|
}, {}) : this.config.resolve.alias : {}
|
|
3555
3555
|
});
|
|
3556
|
-
const userConfig = await
|
|
3556
|
+
const userConfig = await chunkRLODK6TM_js.loadUserConfigFile(cacheKey.root, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
|
|
3557
3557
|
this.mergeUserConfig(userConfig.config);
|
|
3558
3558
|
configCache.set(cacheKey, {
|
|
3559
3559
|
projectJson: this.projectJson,
|
|
@@ -3610,7 +3610,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3610
3610
|
resolve: {}
|
|
3611
3611
|
});
|
|
3612
3612
|
}
|
|
3613
|
-
this.config.input =
|
|
3613
|
+
this.config.input = chunkRLODK6TM_js.getUniqueInputs(this.config.input);
|
|
3614
3614
|
if (this.config.name?.startsWith("@") && this.config.name.split("/").filter(Boolean).length > 1) {
|
|
3615
3615
|
this.config.name = this.config.name.split("/").filter(Boolean)[1];
|
|
3616
3616
|
}
|
|
@@ -3657,11 +3657,11 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3657
3657
|
return ret;
|
|
3658
3658
|
}, []);
|
|
3659
3659
|
if (this.config.tsconfig) {
|
|
3660
|
-
this.config.tsconfig =
|
|
3660
|
+
this.config.tsconfig = chunkRLODK6TM_js.replacePathTokens(this, this.config.tsconfig);
|
|
3661
3661
|
}
|
|
3662
3662
|
if (this.config.output.dts) {
|
|
3663
3663
|
if (isSetString.isSetString(this.config.output.dts)) {
|
|
3664
|
-
this.config.output.dts =
|
|
3664
|
+
this.config.output.dts = chunkRLODK6TM_js.replacePathTokens(this, this.config.output.dts);
|
|
3665
3665
|
} else {
|
|
3666
3666
|
this.config.output.dts = join.joinPaths(this.config.root, `${this.config.framework ?? "powerlines"}.d.ts`);
|
|
3667
3667
|
}
|
|
@@ -3669,10 +3669,10 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3669
3669
|
if (this.config.output.assets) {
|
|
3670
3670
|
this.config.output.assets = this.config.output.assets.map((asset) => ({
|
|
3671
3671
|
...asset,
|
|
3672
|
-
glob:
|
|
3673
|
-
ignore: asset.ignore ? asset.ignore.map((ignore) =>
|
|
3674
|
-
input:
|
|
3675
|
-
output:
|
|
3672
|
+
glob: chunkRLODK6TM_js.replacePathTokens(this, asset.glob),
|
|
3673
|
+
ignore: asset.ignore ? asset.ignore.map((ignore) => chunkRLODK6TM_js.replacePathTokens(this, ignore)) : void 0,
|
|
3674
|
+
input: chunkRLODK6TM_js.replacePathTokens(this, asset.input),
|
|
3675
|
+
output: chunkRLODK6TM_js.replacePathTokens(this, asset.output)
|
|
3676
3676
|
}));
|
|
3677
3677
|
}
|
|
3678
3678
|
this.#fs ??= await VirtualFileSystem.create(this);
|
|
@@ -4021,7 +4021,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4021
4021
|
* @returns A promise that resolves to the new context.
|
|
4022
4022
|
*/
|
|
4023
4023
|
static async from(workspaceRoot, config) {
|
|
4024
|
-
const context = new _PowerlinesAPIContext(await
|
|
4024
|
+
const context = new _PowerlinesAPIContext(await chunkRLODK6TM_js.loadWorkspaceConfig(workspaceRoot, config.root));
|
|
4025
4025
|
await context.withUserConfig(config);
|
|
4026
4026
|
const powerlinesPath = await resolve.resolvePackage("powerlines");
|
|
4027
4027
|
if (!powerlinesPath) {
|
|
@@ -4192,7 +4192,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4192
4192
|
async toEnvironment() {
|
|
4193
4193
|
let environment;
|
|
4194
4194
|
if (Object.keys(this.environments).length > 1) {
|
|
4195
|
-
environment = await this.in(createEnvironment(
|
|
4195
|
+
environment = await this.in(createEnvironment(chunkRLODK6TM_js.GLOBAL_ENVIRONMENT, this.config.userConfig));
|
|
4196
4196
|
this.debug(`Combined all ${Object.keys(this.environments).length} environments into a single global context.`);
|
|
4197
4197
|
} else {
|
|
4198
4198
|
environment = await this.getEnvironment();
|
|
@@ -4392,7 +4392,7 @@ ${console.formatLogMessage({
|
|
|
4392
4392
|
if (isSetString.isSetString(types?.trim()) || directives.length > 0) {
|
|
4393
4393
|
await context.fs.write(context.dtsPath, `${directives.length > 0 ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4394
4394
|
|
|
4395
|
-
` : ""}${
|
|
4395
|
+
` : ""}${chunkRLODK6TM_js.getFileHeader(context, {
|
|
4396
4396
|
directive: null,
|
|
4397
4397
|
prettierIgnore: false
|
|
4398
4398
|
})}
|
|
@@ -4414,8 +4414,8 @@ ${formatTypes(types)}
|
|
|
4414
4414
|
}
|
|
4415
4415
|
this.context.debug("Formatting files generated during the prepare step.");
|
|
4416
4416
|
await Promise.all([
|
|
4417
|
-
|
|
4418
|
-
|
|
4417
|
+
chunkRLODK6TM_js.formatFolder(context, context.builtinsPath),
|
|
4418
|
+
chunkRLODK6TM_js.formatFolder(context, context.entryPath)
|
|
4419
4419
|
]);
|
|
4420
4420
|
await this.callHook("prepare", {
|
|
4421
4421
|
environment: context,
|
|
@@ -4639,7 +4639,7 @@ ${formatTypes(types)}
|
|
|
4639
4639
|
order: "pre"
|
|
4640
4640
|
});
|
|
4641
4641
|
context.debug("Formatting the generated entry files before the build process starts.");
|
|
4642
|
-
await
|
|
4642
|
+
await chunkRLODK6TM_js.formatFolder(context, context.entryPath);
|
|
4643
4643
|
await this.callHook("build", {
|
|
4644
4644
|
environment: context,
|
|
4645
4645
|
order: "normal"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkO7Z4RX77_js = require('./chunk-O7Z4RX77.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/lint/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkO7Z4RX77_js.withExecutor("lint", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-
|
|
1
|
+
import { ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-W75JGXP2.mjs';
|
|
2
2
|
import { CONFIG_INPUTS } from './chunk-IC47MFKB.mjs';
|
|
3
3
|
import { __name } from './chunk-O6YSETKJ.mjs';
|
|
4
4
|
import { createNodesFromFiles } from '@nx/devkit';
|
|
@@ -28,18 +28,19 @@ function getNxPluginInputs(framework) {
|
|
|
28
28
|
}
|
|
29
29
|
__name(getNxPluginInputs, "getNxPluginInputs");
|
|
30
30
|
function createNxPlugin(opts) {
|
|
31
|
+
const framework = opts?.framework || "powerlines";
|
|
32
|
+
const title = `${titleCase(framework)} Nx Plugin`;
|
|
31
33
|
try {
|
|
32
|
-
const framework = opts?.framework || "powerlines";
|
|
33
34
|
const name = opts?.name || `${framework}/nx/plugin`;
|
|
34
35
|
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
35
36
|
const targetInputs = getNxTargetInputs(framework);
|
|
36
37
|
const pluginInputs = getNxPluginInputs(framework);
|
|
37
|
-
if (opts?.verboseOutput) {
|
|
38
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
39
|
-
}
|
|
40
38
|
return [
|
|
41
39
|
pluginInputs,
|
|
42
40
|
async (configFiles, options, contextV2) => {
|
|
41
|
+
if (options?.verboseOutput) {
|
|
42
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
|
|
43
|
+
}
|
|
43
44
|
const envPaths = getEnvPaths({
|
|
44
45
|
orgId: "storm-software",
|
|
45
46
|
appId: framework,
|
|
@@ -61,44 +62,44 @@ function createNxPlugin(opts) {
|
|
|
61
62
|
try {
|
|
62
63
|
const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
63
64
|
if (!projectRoot) {
|
|
64
|
-
console.error(`[${
|
|
65
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
65
66
|
return {};
|
|
66
67
|
}
|
|
67
68
|
const root = getRoot(projectRoot, context);
|
|
68
|
-
if (
|
|
69
|
-
console.debug(`[${
|
|
69
|
+
if (options?.verboseOutput) {
|
|
70
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
70
71
|
}
|
|
71
72
|
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
72
73
|
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
73
|
-
if (
|
|
74
|
-
console.warn(`[${
|
|
74
|
+
if (options?.verboseOutput) {
|
|
75
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
75
76
|
}
|
|
76
77
|
return {};
|
|
77
78
|
}
|
|
78
79
|
const packageJsonContent = await readFile(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
79
80
|
if (!packageJsonContent) {
|
|
80
|
-
if (
|
|
81
|
-
console.warn(`[${
|
|
81
|
+
if (options?.verboseOutput) {
|
|
82
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
82
83
|
}
|
|
83
84
|
return {};
|
|
84
85
|
}
|
|
85
86
|
const packageJson = JSON.parse(packageJsonContent);
|
|
86
87
|
if (!userConfig.configFile && !packageJson?.storm) {
|
|
87
|
-
if (
|
|
88
|
-
console.debug(`[${
|
|
88
|
+
if (options?.verboseOutput) {
|
|
89
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
89
90
|
}
|
|
90
91
|
return {};
|
|
91
92
|
}
|
|
92
93
|
const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
93
94
|
if (!projectConfig) {
|
|
94
|
-
if (
|
|
95
|
-
console.warn(`[${
|
|
95
|
+
if (options?.verboseOutput) {
|
|
96
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
96
97
|
}
|
|
97
98
|
return {};
|
|
98
99
|
}
|
|
99
100
|
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
100
|
-
if (
|
|
101
|
-
console.debug(`[${
|
|
101
|
+
if (options?.verboseOutput) {
|
|
102
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
102
103
|
}
|
|
103
104
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
104
105
|
targets[options?.clean?.targetName || "clean"] = {
|
|
@@ -330,8 +331,8 @@ function createNxPlugin(opts) {
|
|
|
330
331
|
addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
|
|
331
332
|
overwrite: true
|
|
332
333
|
});
|
|
333
|
-
if (
|
|
334
|
-
console.debug(`[${
|
|
334
|
+
if (options?.verboseOutput) {
|
|
335
|
+
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
335
336
|
}
|
|
336
337
|
return {
|
|
337
338
|
projects: {
|
|
@@ -345,20 +346,19 @@ function createNxPlugin(opts) {
|
|
|
345
346
|
}
|
|
346
347
|
};
|
|
347
348
|
} catch (error) {
|
|
348
|
-
console.error(`[${
|
|
349
|
-
|
|
349
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
|
|
350
|
+
throw new Error(`The ${title} failed to process the project configuration for file ${configFile}. See previous logs for more details.`, {
|
|
351
|
+
cause: error instanceof Error ? error : void 0
|
|
352
|
+
});
|
|
350
353
|
}
|
|
351
354
|
}, configFiles, options, contextV2);
|
|
352
355
|
}
|
|
353
356
|
];
|
|
354
357
|
} catch (error) {
|
|
355
|
-
console.error(`[${
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return [];
|
|
360
|
-
}
|
|
361
|
-
];
|
|
358
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
359
|
+
throw new Error(`Failed to initialize the ${title}. See previous logs for more details.`, {
|
|
360
|
+
cause: error instanceof Error ? error : void 0
|
|
361
|
+
});
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
__name(createNxPlugin, "createNxPlugin");
|