@powerlines/nx 0.10.13 → 0.10.15
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 +18 -0
- package/dist/{chunk-SZKZSA5V.js → chunk-FD6PSWBL.js} +17 -8
- package/dist/{chunk-VVM7GC35.mjs → chunk-TGJAQNLH.mjs} +17 -8
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/src/plugin/index.js +2 -2
- package/dist/src/plugin/index.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.10.15](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.15) (11/19/2025)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **nx:** Resolve issue reading `package.json` file in Nx plugin
|
|
10
|
+
([ce68929](https://github.com/storm-software/powerlines/commit/ce68929))
|
|
11
|
+
|
|
12
|
+
### Updated Dependencies
|
|
13
|
+
|
|
14
|
+
- Updated **powerlines** to **v0.22.1**
|
|
15
|
+
|
|
16
|
+
## [0.10.14](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.14) (11/19/2025)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **nx:** Resolve issue reading `package.json` file in Nx plugin
|
|
21
|
+
([ce68929](https://github.com/storm-software/powerlines/commit/ce68929))
|
|
22
|
+
|
|
5
23
|
## [0.10.13](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.13) (11/19/2025)
|
|
6
24
|
|
|
7
25
|
### Bug Fixes
|
|
@@ -8,7 +8,6 @@ var pluginHelpers = require('@storm-software/workspace-tools/utils/plugin-helper
|
|
|
8
8
|
var projectTags = require('@storm-software/workspace-tools/utils/project-tags');
|
|
9
9
|
var getEnvPaths = require('@stryke/env/get-env-paths');
|
|
10
10
|
var exists = require('@stryke/fs/exists');
|
|
11
|
-
var json = require('@stryke/fs/json');
|
|
12
11
|
var murmurhash = require('@stryke/hash/murmurhash');
|
|
13
12
|
var joinPaths = require('@stryke/path/join-paths');
|
|
14
13
|
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
@@ -16,6 +15,7 @@ var titleCase = require('@stryke/string-format/title-case');
|
|
|
16
15
|
var isError = require('@stryke/type-checks/is-error');
|
|
17
16
|
var defu = require('defu');
|
|
18
17
|
var jiti = require('jiti');
|
|
18
|
+
var promises = require('fs/promises');
|
|
19
19
|
var nxJson_js = require('nx/src/config/nx-json.js');
|
|
20
20
|
var packageJson_js = require('nx/src/utils/package-json.js');
|
|
21
21
|
|
|
@@ -67,7 +67,7 @@ function createNxPlugin(opts) {
|
|
|
67
67
|
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
68
68
|
const targetInputs = getNxTargetInputs(framework);
|
|
69
69
|
const pluginInputs = getNxPluginInputs(framework);
|
|
70
|
-
console.debug(`[${name}]
|
|
70
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase.titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
71
71
|
return [
|
|
72
72
|
pluginInputs,
|
|
73
73
|
async (configFiles, options, contextV2) => {
|
|
@@ -84,7 +84,7 @@ function createNxPlugin(opts) {
|
|
|
84
84
|
try {
|
|
85
85
|
const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
86
86
|
if (!projectRoot) {
|
|
87
|
-
console.error(`[${name}]
|
|
87
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
88
88
|
return {};
|
|
89
89
|
}
|
|
90
90
|
const root = pluginHelpers.getRoot(projectRoot, context);
|
|
@@ -97,14 +97,23 @@ function createNxPlugin(opts) {
|
|
|
97
97
|
moduleCache: true
|
|
98
98
|
});
|
|
99
99
|
const userConfig = await chunkLTCZN4I4_js.loadUserConfigFile(projectRoot, jiti$1, "build", "development", configFile, framework);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot))) {
|
|
101
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Project root directory does not exist (cannot find \`package.json\` file): ${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}`);
|
|
102
|
+
return {};
|
|
103
|
+
}
|
|
104
|
+
const packageJsonContent = await promises.readFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
105
|
+
if (!packageJsonContent) {
|
|
106
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
110
|
+
if (!userConfig.configFile && !packageJson?.storm) {
|
|
111
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
103
112
|
return {};
|
|
104
113
|
}
|
|
105
114
|
const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
106
115
|
if (!projectConfig) {
|
|
107
|
-
console.warn(`[${name}]
|
|
116
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
108
117
|
return {};
|
|
109
118
|
}
|
|
110
119
|
const tsconfig = userConfig?.tsconfig || (exists.existsSync(joinPaths.joinPaths(projectRoot, "tsconfig.json")) ? joinPaths.joinPaths(projectRoot, "tsconfig.json") : void 0);
|
|
@@ -309,7 +318,7 @@ function createNxPlugin(opts) {
|
|
|
309
318
|
}
|
|
310
319
|
};
|
|
311
320
|
} catch (error) {
|
|
312
|
-
console.error(`[${name}]
|
|
321
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
|
|
313
322
|
return {};
|
|
314
323
|
}
|
|
315
324
|
}, configFiles, options, contextV2);
|
|
@@ -6,7 +6,6 @@ import { getProjectRoot, getRoot, getProjectConfigFromProjectRoot } from '@storm
|
|
|
6
6
|
import { setDefaultProjectTags, addProjectTag } from '@storm-software/workspace-tools/utils/project-tags';
|
|
7
7
|
import { getEnvPaths } from '@stryke/env/get-env-paths';
|
|
8
8
|
import { existsSync } from '@stryke/fs/exists';
|
|
9
|
-
import { readJsonFileSync } from '@stryke/fs/json';
|
|
10
9
|
import { murmurhash } from '@stryke/hash/murmurhash';
|
|
11
10
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
12
11
|
import { kebabCase } from '@stryke/string-format/kebab-case';
|
|
@@ -14,6 +13,7 @@ import { titleCase } from '@stryke/string-format/title-case';
|
|
|
14
13
|
import { isError } from '@stryke/type-checks/is-error';
|
|
15
14
|
import defu from 'defu';
|
|
16
15
|
import { createJiti } from 'jiti';
|
|
16
|
+
import { readFile } from 'node:fs/promises';
|
|
17
17
|
import { readNxJson } from 'nx/src/config/nx-json.js';
|
|
18
18
|
import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
|
|
19
19
|
|
|
@@ -61,7 +61,7 @@ function createNxPlugin(opts) {
|
|
|
61
61
|
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
62
62
|
const targetInputs = getNxTargetInputs(framework);
|
|
63
63
|
const pluginInputs = getNxPluginInputs(framework);
|
|
64
|
-
console.debug(`[${name}]
|
|
64
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
65
65
|
return [
|
|
66
66
|
pluginInputs,
|
|
67
67
|
async (configFiles, options, contextV2) => {
|
|
@@ -78,7 +78,7 @@ function createNxPlugin(opts) {
|
|
|
78
78
|
try {
|
|
79
79
|
const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
80
80
|
if (!projectRoot) {
|
|
81
|
-
console.error(`[${name}]
|
|
81
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
82
82
|
return {};
|
|
83
83
|
}
|
|
84
84
|
const root = getRoot(projectRoot, context);
|
|
@@ -91,14 +91,23 @@ function createNxPlugin(opts) {
|
|
|
91
91
|
moduleCache: true
|
|
92
92
|
});
|
|
93
93
|
const userConfig = await loadUserConfigFile(projectRoot, jiti, "build", "development", configFile, framework);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot))) {
|
|
95
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Project root directory does not exist (cannot find \`package.json\` file): ${joinPaths(contextV2.workspaceRoot, projectRoot)}`);
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
const packageJsonContent = await readFile(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
99
|
+
if (!packageJsonContent) {
|
|
100
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
101
|
+
return {};
|
|
102
|
+
}
|
|
103
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
104
|
+
if (!userConfig.configFile && !packageJson?.storm) {
|
|
105
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
97
106
|
return {};
|
|
98
107
|
}
|
|
99
108
|
const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
100
109
|
if (!projectConfig) {
|
|
101
|
-
console.warn(`[${name}]
|
|
110
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
102
111
|
return {};
|
|
103
112
|
}
|
|
104
113
|
const tsconfig = userConfig?.tsconfig || (existsSync(joinPaths(projectRoot, "tsconfig.json")) ? joinPaths(projectRoot, "tsconfig.json") : void 0);
|
|
@@ -303,7 +312,7 @@ function createNxPlugin(opts) {
|
|
|
303
312
|
}
|
|
304
313
|
};
|
|
305
314
|
} catch (error) {
|
|
306
|
-
console.error(`[${name}]
|
|
315
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
|
|
307
316
|
return {};
|
|
308
317
|
}
|
|
309
318
|
}, configFiles, options, contextV2);
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var chunkKJAIPQKC_js = require('./chunk-KJAIPQKC.js');
|
|
|
7
7
|
var chunkFZWXH2M7_js = require('./chunk-FZWXH2M7.js');
|
|
8
8
|
require('./chunk-N2YKXZ5R.js');
|
|
9
9
|
var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
|
|
10
|
-
var
|
|
10
|
+
var chunkFD6PSWBL_js = require('./chunk-FD6PSWBL.js');
|
|
11
11
|
var chunk7SWNXVZN_js = require('./chunk-7SWNXVZN.js');
|
|
12
12
|
require('./chunk-32RH3DSY.js');
|
|
13
13
|
require('./chunk-LTCZN4I4.js');
|
|
@@ -41,7 +41,7 @@ Object.defineProperty(exports, "syncGenerator", {
|
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "createNodesV2", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkFD6PSWBL_js.createNodesV2; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "build", {
|
|
47
47
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ export { executor_default as lint } from './chunk-KNIZUAS5.mjs';
|
|
|
5
5
|
export { executor_default as prepare } from './chunk-RIB65IPA.mjs';
|
|
6
6
|
import './chunk-23KFTIT2.mjs';
|
|
7
7
|
export { generator_default as sync, generatorFn as syncGenerator } from './chunk-326QB2VK.mjs';
|
|
8
|
-
export { createNodesV2 } from './chunk-
|
|
8
|
+
export { createNodesV2 } from './chunk-TGJAQNLH.mjs';
|
|
9
9
|
export { executor_default as build } from './chunk-K7X3KSVW.mjs';
|
|
10
10
|
import './chunk-WMZ45WVV.mjs';
|
|
11
11
|
import './chunk-FMYWKI25.mjs';
|
package/dist/src/plugin/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFD6PSWBL_js = require('../../chunk-FD6PSWBL.js');
|
|
4
4
|
require('../../chunk-LTCZN4I4.js');
|
|
5
5
|
require('../../chunk-SHUYVCID.js');
|
|
6
6
|
|
|
@@ -8,5 +8,5 @@ require('../../chunk-SHUYVCID.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "createNodesV2", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkFD6PSWBL_js.createNodesV2; }
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/nx",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.15",
|
|
4
4
|
"description": "A Nx plugin to support Powerlines development in Nx monorepos.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"defu": "^6.1.4",
|
|
155
155
|
"jiti": "^2.6.1",
|
|
156
156
|
"nx": "^22.0.4",
|
|
157
|
-
"powerlines": "^0.22.
|
|
157
|
+
"powerlines": "^0.22.1"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
160
|
"@nx/workspace": "^22.0.4",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"publishConfig": { "access": "public" },
|
|
169
169
|
"executors": "./executors.json",
|
|
170
170
|
"generators": "./generators.json",
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "79514f9dda337550c9e4064a7a6e3938bd9aca08"
|
|
172
172
|
}
|