@powerlines/nx 0.10.12 → 0.10.14

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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  # Changelog for Powerlines - Nx
4
4
 
5
+ ## [0.10.14](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.14) (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
+ ## [0.10.13](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.13) (11/19/2025)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **nx:** Resolved issue with selecting input targets in Nx plugin
17
+ ([a4d103d](https://github.com/storm-software/powerlines/commit/a4d103d))
18
+
5
19
  ## [0.10.12](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.12) (11/18/2025)
6
20
 
7
21
  ### Updated Dependencies
@@ -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
 
@@ -58,7 +58,7 @@ function getNxTargetInputs(framework) {
58
58
  }
59
59
  chunkSHUYVCID_js.__name(getNxTargetInputs, "getNxTargetInputs");
60
60
  function getNxPluginInputs(framework) {
61
- return `**/${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}`;
61
+ return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
62
62
  }
63
63
  chunkSHUYVCID_js.__name(getNxPluginInputs, "getNxPluginInputs");
64
64
  function createNxPlugin(opts) {
@@ -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}]: Initializing the ${titleCase.titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
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}]: package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
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
- const packageJson = json.readJsonFileSync(joinPaths.joinPaths(projectRoot, "package.json"));
101
- if (!userConfig.configFile && !packageJson.storm) {
102
- console.debug(`[${name}]: Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
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}]: No project configuration found for project in root directory ${projectRoot}`);
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}]: ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
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
 
@@ -52,7 +52,7 @@ function getNxTargetInputs(framework) {
52
52
  }
53
53
  __name(getNxTargetInputs, "getNxTargetInputs");
54
54
  function getNxPluginInputs(framework) {
55
- return `**/${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}`;
55
+ return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
56
56
  }
57
57
  __name(getNxPluginInputs, "getNxPluginInputs");
