@powerlines/nx 0.11.220 → 0.11.221

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{chunk-TSCKHENO.js → chunk-3D3MU5VP.js} +2 -2
  3. package/dist/{chunk-HNRM52ID.js → chunk-ADMWJVSB.js} +31 -31
  4. package/dist/{chunk-6TYW2FMC.js → chunk-DXL4NVUO.js} +2 -2
  5. package/dist/{chunk-TUMRUZ4M.js → chunk-F4QJKUNK.js} +2 -2
  6. package/dist/{chunk-RBM4GHDX.mjs → chunk-IDXFQ2WL.mjs} +1 -1
  7. package/dist/{chunk-KWMCNI6Q.mjs → chunk-NB2KHU33.mjs} +1 -1
  8. package/dist/{chunk-GJ62I4AV.js → chunk-NXR5JH7F.js} +2 -2
  9. package/dist/{chunk-E3WT4AQR.js → chunk-P5X6KXLE.js} +2 -2
  10. package/dist/{chunk-OX5V5IMP.mjs → chunk-PKGTRC56.mjs} +1 -1
  11. package/dist/{chunk-CON4PH6V.js → chunk-PMQ5YVLP.js} +2 -2
  12. package/dist/{chunk-5UVD555E.js → chunk-R577MOZR.js} +29 -29
  13. package/dist/{chunk-OBQF6HPF.mjs → chunk-RBIHD4JS.mjs} +1 -1
  14. package/dist/{chunk-IA3YWWWC.mjs → chunk-RLYU2FOM.mjs} +29 -29
  15. package/dist/{chunk-QN6ZKFPV.mjs → chunk-SQV3SFA4.mjs} +1 -1
  16. package/dist/{chunk-5VLSWKPN.mjs → chunk-WIPWBPB3.mjs} +1 -1
  17. package/dist/{chunk-Z5G2DQQE.mjs → chunk-ZERXJ7S6.mjs} +1 -1
  18. package/dist/executors.js +12 -12
  19. package/dist/executors.mjs +7 -7
  20. package/dist/index.js +15 -15
  21. package/dist/index.mjs +9 -9
  22. package/dist/src/base/base-executor.js +3 -3
  23. package/dist/src/base/base-executor.mjs +2 -2
  24. package/dist/src/executors/build/executor.js +5 -5
  25. package/dist/src/executors/build/executor.mjs +3 -3
  26. package/dist/src/executors/clean/executor.js +5 -5
  27. package/dist/src/executors/clean/executor.mjs +3 -3
  28. package/dist/src/executors/docs/executor.js +5 -5
  29. package/dist/src/executors/docs/executor.mjs +3 -3
  30. package/dist/src/executors/lint/executor.js +5 -5
  31. package/dist/src/executors/lint/executor.mjs +3 -3
  32. package/dist/src/executors/prepare/executor.js +5 -5
  33. package/dist/src/executors/prepare/executor.mjs +3 -3
  34. package/dist/src/helpers/plugin-utilities.d.mts +0 -9
  35. package/dist/src/helpers/plugin-utilities.d.ts +0 -9
  36. package/dist/src/helpers/plugin-utilities.js +5 -5
  37. package/dist/src/helpers/plugin-utilities.mjs +2 -2
  38. package/dist/src/plugin/index.js +4 -4
  39. package/dist/src/plugin/index.mjs +3 -3
  40. package/dist/src/types/plugin.d.mts +15 -6
  41. package/dist/src/types/plugin.d.ts +15 -6
  42. package/package.json +11 -11
  43. /package/dist/{chunk-FSGRYCTL.js → chunk-RLODK6TM.js} +0 -0
  44. /package/dist/{chunk-JL4HQ7ZD.mjs → chunk-W75JGXP2.mjs} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  # Changelog for Powerlines - Nx
4
4
 
5
+ ## [0.11.220](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.220) (02/28/2026)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **nx:** Small change to default value comment ([db243fb81](https://github.com/storm-software/powerlines/commit/db243fb81))
10
+
5
11
  ## [0.11.219](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.219) (02/28/2026)
6
12
 
