@powerlines/nx 0.11.218 → 0.11.219
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 +10 -0
- package/dist/{chunk-5NHMBXXZ.mjs → chunk-4KF5AUPD.mjs} +1 -1
- package/dist/{chunk-EFG2AWKX.mjs → chunk-7EWOPOET.mjs} +1 -1
- package/dist/{chunk-XX6ZLY4D.mjs → chunk-FIOTA3DI.mjs} +1 -1
- package/dist/{chunk-CINC3R52.mjs → chunk-GB6SETBZ.mjs} +1 -1
- package/dist/{chunk-MDVQOPYK.js → chunk-GJ62I4AV.js} +2 -2
- package/dist/chunk-HNRM52ID.js +374 -0
- package/dist/chunk-IA3YWWWC.mjs +366 -0
- package/dist/{chunk-3TZVQPPH.js → chunk-K6HPKAIP.js} +2 -2
- package/dist/{chunk-JFLVE4R6.js → chunk-KAY4UTGV.js} +2 -2
- package/dist/{chunk-2VN57DMC.js → chunk-MYNOF2F6.js} +2 -2
- package/dist/{chunk-JCB2SUGI.js → chunk-QA32JCA6.js} +2 -2
- package/dist/{chunk-GKRW32W2.mjs → chunk-QN6ZKFPV.mjs} +1 -1
- package/dist/{chunk-ETYR57U3.mjs → chunk-RLKRZBG3.mjs} +1 -1
- package/dist/{chunk-H7FXL53F.mjs → chunk-ULCS2R4D.mjs} +1 -1
- package/dist/{chunk-VNEJ2D4E.js → chunk-WXALQB3J.js} +2 -2
- package/dist/{chunk-ZVVHO24E.js → chunk-ZODDB4GG.js} +1 -1
- package/dist/executors.js +11 -11
- package/dist/executors.mjs +6 -6
- package/dist/index.js +14 -14
- package/dist/index.mjs +8 -8
- package/dist/src/base/base-executor.js +2 -2
- package/dist/src/base/base-executor.mjs +1 -1
- package/dist/src/executors/build/executor.js +4 -4
- package/dist/src/executors/build/executor.mjs +2 -2
- package/dist/src/executors/clean/executor.js +4 -4
- package/dist/src/executors/clean/executor.mjs +2 -2
- package/dist/src/executors/docs/executor.js +4 -4
- package/dist/src/executors/docs/executor.mjs +2 -2
- package/dist/src/executors/lint/executor.js +4 -4
- package/dist/src/executors/lint/executor.mjs +2 -2
- package/dist/src/executors/prepare/executor.js +4 -4
- package/dist/src/executors/prepare/executor.mjs +2 -2
- package/dist/src/helpers/plugin-utilities.d.mts +1 -1
- package/dist/src/helpers/plugin-utilities.d.ts +1 -1
- package/dist/src/helpers/plugin-utilities.js +4 -4
- package/dist/src/helpers/plugin-utilities.mjs +1 -1
- package/dist/src/plugin/index.js +3 -3
- package/dist/src/plugin/index.mjs +2 -2
- package/package.json +4 -4
- package/dist/chunk-EQMUIUSF.js +0 -364
- package/dist/chunk-RQR4JLRG.mjs +0 -356
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.11.218](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.218) (02/27/2026)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **powerlines:** Update package structure for better single responsibility ([6c69d6846](https://github.com/storm-software/powerlines/commit/6c69d6846))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **powerlines** to **v0.39.0**
|
|
14
|
+
|
|
5
15
|
## [0.11.217](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.217) (02/26/2026)
|
|
6
16
|
|
|
7
17
|
### Updated Dependencies
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHNRM52ID_js = require('./chunk-HNRM52ID.js');
|
|
4
4
|
|
|
5
5
|
// src/plugin/index.ts
|
|
6
|
-
var createNodesV2 =
|
|
6
|
+
var createNodesV2 = chunkHNRM52ID_js.createNxPlugin({
|
|
7
7
|
framework: "powerlines"
|
|
8
8
|
});
|
|
9
9
|
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFSGRYCTL_js = require('./chunk-FSGRYCTL.js');
|
|
4
|
+
var chunkIQVSZEQ6_js = require('./chunk-IQVSZEQ6.js');
|
|
5
|
+
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
6
|
+
var devkit = require('@nx/devkit');
|
|
7
|
+
var nxJson = require('@storm-software/workspace-tools/utils/nx-json');
|
|
8
|
+
var pluginHelpers = require('@storm-software/workspace-tools/utils/plugin-helpers');
|
|
9
|
+
var projectTags = require('@storm-software/workspace-tools/utils/project-tags');
|
|
10
|
+
var getEnvPaths = require('@stryke/env/get-env-paths');
|
|
11
|
+
var exists = require('@stryke/fs/exists');
|
|
12
|
+
var murmurhash = require('@stryke/hash/murmurhash');
|
|
13
|
+
var joinPaths = require('@stryke/path/join-paths');
|
|
14
|
+
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
15
|
+
var titleCase = require('@stryke/string-format/title-case');
|
|
16
|
+
var isError = require('@stryke/type-checks/is-error');
|
|
17
|
+
var isSetObject = require('@stryke/type-checks/is-set-object');
|
|
18
|
+
var defu = require('defu');
|
|
19
|
+
var jiti = require('jiti');
|
|
20
|
+
var promises = require('fs/promises');
|
|
21
|
+
var nxJson_js = require('nx/src/config/nx-json.js');
|
|
22
|
+
var packageJson_js = require('nx/src/utils/package-json.js');
|
|
23
|
+
|
|
24
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
|
+
|
|
26
|
+
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
27
|
+
|
|
28
|
+
function getNxTargetInputs(framework) {
|
|
29
|
+
return chunkIQVSZEQ6_js.CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
|
|
30
|
+
}
|
|
31
|
+
chunkSHUYVCID_js.__name(getNxTargetInputs, "getNxTargetInputs");
|
|
32
|
+
function getNxPluginInputs(framework) {
|
|
33
|
+
return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
|
|
34
|
+
}
|
|
35
|
+
chunkSHUYVCID_js.__name(getNxPluginInputs, "getNxPluginInputs");
|
|
36
|
+
function createNxPlugin(opts) {
|
|
37
|
+
try {
|
|
38
|
+
const framework = opts?.framework || "powerlines";
|
|
39
|
+
const name = opts?.name || `${framework}/nx/plugin`;
|
|
40
|
+
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
41
|
+
const targetInputs = getNxTargetInputs(framework);
|
|
42
|
+
const pluginInputs = getNxPluginInputs(framework);
|
|
43
|
+
if (opts?.verboseOutput) {
|
|
44
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase.titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
45
|
+
}
|
|
46
|
+
return [
|
|
47
|
+
pluginInputs,
|
|
48
|
+
async (configFiles, options, contextV2) => {
|
|
49
|
+
const envPaths = getEnvPaths.getEnvPaths({
|
|
50
|
+
orgId: "storm-software",
|
|
51
|
+
appId: framework,
|
|
52
|
+
workspaceRoot: contextV2.workspaceRoot
|
|
53
|
+
});
|
|
54
|
+
if (!envPaths.cache) {
|
|
55
|
+
throw new Error("The cache directory could not be determined.");
|
|
56
|
+
}
|
|
57
|
+
const nxJson$1 = nxJson_js.readNxJson(contextV2.workspaceRoot);
|
|
58
|
+
const resolver = jiti.createJiti(contextV2.workspaceRoot, {
|
|
59
|
+
debug: !!options?.debug,
|
|
60
|
+
interopDefault: true,
|
|
61
|
+
fsCache: joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
|
|
62
|
+
maxLength: chunkFSGRYCTL_js.ROOT_HASH_LENGTH
|
|
63
|
+
}), "jiti"),
|
|
64
|
+
moduleCache: true
|
|
65
|
+
});
|
|
66
|
+
return devkit.createNodesFromFiles(async (configFile, _, context) => {
|
|
67
|
+
try {
|
|
68
|
+
const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
69
|
+
if (!projectRoot) {
|
|
70
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
const root = pluginHelpers.getRoot(projectRoot, context);
|
|
74
|
+
if (opts?.verboseOutput) {
|
|
75
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
76
|
+
}
|
|
77
|
+
const userConfig = await chunkFSGRYCTL_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
78
|
+
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
79
|
+
if (opts?.verboseOutput) {
|
|
80
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
81
|
+
}
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
const packageJsonContent = await promises.readFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
85
|
+
if (!packageJsonContent) {
|
|
86
|
+
if (opts?.verboseOutput) {
|
|
87
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
88
|
+
}
|
|
89
|
+
return {};
|
|
90
|
+
}
|
|
91
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
92
|
+
if (!userConfig.configFile && !packageJson?.storm) {
|
|
93
|
+
if (opts?.verboseOutput) {
|
|
94
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
95
|
+
}
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
99
|
+
if (!projectConfig) {
|
|
100
|
+
if (opts?.verboseOutput) {
|
|
101
|
+
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
102
|
+
}
|
|
103
|
+
return {};
|
|
104
|
+
}
|
|
105
|
+
const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
|
|
106
|
+
if (opts?.verboseOutput) {
|
|
107
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
108
|
+
}
|
|
109
|
+
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
110
|
+
targets[options?.clean?.targetName || "clean"] = {
|
|
111
|
+
cache: true,
|
|
112
|
+
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
113
|
+
options?.clean?.inputs || "typescript"
|
|
114
|
+
]),
|
|
115
|
+
outputs: options?.clean?.outputs,
|
|
116
|
+
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
117
|
+
dependsOn: options?.clean?.dependsOn ?? [
|
|
118
|
+
`^${options?.clean?.targetName || "clean"}`
|
|
119
|
+
],
|
|
120
|
+
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
121
|
+
options: {
|
|
122
|
+
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
123
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
124
|
+
autoInstall: userConfig.autoInstall
|
|
125
|
+
},
|
|
126
|
+
configurations: {
|
|
127
|
+
production: {
|
|
128
|
+
mode: "production"
|
|
129
|
+
},
|
|
130
|
+
test: {
|
|
131
|
+
mode: "test"
|
|
132
|
+
},
|
|
133
|
+
development: {
|
|
134
|
+
mode: "development",
|
|
135
|
+
skipCache: true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) {
|
|
141
|
+
targets[options?.prepare?.targetName || "prepare"] = {
|
|
142
|
+
cache: true,
|
|
143
|
+
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
144
|
+
options?.prepare?.inputs || "typescript"
|
|
145
|
+
]),
|
|
146
|
+
outputs: options?.prepare?.outputs ?? [
|
|
147
|
+
artifactsFolder
|
|
148
|
+
],
|
|
149
|
+
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
150
|
+
dependsOn: options?.prepare?.dependsOn ?? [
|
|
151
|
+
`^${options?.prepare?.targetName || "build"}`,
|
|
152
|
+
options?.clean !== false && `${options?.clean?.targetName || "clean"}`
|
|
153
|
+
].filter(Boolean),
|
|
154
|
+
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
155
|
+
options: {
|
|
156
|
+
input: userConfig.input,
|
|
157
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
158
|
+
autoInstall: userConfig.autoInstall,
|
|
159
|
+
skipCache: userConfig.skipCache
|
|
160
|
+
},
|
|
161
|
+
configurations: {
|
|
162
|
+
production: {
|
|
163
|
+
mode: "production"
|
|
164
|
+
},
|
|
165
|
+
test: {
|
|
166
|
+
mode: "test"
|
|
167
|
+
},
|
|
168
|
+
development: {
|
|
169
|
+
mode: "development",
|
|
170
|
+
skipCache: true
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) {
|
|
176
|
+
targets[options?.build?.targetName || "build"] = {
|
|
177
|
+
cache: true,
|
|
178
|
+
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
179
|
+
options?.build?.inputs || "typescript"
|
|
180
|
+
]),
|
|
181
|
+
outputs: options?.build?.outputs ?? [
|
|
182
|
+
"{options.outputPath}"
|
|
183
|
+
],
|
|
184
|
+
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
185
|
+
dependsOn: options?.build?.dependsOn ?? [
|
|
186
|
+
`^${options?.build?.targetName || "build"}`,
|
|
187
|
+
userConfig.skipCache ? void 0 : isSetObject.isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
188
|
+
].filter(Boolean),
|
|
189
|
+
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
190
|
+
options: {
|
|
191
|
+
input: userConfig.input,
|
|
192
|
+
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
193
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
194
|
+
autoInstall: userConfig.autoInstall,
|
|
195
|
+
skipCache: userConfig.skipCache
|
|
196
|
+
},
|
|
197
|
+
configurations: {
|
|
198
|
+
production: {
|
|
199
|
+
mode: "production"
|
|
200
|
+
},
|
|
201
|
+
test: {
|
|
202
|
+
mode: "test"
|
|
203
|
+
},
|
|
204
|
+
development: {
|
|
205
|
+
mode: "development",
|
|
206
|
+
skipCache: true
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) {
|
|
212
|
+
targets[options?.lint?.targetName || "lint"] = {
|
|
213
|
+
cache: true,
|
|
214
|
+
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : nxJson.withNamedInputs([
|
|
215
|
+
...targetInputs,
|
|
216
|
+
artifactsFolder
|
|
217
|
+
], options?.lint?.inputs ? [
|
|
218
|
+
options.lint.inputs
|
|
219
|
+
] : [
|
|
220
|
+
"linting",
|
|
221
|
+
"typescript"
|
|
222
|
+
]),
|
|
223
|
+
outputs: options?.lint?.outputs ?? [
|
|
224
|
+
"{options.outputPath}"
|
|
225
|
+
],
|
|
226
|
+
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
227
|
+
dependsOn: options?.lint?.dependsOn ?? [
|
|
228
|
+
`^${options?.lint?.targetName || "lint"}`,
|
|
229
|
+
userConfig.skipCache ? void 0 : isSetObject.isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
230
|
+
].filter(Boolean),
|
|
231
|
+
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
232
|
+
options: {
|
|
233
|
+
input: userConfig.input,
|
|
234
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
235
|
+
autoInstall: userConfig.autoInstall,
|
|
236
|
+
skipCache: userConfig.skipCache
|
|
237
|
+
},
|
|
238
|
+
configurations: {
|
|
239
|
+
production: {
|
|
240
|
+
mode: "production"
|
|
241
|
+
},
|
|
242
|
+
test: {
|
|
243
|
+
mode: "test"
|
|
244
|
+
},
|
|
245
|
+
development: {
|
|
246
|
+
mode: "development",
|
|
247
|
+
skipCache: true
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) {
|
|
253
|
+
targets[options?.docs?.targetName || "docs"] = {
|
|
254
|
+
cache: true,
|
|
255
|
+
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : nxJson.withNamedInputs([
|
|
256
|
+
...targetInputs,
|
|
257
|
+
artifactsFolder
|
|
258
|
+
], options?.docs?.inputs ? [
|
|
259
|
+
options.docs.inputs
|
|
260
|
+
] : [
|
|
261
|
+
"documentation",
|
|
262
|
+
"typescript"
|
|
263
|
+
]),
|
|
264
|
+
outputs: options?.docs?.outputs ?? [
|
|
265
|
+
"{options.outputPath}"
|
|
266
|
+
],
|
|
267
|
+
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
268
|
+
dependsOn: options?.docs?.dependsOn ?? [
|
|
269
|
+
`^${options?.docs?.targetName || "docs"}`,
|
|
270
|
+
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
271
|
+
userConfig.skipCache ? void 0 : isSetObject.isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
272
|
+
].filter(Boolean),
|
|
273
|
+
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
274
|
+
options: {
|
|
275
|
+
input: userConfig.input,
|
|
276
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
277
|
+
autoInstall: userConfig.autoInstall,
|
|
278
|
+
skipCache: userConfig.skipCache
|
|
279
|
+
},
|
|
280
|
+
configurations: {
|
|
281
|
+
production: {
|
|
282
|
+
mode: "production"
|
|
283
|
+
},
|
|
284
|
+
test: {
|
|
285
|
+
mode: "test"
|
|
286
|
+
},
|
|
287
|
+
development: {
|
|
288
|
+
mode: "development",
|
|
289
|
+
skipCache: true
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) {
|
|
295
|
+
targets[options?.deploy?.targetName || "deploy"] = {
|
|
296
|
+
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : nxJson.withNamedInputs([
|
|
297
|
+
...targetInputs,
|
|
298
|
+
artifactsFolder
|
|
299
|
+
], options?.deploy?.inputs ? [
|
|
300
|
+
options.deploy.inputs
|
|
301
|
+
] : [
|
|
302
|
+
"documentation",
|
|
303
|
+
"typescript"
|
|
304
|
+
]),
|
|
305
|
+
outputs: options?.deploy?.outputs ?? [
|
|
306
|
+
"{options.outputPath}"
|
|
307
|
+
],
|
|
308
|
+
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
309
|
+
dependsOn: options?.deploy?.dependsOn ?? [
|
|
310
|
+
`^${options?.deploy?.targetName || "deploy"}`,
|
|
311
|
+
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
312
|
+
userConfig.skipCache ? void 0 : isSetObject.isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
313
|
+
].filter(Boolean),
|
|
314
|
+
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
315
|
+
options: {
|
|
316
|
+
input: userConfig.input,
|
|
317
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
318
|
+
autoInstall: userConfig.autoInstall,
|
|
319
|
+
skipCache: userConfig.skipCache
|
|
320
|
+
},
|
|
321
|
+
configurations: {
|
|
322
|
+
production: {
|
|
323
|
+
mode: "production"
|
|
324
|
+
},
|
|
325
|
+
test: {
|
|
326
|
+
mode: "test"
|
|
327
|
+
},
|
|
328
|
+
development: {
|
|
329
|
+
mode: "development",
|
|
330
|
+
skipCache: true
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
projectTags.setDefaultProjectTags(projectConfig, name);
|
|
336
|
+
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
|
|
337
|
+
overwrite: true
|
|
338
|
+
});
|
|
339
|
+
if (opts?.verboseOutput) {
|
|
340
|
+
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
projects: {
|
|
344
|
+
[root]: defu__default.default(projectConfig, {
|
|
345
|
+
name: kebabCase.kebabCase(userConfig.name),
|
|
346
|
+
projectType: userConfig.projectType || "library",
|
|
347
|
+
root,
|
|
348
|
+
sourceRoot: joinPaths.joinPaths(root, "src"),
|
|
349
|
+
targets
|
|
350
|
+
})
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
} catch (error) {
|
|
354
|
+
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
|
|
355
|
+
return {};
|
|
356
|
+
}
|
|
357
|
+
}, configFiles, options, contextV2);
|
|
358
|
+
}
|
|
359
|
+
];
|
|
360
|
+
} catch (error) {
|
|
361
|
+
console.error(`[${opts?.name || "powerlines/plugin/nx"}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
362
|
+
return [
|
|
363
|
+
`**/{${getNxTargetInputs(opts?.framework || "powerlines").map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
|
|
364
|
+
async () => {
|
|
365
|
+
return [];
|
|
366
|
+
}
|
|
367
|
+
];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
chunkSHUYVCID_js.__name(createNxPlugin, "createNxPlugin");
|
|
371
|
+
|
|
372
|
+
exports.createNxPlugin = createNxPlugin;
|
|
373
|
+
exports.getNxPluginInputs = getNxPluginInputs;
|
|
374
|
+
exports.getNxTargetInputs = getNxTargetInputs;
|