@powerlines/nx 0.9.4 → 0.10.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +34 -32
  3. package/dist/{chunk-RLV2BDHW.mjs → chunk-3E654WM2.mjs} +1 -1
  4. package/dist/{chunk-JMPM6JPD.js → chunk-5BPEG52U.js} +2 -2
  5. package/dist/chunk-67ALH5AX.js +327 -0
  6. package/dist/{chunk-Y2I6ZDWH.js → chunk-DODH7R3U.js} +2 -2
  7. package/dist/{chunk-SV7QXBCB.mjs → chunk-DVGRVHRD.mjs} +51 -52
  8. package/dist/{chunk-EVC3CWDX.mjs → chunk-H4ROBXJM.mjs} +1 -1
  9. package/dist/{chunk-P5UNWOB6.js → chunk-IS2MEDGI.js} +2 -2
  10. package/dist/chunk-KBRKYARM.mjs +320 -0
  11. package/dist/{chunk-IXFAMU7J.js → chunk-MI5C7LYS.js} +2 -2
  12. package/dist/{chunk-TEBG7V3S.mjs → chunk-MSR5HSGP.mjs} +513 -481
  13. package/dist/{chunk-GW5UQFFS.js → chunk-NFAKPYKX.js} +2 -2
  14. package/dist/{chunk-HTYRXIRM.mjs → chunk-QEHHWZYD.mjs} +1 -1
  15. package/dist/{chunk-F3XVH3HG.mjs → chunk-QY2HEZSZ.mjs} +1 -1
  16. package/dist/{chunk-OVUCSGTD.mjs → chunk-RPI3PNLJ.mjs} +1 -1
  17. package/dist/{chunk-JTW7QFIT.js → chunk-SXA7B3TE.js} +533 -502
  18. package/dist/{chunk-4UWZOCEA.js → chunk-UOTRU26N.js} +51 -52
  19. package/dist/executors.js +12 -12
  20. package/dist/executors.mjs +7 -7
  21. package/dist/index.d.mts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +15 -15
  24. package/dist/index.mjs +8 -8
  25. package/dist/src/base/base-executor.js +3 -3
  26. package/dist/src/base/base-executor.mjs +2 -2
  27. package/dist/src/executors/build/executor.js +5 -5
  28. package/dist/src/executors/build/executor.mjs +3 -3
  29. package/dist/src/executors/build/schema.d.ts +85 -0
  30. package/dist/src/executors/build/schema.json +96 -0
  31. package/dist/src/executors/clean/executor.js +5 -5
  32. package/dist/src/executors/clean/executor.mjs +3 -3
  33. package/dist/src/executors/clean/schema.d.ts +75 -0
  34. package/dist/src/executors/clean/schema.json +77 -0
  35. package/dist/src/executors/docs/executor.js +5 -5
  36. package/dist/src/executors/docs/executor.mjs +3 -3
  37. package/dist/src/executors/docs/schema.d.ts +75 -0
  38. package/dist/src/executors/docs/schema.json +77 -0
  39. package/dist/src/executors/lint/executor.js +5 -5
  40. package/dist/src/executors/lint/executor.mjs +3 -3
  41. package/dist/src/executors/lint/schema.d.ts +75 -0
  42. package/dist/src/executors/lint/schema.json +77 -0
  43. package/dist/src/executors/prepare/executor.js +5 -5
  44. package/dist/src/executors/prepare/executor.mjs +3 -3
  45. package/dist/src/executors/prepare/schema.d.ts +75 -0
  46. package/dist/src/executors/prepare/schema.json +77 -0
  47. package/dist/src/generators/sync/schema.d.ts +15 -0
  48. package/dist/src/generators/sync/schema.json +19 -0
  49. package/dist/src/plugin/index.d.mts +173 -11
  50. package/dist/src/plugin/index.d.ts +173 -11
  51. package/dist/src/plugin/index.js +4 -4
  52. package/dist/src/plugin/index.mjs +2 -2
  53. package/package.json +18 -18
  54. package/dist/chunk-FFBOHADM.mjs +0 -286
  55. package/dist/chunk-IFMXBBI7.js +0 -293
