@powerlines/nx 0.10.16 → 0.10.18

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 (54) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{chunk-WMZ45WVV.mjs → chunk-5KEIBGFG.mjs} +31 -11
  3. package/dist/{chunk-7SWNXVZN.js → chunk-AD2EUZQL.js} +2 -2
  4. package/dist/{chunk-NSFCCGL7.mjs → chunk-E7EIMG6J.mjs} +1 -1
  5. package/dist/{chunk-IWLY4VEK.mjs → chunk-EMPB7IUD.mjs} +1 -1
  6. package/dist/{chunk-DKRIOFPB.js → chunk-EOBEXUZ2.js} +2 -2
  7. package/dist/chunk-EX3O7O2B.js +10 -0
  8. package/dist/{chunk-32RH3DSY.js → chunk-FBZEUICY.js} +31 -11
  9. package/dist/chunk-FEJ2ZSZP.mjs +8 -0
  10. package/dist/{chunk-KJAIPQKC.js → chunk-HANZV54P.js} +2 -2
  11. package/dist/{chunk-K7X3KSVW.mjs → chunk-J66W6WPB.mjs} +1 -1
  12. package/dist/chunk-LQU7XWFP.mjs +30 -0
  13. package/dist/{chunk-RIB65IPA.mjs → chunk-OFWFMQU2.mjs} +1 -1
  14. package/dist/{chunk-GUAUB4A5.mjs → chunk-OS7UD4XD.mjs} +3 -37
  15. package/dist/{chunk-QJLAFC2D.js → chunk-P5LV56CI.js} +2 -2
  16. package/dist/{chunk-LG4AFV5G.js → chunk-TO3WM5BR.js} +6 -38
  17. package/dist/{chunk-KNIZUAS5.mjs → chunk-VD72KMTO.mjs} +1 -1
  18. package/dist/chunk-VIU4CXA3.js +32 -0
  19. package/dist/{chunk-FZWXH2M7.js → chunk-VW4AOJ4M.js} +2 -2
  20. package/dist/executors.js +16 -16
  21. package/dist/executors.mjs +6 -6
  22. package/dist/index.d.mts +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +25 -23
  25. package/dist/index.mjs +9 -7
  26. package/dist/src/base/base-executor.js +2 -2
  27. package/dist/src/base/base-executor.mjs +1 -1
  28. package/dist/src/executors/build/executor.js +4 -4
  29. package/dist/src/executors/build/executor.mjs +2 -2
  30. package/dist/src/executors/clean/executor.js +4 -4
  31. package/dist/src/executors/clean/executor.mjs +2 -2
  32. package/dist/src/executors/docs/executor.js +4 -4
  33. package/dist/src/executors/docs/executor.mjs +2 -2
  34. package/dist/src/executors/lint/executor.js +4 -4
  35. package/dist/src/executors/lint/executor.mjs +2 -2
  36. package/dist/src/executors/prepare/executor.js +4 -4
  37. package/dist/src/executors/prepare/executor.mjs +2 -2
  38. package/dist/src/helpers/constants.d.mts +6 -0
  39. package/dist/src/helpers/constants.d.ts +6 -0
  40. package/dist/src/helpers/constants.js +11 -0
  41. package/dist/src/helpers/constants.mjs +2 -0
  42. package/dist/src/helpers/plugin-utilities.d.mts +55 -0
  43. package/dist/src/helpers/plugin-utilities.d.ts +55 -0
  44. package/dist/src/helpers/plugin-utilities.js +21 -0
  45. package/dist/src/helpers/plugin-utilities.mjs +4 -0
  46. package/dist/src/plugin/index.d.mts +1 -173
  47. package/dist/src/plugin/index.d.ts +1 -173
  48. package/dist/src/plugin/index.js +4 -2
  49. package/dist/src/plugin/index.mjs +3 -1
  50. package/dist/src/types/plugin.d.mts +174 -0
  51. package/dist/src/types/plugin.d.ts +174 -0
  52. package/dist/src/types/plugin.js +2 -0
  53. package/dist/src/types/plugin.mjs +1 -0
  54. package/package.json +45 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog for Powerlines - Nx
4
4
 