7
13
  ### Miscellaneous
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk5UVD555E_js = require('./chunk-5UVD555E.js');
3
+ var chunkR577MOZR_js = require('./chunk-R577MOZR.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 = chunk5UVD555E_js.withExecutor("build", executorFn);
22
+ var executor = chunkR577MOZR_js.withExecutor("build", 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 chunkFSGRYCTL_js = require('./chunk-FSGRYCTL.js');
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: chunkFSGRYCTL_js.ROOT_HASH_LENGTH
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(`[${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}`);
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 (opts?.verboseOutput) {
75
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
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 chunkFSGRYCTL_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
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 (opts?.verboseOutput) {
80
- console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
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 (opts?.verboseOutput) {
87
- console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
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 (opts?.verboseOutput) {
94
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
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 (opts?.verboseOutput) {
101
- console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
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 (opts?.verboseOutput) {
107
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
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 (opts?.verboseOutput) {
340
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
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(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
355
- return {};
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(`[${opts?.name || "powerlines/plugin/nx"}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
362
- return [
363
- `**/{${getNxTargetInputs(opts?.framework || "powerlines").map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
364
- async () => {
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 chunk5UVD555E_js = require('./chunk-5UVD555E.js');
3
+ var chunkR577MOZR_js = require('./chunk-R577MOZR.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 = chunk5UVD555E_js.withExecutor("lint", executorFn);
14
+ var executor = chunkR577MOZR_js.withExecutor("lint", 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 chunk5UVD555E_js = require('./chunk-5UVD555E.js');
3
+ var chunkR577MOZR_js = require('./chunk-R577MOZR.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 = chunk5UVD555E_js.withExecutor("docs", executorFn);
14
+ var executor = chunkR577MOZR_js.withExecutor("docs", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-OBQF6HPF.mjs';
1
+ import { withExecutor } from './chunk-RBIHD4JS.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/lint/executor.ts
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-OBQF6HPF.mjs';
1
+ import { withExecutor } from './chunk-RBIHD4JS.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkHNRM52ID_js = require('./chunk-HNRM52ID.js');
3
+ var chunkADMWJVSB_js = require('./chunk-ADMWJVSB.js');
4
4
 
5
5
  // src/plugin/index.ts
6
- var createNodesV2 = chunkHNRM52ID_js.createNxPlugin({
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 chunk5UVD555E_js = require('./chunk-5UVD555E.js');
3
+ var chunkR577MOZR_js = require('./chunk-R577MOZR.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 = chunk5UVD555E_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkR577MOZR_js.withExecutor("prepare", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-OBQF6HPF.mjs';
1
+ import { withExecutor } from './chunk-RBIHD4JS.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/docs/executor.ts
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk5UVD555E_js = require('./chunk-5UVD555E.js');
3
+ var chunkR577MOZR_js = require('./chunk-R577MOZR.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 = chunk5UVD555E_js.withExecutor("clean", executorFn);
14
+ var executor = chunkR577MOZR_js.withExecutor("clean", 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 chunkFSGRYCTL_js = require('./chunk-FSGRYCTL.js');
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');
@@ -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 > chunkFSGRYCTL_js.ROOT_HASH_LENGTH ? combined.slice(0, chunkFSGRYCTL_js.ROOT_HASH_LENGTH) : combined;
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(chunkFSGRYCTL_js.DEFAULT_ENVIRONMENT, userConfig);
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("}") ? chunkFSGRYCTL_js.replacePathTokens(this.#context, path) : path, this.#context.builtinsPath, this.#context.config.framework);
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 = chunkFSGRYCTL_js.extendLog(this.#context.log, "file-system");
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 chunkFSGRYCTL_js.format(this.#context, resolvedPath, data);
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 = chunkFSGRYCTL_js.replacePathTokens(this.#context, 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 = chunkFSGRYCTL_js.replacePathTokens(this.#context, 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 chunkFSGRYCTL_js.loadWorkspaceConfig(workspaceRoot, config.root));
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 chunkFSGRYCTL_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));
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: chunkFSGRYCTL_js.ROOT_HASH_LENGTH
2841
+ maxLength: chunkRLODK6TM_js.ROOT_HASH_LENGTH
2842
2842
  }),
2843
2843
  configHash: murmurhash.murmurhash(this.config, {
2844
- maxLength: chunkFSGRYCTL_js.CACHE_HASH_LENGTH
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: chunkFSGRYCTL_js.CACHE_HASH_LENGTH
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 chunkFSGRYCTL_js.createLog(name, {
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 chunkFSGRYCTL_js.extendLog(this.log, name);
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 chunkFSGRYCTL_js.loadUserConfigFile(cacheKey.root, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
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 = chunkFSGRYCTL_js.getUniqueInputs(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 = chunkFSGRYCTL_js.replacePathTokens(this, 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 = chunkFSGRYCTL_js.replacePathTokens(this, 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: chunkFSGRYCTL_js.replacePathTokens(this, asset.glob),
3673
- ignore: asset.ignore ? asset.ignore.map((ignore) => chunkFSGRYCTL_js.replacePathTokens(this, ignore)) : void 0,
3674
- input: chunkFSGRYCTL_js.replacePathTokens(this, asset.input),
3675
- output: chunkFSGRYCTL_js.replacePathTokens(this, asset.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 chunkFSGRYCTL_js.loadWorkspaceConfig(workspaceRoot, config.root));
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(chunkFSGRYCTL_js.GLOBAL_ENVIRONMENT, this.config.userConfig));
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
- ` : ""}${chunkFSGRYCTL_js.getFileHeader(context, {
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
- chunkFSGRYCTL_js.formatFolder(context, context.builtinsPath),
4418
- chunkFSGRYCTL_js.formatFolder(context, context.entryPath)
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 chunkFSGRYCTL_js.formatFolder(context, context.entryPath);
4642
+ await chunkRLODK6TM_js.formatFolder(context, context.entryPath);
4643
4643
  await this.callHook("build", {
4644
4644
  environment: context,
4645
4645
  order: "normal"
@@ -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-JL4HQ7ZD.mjs';
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';
@@ -1,4 +1,4 @@
1
- import { ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-JL4HQ7ZD.mjs';
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(`[${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}`);
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 (opts?.verboseOutput) {
69
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
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 (opts?.verboseOutput) {
74
- 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.`);
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 (opts?.verboseOutput) {
81
- console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
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 (opts?.verboseOutput) {
88
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
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 (opts?.verboseOutput) {
95
- console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
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 (opts?.verboseOutput) {
101
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
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 (opts?.verboseOutput) {
334
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
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(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
349
- return {};
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(`[${opts?.name || "powerlines/plugin/nx"}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
356
- return [
357
- `**/{${getNxTargetInputs(opts?.framework || "powerlines").map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
358
- async () => {
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");
@@ -1,4 +1,4 @@
1
- import { createNxPlugin } from './chunk-IA3YWWWC.mjs';
1
+ import { createNxPlugin } from './chunk-RLYU2FOM.mjs';
2
2
 
3
3
  // src/plugin/index.ts
4
4
  var createNodesV2 = createNxPlugin({