@powerlines/nx 0.10.26 → 0.10.28
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 +17 -0
- package/dist/{chunk-ACE6O62X.js → chunk-2PYUYDPD.js} +11 -11
- package/dist/{chunk-6WVDB4DZ.js → chunk-2YSHMNU6.js} +2 -2
- package/dist/{chunk-ONWCIW2E.mjs → chunk-5WHBT2BW.mjs} +1 -1
- package/dist/{chunk-PJYRCGK4.js → chunk-7E3PRE6W.js} +2 -2
- package/dist/{chunk-6UH4EGMN.mjs → chunk-DLZ7E67Y.mjs} +1 -1
- package/dist/{chunk-BXKPRYNH.mjs → chunk-DMX7BNND.mjs} +22 -14
- package/dist/{chunk-7TPTVC3S.js → chunk-GVA7U7C4.js} +2 -2
- package/dist/{chunk-2SFOQMAA.js → chunk-HLYNF7YE.js} +533 -654
- package/dist/{chunk-B5L3T46G.js → chunk-HVWVP6CD.js} +2 -2
- package/dist/{chunk-JPTGZQLU.js → chunk-MAMHMV35.js} +22 -14
- package/dist/{chunk-A26KXB6A.js → chunk-ND7VF7PZ.js} +2 -2
- package/dist/{chunk-4A6Y7MGQ.js → chunk-PM5JBU7Z.js} +2 -2
- package/dist/{chunk-IAWSQ5AX.mjs → chunk-QE2RQBEB.mjs} +527 -648
- package/dist/{chunk-Z22G7IM3.mjs → chunk-RIM7CNHX.mjs} +1 -1
- package/dist/{chunk-KCL7KVDF.mjs → chunk-VQX5TBLP.mjs} +1 -1
- package/dist/{chunk-X6GFPXO4.mjs → chunk-WGIN2BGP.mjs} +11 -11
- package/dist/{chunk-L46S3DXB.mjs → chunk-Y4WK22DY.mjs} +1 -1
- package/dist/{chunk-A7SAZMVH.mjs → chunk-ZIBEDH47.mjs} +1 -1
- package/dist/executors.js +14 -14
- package/dist/executors.mjs +7 -7
- package/dist/index.js +17 -17
- 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.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 +24 -0
- package/dist/src/types/plugin.d.ts +24 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.10.28](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.28) (11/21/2025)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **powerlines** to **v0.24.0**
|
|
10
|
+
|
|
11
|
+
## [0.10.27](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.27) (11/21/2025)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **powerlines:** Fix config file path resolution issue
|
|
16
|
+
([c201914](https://github.com/storm-software/powerlines/commit/c201914))
|
|
17
|
+
|
|
18
|
+
### Updated Dependencies
|
|
19
|
+
|
|
20
|
+
- Updated **powerlines** to **v0.23.10**
|
|
21
|
+
|
|
5
22
|
## [0.10.26](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.26) (11/20/2025)
|
|
6
23
|
|
|
7
24
|
### Bug Fixes
|
|
@@ -5,6 +5,7 @@ var getConfig = require('@storm-software/config-tools/get-config');
|
|
|
5
5
|
var exists = require('@stryke/fs/exists');
|
|
6
6
|
var append = require('@stryke/path/append');
|
|
7
7
|
var joinPaths = require('@stryke/path/join-paths');
|
|
8
|
+
var replace = require('@stryke/path/replace');
|
|
8
9
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
9
10
|
var isSetObject = require('@stryke/type-checks/is-set-object');
|
|
10
11
|
var c12 = require('c12');
|
|
@@ -13,7 +14,6 @@ var types = require('@storm-software/config-tools/types');
|
|
|
13
14
|
require('@stryke/fs/json');
|
|
14
15
|
require('@stryke/fs/list-files');
|
|
15
16
|
require('@stryke/fs/remove-file');
|
|
16
|
-
require('@stryke/hash/hash-files');
|
|
17
17
|
require('@stryke/helpers/get-unique');
|
|
18
18
|
require('@stryke/path/file-path-fns');
|
|
19
19
|
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
@@ -32,23 +32,23 @@ async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
34
34
|
chunkSHUYVCID_js.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
|
|
35
|
-
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode, configFile, framework = "powerlines") {
|
|
35
|
+
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
|
|
36
36
|
let resolvedUserConfig = {};
|
|
37
|
-
|
|
37
|
+
let resolvedUserConfigFile;
|
|
38
|
+
if (configFile) {
|
|
39
|
+
resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
|
|
40
|
+
}
|
|
41
|
+
if (!resolvedUserConfigFile) {
|
|
42
|
+
resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
43
|
+
}
|
|
38
44
|
if (resolvedUserConfigFile) {
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
resolvedPath = jiti.esmResolve(resolvedUserConfigFile);
|
|
42
|
-
} catch {
|
|
43
|
-
resolvedPath = resolvedUserConfigFile;
|
|
44
|
-
}
|
|
45
|
-
const resolved = await jiti.import(resolvedPath);
|
|
45
|
+
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
46
46
|
if (resolved) {
|
|
47
47
|
let config = {};
|
|
48
48
|
if (isFunction.isFunction(resolved)) {
|
|
49
49
|
config = await Promise.resolve(resolved({
|
|
50
50
|
command,
|
|
51
|
-
mode
|
|
51
|
+
mode,
|
|
52
52
|
isSsrBuild: false,
|
|
53
53
|
isPreview: false
|
|
54
54
|
}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMAMHMV35_js = require('./chunk-MAMHMV35.js');
|
|
4
4
|
|
|
5
5
|
// src/plugin/index.ts
|
|
6
|
-
var createNodesV2 =
|
|
6
|
+
var createNodesV2 = chunkMAMHMV35_js.createNxPlugin({
|
|
7
7
|
framework: "powerlines"
|
|
8
8
|
});
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHLYNF7YE_js = require('./chunk-HLYNF7YE.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 = chunkHLYNF7YE_js.withExecutor("clean", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-
|
|
1
|
+
import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-WGIN2BGP.mjs';
|
|
2
2
|
import { CONFIG_INPUTS } from './chunk-LQU7XWFP.mjs';
|
|
3
3
|
import { __name } from './chunk-O6YSETKJ.mjs';
|
|
4
4
|
import { createNodesFromFiles } from '@nx/devkit';
|
|
@@ -45,6 +45,14 @@ function createNxPlugin(opts) {
|
|
|
45
45
|
throw new Error("The cache directory could not be determined.");
|
|
46
46
|
}
|
|
47
47
|
const nxJson = readNxJson(contextV2.workspaceRoot);
|
|
48
|
+
const resolver = createJiti(contextV2.workspaceRoot, {
|
|
49
|
+
debug: !!options?.debug,
|
|
50
|
+
interopDefault: true,
|
|
51
|
+
fsCache: joinPaths(envPaths.cache, "nx-plugin", murmurhash(contextV2.workspaceRoot, {
|
|
52
|
+
maxLength: PROJECT_ROOT_HASH_LENGTH
|
|
53
|
+
}), "jiti"),
|
|
54
|
+
moduleCache: true
|
|
55
|
+
});
|
|
48
56
|
return createNodesFromFiles(async (configFile, _, context) => {
|
|
49
57
|
try {
|
|
50
58
|
const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
@@ -53,16 +61,10 @@ function createNxPlugin(opts) {
|
|
|
53
61
|
return {};
|
|
54
62
|
}
|
|
55
63
|
const root = getRoot(projectRoot, context);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
const
|
|
60
|
-
interopDefault: true,
|
|
61
|
-
fsCache: joinPaths(cacheDir, "jiti"),
|
|
62
|
-
moduleCache: true
|
|
63
|
-
});
|
|
64
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
65
|
-
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, jiti, "build", "development", configFile, framework);
|
|
64
|
+
if (options?.debug) {
|
|
65
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
66
|
+
}
|
|
67
|
+
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
66
68
|
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
67
69
|
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
68
70
|
return {};
|
|
@@ -74,7 +76,9 @@ function createNxPlugin(opts) {
|
|
|
74
76
|
}
|
|
75
77
|
const packageJson = JSON.parse(packageJsonContent);
|
|
76
78
|
if (!userConfig.configFile && !packageJson?.storm) {
|
|
77
|
-
|
|
79
|
+
if (options?.debug) {
|
|
80
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
81
|
+
}
|
|
78
82
|
return {};
|
|
79
83
|
}
|
|
80
84
|
const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
@@ -84,7 +88,9 @@ function createNxPlugin(opts) {
|
|
|
84
88
|
}
|
|
85
89
|
const tsconfig = userConfig?.tsconfig || (existsSync(joinPaths(projectRoot, "tsconfig.json")) ? joinPaths(projectRoot, "tsconfig.json") : void 0);
|
|
86
90
|
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
87
|
-
|
|
91
|
+
if (options?.debug) {
|
|
92
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
93
|
+
}
|
|
88
94
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
89
95
|
targets[options?.clean?.targetName || "clean"] = {
|
|
90
96
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [
|
|
@@ -314,7 +320,9 @@ function createNxPlugin(opts) {
|
|
|
314
320
|
addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.type || "library", {
|
|
315
321
|
overwrite: true
|
|
316
322
|
});
|
|
317
|
-
|
|
323
|
+
if (options?.debug) {
|
|
324
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
325
|
+
}
|
|
318
326
|
return {
|
|
319
327
|
projects: {
|
|
320
328
|
[root]: defu(projectConfig, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHLYNF7YE_js = require('./chunk-HLYNF7YE.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 = chunkHLYNF7YE_js.withExecutor("lint", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|