@powerlines/nx 0.11.314 → 0.12.0
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/dist/src/helpers/plugin-utilities.js +6 -5
- package/dist/src/helpers/plugin-utilities.mjs +6 -5
- package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
- package/dist/src/plugin/index.d.mts +45 -0
- package/dist/src/plugin/index.d.mts.map +1 -1
- package/dist/src/plugin/index.d.ts +45 -0
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +6 -5
- package/dist/src/plugin/index.mjs +6 -5
- package/dist/src/plugin/index.mjs.map +1 -1
- package/dist/src/types/plugin.d.mts +45 -0
- package/dist/src/types/plugin.d.mts.map +1 -1
- package/dist/src/types/plugin.d.ts +45 -0
- package/dist/src/types/plugin.d.ts.map +1 -1
- package/package.json +15 -15
|
@@ -113,7 +113,7 @@ function createNxPlugin(opts) {
|
|
|
113
113
|
const targets = (0, nx_src_utils_package_json_js.readTargetsFromPackageJson)(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
114
114
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
115
115
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
|
|
116
|
-
cache: true,
|
|
116
|
+
cache: options?.clean?.cache ?? options?.cache ?? true,
|
|
117
117
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.clean?.inputs || "typescript"]),
|
|
118
118
|
outputs: options?.clean?.outputs,
|
|
119
119
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
@@ -134,7 +134,7 @@ function createNxPlugin(opts) {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
|
|
137
|
-
cache: true,
|
|
137
|
+
cache: options?.prepare?.cache ?? options?.cache ?? true,
|
|
138
138
|
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.prepare?.inputs || "typescript"]),
|
|
139
139
|
outputs: options?.prepare?.outputs ?? [artifactsFolder],
|
|
140
140
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
@@ -155,7 +155,7 @@ function createNxPlugin(opts) {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
|
|
158
|
-
cache: true,
|
|
158
|
+
cache: options?.build?.cache ?? options?.cache ?? true,
|
|
159
159
|
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
160
160
|
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
161
161
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
@@ -176,7 +176,7 @@ function createNxPlugin(opts) {
|
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
|
|
179
|
-
cache: true,
|
|
179
|
+
cache: options?.lint?.cache ?? options?.cache ?? true,
|
|
180
180
|
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
181
181
|
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
182
182
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
@@ -197,7 +197,7 @@ function createNxPlugin(opts) {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
|
|
200
|
-
cache: true,
|
|
200
|
+
cache: options?.docs?.cache ?? options?.cache ?? true,
|
|
201
201
|
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
|
|
202
202
|
outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
|
|
203
203
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
@@ -222,6 +222,7 @@ function createNxPlugin(opts) {
|
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
|
|
225
|
+
cache: options?.deploy?.cache ?? false,
|
|
225
226
|
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
|
|
226
227
|
outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
|
|
227
228
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
@@ -110,7 +110,7 @@ function createNxPlugin(opts) {
|
|
|
110
110
|
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
111
111
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
112
112
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
|
|
113
|
-
cache: true,
|
|
113
|
+
cache: options?.clean?.cache ?? options?.cache ?? true,
|
|
114
114
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [options?.clean?.inputs || "typescript"]),
|
|
115
115
|
outputs: options?.clean?.outputs,
|
|
116
116
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
@@ -131,7 +131,7 @@ function createNxPlugin(opts) {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
|
|
134
|
-
cache: true,
|
|
134
|
+
cache: options?.prepare?.cache ?? options?.cache ?? true,
|
|
135
135
|
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : withNamedInputs(targetInputs, [options?.prepare?.inputs || "typescript"]),
|
|
136
136
|
outputs: options?.prepare?.outputs ?? [artifactsFolder],
|
|
137
137
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
@@ -152,7 +152,7 @@ function createNxPlugin(opts) {
|
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
|
|
155
|
-
cache: true,
|
|
155
|
+
cache: options?.build?.cache ?? options?.cache ?? true,
|
|
156
156
|
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
157
157
|
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
158
158
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
@@ -173,7 +173,7 @@ function createNxPlugin(opts) {
|
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
|
|
176
|
-
cache: true,
|
|
176
|
+
cache: options?.lint?.cache ?? options?.cache ?? true,
|
|
177
177
|
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
178
178
|
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
179
179
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
@@ -194,7 +194,7 @@ function createNxPlugin(opts) {
|
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
|
|
197
|
-
cache: true,
|
|
197
|
+
cache: options?.docs?.cache ?? options?.cache ?? true,
|
|
198
198
|
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
|
|
199
199
|
outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
|
|
200
200
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
@@ -219,6 +219,7 @@ function createNxPlugin(opts) {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
|
|
222
|
+
cache: options?.deploy?.cache ?? false,
|
|
222
223
|
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
|
|
223
224
|
outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
|
|
224
225
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utilities.mjs","names":[],"sources":["../../../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\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\";\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, Jiti } 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, PowerlinesCommand } from \"powerlines\";\nimport type { 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\ntype LoadUserConfigFileFunction = (\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode?: string,\n configFile?: string,\n framework?: string\n) => Promise<ParsedUserConfig>;\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: 45\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n let loadUserConfigFile: LoadUserConfigFileFunction | undefined;\n try {\n loadUserConfigFile = await resolver\n .import<{\n loadUserConfigFile: LoadUserConfigFileFunction;\n }>(resolver.esmResolve(\"powerlines/config\"))\n .then(mod => mod?.loadUserConfigFile);\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration file function: ${\n isError(error) ? error.message : \"Unknown error\"\n }`\n );\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 if (loadUserConfigFile) {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 || \"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: projectConfig.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3D,QAAO,OAAO,kBAAkB,UAAU,CACvC,KAAI,UAAS,MAAM,QAAQ,kBAAkB,GAAG,CAAC,CACjD,KAAK,IAAI,CAAC;;;;;;;;AAmDf,SAAgB,eAEd,MAAuD;CACvD,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,QAAQ,GAAG,UAAU,UAAU,CAAC;AAEtC,KAAI;EACF,MAAM,OAAO,MAAM,QAAQ,GAAG,UAAU;EACxC,MAAM,kBACJ,MAAM,mBAAmB,kBAAkB;EAE7C,MAAM,eAAe,kBAAkB,UAAU;EACjD,MAAM,eAAe,kBAAkB,UAAU;AAEjD,SAAO,CACL,cACA,OAAO,aAAa,SAAS,cAA4C;AACvE,OAAI,SAAS,cACX,SAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,E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ACM,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"}
|
|
1
|
+
{"version":3,"file":"plugin-utilities.mjs","names":[],"sources":["../../../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\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\";\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, Jiti } 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, PowerlinesCommand } from \"powerlines\";\nimport type { 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\ntype LoadUserConfigFileFunction = (\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode?: string,\n configFile?: string,\n framework?: string\n) => Promise<ParsedUserConfig>;\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: 45\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n let loadUserConfigFile: LoadUserConfigFileFunction | undefined;\n try {\n loadUserConfigFile = await resolver\n .import<{\n loadUserConfigFile: LoadUserConfigFileFunction;\n }>(resolver.esmResolve(\"powerlines/config\"))\n .then(mod => mod?.loadUserConfigFile);\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration file function: ${\n isError(error) ? error.message : \"Unknown error\"\n }`\n );\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 if (loadUserConfigFile) {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\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: options?.clean?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.prepare?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.build?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.lint?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.docs?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 cache: options?.deploy?.cache ?? false,\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 || \"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: projectConfig.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3D,QAAO,OAAO,kBAAkB,UAAU,CACvC,KAAI,UAAS,MAAM,QAAQ,kBAAkB,GAAG,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QACP;OACD,aAAa;QACX,MAAM;QACN,WAAW;QACZ;OACF;MACF;AAGH,2BAAsB,eAAe,KAAK;AAC1C,mBACE,eACA,WACA,cAAc,eAAe,WAC7B,EACE,WAAW,MACZ,CACF;AAED,SAAI,SAAS,cACX,SAAQ,MACN,IACE,MACD,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,wEAAwE,YAAY,GACrH;AAGH,YAAO,EACL,UAAU,GACP,OAAO,KAAK,eAAe;MAC1B,MAAM,UAAU,WAAW,KAAK;MAChC,aAAa,cAAc,eAAe;MAC1C;MACA,YAAY,UAAU,MAAM,MAAM;MAClC;MACD,CAAC,EACH,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,6 +12,12 @@ interface NxPluginOptions {
|
|
|
12
12
|
* @defaultValue "clean"
|
|
13
13
|
*/
|
|
14
14
|
targetName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue true
|
|
19
|
+
*/
|
|
20
|
+
cache?: boolean;
|
|
15
21
|
/**
|
|
16
22
|
* The name of the clean configuration to use when cleaning the project
|
|
17
23
|
*
|
|
@@ -49,6 +55,12 @@ interface NxPluginOptions {
|
|
|
49
55
|
* @defaultValue "prepare"
|
|
50
56
|
*/
|
|
51
57
|
targetName?: string;
|
|
58
|
+
/**
|
|
59
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue true
|
|
62
|
+
*/
|
|
63
|
+
cache?: boolean;
|
|
52
64
|
/**
|
|
53
65
|
* The name of the prepare configuration to use when preparing the project
|
|
54
66
|
*
|
|
@@ -86,6 +98,12 @@ interface NxPluginOptions {
|
|
|
86
98
|
* @defaultValue "lint"
|
|
87
99
|
*/
|
|
88
100
|
targetName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
103
|
+
*
|
|
104
|
+
* @defaultValue true
|
|
105
|
+
*/
|
|
106
|
+
cache?: boolean;
|
|
89
107
|
/**
|
|
90
108
|
* The name of the lint configuration to use when linting the project
|
|
91
109
|
*
|
|
@@ -123,6 +141,12 @@ interface NxPluginOptions {
|
|
|
123
141
|
* @defaultValue "build"
|
|
124
142
|
*/
|
|
125
143
|
targetName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue true
|
|
148
|
+
*/
|
|
149
|
+
cache?: boolean;
|
|
126
150
|
/**
|
|
127
151
|
* The name of the build configuration to use when building the project
|
|
128
152
|
*
|
|
@@ -160,6 +184,12 @@ interface NxPluginOptions {
|
|
|
160
184
|
* @defaultValue "docs"
|
|
161
185
|
*/
|
|
162
186
|
targetName?: string;
|
|
187
|
+
/**
|
|
188
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
189
|
+
*
|
|
190
|
+
* @defaultValue true
|
|
191
|
+
*/
|
|
192
|
+
cache?: boolean;
|
|
163
193
|
/**
|
|
164
194
|
* The name of the docs configuration to use when generating documentation for the project
|
|
165
195
|
*
|
|
@@ -197,6 +227,12 @@ interface NxPluginOptions {
|
|
|
197
227
|
* @defaultValue "deploy"
|
|
198
228
|
*/
|
|
199
229
|
targetName?: string;
|
|
230
|
+
/**
|
|
231
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
232
|
+
*
|
|
233
|
+
* @defaultValue false
|
|
234
|
+
*/
|
|
235
|
+
cache?: boolean;
|
|
200
236
|
/**
|
|
201
237
|
* The name of the deploy configuration to use when deploying the project
|
|
202
238
|
*
|
|
@@ -239,6 +275,15 @@ interface NxPluginOptions {
|
|
|
239
275
|
* @defaultValue false
|
|
240
276
|
*/
|
|
241
277
|
debug?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* An indicator to control the behavior of Nx caching for all of the targets
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* The `cache` value on the target specific options will override the value provided in this field.
|
|
283
|
+
*
|
|
284
|
+
* @defaultValue true
|
|
285
|
+
*/
|
|
286
|
+
cache?: boolean;
|
|
242
287
|
}
|
|
243
288
|
//#endregion
|
|
244
289
|
//#region src/plugin/index.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/types/plugin.ts","../../../src/plugin/index.ts"],"mappings":";;;UAkBiB,eAAA;;;AAAjB;EAIE,KAAA;IAJ8B;;;;;IAYxB,UAAA;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/types/plugin.ts","../../../src/plugin/index.ts"],"mappings":";;;UAkBiB,eAAA;;;AAAjB;EAIE,KAAA;IAJ8B;;;;;IAYxB,UAAA;IAqBA;;;;;IAdA,KAAA;IA6DA;;;;;IAtDA,oBAAA;IAoGN;;;;;IA7FM,SAAA;IA6IA;;;IAxIA,MAAA;IAoKA;;;IAtJA,OAAA;IAuLA;;;;;IAhLA,QAAA;EAAA;EA+NA;;;EAzNN,OAAA;IA4PM;;;;;IApPA,UAAA;IAgSA;;;;;IAzRA,KAAA;;;;AC7ER;;IDoFQ,oBAAA;ICpFkB;;;;;ID2FlB,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,KAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,MAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAWA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;;;;;;EAWN,aAAA;;;;;;EAOA,KAAA;;;;;;;;;EAUA,KAAA;AAAA;;;cClYW,aAAA,EAAa,aAAA,CAAA,aAAA,CAAA,eAAA"}
|
|
@@ -12,6 +12,12 @@ interface NxPluginOptions {
|
|
|
12
12
|
* @defaultValue "clean"
|
|
13
13
|
*/
|
|
14
14
|
targetName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue true
|
|
19
|
+
*/
|
|
20
|
+
cache?: boolean;
|
|
15
21
|
/**
|
|
16
22
|
* The name of the clean configuration to use when cleaning the project
|
|
17
23
|
*
|
|
@@ -49,6 +55,12 @@ interface NxPluginOptions {
|
|
|
49
55
|
* @defaultValue "prepare"
|
|
50
56
|
*/
|
|
51
57
|
targetName?: string;
|
|
58
|
+
/**
|
|
59
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue true
|
|
62
|
+
*/
|
|
63
|
+
cache?: boolean;
|
|
52
64
|
/**
|
|
53
65
|
* The name of the prepare configuration to use when preparing the project
|
|
54
66
|
*
|
|
@@ -86,6 +98,12 @@ interface NxPluginOptions {
|
|
|
86
98
|
* @defaultValue "lint"
|
|
87
99
|
*/
|
|
88
100
|
targetName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
103
|
+
*
|
|
104
|
+
* @defaultValue true
|
|
105
|
+
*/
|
|
106
|
+
cache?: boolean;
|
|
89
107
|
/**
|
|
90
108
|
* The name of the lint configuration to use when linting the project
|
|
91
109
|
*
|
|
@@ -123,6 +141,12 @@ interface NxPluginOptions {
|
|
|
123
141
|
* @defaultValue "build"
|
|
124
142
|
*/
|
|
125
143
|
targetName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue true
|
|
148
|
+
*/
|
|
149
|
+
cache?: boolean;
|
|
126
150
|
/**
|
|
127
151
|
* The name of the build configuration to use when building the project
|
|
128
152
|
*
|
|
@@ -160,6 +184,12 @@ interface NxPluginOptions {
|
|
|
160
184
|
* @defaultValue "docs"
|
|
161
185
|
*/
|
|
162
186
|
targetName?: string;
|
|
187
|
+
/**
|
|
188
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
189
|
+
*
|
|
190
|
+
* @defaultValue true
|
|
191
|
+
*/
|
|
192
|
+
cache?: boolean;
|
|
163
193
|
/**
|
|
164
194
|
* The name of the docs configuration to use when generating documentation for the project
|
|
165
195
|
*
|
|
@@ -197,6 +227,12 @@ interface NxPluginOptions {
|
|
|
197
227
|
* @defaultValue "deploy"
|
|
198
228
|
*/
|
|
199
229
|
targetName?: string;
|
|
230
|
+
/**
|
|
231
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
232
|
+
*
|
|
233
|
+
* @defaultValue false
|
|
234
|
+
*/
|
|
235
|
+
cache?: boolean;
|
|
200
236
|
/**
|
|
201
237
|
* The name of the deploy configuration to use when deploying the project
|
|
202
238
|
*
|
|
@@ -239,6 +275,15 @@ interface NxPluginOptions {
|
|
|
239
275
|
* @defaultValue false
|
|
240
276
|
*/
|
|
241
277
|
debug?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* An indicator to control the behavior of Nx caching for all of the targets
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* The `cache` value on the target specific options will override the value provided in this field.
|
|
283
|
+
*
|
|
284
|
+
* @defaultValue true
|
|
285
|
+
*/
|
|
286
|
+
cache?: boolean;
|
|
242
287
|
}
|
|
243
288
|
//#endregion
|
|
244
289
|
//#region src/plugin/index.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/types/plugin.ts","../../../src/plugin/index.ts"],"mappings":";;;UAkBiB,eAAA;;;AAAjB;EAIE,KAAA;IAJ8B;;;;;IAYxB,UAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/types/plugin.ts","../../../src/plugin/index.ts"],"mappings":";;;UAkBiB,eAAA;;;AAAjB;EAIE,KAAA;IAJ8B;;;;;IAYxB,UAAA;IAqBA;;;;;IAdA,KAAA;IA6DA;;;;;IAtDA,oBAAA;IAoGN;;;;;IA7FM,SAAA;IA6IA;;;IAxIA,MAAA;IAoKA;;;IAtJA,OAAA;IAuLA;;;;;IAhLA,QAAA;EAAA;EA+NA;;;EAzNN,OAAA;IA4PM;;;;;IApPA,UAAA;IAgSA;;;;;IAzRA,KAAA;;;;AC7ER;;IDoFQ,oBAAA;ICpFkB;;;;;ID2FlB,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,KAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,MAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAWA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;;;;;;EAWN,aAAA;;;;;;EAOA,KAAA;;;;;;;;;EAUA,KAAA;AAAA;;;cClYW,aAAA,EAAa,aAAA,CAAA,aAAA,CAAA,eAAA"}
|
package/dist/src/plugin/index.js
CHANGED
|
@@ -144,7 +144,7 @@ function createNxPlugin(opts) {
|
|
|
144
144
|
const targets = (0, nx_src_utils_package_json_js.readTargetsFromPackageJson)(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
145
145
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
146
146
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
|
|
147
|
-
cache: true,
|
|
147
|
+
cache: options?.clean?.cache ?? options?.cache ?? true,
|
|
148
148
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.clean?.inputs || "typescript"]),
|
|
149
149
|
outputs: options?.clean?.outputs,
|
|
150
150
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
@@ -165,7 +165,7 @@ function createNxPlugin(opts) {
|
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
|
|
168
|
-
cache: true,
|
|
168
|
+
cache: options?.prepare?.cache ?? options?.cache ?? true,
|
|
169
169
|
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.prepare?.inputs || "typescript"]),
|
|
170
170
|
outputs: options?.prepare?.outputs ?? [artifactsFolder],
|
|
171
171
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
@@ -186,7 +186,7 @@ function createNxPlugin(opts) {
|
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
|
|
189
|
-
cache: true,
|
|
189
|
+
cache: options?.build?.cache ?? options?.cache ?? true,
|
|
190
190
|
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
191
191
|
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
192
192
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
@@ -207,7 +207,7 @@ function createNxPlugin(opts) {
|
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
|
|
210
|
-
cache: true,
|
|
210
|
+
cache: options?.lint?.cache ?? options?.cache ?? true,
|
|
211
211
|
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
212
212
|
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
213
213
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
@@ -228,7 +228,7 @@ function createNxPlugin(opts) {
|
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
230
|
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
|
|
231
|
-
cache: true,
|
|
231
|
+
cache: options?.docs?.cache ?? options?.cache ?? true,
|
|
232
232
|
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
|
|
233
233
|
outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
|
|
234
234
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
@@ -253,6 +253,7 @@ function createNxPlugin(opts) {
|
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
|
|
256
|
+
cache: options?.deploy?.cache ?? false,
|
|
256
257
|
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
|
|
257
258
|
outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
|
|
258
259
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
@@ -141,7 +141,7 @@ function createNxPlugin(opts) {
|
|
|
141
141
|
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
142
142
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
143
143
|
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
|
|
144
|
-
cache: true,
|
|
144
|
+
cache: options?.clean?.cache ?? options?.cache ?? true,
|
|
145
145
|
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [options?.clean?.inputs || "typescript"]),
|
|
146
146
|
outputs: options?.clean?.outputs,
|
|
147
147
|
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
@@ -162,7 +162,7 @@ function createNxPlugin(opts) {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
|
|
165
|
-
cache: true,
|
|
165
|
+
cache: options?.prepare?.cache ?? options?.cache ?? true,
|
|
166
166
|
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : withNamedInputs(targetInputs, [options?.prepare?.inputs || "typescript"]),
|
|
167
167
|
outputs: options?.prepare?.outputs ?? [artifactsFolder],
|
|
168
168
|
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
@@ -183,7 +183,7 @@ function createNxPlugin(opts) {
|
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
185
|
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
|
|
186
|
-
cache: true,
|
|
186
|
+
cache: options?.build?.cache ?? options?.cache ?? true,
|
|
187
187
|
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
188
188
|
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
189
189
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
@@ -204,7 +204,7 @@ function createNxPlugin(opts) {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
|
|
207
|
-
cache: true,
|
|
207
|
+
cache: options?.lint?.cache ?? options?.cache ?? true,
|
|
208
208
|
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
209
209
|
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
210
210
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
@@ -225,7 +225,7 @@ function createNxPlugin(opts) {
|
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
|
|
228
|
-
cache: true,
|
|
228
|
+
cache: options?.docs?.cache ?? options?.cache ?? true,
|
|
229
229
|
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
|
|
230
230
|
outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
|
|
231
231
|
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
@@ -250,6 +250,7 @@ function createNxPlugin(opts) {
|
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
|
|
253
|
+
cache: options?.deploy?.cache ?? false,
|
|
253
254
|
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
|
|
254
255
|
outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
|
|
255
256
|
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["readNxJson"],"sources":["../../../src/helpers/constants.ts","../../../src/helpers/plugin-utilities.ts","../../../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\n/**\n * A list of Nx input strings that describe the Powerlines configuration file\n */\nexport const CONFIG_INPUTS = [\n \"{projectRoot}/{framework}.json\",\n \"{projectRoot}/{framework}.*.json\",\n \"{projectRoot}/{framework}.jsonc\",\n \"{projectRoot}/{framework}.*.jsonc\",\n \"{projectRoot}/{framework}.json5\",\n \"{projectRoot}/{framework}.*.json5\",\n \"{projectRoot}/{framework}.yaml\",\n \"{projectRoot}/{framework}.*.yaml\",\n \"{projectRoot}/{framework}.yml\",\n \"{projectRoot}/{framework}.*.yml\",\n \"{projectRoot}/{framework}.toml\",\n \"{projectRoot}/{framework}.*.toml\",\n \"{projectRoot}/{framework}.config.js\",\n \"{projectRoot}/{framework}.*.config.js\",\n \"{projectRoot}/{framework}.config.cjs\",\n \"{projectRoot}/{framework}.*.config.cjs\",\n \"{projectRoot}/{framework}.config.mjs\",\n \"{projectRoot}/{framework}.*.config.mjs\",\n \"{projectRoot}/{framework}.config.ts\",\n \"{projectRoot}/{framework}.*.config.ts\",\n \"{projectRoot}/{framework}.config.cts\",\n \"{projectRoot}/{framework}.*.config.cts\",\n \"{projectRoot}/{framework}.config.mts\",\n \"{projectRoot}/{framework}.*.config.mts\"\n] as const;\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\";\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, Jiti } 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, PowerlinesCommand } from \"powerlines\";\nimport type { 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\ntype LoadUserConfigFileFunction = (\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode?: string,\n configFile?: string,\n framework?: string\n) => Promise<ParsedUserConfig>;\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: 45\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n let loadUserConfigFile: LoadUserConfigFileFunction | undefined;\n try {\n loadUserConfigFile = await resolver\n .import<{\n loadUserConfigFile: LoadUserConfigFileFunction;\n }>(resolver.esmResolve(\"powerlines/config\"))\n .then(mod => mod?.loadUserConfigFile);\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration file function: ${\n isError(error) ? error.message : \"Unknown error\"\n }`\n );\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 if (loadUserConfigFile) {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 || \"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: projectConfig.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","/* -------------------------------------------------------------------\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;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;;;;;ACkBD,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3D,QAAO,OAAO,k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AW,MACZ,CACF;AAED,SAAI,SAAS,cACX,SAAQ,MACN,IACE,MACD,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,wEAAwE,YAAY,GACrH;AAGH,YAAO,EACL,UAAU,GACP,OAAO,KAAK,eAAe;MAC1B,MAAM,UAAU,WAAW,KAAK;MAChC,aAAa,cAAc,eAAe;MAC1C;MACA,YAAY,UAAU,MAAM,MAAM;MAClC;MACD,CAAC,EACH,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;;;;;;ACnqBL,MAAa,gBAAgB,eAAgC,EAC3D,WAAW,cACZ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["readNxJson"],"sources":["../../../src/helpers/constants.ts","../../../src/helpers/plugin-utilities.ts","../../../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\n/**\n * A list of Nx input strings that describe the Powerlines configuration file\n */\nexport const CONFIG_INPUTS = [\n \"{projectRoot}/{framework}.json\",\n \"{projectRoot}/{framework}.*.json\",\n \"{projectRoot}/{framework}.jsonc\",\n \"{projectRoot}/{framework}.*.jsonc\",\n \"{projectRoot}/{framework}.json5\",\n \"{projectRoot}/{framework}.*.json5\",\n \"{projectRoot}/{framework}.yaml\",\n \"{projectRoot}/{framework}.*.yaml\",\n \"{projectRoot}/{framework}.yml\",\n \"{projectRoot}/{framework}.*.yml\",\n \"{projectRoot}/{framework}.toml\",\n \"{projectRoot}/{framework}.*.toml\",\n \"{projectRoot}/{framework}.config.js\",\n \"{projectRoot}/{framework}.*.config.js\",\n \"{projectRoot}/{framework}.config.cjs\",\n \"{projectRoot}/{framework}.*.config.cjs\",\n \"{projectRoot}/{framework}.config.mjs\",\n \"{projectRoot}/{framework}.*.config.mjs\",\n \"{projectRoot}/{framework}.config.ts\",\n \"{projectRoot}/{framework}.*.config.ts\",\n \"{projectRoot}/{framework}.config.cts\",\n \"{projectRoot}/{framework}.*.config.cts\",\n \"{projectRoot}/{framework}.config.mts\",\n \"{projectRoot}/{framework}.*.config.mts\"\n] as const;\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\";\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, Jiti } 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, PowerlinesCommand } from \"powerlines\";\nimport type { 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\ntype LoadUserConfigFileFunction = (\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode?: string,\n configFile?: string,\n framework?: string\n) => Promise<ParsedUserConfig>;\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: 45\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n let loadUserConfigFile: LoadUserConfigFileFunction | undefined;\n try {\n loadUserConfigFile = await resolver\n .import<{\n loadUserConfigFile: LoadUserConfigFileFunction;\n }>(resolver.esmResolve(\"powerlines/config\"))\n .then(mod => mod?.loadUserConfigFile);\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration file function: ${\n isError(error) ? error.message : \"Unknown error\"\n }`\n );\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 if (loadUserConfigFile) {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\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: options?.clean?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.prepare?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.build?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.lint?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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: options?.docs?.cache ?? options?.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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 cache: options?.deploy?.cache ?? false,\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 projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\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 || \"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: projectConfig.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","/* -------------------------------------------------------------------\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;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;;;;;ACkBD,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3D,QAAO,OAAO,kBAAkB,UAAU,CACvC,KAAI,UAAS,MAAM,QAAQ,kBAAkB,GAAG,CAAC,CACjD,KAAK,IAAI,CAAC;;;;;;;;AAmDf,SAAgB,eAEd,MAAuD;CACvD,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,QAAQ,GAAG,UAAU,UAAU,CAAC;AAEtC,KAAI;EACF,MAAM,OAAO,MAAM,QAAQ,GAAG,UAAU;EACxC,MAAM,kBACJ,MAAM,mBAAmB,kBAAkB;EAE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rH;AAGH,YAAO,EACL,UAAU,GACP,OAAO,KAAK,eAAe;MAC1B,MAAM,UAAU,WAAW,KAAK;MAChC,aAAa,cAAc,eAAe;MAC1C;MACA,YAAY,UAAU,MAAM,MAAM;MAClC;MACD,CAAC,EACH,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;;;;;;ACpqBL,MAAa,gBAAgB,eAAgC,EAC3D,WAAW,cACZ,CAAC"}
|
|
@@ -10,6 +10,12 @@ interface NxPluginOptions {
|
|
|
10
10
|
* @defaultValue "clean"
|
|
11
11
|
*/
|
|
12
12
|
targetName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue true
|
|
17
|
+
*/
|
|
18
|
+
cache?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* The name of the clean configuration to use when cleaning the project
|
|
15
21
|
*
|
|
@@ -47,6 +53,12 @@ interface NxPluginOptions {
|
|
|
47
53
|
* @defaultValue "prepare"
|
|
48
54
|
*/
|
|
49
55
|
targetName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue true
|
|
60
|
+
*/
|
|
61
|
+
cache?: boolean;
|
|
50
62
|
/**
|
|
51
63
|
* The name of the prepare configuration to use when preparing the project
|
|
52
64
|
*
|
|
@@ -84,6 +96,12 @@ interface NxPluginOptions {
|
|
|
84
96
|
* @defaultValue "lint"
|
|
85
97
|
*/
|
|
86
98
|
targetName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
101
|
+
*
|
|
102
|
+
* @defaultValue true
|
|
103
|
+
*/
|
|
104
|
+
cache?: boolean;
|
|
87
105
|
/**
|
|
88
106
|
* The name of the lint configuration to use when linting the project
|
|
89
107
|
*
|
|
@@ -121,6 +139,12 @@ interface NxPluginOptions {
|
|
|
121
139
|
* @defaultValue "build"
|
|
122
140
|
*/
|
|
123
141
|
targetName?: string;
|
|
142
|
+
/**
|
|
143
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue true
|
|
146
|
+
*/
|
|
147
|
+
cache?: boolean;
|
|
124
148
|
/**
|
|
125
149
|
* The name of the build configuration to use when building the project
|
|
126
150
|
*
|
|
@@ -158,6 +182,12 @@ interface NxPluginOptions {
|
|
|
158
182
|
* @defaultValue "docs"
|
|
159
183
|
*/
|
|
160
184
|
targetName?: string;
|
|
185
|
+
/**
|
|
186
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
187
|
+
*
|
|
188
|
+
* @defaultValue true
|
|
189
|
+
*/
|
|
190
|
+
cache?: boolean;
|
|
161
191
|
/**
|
|
162
192
|
* The name of the docs configuration to use when generating documentation for the project
|
|
163
193
|
*
|
|
@@ -195,6 +225,12 @@ interface NxPluginOptions {
|
|
|
195
225
|
* @defaultValue "deploy"
|
|
196
226
|
*/
|
|
197
227
|
targetName?: string;
|
|
228
|
+
/**
|
|
229
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
230
|
+
*
|
|
231
|
+
* @defaultValue false
|
|
232
|
+
*/
|
|
233
|
+
cache?: boolean;
|
|
198
234
|
/**
|
|
199
235
|
* The name of the deploy configuration to use when deploying the project
|
|
200
236
|
*
|
|
@@ -237,6 +273,15 @@ interface NxPluginOptions {
|
|
|
237
273
|
* @defaultValue false
|
|
238
274
|
*/
|
|
239
275
|
debug?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* An indicator to control the behavior of Nx caching for all of the targets
|
|
278
|
+
*
|
|
279
|
+
* @remarks
|
|
280
|
+
* The `cache` value on the target specific options will override the value provided in this field.
|
|
281
|
+
*
|
|
282
|
+
* @defaultValue true
|
|
283
|
+
*/
|
|
284
|
+
cache?: boolean;
|
|
240
285
|
}
|
|
241
286
|
//#endregion
|
|
242
287
|
export { NxPluginOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../../src/types/plugin.ts"],"mappings":";UAkBiB,eAAA;EAAA;;;EAIf,KAAA;IAAA;;;;;IAQM,UAAA;IAwCA;;;;;IAjCA,oBAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../../src/types/plugin.ts"],"mappings":";UAkBiB,eAAA;EAAA;;;EAIf,KAAA;IAAA;;;;;IAQM,UAAA;IAwCA;;;;;IAjCA,KAAA;IA2EA;;;;;IApEA,oBAAA;IAmHA;;;;;IA5GA,SAAA;IA0JN;;;IArJM,MAAA;IAkLA;;;IApKA,OAAA;IAoMN;;;;;IA7LM,QAAA;EAAA;EAoPA;;;EA9ON,OAAA;IA0QM;;;;;IAlQA,UAAA;IAkTN;;;;;IA3SM,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,KAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,MAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAWA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;;;;;;EAWN,aAAA;;;;;;EAOA,KAAA;;;;;;;;;EAUA,KAAA;AAAA"}
|
|
@@ -10,6 +10,12 @@ interface NxPluginOptions {
|
|
|
10
10
|
* @defaultValue "clean"
|
|
11
11
|
*/
|
|
12
12
|
targetName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue true
|
|
17
|
+
*/
|
|
18
|
+
cache?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* The name of the clean configuration to use when cleaning the project
|
|
15
21
|
*
|
|
@@ -47,6 +53,12 @@ interface NxPluginOptions {
|
|
|
47
53
|
* @defaultValue "prepare"
|
|
48
54
|
*/
|
|
49
55
|
targetName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue true
|
|
60
|
+
*/
|
|
61
|
+
cache?: boolean;
|
|
50
62
|
/**
|
|
51
63
|
* The name of the prepare configuration to use when preparing the project
|
|
52
64
|
*
|
|
@@ -84,6 +96,12 @@ interface NxPluginOptions {
|
|
|
84
96
|
* @defaultValue "lint"
|
|
85
97
|
*/
|
|
86
98
|
targetName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
101
|
+
*
|
|
102
|
+
* @defaultValue true
|
|
103
|
+
*/
|
|
104
|
+
cache?: boolean;
|
|
87
105
|
/**
|
|
88
106
|
* The name of the lint configuration to use when linting the project
|
|
89
107
|
*
|
|
@@ -121,6 +139,12 @@ interface NxPluginOptions {
|
|
|
121
139
|
* @defaultValue "build"
|
|
122
140
|
*/
|
|
123
141
|
targetName?: string;
|
|
142
|
+
/**
|
|
143
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue true
|
|
146
|
+
*/
|
|
147
|
+
cache?: boolean;
|
|
124
148
|
/**
|
|
125
149
|
* The name of the build configuration to use when building the project
|
|
126
150
|
*
|
|
@@ -158,6 +182,12 @@ interface NxPluginOptions {
|
|
|
158
182
|
* @defaultValue "docs"
|
|
159
183
|
*/
|
|
160
184
|
targetName?: string;
|
|
185
|
+
/**
|
|
186
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
187
|
+
*
|
|
188
|
+
* @defaultValue true
|
|
189
|
+
*/
|
|
190
|
+
cache?: boolean;
|
|
161
191
|
/**
|
|
162
192
|
* The name of the docs configuration to use when generating documentation for the project
|
|
163
193
|
*
|
|
@@ -195,6 +225,12 @@ interface NxPluginOptions {
|
|
|
195
225
|
* @defaultValue "deploy"
|
|
196
226
|
*/
|
|
197
227
|
targetName?: string;
|
|
228
|
+
/**
|
|
229
|
+
* An indicator to control the behavior of Nx caching for the target
|
|
230
|
+
*
|
|
231
|
+
* @defaultValue false
|
|
232
|
+
*/
|
|
233
|
+
cache?: boolean;
|
|
198
234
|
/**
|
|
199
235
|
* The name of the deploy configuration to use when deploying the project
|
|
200
236
|
*
|
|
@@ -237,6 +273,15 @@ interface NxPluginOptions {
|
|
|
237
273
|
* @defaultValue false
|
|
238
274
|
*/
|
|
239
275
|
debug?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* An indicator to control the behavior of Nx caching for all of the targets
|
|
278
|
+
*
|
|
279
|
+
* @remarks
|
|
280
|
+
* The `cache` value on the target specific options will override the value provided in this field.
|
|
281
|
+
*
|
|
282
|
+
* @defaultValue true
|
|
283
|
+
*/
|
|
284
|
+
cache?: boolean;
|
|
240
285
|
}
|
|
241
286
|
//#endregion
|
|
242
287
|
export { NxPluginOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../src/types/plugin.ts"],"mappings":";UAkBiB,eAAA;EAAA;;;EAIf,KAAA;IAAA;;;;;IAQM,UAAA;IAwCA;;;;;IAjCA,oBAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../src/types/plugin.ts"],"mappings":";UAkBiB,eAAA;EAAA;;;EAIf,KAAA;IAAA;;;;;IAQM,UAAA;IAwCA;;;;;IAjCA,KAAA;IA2EA;;;;;IApEA,oBAAA;IAmHA;;;;;IA5GA,SAAA;IA0JN;;;IArJM,MAAA;IAkLA;;;IApKA,OAAA;IAoMN;;;;;IA7LM,QAAA;EAAA;EAoPA;;;EA9ON,OAAA;IA0QM;;;;;IAlQA,UAAA;IAkTN;;;;;IA3SM,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,KAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,IAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAcA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;EAMN,MAAA;;;;;;IAQM,UAAA;;;;;;IAOA,KAAA;;;;;;IAOA,oBAAA;;;;;;IAOA,SAAA;;;;IAKA,MAAA;;;;IAWA,OAAA;;;;;;IAOA,QAAA;EAAA;;;;;;;;;EAWN,aAAA;;;;;;EAOA,KAAA;;;;;;;;;EAUA,KAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/nx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "A Nx plugin to support Powerlines development in Nx monorepos.",
|
|
@@ -173,30 +173,30 @@
|
|
|
173
173
|
"module": "./dist/src/index.mjs",
|
|
174
174
|
"typings": "./dist/src/index.d.ts",
|
|
175
175
|
"dependencies": {
|
|
176
|
-
"@nx/devkit": "^22.6.
|
|
177
|
-
"@storm-software/build-tools": "^0.158.
|
|
178
|
-
"@storm-software/config": "^1.137.
|
|
179
|
-
"@storm-software/config-tools": "^1.189.
|
|
180
|
-
"@storm-software/workspace-tools": "^1.295.
|
|
176
|
+
"@nx/devkit": "^22.6.4",
|
|
177
|
+
"@storm-software/build-tools": "^0.158.153",
|
|
178
|
+
"@storm-software/config": "^1.137.26",
|
|
179
|
+
"@storm-software/config-tools": "^1.189.72",
|
|
180
|
+
"@storm-software/workspace-tools": "^1.295.48",
|
|
181
181
|
"@stryke/env": "^0.20.81",
|
|
182
182
|
"@stryke/fs": "^0.33.64",
|
|
183
183
|
"@stryke/hash": "^0.13.17",
|
|
184
184
|
"@stryke/path": "^0.27.3",
|
|
185
185
|
"@stryke/string-format": "^0.17.7",
|
|
186
186
|
"@stryke/type-checks": "^0.6.0",
|
|
187
|
-
"defu": "^6.1.
|
|
187
|
+
"defu": "^6.1.6",
|
|
188
188
|
"jiti": "^2.6.1"
|
|
189
189
|
},
|
|
190
190
|
"devDependencies": {
|
|
191
|
-
"@nx/workspace": "22.6.
|
|
192
|
-
"@storm-software/testing-tools": "^1.119.
|
|
193
|
-
"@storm-software/tsup": "^0.2.
|
|
194
|
-
"@storm-software/untyped": "^0.24.
|
|
195
|
-
"@types/node": "^25.5.
|
|
191
|
+
"@nx/workspace": "22.6.4",
|
|
192
|
+
"@storm-software/testing-tools": "^1.119.147",
|
|
193
|
+
"@storm-software/tsup": "^0.2.151",
|
|
194
|
+
"@storm-software/untyped": "^0.24.135",
|
|
195
|
+
"@types/node": "^25.5.2",
|
|
196
196
|
"eslint-flat-config-utils": "^2.1.4",
|
|
197
197
|
"jsonc-eslint-parser": "^2.4.2",
|
|
198
|
-
"nx": "22.6.
|
|
199
|
-
"powerlines": "^0.42.
|
|
198
|
+
"nx": "22.6.4",
|
|
199
|
+
"powerlines": "^0.42.28",
|
|
200
200
|
"untyped": "^1.5.2"
|
|
201
201
|
},
|
|
202
202
|
"peerDependencies": { "nx": ">=22.5.0", "powerlines": ">=0.39.2" },
|
|
@@ -207,5 +207,5 @@
|
|
|
207
207
|
"publishConfig": { "access": "public" },
|
|
208
208
|
"executors": "./executors.json",
|
|
209
209
|
"generators": "./generators.json",
|
|
210
|
-
"gitHead": "
|
|
210
|
+
"gitHead": "9e3382219bcbd57edea2a23e1e421a44b5acdd58"
|
|
211
211
|
}
|