@nrwl/nx-cloud 14.4.1 → 14.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/lib/core/api/error-reporter.api.js +36 -1
  2. package/lib/core/api/run-group.api.js +68 -1
  3. package/lib/core/file-storage/file-storage.d.ts +6 -1
  4. package/lib/core/file-storage/file-storage.js +6 -1
  5. package/lib/core/file-storage/file-storage.js.map +1 -1
  6. package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +156 -1
  7. package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +284 -1
  8. package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
  9. package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +113 -1
  10. package/lib/core/runners/cloud-enabled/cloud-run.api.js +166 -1
  11. package/lib/core/runners/cloud-enabled/id-generator.d.ts +1 -0
  12. package/lib/core/runners/cloud-enabled/id-generator.js +16 -0
  13. package/lib/core/runners/cloud-enabled/id-generator.js.map +1 -0
  14. package/lib/core/runners/distributed-agent/distributed-agent.api.js +79 -1
  15. package/lib/core/runners/distributed-agent/distributed-agent.impl.js +263 -1
  16. package/lib/core/runners/distributed-execution/distributed-execution.api.js +143 -1
  17. package/lib/core/runners/distributed-execution/distributed-execution.runner.js +220 -1
  18. package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
  19. package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +37 -1
  20. package/lib/core/runners/distributed-execution/task-graph-creator.js +77 -1
  21. package/lib/core/terminal-output/end-of-run-message.js +0 -1
  22. package/lib/core/terminal-output/end-of-run-message.js.map +1 -1
  23. package/lib/daemon/process-run-end.d.ts +3 -0
  24. package/lib/daemon/process-run-end.js +60 -0
  25. package/lib/daemon/process-run-end.js.map +1 -0
  26. package/lib/utilities/axios.js +4 -4
  27. package/lib/utilities/axios.js.map +1 -1
  28. package/package.json +1 -1