5
+ ## [0.10.18](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.18) (11/19/2025)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **nx:** Update base path of the configuration file resolution
10
+ ([4b100a0](https://github.com/storm-software/powerlines/commit/4b100a0))
11
+
12
+ ### Updated Dependencies
13
+
14
+ - Updated **powerlines** to **v0.23.1**
15
+
16
+ ## [0.10.17](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.17) (11/19/2025)
17
+
18
+ ### Miscellaneous
19
+
20
+ - **nx:** Added `types` module to the package exports
21
+ ([b9b9887](https://github.com/storm-software/powerlines/commit/b9b9887))
22
+ - **nx:** Ensure the `base` and `helpers` modules are included in package
23
+ exports
24
+ ([342be61](https://github.com/storm-software/powerlines/commit/342be61))
25
+
26
+ ### Updated Dependencies
27
+
28
+ - Updated **powerlines** to **v0.23.0**
29
+
5
30
  ## [0.10.16](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.16) (11/19/2025)
6
31
 
7
32
  ### Miscellaneous
@@ -15,6 +15,7 @@ import { install } from '@stryke/fs/install';
15
15
  import { listFiles, listFilesSync } from '@stryke/fs/list-files';
16
16
  import { isPackageExists, isPackageListed, doesPackageMatch, getPackageListing } from '@stryke/fs/package-fns';
17
17
  import { resolvePackage } from '@stryke/fs/resolve';
18
+ import { appendPath } from '@stryke/path/append';
18
19
  import { joinPaths as joinPaths$1 } from '@stryke/path/join-paths';
19
20
  import { replacePath, replaceExtension } from '@stryke/path/replace';
20
21
  import { isFunction } from '@stryke/type-checks/is-function';
@@ -35,7 +36,6 @@ import { murmurhash } from '@stryke/hash/murmurhash';
35
36
  import { getUnique, getUniqueBy } from '@stryke/helpers/get-unique';
36
37
  import { omit } from '@stryke/helpers/omit';
37
38
  import { StormJSON } from '@stryke/json/storm-json';
38
- import { appendPath } from '@stryke/path/append';
39
39
  import { findFileDotExtensionSafe, findFilePath, hasFileExtension, relativePath, findFileName } from '@stryke/path/file-path-fns';
40
40
  import { isAbsolutePath, isAbsolute } from '@stryke/path/is-type';
41
41
  import { joinPaths } from '@stryke/path/join';
@@ -225,7 +225,7 @@ function replacePathTokens(context, path) {
225
225
  if (!path) {
226
226
  return path;
227
227
  }
228
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
228
+ return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{distPath}", context.config.output.distPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
229
229
  }
230
230
  __name(replacePathTokens, "replacePathTokens");
231
231
 
@@ -501,8 +501,8 @@ FileSystemData._Metadata = $.CompositeList(FileMetadata);
501
501
  FileSystemData._Files = $.CompositeList(FileData);
502
502
 
503
503
  // ../powerlines/src/types/vfs.ts
504
- var __VFS_PATCH__ = Symbol("__VFS_PATCH__");
505
- var __VFS_REVERT__ = Symbol("__VFS_REVERT__");
504
+ var __VFS_PATCH__ = "__VFS_PATCH__";
505
+ var __VFS_REVERT__ = "__VFS_REVERT__";
506
506
  var createLog = /* @__PURE__ */ __name((name, options = {}) => {
507
507
  const logLevel = options.logLevel === null ? LogLevelLabel.SILENT : options.logLevel || LogLevelLabel.INFO;
508
508
  if (logLevel === LogLevelLabel.SILENT) {
@@ -744,8 +744,8 @@ var UnifiedFS = class _UnifiedFS extends Union {
744
744
  recursive: true
745
745
  });
746
746
  }
747
- if (!this.#physicalFS.existsSync(joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath))) {
748
- this.#physicalFS.mkdirSync(joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath), {
747
+ if (!this.#physicalFS.existsSync(joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath))) {
748
+ this.#physicalFS.mkdirSync(joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath), {
749
749
  recursive: true
750
750
  });
751
751
  }
@@ -832,7 +832,7 @@ var UnifiedFS = class _UnifiedFS extends Union {
832
832
  resolveMode(pathOrUrl, options = {}) {
833
833
  if (options.mode === "virtual" && this.#context.config.output.mode !== "fs" && isParentPath(toFilePath(pathOrUrl), this.#context.artifactsPath)) {
834
834
  return "virtual";
835
- } else if (options.mode === "fs" || this.#context.config.output.mode === "fs" || isParentPath(toFilePath(pathOrUrl), this.#context.dataPath) || isParentPath(toFilePath(pathOrUrl), this.#context.cachePath) || isParentPath(toFilePath(pathOrUrl), joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath))) {
835
+ } else if (options.mode === "fs" || this.#context.config.output.mode === "fs" || isParentPath(toFilePath(pathOrUrl), this.#context.dataPath) || isParentPath(toFilePath(pathOrUrl), this.#context.cachePath) || isParentPath(toFilePath(pathOrUrl), joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath))) {
836
836
  return "fs";
837
837
  }
838
838
  return void 0;
@@ -2496,12 +2496,18 @@ ${result.errors.map((error) => ` [${error.severity}] ${error.message}${error.co
2496
2496
  ] : [
2497
2497
  "esm"
2498
2498
  ])));
2499
- this.config.output.outputPath ??= joinPaths("dist", this.config.projectRoot || ".");
2499
+ if (this.config.projectRoot && this.config.projectRoot !== "." && this.config.projectRoot !== "./" && this.config.projectRoot !== this.workspaceConfig.workspaceRoot) {
2500
+ this.config.output.outputPath ??= joinPaths("dist", this.config.projectRoot);
2501
+ this.config.output.distPath ??= joinPaths(this.config.projectRoot, "dist");
2502
+ } else {
2503
+ this.config.output.outputPath ??= "dist";
2504
+ this.config.output.distPath ??= "dist";
2505
+ }
2500
2506
  this.config.output.assets = getUnique(this.config.output.assets.map((asset) => {
2501
2507
  return {
2502
2508
  glob: isSetObject(asset) ? asset.glob : asset,
2503
2509
  input: isString(asset) || !asset.input || asset.input === "." || asset.input === "/" || asset.input === "./" ? this.workspaceConfig.workspaceRoot : appendPath(asset.input, this.workspaceConfig.workspaceRoot),
2504
- output: appendPath(isSetObject(asset) && asset.output ? joinPaths(this.config.output.outputPath, replacePath(asset.output, this.config.output.outputPath)) : this.config.output.outputPath, this.workspaceConfig.workspaceRoot),
2510
+ output: appendPath(isSetObject(asset) && asset.output ? joinPaths(this.config.output.distPath, replacePath(asset.output, this.config.output.distPath)) : this.config.output.distPath, this.workspaceConfig.workspaceRoot),
2505
2511
  ignore: isSetObject(asset) && asset.ignore ? toArray(asset.ignore) : void 0
2506
2512
  };
2507
2513
  }));
@@ -3519,6 +3525,9 @@ ${formatTypes(generatedTypes)}
3519
3525
  this.context.log(LogLevelLabel.INFO, "\u{1F9F9} Cleaning the previous Powerlines artifacts");
3520
3526
  await this.prepare(inlineConfig);
3521
3527
  await this.#executeEnvironments(async (context) => {
3528
+ this.context.log(LogLevelLabel.TRACE, "Cleaning the project's dist and artifacts directories.");
3529
+ await context.fs.rmdir(joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.output.distPath));
3530
+ await context.fs.rmdir(joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.output.artifactsFolder));
3522
3531
  await callHook(context, "clean", {
3523
3532
  sequential: true
3524
3533
  });
@@ -3564,6 +3573,17 @@ ${formatTypes(generatedTypes)}
3564
3573
  context.log(LogLevelLabel.DEBUG, `Copying asset(s): ${chalk5.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths$1(replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5.greenBright(joinPaths$1(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5.yellowBright(i)).join(", ")})` : ""}`);
3565
3574
  await copyFiles(asset, asset.output);
3566
3575
  }));
3576
+ if (context.config.output.distPath !== context.config.output.outputPath) {
3577
+ const sourcePath = appendPath(context.config.output.distPath, context.workspaceConfig.workspaceRoot);
3578
+ const destinationPath = joinPaths$1(appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
3579
+ if (sourcePath !== destinationPath) {
3580
+ context.log(LogLevelLabel.INFO, `Copying build output files from project's \`dist\` directory (${context.config.output.distPath}) to the output directory (${context.config.output.outputPath}).`);
3581
+ await copyFiles({
3582
+ input: sourcePath,
3583
+ glob: "**/*"
3584
+ }, destinationPath);
3585
+ }
3586
+ }
3567
3587
  await this.callPostHook(context, "build");
3568
3588
  });
3569
3589
  this.context.log(LogLevelLabel.TRACE, "Powerlines build completed");
@@ -3962,7 +3982,7 @@ export { ${key} };`;
3962
3982
  format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
3963
3983
  platform: context.config.build.platform,
3964
3984
  treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
3965
- outdir: context.config.output.outputPath,
3985
+ outdir: context.config.output.distPath,
3966
3986
  tsconfig: context.tsconfig.tsconfigFilePath,
3967
3987
  tsconfigRaw: context.tsconfig.tsconfigJson
3968
3988
  }, context.config.build.variant === "esbuild" ? omit(context.config.build, [
@@ -4034,7 +4054,7 @@ function extractViteConfig(context) {
4034
4054
  mode: context.config.mode === "development" ? "development" : "production",
4035
4055
  cacheDir: joinPaths$1(context.cachePath, "vite"),
4036
4056
  build: {
4037
- outDir: context.config.output.outputPath,
4057
+ outDir: context.config.output.distPath,
4038
4058
  tsconfig: context.tsconfig.tsconfigFilePath,
4039
4059
  tsconfigRaw: context.tsconfig.tsconfigJson
4040
4060
  },
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32RH3DSY_js = require('./chunk-32RH3DSY.js');
3
+ var chunkFBZEUICY_js = require('./chunk-FBZEUICY.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 = chunk32RH3DSY_js.withExecutor("build", executorFn);
22
+ var executor = chunkFBZEUICY_js.withExecutor("build", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-WMZ45WVV.mjs';
1
+ import { withExecutor } from './chunk-5KEIBGFG.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/docs/executor.ts
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-WMZ45WVV.mjs';
1
+ import { withExecutor } from './chunk-5KEIBGFG.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/clean/executor.ts
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32RH3DSY_js = require('./chunk-32RH3DSY.js');
3
+ var chunkFBZEUICY_js = require('./chunk-FBZEUICY.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 = chunk32RH3DSY_js.withExecutor("docs", executorFn);
14
+ var executor = chunkFBZEUICY_js.withExecutor("docs", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var chunkTO3WM5BR_js = require('./chunk-TO3WM5BR.js');
4
+
5
+ // src/plugin/index.ts
6
+ var createNodesV2 = chunkTO3WM5BR_js.createNxPlugin({
7
+ framework: "powerlines"
8
+ });
9
+
10
+ exports.createNodesV2 = createNodesV2;
@@ -17,6 +17,7 @@ var install = require('@stryke/fs/install');
17
17
  var listFiles = require('@stryke/fs/list-files');
18
18
  var packageFns = require('@stryke/fs/package-fns');
19
19
  var resolve = require('@stryke/fs/resolve');
20
+ var append = require('@stryke/path/append');
20
21
  var joinPaths = require('@stryke/path/join-paths');
21
22
  var replace = require('@stryke/path/replace');
22
23
  var isFunction = require('@stryke/type-checks/is-function');
@@ -37,7 +38,6 @@ var murmurhash = require('@stryke/hash/murmurhash');
37
38
  var getUnique = require('@stryke/helpers/get-unique');
38
39
  var omit = require('@stryke/helpers/omit');
39
40
  var stormJson = require('@stryke/json/storm-json');
40
- var append = require('@stryke/path/append');
41
41
  var filePathFns = require('@stryke/path/file-path-fns');
42
42
  var isType = require('@stryke/path/is-type');
43
43
  var join = require('@stryke/path/join');
@@ -255,7 +255,7 @@ function replacePathTokens(context, path) {
255
255
  if (!path) {
256
256
  return path;
257
257
  }
258
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
258
+ return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{distPath}", context.config.output.distPath).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
259
259
  }
260
260
  chunkSHUYVCID_js.__name(replacePathTokens, "replacePathTokens");
261
261
 
@@ -531,8 +531,8 @@ FileSystemData._Metadata = $__namespace.CompositeList(FileMetadata);
531
531
  FileSystemData._Files = $__namespace.CompositeList(FileData);
532
532
 
533
533
  // ../powerlines/src/types/vfs.ts
534
- var __VFS_PATCH__ = Symbol("__VFS_PATCH__");
535
- var __VFS_REVERT__ = Symbol("__VFS_REVERT__");
534
+ var __VFS_PATCH__ = "__VFS_PATCH__";
535
+ var __VFS_REVERT__ = "__VFS_REVERT__";
536
536
  var createLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((name, options = {}) => {
537
537
  const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
538
538
  if (logLevel === types.LogLevelLabel.SILENT) {
@@ -774,8 +774,8 @@ var UnifiedFS = class _UnifiedFS extends unionfs.Union {
774
774
  recursive: true
775
775
  });
776
776
  }
777
- if (!this.#physicalFS.existsSync(join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath))) {
778
- this.#physicalFS.mkdirSync(join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath), {
777
+ if (!this.#physicalFS.existsSync(join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath))) {
778
+ this.#physicalFS.mkdirSync(join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath), {
779
779
  recursive: true
780
780
  });
781
781
  }
@@ -862,7 +862,7 @@ var UnifiedFS = class _UnifiedFS extends unionfs.Union {
862
862
  resolveMode(pathOrUrl, options = {}) {
863
863
  if (options.mode === "virtual" && this.#context.config.output.mode !== "fs" && isParentPath.isParentPath(toFilePath(pathOrUrl), this.#context.artifactsPath)) {
864
864
  return "virtual";
865
- } else if (options.mode === "fs" || this.#context.config.output.mode === "fs" || isParentPath.isParentPath(toFilePath(pathOrUrl), this.#context.dataPath) || isParentPath.isParentPath(toFilePath(pathOrUrl), this.#context.cachePath) || isParentPath.isParentPath(toFilePath(pathOrUrl), join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.outputPath))) {
865
+ } else if (options.mode === "fs" || this.#context.config.output.mode === "fs" || isParentPath.isParentPath(toFilePath(pathOrUrl), this.#context.dataPath) || isParentPath.isParentPath(toFilePath(pathOrUrl), this.#context.cachePath) || isParentPath.isParentPath(toFilePath(pathOrUrl), join.joinPaths(this.#context.workspaceConfig.workspaceRoot, this.#context.config.output.distPath))) {
866
866
  return "fs";
867
867
  }
868
868
  return void 0;
@@ -2526,12 +2526,18 @@ ${result.errors.map((error) => ` [${error.severity}] ${error.message}${error.co
2526
2526
  ] : [
2527
2527
  "esm"
2528
2528
  ])));
2529
- this.config.output.outputPath ??= join.joinPaths("dist", this.config.projectRoot || ".");
2529
+ if (this.config.projectRoot && this.config.projectRoot !== "." && this.config.projectRoot !== "./" && this.config.projectRoot !== this.workspaceConfig.workspaceRoot) {
2530
+ this.config.output.outputPath ??= join.joinPaths("dist", this.config.projectRoot);
2531
+ this.config.output.distPath ??= join.joinPaths(this.config.projectRoot, "dist");
2532
+ } else {
2533
+ this.config.output.outputPath ??= "dist";
2534
+ this.config.output.distPath ??= "dist";
2535
+ }
2530
2536
  this.config.output.assets = getUnique.getUnique(this.config.output.assets.map((asset) => {
2531
2537
  return {
2532
2538
  glob: isSetObject.isSetObject(asset) ? asset.glob : asset,
2533
2539
  input: isString.isString(asset) || !asset.input || asset.input === "." || asset.input === "/" || asset.input === "./" ? this.workspaceConfig.workspaceRoot : append.appendPath(asset.input, this.workspaceConfig.workspaceRoot),
2534
- output: append.appendPath(isSetObject.isSetObject(asset) && asset.output ? join.joinPaths(this.config.output.outputPath, replace.replacePath(asset.output, this.config.output.outputPath)) : this.config.output.outputPath, this.workspaceConfig.workspaceRoot),
2540
+ output: append.appendPath(isSetObject.isSetObject(asset) && asset.output ? join.joinPaths(this.config.output.distPath, replace.replacePath(asset.output, this.config.output.distPath)) : this.config.output.distPath, this.workspaceConfig.workspaceRoot),
2535
2541
  ignore: isSetObject.isSetObject(asset) && asset.ignore ? toArray.toArray(asset.ignore) : void 0
2536
2542
  };
2537
2543
  }));
@@ -3549,6 +3555,9 @@ ${formatTypes(generatedTypes)}
3549
3555
  this.context.log(types.LogLevelLabel.INFO, "\u{1F9F9} Cleaning the previous Powerlines artifacts");
3550
3556
  await this.prepare(inlineConfig);
3551
3557
  await this.#executeEnvironments(async (context) => {
3558
+ this.context.log(types.LogLevelLabel.TRACE, "Cleaning the project's dist and artifacts directories.");
3559
+ await context.fs.rmdir(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.distPath));
3560
+ await context.fs.rmdir(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.artifactsFolder));
3552
3561
  await callHook(context, "clean", {
3553
3562
  sequential: true
3554
3563
  });
@@ -3594,6 +3603,17 @@ ${formatTypes(generatedTypes)}
3594
3603
  context.log(types.LogLevelLabel.DEBUG, `Copying asset(s): ${chalk5__default.default.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths.joinPaths(replace.replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5__default.default.greenBright(joinPaths.joinPaths(replace.replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5__default.default.yellowBright(i)).join(", ")})` : ""}`);
3595
3604
  await copyFile.copyFiles(asset, asset.output);
3596
3605
  }));
3606
+ if (context.config.output.distPath !== context.config.output.outputPath) {
3607
+ const sourcePath = append.appendPath(context.config.output.distPath, context.workspaceConfig.workspaceRoot);
3608
+ const destinationPath = joinPaths.joinPaths(append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
3609
+ if (sourcePath !== destinationPath) {
3610
+ context.log(types.LogLevelLabel.INFO, `Copying build output files from project's \`dist\` directory (${context.config.output.distPath}) to the output directory (${context.config.output.outputPath}).`);
3611
+ await copyFile.copyFiles({
3612
+ input: sourcePath,
3613
+ glob: "**/*"
3614
+ }, destinationPath);
3615
+ }
3616
+ }
3597
3617
  await this.callPostHook(context, "build");