@@ -1,286 +0,0 @@
1
- import { PROJECT_ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-SV7QXBCB.mjs';
2
- import { createNodesFromFiles } from '@nx/devkit';
3
- import { withNamedInputs } from '@storm-software/workspace-tools/utils/nx-json';
4
- import { getProjectRoot, getRoot, getProjectConfigFromProjectRoot } from '@storm-software/workspace-tools/utils/plugin-helpers';
5
- import { setDefaultProjectTags, addProjectTag } from '@storm-software/workspace-tools/utils/project-tags';
6
- import { getEnvPaths } from '@stryke/env/get-env-paths';
7
- import { existsSync } from '@stryke/fs/exists';
8
- import { readJsonFileSync } from '@stryke/fs/json';
9
- import { murmurhash } from '@stryke/hash/murmurhash';
10
- import { joinPaths } from '@stryke/path/join-paths';
11
- import { kebabCase } from '@stryke/string-format/kebab-case';
12
- import { isError } from '@stryke/type-checks/is-error';
13
- import defu from 'defu';
14
- import { createJiti } from 'jiti';
15
- import { readNxJson } from 'nx/src/config/nx-json.js';
16
- import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
17
-
18
- // src/helpers/constants.ts
19
- var CONFIG_INPUTS = [
20
- "{projectRoot}/package.json",
21
- "{projectRoot}/powerlines.json",
22
- "{projectRoot}/powerlines.*.json",
23
- "{projectRoot}/powerlines.jsonc",
24
- "{projectRoot}/powerlines.*.jsonc",
25
- "{projectRoot}/powerlines.json5",
26
- "{projectRoot}/powerlines.*.json5",
27
- "{projectRoot}/powerlines.yaml",
28
- "{projectRoot}/powerlines.*.yaml",
29
- "{projectRoot}/powerlines.yml",
30
- "{projectRoot}/powerlines.*.yml",
31
- "{projectRoot}/powerlines.toml",
32
- "{projectRoot}/powerlines.*.toml",
33
- "{projectRoot}/powerlines.js",
34
- "{projectRoot}/powerlines.*.js",
35
- "{projectRoot}/powerlines.cjs",
36
- "{projectRoot}/powerlines.*.cjs",
37
- "{projectRoot}/powerlines.mjs",
38
- "{projectRoot}/powerlines.*.mjs",
39
- "{projectRoot}/powerlines.ts",
40
- "{projectRoot}/powerlines.*.ts",
41
- "{projectRoot}/powerlines.cts",
42
- "{projectRoot}/powerlines.*.cts",
43
- "{projectRoot}/powerlines.mts",
44
- "{projectRoot}/powerlines.*.mts"
45
- ];
46
-
47
- // src/plugin/index.ts
48
- var name = "powerlines/nx/plugin";
49
- var createNodesV2 = [
50
- `**/{${CONFIG_INPUTS.map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
51
- async (configFiles, optionsV2, contextV2) => {
52
- const envPaths = getEnvPaths({
53
- orgId: "storm-software",
54
- appId: "powerlines",
55
- workspaceRoot: contextV2.workspaceRoot
56
- });
57
- if (!envPaths.cache) {
58
- throw new Error("The cache directory could not be determined.");
59
- }
60
- const runtimeFolder = optionsV2?.runtimeFolder || ".powerlines";
61
- const nxJson = readNxJson(contextV2.workspaceRoot);
62
- return createNodesFromFiles(async (configFile, options, context) => {
63
- try {
64
- const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
65
- if (!projectRoot) {
66
- console.error(`[${name}]: package.json and Powerlines configuration files (i.e. powerlines.config.ts) must be located in the project root directory: ${configFile}`);
67
- return {};
68
- }
69
- const root = getRoot(projectRoot, context);
70
- const cacheDir = joinPaths(envPaths.cache, "projects", murmurhash(joinPaths(contextV2.workspaceRoot, projectRoot), {
71
- maxLength: PROJECT_ROOT_HASH_LENGTH
72
- }));
73
- const jiti = createJiti(joinPaths(contextV2.workspaceRoot, projectRoot), {
74
- interopDefault: true,
75
- fsCache: joinPaths(cacheDir, "jiti"),
76
- moduleCache: true
77
- });
78
- const userConfig = await loadUserConfigFile(projectRoot, jiti);
79
- const packageJson = readJsonFileSync(joinPaths(projectRoot, "package.json"));
80
- if (!userConfig.configFile && !packageJson.storm) {
81
- console.debug(`[${name}]: Skipping ${projectRoot} - no Powerlines configuration found for project in root directory.`);
82
- return {};
83
- }
84
- const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
85
- if (!projectConfig) {
86
- console.warn(`[${name}]: No project configuration found for project in root directory ${projectRoot}`);
87
- return {};
88
- }
89
- const tsconfig = userConfig?.tsconfig || (existsSync(joinPaths(projectRoot, "tsconfig.json")) ? joinPaths(projectRoot, "tsconfig.json") : void 0);
90
- const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
91
- targets.clean = {
92
- dependsOn: [
93
- "^clean"
94
- ],
95
- executor: "@powerlines/nx:clean",
96
- defaultConfiguration: "production",
97
- options: {
98
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
99
- projectType: projectConfig.projectType || userConfig.type,
100
- skipInstalls: userConfig.skipInstalls
101
- },
102
- configurations: {
103
- production: {
104
- mode: "production"
105
- },
106
- test: {
107
- mode: "test"
108
- },
109
- development: {
110
- mode: "development",
111
- skipCache: true
112
- }
113
- }
114
- };
115
- targets.prepare = {
116
- cache: true,
117
- inputs: withNamedInputs(CONFIG_INPUTS, [
118
- "typescript"
119
- ]),
120
- outputs: [
121
- `{projectRoot}/${runtimeFolder}`
122
- ],
123
- dependsOn: [
124
- "clean",
125
- "^prepare"
126
- ],
127
- executor: "@powerlines/nx:prepare",
128
- defaultConfiguration: "production",
129
- options: {
130
- entry: userConfig.entry || "{sourceRoot}/index.ts",
131
- projectType: projectConfig.projectType || userConfig.type,
132
- tsconfig,
133
- skipInstalls: userConfig.skipInstalls,
134
- skipCache: userConfig.skipCache
135
- },
136
- configurations: {
137
- production: {
138
- mode: "production"
139
- },
140
- test: {
141
- mode: "test"
142
- },
143
- development: {
144
- mode: "development",
145
- skipCache: true
146
- }
147
- }
148
- };
149
- targets.build = {
150
- cache: true,
151
- inputs: withNamedInputs(CONFIG_INPUTS, [
152
- "typescript"
153
- ]),
154
- outputs: [
155
- "{options.outputPath}"
156
- ],
157
- dependsOn: [
158
- "prepare",
159
- "^build"
160
- ],
161
- executor: "@powerlines/nx:build",
162
- defaultConfiguration: "production",
163
- options: {
164
- entry: userConfig.entry || "{sourceRoot}/index.ts",
165
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
166
- projectType: projectConfig.projectType || userConfig.type,
167
- tsconfig,
168
- skipInstalls: userConfig.skipInstalls,
169
- skipCache: userConfig.skipCache
170
- },
171
- configurations: {
172
- production: {
173
- mode: "production"
174
- },
175
- test: {
176
- mode: "test"
177
- },
178
- development: {
179
- mode: "development",
180
- skipCache: true
181
- }
182
- }
183
- };
184
- targets.lint = {
185
- cache: true,
186
- inputs: withNamedInputs([
187
- ...CONFIG_INPUTS,
188
- `{projectRoot}/${runtimeFolder}`
189
- ], [
190
- "linting",
191
- "typescript"
192
- ]),
193
- outputs: withNamedInputs([
194
- `{projectRoot}/${runtimeFolder}`
195
- ], [
196
- "typescript"
197
- ]),
198
- dependsOn: [
199
- "prepare",
200
- "^lint"
201
- ],
202
- executor: "@powerlines/nx:lint",
203
- defaultConfiguration: "production",
204
- options: {
205
- entry: userConfig.entry || "{sourceRoot}/index.ts",
206
- projectType: projectConfig.projectType || userConfig.type,
207
- tsconfig,
208
- skipInstalls: userConfig.skipInstalls,
209
- skipCache: userConfig.skipCache
210
- },
211
- configurations: {
212
- production: {
213
- mode: "production"
214
- },
215
- test: {
216
- mode: "test"
217
- },
218
- development: {
219
- mode: "development",
220
- skipCache: true
221
- }
222
- }
223
- };
224
- targets.docs = {
225
- cache: true,
226
- inputs: withNamedInputs([
227
- ...CONFIG_INPUTS,
228
- `{projectRoot}/${runtimeFolder}`
229
- ], [
230
- "documentation",
231
- "typescript"
232
- ]),
233
- outputs: [
234
- "{projectRoot}/docs/generated"
235
- ],
236
- dependsOn: [
237
- "prepare",
238
- "build",
239
- "^docs"
240
- ],
241
- executor: "@powerlines/nx:docs",
242
- defaultConfiguration: "production",
243
- options: {
244
- entry: userConfig.entry || "{sourceRoot}/index.ts",
245
- projectType: projectConfig.projectType || userConfig.type,
246
- tsconfig,
247
- skipInstalls: userConfig.skipInstalls,
248
- skipCache: userConfig.skipCache
249
- },
250
- configurations: {
251
- production: {
252
- mode: "production"
253
- },
254
- test: {
255
- mode: "test"
256
- },
257
- development: {
258
- mode: "development",
259
- skipCache: true
260
- }
261
- }
262
- };
263
- setDefaultProjectTags(projectConfig, name);
264
- addProjectTag(projectConfig, "powerlines", projectConfig.projectType || userConfig.type || "library", {
265
- overwrite: true
266
- });
267
- return {
268
- projects: {
269
- [root]: defu(projectConfig, {
270
- name: kebabCase(userConfig.name),
271
- projectType: userConfig.type || "library",
272
- root,
273
- sourceRoot: joinPaths(root, "src"),
274
- targets
275
- })
276
- }
277
- };
278
- } catch (error) {
279
- console.error(`[${name}]: ${isError(error) ? error.message : "Unknown fatal error"}`);
280
- return {};
281
- }
282
- }, configFiles, optionsV2, contextV2);
283
- }
284
- ];
285
-
286
- export { createNodesV2, name };
@@ -1,293 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk4UWZOCEA_js = require('./chunk-4UWZOCEA.js');
4
- var devkit = require('@nx/devkit');
5
- var nxJson = require('@storm-software/workspace-tools/utils/nx-json');
6
- var pluginHelpers = require('@storm-software/workspace-tools/utils/plugin-helpers');
7
- var projectTags = require('@storm-software/workspace-tools/utils/project-tags');
8
- var getEnvPaths = require('@stryke/env/get-env-paths');
9
- var exists = require('@stryke/fs/exists');
10
- var json = require('@stryke/fs/json');
11
- var murmurhash = require('@stryke/hash/murmurhash');
12
- var joinPaths = require('@stryke/path/join-paths');
13
- var kebabCase = require('@stryke/string-format/kebab-case');
14
- var isError = require('@stryke/type-checks/is-error');
15
- var defu = require('defu');
16
- var jiti = require('jiti');
17
- var nxJson_js = require('nx/src/config/nx-json.js');
18
- var packageJson_js = require('nx/src/utils/package-json.js');
19
-
20
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
21
-
22
- var defu__default = /*#__PURE__*/_interopDefault(defu);
23
-
24
- // src/helpers/constants.ts
25
- var CONFIG_INPUTS = [
26
- "{projectRoot}/package.json",
27
- "{projectRoot}/powerlines.json",
28
- "{projectRoot}/powerlines.*.json",
29
- "{projectRoot}/powerlines.jsonc",
30
- "{projectRoot}/powerlines.*.jsonc",
31
- "{projectRoot}/powerlines.json5",
32
- "{projectRoot}/powerlines.*.json5",
33
- "{projectRoot}/powerlines.yaml",
34
- "{projectRoot}/powerlines.*.yaml",
35
- "{projectRoot}/powerlines.yml",
36
- "{projectRoot}/powerlines.*.yml",
37
- "{projectRoot}/powerlines.toml",
38
- "{projectRoot}/powerlines.*.toml",
39
- "{projectRoot}/powerlines.js",
40
- "{projectRoot}/powerlines.*.js",
41
- "{projectRoot}/powerlines.cjs",
42
- "{projectRoot}/powerlines.*.cjs",
43
- "{projectRoot}/powerlines.mjs",
44
- "{projectRoot}/powerlines.*.mjs",
45
- "{projectRoot}/powerlines.ts",
46
- "{projectRoot}/powerlines.*.ts",
47
- "{projectRoot}/powerlines.cts",
48
- "{projectRoot}/powerlines.*.cts",
49
- "{projectRoot}/powerlines.mts",
50
- "{projectRoot}/powerlines.*.mts"
51
- ];
52
-
53
- // src/plugin/index.ts
54
- var name = "powerlines/nx/plugin";
55
- var createNodesV2 = [
56
- `**/{${CONFIG_INPUTS.map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
57
- async (configFiles, optionsV2, contextV2) => {
58
- const envPaths = getEnvPaths.getEnvPaths({
59
- orgId: "storm-software",
60
- appId: "powerlines",
61
- workspaceRoot: contextV2.workspaceRoot
62
- });
63
- if (!envPaths.cache) {
64
- throw new Error("The cache directory could not be determined.");
65
- }
66
- const runtimeFolder = optionsV2?.runtimeFolder || ".powerlines";
67
- const nxJson$1 = nxJson_js.readNxJson(contextV2.workspaceRoot);
68
- return devkit.createNodesFromFiles(async (configFile, options, context) => {
69
- try {
70
- const projectRoot = pluginHelpers.getProjectRoot(configFile, contextV2.workspaceRoot);
71
- if (!projectRoot) {
72
- console.error(`[${name}]: package.json and Powerlines configuration files (i.e. powerlines.config.ts) must be located in the project root directory: ${configFile}`);
73
- return {};
74
- }
75
- const root = pluginHelpers.getRoot(projectRoot, context);
76
- const cacheDir = joinPaths.joinPaths(envPaths.cache, "projects", murmurhash.murmurhash(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), {
77
- maxLength: chunk4UWZOCEA_js.PROJECT_ROOT_HASH_LENGTH
78
- }));
79
- const jiti$1 = jiti.createJiti(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot), {
80
- interopDefault: true,
81
- fsCache: joinPaths.joinPaths(cacheDir, "jiti"),
82
- moduleCache: true
83
- });
84
- const userConfig = await chunk4UWZOCEA_js.loadUserConfigFile(projectRoot, jiti$1);
85
- const packageJson = json.readJsonFileSync(joinPaths.joinPaths(projectRoot, "package.json"));
86
- if (!userConfig.configFile && !packageJson.storm) {
87
- console.debug(`[${name}]: Skipping ${projectRoot} - no Powerlines configuration found for project in root directory.`);
88
- return {};
89
- }
90
- const projectConfig = pluginHelpers.getProjectConfigFromProjectRoot(projectRoot, packageJson);
91
- if (!projectConfig) {
92
- console.warn(`[${name}]: No project configuration found for project in root directory ${projectRoot}`);
93
- return {};
94
- }
95
- const tsconfig = userConfig?.tsconfig || (exists.existsSync(joinPaths.joinPaths(projectRoot, "tsconfig.json")) ? joinPaths.joinPaths(projectRoot, "tsconfig.json") : void 0);
96
- const targets = packageJson_js.readTargetsFromPackageJson(packageJson, nxJson$1, projectRoot, context.workspaceRoot);
97
- targets.clean = {
98
- dependsOn: [
99
- "^clean"
100
- ],
101
- executor: "@powerlines/nx:clean",
102
- defaultConfiguration: "production",
103
- options: {
104
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
105
- projectType: projectConfig.projectType || userConfig.type,
106
- skipInstalls: userConfig.skipInstalls
107
- },
108
- configurations: {
109
- production: {
110
- mode: "production"
111
- },
112
- test: {
113
- mode: "test"
114
- },
115
- development: {
116
- mode: "development",
117
- skipCache: true
118
- }
119
- }
120
- };
121
- targets.prepare = {
122
- cache: true,
123
- inputs: nxJson.withNamedInputs(CONFIG_INPUTS, [
124
- "typescript"
125
- ]),
126
- outputs: [
127
- `{projectRoot}/${runtimeFolder}`
128
- ],
129
- dependsOn: [
130
- "clean",
131
- "^prepare"
132
- ],
133
- executor: "@powerlines/nx:prepare",
134
- defaultConfiguration: "production",
135
- options: {
136
- entry: userConfig.entry || "{sourceRoot}/index.ts",
137
- projectType: projectConfig.projectType || userConfig.type,
138
- tsconfig,
139
- skipInstalls: userConfig.skipInstalls,
140
- skipCache: userConfig.skipCache
141
- },
142
- configurations: {
143
- production: {
144
- mode: "production"
145
- },
146
- test: {
147
- mode: "test"
148
- },
149
- development: {
150
- mode: "development",
151
- skipCache: true
152
- }
153
- }
154
- };
155
- targets.build = {
156
- cache: true,
157
- inputs: nxJson.withNamedInputs(CONFIG_INPUTS, [
158
- "typescript"
159
- ]),
160
- outputs: [
161
- "{options.outputPath}"
162
- ],
163
- dependsOn: [
164
- "prepare",
165
- "^build"
166
- ],
167
- executor: "@powerlines/nx:build",
168
- defaultConfiguration: "production",
169
- options: {
170
- entry: userConfig.entry || "{sourceRoot}/index.ts",
171
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
172
- projectType: projectConfig.projectType || userConfig.type,
173
- tsconfig,
174
- skipInstalls: userConfig.skipInstalls,
175
- skipCache: userConfig.skipCache
176
- },
177
- configurations: {
178
- production: {
179
- mode: "production"
180
- },
181
- test: {
182
- mode: "test"
183
- },
184
- development: {
185
- mode: "development",
186
- skipCache: true
187
- }
188
- }
189
- };
190
- targets.lint = {
191
- cache: true,
192
- inputs: nxJson.withNamedInputs([
193
- ...CONFIG_INPUTS,
194
- `{projectRoot}/${runtimeFolder}`
195
- ], [
196
- "linting",
197
- "typescript"
198
- ]),
199
- outputs: nxJson.withNamedInputs([
200
- `{projectRoot}/${runtimeFolder}`
201
- ], [
202
- "typescript"
203
- ]),
204
- dependsOn: [
205
- "prepare",
206
- "^lint"
207
- ],
208
- executor: "@powerlines/nx:lint",
209
- defaultConfiguration: "production",
210
- options: {
211
- entry: userConfig.entry || "{sourceRoot}/index.ts",
212
- projectType: projectConfig.projectType || userConfig.type,
213
- tsconfig,
214
- skipInstalls: userConfig.skipInstalls,
215
- skipCache: userConfig.skipCache
216
- },
217
- configurations: {
218
- production: {
219
- mode: "production"
220
- },
221
- test: {
222
- mode: "test"
223
- },
224
- development: {
225
- mode: "development",
226
- skipCache: true
227
- }
228
- }
229
- };
230
- targets.docs = {
231
- cache: true,
232
- inputs: nxJson.withNamedInputs([
233
- ...CONFIG_INPUTS,
234
- `{projectRoot}/${runtimeFolder}`
235
- ], [
236
- "documentation",
237
- "typescript"
238
- ]),
239
- outputs: [
240
- "{projectRoot}/docs/generated"
241
- ],
242
- dependsOn: [
243
- "prepare",
244
- "build",
245
- "^docs"
246
- ],
247
- executor: "@powerlines/nx:docs",
248
- defaultConfiguration: "production",
249
- options: {
250
- entry: userConfig.entry || "{sourceRoot}/index.ts",
251
- projectType: projectConfig.projectType || userConfig.type,
252
- tsconfig,
253
- skipInstalls: userConfig.skipInstalls,
254
- skipCache: userConfig.skipCache
255
- },
256
- configurations: {
257
- production: {
258
- mode: "production"
259
- },
260
- test: {
261
- mode: "test"
262
- },
263
- development: {
264
- mode: "development",
265
- skipCache: true
266
- }
267
- }
268
- };
269
- projectTags.setDefaultProjectTags(projectConfig, name);
270
- projectTags.addProjectTag(projectConfig, "powerlines", projectConfig.projectType || userConfig.type || "library", {
271
- overwrite: true
272
- });
273
- return {
274
- projects: {
275
- [root]: defu__default.default(projectConfig, {
276
- name: kebabCase.kebabCase(userConfig.name),
277
- projectType: userConfig.type || "library",
278
- root,
279
- sourceRoot: joinPaths.joinPaths(root, "src"),
280
- targets
281
- })
282
- }
283
- };
284
- } catch (error) {
285
- console.error(`[${name}]: ${isError.isError(error) ? error.message : "Unknown fatal error"}`);
286
- return {};
287
- }
288
- }, configFiles, optionsV2, contextV2);
289
- }
290
- ];
291
-
292
- exports.createNodesV2 = createNodesV2;
293
- exports.name = name;