@powerlines/nx 0.10.26 → 0.10.28

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 (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-ACE6O62X.js → chunk-2PYUYDPD.js} +11 -11
  3. package/dist/{chunk-6WVDB4DZ.js → chunk-2YSHMNU6.js} +2 -2
  4. package/dist/{chunk-ONWCIW2E.mjs → chunk-5WHBT2BW.mjs} +1 -1
  5. package/dist/{chunk-PJYRCGK4.js → chunk-7E3PRE6W.js} +2 -2
  6. package/dist/{chunk-6UH4EGMN.mjs → chunk-DLZ7E67Y.mjs} +1 -1
  7. package/dist/{chunk-BXKPRYNH.mjs → chunk-DMX7BNND.mjs} +22 -14
  8. package/dist/{chunk-7TPTVC3S.js → chunk-GVA7U7C4.js} +2 -2
  9. package/dist/{chunk-2SFOQMAA.js → chunk-HLYNF7YE.js} +533 -654
  10. package/dist/{chunk-B5L3T46G.js → chunk-HVWVP6CD.js} +2 -2
  11. package/dist/{chunk-JPTGZQLU.js → chunk-MAMHMV35.js} +22 -14
  12. package/dist/{chunk-A26KXB6A.js → chunk-ND7VF7PZ.js} +2 -2
  13. package/dist/{chunk-4A6Y7MGQ.js → chunk-PM5JBU7Z.js} +2 -2
  14. package/dist/{chunk-IAWSQ5AX.mjs → chunk-QE2RQBEB.mjs} +527 -648
  15. package/dist/{chunk-Z22G7IM3.mjs → chunk-RIM7CNHX.mjs} +1 -1
  16. package/dist/{chunk-KCL7KVDF.mjs → chunk-VQX5TBLP.mjs} +1 -1
  17. package/dist/{chunk-X6GFPXO4.mjs → chunk-WGIN2BGP.mjs} +11 -11
  18. package/dist/{chunk-L46S3DXB.mjs → chunk-Y4WK22DY.mjs} +1 -1
  19. package/dist/{chunk-A7SAZMVH.mjs → chunk-ZIBEDH47.mjs} +1 -1
  20. package/dist/executors.js +14 -14
  21. package/dist/executors.mjs +7 -7
  22. package/dist/index.js +17 -17
  23. package/dist/index.mjs +9 -9
  24. package/dist/src/base/base-executor.js +3 -3
  25. package/dist/src/base/base-executor.mjs +2 -2
  26. package/dist/src/executors/build/executor.js +5 -5
  27. package/dist/src/executors/build/executor.mjs +3 -3
  28. package/dist/src/executors/clean/executor.js +5 -5
  29. package/dist/src/executors/clean/executor.mjs +3 -3
  30. package/dist/src/executors/docs/executor.js +5 -5
  31. package/dist/src/executors/docs/executor.mjs +3 -3
  32. package/dist/src/executors/lint/executor.js +5 -5
  33. package/dist/src/executors/lint/executor.mjs +3 -3
  34. package/dist/src/executors/prepare/executor.js +5 -5
  35. package/dist/src/executors/prepare/executor.mjs +3 -3
  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 +24 -0
  41. package/dist/src/types/plugin.d.ts +24 -0
  42. package/package.json +8 -8
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2SFOQMAA_js = require('./chunk-2SFOQMAA.js');
3
+ var chunkHLYNF7YE_js = require('./chunk-HLYNF7YE.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 = chunk2SFOQMAA_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkHLYNF7YE_js.withExecutor("prepare", 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 chunkACE6O62X_js = require('./chunk-ACE6O62X.js');
3
+ var chunk2PYUYDPD_js = require('./chunk-2PYUYDPD.js');
4
4
  var chunkVIU4CXA3_js = require('./chunk-VIU4CXA3.js');
5
5
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
6
6
  var devkit = require('@nx/devkit');
@@ -51,6 +51,14 @@ function createNxPlugin(opts) {
51
51
  throw new Error("The cache directory could not be determined.");
52
52
  }
53
53
  const nxJson$1 = nxJson_js.readNxJson(contextV2.workspaceRoot);
54
+ const resolver = jiti.createJiti(contextV2.workspaceRoot, {
55
+ debug: !!options?.debug,
56
+ interopDefault: true,
57
+ fsCache: joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
58
+ maxLength: chunk2PYUYDPD_js.PROJECT_ROOT_HASH_LENGTH
59
+ }), "jiti"),
60
+ moduleCache: true
61
+ });
54
62
  return devkit.createNodesFromFiles(async (configFile, _, context) => {
55
63
  try {
56
64
  const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
@@ -59,16 +67,10 @@ function createNxPlugin(opts) {
59
67
  return {};
60
68
  }
61
69
  const root = pluginHelpers.getRoot(projectRoot, context);
62
- const cacheDir = joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
63
- maxLength: chunkACE6O62X_js.PROJECT_ROOT_HASH_LENGTH
64
- }));
65
- const jiti$1 = jiti.createJiti(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), {
66
- interopDefault: true,
67
- fsCache: joinPaths.joinPaths(cacheDir, "jiti"),
68
- moduleCache: true
69
- });
70
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
71
- const userConfig = await chunkACE6O62X_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, jiti$1, "build", "development", configFile, framework);
70
+ if (options?.debug) {
71
+ console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
72
+ }
73
+ const userConfig = await chunk2PYUYDPD_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
72
74
  if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
73
75
  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.`);
74
76
  return {};
@@ -80,7 +82,9 @@ function createNxPlugin(opts) {
80
82
  }
81
83
  const packageJson = JSON.parse(packageJsonContent);
82
84
  if (!userConfig.configFile && !packageJson?.storm) {
83
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
85
+ if (options?.debug) {
86
+ console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
87
+ }
84
88
  return {};
85
89
  }
86
90
  const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
@@ -90,7 +94,9 @@ function createNxPlugin(opts) {
90
94
  }
91
95
  const tsconfig = userConfig?.tsconfig || (exists.existsSync(joinPaths.joinPaths(projectRoot, "tsconfig.json")) ? joinPaths.joinPaths(projectRoot, "tsconfig.json") : void 0);
92
96
  const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
93
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
97
+ if (options?.debug) {
98
+ console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
99
+ }
94
100
  if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
95
101
  targets[options?.clean?.targetName || "clean"] = {
96
102
  inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : nxJson.withNamedInputs(targetInputs, [
@@ -320,7 +326,9 @@ function createNxPlugin(opts) {
320
326
  projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.type || "library", {
321
327
  overwrite: true
322
328
  });
323
- console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
329
+ if (options?.debug) {
330
+ console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
331
+ }
324
332
  return {
325
333
  projects: {
326
334
  [root]: defu__default.default(projectConfig, {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2SFOQMAA_js = require('./chunk-2SFOQMAA.js');
3
+ var chunkHLYNF7YE_js = require('./chunk-HLYNF7YE.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 = chunk2SFOQMAA_js.withExecutor("docs", executorFn);
14
+ var executor = chunkHLYNF7YE_js.withExecutor("docs", 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 chunk2SFOQMAA_js = require('./chunk-2SFOQMAA.js');
3
+ var chunkHLYNF7YE_js = require('./chunk-HLYNF7YE.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 = chunk2SFOQMAA_js.withExecutor("build", executorFn);
22
+ var executor = chunkHLYNF7YE_js.withExecutor("build", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;