3598
3618
  });
3599
3619
  this.context.log(types.LogLevelLabel.TRACE, "Powerlines build completed");
@@ -3992,7 +4012,7 @@ export { ${key} };`;
3992
4012
  format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
3993
4013
  platform: context.config.build.platform,
3994
4014
  treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
3995
- outdir: context.config.output.outputPath,
4015
+ outdir: context.config.output.distPath,
3996
4016
  tsconfig: context.tsconfig.tsconfigFilePath,
3997
4017
  tsconfigRaw: context.tsconfig.tsconfigJson
3998
4018
  }, context.config.build.variant === "esbuild" ? omit.omit(context.config.build, [
@@ -4064,7 +4084,7 @@ function extractViteConfig(context) {
4064
4084
  mode: context.config.mode === "development" ? "development" : "production",
4065
4085
  cacheDir: joinPaths.joinPaths(context.cachePath, "vite"),
4066
4086
  build: {
4067
- outDir: context.config.output.outputPath,
4087
+ outDir: context.config.output.distPath,
4068
4088
  tsconfig: context.tsconfig.tsconfigFilePath,
4069
4089
  tsconfigRaw: context.tsconfig.tsconfigJson
4070
4090
  },
@@ -0,0 +1,8 @@
1
+ import { createNxPlugin } from './chunk-OS7UD4XD.mjs';
2
+
3
+ // src/plugin/index.ts
4
+ var createNodesV2 = createNxPlugin({
5
+ framework: "powerlines"
6
+ });
7
+
8
+ export { createNodesV2 };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32RH3DSY_js = require('./chunk-32RH3DSY.js');
3
+ var chunkFBZEUICY_js = require('./chunk-FBZEUICY.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 = chunk32RH3DSY_js.withExecutor("lint", executorFn);
14
+ var executor = chunkFBZEUICY_js.withExecutor("lint", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-WMZ45WVV.mjs';
1
+ import { withExecutor } from './chunk-5KEIBGFG.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -0,0 +1,30 @@
1
+ // src/helpers/constants.ts
2
+ var CONFIG_INPUTS = [
3
+ "{projectRoot}/package.json",
4
+ "{projectRoot}/{framework}.json",
5
+ "{projectRoot}/{framework}.*.json",
6
+ "{projectRoot}/{framework}.jsonc",
7
+ "{projectRoot}/{framework}.*.jsonc",
8
+ "{projectRoot}/{framework}.json5",
9
+ "{projectRoot}/{framework}.*.json5",
10
+ "{projectRoot}/{framework}.yaml",
11
+ "{projectRoot}/{framework}.*.yaml",
12
+ "{projectRoot}/{framework}.yml",
13
+ "{projectRoot}/{framework}.*.yml",
14
+ "{projectRoot}/{framework}.toml",
15
+ "{projectRoot}/{framework}.*.toml",
16
+ "{projectRoot}/{framework}.config.js",
17
+ "{projectRoot}/{framework}.*.config.js",
18
+ "{projectRoot}/{framework}.config.cjs",
19
+ "{projectRoot}/{framework}.*.config.cjs",
20
+ "{projectRoot}/{framework}.config.mjs",
21
+ "{projectRoot}/{framework}.*.config.mjs",
22
+ "{projectRoot}/{framework}.config.ts",
23
+ "{projectRoot}/{framework}.*.config.ts",
24
+ "{projectRoot}/{framework}.config.cts",
25
+ "{projectRoot}/{framework}.*.config.cts",
26
+ "{projectRoot}/{framework}.config.mts",
27
+ "{projectRoot}/{framework}.*.config.mts"
28
+ ];
29
+
30
+ export { CONFIG_INPUTS };
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-WMZ45WVV.mjs';
1
+ import { withExecutor } from './chunk-5KEIBGFG.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1,4 +1,5 @@
1
1
  import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-FMYWKI25.mjs';
2
+ import { CONFIG_INPUTS } from './chunk-LQU7XWFP.mjs';
2
3
  import { __name } from './chunk-O6YSETKJ.mjs';
3
4
  import { createNodesFromFiles } from '@nx/devkit';
4
5
  import { withNamedInputs } from '@storm-software/workspace-tools/utils/nx-json';
@@ -17,36 +18,6 @@ import { readFile } from 'node:fs/promises';
17
18
  import { readNxJson } from 'nx/src/config/nx-json.js';
18
19
  import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
19
20
 
20
- // src/helpers/constants.ts
21
- var CONFIG_INPUTS = [
22
- "{projectRoot}/package.json",
23
- "{projectRoot}/{framework}.json",
24
- "{projectRoot}/{framework}.*.json",
25
- "{projectRoot}/{framework}.jsonc",
26
- "{projectRoot}/{framework}.*.jsonc",
27
- "{projectRoot}/{framework}.json5",
28
- "{projectRoot}/{framework}.*.json5",
29
- "{projectRoot}/{framework}.yaml",
30
- "{projectRoot}/{framework}.*.yaml",
31
- "{projectRoot}/{framework}.yml",
32
- "{projectRoot}/{framework}.*.yml",
33
- "{projectRoot}/{framework}.toml",
34
- "{projectRoot}/{framework}.*.toml",
35
- "{projectRoot}/{framework}.config.js",
36
- "{projectRoot}/{framework}.*.config.js",
37
- "{projectRoot}/{framework}.config.cjs",
38
- "{projectRoot}/{framework}.*.config.cjs",
39
- "{projectRoot}/{framework}.config.mjs",
40
- "{projectRoot}/{framework}.*.config.mjs",
41
- "{projectRoot}/{framework}.config.ts",
42
- "{projectRoot}/{framework}.*.config.ts",
43
- "{projectRoot}/{framework}.config.cts",
44
- "{projectRoot}/{framework}.*.config.cts",
45
- "{projectRoot}/{framework}.config.mts",
46
- "{projectRoot}/{framework}.*.config.mts"
47
- ];
48
-
49
- // src/helpers/plugin-utilities.ts
50
21
  function getNxTargetInputs(framework) {
51
22
  return CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
52
23
  }
@@ -91,7 +62,7 @@ function createNxPlugin(opts) {
91
62
  moduleCache: true
92
63
  });
93
64
  console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
94
- const userConfig = await loadUserConfigFile(joinPaths(contextV2.workspaceRoot, projectRoot), jiti, "build", "development", configFile, framework);
65
+ const userConfig = await loadUserConfigFile(joinPaths(contextV2.workspaceRoot, projectRoot), jiti, "build", "development", joinPaths(contextV2.workspaceRoot, configFile), framework);
95
66
  if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
96
67
  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.`);
