nx 21.6.4 → 21.6.5
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/package.json +11 -11
- package/release/changelog-renderer/index.d.ts +1 -0
- package/release/changelog-renderer/index.d.ts.map +1 -1
- package/release/changelog-renderer/index.js +46 -15
- package/schemas/nx-schema.json +79 -0
- package/src/command-line/nx-commands.js +1 -1
- package/src/daemon/client/client.d.ts +4 -0
- package/src/daemon/client/client.d.ts.map +1 -1
- package/src/daemon/client/client.js +23 -0
- package/src/daemon/message-types/register-project-graph-listener.d.ts +6 -0
- package/src/daemon/message-types/register-project-graph-listener.d.ts.map +1 -0
- package/src/daemon/message-types/register-project-graph-listener.js +11 -0
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts +3 -1
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +13 -5
- package/src/daemon/server/project-graph-listener-sockets.d.ts +8 -0
- package/src/daemon/server/project-graph-listener-sockets.d.ts.map +1 -0
- package/src/daemon/server/project-graph-listener-sockets.js +24 -0
- package/src/daemon/server/server.d.ts.map +1 -1
- package/src/daemon/server/server.js +9 -2
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/is-tui-enabled.d.ts.map +1 -1
- package/src/tasks-runner/is-tui-enabled.js +0 -1
- package/src/tasks-runner/run-command.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "21.6.
|
|
3
|
+
"version": "21.6.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
6
6
|
"repository": {
|
|
@@ -83,16 +83,16 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"@nx/nx-darwin-arm64": "21.6.
|
|
87
|
-
"@nx/nx-darwin-x64": "21.6.
|
|
88
|
-
"@nx/nx-freebsd-x64": "21.6.
|
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.6.
|
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.6.
|
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.6.
|
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.6.
|
|
93
|
-
"@nx/nx-linux-x64-musl": "21.6.
|
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.6.
|
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.6.
|
|
86
|
+
"@nx/nx-darwin-arm64": "21.6.5",
|
|
87
|
+
"@nx/nx-darwin-x64": "21.6.5",
|
|
88
|
+
"@nx/nx-freebsd-x64": "21.6.5",
|
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.6.5",
|
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.6.5",
|
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.6.5",
|
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.6.5",
|
|
93
|
+
"@nx/nx-linux-x64-musl": "21.6.5",
|
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.6.5",
|
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.6.5"
|
|
96
96
|
},
|
|
97
97
|
"nx-migrations": {
|
|
98
98
|
"migrations": "./migrations.json",
|
|
@@ -95,6 +95,7 @@ export default class DefaultChangelogRenderer {
|
|
|
95
95
|
protected shouldRenderAuthors(): boolean;
|
|
96
96
|
protected renderAuthors(): Promise<string[]>;
|
|
97
97
|
protected formatChange(change: ChangelogChange): string;
|
|
98
|
+
protected formatBreakingChange(change: ChangelogChange): string;
|
|
98
99
|
protected groupChangesByType(): Record<string, ChangelogChange[]>;
|
|
99
100
|
protected groupChangesByScope(changes: ChangelogChange[]): Record<string, ChangelogChange[]>;
|
|
100
101
|
protected extractBreakingChangeExplanation(message: string): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/release/changelog-renderer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mFAAmF,CAAC;AAE7H;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ,sBAAsB;IAC3E;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAC3C,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IACrC,SAAS,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACxC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,kBAAkB,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7C,SAAS,CAAC,sBAAsB,EAAE,6BAA6B,CAAC;IAChE,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7C,SAAS,CAAC,yBAAyB,EAC/B,eAAe,CAAC,qBAAqB,CAAC,GACtC,IA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AAG,MAAM,GAAG,IAAI;IA0B1E,SAAS,CAAC,UAAU,CAAC,IAAI,SAAK,GAAG,MAAM;CAMxC"}
|
|
@@ -105,10 +105,7 @@ class DefaultChangelogRenderer {
|
|
|
105
105
|
else {
|
|
106
106
|
for (const change of this.relevantChanges) {
|
|
107
107
|
if (change.isBreaking) {
|
|
108
|
-
|
|
109
|
-
this.breakingChanges.push(breakingChangeExplanation
|
|
110
|
-
? `- ${change.scope ? `**${change.scope.trim()}:** ` : ''}${breakingChangeExplanation}`
|
|
111
|
-
: this.formatChange(change));
|
|
108
|
+
this.breakingChanges.push(this.formatBreakingChange(change));
|
|
112
109
|
}
|
|
113
110
|
}
|
|
114
111
|
}
|
|
@@ -170,10 +167,7 @@ class DefaultChangelogRenderer {
|
|
|
170
167
|
const line = this.formatChange(change);
|
|
171
168
|
markdownLines.push(line);
|
|
172
169
|
if (change.isBreaking && !this.isVersionPlans) {
|
|
173
|
-
|
|
174
|
-
this.breakingChanges.push(breakingChangeExplanation
|
|
175
|
-
? `- ${change.scope ? `**${change.scope.trim()}:** ` : ''}${breakingChangeExplanation}`
|
|
176
|
-
: line);
|
|
170
|
+
this.breakingChanges.push(this.formatBreakingChange(change));
|
|
177
171
|
}
|
|
178
172
|
}
|
|
179
173
|
}
|
|
@@ -184,10 +178,7 @@ class DefaultChangelogRenderer {
|
|
|
184
178
|
const line = this.formatChange(change);
|
|
185
179
|
markdownLines.push(line);
|
|
186
180
|
if (change.isBreaking && !this.isVersionPlans) {
|
|
187
|
-
|
|
188
|
-
this.breakingChanges.push(breakingChangeExplanation
|
|
189
|
-
? `- ${change.scope ? `**${change.scope.trim()}:** ` : ''}${breakingChangeExplanation}`
|
|
190
|
-
: line);
|
|
181
|
+
this.breakingChanges.push(this.formatBreakingChange(change));
|
|
191
182
|
}
|
|
192
183
|
}
|
|
193
184
|
}
|
|
@@ -285,6 +276,43 @@ class DefaultChangelogRenderer {
|
|
|
285
276
|
}
|
|
286
277
|
return changeLine;
|
|
287
278
|
}
|
|
279
|
+
formatBreakingChange(change) {
|
|
280
|
+
const explanation = this.extractBreakingChangeExplanation(change.body);
|
|
281
|
+
if (!explanation) {
|
|
282
|
+
// No explanation found, use the regular formatChange which includes references
|
|
283
|
+
return this.formatChange(change);
|
|
284
|
+
}
|
|
285
|
+
// Build the breaking change line with scope, explanation, and references
|
|
286
|
+
let breakingLine = '- ';
|
|
287
|
+
if (change.scope) {
|
|
288
|
+
breakingLine += `**${change.scope.trim()}:** `;
|
|
289
|
+
}
|
|
290
|
+
// Handle multi-line explanations
|
|
291
|
+
let explanationText = explanation;
|
|
292
|
+
let extraLines = [];
|
|
293
|
+
if (explanation.includes('\n')) {
|
|
294
|
+
[explanationText, ...extraLines] = explanation.split('\n');
|
|
295
|
+
}
|
|
296
|
+
breakingLine += explanationText;
|
|
297
|
+
// Add PR/commit references
|
|
298
|
+
if (this.remoteReleaseClient.getRemoteRepoData() &&
|
|
299
|
+
this.changelogRenderOptions.commitReferences &&
|
|
300
|
+
change.githubReferences) {
|
|
301
|
+
breakingLine += this.remoteReleaseClient.formatReferences(change.githubReferences);
|
|
302
|
+
}
|
|
303
|
+
// Add extra lines with indentation (matching formatChange behavior)
|
|
304
|
+
if (extraLines.length > 0) {
|
|
305
|
+
const indentation = ' ';
|
|
306
|
+
const extraLinesStr = extraLines
|
|
307
|
+
.filter((l) => l.trim().length > 0)
|
|
308
|
+
.map((l) => `${indentation}${l}`)
|
|
309
|
+
.join('\n');
|
|
310
|
+
if (extraLinesStr) {
|
|
311
|
+
breakingLine += '\n\n' + extraLinesStr;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return breakingLine;
|
|
315
|
+
}
|
|
288
316
|
groupChangesByType() {
|
|
289
317
|
const typeGroups = {};
|
|
290
318
|
for (const change of this.relevantChanges) {
|
|
@@ -312,9 +340,12 @@ class DefaultChangelogRenderer {
|
|
|
312
340
|
return null;
|
|
313
341
|
}
|
|
314
342
|
const startOfBreakingChange = startIndex + breakingChangeIdentifier.length;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
343
|
+
// Extract all text after BREAKING CHANGE: until we hit git metadata
|
|
344
|
+
let endOfBreakingChange = message.length;
|
|
345
|
+
// Look for the git metadata delimiter (a line with just ")
|
|
346
|
+
const gitMetadataMarker = message.indexOf('\n"', startOfBreakingChange);
|
|
347
|
+
if (gitMetadataMarker !== -1) {
|
|
348
|
+
endOfBreakingChange = gitMetadataMarker;
|
|
318
349
|
}
|
|
319
350
|
return message.substring(startOfBreakingChange, endOfBreakingChange).trim();
|
|
320
351
|
}
|
package/schemas/nx-schema.json
CHANGED
|
@@ -367,6 +367,85 @@
|
|
|
367
367
|
}
|
|
368
368
|
},
|
|
369
369
|
"additionalProperties": false
|
|
370
|
+
},
|
|
371
|
+
"conformance": {
|
|
372
|
+
"type": "object",
|
|
373
|
+
"description": "Configuration for Nx Conformance",
|
|
374
|
+
"properties": {
|
|
375
|
+
"outputPath": {
|
|
376
|
+
"oneOf": [
|
|
377
|
+
{
|
|
378
|
+
"type": "string",
|
|
379
|
+
"description": "Path to write the conformance results to"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"enum": [false],
|
|
384
|
+
"description": "Disable writing the conformance results to a file"
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
"description": "Optional path to write the conformance results to, defaults to 'dist/conformance-result.json'. Set to false to disable writing the conformance results to a file."
|
|
388
|
+
},
|
|
389
|
+
"rules": {
|
|
390
|
+
"type": "array",
|
|
391
|
+
"description": "List of conformance rules to apply",
|
|
392
|
+
"items": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"properties": {
|
|
395
|
+
"rule": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "Relative path to a local rule implementation, node_module path or nx-cloud rule ID for Nx Cloud Enterprise."
|
|
398
|
+
},
|
|
399
|
+
"options": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"description": "Rule specific configuration options.",
|
|
402
|
+
"additionalProperties": true
|
|
403
|
+
},
|
|
404
|
+
"projects": {
|
|
405
|
+
"type": "array",
|
|
406
|
+
"description": "The projects to apply this rule to. This property accepts an array of strings which can be project names, glob patterns, directories, tag references or anything else that is supported by the `--projects` filter. By default, the implied value is ['*'] (all projects). You can also use objects with 'matcher' and 'explanation' properties to document why specific projects are included or excluded.",
|
|
407
|
+
"items": {
|
|
408
|
+
"oneOf": [
|
|
409
|
+
{
|
|
410
|
+
"type": "string",
|
|
411
|
+
"description": "A project name, glob pattern, directory, tag reference, or any other valid project filter"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"type": "object",
|
|
415
|
+
"properties": {
|
|
416
|
+
"matcher": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "A project name, glob pattern, directory, tag reference, or any other valid project filter"
|
|
419
|
+
},
|
|
420
|
+
"explanation": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"description": "An explanation to communicate to colleagues why this particular project or projects were included or excluded from the rule"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"required": ["matcher", "explanation"],
|
|
426
|
+
"additionalProperties": false
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"explanation": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "Optional explanation field for users to be able to communicate to their colleagues why a particular rule is enabled and important to the workspace in question."
|
|
434
|
+
},
|
|
435
|
+
"status": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"enum": ["enforced", "evaluated", "disabled"],
|
|
438
|
+
"description": "Override the default status of the rule, which is 'enforced'. If set to 'evaluated', the rule will be reported as normal, but not enforced (will exit with code 0). If set to 'disabled', the rule will not be evaluated at all.",
|
|
439
|
+
"default": "enforced"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": ["rule"],
|
|
443
|
+
"additionalProperties": false
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"required": ["rules"],
|
|
448
|
+
"additionalProperties": false
|
|
370
449
|
}
|
|
371
450
|
},
|
|
372
451
|
"definitions": {
|
|
@@ -95,7 +95,7 @@ exports.commandsObject = yargs
|
|
|
95
95
|
.command(resolveConformanceCommandObject())
|
|
96
96
|
.command(resolveConformanceCheckCommandObject())
|
|
97
97
|
.scriptName('nx')
|
|
98
|
-
.help()
|
|
98
|
+
.help(false)
|
|
99
99
|
// NOTE: we handle --version in nx.ts, this just tells yargs that the option exists
|
|
100
100
|
// so that it shows up in help. The default yargs implementation of --version is not
|
|
101
101
|
// hit, as the implementation in nx.ts is hit first and calls process.exit(0).
|
|
@@ -43,6 +43,10 @@ export declare class DaemonClient {
|
|
|
43
43
|
changedProjects: string[];
|
|
44
44
|
changedFiles: ChangedFile[];
|
|
45
45
|
} | null) => void): Promise<UnregisterCallback>;
|
|
46
|
+
registerProjectGraphRecomputationListener(callback: (error: Error | null | 'closed', data: {
|
|
47
|
+
projectGraph: ProjectGraph;
|
|
48
|
+
sourceMaps: ConfigurationSourceMaps;
|
|
49
|
+
} | null) => void): Promise<UnregisterCallback>;
|
|
46
50
|
processInBackground(requirePath: string, data: any): Promise<any>;
|
|
47
51
|
recordOutputsHash(outputs: string[], hash: string): Promise<any>;
|
|
48
52
|
outputsHashesMatch(outputs: string[], hash: string): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/client/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AAoBpD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAUpE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAKh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AAE,MAAM,EAAE,GACnB,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAQpC,+BAA+B,CAC7B,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,+BAA+B,CAAC;IAQ3C,2BAA2B,IAAI,OAAO,CAAC;QACrC,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;IAOF,sBAAsB,CACpB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC;IAUV,oBAAoB,CACxB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAQzB,qBAAqB,CACzB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC;IAQV,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;YAgB7B,oBAAoB;IAMlC,OAAO,CAAC,eAAe;YA8DT,mBAAmB;IA8BjC,OAAO,CAAC,gCAAgC;IAyBxC,OAAO,CAAC,aAAa;IAgDf,iBAAiB,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAwDjD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB5B;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C,wBAAgB,eAAe,YAE9B"}
|
|
@@ -31,6 +31,7 @@ const update_workspace_context_1 = require("../message-types/update-workspace-co
|
|
|
31
31
|
const flush_sync_generator_changes_to_disk_1 = require("../message-types/flush-sync-generator-changes-to-disk");
|
|
32
32
|
const delayed_spinner_1 = require("../../utils/delayed-spinner");
|
|
33
33
|
const run_tasks_execution_hooks_1 = require("../message-types/run-tasks-execution-hooks");
|
|
34
|
+
const register_project_graph_listener_1 = require("../message-types/register-project-graph-listener");
|
|
34
35
|
const DAEMON_ENV_SETTINGS = {
|
|
35
36
|
NX_PROJECT_GLOB_CACHE: 'false',
|
|
36
37
|
NX_CACHE_PROJECTS_CONFIG: 'false',
|
|
@@ -184,6 +185,28 @@ class DaemonClient {
|
|
|
184
185
|
messenger?.close();
|
|
185
186
|
};
|
|
186
187
|
}
|
|
188
|
+
async registerProjectGraphRecomputationListener(callback) {
|
|
189
|
+
let messenger;
|
|
190
|
+
await this.queue.sendToQueue(() => {
|
|
191
|
+
messenger = new daemon_socket_messenger_1.DaemonSocketMessenger((0, net_1.connect)((0, socket_utils_1.getFullOsSocketPath)())).listen((message) => {
|
|
192
|
+
try {
|
|
193
|
+
const parsedMessage = JSON.parse(message);
|
|
194
|
+
callback(null, parsedMessage);
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
callback(e, null);
|
|
198
|
+
}
|
|
199
|
+
}, () => {
|
|
200
|
+
callback('closed', null);
|
|
201
|
+
}, (err) => callback(err, null));
|
|
202
|
+
return messenger.sendMessage({
|
|
203
|
+
type: register_project_graph_listener_1.REGISTER_PROJECT_GRAPH_LISTENER,
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
return () => {
|
|
207
|
+
messenger?.close();
|
|
208
|
+
};
|
|
209
|
+
}
|
|
187
210
|
processInBackground(requirePath, data) {
|
|
188
211
|
return this.sendToDaemonViaQueue({
|
|
189
212
|
type: 'PROCESS_IN_BACKGROUND',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const REGISTER_PROJECT_GRAPH_LISTENER = "REGISTER_PROJECT_GRAPH_LISTENER";
|
|
2
|
+
export type RegisterProjectGraphListenerMessage = {
|
|
3
|
+
type: typeof REGISTER_PROJECT_GRAPH_LISTENER;
|
|
4
|
+
};
|
|
5
|
+
export declare function isRegisterProjectGraphListenerMessage(message: unknown): message is RegisterProjectGraphListenerMessage;
|
|
6
|
+
//# sourceMappingURL=register-project-graph-listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-project-graph-listener.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/message-types/register-project-graph-listener.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,oCACT,CAAC;AAEpC,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,OAAO,+BAA+B,CAAC;CAC9C,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,mCAAmC,CAOhD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REGISTER_PROJECT_GRAPH_LISTENER = void 0;
|
|
4
|
+
exports.isRegisterProjectGraphListenerMessage = isRegisterProjectGraphListenerMessage;
|
|
5
|
+
exports.REGISTER_PROJECT_GRAPH_LISTENER = 'REGISTER_PROJECT_GRAPH_LISTENER';
|
|
6
|
+
function isRegisterProjectGraphListenerMessage(message) {
|
|
7
|
+
return (typeof message === 'object' &&
|
|
8
|
+
message !== null &&
|
|
9
|
+
'type' in message &&
|
|
10
|
+
message['type'] === exports.REGISTER_PROJECT_GRAPH_LISTENER);
|
|
11
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileData, FileMap, ProjectGraph } from '../../config/project-graph';
|
|
2
2
|
import { FileMapCache } from '../../project-graph/nx-deps-cache';
|
|
3
3
|
import { NxWorkspaceFilesExternals } from '../../native';
|
|
4
|
+
import { ConfigurationSourceMaps } from '../../project-graph/utils/project-configuration-utils';
|
|
4
5
|
interface SerializedProjectGraph {
|
|
5
6
|
error: Error | null;
|
|
6
7
|
projectGraph: ProjectGraph | null;
|
|
@@ -9,6 +10,7 @@ interface SerializedProjectGraph {
|
|
|
9
10
|
allWorkspaceFiles: FileData[] | null;
|
|
10
11
|
serializedProjectGraph: string | null;
|
|
11
12
|
serializedSourceMaps: string | null;
|
|
13
|
+
sourceMaps: ConfigurationSourceMaps | null;
|
|
12
14
|
rustReferences: NxWorkspaceFilesExternals | null;
|
|
13
15
|
}
|
|
14
16
|
export declare let fileMapWithFiles: {
|
|
@@ -20,6 +22,6 @@ export declare let currentProjectFileMapCache: FileMapCache | undefined;
|
|
|
20
22
|
export declare let currentProjectGraph: ProjectGraph | undefined;
|
|
21
23
|
export declare function getCachedSerializedProjectGraphPromise(): Promise<SerializedProjectGraph>;
|
|
22
24
|
export declare function addUpdatedAndDeletedFiles(createdFiles: string[], updatedFiles: string[], deletedFiles: string[]): void;
|
|
23
|
-
export declare function registerProjectGraphRecomputationListener(listener: (projectGraph: ProjectGraph) => void): void;
|
|
25
|
+
export declare function registerProjectGraphRecomputationListener(listener: (projectGraph: ProjectGraph, sourceMaps: ConfigurationSourceMaps) => void): void;
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=project-graph-incremental-recomputation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAC;AAc3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,uBAAuB,EACxB,MAAM,uDAAuD,CAAC;AAS/D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACrC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAClD;AAGD,eAAO,IAAI,gBAAgB,EACvB;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC9B,cAAc,EAAE,yBAAyB,CAAC;CAC3C,GACD,SAAS,CAAC;AACd,eAAO,IAAI,0BAA0B,EAAE,YAAY,GAAG,SAAS,CAAC;AAChE,eAAO,IAAI,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;AAYzD,wBAAsB,sCAAsC,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAwD9F;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,QAuCvB;AAED,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,CACR,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,uBAAuB,KAChC,IAAI,QAGV"}
|
|
@@ -15,6 +15,7 @@ const fileutils_1 = require("../../utils/fileutils");
|
|
|
15
15
|
const workspace_context_1 = require("../../utils/workspace-context");
|
|
16
16
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
17
17
|
const file_watcher_sockets_1 = require("./file-watching/file-watcher-sockets");
|
|
18
|
+
const project_graph_listener_sockets_1 = require("./project-graph-listener-sockets");
|
|
18
19
|
const logger_1 = require("./logger");
|
|
19
20
|
const error_types_1 = require("../../project-graph/error-types");
|
|
20
21
|
const get_plugins_1 = require("../../project-graph/plugins/get-plugins");
|
|
@@ -56,7 +57,7 @@ async function getCachedSerializedProjectGraphPromise() {
|
|
|
56
57
|
}
|
|
57
58
|
const result = await cachedSerializedProjectGraphPromise;
|
|
58
59
|
if (wasScheduled) {
|
|
59
|
-
notifyProjectGraphRecomputationListeners(result.projectGraph);
|
|
60
|
+
notifyProjectGraphRecomputationListeners(result.projectGraph, result.sourceMaps);
|
|
60
61
|
}
|
|
61
62
|
return result;
|
|
62
63
|
}
|
|
@@ -65,6 +66,7 @@ async function getCachedSerializedProjectGraphPromise() {
|
|
|
65
66
|
error: e,
|
|
66
67
|
serializedProjectGraph: null,
|
|
67
68
|
serializedSourceMaps: null,
|
|
69
|
+
sourceMaps: null,
|
|
68
70
|
projectGraph: null,
|
|
69
71
|
projectFileMapCache: null,
|
|
70
72
|
fileMap: null,
|
|
@@ -96,11 +98,11 @@ function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) {
|
|
|
96
98
|
}
|
|
97
99
|
cachedSerializedProjectGraphPromise =
|
|
98
100
|
processFilesAndCreateAndSerializeProjectGraph(await (0, get_plugins_1.getPlugins)());
|
|
99
|
-
const { projectGraph } = await cachedSerializedProjectGraphPromise;
|
|
101
|
+
const { projectGraph, sourceMaps } = await cachedSerializedProjectGraphPromise;
|
|
100
102
|
if (createdFiles.length > 0) {
|
|
101
103
|
(0, file_watcher_sockets_1.notifyFileWatcherSockets)(createdFiles, null, null);
|
|
102
104
|
}
|
|
103
|
-
notifyProjectGraphRecomputationListeners(projectGraph);
|
|
105
|
+
notifyProjectGraphRecomputationListeners(projectGraph, sourceMaps);
|
|
104
106
|
}, waitPeriod);
|
|
105
107
|
}
|
|
106
108
|
}
|
|
@@ -191,6 +193,7 @@ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
|
|
|
191
193
|
allWorkspaceFiles: null,
|
|
192
194
|
serializedProjectGraph: null,
|
|
193
195
|
serializedSourceMaps: null,
|
|
196
|
+
sourceMaps: null,
|
|
194
197
|
};
|
|
195
198
|
}
|
|
196
199
|
}
|
|
@@ -205,6 +208,7 @@ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
|
|
|
205
208
|
allWorkspaceFiles: null,
|
|
206
209
|
serializedProjectGraph: null,
|
|
207
210
|
serializedSourceMaps: null,
|
|
211
|
+
sourceMaps: null,
|
|
208
212
|
};
|
|
209
213
|
}
|
|
210
214
|
else {
|
|
@@ -221,6 +225,7 @@ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
|
|
|
221
225
|
allWorkspaceFiles: null,
|
|
222
226
|
serializedProjectGraph: null,
|
|
223
227
|
serializedSourceMaps: null,
|
|
228
|
+
sourceMaps: null,
|
|
224
229
|
};
|
|
225
230
|
}
|
|
226
231
|
}
|
|
@@ -261,6 +266,7 @@ async function createAndSerializeProjectGraph({ projects, sourceMaps, }) {
|
|
|
261
266
|
allWorkspaceFiles,
|
|
262
267
|
serializedProjectGraph,
|
|
263
268
|
serializedSourceMaps,
|
|
269
|
+
sourceMaps,
|
|
264
270
|
rustReferences,
|
|
265
271
|
};
|
|
266
272
|
}
|
|
@@ -274,6 +280,7 @@ async function createAndSerializeProjectGraph({ projects, sourceMaps, }) {
|
|
|
274
280
|
allWorkspaceFiles: null,
|
|
275
281
|
serializedProjectGraph: null,
|
|
276
282
|
serializedSourceMaps: null,
|
|
283
|
+
sourceMaps: null,
|
|
277
284
|
rustReferences: null,
|
|
278
285
|
};
|
|
279
286
|
}
|
|
@@ -298,8 +305,9 @@ async function resetInternalStateIfNxDepsMissing() {
|
|
|
298
305
|
await resetInternalState();
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
|
-
function notifyProjectGraphRecomputationListeners(projectGraph) {
|
|
308
|
+
function notifyProjectGraphRecomputationListeners(projectGraph, sourceMaps) {
|
|
302
309
|
for (const listener of projectGraphRecomputationListeners) {
|
|
303
|
-
listener(projectGraph);
|
|
310
|
+
listener(projectGraph, sourceMaps);
|
|
304
311
|
}
|
|
312
|
+
(0, project_graph_listener_sockets_1.notifyProjectGraphListenerSockets)(projectGraph, sourceMaps);
|
|
305
313
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Socket } from 'net';
|
|
2
|
+
import { ProjectGraph } from '../../config/project-graph';
|
|
3
|
+
import { ConfigurationSourceMaps } from '../../project-graph/utils/project-configuration-utils';
|
|
4
|
+
export declare let registeredProjectGraphListenerSockets: Socket[];
|
|
5
|
+
export declare function removeRegisteredProjectGraphListenerSocket(socket: Socket): void;
|
|
6
|
+
export declare function hasRegisteredProjectGraphListenerSockets(): boolean;
|
|
7
|
+
export declare function notifyProjectGraphListenerSockets(projectGraph: ProjectGraph, sourceMaps: ConfigurationSourceMaps): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=project-graph-listener-sockets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-graph-listener-sockets.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-listener-sockets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAGhG,eAAO,IAAI,qCAAqC,EAAE,MAAM,EAAO,CAAC;AAEhE,wBAAgB,0CAA0C,CAAC,MAAM,EAAE,MAAM,QAGxE;AAED,wBAAgB,wCAAwC,YAEvD;AAED,wBAAsB,iCAAiC,CACrD,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,uBAAuB,iBAgBpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registeredProjectGraphListenerSockets = void 0;
|
|
4
|
+
exports.removeRegisteredProjectGraphListenerSocket = removeRegisteredProjectGraphListenerSocket;
|
|
5
|
+
exports.hasRegisteredProjectGraphListenerSockets = hasRegisteredProjectGraphListenerSockets;
|
|
6
|
+
exports.notifyProjectGraphListenerSockets = notifyProjectGraphListenerSockets;
|
|
7
|
+
const server_1 = require("./server");
|
|
8
|
+
exports.registeredProjectGraphListenerSockets = [];
|
|
9
|
+
function removeRegisteredProjectGraphListenerSocket(socket) {
|
|
10
|
+
exports.registeredProjectGraphListenerSockets =
|
|
11
|
+
exports.registeredProjectGraphListenerSockets.filter((s) => s !== socket);
|
|
12
|
+
}
|
|
13
|
+
function hasRegisteredProjectGraphListenerSockets() {
|
|
14
|
+
return exports.registeredProjectGraphListenerSockets.length > 0;
|
|
15
|
+
}
|
|
16
|
+
async function notifyProjectGraphListenerSockets(projectGraph, sourceMaps) {
|
|
17
|
+
if (!hasRegisteredProjectGraphListenerSockets()) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
await Promise.all(exports.registeredProjectGraphListenerSockets.map((socket) => (0, server_1.handleResult)(socket, 'PROJECT_GRAPH_UPDATED', () => Promise.resolve({
|
|
21
|
+
description: 'Project graph updated',
|
|
22
|
+
response: JSON.stringify({ projectGraph, sourceMaps }),
|
|
23
|
+
}))));
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAkJnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AAyLlD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,iBAqBnC;AAoMD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAgEnD"}
|
|
@@ -17,6 +17,7 @@ const workspace_root_1 = require("../../utils/workspace-root");
|
|
|
17
17
|
const cache_1 = require("../cache");
|
|
18
18
|
const socket_utils_1 = require("../socket-utils");
|
|
19
19
|
const file_watcher_sockets_1 = require("./file-watching/file-watcher-sockets");
|
|
20
|
+
const project_graph_listener_sockets_1 = require("./project-graph-listener-sockets");
|
|
20
21
|
const handle_hash_tasks_1 = require("./handle-hash-tasks");
|
|
21
22
|
const handle_outputs_tracking_1 = require("./handle-outputs-tracking");
|
|
22
23
|
const handle_process_in_background_1 = require("./handle-process-in-background");
|
|
@@ -52,6 +53,7 @@ const flush_sync_generator_changes_to_disk_1 = require("../message-types/flush-s
|
|
|
52
53
|
const handle_flush_sync_generator_changes_to_disk_1 = require("./handle-flush-sync-generator-changes-to-disk");
|
|
53
54
|
const run_tasks_execution_hooks_1 = require("../message-types/run-tasks-execution-hooks");
|
|
54
55
|
const handle_tasks_execution_hooks_1 = require("./handle-tasks-execution-hooks");
|
|
56
|
+
const register_project_graph_listener_1 = require("../message-types/register-project-graph-listener");
|
|
55
57
|
let performanceObserver;
|
|
56
58
|
let workspaceWatcherError;
|
|
57
59
|
let outputsWatcherError;
|
|
@@ -82,6 +84,7 @@ const server = (0, net_1.createServer)(async (socket) => {
|
|
|
82
84
|
exports.openSockets.delete(socket);
|
|
83
85
|
logger_1.serverLogger.log(`Closed a connection. Number of open connections: ${numberOfOpenConnections}`);
|
|
84
86
|
(0, file_watcher_sockets_1.removeRegisteredFileWatcherSocket)(socket);
|
|
87
|
+
(0, project_graph_listener_sockets_1.removeRegisteredProjectGraphListenerSocket)(socket);
|
|
85
88
|
});
|
|
86
89
|
});
|
|
87
90
|
registerProcessTerminationListeners();
|
|
@@ -126,6 +129,9 @@ async function handleMessage(socket, data) {
|
|
|
126
129
|
else if (payload.type === 'REGISTER_FILE_WATCHER') {
|
|
127
130
|
file_watcher_sockets_1.registeredFileWatcherSockets.push({ socket, config: payload.config });
|
|
128
131
|
}
|
|
132
|
+
else if ((0, register_project_graph_listener_1.isRegisterProjectGraphListenerMessage)(payload)) {
|
|
133
|
+
project_graph_listener_sockets_1.registeredProjectGraphListenerSockets.push(socket);
|
|
134
|
+
}
|
|
129
135
|
else if ((0, glob_1.isHandleGlobMessage)(payload)) {
|
|
130
136
|
await handleResult(socket, glob_1.GLOB, () => (0, handle_glob_1.handleGlob)(payload.globs, payload.exclude));
|
|
131
137
|
}
|
|
@@ -201,8 +207,9 @@ async function handleResult(socket, type, hrFn) {
|
|
|
201
207
|
logger_1.serverLogger.log(`Handled ${type}. Handling time: ${doneHandlingMark.getTime() - startMark.getTime()}. Response time: ${endMark.getTime() - doneHandlingMark.getTime()}.`);
|
|
202
208
|
}
|
|
203
209
|
function handleInactivityTimeout() {
|
|
204
|
-
if ((0, file_watcher_sockets_1.hasRegisteredFileWatcherSockets)()
|
|
205
|
-
|
|
210
|
+
if ((0, file_watcher_sockets_1.hasRegisteredFileWatcherSockets)() ||
|
|
211
|
+
(0, project_graph_listener_sockets_1.hasRegisteredProjectGraphListenerSockets)()) {
|
|
212
|
+
logger_1.serverLogger.log(`There are open file watchers or project graph listeners. Resetting inactivity timer.`);
|
|
206
213
|
(0, shutdown_utils_1.resetInactivityTimeout)(handleInactivityTimeout);
|
|
207
214
|
}
|
|
208
215
|
else {
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-tui-enabled.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/is-tui-enabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"is-tui-enabled.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/is-tui-enabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAIrD;;GAEG;AACH,wBAAgB,YAAY,YAE3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,MAAM,EACd,mBAAmB,UAAsD,WA8D1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-command.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/run-command.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,mBAAmB,EAGpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAa/E,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAkBrD,OAAO,EAEL,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AAkBtB,OAAO,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"run-command.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/run-command.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,mBAAmB,EAGpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE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CAAC,CAgE3D;AA+UD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,OAAO,QAgBzB;AAED,wBAAsB,iBAAiB,CAAC,EACtC,KAAK,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EACN,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,eAAe,EAAE,IAAI,EAAE,CAAC;CACzB,GAAG,OAAO,CAAC;IAAE,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC,CA4GxC;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAarE;AAiED,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,GAC1B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,GAAG,CAAC;CACpB,CAyBA;AAqCD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,EAC3C,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,OAAO,GACtB,GAAG,CAsDL"}
|
|
@@ -50,6 +50,9 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
|
|
|
50
50
|
const overridesWithoutHidden = { ...overrides };
|
|
51
51
|
delete overridesWithoutHidden['__overrides_unparsed__'];
|
|
52
52
|
const isRunOne = initiatingProject != null;
|
|
53
|
+
if (tasks.length === 1) {
|
|
54
|
+
process.env.NX_TUI = 'false';
|
|
55
|
+
}
|
|
53
56
|
if ((0, is_tui_enabled_1.isTuiEnabled)()) {
|
|
54
57
|
const interceptedNxCloudLogs = [];
|
|
55
58
|
const createPatchedConsoleMethod = (originalMethod) => {
|