@@ -1 +1,143 @@
1
- const a6_0x55c8=['agentCount','axiosException','../../../utilities/nx-imports','createMetricRecorder','Completing\x20run\x20group\x20with\x20an\x20error','error','note','dteStatus','completeRunGroupWithError','exit','map','value','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','getBranch','message','DistributedExecutionApi','Starting\x20a\x20distributed\x20execution','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','target','/nx-cloud/executions/status','stringify','then','status','completeRunGroup','defineProperty','runGroup:\x20','maxParallel','hash','parallel','post','/nx-cloud/executions/complete-run-group','../../../utilities/axios','apply','recordMetric','../../../utilities/serializer-overrides','mapRespToPerfEntry','/nx-cloud/executions/start','stopAgentsOnFailure','serializeOverrides','done','../../../utilities/metric-logger','enabled','apiAxiosInstance','data','response','parseCommand','createStartRequest','axiosMultipleTries','__esModule','VERBOSE_LOGGING','__awaiter','error:\x20','RUNNER_FAILURE_PERF_ENTRY'];(function(_0x5a8c9b,_0x55c811){const _0x52eadd=function(_0x1fbb01){while(--_0x1fbb01){_0x5a8c9b['push'](_0x5a8c9b['shift']());}};_0x52eadd(++_0x55c811);}(a6_0x55c8,0x1e0));const a6_0x52ea=function(_0x5a8c9b,_0x55c811){_0x5a8c9b=_0x5a8c9b-0x0;let _0x52eadd=a6_0x55c8[_0x5a8c9b];return _0x52eadd;};'use strict';var __awaiter=this&&this[a6_0x52ea('0x2f')]||function(_0x514b62,_0x97af26,_0x2e5383,_0x60c7b6){function _0x2cf929(_0x205136){return _0x205136 instanceof _0x2e5383?_0x205136:new _0x2e5383(function(_0x3d99a4){_0x3d99a4(_0x205136);});}return new(_0x2e5383||(_0x2e5383=Promise))(function(_0x5c4f1a,_0x277203){function _0x2d8456(_0x14801e){try{_0x564a99(_0x60c7b6['next'](_0x14801e));}catch(_0x33dd23){_0x277203(_0x33dd23);}}function _0x4ebeb1(_0x5a247b){try{_0x564a99(_0x60c7b6['throw'](_0x5a247b));}catch(_0x193b71){_0x277203(_0x193b71);}}function _0x564a99(_0x471bad){_0x471bad[a6_0x52ea('0x24')]?_0x5c4f1a(_0x471bad[a6_0x52ea('0x8')]):_0x2cf929(_0x471bad[a6_0x52ea('0x8')])[a6_0x52ea('0x12')](_0x2d8456,_0x4ebeb1);}_0x564a99((_0x60c7b6=_0x60c7b6[a6_0x52ea('0x1d')](_0x514b62,_0x97af26||[]))['next']());});};Object[a6_0x52ea('0x15')](exports,a6_0x52ea('0x2d'),{'value':!![]});exports[a6_0x52ea('0x2b')]=exports[a6_0x52ea('0xc')]=void 0x0;const axios_1=require(a6_0x52ea('0x1c'));const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a6_0x52ea('0x25'));const serializer_overrides_1=require(a6_0x52ea('0x1f'));const {output}=require(a6_0x52ea('0x34'));class DistributedExecutionApi{constructor(_0xbef912){this['apiAxiosInstance']=(0x0,axios_1['createApiAxiosInstance'])(_0xbef912);}['start'](_0x5d0723){var _0x1cb977;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2ac64a=(0x0,metric_logger_1['createMetricRecorder'])('dteStart');let _0x3d28a2;if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a6_0x52ea('0xd'),'bodyLines':[JSON[a6_0x52ea('0x11')](_0x5d0723,null,0x2)]});}try{_0x3d28a2=yield(0x0,axios_1[a6_0x52ea('0x2c')])(()=>this[a6_0x52ea('0x27')][a6_0x52ea('0x1a')](a6_0x52ea('0x21'),_0x5d0723));_0x2ac64a[a6_0x52ea('0x1e')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x3d28a2));}catch(_0x26bdc3){_0x2ac64a[a6_0x52ea('0x1e')](((_0x1cb977=_0x26bdc3===null||_0x26bdc3===void 0x0?void 0x0:_0x26bdc3[a6_0x52ea('0x33')])===null||_0x1cb977===void 0x0?void 0x0:_0x1cb977[a6_0x52ea('0x29')])?(0x0,metric_logger_1[a6_0x52ea('0x20')])(_0x26bdc3[a6_0x52ea('0x33')][a6_0x52ea('0x29')]):metric_logger_1[a6_0x52ea('0x31')]);throw _0x26bdc3;}if(!_0x3d28a2['data'][a6_0x52ea('0x26')]){throw new Error('Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.');}if(_0x3d28a2['data'][a6_0x52ea('0x2')]){throw new Error(_0x3d28a2[a6_0x52ea('0x28')][a6_0x52ea('0x2')]);}return _0x3d28a2[a6_0x52ea('0x28')]['id'];});}[a6_0x52ea('0x13')](_0x4ed702){var _0x5a54e0;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x9d681c=(0x0,metric_logger_1[a6_0x52ea('0x0')])(a6_0x52ea('0x4'));try{const _0x2e4de3=yield(0x0,axios_1[a6_0x52ea('0x2c')])(()=>this[a6_0x52ea('0x27')][a6_0x52ea('0x1a')](a6_0x52ea('0x10'),{'id':_0x4ed702}));_0x9d681c['recordMetric']((0x0,metric_logger_1[a6_0x52ea('0x20')])(_0x2e4de3));return _0x2e4de3[a6_0x52ea('0x28')];}catch(_0x341627){_0x9d681c[a6_0x52ea('0x1e')](((_0x5a54e0=_0x341627===null||_0x341627===void 0x0?void 0x0:_0x341627[a6_0x52ea('0x33')])===null||_0x5a54e0===void 0x0?void 0x0:_0x5a54e0[a6_0x52ea('0x29')])?(0x0,metric_logger_1[a6_0x52ea('0x20')])(_0x341627[a6_0x52ea('0x33')][a6_0x52ea('0x29')]):metric_logger_1[a6_0x52ea('0x31')]);output[a6_0x52ea('0x2')]({'title':_0x341627[a6_0x52ea('0xb')]});process[a6_0x52ea('0x6')](0x1);}});}[a6_0x52ea('0x5')](_0x3f1a41,_0x520f37){var _0x56f147;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4e4933=(0x0,metric_logger_1[a6_0x52ea('0x0')])(a6_0x52ea('0x14'));if(environment_1[a6_0x52ea('0x2e')]){output[a6_0x52ea('0x3')]({'title':a6_0x52ea('0x1'),'bodyLines':[a6_0x52ea('0x16')+_0x3f1a41,a6_0x52ea('0x30')+_0x520f37]});}try{const _0xcdce88=yield(0x0,axios_1['axiosMultipleTries'])(()=>this[a6_0x52ea('0x27')]['post'](a6_0x52ea('0x1b'),{'runGroup':_0x3f1a41,'criticalErrorMessage':_0x520f37}),0x3);_0x4e4933[a6_0x52ea('0x1e')]((0x0,metric_logger_1[a6_0x52ea('0x20')])(_0xcdce88));}catch(_0x5cde07){_0x4e4933[a6_0x52ea('0x1e')](((_0x56f147=_0x5cde07===null||_0x5cde07===void 0x0?void 0x0:_0x5cde07['axiosException'])===null||_0x56f147===void 0x0?void 0x0:_0x56f147['response'])?(0x0,metric_logger_1[a6_0x52ea('0x20')])(_0x5cde07['axiosException'][a6_0x52ea('0x29')]):metric_logger_1[a6_0x52ea('0x31')]);}});}}exports[a6_0x52ea('0xc')]=DistributedExecutionApi;function createStartRequest(_0x1b4f8d,_0x47e31e,_0x432511){const _0x13aaaf=_0x47e31e[a6_0x52ea('0x7')](_0x1bbe81=>{return _0x1bbe81['map'](_0x4aa5c6=>{return{'taskId':_0x4aa5c6['id'],'hash':_0x4aa5c6[a6_0x52ea('0x18')],'projectName':_0x4aa5c6[a6_0x52ea('0xf')]['project'],'target':_0x4aa5c6[a6_0x52ea('0xf')]['target'],'configuration':_0x4aa5c6['target']['configuration']||null,'params':(0x0,serializer_overrides_1[a6_0x52ea('0x23')])(_0x4aa5c6)};});});const _0x4933d8={'command':(0x0,environment_1[a6_0x52ea('0x2a')])(),'branch':(0x0,environment_1[a6_0x52ea('0xa')])(),'runGroup':_0x1b4f8d,'tasks':_0x13aaaf,'maxParallel':calculateMaxParallel(_0x432511)};if(environment_1[a6_0x52ea('0x9')]){_0x4933d8[a6_0x52ea('0x32')]=environment_1[a6_0x52ea('0x9')];}if(!environment_1[a6_0x52ea('0xe')]){_0x4933d8[a6_0x52ea('0x22')]=![];}return _0x4933d8;}exports['createStartRequest']=createStartRequest;function calculateMaxParallel(_0x302b52){if(_0x302b52[a6_0x52ea('0x19')]==='false'||_0x302b52['parallel']===![]){return 0x1;}else if(_0x302b52['parallel']==='true'||_0x302b52[a6_0x52ea('0x19')]===!![]){return Number(_0x302b52[a6_0x52ea('0x17')]||0x3);}else if(_0x302b52[a6_0x52ea('0x19')]===undefined){return _0x302b52[a6_0x52ea('0x17')]?Number(_0x302b52[a6_0x52ea('0x17')]):0x3;}else{return Number(_0x302b52[a6_0x52ea('0x19')])||0x3;}}
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createStartRequest = exports.DistributedExecutionApi = void 0;
13
+ const axios_1 = require("../../../utilities/axios");
14
+ const environment_1 = require("../../../utilities/environment");
15
+ const metric_logger_1 = require("../../../utilities/metric-logger");
16
+ const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
17
+ const { output } = require('../../../utilities/nx-imports');
18
+ class DistributedExecutionApi {
19
+ constructor(options) {
20
+ this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
21
+ }
22
+ start(params) {
23
+ var _a;
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const recorder = (0, metric_logger_1.createMetricRecorder)('dteStart');
26
+ let resp;
27
+ if (environment_1.VERBOSE_LOGGING) {
28
+ output.note({
29
+ title: 'Starting a distributed execution',
30
+ bodyLines: [JSON.stringify(params, null, 2)],
31
+ });
32
+ }
33
+ try {
34
+ resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/start', params));
35
+ recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
36
+ }
37
+ catch (e) {
38
+ recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
39
+ ? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
40
+ : metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
41
+ throw e;
42
+ }
43
+ if (!resp.data.enabled) {
44
+ throw new Error(`Workspace is disabled. Cannot perform distributed task executions.`);
45
+ }
46
+ if (resp.data.error) {
47
+ throw new Error(resp.data.error);
48
+ }
49
+ return resp.data.id;
50
+ });
51
+ }
52
+ status(id) {
53
+ var _a;
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const recorder = (0, metric_logger_1.createMetricRecorder)('dteStatus');
56
+ try {
57
+ const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/status', {
58
+ id,
59
+ }));
60
+ recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
61
+ return resp.data;
62
+ }
63
+ catch (e) {
64
+ recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
65
+ ? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
66
+ : metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
67
+ output.error({
68
+ title: e.message,
69
+ });
70
+ process.exit(1);
71
+ }
72
+ });
73
+ }
74
+ completeRunGroupWithError(runGroup, error) {
75
+ var _a;
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const recorder = (0, metric_logger_1.createMetricRecorder)('completeRunGroup');
78
+ if (environment_1.VERBOSE_LOGGING) {
79
+ output.note({
80
+ title: 'Completing run group with an error',
81
+ bodyLines: [`runGroup: ${runGroup}`, `error: ${error}`],
82
+ });
83
+ }
84
+ try {
85
+ const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
86
+ runGroup: runGroup,
87
+ criticalErrorMessage: error,
88
+ }), 3);
89
+ recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
90
+ }
91
+ catch (e) {
92
+ recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
93
+ ? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
94
+ : metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
95
+ }
96
+ });
97
+ }
98
+ }
99
+ exports.DistributedExecutionApi = DistributedExecutionApi;
100
+ function createStartRequest(runGroup, task, options) {
101
+ const tasksToExecute = task.map((arr) => {
102
+ return arr.map((t) => {
103
+ return {
104
+ taskId: t.id,
105
+ hash: t.hash,
106
+ projectName: t.target.project,
107
+ target: t.target.target,
108
+ configuration: t.target.configuration || null,
109
+ params: (0, serializer_overrides_1.serializeOverrides)(t),
110
+ };
111
+ });
112
+ });
113
+ const request = {
114
+ command: (0, environment_1.parseCommand)(),
115
+ branch: (0, environment_1.getBranch)(),
116
+ runGroup,
117
+ tasks: tasksToExecute,
118
+ maxParallel: calculateMaxParallel(options),
119
+ };
120
+ if (environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT) {
121
+ request.agentCount = environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT;
122
+ }
123
+ if (!environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE) {
124
+ request.stopAgentsOnFailure = false;
125
+ }
126
+ return request;
127
+ }
128
+ exports.createStartRequest = createStartRequest;
129
+ function calculateMaxParallel(options) {
130
+ if (options.parallel === 'false' || options.parallel === false) {
131
+ return 1;
132
+ }
133
+ else if (options.parallel === 'true' || options.parallel === true) {
134
+ return Number(options.maxParallel || 3);
135
+ }
136
+ else if (options.parallel === undefined) {
137
+ return options.maxParallel ? Number(options.maxParallel) : 3;
138
+ }
139
+ else {
140
+ return Number(options.parallel) || 3;
141
+ }
142
+ }
143
+ //# sourceMappingURL=distributed-execution.api.js.map
@@ -1 +1,220 @@
1
- const a7_0x3577=['NO_COMPLETED_TASKS_TIMEOUT','../../error/print-run-group-error','parse','DistributedExecutionApi','then','Waiting...','nodes','./task-graph-creator','executionStatus','runUrl','get','logCommand','Waiter','Retrieving\x20artifacts\x20from\x20','completedTasks','error','note','nxCloudDistributedTasksRunner','scheduleTask','\x20seconds.','COMPLETED','values','Main\x20job\x20was\x20terminated\x20via\x20SIGINT','FileStorage','axiosException','readFileSync','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','projectGraph','submitRunMetrics','throw','targetDependencies','SIGINT','push','retrieve','done','start','length','endTask','No\x20new\x20completed\x20tasks\x20after\x20','createTaskGraph','url','build','./split-task-graph-into-stages','wait','See\x20run\x20details\x20at\x20','strictlyOrderedTargets','exit','Error:','./distributed-execution.api','../../api/error-reporter.api','run','Starting\x20distributed\x20command\x20execution','configuration','__esModule','serializeOverrides','hash','SIGTERM','assign','taskGraph','taskId','terminalOutput','/nx.json','../../../utilities/metric-logger','message','E2EEncryption','executionId:\x20','find','encryptionKey','log','cacheDirectory','Processing\x20task\x20','../../../utilities/serializer-overrides','reset','dependencies','value','Main\x20job\x20was\x20terminated\x20via\x20SIGTERM','./node_modules/.cache/nx','../../../utilities/nx-imports','number\x20of\x20completed\x20tasks:\x20','target','defineProperty','TaskGraphCreator','commandStatus','VERBOSE_LOGGING','Status\x20update','addVerticalSeparator','printRunGroupError','completeRunGroupWithError','ErrorReporterApi','getRunGroup','../../file-storage/e2e-encryption','../../../utilities/waiter','stdout','Successfully\x20completed\x20running\x20the\x20command.','../../file-storage/file-storage','criticalErrorMessage'];(function(_0x9ab495,_0x35771c){const _0x579e7d=function(_0x59729c){while(--_0x59729c){_0x9ab495['push'](_0x9ab495['shift']());}};_0x579e7d(++_0x35771c);}(a7_0x3577,0x8c));const a7_0x579e=function(_0x9ab495,_0x35771c){_0x9ab495=_0x9ab495-0x0;let _0x579e7d=a7_0x3577[_0x9ab495];return _0x579e7d;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x11aaad,_0x912506,_0x4fdfe8,_0x3af311){function _0x4b9f65(_0x2594f4){return _0x2594f4 instanceof _0x4fdfe8?_0x2594f4:new _0x4fdfe8(function(_0xba841b){_0xba841b(_0x2594f4);});}return new(_0x4fdfe8||(_0x4fdfe8=Promise))(function(_0x168c26,_0x1aa82){function _0x78d87b(_0x3ceb83){try{_0x12657c(_0x3af311['next'](_0x3ceb83));}catch(_0x2f1bb9){_0x1aa82(_0x2f1bb9);}}function _0x48f1ed(_0x24e205){try{_0x12657c(_0x3af311[a7_0x579e('0x51')](_0x24e205));}catch(_0x30ff2b){_0x1aa82(_0x30ff2b);}}function _0x12657c(_0x5d74a5){_0x5d74a5[a7_0x579e('0x56')]?_0x168c26(_0x5d74a5[a7_0x579e('0x1e')]):_0x4b9f65(_0x5d74a5[a7_0x579e('0x1e')])[a7_0x579e('0x38')](_0x78d87b,_0x48f1ed);}_0x12657c((_0x3af311=_0x3af311['apply'](_0x11aaad,_0x912506||[]))['next']());});};Object[a7_0x579e('0x24')](exports,a7_0x579e('0x9'),{'value':!![]});exports[a7_0x579e('0x45')]=void 0x0;const fs_1=require('fs');const stripJsonComments=require('strip-json-comments');const create_unchanged_value_timeout_1=require('../../../utilities/create-unchanged-value-timeout');const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a7_0x579e('0x12'));const serializer_overrides_1=require(a7_0x579e('0x1b'));const waiter_1=require(a7_0x579e('0x2f'));const error_reporter_api_1=require(a7_0x579e('0x5'));const print_run_group_error_1=require(a7_0x579e('0x35'));const e2e_encryption_1=require(a7_0x579e('0x2e'));const file_storage_1=require(a7_0x579e('0x32'));const distributed_execution_api_1=require(a7_0x579e('0x4'));const split_task_graph_into_stages_1=require(a7_0x579e('0x5e'));const task_graph_creator_1=require(a7_0x579e('0x3b'));const {output,workspaceRoot,getOutputs,Cache}=require(a7_0x579e('0x21'));class NoopLifeCycle{[a7_0x579e('0x46')](_0x254c9f){}['startTask'](_0x37725f){}[a7_0x579e('0x59')](_0x500fc0,_0x354dd2){}}function runDistributedExecution(_0x16ad44,_0xcd0f09,_0x502f3a,_0x1060be,_0x4d54e7,_0x455020,_0x34a3e6){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1a99a6=yield _0x16ad44[a7_0x579e('0x57')]((0x0,distributed_execution_api_1['createStartRequest'])(_0x455020,(0x0,split_task_graph_into_stages_1['splitTasksIntoStages'])(_0x34a3e6),_0xcd0f09));return yield processTasks(_0x16ad44,_0x1060be,_0x4d54e7,_0xcd0f09,_0x1a99a6,Object[a7_0x579e('0x49')](_0x34a3e6['tasks']),_0x502f3a);});}function processTasks(_0x93e589,_0x35d6b9,_0x34a397,_0x9e3f01,_0x4954fa,_0x558b7e,_0xfe1a49){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x8dd07c={};const _0xd2d184=(0x0,create_unchanged_value_timeout_1['createUnchangedValueTimeout'])({'title':a7_0x579e('0x5a')+environment_1[a7_0x579e('0x34')]/0x3e8+a7_0x579e('0x47'),'timeout':environment_1['NO_COMPLETED_TASKS_TIMEOUT']});const _0x32a49d=new waiter_1[(a7_0x579e('0x40'))]();while(!![]){if(environment_1[a7_0x579e('0x27')]){output[a7_0x579e('0x44')]({'title':a7_0x579e('0x39')});}yield _0x32a49d[a7_0x579e('0x5f')]();const _0x49d658=yield _0x93e589['status'](_0x4954fa);if(environment_1[a7_0x579e('0x27')]){output['note']({'title':a7_0x579e('0x28'),'bodyLines':[a7_0x579e('0x15')+_0x4954fa,'executionStatus:\x20'+_0x49d658[a7_0x579e('0x3c')],a7_0x579e('0x22')+_0x49d658[a7_0x579e('0x42')]['length'],'error:\x20'+_0x49d658['criticalErrorMessage']]});}if(_0x49d658[a7_0x579e('0x33')]){output['error']({'title':'Distributed\x20Execution\x20Terminated','bodyLines':[a7_0x579e('0x3'),_0x49d658[a7_0x579e('0x33')]]});process[a7_0x579e('0x2')](0x1);}_0xd2d184(_0x49d658[a7_0x579e('0x42')][a7_0x579e('0x58')]);for(const _0x54a466 of _0x49d658['completedTasks']){if(_0x8dd07c[_0x54a466[a7_0x579e('0xf')]])continue;yield processTask(_0x35d6b9,_0x34a397,_0xfe1a49,_0x9e3f01,_0x558b7e,_0x54a466);_0x32a49d[a7_0x579e('0x1c')]();_0x8dd07c[_0x54a466[a7_0x579e('0xf')]]=!![];}if(_0x49d658[a7_0x579e('0x3c')]===a7_0x579e('0x48')){return{'commandStatus':_0x49d658[a7_0x579e('0x26')],'runUrl':_0x49d658[a7_0x579e('0x3d')]};}}});}function processTask(_0x579989,_0x415853,_0x23e088,_0x47b5ea,_0x3effad,_0x410ff4){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a7_0x579e('0x27')]){output[a7_0x579e('0x44')]({'title':a7_0x579e('0x1a')+_0x410ff4['taskId']});}const _0x55c466=_0x3effad[a7_0x579e('0x16')](_0x2234a8=>_0x410ff4[a7_0x579e('0xf')]===_0x2234a8['id']);if(!_0x55c466){throw new Error('Found\x20unknown\x20task:\x20'+_0x410ff4[a7_0x579e('0xf')]);}if(environment_1['VERBOSE_LOGGING']){output[a7_0x579e('0x44')]({'title':a7_0x579e('0x41')+_0x410ff4[a7_0x579e('0x5c')]});}yield _0x579989[a7_0x579e('0x55')](_0x410ff4[a7_0x579e('0xb')],_0x410ff4[a7_0x579e('0x5c')],_0x47b5ea[a7_0x579e('0x19')]||a7_0x579e('0x20'));const _0x2edea7=yield _0x415853[a7_0x579e('0x3e')](Object[a7_0x579e('0xd')](Object[a7_0x579e('0xd')]({},_0x55c466),{'hash':_0x410ff4['hash']}));const _0x4ecc07=getOutputs(_0x23e088[a7_0x579e('0x4f')][a7_0x579e('0x3a')],_0x55c466);if(environment_1[a7_0x579e('0x27')]){output[a7_0x579e('0x44')]({'title':'Extracting\x20artifacts','bodyLines':_0x4ecc07});}yield _0x415853['copyFilesFromCache'](_0x410ff4['hash'],_0x2edea7,_0x4ecc07);output[a7_0x579e('0x3f')](getCommand(_0x55c466));process[a7_0x579e('0x30')]['write'](_0x2edea7[a7_0x579e('0x10')]);output[a7_0x579e('0x29')]();});}function getCommand(_0x53ad29){const _0x227a59=_0x53ad29['target']['configuration']?':'+_0x53ad29[a7_0x579e('0x23')][a7_0x579e('0x8')]:'';return['nx',a7_0x579e('0x6'),_0x53ad29[a7_0x579e('0x23')]['project']+':'+_0x53ad29[a7_0x579e('0x23')][a7_0x579e('0x23')]+_0x227a59,(0x0,serializer_overrides_1[a7_0x579e('0xa')])(_0x53ad29)]['join']('\x20');}function attachSignalListenersToCompleteRunGroupOnError(_0x1c955e,_0x1af6e7){process['on'](a7_0x579e('0x53'),()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x1c955e[a7_0x579e('0x2b')](_0x1af6e7,a7_0x579e('0x4a'));process[a7_0x579e('0x2')](0x1);}));process['on'](a7_0x579e('0xc'),()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x1c955e[a7_0x579e('0x2b')](_0x1af6e7,a7_0x579e('0x1f'));process['exit'](0x1);}));}const nxCloudDistributedTasksRunner=(_0x37251a,_0x379bd6,_0x1201d4)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output[a7_0x579e('0x44')]({'title':a7_0x579e('0x7')});}_0x379bd6['lifeCycle']=new NoopLifeCycle();const _0x349e05=(0x0,environment_1[a7_0x579e('0x2d')])();if(!_0x349e05){(0x0,print_run_group_error_1[a7_0x579e('0x2a')])();return process[a7_0x579e('0x2')](0x1);}const _0x2ab102=new e2e_encryption_1[(a7_0x579e('0x14'))](environment_1['ENCRYPTION_KEY']||_0x379bd6[a7_0x579e('0x17')]);const _0x356540=new error_reporter_api_1[(a7_0x579e('0x2c'))](_0x379bd6);const _0x5e5ccd=new file_storage_1[(a7_0x579e('0x4b'))](_0x2ab102,_0x356540,!![]);const _0x25fb2c=new Cache(_0x379bd6);const _0x51c8f9=new distributed_execution_api_1[(a7_0x579e('0x37'))](_0x379bd6);attachSignalListenersToCompleteRunGroupOnError(_0x51c8f9,_0x349e05);try{const _0x5045c2=getTaskGraph(_0x1201d4,_0x37251a,_0x379bd6);const _0x1c7490=yield runDistributedExecution(_0x51c8f9,_0x379bd6,_0x1201d4,_0x5e5ccd,_0x25fb2c,_0x349e05,_0x5045c2);if(_0x1c7490['commandStatus']===0x0){output['success']({'title':a7_0x579e('0x31'),'bodyLines':[a7_0x579e('0x0')+_0x1c7490['runUrl']]});}else{output[a7_0x579e('0x43')]({'title':'Command\x20execution\x20failed.','bodyLines':['See\x20run\x20details\x20at\x20'+_0x1c7490[a7_0x579e('0x3d')]]});}yield(0x0,metric_logger_1[a7_0x579e('0x50')])(_0x379bd6);process['exit'](_0x1c7490[a7_0x579e('0x26')]);}catch(_0x531443){output[a7_0x579e('0x43')]({'title':'Unable\x20to\x20complete\x20a\x20run.','bodyLines':[_0x531443[a7_0x579e('0x13')]]});if(_0x531443[a7_0x579e('0x4c')]){console[a7_0x579e('0x18')](_0x531443[a7_0x579e('0x4c')]);}else{console[a7_0x579e('0x18')](_0x531443);}try{yield _0x51c8f9['completeRunGroupWithError'](_0x349e05,a7_0x579e('0x4e')+_0x531443[a7_0x579e('0x13')]+'\x22');}finally{process[a7_0x579e('0x2')](0x1);}}});exports['nxCloudDistributedTasksRunner']=nxCloudDistributedTasksRunner;function getTaskGraph(_0xaa324e,_0x5889aa,_0x5e6aca){if(_0xaa324e[a7_0x579e('0xe')]){return _0xaa324e[a7_0x579e('0xe')];}else{const _0xf97b95=JSON[a7_0x579e('0x36')](stripJsonComments((0x0,fs_1[a7_0x579e('0x4d')])(workspaceRoot+a7_0x579e('0x11'))['toString']()));return new task_graph_creator_1[(a7_0x579e('0x25'))](_0xaa324e[a7_0x579e('0x4f')],getDefaultDependencyConfigs(_0xf97b95,_0x5e6aca))[a7_0x579e('0x5b')](_0x5889aa);}}function getDefaultDependencyConfigs(_0x57c8ff,_0x500aa2){var _0x5c8b6d,_0x43a563;const _0x623b44=(_0x5c8b6d=_0x57c8ff[a7_0x579e('0x52')])!==null&&_0x5c8b6d!==void 0x0?_0x5c8b6d:{};const _0x241115=_0x500aa2?(_0x43a563=_0x500aa2[a7_0x579e('0x1')])!==null&&_0x43a563!==void 0x0?_0x43a563:[a7_0x579e('0x5d')]:[];for(const _0x55505f of _0x241115){_0x623b44[_0x55505f]=_0x623b44[_0x55505f]||[];_0x623b44[_0x55505f][a7_0x579e('0x54')]({'target':_0x55505f,'projects':a7_0x579e('0x1d')});}return _0x623b44;}
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.nxCloudDistributedTasksRunner = void 0;
13
+ const fs_1 = require("fs");
14
+ const stripJsonComments = require("strip-json-comments");
15
+ const create_unchanged_value_timeout_1 = require("../../../utilities/create-unchanged-value-timeout");
16
+ const environment_1 = require("../../../utilities/environment");
17
+ const metric_logger_1 = require("../../../utilities/metric-logger");
18
+ const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
19
+ const waiter_1 = require("../../../utilities/waiter");
20
+ const error_reporter_api_1 = require("../../api/error-reporter.api");
21
+ const print_run_group_error_1 = require("../../error/print-run-group-error");
22
+ const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
23
+ const file_storage_1 = require("../../file-storage/file-storage");
24
+ const distributed_execution_api_1 = require("./distributed-execution.api");
25
+ const split_task_graph_into_stages_1 = require("./split-task-graph-into-stages");
26
+ const task_graph_creator_1 = require("./task-graph-creator");
27
+ const { output, workspaceRoot, getOutputs, Cache, } = require('../../../utilities/nx-imports');
28
+ class NoopLifeCycle {
29
+ scheduleTask(task) { }
30
+ startTask(task) { }
31
+ endTask(task, code) { }
32
+ }
33
+ function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, (0, split_task_graph_into_stages_1.splitTasksIntoStages)(taskGraph), options));
36
+ return yield processTasks(api, fileStorage, cache, options, id, Object.values(taskGraph.tasks), context);
37
+ });
38
+ }
39
+ function processTasks(api, fileStorage, cache, options, executionId, tasks, context) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const processedTasks = {};
42
+ const failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout = (0, create_unchanged_value_timeout_1.createUnchangedValueTimeout)({
43
+ title: `No new completed tasks after ${environment_1.NO_COMPLETED_TASKS_TIMEOUT / 1000} seconds.`,
44
+ timeout: environment_1.NO_COMPLETED_TASKS_TIMEOUT,
45
+ });
46
+ const waiter = new waiter_1.Waiter();
47
+ while (true) {
48
+ if (environment_1.VERBOSE_LOGGING) {
49
+ output.note({
50
+ title: 'Waiting...',
51
+ });
52
+ }
53
+ yield waiter.wait();
54
+ const r = yield api.status(executionId);
55
+ if (environment_1.VERBOSE_LOGGING) {
56
+ output.note({
57
+ title: `Status update`,
58
+ bodyLines: [
59
+ `executionId: ${executionId}`,
60
+ `executionStatus: ${r.executionStatus}`,
61
+ `number of completed tasks: ${r.completedTasks.length}`,
62
+ `error: ${r.criticalErrorMessage}`,
63
+ ],
64
+ });
65
+ }
66
+ if (r.criticalErrorMessage) {
67
+ output.error({
68
+ title: 'Distributed Execution Terminated',
69
+ bodyLines: ['Error:', r.criticalErrorMessage],
70
+ });
71
+ process.exit(1);
72
+ }
73
+ failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout(r.completedTasks.length);
74
+ for (const t of r.completedTasks) {
75
+ if (processedTasks[t.taskId])
76
+ continue;
77
+ yield processTask(fileStorage, cache, context, options, tasks, t);
78
+ waiter.reset();
79
+ processedTasks[t.taskId] = true;
80
+ }
81
+ if (r.executionStatus === 'COMPLETED') {
82
+ return { commandStatus: r.commandStatus, runUrl: r.runUrl };
83
+ }
84
+ }
85
+ });
86
+ }
87
+ function processTask(fileStorage, cache, context, options, tasks, completedTask) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (environment_1.VERBOSE_LOGGING) {
90
+ output.note({
91
+ title: `Processing task ${completedTask.taskId}`,
92
+ });
93
+ }
94
+ const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
95
+ if (!matchingTask) {
96
+ throw new Error(`Found unknown task: ${completedTask.taskId}`);
97
+ }
98
+ if (environment_1.VERBOSE_LOGGING) {
99
+ output.note({
100
+ title: `Retrieving artifacts from ${completedTask.url}`,
101
+ });
102
+ }
103
+ yield fileStorage.retrieve(completedTask.hash, completedTask.url, options.cacheDirectory || './node_modules/.cache/nx');
104
+ const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
105
+ const outputs = getOutputs(context.projectGraph.nodes, matchingTask);
106
+ if (environment_1.VERBOSE_LOGGING) {
107
+ output.note({
108
+ title: `Extracting artifacts`,
109
+ bodyLines: outputs,
110
+ });
111
+ }
112
+ yield cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
113
+ output.logCommand(getCommand(matchingTask));
114
+ process.stdout.write(cachedResult.terminalOutput);
115
+ output.addVerticalSeparator();
116
+ });
117
+ }
118
+ function getCommand(task) {
119
+ const config = task.target.configuration
120
+ ? `:${task.target.configuration}`
121
+ : '';
122
+ return [
123
+ 'nx',
124
+ 'run',
125
+ `${task.target.project}:${task.target.target}${config}`,
126
+ (0, serializer_overrides_1.serializeOverrides)(task),
127
+ ].join(' ');
128
+ }
129
+ function attachSignalListenersToCompleteRunGroupOnError(api, runGroup) {
130
+ process.on('SIGINT', () => __awaiter(this, void 0, void 0, function* () {
131
+ yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGINT');
132
+ process.exit(1);
133
+ }));
134
+ process.on('SIGTERM', () => __awaiter(this, void 0, void 0, function* () {
135
+ yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGTERM');
136
+ process.exit(1);
137
+ }));
138
+ }
139
+ const nxCloudDistributedTasksRunner = (tasks, options, context) => __awaiter(void 0, void 0, void 0, function* () {
140
+ if (environment_1.VERBOSE_LOGGING) {
141
+ output.note({
142
+ title: 'Starting distributed command execution',
143
+ });
144
+ }
145
+ options.lifeCycle = new NoopLifeCycle();
146
+ const runGroup = (0, environment_1.getRunGroup)();
147
+ if (!runGroup) {
148
+ (0, print_run_group_error_1.printRunGroupError)();
149
+ return process.exit(1);
150
+ }
151
+ const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
152
+ const errorReporter = new error_reporter_api_1.ErrorReporterApi(options);
153
+ const fileStorage = new file_storage_1.FileStorage(encryption, errorReporter, true, false);
154
+ const cache = new Cache(options);
155
+ const api = new distributed_execution_api_1.DistributedExecutionApi(options);
156
+ attachSignalListenersToCompleteRunGroupOnError(api, runGroup);
157
+ try {
158
+ const taskGraph = getTaskGraph(context, tasks, options);
159
+ const r = yield runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph);
160
+ if (r.commandStatus === 0) {
161
+ output.success({
162
+ title: 'Successfully completed running the command.',
163
+ bodyLines: [`See run details at ${r.runUrl}`],
164
+ });
165
+ }
166
+ else {
167
+ output.error({
168
+ title: 'Command execution failed.',
169
+ bodyLines: [`See run details at ${r.runUrl}`],
170
+ });
171
+ }
172
+ yield (0, metric_logger_1.submitRunMetrics)(options);
173
+ process.exit(r.commandStatus);
174
+ }
175
+ catch (e) {
176
+ output.error({
177
+ title: 'Unable to complete a run.',
178
+ bodyLines: [e.message],
179
+ });
180
+ if (e.axiosException) {
181
+ console.log(e.axiosException);
182
+ }
183
+ else {
184
+ console.log(e);
185
+ }
186
+ try {
187
+ yield api.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`);
188
+ }
189
+ finally {
190
+ process.exit(1);
191
+ }
192
+ }
193
+ });
194
+ exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
195
+ function getTaskGraph(context, tasks, options) {
196
+ if (context.taskGraph) {
197
+ return context.taskGraph;
198
+ }
199
+ else {
200
+ const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString()));
201
+ return new task_graph_creator_1.TaskGraphCreator(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).createTaskGraph(tasks);
202
+ }
203
+ }
204
+ function getDefaultDependencyConfigs(nxJson, runnerOptions) {
205
+ var _a, _b;
206
+ const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
207
+ const strictlyOrderedTargets = runnerOptions
208
+ ? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
209
+ : [];
210
+ // Strictly Ordered Targets depend on their dependencies
211
+ for (const target of strictlyOrderedTargets) {
212
+ defaults[target] = defaults[target] || [];
213
+ defaults[target].push({
214
+ target,
215
+ projects: 'dependencies',
216
+ });
217
+ }
218
+ return defaults;
219
+ }
220
+ //# sourceMappingURL=distributed-execution.runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,yDAAyD;AACzD,sGAAgG;AAChG,gEAKwC;AACxC,oEAAoE;AACpE,kFAA6E;AAC7E,sDAAmD;AACnD,qEAAgE;AAChE,6EAAuE;AACvE,sEAAkE;AAClE,kEAA8D;AAG9D,2EAGqC;AACrC,iFAAsE;AACtE,6DAAwD;AAExD,MAAM,EACJ,MAAM,EACN,aAAa,EACb,UAA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AAC,CAAC,IAAI,CAAC;YACpB,MAAM;YACN,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,yDAAyD;AACzD,sGAAgG;AAChG,gEAKwC;AACxC,oEAAoE;AACpE,kFAA6E;AAC7E,sDAAmD;AACnD,qEAAgE;AAChE,6EAAuE;AACvE,sEAAkE;AAClE,kEAA8D;AAG9D,2EAGqC;AACrC,iFAAsE;AACtE,6DAAwD;AAExD,MAAM,EACJ,MAAM,EACN,aAAa,EACb,UAAU,EACV,KAAK,GACN,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AAY7C,MAAM,aAAa;IACjB,YAAY,CAAC,IAAU,IAAS,CAAC;IAEjC,SAAS,CAAC,IAAU,IAAS,CAAC;IAE9B,OAAO,CAAC,IAAU,EAAE,IAAY,IAAS,CAAC;CAC3C;AAED,SAAe,uBAAuB,CACpC,GAA4B,EAC5B,OAA+B,EAC/B,OAAY,EACZ,WAAwB,EACxB,KAAY,EACZ,QAAgB,EAChB,SAAoB;;QAEpB,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,CACxB,IAAA,8CAAkB,EAAC,QAAQ,EAAE,IAAA,mDAAoB,EAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CACvE,CAAC;QACF,OAAO,MAAM,YAAY,CACvB,GAAG,EACH,WAAW,EACX,KAAK,EACL,OAAO,EACP,EAAE,EACF,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAC9B,OAAO,CACR,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,YAAY,CACzB,GAA4B,EAC5B,WAAwB,EACxB,KAAY,EACZ,OAA+B,EAC/B,WAAm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EACpB,2BAA2B,CAAC,MAAM,EAAE,OAAc,CAAC,CACpD,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAC1B;AACH,CAAC;AAED,SAAS,2BAA2B,CAClC,MAAW,EACX,aAEC;;IAED,MAAM,QAAQ,GAA0B,MAAA,MAAM,CAAC,kBAAkB,mCAAI,EAAE,CAAC;IACxE,MAAM,sBAAsB,GAAG,aAAa;QAC1C,CAAC,CAAC,MAAA,aAAa,CAAC,sBAAsB,mCAAI,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC;IACP,wDAAwD;IACxD,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE;QAC3C,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACpB,MAAM;YACN,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1 +1,37 @@
1
- const a8_0x5022=['values','tasks','size','dependencies','__esModule','defineProperty','delete','push','splitTasksIntoStages'];(function(_0x43a1ea,_0x5022d3){const _0x426540=function(_0x121bca){while(--_0x121bca){_0x43a1ea['push'](_0x43a1ea['shift']());}};_0x426540(++_0x5022d3);}(a8_0x5022,0x180));const a8_0x4265=function(_0x43a1ea,_0x5022d3){_0x43a1ea=_0x43a1ea-0x0;let _0x426540=a8_0x5022[_0x43a1ea];return _0x426540;};'use strict';Object[a8_0x4265('0x8')](exports,a8_0x4265('0x7'),{'value':!![]});exports[a8_0x4265('0x2')]=void 0x0;function splitTasksIntoStages(_0x1a38a9){const _0xc7aa31=[];const _0x5d0a33=new Set(Object[a8_0x4265('0x3')](_0x1a38a9['tasks'])['map'](_0x41987d=>_0x41987d['id']));let _0x463c98=0x0;while(_0x5d0a33[a8_0x4265('0x5')]>0x0){const _0x5ea821=_0xc7aa31[_0x463c98]=[];for(const _0x515391 of _0x5d0a33){let _0x51a4a5=!![];for(const _0x5319a5 of _0x1a38a9[a8_0x4265('0x6')][_0x515391]){if(_0x5d0a33['has'](_0x5319a5)){_0x51a4a5=![];break;}}if(!_0x51a4a5){continue;}const _0x470b1d=_0x1a38a9[a8_0x4265('0x4')][_0x515391];_0x5ea821[a8_0x4265('0x1')](_0x470b1d);}for(const _0x422088 of _0x5ea821){_0x5d0a33[a8_0x4265('0x0')](_0x422088['id']);}_0x463c98++;}return _0xc7aa31;}exports[a8_0x4265('0x2')]=splitTasksIntoStages;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.splitTasksIntoStages = void 0;
4
+ function splitTasksIntoStages(taskGraph) {
5
+ const stages = [];
6
+ const notStagedTaskIds = new Set(Object.values(taskGraph.tasks).map((t) => t.id));
7
+ let stageIndex = 0;
8
+ // Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
9
+ while (notStagedTaskIds.size > 0) {
10
+ const currentStage = (stages[stageIndex] = []);
11
+ for (const taskId of notStagedTaskIds) {
12
+ let ready = true;
13
+ for (const dependency of taskGraph.dependencies[taskId]) {
14
+ if (notStagedTaskIds.has(dependency)) {
15
+ // dependency has not been staged yet, this task is not ready to be staged.
16
+ ready = false;
17
+ break;
18
+ }
19
+ }
20
+ // Some dependency still has not been staged, skip it for now, it will be processed again
21
+ if (!ready) {
22
+ continue;
23
+ }
24
+ // All the dependencies have been staged, let's stage it.
25
+ const task = taskGraph.tasks[taskId];
26
+ currentStage.push(task);
27
+ }
28
+ // Remove the entire new stage of tasks from the list
29
+ for (const task of currentStage) {
30
+ notStagedTaskIds.delete(task.id);
31
+ }
32
+ stageIndex++;
33
+ }
34
+ return stages;
35
+ }
36
+ exports.splitTasksIntoStages = splitTasksIntoStages;
37
+ //# sourceMappingURL=split-task-graph-into-stages.js.map
@@ -1 +1,77 @@
1
- const a9_0xd4b8=['tasks','createTaskGraph','has','target','add','addTaskDependencies','__esModule','map','indexOf','../../../utilities/nx-imports','findTask','projects','roots','self','dependencies','addTaskToGraph','filter','TaskGraphCreator','push','addDependencies','project','projectGraph','defaultTargetDependencies'];(function(_0x481fe0,_0xd4b8be){const _0x2a6541=function(_0x5e086f){while(--_0x5e086f){_0x481fe0['push'](_0x481fe0['shift']());}};_0x2a6541(++_0xd4b8be);}(a9_0xd4b8,0x193));const a9_0x2a65=function(_0x481fe0,_0xd4b8be){_0x481fe0=_0x481fe0-0x0;let _0x2a6541=a9_0xd4b8[_0x481fe0];return _0x2a6541;};'use strict';Object['defineProperty'](exports,a9_0x2a65('0x11'),{'value':!![]});exports['TaskGraphCreator']=void 0x0;const {getDependencyConfigs}=require(a9_0x2a65('0x14'));class TaskGraphCreator{constructor(_0x472d8b,_0x5cd102){this['projectGraph']=_0x472d8b;this[a9_0x2a65('0xa')]=_0x5cd102;}[a9_0x2a65('0xc')](_0x34afdb){const _0x26ef77={'roots':[],'tasks':{},'dependencies':{}};for(const _0xc5bfab of _0x34afdb){this[a9_0x2a65('0x3')](_0xc5bfab,_0x26ef77);const _0x10a8a6=getDependencyConfigs(_0xc5bfab['target'],this['defaultTargetDependencies'],this[a9_0x2a65('0x9')]);if(!_0x10a8a6){continue;}this[a9_0x2a65('0x10')](_0xc5bfab,_0x10a8a6,_0x34afdb,_0x26ef77);}_0x26ef77[a9_0x2a65('0x0')]=Object['keys'](_0x26ef77['dependencies'])[a9_0x2a65('0x4')](_0x5eaf15=>_0x26ef77['dependencies'][_0x5eaf15]['length']===0x0);return _0x26ef77;}[a9_0x2a65('0x10')](_0x239154,_0x58e49b,_0x1fa536,_0x24ae59){for(const _0x334bb9 of _0x58e49b){if(_0x334bb9[a9_0x2a65('0x16')]===a9_0x2a65('0x1')){for(const _0x53edf5 of _0x1fa536){if(_0x53edf5[a9_0x2a65('0xe')][a9_0x2a65('0x8')]===_0x239154['target'][a9_0x2a65('0x8')]&&_0x53edf5[a9_0x2a65('0xe')][a9_0x2a65('0xe')]===_0x334bb9[a9_0x2a65('0xe')]){_0x24ae59[a9_0x2a65('0x2')][_0x239154['id']][a9_0x2a65('0x6')](_0x53edf5['id']);}}}else if(_0x334bb9[a9_0x2a65('0x16')]===a9_0x2a65('0x2')){const _0x506910=new Set();this[a9_0x2a65('0x7')](_0x239154[a9_0x2a65('0xe')]['project'],_0x334bb9[a9_0x2a65('0xe')],_0x1fa536,_0x24ae59,_0x239154['id'],_0x506910);}}}[a9_0x2a65('0x7')](_0x5e9460,_0x4a1a50,_0x4203df,_0x434248,_0x58b635,_0x118541){_0x118541[a9_0x2a65('0xf')](_0x5e9460);const _0x95177d=this['projectGraph'][a9_0x2a65('0x2')][_0x5e9460];if(_0x95177d){const _0xf6bb5e=_0x95177d[a9_0x2a65('0x12')](_0x252afe=>_0x252afe[a9_0x2a65('0xe')]);for(const _0x143dee of _0xf6bb5e){if(_0x118541[a9_0x2a65('0xd')](_0x143dee)){continue;}const _0x270076=this[a9_0x2a65('0x15')]({'project':_0x143dee,'target':_0x4a1a50},_0x4203df);if(_0x270076){if(_0x434248[a9_0x2a65('0x2')][_0x58b635][a9_0x2a65('0x13')](_0x270076['id'])===-0x1){_0x434248['dependencies'][_0x58b635][a9_0x2a65('0x6')](_0x270076['id']);}}else{this[a9_0x2a65('0x7')](_0x143dee,_0x4a1a50,_0x4203df,_0x434248,_0x58b635,_0x118541);}}}}['findTask']({project,target},_0x3141aa){return _0x3141aa['find'](_0x19125c=>_0x19125c[a9_0x2a65('0xe')][a9_0x2a65('0x8')]===project&&_0x19125c[a9_0x2a65('0xe')]['target']===target);}[a9_0x2a65('0x3')](_0x13f846,_0x1d7d8f){_0x1d7d8f[a9_0x2a65('0xb')][_0x13f846['id']]=_0x13f846;_0x1d7d8f[a9_0x2a65('0x2')][_0x13f846['id']]=[];}}exports[a9_0x2a65('0x5')]=TaskGraphCreator;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskGraphCreator = void 0;
4
+ const { getDependencyConfigs } = require('../../../utilities/nx-imports');
5
+ /**
6
+ * This is only used for versions of Nx prior to 14 where the task graph
7
+ * wasn't part of the context so we have to recreate it
8
+ */
9
+ class TaskGraphCreator {
10
+ constructor(projectGraph, defaultTargetDependencies) {
11
+ this.projectGraph = projectGraph;
12
+ this.defaultTargetDependencies = defaultTargetDependencies;
13
+ }
14
+ createTaskGraph(tasks) {
15
+ const graph = {
16
+ roots: [],
17
+ tasks: {},
18
+ dependencies: {},
19
+ };
20
+ for (const task of tasks) {
21
+ this.addTaskToGraph(task, graph);
22
+ const dependencyConfigs = getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
23
+ if (!dependencyConfigs) {
24
+ continue;
25
+ }
26
+ this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
27
+ }
28
+ graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
29
+ return graph;
30
+ }
31
+ addTaskDependencies(task, dependencyConfigs, tasks, graph) {
32
+ for (const dependencyConfig of dependencyConfigs) {
33
+ if (dependencyConfig.projects === 'self') {
34
+ for (const t of tasks) {
35
+ if (t.target.project === task.target.project &&
36
+ t.target.target === dependencyConfig.target) {
37
+ graph.dependencies[task.id].push(t.id);
38
+ }
39
+ }
40
+ }
41
+ else if (dependencyConfig.projects === 'dependencies') {
42
+ const seen = new Set();
43
+ this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
44
+ }
45
+ }
46
+ }
47
+ addDependencies(project, target, tasks, graph, taskId, seen) {
48
+ seen.add(project);
49
+ const dependencies = this.projectGraph.dependencies[project];
50
+ if (dependencies) {
51
+ const projectDependencies = dependencies.map((dependency) => dependency.target);
52
+ for (const projectDependency of projectDependencies) {
53
+ if (seen.has(projectDependency)) {
54
+ continue;
55
+ }
56
+ const dependency = this.findTask({ project: projectDependency, target }, tasks);
57
+ if (dependency) {
58
+ if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
59
+ graph.dependencies[taskId].push(dependency.id);
60
+ }
61
+ }
62
+ else {
63
+ this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
64
+ }
65
+ }
66
+ }
67
+ }
68
+ findTask({ project, target }, tasks) {
69
+ return tasks.find((t) => t.target.project === project && t.target.target === target);
70
+ }
71
+ addTaskToGraph(task, graph) {
72
+ graph.tasks[task.id] = task;
73
+ graph.dependencies[task.id] = [];
74
+ }
75
+ }
76
+ exports.TaskGraphCreator = TaskGraphCreator;
77
+ //# sourceMappingURL=task-graph-creator.js.map
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EndOfRunMessage = void 0;
4
4
  const environment_1 = require("../../utilities/environment");
5
5
  const print_message_1 = require("../../utilities/print-message");
6
- const chalk = require('chalk');
7
6
  class EndOfRunMessage {
8
7
  constructor(runContext, taskExecutions) {
9
8
  this.runContext = runContext;
@@ -1 +1 @@
1
- {"version":3,"file":"end-of-run-message.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/terminal-output/end-of-run-message.ts"],"names":[],"mappings":";;;AAEA,6DAAqF;AACrF,iEAA6D;AAE7D,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B,MAAa,eAAe;IAC1B,YACmB,UAAsB,EACtB,cAA+B;QAD/B,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAiB;IAC/C,CAAC;IAEJ,qBAAqB;QACnB,IAAI,oDAAsC;YAAE,OAAO;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc;aAC7B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,kBAAkB,CAAC;aACtE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAE7B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YAChD,OAAO;SACR;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,QAAQ,CAAC;QACnE,MAAM,OAAO,GAAG,EAAW,CAAC;QAC5B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO,CAAC,IAAI,CACV,sCAAsC,KAAK,GACzC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAC3D,EAAE,CACH,CAAC;SACH;aAAM;YACL,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAC1B,OAAO,CAAC,IAAI,CAAC,+BAA+B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;aACvE;SACF;QACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACtB,IAAA,4BAAY,EAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SACjC;IACH,CAAC;CACF;AAlCD,0CAkCC"}
1
+ {"version":3,"file":"end-of-run-message.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/terminal-output/end-of-run-message.ts"],"names":[],"mappings":";;;AAEA,6DAAqF;AACrF,iEAA6D;AAE7D,MAAa,eAAe;IAC1B,YACmB,UAAsB,EACtB,cAA+B;QAD/B,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAiB;IAC/C,CAAC;IAEJ,qBAAqB;QACnB,IAAI,oDAAsC;YAAE,OAAO;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc;aAC7B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,I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