@powerlines/nx 0.11.227 → 0.11.229
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 +12 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{plugin-Dbr_Q4yi.mjs → plugin-DIpGOXic.mjs} +2 -2
- package/dist/{plugin-Dbr_Q4yi.mjs.map → plugin-DIpGOXic.mjs.map} +1 -1
- package/dist/{plugin-A9gAUguP.cjs → plugin-DlYLuMgP.cjs} +1 -1
- package/dist/{plugin-utilities-Ci8AHf-K.mjs → plugin-utilities-BYSLw2Ex.mjs} +24 -18
- package/dist/plugin-utilities-BYSLw2Ex.mjs.map +1 -0
- package/dist/{plugin-utilities-Ddlc3SiI.cjs → plugin-utilities-DFcO_zBx.cjs} +23 -17
- package/dist/src/base/base-executor.untyped.d.mts +2 -2
- package/dist/src/executors/build/untyped.d.cts +2 -2
- package/dist/src/executors/build/untyped.d.mts +2 -2
- package/dist/src/executors/clean/untyped.d.cts +2 -2
- package/dist/src/executors/docs/untyped.d.cts +2 -2
- package/dist/src/executors/docs/untyped.d.mts +2 -2
- package/dist/src/executors/lint/untyped.d.cts +2 -2
- package/dist/src/executors/lint/untyped.d.mts +2 -2
- package/dist/src/executors/prepare/untyped.d.cts +2 -2
- package/dist/src/executors/prepare/untyped.d.mts +2 -2
- package/dist/src/generators/sync/untyped.d.cts +2 -2
- package/dist/src/generators/sync/untyped.d.mts +2 -2
- package/dist/src/helpers/plugin-utilities.cjs +1 -1
- package/dist/src/helpers/plugin-utilities.d.cts.map +1 -1
- package/dist/src/helpers/plugin-utilities.d.mts.map +1 -1
- package/dist/src/helpers/plugin-utilities.mjs +1 -1
- package/dist/src/plugin/index.cjs +2 -2
- package/dist/src/plugin/index.mjs +2 -2
- package/package.json +3 -3
- package/dist/plugin-utilities-Ci8AHf-K.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.11.228](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.228) (03/01/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **powerlines** to **v0.39.8**
|
|
10
|
+
|
|
11
|
+
## [0.11.227](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.227) (03/01/2026)
|
|
12
|
+
|
|
13
|
+
### Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated **powerlines** to **v0.39.7**
|
|
16
|
+
|
|
5
17
|
## [0.11.226](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.226) (03/01/2026)
|
|
6
18
|
|
|
7
19
|
### Updated Dependencies
|
package/dist/index.cjs
CHANGED
|
@@ -7,9 +7,9 @@ const require_executor$4 = require('./executor-tEMakUYi.cjs');
|
|
|
7
7
|
require('./executors-D7478W2S.cjs');
|
|
8
8
|
const require_generator = require('./generator-Uu2ErkQj.cjs');
|
|
9
9
|
require('./generators-q39_jUCw.cjs');
|
|
10
|
-
require('./plugin-utilities-
|
|
10
|
+
require('./plugin-utilities-DFcO_zBx.cjs');
|
|
11
11
|
require('./constants-BHT2TeEj.cjs');
|
|
12
|
-
const require_plugin = require('./plugin-
|
|
12
|
+
const require_plugin = require('./plugin-DlYLuMgP.cjs');
|
|
13
13
|
|
|
14
14
|
exports.build = require_executor.executor_default;
|
|
15
15
|
exports.clean = require_executor$1.executor_default;
|
package/dist/index.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { n as executor_default$4 } from "./executor-gauQV_Qs.mjs";
|
|
|
7
7
|
import "./executors-C15iG1sF.mjs";
|
|
8
8
|
import { n as generator_default, t as generatorFn } from "./generator-DeiwVUqC.mjs";
|
|
9
9
|
import "./generators-Bi9wzfNx.mjs";
|
|
10
|
-
import "./plugin-utilities-
|
|
10
|
+
import "./plugin-utilities-BYSLw2Ex.mjs";
|
|
11
11
|
import "./constants-DPeeG_si.mjs";
|
|
12
|
-
import { t as createNodesV2 } from "./plugin-
|
|
12
|
+
import { t as createNodesV2 } from "./plugin-DIpGOXic.mjs";
|
|
13
13
|
|
|
14
14
|
export { executor_default as build, executor_default$1 as clean, createNodesV2, executor_default$2 as docs, executor_default$3 as lint, executor_default$4 as prepare, generator_default as sync, generatorFn as syncGenerator };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as createNxPlugin } from "./plugin-utilities-
|
|
1
|
+
import { t as createNxPlugin } from "./plugin-utilities-BYSLw2Ex.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/index.ts
|
|
4
4
|
const createNodesV2 = createNxPlugin({ framework: "powerlines" });
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { createNodesV2 as t };
|
|
8
|
-
//# sourceMappingURL=plugin-
|
|
8
|
+
//# sourceMappingURL=plugin-DIpGOXic.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-DIpGOXic.mjs","names":[],"sources":["../src/plugin/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createNxPlugin } from \"../helpers/plugin-utilities\";\nimport { NxPluginOptions } from \"../types/plugin\";\n\nexport const createNodesV2 = createNxPlugin<NxPluginOptions>({\n framework: \"powerlines\"\n});\n"],"mappings":";;;AAqBA,MAAa,gBAAgB,eAAgC,EAC3D,WAAW,cACZ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_plugin_utilities = require('./plugin-utilities-
|
|
1
|
+
const require_plugin_utilities = require('./plugin-utilities-DFcO_zBx.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/index.ts
|
|
4
4
|
const createNodesV2 = require_plugin_utilities.createNxPlugin({ framework: "powerlines" });
|
|
@@ -10,9 +10,11 @@ import { getEnvPaths } from "@stryke/env/get-env-paths";
|
|
|
10
10
|
import { existsSync } from "@stryke/fs/exists";
|
|
11
11
|
import { murmurhash } from "@stryke/hash/murmurhash";
|
|
12
12
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
13
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
13
14
|
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
14
15
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
15
16
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
17
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
16
18
|
import { createJiti } from "jiti";
|
|
17
19
|
import { readFile } from "node:fs/promises";
|
|
18
20
|
import { readNxJson as readNxJson$1 } from "nx/src/config/nx-json.js";
|
|
@@ -28,7 +30,6 @@ import "@stryke/helpers/get-unique";
|
|
|
28
30
|
import "@stryke/path/is-type";
|
|
29
31
|
import "@stryke/type-checks/is-object";
|
|
30
32
|
import "@stryke/type-checks/is-regexp";
|
|
31
|
-
import "@stryke/type-checks/is-set-string";
|
|
32
33
|
import "@stryke/type-checks/is-string";
|
|
33
34
|
import "@stryke/path/join";
|
|
34
35
|
import "@storm-software/config-tools/types";
|
|
@@ -83,7 +84,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mod
|
|
|
83
84
|
name: framework,
|
|
84
85
|
envName: mode,
|
|
85
86
|
globalRc: true,
|
|
86
|
-
packageJson:
|
|
87
|
+
packageJson: camelCase(framework),
|
|
87
88
|
dotenv: true,
|
|
88
89
|
jiti
|
|
89
90
|
});
|
|
@@ -159,7 +160,12 @@ function createNxPlugin(opts) {
|
|
|
159
160
|
}
|
|
160
161
|
const root = getRoot(projectRoot, context);
|
|
161
162
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
162
|
-
|
|
163
|
+
let userConfig = {};
|
|
164
|
+
try {
|
|
165
|
+
userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
166
|
+
} catch (error) {
|
|
167
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to load user configuration for project in ${projectRoot} - ${isError(error) ? error.message : isSetString(error) ? error : "Unknown error"} \n\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`);
|
|
168
|
+
}
|
|
163
169
|
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
164
170
|
if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
165
171
|
return {};
|
|
@@ -170,7 +176,7 @@ function createNxPlugin(opts) {
|
|
|
170
176
|
return {};
|
|
171
177
|
}
|
|
172
178
|
const packageJson = JSON.parse(packageJsonContent);
|
|
173
|
-
if (!userConfig.configFile && !packageJson?.
|
|
179
|
+
if (!userConfig.configFile && !packageJson?.[camelCase(framework)]) {
|
|
174
180
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
175
181
|
return {};
|
|
176
182
|
}
|
|
@@ -189,8 +195,8 @@ function createNxPlugin(opts) {
|
|
|
189
195
|
dependsOn: options?.clean?.dependsOn ?? [`^${options?.clean?.targetName || "clean"}`],
|
|
190
196
|
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
191
197
|
options: {
|
|
192
|
-
outputPath: userConfig.output?.outputPath
|
|
193
|
-
projectType:
|
|
198
|
+
outputPath: userConfig.output?.outputPath,
|
|
199
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
194
200
|
autoInstall: userConfig.autoInstall
|
|
195
201
|
},
|
|
196
202
|
configurations: {
|
|
@@ -211,7 +217,7 @@ function createNxPlugin(opts) {
|
|
|
211
217
|
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
212
218
|
options: {
|
|
213
219
|
input: userConfig.input,
|
|
214
|
-
projectType:
|
|
220
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
215
221
|
autoInstall: userConfig.autoInstall,
|
|
216
222
|
skipCache: userConfig.skipCache
|
|
217
223
|
},
|
|
@@ -233,8 +239,8 @@ function createNxPlugin(opts) {
|
|
|
233
239
|
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
234
240
|
options: {
|
|
235
241
|
input: userConfig.input,
|
|
236
|
-
outputPath: userConfig.output?.outputPath
|
|
237
|
-
projectType:
|
|
242
|
+
outputPath: userConfig.output?.outputPath,
|
|
243
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
238
244
|
autoInstall: userConfig.autoInstall,
|
|
239
245
|
skipCache: userConfig.skipCache
|
|
240
246
|
},
|
|
@@ -256,7 +262,7 @@ function createNxPlugin(opts) {
|
|
|
256
262
|
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
257
263
|
options: {
|
|
258
264
|
input: userConfig.input,
|
|
259
|
-
projectType:
|
|
265
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
260
266
|
autoInstall: userConfig.autoInstall,
|
|
261
267
|
skipCache: userConfig.skipCache
|
|
262
268
|
},
|
|
@@ -282,7 +288,7 @@ function createNxPlugin(opts) {
|
|
|
282
288
|
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
283
289
|
options: {
|
|
284
290
|
input: userConfig.input,
|
|
285
|
-
projectType:
|
|
291
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
286
292
|
autoInstall: userConfig.autoInstall,
|
|
287
293
|
skipCache: userConfig.skipCache
|
|
288
294
|
},
|
|
@@ -307,7 +313,7 @@ function createNxPlugin(opts) {
|
|
|
307
313
|
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
308
314
|
options: {
|
|
309
315
|
input: userConfig.input,
|
|
310
|
-
projectType:
|
|
316
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
311
317
|
autoInstall: userConfig.autoInstall,
|
|
312
318
|
skipCache: userConfig.skipCache
|
|
313
319
|
},
|
|
@@ -321,7 +327,7 @@ function createNxPlugin(opts) {
|
|
|
321
327
|
}
|
|
322
328
|
};
|
|
323
329
|
setDefaultProjectTags(projectConfig, name);
|
|
324
|
-
addProjectTag(projectConfig, framework,
|
|
330
|
+
addProjectTag(projectConfig, framework, userConfig.projectType || projectConfig.projectType || "library", { overwrite: true });
|
|
325
331
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
326
332
|
return { projects: { [root]: defu(projectConfig, {
|
|
327
333
|
name: kebabCase(userConfig.name),
|
|
@@ -331,17 +337,17 @@ function createNxPlugin(opts) {
|
|
|
331
337
|
targets
|
|
332
338
|
}) } };
|
|
333
339
|
} catch (error) {
|
|
334
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
|
|
335
|
-
|
|
340
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to process the project configuration for file "${configFile}" - ${isError(error) ? error.message : isSetString(error) ? error : "Unknown fatal error"}`);
|
|
341
|
+
return {};
|
|
336
342
|
}
|
|
337
343
|
}, configFiles, options, contextV2);
|
|
338
344
|
}];
|
|
339
345
|
} catch (error) {
|
|
340
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
341
|
-
throw new Error(`Failed to initialize the ${title}. See previous logs for more details
|
|
346
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : isSetString(error) ? error : "Unknown fatal error during plugin initialization"}`);
|
|
347
|
+
throw new Error(`Failed to initialize the ${title} - ${isError(error) ? error.message : isSetString(error) ? error : "See previous logs for more details"}`, { cause: error instanceof Error ? error : void 0 });
|
|
342
348
|
}
|
|
343
349
|
}
|
|
344
350
|
|
|
345
351
|
//#endregion
|
|
346
352
|
export { getNxPluginInputs as n, getNxTargetInputs as r, createNxPlugin as t };
|
|
347
|
-
//# sourceMappingURL=plugin-utilities-
|
|
353
|
+
//# sourceMappingURL=plugin-utilities-BYSLw2Ex.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities-BYSLw2Ex.mjs","names":["resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined","loadConfigC12","readNxJson","packageJson: PackageJson","targets: ProjectConfiguration[\"targets\"]"],"sources":["../../core/src/lib/config.ts","../../core/src/lib/constants/meta.ts","../../core/src/lib/utilities/source-map.ts","../src/helpers/plugin-utilities.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\n\nexport type PartiallyResolvedContext<TContext extends Context = Context> = Omit<\n TContext,\n \"config\" | \"tsconfig\" | \"entry\" | \"fs\" | \"compiler\" | \"unimport\"\n> &\n Partial<TContext> & {\n config: TContext[\"config\"];\n };\n\n/**\n * Loads the workspace configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param cwd - The current working directory to start searching from.\n * @returns A promise that resolves to the loaded workspace configuration.\n */\nexport async function loadWorkspaceConfig(\n workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: camelCase(framework),\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ROOT_HASH_LENGTH = 45;\nexport const CACHE_HASH_LENGTH = 62;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport Diff from \"diff-match-patch\";\nimport type MagicString from \"magic-string\";\nimport type { TransformResult } from \"../../types/context\";\n\nconst dmp = new Diff();\n\n/**\n * Generate code with source map.\n *\n * @param code - The source code.\n * @param id - The file name.\n * @param transpiled - The transpiled code.\n * @returns The compiler result.\n */\nexport function generateSourceMap(\n code: MagicString,\n id: string,\n transpiled?: string\n): TransformResult | undefined {\n if (!transpiled) {\n return;\n }\n\n const diff = dmp.diff_main(code.toString(), transpiled);\n dmp.diff_cleanupSemantic(diff);\n\n let offset = 0;\n\n for (let index = 0; index < diff.length; index++) {\n if (diff[index]) {\n const [type, text] = diff[index]!;\n const textLength = text.length;\n\n switch (type) {\n case 0: {\n offset += textLength;\n break;\n }\n case 1: {\n code.prependLeft(offset, text);\n break;\n }\n case -1: {\n const next = diff.at(index + 1);\n\n if (next && next[0] === 1) {\n const replaceText = next[1];\n\n const firstNonWhitespaceIndexOfText = text.search(/\\S/);\n const offsetStart =\n offset + Math.max(firstNonWhitespaceIndexOfText, 0);\n\n code.update(offsetStart, offset + textLength, replaceText);\n index += 1;\n } else {\n code.remove(offset, offset + textLength);\n }\n\n offset += textLength;\n\n break;\n }\n }\n }\n }\n\n if (!code.hasChanged()) {\n return;\n }\n\n return {\n code: code.toString(),\n map: code.generateMap({\n source: id,\n file: `${id}.map`,\n includeContent: true\n })\n };\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable no-console */\n\nimport type { CreateNodesResultV2, CreateNodesV2 } from \"@nx/devkit\";\nimport { createNodesFromFiles } from \"@nx/devkit\";\nimport type { ProjectTagVariant } from \"@storm-software/workspace-tools/types\";\nimport { withNamedInputs } from \"@storm-software/workspace-tools/utils/nx-json\";\nimport {\n getProjectConfigFromProjectRoot,\n getProjectRoot,\n getRoot\n} from \"@storm-software/workspace-tools/utils/plugin-helpers\";\nimport {\n addProjectTag,\n setDefaultProjectTags\n} from \"@storm-software/workspace-tools/utils/project-tags\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { murmurhash } from \"@stryke/hash/murmurhash\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport { readFile } from \"node:fs/promises\";\nimport { readNxJson } from \"nx/src/config/nx-json.js\";\nimport type {\n ProjectConfiguration,\n TargetConfiguration\n} from \"nx/src/config/workspace-json-project-json.js\";\nimport type { PackageJson as PackageJsonNx } from \"nx/src/utils/package-json.js\";\nimport { readTargetsFromPackageJson } from \"nx/src/utils/package-json.js\";\nimport type { ParsedUserConfig } from \"powerlines\";\nimport { loadUserConfigFile } from \"powerlines/config\";\nimport { ROOT_HASH_LENGTH } from \"powerlines/utils\";\nimport { NxPluginOptions } from \"../types/plugin\";\nimport { CONFIG_INPUTS } from \"./constants\";\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxTargetInputs(framework: string): string[] {\n return CONFIG_INPUTS.map(input => input.replace(\"{framework}\", framework));\n}\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxPluginInputs(framework: string): string {\n return `**/{${getNxTargetInputs(framework)\n .map(input => input.replace(\"{projectRoot}/\", \"\"))\n .join(\",\")}}`;\n}\n\nexport interface CreateNxPluginOptions {\n /**\n * The name of the Nx plugin to create\n *\n * @remarks\n * This will be used in logging and project tagging.\n *\n * @defaultValue \"\\{framework\\}/plugin/nx\"\n */\n name?: string;\n\n /**\n * The folder where the generated runtime artifacts will be located\n *\n * @remarks\n * This folder will contain all runtime artifacts and builtins generated during the \"prepare\" phase.\n *\n * @defaultValue \"\\{projectRoot\\}/.powerlines\"\n */\n artifactsFolder?: string;\n\n /**\n * A string identifier that allows a child framework or tool to identify itself when using Powerlines.\n *\n * @remarks\n * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.\n *\n * @defaultValue \"powerlines\"\n */\n framework?: string;\n}\n\n/**\n * Creates an Nx plugin that integrates Powerlines into the Nx build process.\n *\n * @param opts - Options for creating the Nx plugin\n * @returns A CreateNodesV2 function that can be used as an Nx plugin\n */\nexport function createNxPlugin<\n TOptions extends NxPluginOptions = NxPluginOptions\n>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions> {\n const framework = opts?.framework || \"powerlines\";\n const title = `${titleCase(framework)} Nx Plugin`;\n\n try {\n const name = opts?.name || `${framework}/nx/plugin`;\n const artifactsFolder =\n opts?.artifactsFolder || `{projectRoot}/.${framework}`;\n\n const targetInputs = getNxTargetInputs(framework);\n const pluginInputs = getNxPluginInputs(framework);\n\n return [\n pluginInputs,\n async (configFiles, options, contextV2): Promise<CreateNodesResultV2> => {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`\n );\n }\n\n const envPaths = getEnvPaths({\n orgId: \"storm-software\",\n appId: framework,\n workspaceRoot: contextV2.workspaceRoot\n });\n if (!envPaths.cache) {\n throw new Error(\"The cache directory could not be determined.\");\n }\n\n const nxJson = readNxJson(contextV2.workspaceRoot);\n const resolver = createJiti(contextV2.workspaceRoot, {\n debug: !!options?.debug,\n interopDefault: true,\n fsCache: joinPaths(\n envPaths.cache,\n \"nx-plugin\",\n murmurhash(contextV2.workspaceRoot, {\n maxLength: ROOT_HASH_LENGTH\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n return createNodesFromFiles(\n async (configFile, _, context) => {\n try {\n const projectRoot = getProjectRoot(\n configFile,\n contextV2.workspaceRoot\n );\n if (!projectRoot) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - package.json and ${\n framework\n } configuration files (i.e. ${\n framework\n }.config.ts) must be located in the project root directory: ${\n configFile\n }`\n );\n\n return {};\n }\n\n const root = getRoot(projectRoot, context);\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Loading ${\n framework\n } user configuration for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n let userConfig = {} as ParsedUserConfig;\n try {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration for project in ${\n projectRoot\n } - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown error\"\n } \\n\\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`\n );\n }\n\n if (\n !existsSync(\n joinPaths(\n contextV2.workspaceRoot,\n projectRoot,\n \"package.json\"\n )\n )\n ) {\n if (options?.verboseOutput) {\n console.warn(\n `[${\n title\n }] - ${new Date().toISOString()} - Cannot find \\`package.json\\` file in the project's root directory (path: \"${joinPaths(\n contextV2.workspaceRoot,\n projectRoot\n )}\"). Skipping project configuration.`\n );\n }\n\n return {};\n }\n\n const packageJsonContent = await readFile(\n joinPaths(contextV2.workspaceRoot, projectRoot, \"package.json\"),\n \"utf8\"\n );\n if (!packageJsonContent) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No package.json file found for project in root directory ${projectRoot}`\n );\n }\n\n return {};\n }\n\n const packageJson: PackageJson = JSON.parse(packageJsonContent);\n if (\n !userConfig.configFile &&\n !packageJson?.[camelCase(framework)]\n ) {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Skipping ${projectRoot} - no ${\n framework\n } configuration found for project in root directory.`\n );\n }\n\n return {};\n }\n\n const projectConfig = getProjectConfigFromProjectRoot(\n projectRoot,\n packageJson\n );\n if (!projectConfig) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No project configuration found for project in root directory ${\n projectRoot\n }`\n );\n }\n\n return {};\n }\n\n const targets: ProjectConfiguration[\"targets\"] =\n readTargetsFromPackageJson(\n packageJson as PackageJsonNx,\n nxJson,\n projectRoot,\n context.workspaceRoot\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Preparing Nx targets for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n if (\n options?.clean !== false &&\n !targets[options?.clean?.targetName || \"clean\"]\n ) {\n targets[options?.clean?.targetName || \"clean\"] = {\n cache: true,\n inputs: Array.isArray(options?.clean?.inputs)\n ? options.clean.inputs\n : withNamedInputs(targetInputs, [\n options?.clean?.inputs || \"typescript\"\n ]),\n outputs: options?.clean?.outputs,\n executor:\n options?.clean?.executor ||\n `@${framework}/nx:${options?.clean?.targetName || \"clean\"}`,\n dependsOn: options?.clean?.dependsOn ?? [\n `^${options?.clean?.targetName || \"clean\"}`\n ],\n defaultConfiguration:\n options?.clean?.defaultConfiguration || \"production\",\n options: {\n outputPath: userConfig.output?.outputPath,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.prepare !== false &&\n !targets[options?.prepare?.targetName || \"prepare\"]\n ) {\n targets[options?.prepare?.targetName || \"prepare\"] = {\n cache: true,\n inputs: Array.isArray(options?.prepare?.inputs)\n ? options.prepare.inputs\n : withNamedInputs(targetInputs, [\n options?.prepare?.inputs || \"typescript\"\n ]),\n outputs: options?.prepare?.outputs ?? [artifactsFolder],\n executor:\n options?.prepare?.executor ||\n `@${framework}/nx:${options?.prepare?.targetName || \"prepare\"}`,\n dependsOn:\n options?.prepare?.dependsOn ??\n ([\n `^${options?.prepare?.targetName || \"build\"}`,\n options?.clean !== false &&\n `${options?.clean?.targetName || \"clean\"}`\n ].filter(Boolean) as string[]),\n defaultConfiguration:\n options?.prepare?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.build !== false &&\n !targets[options?.build?.targetName || \"build\"]\n ) {\n targets[options?.build?.targetName || \"build\"] = {\n cache: true,\n inputs: Array.isArray(options?.build?.inputs)\n ? options.build.inputs\n : withNamedInputs(targetInputs, [\n options?.build?.inputs || \"typescript\"\n ]),\n outputs: options?.build?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.build?.executor ||\n `@${framework}/nx:${options?.build?.targetName || \"build\"}`,\n dependsOn:\n options?.build?.dependsOn ??\n ([\n `^${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.build?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n outputPath: userConfig.output?.outputPath,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.lint !== false &&\n !targets[options?.lint?.targetName || \"lint\"]\n ) {\n targets[options?.lint?.targetName || \"lint\"] = {\n cache: true,\n inputs: Array.isArray(options?.lint?.inputs)\n ? options.lint.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.lint?.inputs\n ? [options.lint.inputs]\n : [\"linting\", \"typescript\"]\n ),\n outputs: options?.lint?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.lint?.executor ||\n `@${framework}/nx:${options?.lint?.targetName || \"lint\"}`,\n dependsOn:\n options?.lint?.dependsOn ??\n ([\n `^${options?.lint?.targetName || \"lint\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.lint?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.docs !== false &&\n !targets[options?.docs?.targetName || \"docs\"]\n ) {\n targets[options?.docs?.targetName || \"docs\"] = {\n cache: true,\n inputs: Array.isArray(options?.docs?.inputs)\n ? options.docs.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.docs?.inputs\n ? [options.docs.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.docs?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.docs?.executor ||\n `@${framework}/nx:${options?.docs?.targetName || \"docs\"}`,\n dependsOn:\n options?.docs?.dependsOn ??\n ([\n `^${options?.docs?.targetName || \"docs\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.docs?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.deploy !== false &&\n !targets[options?.deploy?.targetName || \"deploy\"]\n ) {\n targets[options?.deploy?.targetName || \"deploy\"] = {\n inputs: Array.isArray(options?.deploy?.inputs)\n ? options.deploy.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.deploy?.inputs\n ? [options.deploy.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.deploy?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.deploy?.executor ||\n `@${framework}/nx:${options?.deploy?.targetName || \"deploy\"}`,\n dependsOn:\n options?.deploy?.dependsOn ??\n ([\n `^${options?.deploy?.targetName || \"deploy\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.deploy?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n setDefaultProjectTags(projectConfig, name);\n addProjectTag(\n projectConfig,\n framework as ProjectTagVariant,\n userConfig.projectType ||\n projectConfig.projectType ||\n \"library\",\n {\n overwrite: true\n }\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${\n title\n }] - ${new Date().toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`\n );\n }\n\n return {\n projects: {\n [root]: defu(projectConfig, {\n name: kebabCase(userConfig.name)!,\n projectType: userConfig.projectType || \"library\",\n root,\n sourceRoot: joinPaths(root, \"src\"),\n targets\n })\n }\n };\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - Failed to process the project configuration for file \"${\n configFile\n }\" - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error\"\n }`\n );\n\n return {};\n }\n },\n configFiles,\n options,\n contextV2\n );\n }\n ];\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error during plugin initialization\"\n }`\n );\n\n throw new Error(\n `Failed to initialize the ${title} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"See previous logs for more details\"\n }`,\n {\n cause: error instanceof Error ? error : undefined\n }\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFA,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIA,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,0BAAyB,WAAW,YAAY,YAAY,YAAY,CAAC,GACrE,YAAY,YAAY,YAAY,GACpC,WACI,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,GACD,WACI,UAAU,WAAW,aAAa,cAAc,EAAE,WAAW,CAC9D,GACD,UAAU,WAAW,aAAa,cAAc,EAAE,WAAW,GAC7D;AAGV,KAAI,CAAC,uBACH,0BAAyB,WACvB,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,CACF,GACG,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,GACD,WACI,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,GACD,WACI,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,GACD,WACI,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,aACtB,GACD,WACI,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,YACd,GACD,WACI,UACE,WAAW,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,EACF;aACM,OAAO;AACd,aAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,2DACvC,WACD,MACC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wBAET;AAED,YAAO,EAAE;;MAGb,aACA,SACA,UACD;IAEJ;UACM,OAAO;AACd,UAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,KACvC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,qDAET;AAED,QAAM,IAAI,MACR,4BAA4B,MAAM,KAChC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wCAER,EACE,OAAO,iBAAiB,QAAQ,QAAQ,QACzC,CACF"}
|
|
@@ -12,9 +12,11 @@ let __stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
|
|
|
12
12
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
13
13
|
let __stryke_hash_murmurhash = require("@stryke/hash/murmurhash");
|
|
14
14
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
15
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
15
16
|
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
16
17
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
17
18
|
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
19
|
+
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
18
20
|
let jiti = require("jiti");
|
|
19
21
|
let node_fs_promises = require("node:fs/promises");
|
|
20
22
|
let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
|
|
@@ -30,7 +32,6 @@ require("@stryke/helpers/get-unique");
|
|
|
30
32
|
require("@stryke/path/is-type");
|
|
31
33
|
require("@stryke/type-checks/is-object");
|
|
32
34
|
require("@stryke/type-checks/is-regexp");
|
|
33
|
-
require("@stryke/type-checks/is-set-string");
|
|
34
35
|
require("@stryke/type-checks/is-string");
|
|
35
36
|
require("@stryke/path/join");
|
|
36
37
|
require("@storm-software/config-tools/types");
|
|
@@ -86,7 +87,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti$1, command, m
|
|
|
86
87
|
name: framework,
|
|
87
88
|
envName: mode,
|
|
88
89
|
globalRc: true,
|
|
89
|
-
packageJson:
|
|
90
|
+
packageJson: (0, __stryke_string_format_camel_case.camelCase)(framework),
|
|
90
91
|
dotenv: true,
|
|
91
92
|
jiti: jiti$1
|
|
92
93
|
});
|
|
@@ -162,7 +163,12 @@ function createNxPlugin(opts) {
|
|
|
162
163
|
}
|
|
163
164
|
const root = (0, __storm_software_workspace_tools_utils_plugin_helpers.getRoot)(projectRoot, context);
|
|
164
165
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
165
|
-
|
|
166
|
+
let userConfig = {};
|
|
167
|
+
try {
|
|
168
|
+
userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
169
|
+
} catch (error) {
|
|
170
|
+
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to load user configuration for project in ${projectRoot} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : (0, __stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown error"} \n\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`);
|
|
171
|
+
}
|
|
166
172
|
if (!(0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
167
173
|
if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${(0, __stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
168
174
|
return {};
|
|
@@ -173,7 +179,7 @@ function createNxPlugin(opts) {
|
|
|
173
179
|
return {};
|
|
174
180
|
}
|
|
175
181
|
const packageJson = JSON.parse(packageJsonContent);
|
|
176
|
-
if (!userConfig.configFile && !packageJson?.
|
|
182
|
+
if (!userConfig.configFile && !packageJson?.[(0, __stryke_string_format_camel_case.camelCase)(framework)]) {
|
|
177
183
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
178
184
|
return {};
|
|
179
185
|
}
|
|
@@ -192,8 +198,8 @@ function createNxPlugin(opts) {
|
|
|
192
198
|
dependsOn: options?.clean?.dependsOn ?? [`^${options?.clean?.targetName || "clean"}`],
|
|
193
199
|
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
194
200
|
options: {
|
|
195
|
-
outputPath: userConfig.output?.outputPath
|
|
196
|
-
projectType:
|
|
201
|
+
outputPath: userConfig.output?.outputPath,
|
|
202
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
197
203
|
autoInstall: userConfig.autoInstall
|
|
198
204
|
},
|
|
199
205
|
configurations: {
|
|
@@ -214,7 +220,7 @@ function createNxPlugin(opts) {
|
|
|
214
220
|
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
215
221
|
options: {
|
|
216
222
|
input: userConfig.input,
|
|
217
|
-
projectType:
|
|
223
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
218
224
|
autoInstall: userConfig.autoInstall,
|
|
219
225
|
skipCache: userConfig.skipCache
|
|
220
226
|
},
|
|
@@ -236,8 +242,8 @@ function createNxPlugin(opts) {
|
|
|
236
242
|
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
237
243
|
options: {
|
|
238
244
|
input: userConfig.input,
|
|
239
|
-
outputPath: userConfig.output?.outputPath
|
|
240
|
-
projectType:
|
|
245
|
+
outputPath: userConfig.output?.outputPath,
|
|
246
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
241
247
|
autoInstall: userConfig.autoInstall,
|
|
242
248
|
skipCache: userConfig.skipCache
|
|
243
249
|
},
|
|
@@ -259,7 +265,7 @@ function createNxPlugin(opts) {
|
|
|
259
265
|
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
260
266
|
options: {
|
|
261
267
|
input: userConfig.input,
|
|
262
|
-
projectType:
|
|
268
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
263
269
|
autoInstall: userConfig.autoInstall,
|
|
264
270
|
skipCache: userConfig.skipCache
|
|
265
271
|
},
|
|
@@ -285,7 +291,7 @@ function createNxPlugin(opts) {
|
|
|
285
291
|
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
286
292
|
options: {
|
|
287
293
|
input: userConfig.input,
|
|
288
|
-
projectType:
|
|
294
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
289
295
|
autoInstall: userConfig.autoInstall,
|
|
290
296
|
skipCache: userConfig.skipCache
|
|
291
297
|
},
|
|
@@ -310,7 +316,7 @@ function createNxPlugin(opts) {
|
|
|
310
316
|
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
311
317
|
options: {
|
|
312
318
|
input: userConfig.input,
|
|
313
|
-
projectType:
|
|
319
|
+
projectType: userConfig.projectType || projectConfig.projectType,
|
|
314
320
|
autoInstall: userConfig.autoInstall,
|
|
315
321
|
skipCache: userConfig.skipCache
|
|
316
322
|
},
|
|
@@ -324,7 +330,7 @@ function createNxPlugin(opts) {
|
|
|
324
330
|
}
|
|
325
331
|
};
|
|
326
332
|
(0, __storm_software_workspace_tools_utils_project_tags.setDefaultProjectTags)(projectConfig, name);
|
|
327
|
-
(0, __storm_software_workspace_tools_utils_project_tags.addProjectTag)(projectConfig, framework,
|
|
333
|
+
(0, __storm_software_workspace_tools_utils_project_tags.addProjectTag)(projectConfig, framework, userConfig.projectType || projectConfig.projectType || "library", { overwrite: true });
|
|
328
334
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
329
335
|
return { projects: { [root]: (0, defu.default)(projectConfig, {
|
|
330
336
|
name: (0, __stryke_string_format_kebab_case.kebabCase)(userConfig.name),
|
|
@@ -334,14 +340,14 @@ function createNxPlugin(opts) {
|
|
|
334
340
|
targets
|
|
335
341
|
}) } };
|
|
336
342
|
} catch (error) {
|
|
337
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : "Unknown fatal error"}`);
|
|
338
|
-
|
|
343
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to process the project configuration for file "${configFile}" - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : (0, __stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown fatal error"}`);
|
|
344
|
+
return {};
|
|
339
345
|
}
|
|
340
346
|
}, configFiles, options, contextV2);
|
|
341
347
|
}];
|
|
342
348
|
} catch (error) {
|
|
343
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
344
|
-
throw new Error(`Failed to initialize the ${title}. See previous logs for more details
|
|
349
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : (0, __stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown fatal error during plugin initialization"}`);
|
|
350
|
+
throw new Error(`Failed to initialize the ${title} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : (0, __stryke_type_checks_is_set_string.isSetString)(error) ? error : "See previous logs for more details"}`, { cause: error instanceof Error ? error : void 0 });
|
|
345
351
|
}
|
|
346
352
|
}
|
|
347
353
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped5 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/base/base-executor.untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped5.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=base-executor.untyped.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped4 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/build/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped4.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped1 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/build/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped1.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped5 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/clean/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped5.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped0 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/docs/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped0.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped4 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/docs/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped4.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped2 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/lint/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped2.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped0 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/lint/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped0.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped1 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/prepare/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped1.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped2 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/executors/prepare/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped2.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped3 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/sync/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped3.SchemaDefinition;
|
|
5
5
|
export = _default;
|
|
6
6
|
//# sourceMappingURL=untyped.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as untyped0 from "untyped";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/sync/untyped.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: untyped0.SchemaDefinition;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_plugin_utilities = require('../../plugin-utilities-
|
|
1
|
+
const require_plugin_utilities = require('../../plugin-utilities-DFcO_zBx.cjs');
|
|
2
2
|
require('../../constants-BHT2TeEj.cjs');
|
|
3
3
|
|
|
4
4
|
exports.createNxPlugin = require_plugin_utilities.createNxPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utilities.d.cts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin-utilities.d.cts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkEA;AAUA;AAMA;AAsCA;AACmB,iBAvDH,iBAAA,CAuDG,SAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA;;;;;;;iBA7CH,iBAAA;UAMC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCD,gCACG,kBAAkB,wBAC5B,wBAAwB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utilities.d.mts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin-utilities.d.mts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkEA;AAUA;AAMA;AAsCA;AACmB,iBAvDH,iBAAA,CAuDG,SAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA;;;;;;;iBA7CH,iBAAA;UAMC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCD,gCACG,kBAAkB,wBAC5B,wBAAwB,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getNxPluginInputs, r as getNxTargetInputs, t as createNxPlugin } from "../../plugin-utilities-
|
|
1
|
+
import { n as getNxPluginInputs, r as getNxTargetInputs, t as createNxPlugin } from "../../plugin-utilities-BYSLw2Ex.mjs";
|
|
2
2
|
import "../../constants-DPeeG_si.mjs";
|
|
3
3
|
|
|
4
4
|
export { createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('../../plugin-utilities-
|
|
1
|
+
require('../../plugin-utilities-DFcO_zBx.cjs');
|
|
2
2
|
require('../../constants-BHT2TeEj.cjs');
|
|
3
|
-
const require_plugin = require('../../plugin-
|
|
3
|
+
const require_plugin = require('../../plugin-DlYLuMgP.cjs');
|
|
4
4
|
|
|
5
5
|
exports.createNodesV2 = require_plugin.createNodesV2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../plugin-utilities-
|
|
1
|
+
import "../../plugin-utilities-BYSLw2Ex.mjs";
|
|
2
2
|
import "../../constants-DPeeG_si.mjs";
|
|
3
|
-
import { t as createNodesV2 } from "../../plugin-
|
|
3
|
+
import { t as createNodesV2 } from "../../plugin-DIpGOXic.mjs";
|
|
4
4
|
|
|
5
5
|
export { createNodesV2 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/nx",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.229",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Nx plugin to support Powerlines development in Nx monorepos.",
|
|
6
6
|
"repository": {
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"eslint-flat-config-utils": "^2.1.4",
|
|
218
218
|
"jsonc-eslint-parser": "^2.4.2",
|
|
219
219
|
"nx": "22.5.2",
|
|
220
|
-
"powerlines": "^0.39.
|
|
220
|
+
"powerlines": "^0.39.9"
|
|
221
221
|
},
|
|
222
222
|
"peerDependencies": { "nx": ">=22.5.0", "powerlines": ">=0.39.2" },
|
|
223
223
|
"peerDependenciesMeta": {
|
|
@@ -227,5 +227,5 @@
|
|
|
227
227
|
"publishConfig": { "access": "public" },
|
|
228
228
|
"executors": "./executors.json",
|
|
229
229
|
"generators": "./generators.json",
|
|
230
|
-
"gitHead": "
|
|
230
|
+
"gitHead": "645a902416b92ae709b2ae786c21d3ec0be09258"
|
|
231
231
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utilities-Ci8AHf-K.mjs","names":["resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined","loadConfigC12","readNxJson","packageJson: PackageJson","targets: ProjectConfiguration[\"targets\"]"],"sources":["../../core/src/lib/config.ts","../../core/src/lib/constants/meta.ts","../../core/src/lib/utilities/source-map.ts","../src/helpers/plugin-utilities.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\n\nexport type PartiallyResolvedContext<TContext extends Context = Context> = Omit<\n TContext,\n \"config\" | \"tsconfig\" | \"entry\" | \"fs\" | \"compiler\" | \"unimport\"\n> &\n Partial<TContext> & {\n config: TContext[\"config\"];\n };\n\n/**\n * Loads the workspace configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param cwd - The current working directory to start searching from.\n * @returns A promise that resolves to the loaded workspace configuration.\n */\nexport async function loadWorkspaceConfig(\n workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ROOT_HASH_LENGTH = 45;\nexport const CACHE_HASH_LENGTH = 62;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport Diff from \"diff-match-patch\";\nimport type MagicString from \"magic-string\";\nimport type { TransformResult } from \"../../types/context\";\n\nconst dmp = new Diff();\n\n/**\n * Generate code with source map.\n *\n * @param code - The source code.\n * @param id - The file name.\n * @param transpiled - The transpiled code.\n * @returns The compiler result.\n */\nexport function generateSourceMap(\n code: MagicString,\n id: string,\n transpiled?: string\n): TransformResult | undefined {\n if (!transpiled) {\n return;\n }\n\n const diff = dmp.diff_main(code.toString(), transpiled);\n dmp.diff_cleanupSemantic(diff);\n\n let offset = 0;\n\n for (let index = 0; index < diff.length; index++) {\n if (diff[index]) {\n const [type, text] = diff[index]!;\n const textLength = text.length;\n\n switch (type) {\n case 0: {\n offset += textLength;\n break;\n }\n case 1: {\n code.prependLeft(offset, text);\n break;\n }\n case -1: {\n const next = diff.at(index + 1);\n\n if (next && next[0] === 1) {\n const replaceText = next[1];\n\n const firstNonWhitespaceIndexOfText = text.search(/\\S/);\n const offsetStart =\n offset + Math.max(firstNonWhitespaceIndexOfText, 0);\n\n code.update(offsetStart, offset + textLength, replaceText);\n index += 1;\n } else {\n code.remove(offset, offset + textLength);\n }\n\n offset += textLength;\n\n break;\n }\n }\n }\n }\n\n if (!code.hasChanged()) {\n return;\n }\n\n return {\n code: code.toString(),\n map: code.generateMap({\n source: id,\n file: `${id}.map`,\n includeContent: true\n })\n };\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable no-console */\n\nimport type { CreateNodesResultV2, CreateNodesV2 } from \"@nx/devkit\";\nimport { createNodesFromFiles } from \"@nx/devkit\";\nimport type { ProjectTagVariant } from \"@storm-software/workspace-tools/types\";\nimport { withNamedInputs } from \"@storm-software/workspace-tools/utils/nx-json\";\nimport {\n getProjectConfigFromProjectRoot,\n getProjectRoot,\n getRoot\n} from \"@storm-software/workspace-tools/utils/plugin-helpers\";\nimport {\n addProjectTag,\n setDefaultProjectTags\n} from \"@storm-software/workspace-tools/utils/project-tags\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { murmurhash } from \"@stryke/hash/murmurhash\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport { readFile } from \"node:fs/promises\";\nimport { readNxJson } from \"nx/src/config/nx-json.js\";\nimport type {\n ProjectConfiguration,\n TargetConfiguration\n} from \"nx/src/config/workspace-json-project-json.js\";\nimport type { PackageJson as PackageJsonNx } from \"nx/src/utils/package-json.js\";\nimport { readTargetsFromPackageJson } from \"nx/src/utils/package-json.js\";\nimport { loadUserConfigFile } from \"powerlines/config\";\nimport { ROOT_HASH_LENGTH } from \"powerlines/utils\";\nimport { NxPluginOptions } from \"../types/plugin\";\nimport { CONFIG_INPUTS } from \"./constants\";\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxTargetInputs(framework: string): string[] {\n return CONFIG_INPUTS.map(input => input.replace(\"{framework}\", framework));\n}\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxPluginInputs(framework: string): string {\n return `**/{${getNxTargetInputs(framework)\n .map(input => input.replace(\"{projectRoot}/\", \"\"))\n .join(\",\")}}`;\n}\n\nexport interface CreateNxPluginOptions {\n /**\n * The name of the Nx plugin to create\n *\n * @remarks\n * This will be used in logging and project tagging.\n *\n * @defaultValue \"\\{framework\\}/plugin/nx\"\n */\n name?: string;\n\n /**\n * The folder where the generated runtime artifacts will be located\n *\n * @remarks\n * This folder will contain all runtime artifacts and builtins generated during the \"prepare\" phase.\n *\n * @defaultValue \"\\{projectRoot\\}/.powerlines\"\n */\n artifactsFolder?: string;\n\n /**\n * A string identifier that allows a child framework or tool to identify itself when using Powerlines.\n *\n * @remarks\n * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.\n *\n * @defaultValue \"powerlines\"\n */\n framework?: string;\n}\n\n/**\n * Creates an Nx plugin that integrates Powerlines into the Nx build process.\n *\n * @param opts - Options for creating the Nx plugin\n * @returns A CreateNodesV2 function that can be used as an Nx plugin\n */\nexport function createNxPlugin<\n TOptions extends NxPluginOptions = NxPluginOptions\n>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions> {\n const framework = opts?.framework || \"powerlines\";\n const title = `${titleCase(framework)} Nx Plugin`;\n\n try {\n const name = opts?.name || `${framework}/nx/plugin`;\n const artifactsFolder =\n opts?.artifactsFolder || `{projectRoot}/.${framework}`;\n\n const targetInputs = getNxTargetInputs(framework);\n const pluginInputs = getNxPluginInputs(framework);\n\n return [\n pluginInputs,\n async (configFiles, options, contextV2): Promise<CreateNodesResultV2> => {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`\n );\n }\n\n const envPaths = getEnvPaths({\n orgId: \"storm-software\",\n appId: framework,\n workspaceRoot: contextV2.workspaceRoot\n });\n if (!envPaths.cache) {\n throw new Error(\"The cache directory could not be determined.\");\n }\n\n const nxJson = readNxJson(contextV2.workspaceRoot);\n const resolver = createJiti(contextV2.workspaceRoot, {\n debug: !!options?.debug,\n interopDefault: true,\n fsCache: joinPaths(\n envPaths.cache,\n \"nx-plugin\",\n murmurhash(contextV2.workspaceRoot, {\n maxLength: ROOT_HASH_LENGTH\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n return createNodesFromFiles(\n async (configFile, _, context) => {\n try {\n const projectRoot = getProjectRoot(\n configFile,\n contextV2.workspaceRoot\n );\n if (!projectRoot) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - package.json and ${\n framework\n } configuration files (i.e. ${\n framework\n }.config.ts) must be located in the project root directory: ${\n configFile\n }`\n );\n\n return {};\n }\n\n const root = getRoot(projectRoot, context);\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Loading ${\n framework\n } user configuration for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n const userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\n\n if (\n !existsSync(\n joinPaths(\n contextV2.workspaceRoot,\n projectRoot,\n \"package.json\"\n )\n )\n ) {\n if (options?.verboseOutput) {\n console.warn(\n `[${\n title\n }] - ${new Date().toISOString()} - Cannot find \\`package.json\\` file in the project's root directory (path: \"${joinPaths(\n contextV2.workspaceRoot,\n projectRoot\n )}\"). Skipping project configuration.`\n );\n }\n\n return {};\n }\n\n const packageJsonContent = await readFile(\n joinPaths(contextV2.workspaceRoot, projectRoot, \"package.json\"),\n \"utf8\"\n );\n if (!packageJsonContent) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No package.json file found for project in root directory ${projectRoot}`\n );\n }\n\n return {};\n }\n\n const packageJson: PackageJson = JSON.parse(packageJsonContent);\n if (!userConfig.configFile && !packageJson?.storm) {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Skipping ${projectRoot} - no ${\n framework\n } configuration found for project in root directory.`\n );\n }\n\n return {};\n }\n\n const projectConfig = getProjectConfigFromProjectRoot(\n projectRoot,\n packageJson\n );\n if (!projectConfig) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No project configuration found for project in root directory ${\n projectRoot\n }`\n );\n }\n\n return {};\n }\n\n const targets: ProjectConfiguration[\"targets\"] =\n readTargetsFromPackageJson(\n packageJson as PackageJsonNx,\n nxJson,\n projectRoot,\n context.workspaceRoot\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Preparing Nx targets for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n if (\n options?.clean !== false &&\n !targets[options?.clean?.targetName || \"clean\"]\n ) {\n targets[options?.clean?.targetName || \"clean\"] = {\n cache: true,\n inputs: Array.isArray(options?.clean?.inputs)\n ? options.clean.inputs\n : withNamedInputs(targetInputs, [\n options?.clean?.inputs || \"typescript\"\n ]),\n outputs: options?.clean?.outputs,\n executor:\n options?.clean?.executor ||\n `@${framework}/nx:${options?.clean?.targetName || \"clean\"}`,\n dependsOn: options?.clean?.dependsOn ?? [\n `^${options?.clean?.targetName || \"clean\"}`\n ],\n defaultConfiguration:\n options?.clean?.defaultConfiguration || \"production\",\n options: {\n outputPath:\n userConfig.output?.outputPath || \"dist/{projectRoot}\",\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.prepare !== false &&\n !targets[options?.prepare?.targetName || \"prepare\"]\n ) {\n targets[options?.prepare?.targetName || \"prepare\"] = {\n cache: true,\n inputs: Array.isArray(options?.prepare?.inputs)\n ? options.prepare.inputs\n : withNamedInputs(targetInputs, [\n options?.prepare?.inputs || \"typescript\"\n ]),\n outputs: options?.prepare?.outputs ?? [artifactsFolder],\n executor:\n options?.prepare?.executor ||\n `@${framework}/nx:${options?.prepare?.targetName || \"prepare\"}`,\n dependsOn:\n options?.prepare?.dependsOn ??\n ([\n `^${options?.prepare?.targetName || \"build\"}`,\n options?.clean !== false &&\n `${options?.clean?.targetName || \"clean\"}`\n ].filter(Boolean) as string[]),\n defaultConfiguration:\n options?.prepare?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.build !== false &&\n !targets[options?.build?.targetName || \"build\"]\n ) {\n targets[options?.build?.targetName || \"build\"] = {\n cache: true,\n inputs: Array.isArray(options?.build?.inputs)\n ? options.build.inputs\n : withNamedInputs(targetInputs, [\n options?.build?.inputs || \"typescript\"\n ]),\n outputs: options?.build?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.build?.executor ||\n `@${framework}/nx:${options?.build?.targetName || \"build\"}`,\n dependsOn:\n options?.build?.dependsOn ??\n ([\n `^${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.build?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n outputPath:\n userConfig.output?.outputPath || \"dist/{projectRoot}\",\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.lint !== false &&\n !targets[options?.lint?.targetName || \"lint\"]\n ) {\n targets[options?.lint?.targetName || \"lint\"] = {\n cache: true,\n inputs: Array.isArray(options?.lint?.inputs)\n ? options.lint.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.lint?.inputs\n ? [options.lint.inputs]\n : [\"linting\", \"typescript\"]\n ),\n outputs: options?.lint?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.lint?.executor ||\n `@${framework}/nx:${options?.lint?.targetName || \"lint\"}`,\n dependsOn:\n options?.lint?.dependsOn ??\n ([\n `^${options?.lint?.targetName || \"lint\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.lint?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.docs !== false &&\n !targets[options?.docs?.targetName || \"docs\"]\n ) {\n targets[options?.docs?.targetName || \"docs\"] = {\n cache: true,\n inputs: Array.isArray(options?.docs?.inputs)\n ? options.docs.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.docs?.inputs\n ? [options.docs.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.docs?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.docs?.executor ||\n `@${framework}/nx:${options?.docs?.targetName || \"docs\"}`,\n dependsOn:\n options?.docs?.dependsOn ??\n ([\n `^${options?.docs?.targetName || \"docs\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.docs?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.deploy !== false &&\n !targets[options?.deploy?.targetName || \"deploy\"]\n ) {\n targets[options?.deploy?.targetName || \"deploy\"] = {\n inputs: Array.isArray(options?.deploy?.inputs)\n ? options.deploy.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.deploy?.inputs\n ? [options.deploy.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.deploy?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.deploy?.executor ||\n `@${framework}/nx:${options?.deploy?.targetName || \"deploy\"}`,\n dependsOn:\n options?.deploy?.dependsOn ??\n ([\n `^${options?.deploy?.targetName || \"deploy\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.deploy?.defaultConfiguration || \"production\",\n options: {\n input: userConfig.input,\n projectType:\n projectConfig.projectType || userConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n setDefaultProjectTags(projectConfig, name);\n addProjectTag(\n projectConfig,\n framework as ProjectTagVariant,\n projectConfig.projectType ||\n userConfig.projectType ||\n \"library\",\n {\n overwrite: true\n }\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${\n title\n }] - ${new Date().toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`\n );\n }\n\n return {\n projects: {\n [root]: defu(projectConfig, {\n name: kebabCase(userConfig.name)!,\n projectType: userConfig.projectType || \"library\",\n root,\n sourceRoot: joinPaths(root, \"src\"),\n targets\n })\n }\n };\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - ${\n isError(error) ? error.message : \"Unknown fatal error\"\n }`\n );\n\n throw new Error(\n `The ${\n title\n } failed to process the project configuration for file ${\n configFile\n }. See previous logs for more details.`,\n {\n cause: error instanceof Error ? error : undefined\n }\n );\n }\n },\n configFiles,\n options,\n contextV2\n );\n }\n ];\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - ${\n isError(error)\n ? error.message\n : \"Unknown fatal error during plugin initialization\"\n }`\n );\n\n throw new Error(\n `Failed to initialize the ${title}. See previous logs for more details.`,\n {\n cause: error instanceof Error ? error : undefined\n }\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIA,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,0BAAyB,WAAW,YAAY,YAAY,YAAY,CAAC,GACrE,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