@powerlines/nx 0.10.24 → 0.10.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/{chunk-LTCZN4I4.js → chunk-2PYUYDPD.js} +11 -19
- package/dist/{chunk-EYCHNX35.js → chunk-2W5L3QE3.js} +2 -2
- package/dist/{chunk-GFUZORW3.js → chunk-2YSHMNU6.js} +2 -2
- package/dist/{chunk-4QIKRF4D.mjs → chunk-DMX7BNND.mjs} +28 -20
- package/dist/{chunk-AQAUVXZI.js → chunk-ELZO2KAE.js} +2 -2
- package/dist/{chunk-PNGMBVSP.mjs → chunk-EWXGKWHK.mjs} +1 -1
- package/dist/{chunk-BGLSTX6F.js → chunk-I7QVZOFS.js} +2 -2
- package/dist/{chunk-JV366LTN.mjs → chunk-LH6XKDMA.mjs} +1 -1
- package/dist/{chunk-RCEEHPJE.mjs → chunk-LQRLEK65.mjs} +1 -1
- package/dist/{chunk-676DOF5H.js → chunk-MAMHMV35.js} +28 -20
- package/dist/{chunk-HJUENOPY.mjs → chunk-U2ZZ4QLS.mjs} +26 -3
- package/dist/{chunk-RAUJ3U2D.js → chunk-UAUZWBTW.js} +34 -11
- package/dist/{chunk-N5IOYNUV.js → chunk-V5EQMHJX.js} +2 -2
- package/dist/{chunk-TSJZC5A3.mjs → chunk-WAXOGGDZ.mjs} +1 -1
- package/dist/{chunk-FMYWKI25.mjs → chunk-WGIN2BGP.mjs} +12 -19
- package/dist/{chunk-ECQAG447.mjs → chunk-WNLIJGN4.mjs} +1 -1
- package/dist/{chunk-R6VKTKIJ.mjs → chunk-Y4WK22DY.mjs} +1 -1
- package/dist/{chunk-PZGSOSV4.js → chunk-YPABMWPC.js} +2 -2
- package/dist/executors.js +12 -12
- package/dist/executors.mjs +7 -7
- package/dist/index.js +18 -18
- package/dist/index.mjs +9 -9
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/executors/build/executor.js +5 -5
- package/dist/src/executors/build/executor.mjs +3 -3
- package/dist/src/executors/clean/executor.js +5 -5
- package/dist/src/executors/clean/executor.mjs +3 -3
- package/dist/src/executors/docs/executor.js +5 -5
- package/dist/src/executors/docs/executor.mjs +3 -3
- package/dist/src/executors/lint/executor.js +5 -5
- package/dist/src/executors/lint/executor.mjs +3 -3
- package/dist/src/executors/prepare/executor.js +5 -5
- package/dist/src/executors/prepare/executor.mjs +3 -3
- package/dist/src/helpers/plugin-utilities.js +5 -5
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/plugin/index.js +4 -4
- package/dist/src/plugin/index.mjs +3 -3
- package/dist/src/types/plugin.d.mts +24 -0
- package/dist/src/types/plugin.d.ts +24 -0
- package/package.json +10 -10
- package/dist/chunk-62CNXBCW.js +0 -10
- package/dist/chunk-7N6FX55G.js +0 -347
- package/dist/chunk-SAVSMAFN.mjs +0 -8
- package/dist/chunk-XRMEXEW2.mjs +0 -339
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
interface NxPluginOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Enable debug logging for the plugin
|
|
4
|
+
*
|
|
5
|
+
* @defaultValue false
|
|
6
|
+
*/
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Configuration options for the clean target added by the Nx plugin
|
|
10
|
+
*/
|
|
2
11
|
clean?: false | {
|
|
3
12
|
/**
|
|
4
13
|
* The name of the clean target to use when cleaning the project
|
|
@@ -33,6 +42,9 @@ interface NxPluginOptions {
|
|
|
33
42
|
*/
|
|
34
43
|
executor?: string;
|
|
35
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Configuration options for the prepare target added by the Nx plugin
|
|
47
|
+
*/
|
|
36
48
|
prepare?: false | {
|
|
37
49
|
/**
|
|
38
50
|
* The name of the prepare target to use when preparing the project
|
|
@@ -67,6 +79,9 @@ interface NxPluginOptions {
|
|
|
67
79
|
*/
|
|
68
80
|
executor?: string;
|
|
69
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Configuration options for the lint target added by the Nx plugin
|
|
84
|
+
*/
|
|
70
85
|
lint?: false | {
|
|
71
86
|
/**
|
|
72
87
|
* The name of the lint target to use when linting the project
|
|
@@ -101,6 +116,9 @@ interface NxPluginOptions {
|
|
|
101
116
|
*/
|
|
102
117
|
executor?: string;
|
|
103
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Configuration options for the build target added by the Nx plugin
|
|
121
|
+
*/
|
|
104
122
|
build?: false | {
|
|
105
123
|
/**
|
|
106
124
|
* The name of the build target to use when building the project
|
|
@@ -135,6 +153,9 @@ interface NxPluginOptions {
|
|
|
135
153
|
*/
|
|
136
154
|
executor?: string;
|
|
137
155
|
};
|
|
156
|
+
/**
|
|
157
|
+
* Configuration options for the docs target added by the Nx plugin
|
|
158
|
+
*/
|
|
138
159
|
docs?: false | {
|
|
139
160
|
/**
|
|
140
161
|
* The name of the docs target to use when generating documentation for the project
|
|
@@ -169,6 +190,9 @@ interface NxPluginOptions {
|
|
|
169
190
|
*/
|
|
170
191
|
executor?: string;
|
|
171
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Configuration options for the deploy target added by the Nx plugin
|
|
195
|
+
*/
|
|
172
196
|
deploy?: false | {
|
|
173
197
|
/**
|
|
174
198
|
* The name of the deploy target to use when deploying the project
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/nx",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.27",
|
|
4
4
|
"description": "A Nx plugin to support Powerlines development in Nx monorepos.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|
|
@@ -182,12 +182,12 @@
|
|
|
182
182
|
"typings": "dist/index.d.ts",
|
|
183
183
|
"dependencies": {
|
|
184
184
|
"@nx/devkit": "^22.1.0",
|
|
185
|
-
"@storm-software/build-tools": "^0.158.
|
|
186
|
-
"@storm-software/config": "^1.134.
|
|
187
|
-
"@storm-software/config-tools": "^1.188.
|
|
188
|
-
"@storm-software/esbuild": "^0.53.
|
|
189
|
-
"@storm-software/unbuild": "^0.57.
|
|
190
|
-
"@storm-software/workspace-tools": "^1.293.
|
|
185
|
+
"@storm-software/build-tools": "^0.158.48",
|
|
186
|
+
"@storm-software/config": "^1.134.48",
|
|
187
|
+
"@storm-software/config-tools": "^1.188.48",
|
|
188
|
+
"@storm-software/esbuild": "^0.53.48",
|
|
189
|
+
"@storm-software/unbuild": "^0.57.48",
|
|
190
|
+
"@storm-software/workspace-tools": "^1.293.18",
|
|
191
191
|
"@stryke/fs": "^0.32.13",
|
|
192
192
|
"@stryke/hash": "^0.12.3",
|
|
193
193
|
"@stryke/path": "^0.19.2",
|
|
@@ -196,11 +196,11 @@
|
|
|
196
196
|
"defu": "^6.1.4",
|
|
197
197
|
"jiti": "^2.6.1",
|
|
198
198
|
"nx": "^22.1.0",
|
|
199
|
-
"powerlines": "^0.23.
|
|
199
|
+
"powerlines": "^0.23.10"
|
|
200
200
|
},
|
|
201
201
|
"devDependencies": {
|
|
202
202
|
"@nx/workspace": "^22.1.0",
|
|
203
|
-
"@storm-software/testing-tools": "^1.119.
|
|
203
|
+
"@storm-software/testing-tools": "^1.119.48",
|
|
204
204
|
"@types/node": "^24.10.1",
|
|
205
205
|
"eslint-flat-config-utils": "^2.1.4",
|
|
206
206
|
"jsonc-eslint-parser": "^2.4.1",
|
|
@@ -210,5 +210,5 @@
|
|
|
210
210
|
"publishConfig": { "access": "public" },
|
|
211
211
|
"executors": "./executors.json",
|
|
212
212
|
"generators": "./generators.json",
|
|
213
|
-
"gitHead": "
|
|
213
|
+
"gitHead": "5a6b8349dc29bf9e496ed5dee32c6cfb8d9bff4e"
|
|
214
214
|
}
|
package/dist/chunk-62CNXBCW.js
DELETED
package/dist/chunk-7N6FX55G.js
DELETED
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkLTCZN4I4_js = require('./chunk-LTCZN4I4.js');
|
|
4
|
-
var chunkVIU4CXA3_js = require('./chunk-VIU4CXA3.js');
|
|
5
|
-
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
6
|
-
var devkit = require('@nx/devkit');
|
|
7
|
-
var nxJson = require('@storm-software/workspace-tools/utils/nx-json');
|
|
8
|
-
var pluginHelpers = require('@storm-software/workspace-tools/utils/plugin-helpers');
|
|
9
|
-
var projectTags = require('@storm-software/workspace-tools/utils/project-tags');
|
|
10
|
-
var getEnvPaths = require('@stryke/env/get-env-paths');
|
|
11
|
-
var exists = require('@stryke/fs/exists');
|
|
12
|
-
var murmurhash = require('@stryke/hash/murmurhash');
|
|
13
|
-
var joinPaths = require('@stryke/path/join-paths');
|
|
14
|
-
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
15
|
-
var titleCase = require('@stryke/string-format/title-case');
|
|
16
|
-
var isError = require('@stryke/type-checks/is-error');
|
|
17
|
-
var defu = require('defu');
|
|
18
|
-
var jiti = require('jiti');
|
|
19
|
-
var promises = require('fs/promises');
|
|
20
|
-
var nxJson_js = require('nx/src/config/nx-json.js');
|
|
21
|
-
var packageJson_js = require('nx/src/utils/package-json.js');
|
|
22
|
-
|
|
23
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
-
|
|
25
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
26
|
-
|
|
27
|
-
function getNxTargetInputs(framework) {
|
|
28
|
-
return chunkVIU4CXA3_js.CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
|
|
29
|
-
}
|
|
30
|
-
chunkSHUYVCID_js.__name(getNxTargetInputs, "getNxTargetInputs");
|
|
31
|
-
function getNxPluginInputs(framework) {
|
|
32
|
-
return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
|
|
33
|
-
}
|
|
34
|
-
chunkSHUYVCID_js.__name(getNxPluginInputs, "getNxPluginInputs");
|
|
35
|
-
function createNxPlugin(opts) {
|
|
36
|
-
const framework = opts?.framework || "powerlines";
|
|
37
|
-
const name = opts?.name || `${framework}/nx/plugin`;
|
|
38
|
-
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
39
|
-
const targetInputs = getNxTargetInputs(framework);
|
|
40
|
-
const pluginInputs = getNxPluginInputs(framework);
|
|
41
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${titleCase.titleCase(framework)} Nx plugin for the following inputs: ${pluginInputs}`);
|
|
42
|
-
return [
|
|
43
|
-
pluginInputs,
|
|
44
|
-
async (configFiles, options, contextV2) => {
|
|
45
|
-
const envPaths = getEnvPaths.getEnvPaths({
|
|
46
|
-
orgId: "storm-software",
|
|
47
|
-
appId: framework,
|
|
48
|
-
workspaceRoot: contextV2.workspaceRoot
|
|
49
|
-
});
|
|
50
|
-
if (!envPaths.cache) {
|
|
51
|
-
throw new Error("The cache directory could not be determined.");
|
|
52
|
-
}
|
|
53
|
-
const nxJson$1 = nxJson_js.readNxJson(contextV2.workspaceRoot);
|
|
54
|
-
return devkit.createNodesFromFiles(async (configFile, _, context) => {
|
|
55
|
-
try {
|
|
56
|
-
const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
57
|
-
if (!projectRoot) {
|
|
58
|
-
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
59
|
-
return {};
|
|
60
|
-
}
|
|
61
|
-
const root = pluginHelpers.getRoot(projectRoot, context);
|
|
62
|
-
const cacheDir = joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
|
|
63
|
-
maxLength: chunkLTCZN4I4_js.PROJECT_ROOT_HASH_LENGTH
|
|
64
|
-
}));
|
|
65
|
-
const jiti$1 = jiti.createJiti(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), {
|
|
66
|
-
interopDefault: true,
|
|
67
|
-
fsCache: joinPaths.joinPaths(cacheDir, "jiti"),
|
|
68
|
-
moduleCache: true
|
|
69
|
-
});
|
|
70
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
71
|
-
const userConfig = await chunkLTCZN4I4_js.loadUserConfigFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), jiti$1, "build", "development", joinPaths.joinPaths(contextV2.workspaceRoot, configFile), framework);
|
|
72
|
-
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
73
|
-
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
74
|
-
return {};
|
|
75
|
-
}
|
|
76
|
-
const packageJsonContent = await promises.readFile(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
77
|
-
if (!packageJsonContent) {
|
|
78
|
-
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
79
|
-
return {};
|
|
80
|
-
}
|
|
81
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
82
|
-
if (!userConfig.configFile && !packageJson?.storm) {
|
|
83
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
84
|
-
return {};
|
|
85
|
-
}
|
|
86
|
-
const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
87
|
-
if (!projectConfig) {
|
|
88
|
-
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
89
|
-
return {};
|
|
90
|
-
}
|
|
91
|
-
const tsconfig = userConfig?.tsconfig || (exists.existsSync(joinPaths.joinPaths(projectRoot, "tsconfig.json")) ? joinPaths.joinPaths(projectRoot, "tsconfig.json") : void 0);
|
|
92
|
-
const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
|
|
93
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
94
|
-
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
95
|
-
targets[options?.clean?.targetName || "clean"] = {
|
|
96
|
-
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
97
|
-
options?.clean?.inputs || "typescript"
|
|
98
|
-
]),
|
|
99
|
-
outputs: options?.clean?.outputs,
|
|
100
|
-
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
101
|
-
dependsOn: [
|
|
102
|
-
`^${options?.clean?.targetName || "clean"}`
|
|
103
|
-
],
|
|
104
|
-
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
105
|
-
options: {
|
|
106
|
-
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
107
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
108
|
-
skipInstalls: userConfig.skipInstalls
|
|
109
|
-
},
|
|
110
|
-
configurations: {
|
|
111
|
-
production: {
|
|
112
|
-
mode: "production"
|
|
113
|
-
},
|
|
114
|
-
test: {
|
|
115
|
-
mode: "test"
|
|
116
|
-
},
|
|
117
|
-
development: {
|
|
118
|
-
mode: "development",
|
|
119
|
-
skipCache: true
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) {
|
|
125
|
-
targets[options?.prepare?.targetName || "prepare"] = {
|
|
126
|
-
cache: true,
|
|
127
|
-
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
128
|
-
options?.prepare?.inputs || "typescript"
|
|
129
|
-
]),
|
|
130
|
-
outputs: options?.prepare?.outputs ?? [
|
|
131
|
-
artifactsFolder
|
|
132
|
-
],
|
|
133
|
-
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
134
|
-
dependsOn: [
|
|
135
|
-
`^${options?.prepare?.targetName || "prepare"}`,
|
|
136
|
-
"clean"
|
|
137
|
-
],
|
|
138
|
-
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
139
|
-
options: {
|
|
140
|
-
entry: userConfig.entry || "{sourceRoot}/index.ts",
|
|
141
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
142
|
-
tsconfig,
|
|
143
|
-
skipInstalls: userConfig.skipInstalls,
|
|
144
|
-
skipCache: userConfig.skipCache
|
|
145
|
-
},
|
|
146
|
-
configurations: {
|
|
147
|
-
production: {
|
|
148
|
-
mode: "production"
|
|
149
|
-
},
|
|
150
|
-
test: {
|
|
151
|
-
mode: "test"
|
|
152
|
-
},
|
|
153
|
-
development: {
|
|
154
|
-
mode: "development",
|
|
155
|
-
skipCache: true
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) {
|
|
161
|
-
targets[options?.build?.targetName || "build"] = {
|
|
162
|
-
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : nxJson.withNamedInputs(targetInputs, [
|
|
163
|
-
options?.build?.inputs || "typescript"
|
|
164
|
-
]),
|
|
165
|
-
outputs: options?.build?.outputs ?? [
|
|
166
|
-
"{options.outputPath}"
|
|
167
|
-
],
|
|
168
|
-
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
169
|
-
dependsOn: [
|
|
170
|
-
`^${options?.build?.targetName || "build"}`,
|
|
171
|
-
options?.prepare !== false && `^${options?.prepare?.targetName || "prepare"}`
|
|
172
|
-
].filter(Boolean),
|
|
173
|
-
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
174
|
-
options: {
|
|
175
|
-
entry: userConfig.entry || "{sourceRoot}/index.ts",
|
|
176
|
-
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
177
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
178
|
-
tsconfig,
|
|
179
|
-
skipInstalls: userConfig.skipInstalls,
|
|
180
|
-
skipCache: userConfig.skipCache
|
|
181
|
-
},
|
|
182
|
-
configurations: {
|
|
183
|
-
production: {
|
|
184
|
-
mode: "production"
|
|
185
|
-
},
|
|
186
|
-
test: {
|
|
187
|
-
mode: "test"
|
|
188
|
-
},
|
|
189
|
-
development: {
|
|
190
|
-
mode: "development",
|
|
191
|
-
skipCache: true
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) {
|
|
197
|
-
targets[options?.lint?.targetName || "lint"] = {
|
|
198
|
-
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : nxJson.withNamedInputs([
|
|
199
|
-
...targetInputs,
|
|
200
|
-
artifactsFolder
|
|
201
|
-
], options?.lint?.inputs ? [
|
|
202
|
-
options.lint.inputs
|
|
203
|
-
] : [
|
|
204
|
-
"linting",
|
|
205
|
-
"typescript"
|
|
206
|
-
]),
|
|
207
|
-
outputs: options?.lint?.outputs ?? [
|
|
208
|
-
"{options.outputPath}"
|
|
209
|
-
],
|
|
210
|
-
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
211
|
-
dependsOn: [
|
|
212
|
-
`^${options?.lint?.targetName || "lint"}`,
|
|
213
|
-
options?.prepare !== false && `^${options?.prepare?.targetName || "prepare"}`
|
|
214
|
-
].filter(Boolean),
|
|
215
|
-
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
216
|
-
options: {
|
|
217
|
-
entry: userConfig.entry || "{sourceRoot}/index.ts",
|
|
218
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
219
|
-
tsconfig,
|
|
220
|
-
skipInstalls: userConfig.skipInstalls,
|
|
221
|
-
skipCache: userConfig.skipCache
|
|
222
|
-
},
|
|
223
|
-
configurations: {
|
|
224
|
-
production: {
|
|
225
|
-
mode: "production"
|
|
226
|
-
},
|
|
227
|
-
test: {
|
|
228
|
-
mode: "test"
|
|
229
|
-
},
|
|
230
|
-
development: {
|
|
231
|
-
mode: "development",
|
|
232
|
-
skipCache: true
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) {
|
|
238
|
-
targets[options?.docs?.targetName || "docs"] = {
|
|
239
|
-
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : nxJson.withNamedInputs([
|
|
240
|
-
...targetInputs,
|
|
241
|
-
artifactsFolder
|
|
242
|
-
], options?.docs?.inputs ? [
|
|
243
|
-
options.docs.inputs
|
|
244
|
-
] : [
|
|
245
|
-
"documentation",
|
|
246
|
-
"typescript"
|
|
247
|
-
]),
|
|
248
|
-
outputs: options?.docs?.outputs ?? [
|
|
249
|
-
"{options.outputPath}"
|
|
250
|
-
],
|
|
251
|
-
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
252
|
-
dependsOn: [
|
|
253
|
-
`^${options?.docs?.targetName || "docs"}`,
|
|
254
|
-
options?.build !== false && `^${options?.build?.targetName || "build"}`
|
|
255
|
-
].filter(Boolean),
|
|
256
|
-
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
257
|
-
options: {
|
|
258
|
-
entry: userConfig.entry || "{sourceRoot}/index.ts",
|
|
259
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
260
|
-
tsconfig,
|
|
261
|
-
skipInstalls: userConfig.skipInstalls,
|
|
262
|
-
skipCache: userConfig.skipCache
|
|
263
|
-
},
|
|
264
|
-
configurations: {
|
|
265
|
-
production: {
|
|
266
|
-
mode: "production"
|
|
267
|
-
},
|
|
268
|
-
test: {
|
|
269
|
-
mode: "test"
|
|
270
|
-
},
|
|
271
|
-
development: {
|
|
272
|
-
mode: "development",
|
|
273
|
-
skipCache: true
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) {
|
|
279
|
-
targets[options?.deploy?.targetName || "deploy"] = {
|
|
280
|
-
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : nxJson.withNamedInputs([
|
|
281
|
-
...targetInputs,
|
|
282
|
-
artifactsFolder
|
|
283
|
-
], options?.deploy?.inputs ? [
|
|
284
|
-
options.deploy.inputs
|
|
285
|
-
] : [
|
|
286
|
-
"documentation",
|
|
287
|
-
"typescript"
|
|
288
|
-
]),
|
|
289
|
-
outputs: options?.deploy?.outputs ?? [
|
|
290
|
-
"{options.outputPath}"
|
|
291
|
-
],
|
|
292
|
-
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
293
|
-
dependsOn: [
|
|
294
|
-
`^${options?.deploy?.targetName || "deploy"}`,
|
|
295
|
-
options?.build !== false && `^${options?.build?.targetName || "build"}`
|
|
296
|
-
].filter(Boolean),
|
|
297
|
-
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
298
|
-
options: {
|
|
299
|
-
entry: userConfig.entry || "{sourceRoot}/index.ts",
|
|
300
|
-
projectType: projectConfig.projectType || userConfig.type,
|
|
301
|
-
tsconfig,
|
|
302
|
-
skipInstalls: userConfig.skipInstalls,
|
|
303
|
-
skipCache: userConfig.skipCache
|
|
304
|
-
},
|
|
305
|
-
configurations: {
|
|
306
|
-
production: {
|
|
307
|
-
mode: "production"
|
|
308
|
-
},
|
|
309
|
-
test: {
|
|
310
|
-
mode: "test"
|
|
311
|
-
},
|
|
312
|
-
development: {
|
|
313
|
-
mode: "development",
|
|
314
|
-
skipCache: true
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
projectTags.setDefaultProjectTags(projectConfig, name);
|
|
320
|
-
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.type || "library", {
|
|
321
|
-
overwrite: true
|
|
322
|
-
});
|
|
323
|
-
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
324
|
-
return {
|
|
325
|
-
projects: {
|
|
326
|
-
[root]: defu__default.default(projectConfig, {
|
|
327
|
-
name: kebabCase.kebabCase(userConfig.name),
|
|
328
|
-
projectType: userConfig.type || "library",
|
|
329
|
-
root,
|
|
330
|
-
sourceRoot: joinPaths.joinPaths(root, "src"),
|
|
331
|
-
targets
|
|
332
|
-
})
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
} catch (error) {
|
|
336
|
-
console.error(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
|
|
337
|
-
return {};
|
|
338
|
-
}
|
|
339
|
-
}, configFiles, options, contextV2);
|
|
340
|
-
}
|
|
341
|
-
];
|
|
342
|
-
}
|
|
343
|
-
chunkSHUYVCID_js.__name(createNxPlugin, "createNxPlugin");
|
|
344
|
-
|
|
345
|
-
exports.createNxPlugin = createNxPlugin;
|
|
346
|
-
exports.getNxPluginInputs = getNxPluginInputs;
|
|
347
|
-
exports.getNxTargetInputs = getNxTargetInputs;
|