@powerlines/nx 0.10.36 → 0.10.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{chunk-HOCK3PN2.mjs → chunk-2SK7GXYX.mjs} +1 -1
- package/dist/{chunk-ZGEXR2Z6.mjs → chunk-37R7Z4YA.mjs} +1 -1
- package/dist/{chunk-62JK5CR2.js → chunk-55HWRJFI.js} +2 -2
- package/dist/{chunk-D5MAY4B6.js → chunk-5IM5S57N.js} +2 -2
- package/dist/{chunk-6M466CL6.mjs → chunk-7Z54WTD3.mjs} +1 -1
- package/dist/{chunk-OBVSDJNP.mjs → chunk-BM5C4GAH.mjs} +1 -1
- package/dist/{chunk-76PYI2PW.js → chunk-CJE2WIZT.js} +2 -2
- package/dist/{chunk-V3APU4CI.js → chunk-DDZYTWHI.js} +2 -2
- package/dist/{chunk-FXB722G2.js → chunk-DNMCZOZX.js} +2 -2
- package/dist/{chunk-2PYUYDPD.js → chunk-DQI2I5KK.js} +1 -3
- package/dist/{chunk-LNSZHZQF.js → chunk-F7EY5OCV.js} +911 -947
- package/dist/{chunk-A36IQB2U.mjs → chunk-HJZ2I6NE.mjs} +11 -19
- package/dist/{chunk-YAQUTH2M.js → chunk-JXYA5T7X.js} +2 -2
- package/dist/{chunk-Q6DRZWW7.js → chunk-KBRCV5NY.js} +13 -21
- package/dist/{chunk-3QGFYJKW.mjs → chunk-OIL7SLIA.mjs} +1 -1
- package/dist/{chunk-XQ44F4OL.mjs → chunk-OS2GSBDL.mjs} +904 -939
- package/dist/{chunk-WGIN2BGP.mjs → chunk-OVX2CEXQ.mjs} +1 -3
- package/dist/{chunk-AGWVUBME.mjs → chunk-PWZ3J3N6.mjs} +1 -1
- package/dist/executors.js +15 -15
- package/dist/executors.mjs +7 -7
- package/dist/index.js +18 -18
- package/dist/index.mjs +9 -9
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/executors/build/executor.js +5 -5
- package/dist/src/executors/build/executor.mjs +3 -3
- package/dist/src/executors/clean/executor.js +5 -5
- package/dist/src/executors/clean/executor.mjs +3 -3
- package/dist/src/executors/docs/executor.js +5 -5
- package/dist/src/executors/docs/executor.mjs +3 -3
- package/dist/src/executors/lint/executor.js +5 -5
- package/dist/src/executors/lint/executor.mjs +3 -3
- package/dist/src/executors/prepare/executor.js +5 -5
- package/dist/src/executors/prepare/executor.mjs +3 -3
- package/dist/src/helpers/plugin-utilities.js +5 -5
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/plugin/index.js +4 -4
- package/dist/src/plugin/index.mjs +3 -3
- package/dist/src/types/plugin.d.mts +1 -1
- package/dist/src/types/plugin.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-
|
|
1
|
+
import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-OVX2CEXQ.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';
|
|
@@ -61,9 +61,7 @@ function createNxPlugin(opts) {
|
|
|
61
61
|
return {};
|
|
62
62
|
}
|
|
63
63
|
const root = getRoot(projectRoot, context);
|
|
64
|
-
|
|
65
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
66
|
-
}
|
|
64
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
67
65
|
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
68
66
|
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
69
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.`);
|
|
@@ -76,9 +74,7 @@ function createNxPlugin(opts) {
|
|
|
76
74
|
}
|
|
77
75
|
const packageJson = JSON.parse(packageJsonContent);
|
|
78
76
|
if (!userConfig.configFile && !packageJson?.storm) {
|
|
79
|
-
|
|
80
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
81
|
-
}
|
|
77
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
82
78
|
return {};
|
|
83
79
|
}
|
|
84
80
|
const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
@@ -87,9 +83,7 @@ function createNxPlugin(opts) {
|
|
|
87
83
|
return {};
|
|
88
84
|
}
|
|
89
85
|
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
90
|
-
|
|
91
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
92
|
-
}
|
|
86
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
93
87
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
94
88
|
targets[options?.clean?.targetName || "clean"] = {
|
|
95
89
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [
|
|
@@ -97,7 +91,7 @@ function createNxPlugin(opts) {
|
|
|
97
91
|
]),
|
|
98
92
|
outputs: options?.clean?.outputs,
|
|
99
93
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
100
|
-
dependsOn: [
|
|
94
|
+
dependsOn: options?.clean?.dependsOn ?? [
|
|
101
95
|
`^${options?.clean?.targetName || "clean"}`
|
|
102
96
|
],
|
|
103
97
|
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
@@ -130,7 +124,7 @@ function createNxPlugin(opts) {
|
|
|
130
124
|
artifactsFolder
|
|
131
125
|
],
|
|
132
126
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
133
|
-
dependsOn: [
|
|
127
|
+
dependsOn: options?.prepare?.dependsOn ?? [
|
|
134
128
|
`^${options?.prepare?.targetName || "prepare"}`,
|
|
135
129
|
options?.clean !== false && `${options?.clean?.targetName || "clean"}`
|
|
136
130
|
].filter(Boolean),
|
|
@@ -164,7 +158,7 @@ function createNxPlugin(opts) {
|
|
|
164
158
|
"{options.outputPath}"
|
|
165
159
|
],
|
|
166
160
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
167
|
-
dependsOn: [
|
|
161
|
+
dependsOn: options?.build?.dependsOn ?? [
|
|
168
162
|
`^${options?.build?.targetName || "build"}`,
|
|
169
163
|
options?.prepare !== false && `${options?.prepare?.targetName || "prepare"}`
|
|
170
164
|
].filter(Boolean),
|
|
@@ -205,7 +199,7 @@ function createNxPlugin(opts) {
|
|
|
205
199
|
"{options.outputPath}"
|
|
206
200
|
],
|
|
207
201
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
208
|
-
dependsOn: [
|
|
202
|
+
dependsOn: options?.lint?.dependsOn ?? [
|
|
209
203
|
`^${options?.lint?.targetName || "lint"}`,
|
|
210
204
|
options?.prepare !== false && `${options?.prepare?.targetName || "prepare"}`
|
|
211
205
|
].filter(Boolean),
|
|
@@ -245,7 +239,7 @@ function createNxPlugin(opts) {
|
|
|
245
239
|
"{options.outputPath}"
|
|
246
240
|
],
|
|
247
241
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
248
|
-
dependsOn: [
|
|
242
|
+
dependsOn: options?.docs?.dependsOn ?? [
|
|
249
243
|
`^${options?.docs?.targetName || "docs"}`,
|
|
250
244
|
options?.build !== false && `${options?.build?.targetName || "build"}`
|
|
251
245
|
].filter(Boolean),
|
|
@@ -285,7 +279,7 @@ function createNxPlugin(opts) {
|
|
|
285
279
|
"{options.outputPath}"
|
|
286
280
|
],
|
|
287
281
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
288
|
-
dependsOn: [
|
|
282
|
+
dependsOn: options?.deploy?.dependsOn ?? [
|
|
289
283
|
`^${options?.deploy?.targetName || "deploy"}`,
|
|
290
284
|
options?.build !== false && `${options?.build?.targetName || "build"}`
|
|
291
285
|
].filter(Boolean),
|
|
@@ -314,9 +308,7 @@ function createNxPlugin(opts) {
|
|
|
314
308
|
addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.type || "library", {
|
|
315
309
|
overwrite: true
|
|
316
310
|
});
|
|
317
|
-
|
|
318
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
319
|
-
}
|
|
311
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
320
312
|
return {
|
|
321
313
|
projects: {
|
|
322
314
|
[root]: defu(projectConfig, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkF7EY5OCV_js = require('./chunk-F7EY5OCV.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 =
|
|
22
|
+
var executor = chunkF7EY5OCV_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
|
|
3
|
+
var chunkDQI2I5KK_js = require('./chunk-DQI2I5KK.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');
|
|
@@ -55,7 +55,7 @@ function createNxPlugin(opts) {
|
|
|
55
55
|
debug: !!options?.debug,
|
|
56
56
|
interopDefault: true,
|
|
57
57
|
fsCache: joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
|
|
58
|
-
maxLength:
|
|
58
|
+
maxLength: chunkDQI2I5KK_js.PROJECT_ROOT_HASH_LENGTH
|
|
59
59
|
}), "jiti"),
|
|
60
60
|
moduleCache: true
|
|
61
61
|
});
|
|
@@ -67,10 +67,8 @@ function createNxPlugin(opts) {
|
|
|
67
67
|
return {};
|
|
68
68
|
}
|
|
69
69
|
const root = pluginHelpers.getRoot(projectRoot, context);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
const userConfig = await chunk2PYUYDPD_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
70
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
71
|
+
const userConfig = await chunkDQI2I5KK_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
74
72
|
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
75
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.`);
|
|
76
74
|
return {};
|
|
@@ -82,9 +80,7 @@ function createNxPlugin(opts) {
|
|
|
82
80
|
}
|
|
83
81
|
const packageJson = JSON.parse(packageJsonContent);
|
|
84
82
|
if (!userConfig.configFile && !packageJson?.storm) {
|
|
85
|
-
|
|
86
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
87
|
-
}
|
|
83
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
88
84
|
return {};
|
|
89
85
|
}
|
|
90
86
|
const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
@@ -93,9 +89,7 @@ function createNxPlugin(opts) {
|
|
|
93
89
|
return {};
|
|
94
90
|
}
|
|
95
91
|
const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
|
|
96
|
-
|
|
97
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
98
|
-
}
|
|
92
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
99
93
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
100
94
|
targets[options?.clean?.targetName || "clean"] = {
|
|
101
95
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
@@ -103,7 +97,7 @@ function createNxPlugin(opts) {
|
|
|
103
97
|
]),
|
|
104
98
|
outputs: options?.clean?.outputs,
|
|
105
99
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
106
|
-
dependsOn: [
|
|
100
|
+
dependsOn: options?.clean?.dependsOn ?? [
|
|
107
101
|
`^${options?.clean?.targetName || "clean"}`
|
|
108
102
|
],
|
|
109
103
|
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
@@ -136,7 +130,7 @@ function createNxPlugin(opts) {
|
|
|
136
130
|
artifactsFolder
|
|
137
131
|
],
|
|
138
132
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
139
|
-
dependsOn: [
|
|
133
|
+
dependsOn: options?.prepare?.dependsOn ?? [
|
|
140
134
|
`^${options?.prepare?.targetName || "prepare"}`,
|
|
141
135
|
options?.clean !== false && `${options?.clean?.targetName || "clean"}`
|
|
142
136
|
].filter(Boolean),
|
|
@@ -170,7 +164,7 @@ function createNxPlugin(opts) {
|
|
|
170
164
|
"{options.outputPath}"
|
|
171
165
|
],
|
|
172
166
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
173
|
-
dependsOn: [
|
|
167
|
+
dependsOn: options?.build?.dependsOn ?? [
|
|
174
168
|
`^${options?.build?.targetName || "build"}`,
|
|
175
169
|
options?.prepare !== false && `${options?.prepare?.targetName || "prepare"}`
|
|
176
170
|
].filter(Boolean),
|
|
@@ -211,7 +205,7 @@ function createNxPlugin(opts) {
|
|
|
211
205
|
"{options.outputPath}"
|
|
212
206
|
],
|
|
213
207
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
214
|
-
dependsOn: [
|
|
208
|
+
dependsOn: options?.lint?.dependsOn ?? [
|
|
215
209
|
`^${options?.lint?.targetName || "lint"}`,
|
|
216
210
|
options?.prepare !== false && `${options?.prepare?.targetName || "prepare"}`
|
|
217
211
|
].filter(Boolean),
|
|
@@ -251,7 +245,7 @@ function createNxPlugin(opts) {
|
|
|
251
245
|
"{options.outputPath}"
|
|
252
246
|
],
|
|
253
247
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
254
|
-
dependsOn: [
|
|
248
|
+
dependsOn: options?.docs?.dependsOn ?? [
|
|
255
249
|
`^${options?.docs?.targetName || "docs"}`,
|
|
256
250
|
options?.build !== false && `${options?.build?.targetName || "build"}`
|
|
257
251
|
].filter(Boolean),
|
|
@@ -291,7 +285,7 @@ function createNxPlugin(opts) {
|
|
|
291
285
|
"{options.outputPath}"
|
|
292
286
|
],
|
|
293
287
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
294
|
-
dependsOn: [
|
|
288
|
+
dependsOn: options?.deploy?.dependsOn ?? [
|
|
295
289
|
`^${options?.deploy?.targetName || "deploy"}`,
|
|
296
290
|
options?.build !== false && `${options?.build?.targetName || "build"}`
|
|
297
291
|
].filter(Boolean),
|
|
@@ -320,9 +314,7 @@ function createNxPlugin(opts) {
|
|
|
320
314
|
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.type || "library", {
|
|
321
315
|
overwrite: true
|
|
322
316
|
});
|
|
323
|
-
|
|
324
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
325
|
-
}
|
|
317
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
326
318
|
return {
|
|
327
319
|
projects: {
|
|
328
320
|
[root]: defu__default.default(projectConfig, {
|