@powerlines/nx 0.10.31 → 0.10.33

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 (98) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-YG5D4X3W.js → chunk-52F2VAZ4.js} +2 -2
  3. package/dist/{chunk-2YSHMNU6.js → chunk-62X6DTK2.js} +2 -2
  4. package/dist/{chunk-XPEFTYN7.js → chunk-AL6L2GI6.js} +1 -2
  5. package/dist/{chunk-TCSCYVA7.mjs → chunk-APCOW5YO.mjs} +1 -2
  6. package/dist/{chunk-Y4WK22DY.mjs → chunk-BKHO25SD.mjs} +1 -1
  7. package/dist/{chunk-2QODXI3V.mjs → chunk-BO2YKBTG.mjs} +1 -1
  8. package/dist/{chunk-2UW4PA4Y.js → chunk-BRNX6NQ7.js} +2 -2
  9. package/dist/{chunk-ED7GH5H4.js → chunk-BWVCZGFR.js} +2 -2
  10. package/dist/{chunk-FK3VJFET.mjs → chunk-D6KBHWGQ.mjs} +1 -1
  11. package/dist/{chunk-DMX7BNND.mjs → chunk-ELKTVKQE.mjs} +0 -6
  12. package/dist/{chunk-AGUPR7C3.mjs → chunk-G63W354C.mjs} +36 -65
  13. package/dist/{chunk-D6KBOOKZ.js → chunk-HUNDXZTR.js} +2 -2
  14. package/dist/{chunk-MAMHMV35.js → chunk-KJ7BGCHK.js} +0 -6
  15. package/dist/{chunk-TIDDTFWJ.mjs → chunk-LRF7ATT4.mjs} +1 -1
  16. package/dist/{chunk-CPDIOMH7.js → chunk-OWK7QDUZ.js} +2 -2
  17. package/dist/{chunk-Z3KQWFB5.mjs → chunk-RRWNDFKP.mjs} +1 -1
  18. package/dist/{chunk-ELVLMD65.js → chunk-S26F2QP7.js} +44 -73
  19. package/dist/{chunk-QGJHTMIZ.js → chunk-VACG7DQ3.js} +2 -2
  20. package/dist/{chunk-6T6QXRBF.mjs → chunk-Z2YDTW4O.mjs} +1 -1
  21. package/dist/{chunk-4LBBINGO.mjs → chunk-ZDEJ2BGF.mjs} +1 -1
  22. package/dist/{executor-CIEyQL42.d.mts → executor-BR_IsTyX.d.mts} +0 -1
  23. package/dist/{executor-BYGMOBlU.d.mts → executor-BeiE4hj2.d.mts} +0 -1
  24. package/dist/{executor-D0PJOQkn.d.mts → executor-BwoBnP5U.d.mts} +0 -1
  25. package/dist/{executor-DsRaA9mk.d.mts → executor-CBfO0S0X.d.mts} +0 -1
  26. package/dist/{executor-Ba95I3EK.d.mts → executor-CKKx8c3Y.d.mts} +0 -1
  27. package/dist/{executor-B2Y0F4JC.d.ts → executor-CYRhjgX1.d.ts} +0 -1
  28. package/dist/{executor-D055lNr2.d.ts → executor-Cq17c8hB.d.ts} +0 -1
  29. package/dist/{executor-BHIUeaip.d.ts → executor-CvXGN437.d.ts} +0 -1
  30. package/dist/{executor-BAcpDLQu.d.ts → executor-DKXf5LeR.d.ts} +0 -1
  31. package/dist/{executor-CkqLFUNx.d.ts → executor-Zks_mL9A.d.ts} +0 -1
  32. package/dist/executors.d.mts +5 -5
  33. package/dist/executors.d.ts +5 -5
  34. package/dist/executors.js +11 -11
  35. package/dist/executors.mjs +6 -6
  36. package/dist/index.d.mts +5 -5
  37. package/dist/index.d.ts +5 -5
  38. package/dist/index.js +14 -14
  39. package/dist/index.mjs +8 -8
  40. package/dist/src/base/base-executor.js +2 -2
  41. package/dist/src/base/base-executor.mjs +1 -1
  42. package/dist/src/base/base-executor.schema.d.d.mts +0 -1
  43. package/dist/src/base/base-executor.schema.d.d.ts +0 -1
  44. package/dist/src/base/base-executor.schema.d.ts +0 -1
  45. package/dist/src/base/base-executor.schema.json +1 -3
  46. package/dist/src/base/base-executor.untyped.js +2 -2
  47. package/dist/src/base/base-executor.untyped.mjs +1 -1
  48. package/dist/src/executors/build/executor.d.mts +1 -1
  49. package/dist/src/executors/build/executor.d.ts +1 -1
  50. package/dist/src/executors/build/executor.js +4 -4
  51. package/dist/src/executors/build/executor.mjs +2 -2
  52. package/dist/src/executors/build/schema.d.ts +0 -1
  53. package/dist/src/executors/build/schema.json +1 -3
  54. package/dist/src/executors/build/untyped.js +3 -3
  55. package/dist/src/executors/build/untyped.mjs +2 -2
  56. package/dist/src/executors/clean/executor.d.mts +1 -1
  57. package/dist/src/executors/clean/executor.d.ts +1 -1
  58. package/dist/src/executors/clean/executor.js +4 -4
  59. package/dist/src/executors/clean/executor.mjs +2 -2
  60. package/dist/src/executors/clean/schema.d.ts +0 -1
  61. package/dist/src/executors/clean/schema.json +1 -3
  62. package/dist/src/executors/clean/untyped.js +2 -2
  63. package/dist/src/executors/clean/untyped.mjs +1 -1
  64. package/dist/src/executors/docs/executor.d.mts +1 -1
  65. package/dist/src/executors/docs/executor.d.ts +1 -1
  66. package/dist/src/executors/docs/executor.js +4 -4
  67. package/dist/src/executors/docs/executor.mjs +2 -2
  68. package/dist/src/executors/docs/schema.d.ts +0 -1
  69. package/dist/src/executors/docs/schema.json +1 -3
  70. package/dist/src/executors/docs/untyped.js +3 -3
  71. package/dist/src/executors/docs/untyped.mjs +2 -2
  72. package/dist/src/executors/lint/executor.d.mts +1 -1
  73. package/dist/src/executors/lint/executor.d.ts +1 -1
  74. package/dist/src/executors/lint/executor.js +4 -4
  75. package/dist/src/executors/lint/executor.mjs +2 -2
  76. package/dist/src/executors/lint/schema.d.ts +0 -1
  77. package/dist/src/executors/lint/schema.json +1 -3
  78. package/dist/src/executors/lint/untyped.js +3 -3
  79. package/dist/src/executors/lint/untyped.mjs +2 -2
  80. package/dist/src/executors/prepare/executor.d.mts +1 -1
  81. package/dist/src/executors/prepare/executor.d.ts +1 -1
  82. package/dist/src/executors/prepare/executor.js +4 -4
  83. package/dist/src/executors/prepare/executor.mjs +2 -2
  84. package/dist/src/executors/prepare/schema.d.ts +0 -1
  85. package/dist/src/executors/prepare/schema.json +1 -3
  86. package/dist/src/executors/prepare/untyped.js +3 -3
  87. package/dist/src/executors/prepare/untyped.mjs +2 -2
  88. package/dist/src/helpers/plugin-utilities.js +4 -4
  89. package/dist/src/helpers/plugin-utilities.mjs +1 -1
  90. package/dist/src/plugin/index.js +3 -3
  91. package/dist/src/plugin/index.mjs +2 -2
  92. package/docs/api/base-executor.schema.md +0 -1
  93. package/docs/api/build/schema.md +0 -1
  94. package/docs/api/clean/schema.md +0 -1
  95. package/docs/api/docs/schema.md +0 -1
  96. package/docs/api/lint/schema.md +0 -1
  97. package/docs/api/prepare/schema.md +0 -1
  98. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  # Changelog for Powerlines - Nx