58
58
  function createNxPlugin(opts) {
@@ -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}]: Initializing the ${titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
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}]: package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
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
- const packageJson = readJsonFileSync(joinPaths(projectRoot, "package.json"));
95
- if (!userConfig.configFile && !packageJson.storm) {
96
- console.debug(`[${name}]: Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
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}]: No project configuration found for project in root directory ${projectRoot}`);
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}]: ${isError(error) ? error.message : "Unknown fatal error"}`);
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/executors.js CHANGED
@@ -1,17 +1,25 @@
1
1
  'use strict';
2
2
 
3
3
  require('./chunk-XO62WWX4.js');
4
+ var chunkFZWXH2M7_js = require('./chunk-FZWXH2M7.js');
5
+ var chunk7SWNXVZN_js = require('./chunk-7SWNXVZN.js');
4
6
  var chunkQJLAFC2D_js = require('./chunk-QJLAFC2D.js');
5
7
  var chunkDKRIOFPB_js = require('./chunk-DKRIOFPB.js');
6
8
  var chunkKJAIPQKC_js = require('./chunk-KJAIPQKC.js');
7
- var chunkFZWXH2M7_js = require('./chunk-FZWXH2M7.js');
8
- var chunk7SWNXVZN_js = require('./chunk-7SWNXVZN.js');
9
9
  require('./chunk-32RH3DSY.js');
10
10
  require('./chunk-LTCZN4I4.js');
11
11
  require('./chunk-SHUYVCID.js');
12
12
 
13
13
 
14
14
 
15
+ Object.defineProperty(exports, "prepare", {
16
+ enumerable: true,
17
+ get: function () { return chunkFZWXH2M7_js.executor_default; }
18
+ });
19
+ Object.defineProperty(exports, "build", {
20
+ enumerable: true,
21
+ get: function () { return chunk7SWNXVZN_js.executor_default; }
22
+ });
15
23
  Object.defineProperty(exports, "clean", {
16
24
  enumerable: true,
17
25
  get: function () { return chunkQJLAFC2D_js.executor_default; }
@@ -24,11 +32,3 @@ Object.defineProperty(exports, "lint", {
24
32
  enumerable: true,
25
33
  get: function () { return chunkKJAIPQKC_js.executor_default; }
26
34
  });
27
- Object.defineProperty(exports, "prepare", {
28
- enumerable: true,
29
- get: function () { return chunkFZWXH2M7_js.executor_default; }
30
- });
31
- Object.defineProperty(exports, "build", {
32
- enumerable: true,
33
- get: function () { return chunk7SWNXVZN_js.executor_default; }
34
- });
@@ -1,9 +1,9 @@
1
1
  import './chunk-UV4HQO3Y.mjs';
2
+ export { executor_default as prepare } from './chunk-RIB65IPA.mjs';
3
+ export { executor_default as build } from './chunk-K7X3KSVW.mjs';
2
4
  export { executor_default as clean } from './chunk-IWLY4VEK.mjs';
3
5
  export { executor_default as docs } from './chunk-NSFCCGL7.mjs';
4
6
  export { executor_default as lint } from './chunk-KNIZUAS5.mjs';
5
- export { executor_default as prepare } from './chunk-RIB65IPA.mjs';
6
- export { executor_default as build } from './chunk-K7X3KSVW.mjs';
7
7
  import './chunk-WMZ45WVV.mjs';
8
8
  import './chunk-FMYWKI25.mjs';
9
9
  import './chunk-O6YSETKJ.mjs';
package/dist/index.js CHANGED
@@ -1,20 +1,28 @@
1
1
  'use strict';
2
2
 
3
3
  require('./chunk-XO62WWX4.js');
4
+ var chunkFZWXH2M7_js = require('./chunk-FZWXH2M7.js');
5
+ var chunk7SWNXVZN_js = require('./chunk-7SWNXVZN.js');
4
6
  var chunkQJLAFC2D_js = require('./chunk-QJLAFC2D.js');
5
7
  var chunkDKRIOFPB_js = require('./chunk-DKRIOFPB.js');
6
8
  var chunkKJAIPQKC_js = require('./chunk-KJAIPQKC.js');
7
- var chunkFZWXH2M7_js = require('./chunk-FZWXH2M7.js');
8
9
  require('./chunk-N2YKXZ5R.js');
9
- var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
10
- var chunkHAP4APOA_js = require('./chunk-HAP4APOA.js');
11
- var chunk7SWNXVZN_js = require('./chunk-7SWNXVZN.js');
12
10
  require('./chunk-32RH3DSY.js');
11
+ var chunkFD6PSWBL_js = require('./chunk-FD6PSWBL.js');
13
12
  require('./chunk-LTCZN4I4.js');
13
+ var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
14
14
  require('./chunk-SHUYVCID.js');
15
15
 
16
16
 
17
17
 
18
+ Object.defineProperty(exports, "prepare", {
19
+ enumerable: true,
20
+ get: function () { return chunkFZWXH2M7_js.executor_default; }
21
+ });
22
+ Object.defineProperty(exports, "build", {
23
+ enumerable: true,
24
+ get: function () { return chunk7SWNXVZN_js.executor_default; }
25
+ });
18
26
  Object.defineProperty(exports, "clean", {
19
27
  enumerable: true,
20
28
  get: function () { return chunkQJLAFC2D_js.executor_default; }
@@ -27,9 +35,9 @@ Object.defineProperty(exports, "lint", {
27
35
  enumerable: true,
28
36
  get: function () { return chunkKJAIPQKC_js.executor_default; }
29
37
  });
30
- Object.defineProperty(exports, "prepare", {
38
+ Object.defineProperty(exports, "createNodesV2", {
31
39
  enumerable: true,
32
- get: function () { return chunkFZWXH2M7_js.executor_default; }
40
+ get: function () { return chunkFD6PSWBL_js.createNodesV2; }
33
41
  });
34
42
  Object.defineProperty(exports, "sync", {
35
43
  enumerable: true,
@@ -39,11 +47,3 @@ Object.defineProperty(exports, "syncGenerator", {
39
47
  enumerable: true,
40
48
  get: function () { return chunkWUJKJGEW_js.generatorFn; }
41
49
  });
42
- Object.defineProperty(exports, "createNodesV2", {
43
- enumerable: true,
44
- get: function () { return chunkHAP4APOA_js.createNodesV2; }
45
- });
46
- Object.defineProperty(exports, "build", {
47
- enumerable: true,
48
- get: function () { return chunk7SWNXVZN_js.executor_default; }
49
- });
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import './chunk-UV4HQO3Y.mjs';
2
+ export { executor_default as prepare } from './chunk-RIB65IPA.mjs';
3
+ export { executor_default as build } from './chunk-K7X3KSVW.mjs';
2
4
  export { executor_default as clean } from './chunk-IWLY4VEK.mjs';
3
5
  export { executor_default as docs } from './chunk-NSFCCGL7.mjs';
4
6
  export { executor_default as lint } from './chunk-KNIZUAS5.mjs';
5
- export { executor_default as prepare } from './chunk-RIB65IPA.mjs';
6
7
  import './chunk-23KFTIT2.mjs';
7
- export { generator_default as sync, generatorFn as syncGenerator } from './chunk-326QB2VK.mjs';
8
- export { createNodesV2 } from './chunk-NSLIDWKJ.mjs';
9
- export { executor_default as build } from './chunk-K7X3KSVW.mjs';
10
8
  import './chunk-WMZ45WVV.mjs';
9
+ export { createNodesV2 } from './chunk-TGJAQNLH.mjs';
11
10
  import './chunk-FMYWKI25.mjs';
11
+ export { generator_default as sync, generatorFn as syncGenerator } from './chunk-326QB2VK.mjs';
12
12
  import './chunk-O6YSETKJ.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHAP4APOA_js = require('../../chunk-HAP4APOA.js');
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 chunkHAP4APOA_js.createNodesV2; }
11
+ get: function () { return chunkFD6PSWBL_js.createNodesV2; }
12
12
  });
@@ -1,3 +1,3 @@
1
- export { createNodesV2 } from '../../chunk-NSLIDWKJ.mjs';
1
+ export { createNodesV2 } from '../../chunk-TGJAQNLH.mjs';
2
2
  import '../../chunk-FMYWKI25.mjs';
3
3
  import '../../chunk-O6YSETKJ.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/nx",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "description": "A Nx plugin to support Powerlines development in Nx monorepos.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -168,5 +168,5 @@
168
168
  "publishConfig": { "access": "public" },
169
169
  "executors": "./executors.json",
170
170
  "generators": "./generators.json",
171
- "gitHead": "30a4cf4f1c707fe159b55f65f1e87b14d679614d"
171
+ "gitHead": "12334869fbd2fa1bdfddce23cb71997608ad216f"
172
172
  }