@nx/devkit 0.0.0-pr-26891-b4d6144 → 0.0.0-pr-26898-4cd203d
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/README.md +1 -1
- package/package.json +2 -2
- package/src/executors/parse-target-string.js +3 -2
- package/src/executors/read-target-options.js +2 -1
- package/src/generators/add-build-target-defaults.js +2 -1
- package/src/generators/artifact-name-and-directory-utils.js +4 -3
- package/src/generators/executor-options-utils.js +3 -2
- package/src/generators/format-files.js +2 -1
- package/src/generators/generate-files.js +2 -2
- package/src/generators/plugin-migrations/executor-to-plugin-migrator.js +3 -2
- package/src/generators/plugin-migrations/plugin-migration-utils.js +4 -3
- package/src/generators/project-name-and-root-utils.js +3 -2
- package/src/generators/run-tasks-in-serial.js +2 -1
- package/src/generators/to-js.js +2 -1
- package/src/generators/typescript/insert-import.js +2 -1
- package/src/generators/typescript/insert-statement.js +2 -1
- package/src/generators/update-ts-configs-to-js.js +2 -1
- package/src/generators/visit-not-ignored-files.js +2 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/tasks/install-packages-task.js +2 -1
- package/src/utils/add-plugin.js +4 -3
- package/src/utils/async-iterable/combine-async-iterables.js +2 -1
- package/src/utils/async-iterable/create-async-iterable.js +2 -1
- package/src/utils/async-iterable/map-async-iteratable.js +2 -1
- package/src/utils/async-iterable/tap-async-iteratable.js +2 -1
- package/src/utils/binary-extensions.js +2 -1
- package/src/utils/calculate-hash-for-create-nodes.js +2 -1
- package/src/utils/config-utils.js +5 -5
- package/src/utils/convert-nx-executor.js +2 -1
- package/src/utils/get-named-inputs.js +2 -1
- package/src/utils/get-workspace-layout.js +3 -2
- package/src/utils/invoke-nx-generator.js +2 -1
- package/src/utils/log-show-project-command.js +2 -1
- package/src/utils/move-dir.js +2 -1
- package/src/utils/names.js +2 -1
- package/src/utils/offset-from-root.js +2 -1
- package/src/utils/package-json.js +4 -4
- package/src/utils/replace-package.js +2 -1
- package/src/utils/replace-project-configuration-with-plugin.js +2 -1
- package/src/utils/rxjs-for-await.js +5 -5
- package/src/utils/semver.js +2 -1
- package/src/utils/string-change.js +2 -2
- package/src/utils/string-utils.js +9 -8
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ npx nx@latest init
|
|
|
61
61
|
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
62
62
|
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
63
63
|
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
64
|
-
- [Blog Posts About Nx](https://
|
|
64
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
65
65
|
|
|
66
66
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
67
67
|
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/devkit",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-26898-4cd203d",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more. Learn more about [extending Nx by leveraging the Nx Devkit](https://nx.dev/extending-nx/intro/getting-started) on our docs.",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"semver": "^7.5.3",
|
|
37
37
|
"yargs-parser": "21.1.1",
|
|
38
38
|
"minimatch": "9.0.3",
|
|
39
|
-
"@nrwl/devkit": "0.0.0-pr-
|
|
39
|
+
"@nrwl/devkit": "0.0.0-pr-26898-4cd203d"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"nx": ">= 17 <= 20"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseTargetString =
|
|
4
|
-
exports.targetToTargetString = targetToTargetString;
|
|
3
|
+
exports.targetToTargetString = exports.parseTargetString = void 0;
|
|
5
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
5
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
7
6
|
function parseTargetString(targetString, projectGraphOrCtx) {
|
|
@@ -33,6 +32,7 @@ function parseTargetString(targetString, projectGraphOrCtx) {
|
|
|
33
32
|
configuration,
|
|
34
33
|
};
|
|
35
34
|
}
|
|
35
|
+
exports.parseTargetString = parseTargetString;
|
|
36
36
|
/**
|
|
37
37
|
* Returns a string in the format "project:target[:configuration]" for the target
|
|
38
38
|
*
|
|
@@ -48,3 +48,4 @@ function parseTargetString(targetString, projectGraphOrCtx) {
|
|
|
48
48
|
function targetToTargetString({ project, target, configuration, }) {
|
|
49
49
|
return `${project}:${target.indexOf(':') > -1 ? `"${target}"` : target}${configuration !== undefined ? ':' + configuration : ''}`;
|
|
50
50
|
}
|
|
51
|
+
exports.targetToTargetString = targetToTargetString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readTargetOptions =
|
|
3
|
+
exports.readTargetOptions = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
6
6
|
/**
|
|
@@ -22,3 +22,4 @@ function readTargetOptions({ project, target, configuration }, context) {
|
|
|
22
22
|
const defaultProject = (0, devkit_internals_1.calculateDefaultProjectName)(context.cwd, context.root, { version: 2, projects: context.projectsConfigurations.projects }, context.nxJsonConfiguration);
|
|
23
23
|
return (0, devkit_internals_1.combineOptionsForExecutor)({}, configuration ?? targetConfiguration.defaultConfiguration ?? '', targetConfiguration, schema, defaultProject, (0, path_1.relative)(context.root, context.cwd));
|
|
24
24
|
}
|
|
25
|
+
exports.readTargetOptions = readTargetOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addBuildTargetDefaults =
|
|
3
|
+
exports.addBuildTargetDefaults = void 0;
|
|
4
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
5
5
|
function addBuildTargetDefaults(tree, executorName, buildTargetName = 'build') {
|
|
6
6
|
const nxJson = (0, devkit_exports_1.readNxJson)(tree);
|
|
@@ -14,3 +14,4 @@ function addBuildTargetDefaults(tree, executorName, buildTargetName = 'build') {
|
|
|
14
14
|
};
|
|
15
15
|
(0, devkit_exports_1.updateNxJson)(tree, nxJson);
|
|
16
16
|
}
|
|
17
|
+
exports.addBuildTargetDefaults = addBuildTargetDefaults;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.determineArtifactNameAndDirectoryOptions =
|
|
4
|
-
exports.getRelativeCwd = getRelativeCwd;
|
|
5
|
-
exports.setCwd = setCwd;
|
|
3
|
+
exports.setCwd = exports.getRelativeCwd = exports.determineArtifactNameAndDirectoryOptions = void 0;
|
|
6
4
|
const enquirer_1 = require("enquirer");
|
|
7
5
|
const path_1 = require("path");
|
|
8
6
|
const names_1 = require("../utils/names");
|
|
@@ -24,6 +22,7 @@ async function determineArtifactNameAndDirectoryOptions(tree, options) {
|
|
|
24
22
|
nameAndDirectoryFormat: format,
|
|
25
23
|
};
|
|
26
24
|
}
|
|
25
|
+
exports.determineArtifactNameAndDirectoryOptions = determineArtifactNameAndDirectoryOptions;
|
|
27
26
|
async function determineFormat(formats, options) {
|
|
28
27
|
if (!formats.derived) {
|
|
29
28
|
return 'as-provided';
|
|
@@ -230,12 +229,14 @@ function isTTY() {
|
|
|
230
229
|
function getRelativeCwd() {
|
|
231
230
|
return (0, devkit_exports_1.normalizePath)((0, path_1.relative)(devkit_exports_1.workspaceRoot, getCwd()));
|
|
232
231
|
}
|
|
232
|
+
exports.getRelativeCwd = getRelativeCwd;
|
|
233
233
|
/**
|
|
234
234
|
* Function for setting cwd during testing
|
|
235
235
|
*/
|
|
236
236
|
function setCwd(path) {
|
|
237
237
|
process.env.INIT_CWD = (0, path_1.join)(devkit_exports_1.workspaceRoot, path);
|
|
238
238
|
}
|
|
239
|
+
exports.setCwd = setCwd;
|
|
239
240
|
function getCwd() {
|
|
240
241
|
return process.env.INIT_CWD?.startsWith(devkit_exports_1.workspaceRoot)
|
|
241
242
|
? process.env.INIT_CWD
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forEachExecutorOptions =
|
|
4
|
-
exports.forEachExecutorOptionsInGraph = forEachExecutorOptionsInGraph;
|
|
3
|
+
exports.forEachExecutorOptionsInGraph = exports.forEachExecutorOptions = void 0;
|
|
5
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
5
|
/**
|
|
7
6
|
* Calls a function for each different options that an executor is configured with
|
|
@@ -17,6 +16,7 @@ executorName,
|
|
|
17
16
|
callback) {
|
|
18
17
|
forEachProjectConfig((0, devkit_exports_1.getProjects)(tree), executorName, callback);
|
|
19
18
|
}
|
|
19
|
+
exports.forEachExecutorOptions = forEachExecutorOptions;
|
|
20
20
|
/**
|
|
21
21
|
* Calls a function for each different options that an executor is configured with via the project graph
|
|
22
22
|
* this is helpful when you need to get the expaned configuration options from the nx.json
|
|
@@ -26,6 +26,7 @@ function forEachExecutorOptionsInGraph(graph, executorName, callback) {
|
|
|
26
26
|
Object.values(graph.nodes).forEach((p) => projects.set(p.name, p.data));
|
|
27
27
|
forEachProjectConfig(projects, executorName, callback);
|
|
28
28
|
}
|
|
29
|
+
exports.forEachExecutorOptionsInGraph = forEachExecutorOptionsInGraph;
|
|
29
30
|
function forEachProjectConfig(projects, executorName, callback) {
|
|
30
31
|
for (const [projectName, project] of projects) {
|
|
31
32
|
for (const [targetName, target] of Object.entries(project.targets || {})) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatFiles =
|
|
3
|
+
exports.formatFiles = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -46,6 +46,7 @@ async function formatFiles(tree) {
|
|
|
46
46
|
}
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
+
exports.formatFiles = formatFiles;
|
|
49
50
|
function sortTsConfig(tree) {
|
|
50
51
|
try {
|
|
51
52
|
const tsConfigPath = getRootTsConfigPath(tree);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OverwriteStrategy = void 0;
|
|
4
|
-
exports.generateFiles = generateFiles;
|
|
3
|
+
exports.generateFiles = exports.OverwriteStrategy = void 0;
|
|
5
4
|
const fs_1 = require("fs");
|
|
6
5
|
const path = require("path");
|
|
7
6
|
const binary_extensions_1 = require("../utils/binary-extensions");
|
|
@@ -80,6 +79,7 @@ function generateFiles(tree, srcFolder, target, substitutions, options = {
|
|
|
80
79
|
});
|
|
81
80
|
}
|
|
82
81
|
}
|
|
82
|
+
exports.generateFiles = generateFiles;
|
|
83
83
|
function computePath(srcFolder, target, filePath, substitutions) {
|
|
84
84
|
const relativeFromSrcFolder = path.relative(srcFolder, filePath);
|
|
85
85
|
let computedPath = path.join(target, relativeFromSrcFolder);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _ExecutorToPluginMigrator_instances, _ExecutorToPluginMigrator_projectGraph, _ExecutorToPluginMigrator_executor, _ExecutorToPluginMigrator_pluginPath, _ExecutorToPluginMigrator_pluginOptionsBuilder, _ExecutorToPluginMigrator_postTargetTransformer, _ExecutorToPluginMigrator_skipTargetFilter, _ExecutorToPluginMigrator_skipProjectFilter, _ExecutorToPluginMigrator_specificProjectToMigrate, _ExecutorToPluginMigrator_nxJson, _ExecutorToPluginMigrator_targetDefaultsForExecutor, _ExecutorToPluginMigrator_targetAndProjectsToMigrate, _ExecutorToPluginMigrator_pluginToAddForTarget, _ExecutorToPluginMigrator_createNodes, _ExecutorToPluginMigrator_createNodesV2, _ExecutorToPluginMigrator_createNodesResultsForTargets, _ExecutorToPluginMigrator_skippedProjects, _ExecutorToPluginMigrator_init, _ExecutorToPluginMigrator_migrateTarget, _ExecutorToPluginMigrator_migrateProject, _ExecutorToPluginMigrator_mergeInputs, _ExecutorToPluginMigrator_getTargetAndProjectsToMigrate, _ExecutorToPluginMigrator_getTargetDefaultsForExecutor, _ExecutorToPluginMigrator_getCreatedTargetForProjectRoot, _ExecutorToPluginMigrator_getCreateNodesResults;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.migrateProjectExecutorsToPlugin =
|
|
5
|
-
exports.migrateProjectExecutorsToPluginV1 = migrateProjectExecutorsToPluginV1;
|
|
4
|
+
exports.migrateProjectExecutorsToPluginV1 = exports.migrateProjectExecutorsToPlugin = void 0;
|
|
6
5
|
const tslib_1 = require("tslib");
|
|
7
6
|
const minimatch_1 = require("minimatch");
|
|
8
7
|
const node_assert_1 = require("node:assert");
|
|
@@ -205,10 +204,12 @@ async function migrateProjectExecutorsToPlugin(tree, projectGraph, pluginPath, c
|
|
|
205
204
|
const projects = await migrateProjects(tree, projectGraph, pluginPath, undefined, createNodesV2, defaultPluginOptions, migrations, specificProjectToMigrate);
|
|
206
205
|
return projects;
|
|
207
206
|
}
|
|
207
|
+
exports.migrateProjectExecutorsToPlugin = migrateProjectExecutorsToPlugin;
|
|
208
208
|
async function migrateProjectExecutorsToPluginV1(tree, projectGraph, pluginPath, createNodes, defaultPluginOptions, migrations, specificProjectToMigrate) {
|
|
209
209
|
const projects = await migrateProjects(tree, projectGraph, pluginPath, createNodes, undefined, defaultPluginOptions, migrations, specificProjectToMigrate);
|
|
210
210
|
return projects;
|
|
211
211
|
}
|
|
212
|
+
exports.migrateProjectExecutorsToPluginV1 = migrateProjectExecutorsToPluginV1;
|
|
212
213
|
async function migrateProjects(tree, projectGraph, pluginPath, createNodes, createNodesV2, defaultPluginOptions, migrations, specificProjectToMigrate) {
|
|
213
214
|
const projects = new Map();
|
|
214
215
|
for (const migration of migrations) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteMatchingProperties =
|
|
4
|
-
exports.processTargetOutputs = processTargetOutputs;
|
|
5
|
-
exports.toProjectRelativePath = toProjectRelativePath;
|
|
3
|
+
exports.toProjectRelativePath = exports.processTargetOutputs = exports.deleteMatchingProperties = void 0;
|
|
6
4
|
const posix_1 = require("node:path/posix");
|
|
7
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
8
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -80,6 +78,7 @@ function deleteMatchingProperties(targetToMigrate, createdTarget) {
|
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
}
|
|
81
|
+
exports.deleteMatchingProperties = deleteMatchingProperties;
|
|
83
82
|
function processTargetOutputs(target, renamedOutputOptions, inferredTarget, projectDetails) {
|
|
84
83
|
const interpolatedInferredOutputs = (inferredTarget.outputs ?? []).map((output) => (0, devkit_internals_1.interpolate)(output, {
|
|
85
84
|
workspaceRoot: '',
|
|
@@ -107,6 +106,7 @@ function processTargetOutputs(target, renamedOutputOptions, inferredTarget, proj
|
|
|
107
106
|
}
|
|
108
107
|
target.outputs = targetOutputs;
|
|
109
108
|
}
|
|
109
|
+
exports.processTargetOutputs = processTargetOutputs;
|
|
110
110
|
function toProjectRelativePath(path, projectRoot) {
|
|
111
111
|
if (projectRoot === '.') {
|
|
112
112
|
// workspace and project root are the same, we add a leading './' which is
|
|
@@ -116,6 +116,7 @@ function toProjectRelativePath(path, projectRoot) {
|
|
|
116
116
|
const relativePath = (0, posix_1.relative)((0, posix_1.resolve)(devkit_exports_1.workspaceRoot, projectRoot), (0, posix_1.resolve)(devkit_exports_1.workspaceRoot, path));
|
|
117
117
|
return relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
|
118
118
|
}
|
|
119
|
+
exports.toProjectRelativePath = toProjectRelativePath;
|
|
119
120
|
function updateOutputRenamingOption(output, option, previousName) {
|
|
120
121
|
const newOptionToken = `{options.${option}}`;
|
|
121
122
|
const oldOptionToken = `{options.${previousName}}`;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.determineProjectNameAndRootOptions =
|
|
4
|
-
exports.setCwd = setCwd;
|
|
3
|
+
exports.setCwd = exports.determineProjectNameAndRootOptions = void 0;
|
|
5
4
|
const enquirer_1 = require("enquirer");
|
|
6
5
|
const path_1 = require("path");
|
|
7
6
|
const get_workspace_layout_1 = require("../utils/get-workspace-layout");
|
|
@@ -23,6 +22,7 @@ async function determineProjectNameAndRootOptions(tree, options) {
|
|
|
23
22
|
projectNameAndRootFormat: format,
|
|
24
23
|
};
|
|
25
24
|
}
|
|
25
|
+
exports.determineProjectNameAndRootOptions = determineProjectNameAndRootOptions;
|
|
26
26
|
function validateName(name, projectNameAndRootFormat) {
|
|
27
27
|
if (projectNameAndRootFormat === 'derived' && name.startsWith('@')) {
|
|
28
28
|
throw new Error(`The project name "${name}" cannot start with "@" when the "projectNameAndRootFormat" is "derived".`);
|
|
@@ -271,6 +271,7 @@ function getRelativeCwd() {
|
|
|
271
271
|
function setCwd(path) {
|
|
272
272
|
process.env.INIT_CWD = (0, path_1.join)(devkit_exports_1.workspaceRoot, path);
|
|
273
273
|
}
|
|
274
|
+
exports.setCwd = setCwd;
|
|
274
275
|
function parseNameForAsProvided(rawName) {
|
|
275
276
|
const directory = (0, devkit_exports_1.normalizePath)(rawName);
|
|
276
277
|
if (rawName.includes('@')) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runTasksInSerial =
|
|
3
|
+
exports.runTasksInSerial = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Run tasks in serial
|
|
6
6
|
*
|
|
@@ -13,3 +13,4 @@ function runTasksInSerial(...tasks) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
+
exports.runTasksInSerial = runTasksInSerial;
|
package/src/generators/to-js.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJS =
|
|
3
|
+
exports.toJS = void 0;
|
|
4
4
|
const versions_1 = require("../utils/versions");
|
|
5
5
|
const package_json_1 = require("../utils/package-json");
|
|
6
6
|
/**
|
|
@@ -21,3 +21,4 @@ function toJS(tree, options) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
exports.toJS = toJS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTsConfigsToJs =
|
|
3
|
+
exports.updateTsConfigsToJs = void 0;
|
|
4
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
5
5
|
function updateTsConfigsToJs(tree, options) {
|
|
6
6
|
let updateConfigPath;
|
|
@@ -44,4 +44,5 @@ function updateTsConfigsToJs(tree, options) {
|
|
|
44
44
|
return json;
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
exports.updateTsConfigsToJs = updateTsConfigsToJs;
|
|
47
48
|
const uniq = (value) => [...new Set(value)];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.visitNotIgnoredFiles =
|
|
3
|
+
exports.visitNotIgnoredFiles = void 0;
|
|
4
4
|
const ignore_1 = require("ignore");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
/**
|
|
@@ -35,6 +35,7 @@ function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
|
|
38
39
|
function normalizePathRelativeToRoot(path, root) {
|
|
39
40
|
return (0, path_1.relative)(root, (0, path_1.join)(root, path)).split(path_1.sep).join('/');
|
|
40
41
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = replacePackage;
|
|
4
3
|
const format_files_1 = require("../../generators/format-files");
|
|
5
4
|
const replace_package_1 = require("../../utils/replace-package");
|
|
6
5
|
async function replacePackage(tree) {
|
|
7
6
|
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/devkit', '@nx/devkit');
|
|
8
7
|
await (0, format_files_1.formatFiles)(tree);
|
|
9
8
|
}
|
|
9
|
+
exports.default = replacePackage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installPackagesTask =
|
|
3
|
+
exports.installPackagesTask = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
@@ -37,3 +37,4 @@ function installPackagesTask(tree, alwaysRun = false, cwd = '', packageManager =
|
|
|
37
37
|
(0, child_process_1.execSync)(pmc.install, execSyncOptions);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
exports.installPackagesTask = installPackagesTask;
|
package/src/utils/add-plugin.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addPlugin =
|
|
4
|
-
exports.addPluginV1 = addPluginV1;
|
|
5
|
-
exports.generateCombinations = generateCombinations;
|
|
3
|
+
exports.generateCombinations = exports.addPluginV1 = exports.addPlugin = void 0;
|
|
6
4
|
const yargs = require("yargs-parser");
|
|
7
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
8
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -19,6 +17,7 @@ async function addPlugin(tree, graph, pluginName, createNodesTuple, options, sho
|
|
|
19
17
|
options: pluginOptions,
|
|
20
18
|
}), options, shouldUpdatePackageJsonScripts);
|
|
21
19
|
}
|
|
20
|
+
exports.addPlugin = addPlugin;
|
|
22
21
|
/**
|
|
23
22
|
* @deprecated Use `addPlugin` instead
|
|
24
23
|
* Iterates through various forms of plugin options to find the one which does not conflict with the current graph
|
|
@@ -33,6 +32,7 @@ async function addPluginV1(tree, graph, pluginName, createNodesTuple, options, s
|
|
|
33
32
|
options: pluginOptions,
|
|
34
33
|
}), options, shouldUpdatePackageJsonScripts);
|
|
35
34
|
}
|
|
35
|
+
exports.addPluginV1 = addPluginV1;
|
|
36
36
|
async function _addPluginInternal(tree, graph, pluginName, pluginFactory, options, shouldUpdatePackageJsonScripts) {
|
|
37
37
|
const graphNodes = Object.values(graph.nodes);
|
|
38
38
|
const nxJson = (0, devkit_exports_1.readNxJson)(tree);
|
|
@@ -240,6 +240,7 @@ function generateCombinations(input) {
|
|
|
240
240
|
return result;
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
+
exports.generateCombinations = generateCombinations;
|
|
243
244
|
/**
|
|
244
245
|
* Generate all possible combinations of a 2-dimensional array.
|
|
245
246
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.combineAsyncIterables =
|
|
3
|
+
exports.combineAsyncIterables = void 0;
|
|
4
4
|
async function* combineAsyncIterables(..._iterators) {
|
|
5
5
|
// Convert iterables into iterators with next, return, throws methods.
|
|
6
6
|
// If it's already an iterator, keep it.
|
|
@@ -43,6 +43,7 @@ async function* combineAsyncIterables(..._iterators) {
|
|
|
43
43
|
iterator['return']?.();
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
exports.combineAsyncIterables = combineAsyncIterables;
|
|
46
47
|
function getNextAsyncIteratorFactory(options) {
|
|
47
48
|
return async (asyncIterator, index) => {
|
|
48
49
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAsyncIterable =
|
|
3
|
+
exports.createAsyncIterable = void 0;
|
|
4
4
|
function createAsyncIterable(listener) {
|
|
5
5
|
let done = false;
|
|
6
6
|
let error = null;
|
|
@@ -55,3 +55,4 @@ function createAsyncIterable(listener) {
|
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
+
exports.createAsyncIterable = createAsyncIterable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapAsyncIterable =
|
|
3
|
+
exports.mapAsyncIterable = void 0;
|
|
4
4
|
async function* mapAsyncIterable(data, transform) {
|
|
5
5
|
async function* f() {
|
|
6
6
|
const generator = data[Symbol.asyncIterator] || data[Symbol.iterator];
|
|
@@ -15,3 +15,4 @@ async function* mapAsyncIterable(data, transform) {
|
|
|
15
15
|
}
|
|
16
16
|
return yield* f();
|
|
17
17
|
}
|
|
18
|
+
exports.mapAsyncIterable = mapAsyncIterable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tapAsyncIterable =
|
|
3
|
+
exports.tapAsyncIterable = void 0;
|
|
4
4
|
const map_async_iteratable_1 = require("./map-async-iteratable");
|
|
5
5
|
async function* tapAsyncIterable(data, fn) {
|
|
6
6
|
return yield* (0, map_async_iteratable_1.mapAsyncIterable)(data, (x) => {
|
|
@@ -8,3 +8,4 @@ async function* tapAsyncIterable(data, fn) {
|
|
|
8
8
|
return x;
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
+
exports.tapAsyncIterable = tapAsyncIterable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isBinaryPath =
|
|
3
|
+
exports.isBinaryPath = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const binaryExtensions = new Set([
|
|
6
6
|
// types originally from https://github.com/sindresorhus/binary-extensions/blob/40e44b510d87a63dcf42300bc8fbcb105f45a61c/binary-extensions.json
|
|
@@ -276,3 +276,4 @@ const binaryExtensions = new Set([
|
|
|
276
276
|
function isBinaryPath(path) {
|
|
277
277
|
return binaryExtensions.has((0, path_1.extname)(path).toLowerCase());
|
|
278
278
|
}
|
|
279
|
+
exports.isBinaryPath = isBinaryPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateHashForCreateNodes =
|
|
3
|
+
exports.calculateHashForCreateNodes = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -13,3 +13,4 @@ async function calculateHashForCreateNodes(projectRoot, options, context, additi
|
|
|
13
13
|
(0, devkit_internals_1.hashObject)(options),
|
|
14
14
|
]);
|
|
15
15
|
}
|
|
16
|
+
exports.calculateHashForCreateNodes = calculateHashForCreateNodes;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dynamicImport = void 0;
|
|
4
|
-
exports.loadConfigFile = loadConfigFile;
|
|
5
|
-
exports.getRootTsConfigPath = getRootTsConfigPath;
|
|
6
|
-
exports.getRootTsConfigFileName = getRootTsConfigFileName;
|
|
7
|
-
exports.clearRequireCache = clearRequireCache;
|
|
3
|
+
exports.clearRequireCache = exports.getRootTsConfigFileName = exports.getRootTsConfigPath = exports.loadConfigFile = exports.dynamicImport = void 0;
|
|
8
4
|
const path_1 = require("path");
|
|
9
5
|
const fs_1 = require("fs");
|
|
10
6
|
const node_url_1 = require("node:url");
|
|
@@ -38,10 +34,12 @@ async function loadConfigFile(configFilePath) {
|
|
|
38
34
|
return module.default ?? module;
|
|
39
35
|
}
|
|
40
36
|
}
|
|
37
|
+
exports.loadConfigFile = loadConfigFile;
|
|
41
38
|
function getRootTsConfigPath() {
|
|
42
39
|
const tsConfigFileName = getRootTsConfigFileName();
|
|
43
40
|
return tsConfigFileName ? (0, path_1.join)(devkit_exports_1.workspaceRoot, tsConfigFileName) : null;
|
|
44
41
|
}
|
|
42
|
+
exports.getRootTsConfigPath = getRootTsConfigPath;
|
|
45
43
|
function getRootTsConfigFileName() {
|
|
46
44
|
for (const tsConfigName of ['tsconfig.base.json', 'tsconfig.json']) {
|
|
47
45
|
const pathExists = (0, fs_1.existsSync)((0, path_1.join)(devkit_exports_1.workspaceRoot, tsConfigName));
|
|
@@ -51,6 +49,7 @@ function getRootTsConfigFileName() {
|
|
|
51
49
|
}
|
|
52
50
|
return null;
|
|
53
51
|
}
|
|
52
|
+
exports.getRootTsConfigFileName = getRootTsConfigFileName;
|
|
54
53
|
const packageInstallationDirectories = [
|
|
55
54
|
`${path_1.sep}node_modules${path_1.sep}`,
|
|
56
55
|
`${path_1.sep}.yarn${path_1.sep}`,
|
|
@@ -62,6 +61,7 @@ function clearRequireCache() {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
}
|
|
64
|
+
exports.clearRequireCache = clearRequireCache;
|
|
65
65
|
/**
|
|
66
66
|
* Load the module after ensuring that the require cache is cleared.
|
|
67
67
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertNxExecutor =
|
|
3
|
+
exports.convertNxExecutor = void 0;
|
|
4
4
|
const package_json_1 = require("./package-json");
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -50,6 +50,7 @@ function convertNxExecutor(executor) {
|
|
|
50
50
|
};
|
|
51
51
|
return require('@angular-devkit/architect').createBuilder(builderFunction);
|
|
52
52
|
}
|
|
53
|
+
exports.convertNxExecutor = convertNxExecutor;
|
|
53
54
|
function toObservable(promiseOrAsyncIterator) {
|
|
54
55
|
return new (require('rxjs').Observable)((subscriber) => {
|
|
55
56
|
promiseOrAsyncIterator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNamedInputs =
|
|
3
|
+
exports.getNamedInputs = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
@@ -22,3 +22,4 @@ function getNamedInputs(directory, context) {
|
|
|
22
22
|
...projectJson?.namedInputs,
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
exports.getNamedInputs = getNamedInputs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWorkspaceLayout =
|
|
4
|
-
exports.extractLayoutDirectory = extractLayoutDirectory;
|
|
3
|
+
exports.extractLayoutDirectory = exports.getWorkspaceLayout = void 0;
|
|
5
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
5
|
/**
|
|
7
6
|
* Returns workspace defaults. It includes defaults folders for apps and libs,
|
|
@@ -24,6 +23,7 @@ function getWorkspaceLayout(tree) {
|
|
|
24
23
|
standaloneAsDefault: true,
|
|
25
24
|
};
|
|
26
25
|
}
|
|
26
|
+
exports.getWorkspaceLayout = getWorkspaceLayout;
|
|
27
27
|
/**
|
|
28
28
|
* Experimental
|
|
29
29
|
*/
|
|
@@ -41,6 +41,7 @@ function extractLayoutDirectory(directory) {
|
|
|
41
41
|
}
|
|
42
42
|
return { layoutDirectory: null, projectDirectory: directory };
|
|
43
43
|
}
|
|
44
|
+
exports.extractLayoutDirectory = extractLayoutDirectory;
|
|
44
45
|
function inOrderOfPreference(tree, selectedFolders, defaultChoice) {
|
|
45
46
|
for (let i = 0; i < selectedFolders.length; ++i) {
|
|
46
47
|
if (tree.exists(selectedFolders[i]))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertNxGenerator =
|
|
3
|
+
exports.convertNxGenerator = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
6
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
@@ -35,6 +35,7 @@ function convertNxGenerator(generator, skipWritingConfigInOldFormat = false) {
|
|
|
35
35
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
36
36
|
return (generatorOptions) => invokeNxGenerator(generator, generatorOptions);
|
|
37
37
|
}
|
|
38
|
+
exports.convertNxGenerator = convertNxGenerator;
|
|
38
39
|
/**
|
|
39
40
|
* Create a Rule to invoke an Nx Generator
|
|
40
41
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logShowProjectCommand =
|
|
3
|
+
exports.logShowProjectCommand = void 0;
|
|
4
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
5
5
|
function logShowProjectCommand(projectName) {
|
|
6
6
|
devkit_exports_1.output.log({
|
|
@@ -10,3 +10,4 @@ function logShowProjectCommand(projectName) {
|
|
|
10
10
|
],
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
exports.logShowProjectCommand = logShowProjectCommand;
|
package/src/utils/move-dir.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.moveFilesToNewDirectory =
|
|
3
|
+
exports.moveFilesToNewDirectory = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const visit_not_ignored_files_1 = require("../generators/visit-not-ignored-files");
|
|
6
6
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
@@ -24,3 +24,4 @@ function moveFilesToNewDirectory(tree, oldDir, newDir) {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
exports.moveFilesToNewDirectory = moveFilesToNewDirectory;
|
package/src/utils/names.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.names =
|
|
3
|
+
exports.names = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Util function to generate different strings based off the provided name.
|
|
6
6
|
*
|
|
@@ -21,6 +21,7 @@ function names(name) {
|
|
|
21
21
|
fileName: toFileName(name),
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
+
exports.names = names;
|
|
24
25
|
/**
|
|
25
26
|
* Hyphenated to UpperCamelCase
|
|
26
27
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.offsetFromRoot =
|
|
3
|
+
exports.offsetFromRoot = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
/**
|
|
6
6
|
* Calculates an offset from the root of the workspace, which is useful for
|
|
@@ -26,3 +26,4 @@ function offsetFromRoot(fullPathToDir) {
|
|
|
26
26
|
}
|
|
27
27
|
return offset;
|
|
28
28
|
}
|
|
29
|
+
exports.offsetFromRoot = offsetFromRoot;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NX_VERSION = void 0;
|
|
4
|
-
exports.addDependenciesToPackageJson = addDependenciesToPackageJson;
|
|
5
|
-
exports.removeDependenciesFromPackageJson = removeDependenciesFromPackageJson;
|
|
6
|
-
exports.ensurePackage = ensurePackage;
|
|
3
|
+
exports.NX_VERSION = exports.ensurePackage = exports.removeDependenciesFromPackageJson = exports.addDependenciesToPackageJson = void 0;
|
|
7
4
|
const child_process_1 = require("child_process");
|
|
8
5
|
const module_1 = require("module");
|
|
9
6
|
const semver_1 = require("semver");
|
|
@@ -139,6 +136,7 @@ function addDependenciesToPackageJson(tree, dependencies, devDependencies, packa
|
|
|
139
136
|
}
|
|
140
137
|
return () => { };
|
|
141
138
|
}
|
|
139
|
+
exports.addDependenciesToPackageJson = addDependenciesToPackageJson;
|
|
142
140
|
/**
|
|
143
141
|
* @returns The the incoming dependencies that are higher than the existing verions
|
|
144
142
|
**/
|
|
@@ -191,6 +189,7 @@ function removeDependenciesFromPackageJson(tree, dependencies, devDependencies,
|
|
|
191
189
|
(0, install_packages_task_1.installPackagesTask)(tree);
|
|
192
190
|
};
|
|
193
191
|
}
|
|
192
|
+
exports.removeDependenciesFromPackageJson = removeDependenciesFromPackageJson;
|
|
194
193
|
function sortObjectByKeys(obj) {
|
|
195
194
|
if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
|
|
196
195
|
return obj;
|
|
@@ -336,6 +335,7 @@ function ensurePackage(pkgOrTree, requiredVersionOrPackage, maybeRequiredVersion
|
|
|
336
335
|
throw e;
|
|
337
336
|
}
|
|
338
337
|
}
|
|
338
|
+
exports.ensurePackage = ensurePackage;
|
|
339
339
|
/**
|
|
340
340
|
* Generates necessary files needed for the package manager to work
|
|
341
341
|
* and for the node_modules to be accessible.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceNrwlPackageWithNxPackage =
|
|
3
|
+
exports.replaceNrwlPackageWithNxPackage = void 0;
|
|
4
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
5
5
|
const visit_not_ignored_files_1 = require("../generators/visit-not-ignored-files");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -11,6 +11,7 @@ function replaceNrwlPackageWithNxPackage(tree, oldPackageName, newPackageName) {
|
|
|
11
11
|
replacePackageInNxJson(tree, oldPackageName, newPackageName);
|
|
12
12
|
replaceMentions(tree, oldPackageName, newPackageName);
|
|
13
13
|
}
|
|
14
|
+
exports.replaceNrwlPackageWithNxPackage = replaceNrwlPackageWithNxPackage;
|
|
14
15
|
function replacePackageInDependencies(tree, oldPackageName, newPackageName) {
|
|
15
16
|
(0, visit_not_ignored_files_1.visitNotIgnoredFiles)(tree, '.', (path) => {
|
|
16
17
|
if ((0, path_1.basename)(path) !== 'package.json') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceProjectConfigurationsWithPlugin =
|
|
3
|
+
exports.replaceProjectConfigurationsWithPlugin = void 0;
|
|
4
4
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
|
5
5
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
6
6
|
async function replaceProjectConfigurationsWithPlugin(tree, rootMappings, pluginPath, createNodes, pluginOptions) {
|
|
@@ -42,6 +42,7 @@ async function replaceProjectConfigurationsWithPlugin(tree, rootMappings, plugin
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
exports.replaceProjectConfigurationsWithPlugin = replaceProjectConfigurationsWithPlugin;
|
|
45
46
|
function removeConfigurationDefinedByPlugin(targetName, targetFromProjectConfig, targetFromCreateNodes, projectConfig) {
|
|
46
47
|
// Executor
|
|
47
48
|
delete targetFromProjectConfig.executor;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Remove this if https://github.com/benlesh/rxjs-for-await/issues/15 is addressed
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Deferred = void 0;
|
|
5
|
-
exports.eachValueFrom = eachValueFrom;
|
|
6
|
-
exports.bufferedValuesFrom = bufferedValuesFrom;
|
|
7
|
-
exports.latestValueFrom = latestValueFrom;
|
|
8
|
-
exports.nextValueFrom = nextValueFrom;
|
|
4
|
+
exports.nextValueFrom = exports.latestValueFrom = exports.bufferedValuesFrom = exports.eachValueFrom = exports.Deferred = void 0;
|
|
9
5
|
class Deferred {
|
|
10
6
|
constructor() {
|
|
11
7
|
this.resolve = null;
|
|
@@ -105,6 +101,7 @@ async function* eachValueFrom(source) {
|
|
|
105
101
|
subs.unsubscribe();
|
|
106
102
|
}
|
|
107
103
|
}
|
|
104
|
+
exports.eachValueFrom = eachValueFrom;
|
|
108
105
|
/**
|
|
109
106
|
* Will subscribe to the `source` observable provided
|
|
110
107
|
* and build the emitted values up in a buffer. Allowing
|
|
@@ -196,6 +193,7 @@ async function* bufferedValuesFrom(source) {
|
|
|
196
193
|
subs.unsubscribe();
|
|
197
194
|
}
|
|
198
195
|
}
|
|
196
|
+
exports.bufferedValuesFrom = bufferedValuesFrom;
|
|
199
197
|
/**
|
|
200
198
|
* Will subscribe to the provided `source` observable,
|
|
201
199
|
* allowing `for await..of` loops to iterate and get the
|
|
@@ -285,6 +283,7 @@ async function* latestValueFrom(source) {
|
|
|
285
283
|
subs.unsubscribe();
|
|
286
284
|
}
|
|
287
285
|
}
|
|
286
|
+
exports.latestValueFrom = latestValueFrom;
|
|
288
287
|
/**
|
|
289
288
|
* Subscribes to the provided `source` observable and allows
|
|
290
289
|
* `for await..of` loops to iterate over it, such that
|
|
@@ -361,3 +360,4 @@ async function* nextValueFrom(source) {
|
|
|
361
360
|
subs.unsubscribe();
|
|
362
361
|
}
|
|
363
362
|
}
|
|
363
|
+
exports.nextValueFrom = nextValueFrom;
|
package/src/utils/semver.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkAndCleanWithSemver =
|
|
3
|
+
exports.checkAndCleanWithSemver = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
function checkAndCleanWithSemver(pkgName, version) {
|
|
6
6
|
let newVersion = version;
|
|
@@ -15,3 +15,4 @@ function checkAndCleanWithSemver(pkgName, version) {
|
|
|
15
15
|
}
|
|
16
16
|
return newVersion;
|
|
17
17
|
}
|
|
18
|
+
exports.checkAndCleanWithSemver = checkAndCleanWithSemver;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChangeType = void 0;
|
|
4
|
-
exports.applyChangesToString = applyChangesToString;
|
|
3
|
+
exports.applyChangesToString = exports.ChangeType = void 0;
|
|
5
4
|
var ChangeType;
|
|
6
5
|
(function (ChangeType) {
|
|
7
6
|
ChangeType["Delete"] = "Delete";
|
|
@@ -67,6 +66,7 @@ function applyChangesToString(text, changes) {
|
|
|
67
66
|
}
|
|
68
67
|
return text;
|
|
69
68
|
}
|
|
69
|
+
exports.applyChangesToString = applyChangesToString;
|
|
70
70
|
function assertChangesValid(changes) {
|
|
71
71
|
for (const change of changes) {
|
|
72
72
|
if (isStringInsertion(change)) {
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decamelize =
|
|
4
|
-
exports.dasherize = dasherize;
|
|
5
|
-
exports.camelize = camelize;
|
|
6
|
-
exports.classify = classify;
|
|
7
|
-
exports.underscore = underscore;
|
|
8
|
-
exports.capitalize = capitalize;
|
|
9
|
-
exports.group = group;
|
|
10
|
-
exports.featurePath = featurePath;
|
|
3
|
+
exports.featurePath = exports.group = exports.capitalize = exports.underscore = exports.classify = exports.camelize = exports.dasherize = exports.decamelize = void 0;
|
|
11
4
|
/**
|
|
12
5
|
* @license
|
|
13
6
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -37,6 +30,7 @@ const STRING_UNDERSCORE_REGEXP_2 = /-|\s+/g;
|
|
|
37
30
|
function decamelize(str) {
|
|
38
31
|
return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase();
|
|
39
32
|
}
|
|
33
|
+
exports.decamelize = decamelize;
|
|
40
34
|
/**
|
|
41
35
|
Replaces underscores, spaces, periods, or camelCase with dashes.
|
|
42
36
|
|
|
@@ -55,6 +49,7 @@ function decamelize(str) {
|
|
|
55
49
|
function dasherize(str) {
|
|
56
50
|
return decamelize(str || '').replace(STRING_DASHERIZE_REGEXP, '-');
|
|
57
51
|
}
|
|
52
|
+
exports.dasherize = dasherize;
|
|
58
53
|
/**
|
|
59
54
|
Returns the lowerCamelCase form of a string.
|
|
60
55
|
|
|
@@ -77,6 +72,7 @@ function camelize(str) {
|
|
|
77
72
|
})
|
|
78
73
|
.replace(/^([A-Z])/, (match) => match.toLowerCase());
|
|
79
74
|
}
|
|
75
|
+
exports.camelize = camelize;
|
|
80
76
|
/**
|
|
81
77
|
Returns the UpperCamelCase form of a string.
|
|
82
78
|
|
|
@@ -97,6 +93,7 @@ function classify(str) {
|
|
|
97
93
|
.map((part) => capitalize(camelize(part)))
|
|
98
94
|
.join('.');
|
|
99
95
|
}
|
|
96
|
+
exports.classify = classify;
|
|
100
97
|
/**
|
|
101
98
|
More general than decamelize. Returns the lower\_case\_and\_underscored
|
|
102
99
|
form of a string.
|
|
@@ -118,6 +115,7 @@ function underscore(str) {
|
|
|
118
115
|
.replace(STRING_UNDERSCORE_REGEXP_2, '_')
|
|
119
116
|
.toLowerCase();
|
|
120
117
|
}
|
|
118
|
+
exports.underscore = underscore;
|
|
121
119
|
/**
|
|
122
120
|
Returns the Capitalized form of a string
|
|
123
121
|
|
|
@@ -135,12 +133,15 @@ function underscore(str) {
|
|
|
135
133
|
function capitalize(str) {
|
|
136
134
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
137
135
|
}
|
|
136
|
+
exports.capitalize = capitalize;
|
|
138
137
|
function group(name, group) {
|
|
139
138
|
return group ? `${group}/${name}` : name;
|
|
140
139
|
}
|
|
140
|
+
exports.group = group;
|
|
141
141
|
function featurePath(group, flat, path, name) {
|
|
142
142
|
if (group && !flat) {
|
|
143
143
|
return `../../${path}/${name}/`;
|
|
144
144
|
}
|
|
145
145
|
return group ? `../${path}/` : './';
|
|
146
146
|
}
|
|
147
|
+
exports.featurePath = featurePath;
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const typescriptVersion = "~5.
|
|
1
|
+
export declare const typescriptVersion = "~5.4.2";
|
package/src/utils/versions.js
CHANGED