97
68
  return {};
@@ -324,9 +295,4 @@ function createNxPlugin(opts) {
324
295
  }
325
296
  __name(createNxPlugin, "createNxPlugin");
326
297
 
327
- // src/plugin/index.ts
328
- var createNodesV2 = createNxPlugin({
329
- framework: "powerlines"
330
- });
331
-
332
- export { createNodesV2 };
298
+ export { createNxPlugin, getNxPluginInputs, getNxTargetInputs };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32RH3DSY_js = require('./chunk-32RH3DSY.js');
3
+ var chunkFBZEUICY_js = require('./chunk-FBZEUICY.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 = chunk32RH3DSY_js.withExecutor("clean", executorFn);
14
+ var executor = chunkFBZEUICY_js.withExecutor("clean", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkLTCZN4I4_js = require('./chunk-LTCZN4I4.js');
4
+ var chunkVIU4CXA3_js = require('./chunk-VIU4CXA3.js');
4
5
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
6
  var devkit = require('@nx/devkit');
6
7
  var nxJson = require('@storm-software/workspace-tools/utils/nx-json');
@@ -23,38 +24,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
23
24
 
24
25
  var defu__default = /*#__PURE__*/_interopDefault(defu);
25
26
 
26
- // src/helpers/constants.ts
27
- var CONFIG_INPUTS = [
28
- "{projectRoot}/package.json",
29
- "{projectRoot}/{framework}.json",
30
- "{projectRoot}/{framework}.*.json",
31
- "{projectRoot}/{framework}.jsonc",
32
- "{projectRoot}/{framework}.*.jsonc",
33
- "{projectRoot}/{framework}.json5",
34
- "{projectRoot}/{framework}.*.json5",
35
- "{projectRoot}/{framework}.yaml",
36
- "{projectRoot}/{framework}.*.yaml",
37
- "{projectRoot}/{framework}.yml",
38
- "{projectRoot}/{framework}.*.yml",
39
- "{projectRoot}/{framework}.toml",
40
- "{projectRoot}/{framework}.*.toml",
41
- "{projectRoot}/{framework}.config.js",
42
- "{projectRoot}/{framework}.*.config.js",
43
- "{projectRoot}/{framework}.config.cjs",
44
- "{projectRoot}/{framework}.*.config.cjs",
45
- "{projectRoot}/{framework}.config.mjs",
46
- "{projectRoot}/{framework}.*.config.mjs",
47
- "{projectRoot}/{framework}.config.ts",
48
- "{projectRoot}/{framework}.*.config.ts",
49
- "{projectRoot}/{framework}.config.cts",
50
- "{projectRoot}/{framework}.*.config.cts",
51
- "{projectRoot}/{framework}.config.mts",
52
- "{projectRoot}/{framework}.*.config.mts"
53
- ];
54
-
55
- // src/helpers/plugin-utilities.ts
56
27
  function getNxTargetInputs(framework) {
57
- return CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
28
+ return chunkVIU4CXA3_js.CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
58
29
  }
59
30
  chunkSHUYVCID_js.__name(getNxTargetInputs, "getNxTargetInputs");
60
31
  function getNxPluginInputs(framework) {
@@ -97,7 +68,7 @@ function createNxPlugin(opts) {
97
68
  moduleCache: true
98
69
  });
99
70
  console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
100
- const userConfig = await chunkLTCZN4I4_js.loadUserConfigFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), jiti$1, "build", "development", configFile, framework);
71
+ const userConfig = await chunkLTCZN4I4_js.loadUserConfigFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), jiti$1, "build", "development", joinPaths.joinPaths(contextV2.workspaceRoot, configFile), framework);
101
72
  if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
