nx 21.4.0-canary.20250725-0359f0d → 21.4.0-canary.20250729-c2d0ecf
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/.eslintrc.json +2 -0
- package/bin/nx.js +6 -6
- package/bin/post-install.js +8 -22
- package/package.json +12 -11
- package/schemas/nx-schema.json +77 -0
- package/src/command-line/init/implementation/utils.d.ts.map +1 -1
- package/src/command-line/init/implementation/utils.js +1 -2
- package/src/command-line/nx-cloud/connect/command-object.d.ts.map +1 -1
- package/src/command-line/nx-cloud/connect/command-object.js +2 -1
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +1 -0
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts.map +1 -1
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +14 -2
- package/src/command-line/nx-cloud/connect/view-logs.d.ts.map +1 -1
- package/src/command-line/nx-cloud/connect/view-logs.js +3 -5
- package/src/command-line/release/changelog.d.ts.map +1 -1
- package/src/command-line/release/changelog.js +6 -2
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/command-object.js +4 -0
- package/src/command-line/release/config/config.d.ts +10 -3
- package/src/command-line/release/config/config.d.ts.map +1 -1
- package/src/command-line/release/config/config.js +103 -0
- package/src/command-line/release/config/filter-release-groups.d.ts +5 -1
- package/src/command-line/release/config/filter-release-groups.d.ts.map +1 -1
- package/src/command-line/release/release.d.ts.map +1 -1
- package/src/command-line/release/release.js +6 -1
- package/src/command-line/release/utils/shared.d.ts +9 -0
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +25 -4
- package/src/command-line/release/version/project-logger.d.ts.map +1 -1
- package/src/command-line/release/version/project-logger.js +1 -0
- package/src/command-line/release/version/release-group-processor.d.ts +6 -1
- package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
- package/src/command-line/release/version/release-group-processor.js +73 -3
- package/src/command-line/release/version/version-actions.d.ts +21 -0
- package/src/command-line/release/version/version-actions.d.ts.map +1 -1
- package/src/command-line/release/version/version-actions.js +32 -1
- package/src/command-line/release/version.d.ts.map +1 -1
- package/src/command-line/release/version.js +42 -11
- package/src/command-line/sync/sync.d.ts.map +1 -1
- package/src/command-line/sync/sync.js +8 -2
- package/src/config/nx-json.d.ts +58 -0
- package/src/config/nx-json.d.ts.map +1 -1
- package/src/config/workspace-json-project-json.d.ts +2 -1
- package/src/config/workspace-json-project-json.d.ts.map +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/daemon/server/handle-get-sync-generator-changes.d.ts.map +1 -1
- package/src/daemon/server/handle-get-sync-generator-changes.js +1 -0
- package/src/native/index.d.ts +1 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +1 -1
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts.map +1 -1
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +5 -3
- package/src/nx-cloud/utilities/onboarding.d.ts.map +1 -1
- package/src/nx-cloud/utilities/onboarding.js +1 -1
- package/src/nx-cloud/utilities/url-shorten.d.ts +1 -2
- package/src/nx-cloud/utilities/url-shorten.d.ts.map +1 -1
- package/src/nx-cloud/utilities/url-shorten.js +17 -21
- package/src/plugins/js/index.d.ts.map +1 -1
- package/src/plugins/js/index.js +10 -16
- package/src/plugins/js/lock-file/bun-parser.d.ts +15 -0
- package/src/plugins/js/lock-file/bun-parser.d.ts.map +1 -0
- package/src/plugins/js/lock-file/bun-parser.js +964 -0
- package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
- package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
- package/src/plugins/js/lock-file/lock-file.js +40 -17
- package/src/plugins/js/lock-file/pnpm-parser.js +2 -1
- package/src/project-graph/utils/normalize-project-nodes.d.ts +5 -5
- package/src/project-graph/utils/normalize-project-nodes.d.ts.map +1 -1
- package/src/project-graph/utils/normalize-project-nodes.js +35 -6
- package/src/tasks-runner/life-cycle.d.ts +2 -0
- package/src/tasks-runner/life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycle.js +7 -0
- package/src/tasks-runner/task-orchestrator.d.ts.map +1 -1
- package/src/tasks-runner/task-orchestrator.js +5 -0
- package/src/tasks-runner/tasks-schedule.d.ts +1 -0
- package/src/tasks-runner/tasks-schedule.d.ts.map +1 -1
- package/src/tasks-runner/tasks-schedule.js +3 -0
- package/src/utils/ab-testing.d.ts +1 -1
- package/src/utils/ab-testing.d.ts.map +1 -1
- package/src/utils/ab-testing.js +1 -1
- package/src/utils/git-utils.d.ts +6 -5
- package/src/utils/git-utils.d.ts.map +1 -1
- package/src/utils/git-utils.js +73 -41
- package/src/utils/sync-generators.d.ts +3 -1
- package/src/utils/sync-generators.d.ts.map +1 -1
- package/src/utils/sync-generators.js +7 -1
@@ -2,11 +2,11 @@
|
|
2
2
|
* This is the main API for accessing the lock file functionality.
|
3
3
|
* It encapsulates the package manager specific logic and implementation details.
|
4
4
|
*/
|
5
|
-
import { PackageManager } from '../../../utils/package-manager';
|
6
5
|
import { ProjectGraph, ProjectGraphExternalNode } from '../../../config/project-graph';
|
6
|
+
import { CreateDependenciesContext, CreateNodesContext } from '../../../project-graph/plugins';
|
7
7
|
import { RawProjectGraphDependency } from '../../../project-graph/project-graph-builder';
|
8
8
|
import { PackageJson } from '../../../utils/package-json';
|
9
|
-
import {
|
9
|
+
import { PackageManager } from '../../../utils/package-manager';
|
10
10
|
export declare const LOCKFILES: string[];
|
11
11
|
/**
|
12
12
|
* Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lock-file.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/lock-file/lock-file.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
1
|
+
{"version":3,"file":"lock-file.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/lock-file/lock-file.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACL,YAAY,EACZ,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAGzF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAEL,cAAc,EACf,MAAM,gCAAgC,CAAC;AA8BxC,eAAO,MAAM,SAAS,UAMrB,CAAC;AAQF;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAqC1C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,yBAAyB,GACjC,yBAAyB,EAAE,CA8B7B;AAED,wBAAgB,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAgBtE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAiBtE;AAED,wBAAgB,eAAe,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAgCtE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,YAAY,EACnB,cAAc,GAAE,cAAoD,GACnE,MAAM,CA8CR"}
|
@@ -15,32 +15,31 @@ const node_child_process_1 = require("node:child_process");
|
|
15
15
|
const node_fs_1 = require("node:fs");
|
16
16
|
const node_path_1 = require("node:path");
|
17
17
|
const semver_1 = require("semver");
|
18
|
+
const fileutils_1 = require("../../../utils/fileutils");
|
19
|
+
const output_1 = require("../../../utils/output");
|
18
20
|
const package_manager_1 = require("../../../utils/package-manager");
|
19
21
|
const workspace_root_1 = require("../../../utils/workspace-root");
|
20
|
-
const
|
22
|
+
const bun_parser_1 = require("./bun-parser");
|
21
23
|
const npm_parser_1 = require("./npm-parser");
|
22
24
|
const pnpm_parser_1 = require("./pnpm-parser");
|
23
|
-
const yarn_parser_1 = require("./yarn-parser");
|
24
25
|
const project_graph_pruning_1 = require("./project-graph-pruning");
|
25
26
|
const package_json_1 = require("./utils/package-json");
|
26
|
-
const
|
27
|
+
const yarn_parser_1 = require("./yarn-parser");
|
27
28
|
const YARN_LOCK_FILE = 'yarn.lock';
|
28
29
|
const NPM_LOCK_FILE = 'package-lock.json';
|
29
30
|
const PNPM_LOCK_FILE = 'pnpm-lock.yaml';
|
30
|
-
const BUN_LOCK_FILE = 'bun.lockb';
|
31
|
-
const BUN_TEXT_LOCK_FILE = 'bun.lock';
|
32
31
|
exports.LOCKFILES = [
|
33
32
|
YARN_LOCK_FILE,
|
34
33
|
NPM_LOCK_FILE,
|
35
34
|
PNPM_LOCK_FILE,
|
36
|
-
BUN_LOCK_FILE,
|
37
|
-
BUN_TEXT_LOCK_FILE,
|
35
|
+
bun_parser_1.BUN_LOCK_FILE,
|
36
|
+
bun_parser_1.BUN_TEXT_LOCK_FILE,
|
38
37
|
];
|
39
38
|
const YARN_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, YARN_LOCK_FILE);
|
40
39
|
const NPM_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, NPM_LOCK_FILE);
|
41
40
|
const PNPM_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, PNPM_LOCK_FILE);
|
42
|
-
const BUN_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, BUN_LOCK_FILE);
|
43
|
-
const BUN_TEXT_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, BUN_TEXT_LOCK_FILE);
|
41
|
+
const BUN_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, bun_parser_1.BUN_LOCK_FILE);
|
42
|
+
const BUN_TEXT_LOCK_PATH = (0, node_path_1.join)(workspace_root_1.workspaceRoot, bun_parser_1.BUN_TEXT_LOCK_FILE);
|
44
43
|
/**
|
45
44
|
* Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
|
46
45
|
*/
|
@@ -57,9 +56,16 @@ function getLockFileNodes(packageManager, contents, lockFileHash, context) {
|
|
57
56
|
return (0, npm_parser_1.getNpmLockfileNodes)(contents, lockFileHash);
|
58
57
|
}
|
59
58
|
if (packageManager === 'bun') {
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
const lockFilePath = getLockFilePath(packageManager);
|
60
|
+
if (lockFilePath.endsWith(bun_parser_1.BUN_TEXT_LOCK_FILE)) {
|
61
|
+
// Use new text-based parser
|
62
|
+
return (0, bun_parser_1.getBunTextLockfileNodes)(contents, lockFileHash);
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
// Fallback to yarn parser for binary format
|
66
|
+
const packageJson = (0, fileutils_1.readJsonFile)((0, node_path_1.join)(context.workspaceRoot, 'package.json'));
|
67
|
+
return (0, yarn_parser_1.getYarnLockfileNodes)(contents, lockFileHash, packageJson);
|
68
|
+
}
|
63
69
|
}
|
64
70
|
}
|
65
71
|
catch (e) {
|
@@ -88,8 +94,14 @@ function getLockFileDependencies(packageManager, contents, lockFileHash, context
|
|
88
94
|
return (0, npm_parser_1.getNpmLockfileDependencies)(contents, lockFileHash, context);
|
89
95
|
}
|
90
96
|
if (packageManager === 'bun') {
|
91
|
-
|
92
|
-
|
97
|
+
const lockFilePath = getLockFilePath(packageManager);
|
98
|
+
if (lockFilePath.endsWith(bun_parser_1.BUN_TEXT_LOCK_FILE)) {
|
99
|
+
return (0, bun_parser_1.getBunTextLockfileDependencies)(contents, lockFileHash, context);
|
100
|
+
}
|
101
|
+
else {
|
102
|
+
// Fallback to yarn parser for binary format
|
103
|
+
return (0, yarn_parser_1.getYarnLockfileDependencies)(contents, lockFileHash, context);
|
104
|
+
}
|
93
105
|
}
|
94
106
|
}
|
95
107
|
catch (e) {
|
@@ -134,7 +146,10 @@ function getLockFileName(packageManager) {
|
|
134
146
|
return NPM_LOCK_FILE;
|
135
147
|
}
|
136
148
|
if (packageManager === 'bun') {
|
137
|
-
|
149
|
+
const lockFilePath = getLockFilePath(packageManager);
|
150
|
+
return lockFilePath.endsWith(bun_parser_1.BUN_TEXT_LOCK_FILE)
|
151
|
+
? bun_parser_1.BUN_TEXT_LOCK_FILE
|
152
|
+
: bun_parser_1.BUN_LOCK_FILE;
|
138
153
|
}
|
139
154
|
throw new Error(`Unknown package manager: ${packageManager}`);
|
140
155
|
}
|
@@ -150,10 +165,18 @@ function getLockFilePath(packageManager) {
|
|
150
165
|
}
|
151
166
|
if (packageManager === 'bun') {
|
152
167
|
try {
|
168
|
+
// Check if text format exists first (prefer over binary)
|
169
|
+
if ((0, node_fs_1.existsSync)(BUN_TEXT_LOCK_PATH)) {
|
170
|
+
return BUN_TEXT_LOCK_PATH;
|
171
|
+
}
|
172
|
+
// Fall back to binary format
|
173
|
+
if ((0, node_fs_1.existsSync)(BUN_LOCK_PATH)) {
|
174
|
+
return BUN_LOCK_PATH;
|
175
|
+
}
|
153
176
|
const bunVersion = (0, node_child_process_1.execSync)('bun --version').toString().trim();
|
154
|
-
//
|
177
|
+
// Version-based fallback
|
155
178
|
if ((0, semver_1.gte)(bunVersion, '1.2.0')) {
|
156
|
-
return
|
179
|
+
return BUN_TEXT_LOCK_PATH;
|
157
180
|
}
|
158
181
|
return BUN_LOCK_PATH;
|
159
182
|
}
|
@@ -422,7 +422,8 @@ function mapRootSnapshot(packageJson, rootImporters, packages, graph, lockfileVe
|
|
422
422
|
const version = packageJson[depType][packageName];
|
423
423
|
if (workspaceModules.has(packageName)) {
|
424
424
|
for (const [importerPath, importerSnapshot] of Object.entries(rootImporters)) {
|
425
|
-
const workspaceDep = importerSnapshot.dependencies
|
425
|
+
const workspaceDep = importerSnapshot.dependencies &&
|
426
|
+
importerSnapshot.dependencies[packageName];
|
426
427
|
if (workspaceDep) {
|
427
428
|
const workspaceDepImporterPath = workspaceDep.replace('link:', '');
|
428
429
|
const importerKeyForPackage = (0, path_1.join)(importerPath, workspaceDepImporterPath);
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ProjectGraphProjectNode } from '../../config/project-graph';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
export declare function normalizeProjectNodes({ projects }: CreateDependenciesContext, builder: ProjectGraphBuilder): Promise<void>;
|
1
|
+
import type { ProjectGraphProjectNode } from '../../config/project-graph';
|
2
|
+
import type { ProjectConfiguration } from '../../config/workspace-json-project-json';
|
3
|
+
import type { CreateDependenciesContext } from '../plugins';
|
4
|
+
import type { ProjectGraphBuilder } from '../project-graph-builder';
|
5
|
+
export declare function normalizeProjectNodes({ projects, workspaceRoot }: CreateDependenciesContext, builder: ProjectGraphBuilder): Promise<void>;
|
6
6
|
export declare function normalizeImplicitDependencies(source: string, implicitDependencies: ProjectConfiguration['implicitDependencies'], projects: Record<string, ProjectGraphProjectNode>): string[];
|
7
7
|
//# sourceMappingURL=normalize-project-nodes.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"normalize-project-nodes.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/normalize-project-nodes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"normalize-project-nodes.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/normalize-project-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,wBAAsB,qBAAqB,CACzC,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,yBAAyB,EACtD,OAAO,EAAE,mBAAmB,iBAqE7B;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,EAClE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,YAuClD"}
|
@@ -2,8 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.normalizeProjectNodes = normalizeProjectNodes;
|
4
4
|
exports.normalizeImplicitDependencies = normalizeImplicitDependencies;
|
5
|
+
const node_fs_1 = require("node:fs");
|
6
|
+
const node_path_1 = require("node:path");
|
7
|
+
const fileutils_1 = require("../../utils/fileutils");
|
5
8
|
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
6
|
-
async function normalizeProjectNodes({ projects }, builder) {
|
9
|
+
async function normalizeProjectNodes({ projects, workspaceRoot }, builder) {
|
7
10
|
// Sorting projects by name to make sure that the order of projects in the graph is deterministic.
|
8
11
|
// This is important to ensure that expanded properties referencing projects (e.g. implicit dependencies)
|
9
12
|
// are also deterministic, and thus don't cause the calculated project configuration hash to shift.
|
@@ -26,11 +29,7 @@ async function normalizeProjectNodes({ projects }, builder) {
|
|
26
29
|
p.implicitDependencies = normalizeImplicitDependencies(key, p.implicitDependencies, partialProjectGraphNodes);
|
27
30
|
p.targets ??= {};
|
28
31
|
// TODO: remove in v16
|
29
|
-
const projectType = p.projectType
|
30
|
-
? key.endsWith('-e2e') || key === 'e2e'
|
31
|
-
? 'e2e'
|
32
|
-
: 'app'
|
33
|
-
: 'lib';
|
32
|
+
const projectType = getProjectType(key, p.projectType, workspaceRoot, p.root);
|
34
33
|
const tags = p.tags || [];
|
35
34
|
toAdd.push({
|
36
35
|
name: key,
|
@@ -86,3 +85,33 @@ function normalizeImplicitDependencies(source, implicitDependencies, projects) {
|
|
86
85
|
// detected by createDependencies.
|
87
86
|
return deps.concat(alwaysIgnoredDeps.map((x) => '!' + x));
|
88
87
|
}
|
88
|
+
function getProjectType(projectName, projectType, workspaceRoot, projectRoot) {
|
89
|
+
if (projectType) {
|
90
|
+
if (projectType === 'library') {
|
91
|
+
return 'lib';
|
92
|
+
}
|
93
|
+
if (projectName.endsWith('-e2e') || projectName === 'e2e') {
|
94
|
+
return 'e2e';
|
95
|
+
}
|
96
|
+
return 'app';
|
97
|
+
}
|
98
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(workspaceRoot, projectRoot, 'tsconfig.lib.json'))) {
|
99
|
+
return 'lib';
|
100
|
+
}
|
101
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(workspaceRoot, projectRoot, 'tsconfig.app.json'))) {
|
102
|
+
return 'app';
|
103
|
+
}
|
104
|
+
// If it doesn't have any common library entry points, assume it is an application
|
105
|
+
const packageJsonPath = (0, node_path_1.join)(workspaceRoot, projectRoot, 'package.json');
|
106
|
+
try {
|
107
|
+
const packageJson = (0, fileutils_1.readJsonFile)(packageJsonPath);
|
108
|
+
if (!packageJson.exports &&
|
109
|
+
!packageJson.main &&
|
110
|
+
!packageJson.module &&
|
111
|
+
!packageJson.bin) {
|
112
|
+
return 'app';
|
113
|
+
}
|
114
|
+
}
|
115
|
+
catch { }
|
116
|
+
return 'lib';
|
117
|
+
}
|
@@ -41,6 +41,7 @@ export interface LifeCycle {
|
|
41
41
|
appendTaskOutput?(taskId: string, output: string, isPtyTask: boolean): void;
|
42
42
|
setTaskStatus?(taskId: string, status: NativeTaskStatus): void;
|
43
43
|
registerForcedShutdownCallback?(callback: () => void): void;
|
44
|
+
setEstimatedTaskTimings?(timings: Record<string, number>): void;
|
44
45
|
}
|
45
46
|
export declare class CompositeLifeCycle implements LifeCycle {
|
46
47
|
private readonly lifeCycles;
|
@@ -58,5 +59,6 @@ export declare class CompositeLifeCycle implements LifeCycle {
|
|
58
59
|
appendTaskOutput(taskId: string, output: string, isPtyTask: boolean): void;
|
59
60
|
setTaskStatus(taskId: string, status: NativeTaskStatus): void;
|
60
61
|
registerForcedShutdownCallback(callback: () => void): void;
|
62
|
+
setEstimatedTaskTimings(timings: Record<string, number>): void;
|
61
63
|
}
|
62
64
|
//# sourceMappingURL=life-cycle.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"life-cycle.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/life-cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAUD,MAAM,WAAW,SAAS;IACxB,YAAY,CAAC,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD,UAAU,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC,YAAY,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;OAIG;IACH,SAAS,CAAC,CAAC,IAAI,E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AAG,CAAC,CAAC,GAC1C,IAAI;IAQP,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQxD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;IAQ1E,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAQ7D,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAQ1D,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;CAO/D"}
|
@@ -102,5 +102,12 @@ class CompositeLifeCycle {
|
|
102
102
|
}
|
103
103
|
}
|
104
104
|
}
|
105
|
+
setEstimatedTaskTimings(timings) {
|
106
|
+
for (let l of this.lifeCycles) {
|
107
|
+
if (l.setEstimatedTaskTimings) {
|
108
|
+
l.setEstimatedTaskTimings(timings);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
105
112
|
}
|
106
113
|
exports.CompositeLifeCycle = CompositeLifeCycle;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"task-orchestrator.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/task-orchestrator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQnD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAMrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EAAgB,UAAU,EAAE,M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YAUN,WAAW;YAoBX,qBAAqB;IAkB5B,wBAAwB;YAajB,kBAAkB;YAUlB,iBAAiB;IAuClB,wBAAwB,CACnC,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,EAAE,CAAC;YAmEV,QAAQ;IA6ChB,uBAAuB,CAC3B,cAAc,EAAE,OAAO,EACvB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC;YAkER,OAAO;YAiKP,sBAAsB;IA2C9B,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM;YAkHvC,WAAW;YAQX,YAAY;YAmFZ,kCAAkC;IAQhD,OAAO,CAAC,QAAQ;YA0CF,iBAAiB;IAiB/B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,SAAS;YAIH,0BAA0B;YAQ1B,iBAAiB;YAQjB,OAAO;IA0BrB,OAAO,CAAC,8BAA8B;CAwBvC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,yBAAyB,EAC3C,SAAS,EAAE,SAAS,UAqBrB"}
|
@@ -66,6 +66,11 @@ class TaskOrchestrator {
|
|
66
66
|
}),
|
67
67
|
'init' in this.cache ? this.cache.init() : null,
|
68
68
|
]);
|
69
|
+
// Pass estimated timings to TUI after TasksSchedule is initialized
|
70
|
+
if (this.tuiEnabled) {
|
71
|
+
const estimatedTimings = this.tasksSchedule.getEstimatedTaskTimings();
|
72
|
+
this.options.lifeCycle.setEstimatedTaskTimings(estimatedTimings);
|
73
|
+
}
|
69
74
|
}
|
70
75
|
async run() {
|
71
76
|
await this.init();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tasks-schedule.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/tasks-schedule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,yBAA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 declare const messageOptions: {
|
|
26
26
|
readonly value: "skip";
|
27
27
|
readonly name: "No";
|
28
28
|
}];
|
29
|
-
readonly footer: "\nRead more about
|
29
|
+
readonly footer: "\nRead more about Nx Cloud at https://nx.dev/nx-cloud";
|
30
30
|
readonly hint: "\n(it's free and can be disabled any time)";
|
31
31
|
}];
|
32
32
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ab-testing.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/ab-testing.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"ab-testing.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/ab-testing.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BV,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,cAAc,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,qBAAa,cAAc;IACzB,OAAO,CAAC,gBAAgB,CAAM;IAE9B,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW;IAavC,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAIjD;AAED,eAAO,MAAM,QAAQ,gBAAuB,CAAC;AAE7C;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,iBAsBA"}
|
package/src/utils/ab-testing.js
CHANGED
@@ -33,7 +33,7 @@ const messageOptions = {
|
|
33
33
|
},
|
34
34
|
{ value: 'skip', name: 'No' },
|
35
35
|
],
|
36
|
-
footer: '\nRead more about
|
36
|
+
footer: '\nRead more about Nx Cloud at https://nx.dev/nx-cloud',
|
37
37
|
hint: `\n(it's free and can be disabled any time)`,
|
38
38
|
},
|
39
39
|
],
|
package/src/utils/git-utils.d.ts
CHANGED
@@ -32,11 +32,12 @@ export declare class GitRepository {
|
|
32
32
|
private quotePath;
|
33
33
|
private quoteArg;
|
34
34
|
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
export declare function
|
35
|
+
export interface VcsRemoteInfo {
|
36
|
+
domain: string;
|
37
|
+
slug: string;
|
38
|
+
}
|
39
|
+
export declare function parseVcsRemoteUrl(url: string): VcsRemoteInfo | null;
|
40
|
+
export declare function getVcsRemoteInfo(): VcsRemoteInfo | null;
|
40
41
|
export declare function commitChanges(commitMessage: string, directory?: string): string | null;
|
41
42
|
export declare function getLatestCommitSha(directory?: string): string | null;
|
42
43
|
//# sourceMappingURL=git-utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"git-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/git-utils.ts"],"names":[],"mappings":"AAeA,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,EAAE,UAAU,EAAE,KAAK,EAAE,GAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAE1D,0BAaF;AAED,qBAAa,aAAa;IAEZ,OAAO,CAAC,SAAS;IADtB,IAAI,SAAuC;gBAC9B,SAAS,EAAE,MAAM;IAErC,cAAc,CAAC,GAAG,EAAE,MAAM;IASpB,qBAAqB;IAKrB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMjD,QAAQ;IAIR,YAAY;IAY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B,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CA2Bf;AAED,wBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWpE"}
|
package/src/utils/git-utils.js
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.GitRepository = void 0;
|
4
4
|
exports.cloneFromUpstream = cloneFromUpstream;
|
5
|
-
exports.
|
6
|
-
exports.
|
5
|
+
exports.parseVcsRemoteUrl = parseVcsRemoteUrl;
|
6
|
+
exports.getVcsRemoteInfo = getVcsRemoteInfo;
|
7
7
|
exports.commitChanges = commitChanges;
|
8
8
|
exports.getLatestCommitSha = getLatestCommitSha;
|
9
9
|
const child_process_1 = require("child_process");
|
@@ -170,55 +170,87 @@ class GitRepository {
|
|
170
170
|
}
|
171
171
|
}
|
172
172
|
exports.GitRepository = GitRepository;
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
173
|
+
function parseVcsRemoteUrl(url) {
|
174
|
+
// Remove whitespace and handle common URL formats
|
175
|
+
const cleanUrl = url.trim();
|
176
|
+
// SSH format: git@domain:owner/repo.git
|
177
|
+
const sshMatch = cleanUrl.match(/^git@([^:]+):([^\/]+)\/(.+?)(\.git)?$/);
|
178
|
+
if (sshMatch) {
|
179
|
+
const [, domain, owner, repo] = sshMatch;
|
180
|
+
return {
|
181
|
+
domain,
|
182
|
+
slug: `${owner}/${repo}`,
|
183
|
+
};
|
184
|
+
}
|
185
|
+
// HTTPS with authentication: https://user@domain/owner/repo.git
|
186
|
+
const httpsAuthMatch = cleanUrl.match(/^https?:\/\/[^@]+@([^\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
187
|
+
if (httpsAuthMatch) {
|
188
|
+
const [, domain, owner, repo] = httpsAuthMatch;
|
189
|
+
return {
|
190
|
+
domain,
|
191
|
+
slug: `${owner}/${repo}`,
|
192
|
+
};
|
193
|
+
}
|
194
|
+
// HTTPS format: https://domain/owner/repo.git (without authentication)
|
195
|
+
const httpsMatch = cleanUrl.match(/^https?:\/\/([^@\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
196
|
+
if (httpsMatch) {
|
197
|
+
const [, domain, owner, repo] = httpsMatch;
|
198
|
+
return {
|
199
|
+
domain,
|
200
|
+
slug: `${owner}/${repo}`,
|
201
|
+
};
|
202
|
+
}
|
203
|
+
// SSH alternative format: ssh://git@domain/owner/repo.git or ssh://git@domain:port/owner/repo.git
|
204
|
+
const sshAltMatch = cleanUrl.match(/^ssh:\/\/[^@]+@([^:\/]+)(:[0-9]+)?\/([^\/]+)\/(.+?)(\.git)?$/);
|
205
|
+
if (sshAltMatch) {
|
206
|
+
const [, domain, , owner, repo] = sshAltMatch;
|
207
|
+
return {
|
208
|
+
domain,
|
209
|
+
slug: `${owner}/${repo}`,
|
210
|
+
};
|
211
|
+
}
|
212
|
+
return null;
|
213
|
+
}
|
214
|
+
function getVcsRemoteInfo() {
|
177
215
|
try {
|
178
216
|
const gitRemote = (0, child_process_1.execSync)('git remote -v', {
|
179
217
|
stdio: 'pipe',
|
180
218
|
windowsHide: false,
|
181
|
-
})
|
182
|
-
|
219
|
+
})
|
220
|
+
.toString()
|
221
|
+
.trim();
|
183
222
|
if (!gitRemote || gitRemote.length === 0) {
|
184
|
-
return
|
223
|
+
return null;
|
185
224
|
}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
foundRemotes[remoteName] = url;
|
203
|
-
if (!firstGitHubUrl) {
|
204
|
-
firstGitHubUrl = url;
|
225
|
+
const lines = gitRemote.split('\n').filter((line) => line.trim());
|
226
|
+
const remotesPriority = ['origin', 'upstream', 'base'];
|
227
|
+
const foundRemotes = {};
|
228
|
+
let firstRemote = null;
|
229
|
+
for (const line of lines) {
|
230
|
+
const match = line.trim().match(/^(\w+)\s+(\S+)\s+\((fetch|push)\)$/);
|
231
|
+
if (match) {
|
232
|
+
const [, remoteName, url] = match;
|
233
|
+
const remoteInfo = parseVcsRemoteUrl(url);
|
234
|
+
if (remoteInfo && !foundRemotes[remoteName]) {
|
235
|
+
foundRemotes[remoteName] = remoteInfo;
|
236
|
+
if (!firstRemote) {
|
237
|
+
firstRemote = remoteInfo;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
}
|
205
241
|
}
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
242
|
+
// Return high-priority remote if found
|
243
|
+
for (const remote of remotesPriority) {
|
244
|
+
if (foundRemotes[remote]) {
|
245
|
+
return foundRemotes[remote];
|
246
|
+
}
|
210
247
|
}
|
248
|
+
// Return first found remote
|
249
|
+
return firstRemote;
|
211
250
|
}
|
212
|
-
|
213
|
-
|
214
|
-
function parseGitHubUrl(url) {
|
215
|
-
const sshPattern = /git@github\.com:([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)\.git/;
|
216
|
-
const httpsPattern = /https:\/\/github\.com\/([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)\.git/;
|
217
|
-
let match = url.match(sshPattern) || url.match(httpsPattern);
|
218
|
-
if (match) {
|
219
|
-
return `${match[1]}/${match[2]}`;
|
251
|
+
catch (e) {
|
252
|
+
return null;
|
220
253
|
}
|
221
|
-
return null;
|
222
254
|
}
|
223
255
|
function commitChanges(commitMessage, directory) {
|
224
256
|
try {
|
@@ -7,6 +7,7 @@ import { type FileChange, type Tree } from '../generators/tree';
|
|
7
7
|
export type SyncGeneratorResult = void | {
|
8
8
|
callback?: GeneratorCallback;
|
9
9
|
outOfSyncMessage?: string;
|
10
|
+
outOfSyncDetails?: string[];
|
10
11
|
};
|
11
12
|
export type SyncGenerator = (tree: Tree) => SyncGeneratorResult | Promise<SyncGeneratorResult>;
|
12
13
|
export type SyncGeneratorRunSuccessResult = {
|
@@ -14,6 +15,7 @@ export type SyncGeneratorRunSuccessResult = {
|
|
14
15
|
changes: FileChange[];
|
15
16
|
callback?: GeneratorCallback;
|
16
17
|
outOfSyncMessage?: string;
|
18
|
+
outOfSyncDetails?: string[];
|
17
19
|
};
|
18
20
|
type SerializableSimpleError = {
|
19
21
|
message: string;
|
@@ -53,7 +55,7 @@ export declare function runSyncGenerator(tree: Tree, generatorSpecifier: string,
|
|
53
55
|
export declare function collectEnabledTaskSyncGeneratorsFromProjectGraph(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration): Set<string>;
|
54
56
|
export declare function collectEnabledTaskSyncGeneratorsFromTaskGraph(taskGraph: TaskGraph, projectGraph: ProjectGraph, nxJson: NxJsonConfiguration): Set<string>;
|
55
57
|
export declare function collectRegisteredGlobalSyncGenerators(nxJson?: NxJsonConfiguration<string[] | "*">): Set<string>;
|
56
|
-
export declare function getSyncGeneratorSuccessResultsMessageLines(results: SyncGeneratorRunResult[]): string[];
|
58
|
+
export declare function getSyncGeneratorSuccessResultsMessageLines(results: SyncGeneratorRunResult[], logOutOfSyncDetails?: boolean): string[];
|
57
59
|
export declare function getFailedSyncGeneratorsFixMessageLines(results: SyncGeneratorRunResult[], verbose: boolean, globalGeneratorSet?: Set<string>): string[];
|
58
60
|
export declare function getFlushFailureMessageLines(result: FlushSyncGeneratorChangesFailure, verbose: boolean, globalGeneratorSet?: Set<string>): string[];
|
59
61
|
export declare function processSyncGeneratorResultErrors(results: SyncGeneratorRunResult[]): {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sync-generators.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/sync-generators.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC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;IACT,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,CAcD;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC7C,OAAO,CAAC,sBAAsB,CAAC,CA0CjC;AAED,wBAAgB,gDAAgD,CAC9D,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,GAAG,CAAC,MAAM,CAAC,CA8Bb;AAED,wBAAgB,6CAA6C,CAC3D,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,GAAG,CAAC,MAAM,CAAC,CAwBb;AAED,wBAAgB,qCAAqC,CACnD,MAAM,sCAAe,GACpB,GAAG,CAAC,MAAM,CAAC,CAYb;AAED,wBAAgB,0CAA0C,CACxD,OAAO,EAAE,sBAAsB,EAAE,EACjC,mBAAmB,UAAQ,GAC1B,MAAM,EAAE,CAoBV;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,sBAAsB,EAAE,EACjC,OAAO,EAAE,OAAO,EAChB,kBAAkB,GAAE,GAAG,CAAC,MAAM,CAAa,GAC1C,MAAM,EAAE,CAmCV;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,gCAAgC,EACxC,OAAO,EAAE,OAAO,EAChB,kBAAkB,GAAE,GAAG,CAAC,MAAM,CAAa,GAC1C,MAAM,EAAE,CAsDV;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,sBAAsB,EAAE;;;;EAgBlC"}
|
@@ -71,9 +71,11 @@ async function runSyncGenerator(tree, generatorSpecifier, projects) {
|
|
71
71
|
const result = await implementation(tree);
|
72
72
|
let callback;
|
73
73
|
let outOfSyncMessage;
|
74
|
+
let outOfSyncDetails;
|
74
75
|
if (result && typeof result === 'object') {
|
75
76
|
callback = result.callback;
|
76
77
|
outOfSyncMessage = result.outOfSyncMessage;
|
78
|
+
outOfSyncDetails = result.outOfSyncDetails;
|
77
79
|
}
|
78
80
|
perf_hooks_1.performance.mark(`run-sync-generator:${generatorSpecifier}:end`);
|
79
81
|
perf_hooks_1.performance.measure(`run-sync-generator:${generatorSpecifier}`, `run-sync-generator:${generatorSpecifier}:start`, `run-sync-generator:${generatorSpecifier}:end`);
|
@@ -82,6 +84,7 @@ async function runSyncGenerator(tree, generatorSpecifier, projects) {
|
|
82
84
|
generatorName: generatorSpecifier,
|
83
85
|
callback,
|
84
86
|
outOfSyncMessage,
|
87
|
+
outOfSyncDetails,
|
85
88
|
};
|
86
89
|
}
|
87
90
|
catch (e) {
|
@@ -139,13 +142,16 @@ function collectRegisteredGlobalSyncGenerators(nxJson = (0, nx_json_1.readNxJson
|
|
139
142
|
}
|
140
143
|
return globalSyncGenerators;
|
141
144
|
}
|
142
|
-
function getSyncGeneratorSuccessResultsMessageLines(results) {
|
145
|
+
function getSyncGeneratorSuccessResultsMessageLines(results, logOutOfSyncDetails = false) {
|
143
146
|
const messageLines = [];
|
144
147
|
for (const result of results) {
|
145
148
|
if ('error' in result) {
|
146
149
|
continue;
|
147
150
|
}
|
148
151
|
messageLines.push(`[${chalk.bold(result.generatorName)}]: ${result.outOfSyncMessage ?? `Some files are out of sync.`}`);
|
152
|
+
if (logOutOfSyncDetails && result.outOfSyncDetails?.length) {
|
153
|
+
messageLines.push(...result.outOfSyncDetails);
|
154
|
+
}
|
149
155
|
}
|
150
156
|
return messageLines;
|
151
157
|
}
|