4
4
 
5
+ ## [0.10.33](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.33) (11/21/2025)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **nx:** Remove logic to default tsconfig option from Nx plugin
10
+ ([0781f9a](https://github.com/storm-software/powerlines/commit/0781f9a))
11
+
12
+ ### Updated Dependencies
13
+
14
+ - Updated **powerlines** to **v0.24.5**
15
+
16
+ ## [0.10.32](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.32) (11/21/2025)
17
+
18
+ ### Updated Dependencies
19
+
20
+ - Updated **powerlines** to **v0.24.4**
21
+
5
22
  ## [0.10.31](https://github.com/storm-software/powerlines/releases/tag/nx%400.10.31) (11/21/2025)
6
23
 
7
24
  ### Updated Dependencies
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkELVLMD65_js = require('./chunk-ELVLMD65.js');
3
+ var chunkS26F2QP7_js = require('./chunk-S26F2QP7.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 = chunkELVLMD65_js.withExecutor("docs", executorFn);
14
+ var executor = chunkS26F2QP7_js.withExecutor("docs", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkMAMHMV35_js = require('./chunk-MAMHMV35.js');
3
+ var chunkKJ7BGCHK_js = require('./chunk-KJ7BGCHK.js');
4
4
 
5
5
  // src/plugin/index.ts
6
- var createNodesV2 = chunkMAMHMV35_js.createNxPlugin({
6
+ var createNodesV2 = chunkKJ7BGCHK_js.createNxPlugin({
7
7
  framework: "powerlines"
8
8
  });
9
9
 
@@ -22,8 +22,7 @@ var base_executor_untyped_default = untyped.defineUntypedSchema({
22
22
  type: "string",
23
23
  format: "path",
24
24
  description: "The path to the tsconfig file"
25
- },
26
- $default: "{projectRoot}/tsconfig.json"
25
+ }
27
26
  },
28
27
  configFile: {
29
28
  $schema: {
@@ -16,8 +16,7 @@ var base_executor_untyped_default = defineUntypedSchema({
16
16
  type: "string",
17
17
  format: "path",
18
18
  description: "The path to the tsconfig file"
19
- },
20
- $default: "{projectRoot}/tsconfig.json"
19
+ }
21
20
  },
22
21
  configFile: {
23
22
  $schema: {
@@ -1,4 +1,4 @@
1
- import { createNxPlugin } from './chunk-DMX7BNND.mjs';
1
+ import { createNxPlugin } from './chunk-ELKTVKQE.mjs';
2
2
 
3
3
  // src/plugin/index.ts
4
4
  var createNodesV2 = createNxPlugin({
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-AGUPR7C3.mjs';
1
+ import { withExecutor } from './chunk-G63W354C.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkELVLMD65_js = require('./chunk-ELVLMD65.js');
3
+ var chunkS26F2QP7_js = require('./chunk-S26F2QP7.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 = chunkELVLMD65_js.withExecutor("clean", executorFn);
14
+ var executor = chunkS26F2QP7_js.withExecutor("clean", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkXPEFTYN7_js = require('./chunk-XPEFTYN7.js');
3
+ var chunkAL6L2GI6_js = require('./chunk-AL6L2GI6.js');
4
4
  var untyped = require('untyped');
5
5
 
6
6
  var untyped_default = untyped.defineUntypedSchema({
7
- ...chunkXPEFTYN7_js.base_executor_untyped_default,
7
+ ...chunkAL6L2GI6_js.base_executor_untyped_default,
8
8
  $schema: {
9
9
  id: "PrepareExecutorSchema",
10
10
  title: "Prepare Executor",
@@ -1,4 +1,4 @@
1
- import { base_executor_untyped_default } from './chunk-TCSCYVA7.mjs';
1
+ import { base_executor_untyped_default } from './chunk-APCOW5YO.mjs';
2
2
  import { defineUntypedSchema } from 'untyped';
3
3
 
4
4
  var untyped_default = defineUntypedSchema({
@@ -86,7 +86,6 @@ function createNxPlugin(opts) {
86
86
  console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
87
87
  return {};
88
88
  }
89
- const tsconfig = userConfig?.tsconfig || (existsSync(joinPaths(projectRoot, "tsconfig.json")) ? joinPaths(projectRoot, "tsconfig.json") : void 0);
90
89
  const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
91
90
  if (options?.debug) {
92
91
  console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
@@ -139,7 +138,6 @@ function createNxPlugin(opts) {
139
138
  options: {
140
139
  entry: userConfig.entry || "{sourceRoot}/index.ts",
141
140
  projectType: projectConfig.projectType || userConfig.type,
142
- tsconfig,
143
141
  skipInstalls: userConfig.skipInstalls,
144
142
  skipCache: userConfig.skipCache
145
143
  },
@@ -175,7 +173,6 @@ function createNxPlugin(opts) {
175
173
  entry: userConfig.entry || "{sourceRoot}/index.ts",
176
174
  outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
177
175
  projectType: projectConfig.projectType || userConfig.type,
178
- tsconfig,
179
176
  skipInstalls: userConfig.skipInstalls,
180
177
  skipCache: userConfig.skipCache
181
178
  },
@@ -216,7 +213,6 @@ function createNxPlugin(opts) {
216
213
  options: {
217
214
  entry: userConfig.entry || "{sourceRoot}/index.ts",
218
215
  projectType: projectConfig.projectType || userConfig.type,
219
- tsconfig,
220
216
  skipInstalls: userConfig.skipInstalls,
221
217
  skipCache: userConfig.skipCache
222
218
  },
@@ -257,7 +253,6 @@ function createNxPlugin(opts) {
257
253
  options: {
258
254
  entry: userConfig.entry || "{sourceRoot}/index.ts",
259
255
  projectType: projectConfig.projectType || userConfig.type,
260
- tsconfig,
261
256
  skipInstalls: userConfig.skipInstalls,
262
257
  skipCache: userConfig.skipCache
263
258
  },
@@ -298,7 +293,6 @@ function createNxPlugin(opts) {
298
293
  options: {
299
294
  entry: userConfig.entry || "{sourceRoot}/index.ts",
300
295
  projectType: projectConfig.projectType || userConfig.type,
301
- tsconfig,
302
296
  skipInstalls: userConfig.skipInstalls,
303
297
  skipCache: userConfig.skipCache
304
298
  },
@@ -32,9 +32,9 @@ import ts2, { flattenDiagnosticMessageText } from 'typescript';
32
32
  import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
33
33
  import { getObjectDiff } from '@donedeal0/superdiff';
34
34
  import { readJsonFile, readJsonFileSync } from '@stryke/fs/json';
35
- import { loadTsConfig } from '@stryke/fs/tsconfig';
36
35
  import { StormJSON } from '@stryke/json/storm-json';
37
- import { findFilePath, relativePath, findFileName, findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
36
+ import { findFilePath, findFileExtension, relativePath, findFileName, findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
37
+ import { isParentPath } from '@stryke/path/is-parent-path';
38
38
  import { titleCase } from '@stryke/string-format/title-case';
39
39
  import { writeFile as writeFile$1 } from '@stryke/fs/write-file';
40
40
  import { resolveConfig, format } from 'prettier';
@@ -66,7 +66,6 @@ import _fs from 'node:fs';
66
66
  import { getColor } from '@storm-software/config-tools/utilities/colors';
67
67
  import { noop } from '@stryke/helpers/noop';
68
68
  import { slash } from '@stryke/path/slash';
69
- import { isParentPath } from '@stryke/path/is-parent-path';
70
69
  import { Volume } from 'memfs';
71
70
  import { Union } from 'unionfs';
72
71
  import { InMemoryFileSystemHost, Project } from 'ts-morph';
@@ -304,23 +303,39 @@ ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${
304
303
  ]);
305
304
  }
306
305
  __name(installDependencies, "installDependencies");
307
- function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig = "tsconfig.json") {
306
+ function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
307
+ let tsconfigFilePath;
308
+ if (tsconfig) {
309
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
310
+ } else {
311
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.app.json");
312
+ if (!tsconfigFilePath) {
313
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.lib.json");
314
+ if (!tsconfigFilePath) {
315
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.json");
316
+ }
317
+ }
318
+ }
319
+ if (!tsconfigFilePath) {
320
+ throw new Error(`Cannot find the \`tsconfig.json\` configuration file for the project at ${projectRoot}.`);
321
+ }
322
+ return tsconfigFilePath;
323
+ }
324
+ __name(getTsconfigFilePath, "getTsconfigFilePath");
325
+ function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
308
326
  let tsconfigFilePath = tsconfig;
309
327
  if (!existsSync(tsconfigFilePath)) {
310
328
  tsconfigFilePath = appendPath(tsconfig, projectRoot);
311
329
  if (!existsSync(tsconfigFilePath)) {
312
- tsconfigFilePath = appendPath(tsconfig, workspaceRoot);
330
+ tsconfigFilePath = appendPath(tsconfig, appendPath(projectRoot, workspaceRoot));
313
331
  if (!existsSync(tsconfigFilePath)) {
314
- tsconfigFilePath = appendPath(tsconfig, joinPaths$1(workspaceRoot, projectRoot));
315
- if (!existsSync(tsconfigFilePath)) {
316
- throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${tsconfig}, ${appendPath(tsconfig, projectRoot)}, ${appendPath(tsconfig, workspaceRoot)}, or ${tsconfigFilePath}`);
317
- }
332
+ return void 0;
318
333
  }
319
334
  }
320
335
  }
321
336
  return tsconfigFilePath;
322
337
  }
323
- __name(getTsconfigFilePath, "getTsconfigFilePath");
338
+ __name(tryTsconfigFilePath, "tryTsconfigFilePath");
324
339
  function findMatch(tsconfigType, types, extensions = [
325
340
  ".ts",
326
341
  ".tsx",
@@ -411,22 +426,14 @@ async function resolveTsconfigChanges(context) {
411
426
  const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
412
427
  const tsconfigJson = await readJsonFile(tsconfigFilePath);
413
428
  tsconfigJson.compilerOptions ??= {};
414
- const extendedTsconfig = await loadTsConfig(tsconfigFilePath);
415
- extendedTsconfig.compilerOptions ??= {};
416
- if (tsconfigJson.reflection !== true) {
417
- tsconfigJson.reflection = true;
418
- }
419
- if (tsconfig.options.experimentalDecorators !== true) {
420
- tsconfigJson.compilerOptions.experimentalDecorators = true;
421
- }
422
- if (tsconfig.options.emitDecoratorMetadata !== true) {
423
- tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
424
- }
425
- if (context.config.output.dts) {
426
- const dtsFilePath = context.config.output.dts ? context.config.output.dts.startsWith(context.workspaceConfig.workspaceRoot) ? context.config.output.dts : joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.output.dts) : joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.projectRoot, "storm.d.ts");
427
- const dtsRelativePath = joinPaths$1(relativePath(joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.projectRoot), findFilePath(dtsFilePath)), findFileName(dtsFilePath));
429
+ if (context.config.output.dts !== false) {
430
+ context.config.output.dts = context.config.output.dts ? isParentPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) ? context.config.output.dts : appendPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) : appendPath(context.config.projectRoot, context.workspaceConfig.workspaceRoot);
431
+ if (findFileExtension(context.config.output.dts) !== "d.ts" && findFileExtension(context.config.output.dts) !== "d.cts" && findFileExtension(context.config.output.dts) !== "d.mts") {
432
+ context.config.output.dts = joinPaths$1(context.config.output.dts, "powerlines.d.ts");
433
+ }
434
+ const dtsRelativePath = joinPaths$1(relativePath(joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.projectRoot), findFilePath(context.config.output.dts)), findFileName(context.config.output.dts));
428
435
  if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [
429
- dtsFilePath,
436
+ String(context.config.output.dts),
430
437
  dtsRelativePath,
431
438
  "storm.d.ts"
432
439
  ]))) {
@@ -461,49 +468,13 @@ async function resolveTsconfigChanges(context) {
461
468
  if (tsconfig.options.moduleDetection !== ts2.ModuleDetectionKind.Force) {
462
469
  tsconfigJson.compilerOptions.moduleDetection = "force";
463
470
  }
464
- if (tsconfig.options.allowSyntheticDefaultImports !== true) {
465
- tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;
466
- }
467
- if (tsconfig.options.noImplicitOverride !== true) {
468
- tsconfigJson.compilerOptions.noImplicitOverride = true;
469
- }
470
- if (tsconfig.options.noUncheckedIndexedAccess !== true) {
471
- tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;
472
- }
473
- if (tsconfig.options.skipLibCheck !== true) {
474
- tsconfigJson.compilerOptions.skipLibCheck = true;
475
- }
476
- if (tsconfig.options.resolveJsonModule !== true) {
477
- tsconfigJson.compilerOptions.resolveJsonModule = true;
478
- }
479
- if (tsconfig.options.isolatedModules !== true) {
480
- tsconfigJson.compilerOptions.isolatedModules = true;
481
- }
482
- if (tsconfig.options.verbatimModuleSyntax !== false) {
483
- tsconfigJson.compilerOptions.verbatimModuleSyntax = false;
484
- }
485
- if (tsconfig.options.allowJs !== true) {
486
- tsconfigJson.compilerOptions.allowJs = true;
487
- }
488
471
  if (tsconfig.options.esModuleInterop !== true) {
489
472
  tsconfigJson.compilerOptions.esModuleInterop = true;
490
473
  }
491
- if (tsconfig.options.declaration !== true) {
492
- tsconfigJson.compilerOptions.declaration = true;
474
+ if (tsconfig.options.isolatedModules !== true) {
475
+ tsconfigJson.compilerOptions.isolatedModules = true;
493
476
  }
494
- if (context.environment.consumer === "client") {
495
- if (tsconfig.options.jsx !== ts2.JsxEmit.ReactJSX) {
496
- tsconfigJson.compilerOptions.jsx = "react-jsx";
497
- }
498
- if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom")) {
499
- tsconfigJson.compilerOptions.lib ??= [];
500
- tsconfigJson.compilerOptions.lib.push("dom");
501
- }
502
- if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom.iterable")) {
503
- tsconfigJson.compilerOptions.lib ??= [];
504
- tsconfigJson.compilerOptions.lib.push("dom.iterable");
505
- }
506
- } else if (context.config.build.platform === "node") {
477
+ if (context.config.build.platform === "node") {
507
478
  if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
508
479
  tsconfigJson.compilerOptions.types ??= [];
509
480
  tsconfigJson.compilerOptions.types.push("node");
@@ -2948,6 +2919,7 @@ var PowerlinesContext = class _PowerlinesContext {
2948
2919
  userConfig
2949
2920
  });
2950
2921
  }
2922
+ this.config.tsconfig ??= getTsconfigFilePath(this.workspaceConfig.workspaceRoot, cacheKey.projectRoot, config.tsconfig);
2951
2923
  if (isSetObject(config)) {
2952
2924
  this.resolvedConfig = defu5({
2953
2925
  inlineConfig: this.config.inlineConfig,
@@ -2963,7 +2935,6 @@ var PowerlinesContext = class _PowerlinesContext {
2963
2935
  name: this.projectJson?.name || this.packageJson?.name,
2964
2936
  version: this.packageJson?.version,
2965
2937
  description: this.packageJson?.description,
2966
- tsconfig: appendPath("tsconfig.json", cacheKey.projectRoot),
2967
2938
  sourceRoot: this.projectJson?.sourceRoot || appendPath("src", cacheKey.projectRoot),
2968
2939
  output: {
2969
2940
  outputPath: cacheKey.projectRoot ? joinPaths(this.workspaceConfig?.directories?.build || "dist", cacheKey.projectRoot) : this.workspaceConfig?.directories?.build || "dist",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkELVLMD65_js = require('./chunk-ELVLMD65.js');
3
+ var chunkS26F2QP7_js = require('./chunk-S26F2QP7.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 = chunkELVLMD65_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkS26F2QP7_js.withExecutor("prepare", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -92,7 +92,6 @@ function createNxPlugin(opts) {
92
92
  console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
93
93
  return {};
94
94
  }
95
- const tsconfig = userConfig?.tsconfig || (exists.existsSync(joinPaths.joinPaths(projectRoot, "tsconfig.json")) ? joinPaths.joinPaths(projectRoot, "tsconfig.json") : void 0);
96
95
  const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
97
96
  if (options?.debug) {
98
97
  console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
@@ -145,7 +144,6 @@ function createNxPlugin(opts) {
145
144
  options: {
146
145
  entry: userConfig.entry || "{sourceRoot}/index.ts",
147
146
  projectType: projectConfig.projectType || userConfig.type,
148
- tsconfig,
149
147
  skipInstalls: userConfig.skipInstalls,
150
148
  skipCache: userConfig.skipCache
151
149
  },
@@ -181,7 +179,6 @@ function createNxPlugin(opts) {
181
179
  entry: userConfig.entry || "{sourceRoot}/index.ts",
182
180
  outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
183
181
  projectType: projectConfig.projectType || userConfig.type,
184
- tsconfig,
185
182
  skipInstalls: userConfig.skipInstalls,
186
183
  skipCache: userConfig.skipCache
187
184
  },
@@ -222,7 +219,6 @@ function createNxPlugin(opts) {
222
219
  options: {
223
220
  entry: userConfig.entry || "{sourceRoot}/index.ts",
224
221
  projectType: projectConfig.projectType || userConfig.type,
225
- tsconfig,
226
222
  skipInstalls: userConfig.skipInstalls,
227
223
  skipCache: userConfig.skipCache
228
224
  },
@@ -263,7 +259,6 @@ function createNxPlugin(opts) {
263
259
  options: {
264
260
  entry: userConfig.entry || "{sourceRoot}/index.ts",
265
261
  projectType: projectConfig.projectType || userConfig.type,
266
- tsconfig,
267
262
  skipInstalls: userConfig.skipInstalls,
268
263
  skipCache: userConfig.skipCache
269
264
  },
@@ -304,7 +299,6 @@ function createNxPlugin(opts) {
304
299
  options: {
305
300
  entry: userConfig.entry || "{sourceRoot}/index.ts",
306
301
  projectType: projectConfig.projectType || userConfig.type,
307
- tsconfig,
308
302
  skipInstalls: userConfig.skipInstalls,
309
303
  skipCache: userConfig.skipCache
310
304
  },
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-AGUPR7C3.mjs';
1
+ import { withExecutor } from './chunk-G63W354C.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 chunkELVLMD65_js = require('./chunk-ELVLMD65.js');
3
+ var chunkS26F2QP7_js = require('./chunk-S26F2QP7.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 = chunkELVLMD65_js.withExecutor("lint", executorFn);
14
+ var executor = chunkS26F2QP7_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-AGUPR7C3.mjs';
1
+ import { withExecutor } from './chunk-G63W354C.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -34,9 +34,9 @@ var ts2 = require('typescript');
34
34
  var _package = require('@stryke/string-format/package');
35
35
  var superdiff = require('@donedeal0/superdiff');
36
36
  var json = require('@stryke/fs/json');
37
- var tsconfig = require('@stryke/fs/tsconfig');
38
37
  var stormJson = require('@stryke/json/storm-json');
39
38
  var filePathFns = require('@stryke/path/file-path-fns');
39
+ var isParentPath = require('@stryke/path/is-parent-path');
40
40
  var titleCase = require('@stryke/string-format/title-case');
41
41
  var writeFile$1 = require('@stryke/fs/write-file');
42
42
  var prettier = require('prettier');
@@ -68,7 +68,6 @@ var _fs = require('fs');
68
68
  var colors = require('@storm-software/config-tools/utilities/colors');
69
69
  var noop = require('@stryke/helpers/noop');
70
70
  var slash = require('@stryke/path/slash');
71
- var isParentPath = require('@stryke/path/is-parent-path');
72
71
  var memfs = require('memfs');
73
72
  var unionfs = require('unionfs');
74
73
  var tsMorph = require('ts-morph');
@@ -334,23 +333,39 @@ ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${
334
333
  ]);
335
334
  }
336
335
  chunkSHUYVCID_js.__name(installDependencies, "installDependencies");
337
- function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig = "tsconfig.json") {
336
+ function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
337
+ let tsconfigFilePath;
338
+ if (tsconfig) {
339
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
340
+ } else {
341
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.app.json");
342
+ if (!tsconfigFilePath) {
343
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.lib.json");
344
+ if (!tsconfigFilePath) {
345
+ tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.json");
346
+ }
347
+ }
348
+ }
349
+ if (!tsconfigFilePath) {
350
+ throw new Error(`Cannot find the \`tsconfig.json\` configuration file for the project at ${projectRoot}.`);
351
+ }
352
+ return tsconfigFilePath;
353
+ }
354
+ chunkSHUYVCID_js.__name(getTsconfigFilePath, "getTsconfigFilePath");
355
+ function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
338
356
  let tsconfigFilePath = tsconfig;
339
357
  if (!exists.existsSync(tsconfigFilePath)) {
340
358
  tsconfigFilePath = append.appendPath(tsconfig, projectRoot);
341
359
  if (!exists.existsSync(tsconfigFilePath)) {
342
- tsconfigFilePath = append.appendPath(tsconfig, workspaceRoot);
360
+ tsconfigFilePath = append.appendPath(tsconfig, append.appendPath(projectRoot, workspaceRoot));
343
361
  if (!exists.existsSync(tsconfigFilePath)) {
344
- tsconfigFilePath = append.appendPath(tsconfig, joinPaths.joinPaths(workspaceRoot, projectRoot));
345
- if (!exists.existsSync(tsconfigFilePath)) {
346
- throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${tsconfig}, ${append.appendPath(tsconfig, projectRoot)}, ${append.appendPath(tsconfig, workspaceRoot)}, or ${tsconfigFilePath}`);
347
- }
362
+ return void 0;
348
363
  }
349
364
  }
350
365
  }
351
366
  return tsconfigFilePath;
352
367
  }
353
- chunkSHUYVCID_js.__name(getTsconfigFilePath, "getTsconfigFilePath");
368
+ chunkSHUYVCID_js.__name(tryTsconfigFilePath, "tryTsconfigFilePath");
354
369
  function findMatch(tsconfigType, types, extensions = [
355
370
  ".ts",
356
371
  ".tsx",
@@ -437,26 +452,18 @@ chunkSHUYVCID_js.__name(writeFile, "writeFile");
437
452
 
438
453
  // ../powerlines/src/internal/helpers/resolve-tsconfig.ts
439
454
  async function resolveTsconfigChanges(context) {
440
- const tsconfig$1 = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig, context.config.tsconfigRaw);
455
+ const tsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig, context.config.tsconfigRaw);
441
456
  const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
442
457
  const tsconfigJson = await json.readJsonFile(tsconfigFilePath);
443
458
  tsconfigJson.compilerOptions ??= {};
444
- const extendedTsconfig = await tsconfig.loadTsConfig(tsconfigFilePath);
445
- extendedTsconfig.compilerOptions ??= {};
446
- if (tsconfigJson.reflection !== true) {
447
- tsconfigJson.reflection = true;
448
- }
449
- if (tsconfig$1.options.experimentalDecorators !== true) {
450
- tsconfigJson.compilerOptions.experimentalDecorators = true;
451
- }
452
- if (tsconfig$1.options.emitDecoratorMetadata !== true) {
453
- tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
454
- }
455
- if (context.config.output.dts) {
456
- const dtsFilePath = context.config.output.dts ? context.config.output.dts.startsWith(context.workspaceConfig.workspaceRoot) ? context.config.output.dts : joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.dts) : joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, "storm.d.ts");
457
- const dtsRelativePath = joinPaths.joinPaths(filePathFns.relativePath(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), filePathFns.findFilePath(dtsFilePath)), filePathFns.findFileName(dtsFilePath));
459
+ if (context.config.output.dts !== false) {
460
+ context.config.output.dts = context.config.output.dts ? isParentPath.isParentPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) ? context.config.output.dts : append.appendPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) : append.appendPath(context.config.projectRoot, context.workspaceConfig.workspaceRoot);
461
+ if (filePathFns.findFileExtension(context.config.output.dts) !== "d.ts" && filePathFns.findFileExtension(context.config.output.dts) !== "d.cts" && filePathFns.findFileExtension(context.config.output.dts) !== "d.mts") {
462
+ context.config.output.dts = joinPaths.joinPaths(context.config.output.dts, "powerlines.d.ts");
463
+ }
464
+ const dtsRelativePath = joinPaths.joinPaths(filePathFns.relativePath(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), filePathFns.findFilePath(context.config.output.dts)), filePathFns.findFileName(context.config.output.dts));
458
465
  if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [
459
- dtsFilePath,
466
+ String(context.config.output.dts),
460
467
  dtsRelativePath,
461
468
  "storm.d.ts"
462
469
  ]))) {
@@ -464,7 +471,7 @@ async function resolveTsconfigChanges(context) {
464
471
  tsconfigJson.include.push(dtsRelativePath.startsWith("./") ? dtsRelativePath.slice(2) : dtsRelativePath);
465
472
  }
466
473
  }
467
- if (!tsconfig$1.options.lib?.some((lib) => [
474
+ if (!tsconfig.options.lib?.some((lib) => [
468
475
  "lib.esnext.d.ts",
469
476
  "lib.es2021.d.ts",
470
477
  "lib.es2022.d.ts",
@@ -473,68 +480,32 @@ async function resolveTsconfigChanges(context) {
473
480
  tsconfigJson.compilerOptions.lib ??= [];
474
481
  tsconfigJson.compilerOptions.lib.push("esnext");
475
482
  }
476
- if (tsconfig$1.options.module !== ts2__default.default.ModuleKind.ESNext) {
483
+ if (tsconfig.options.module !== ts2__default.default.ModuleKind.ESNext) {
477
484
  tsconfigJson.compilerOptions.module = "ESNext";
478
485
  }
479
- if (!tsconfig$1.options.target || ![
486
+ if (!tsconfig.options.target || ![
480
487
  ts2__default.default.ScriptTarget.ESNext,
481
488
  ts2__default.default.ScriptTarget.ES2024,
482
489
  ts2__default.default.ScriptTarget.ES2023,
483
490
  ts2__default.default.ScriptTarget.ES2022,
484
491
  ts2__default.default.ScriptTarget.ES2021
485
- ].includes(tsconfig$1.options.target)) {
492
+ ].includes(tsconfig.options.target)) {
486
493
  tsconfigJson.compilerOptions.target = "ESNext";
487
494
  }
488
- if (tsconfig$1.options.moduleResolution !== ts2__default.default.ModuleResolutionKind.Bundler) {
495
+ if (tsconfig.options.moduleResolution !== ts2__default.default.ModuleResolutionKind.Bundler) {
489
496
  tsconfigJson.compilerOptions.moduleResolution = "Bundler";
490
497
  }
491
- if (tsconfig$1.options.moduleDetection !== ts2__default.default.ModuleDetectionKind.Force) {
498
+ if (tsconfig.options.moduleDetection !== ts2__default.default.ModuleDetectionKind.Force) {
492
499
  tsconfigJson.compilerOptions.moduleDetection = "force";
493
500
  }
494
- if (tsconfig$1.options.allowSyntheticDefaultImports !== true) {
495
- tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;
496
- }
497
- if (tsconfig$1.options.noImplicitOverride !== true) {
498
- tsconfigJson.compilerOptions.noImplicitOverride = true;
499
- }
500
- if (tsconfig$1.options.noUncheckedIndexedAccess !== true) {
501
- tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;
502
- }
503
- if (tsconfig$1.options.skipLibCheck !== true) {
504
- tsconfigJson.compilerOptions.skipLibCheck = true;
505
- }
506
- if (tsconfig$1.options.resolveJsonModule !== true) {
507
- tsconfigJson.compilerOptions.resolveJsonModule = true;
508
- }
509
- if (tsconfig$1.options.isolatedModules !== true) {
510
- tsconfigJson.compilerOptions.isolatedModules = true;
511
- }
512
- if (tsconfig$1.options.verbatimModuleSyntax !== false) {
513
- tsconfigJson.compilerOptions.verbatimModuleSyntax = false;
514
- }
515
- if (tsconfig$1.options.allowJs !== true) {
516
- tsconfigJson.compilerOptions.allowJs = true;
517
- }
518
- if (tsconfig$1.options.esModuleInterop !== true) {
501
+ if (tsconfig.options.esModuleInterop !== true) {
519
502
  tsconfigJson.compilerOptions.esModuleInterop = true;
520
503
  }
521
- if (tsconfig$1.options.declaration !== true) {
522
- tsconfigJson.compilerOptions.declaration = true;
504
+ if (tsconfig.options.isolatedModules !== true) {
505
+ tsconfigJson.compilerOptions.isolatedModules = true;
523
506
  }
524
- if (context.environment.consumer === "client") {
525
- if (tsconfig$1.options.jsx !== ts2__default.default.JsxEmit.ReactJSX) {
526
- tsconfigJson.compilerOptions.jsx = "react-jsx";
527
- }
528
- if (!tsconfig$1.options.lib?.some((lib) => lib.toLowerCase() !== "dom")) {
529
- tsconfigJson.compilerOptions.lib ??= [];
530
- tsconfigJson.compilerOptions.lib.push("dom");
531
- }
532
- if (!tsconfig$1.options.lib?.some((lib) => lib.toLowerCase() !== "dom.iterable")) {
533
- tsconfigJson.compilerOptions.lib ??= [];
534
- tsconfigJson.compilerOptions.lib.push("dom.iterable");
535
- }
536
- } else if (context.config.build.platform === "node") {
537
- if (!tsconfig$1.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
507
+ if (context.config.build.platform === "node") {
508
+ if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
538
509
  tsconfigJson.compilerOptions.types ??= [];
539
510
  tsconfigJson.compilerOptions.types.push("node");
540
511
  }
@@ -2978,6 +2949,7 @@ var PowerlinesContext = class _PowerlinesContext {
2978
2949
  userConfig
2979
2950
  });
2980
2951
  }
2952
+ this.config.tsconfig ??= getTsconfigFilePath(this.workspaceConfig.workspaceRoot, cacheKey.projectRoot, config.tsconfig);
2981
2953
  if (isSetObject.isSetObject(config)) {
2982
2954
  this.resolvedConfig = defu5__default.default({
2983
2955
  inlineConfig: this.config.inlineConfig,
@@ -2993,7 +2965,6 @@ var PowerlinesContext = class _PowerlinesContext {
2993
2965
  name: this.projectJson?.name || this.packageJson?.name,
2994
2966
  version: this.packageJson?.version,
2995
2967
  description: this.packageJson?.description,
2996
- tsconfig: append.appendPath("tsconfig.json", cacheKey.projectRoot),
2997
2968
  sourceRoot: this.projectJson?.sourceRoot || append.appendPath("src", cacheKey.projectRoot),
2998
2969
  output: {
2999
2970
  outputPath: cacheKey.projectRoot ? join.joinPaths(this.workspaceConfig?.directories?.build || "dist", cacheKey.projectRoot) : this.workspaceConfig?.directories?.build || "dist",