102
73
  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.`);
103
74
  return {};
@@ -330,9 +301,6 @@ function createNxPlugin(opts) {
330
301
  }
331
302
  chunkSHUYVCID_js.__name(createNxPlugin, "createNxPlugin");
332
303
 
333
- // src/plugin/index.ts
334
- var createNodesV2 = createNxPlugin({
335
- framework: "powerlines"
336
- });
337
-
338
- exports.createNodesV2 = createNodesV2;
304
+ exports.createNxPlugin = createNxPlugin;
305
+ exports.getNxPluginInputs = getNxPluginInputs;
306
+ exports.getNxTargetInputs = getNxTargetInputs;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-WMZ45WVV.mjs';
1
+ import { withExecutor } from './chunk-5KEIBGFG.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/lint/executor.ts
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ // src/helpers/constants.ts
4
+ var CONFIG_INPUTS = [
5
+ "{projectRoot}/package.json",
6
+ "{projectRoot}/{framework}.json",
7
+ "{projectRoot}/{framework}.*.json",
8
+ "{projectRoot}/{framework}.jsonc",
9
+ "{projectRoot}/{framework}.*.jsonc",
10
+ "{projectRoot}/{framework}.json5",
11
+ "{projectRoot}/{framework}.*.json5",
12
+ "{projectRoot}/{framework}.yaml",
13
+ "{projectRoot}/{framework}.*.yaml",
14
+ "{projectRoot}/{framework}.yml",
15
+ "{projectRoot}/{framework}.*.yml",
16
+ "{projectRoot}/{framework}.toml",
17
+ "{projectRoot}/{framework}.*.toml",
18
+ "{projectRoot}/{framework}.config.js",
19
+ "{projectRoot}/{framework}.*.config.js",
20
+ "{projectRoot}/{framework}.config.cjs",
21
+ "{projectRoot}/{framework}.*.config.cjs",
22
+ "{projectRoot}/{framework}.config.mjs",
23
+ "{projectRoot}/{framework}.*.config.mjs",
24
+ "{projectRoot}/{framework}.config.ts",
25
+ "{projectRoot}/{framework}.*.config.ts",
26
+ "{projectRoot}/{framework}.config.cts",
27
+ "{projectRoot}/{framework}.*.config.cts",
28
+ "{projectRoot}/{framework}.config.mts",
29
+ "{projectRoot}/{framework}.*.config.mts"
30
+ ];
31
+
32
+ exports.CONFIG_INPUTS = CONFIG_INPUTS;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32RH3DSY_js = require('./chunk-32RH3DSY.js');
3
+ var chunkFBZEUICY_js = require('./chunk-FBZEUICY.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 = chunk32RH3DSY_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkFBZEUICY_js.withExecutor("prepare", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;