@nrwl/nx-cloud 14.0.4-beta.2 → 14.0.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/lib/core/api/run-group.api.js +1 -65
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +1 -141
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -167
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -113
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -158
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -79
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +1 -239
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -130
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -309
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/lib/utilities/print-message.js +40 -11
- package/lib/utilities/print-message.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,130 +1 @@
|
|
|
1
|
-
|
|
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 { output, unparse } = require('../../../utilities/nx-imports');
|
|
17
|
-
class DistributedExecutionApi {
|
|
18
|
-
constructor(options) {
|
|
19
|
-
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
20
|
-
}
|
|
21
|
-
start(params) {
|
|
22
|
-
var _a;
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStart');
|
|
25
|
-
let resp;
|
|
26
|
-
try {
|
|
27
|
-
resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/start', params));
|
|
28
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
32
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
33
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
34
|
-
throw e;
|
|
35
|
-
}
|
|
36
|
-
if (!resp.data.enabled) {
|
|
37
|
-
throw new Error(`Workspace is disabled. Cannot perform distributed task executions.`);
|
|
38
|
-
}
|
|
39
|
-
if (resp.data.error) {
|
|
40
|
-
throw new Error(resp.data.error);
|
|
41
|
-
}
|
|
42
|
-
return resp.data.id;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
status(id) {
|
|
46
|
-
var _a;
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('dteStatus');
|
|
49
|
-
try {
|
|
50
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/status', {
|
|
51
|
-
id,
|
|
52
|
-
}));
|
|
53
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
54
|
-
return resp.data;
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
58
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
59
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
60
|
-
output.error({
|
|
61
|
-
title: e.message,
|
|
62
|
-
});
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
completeRunGroupWithError(runGroup, error) {
|
|
68
|
-
var _a;
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('completeRunGroup');
|
|
71
|
-
try {
|
|
72
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
73
|
-
runGroup: runGroup,
|
|
74
|
-
criticalErrorMessage: error,
|
|
75
|
-
}), 3);
|
|
76
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
77
|
-
}
|
|
78
|
-
catch (e) {
|
|
79
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
80
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
81
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.DistributedExecutionApi = DistributedExecutionApi;
|
|
87
|
-
function createStartRequest(runGroup, task, options) {
|
|
88
|
-
const tasksToExecute = task.map((arr) => {
|
|
89
|
-
return arr.map((t) => {
|
|
90
|
-
return {
|
|
91
|
-
taskId: t.id,
|
|
92
|
-
hash: t.hash,
|
|
93
|
-
projectName: t.target.project,
|
|
94
|
-
target: t.target.target,
|
|
95
|
-
configuration: t.target.configuration || null,
|
|
96
|
-
params: unparse(t.overrides).join(' '),
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
const request = {
|
|
101
|
-
command: (0, environment_1.parseCommand)(),
|
|
102
|
-
branch: (0, environment_1.getBranch)(),
|
|
103
|
-
runGroup,
|
|
104
|
-
tasks: tasksToExecute,
|
|
105
|
-
maxParallel: calculateMaxParallel(options),
|
|
106
|
-
};
|
|
107
|
-
if (environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT) {
|
|
108
|
-
request.agentCount = environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT;
|
|
109
|
-
}
|
|
110
|
-
if (!environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE) {
|
|
111
|
-
request.stopAgentsOnFailure = false;
|
|
112
|
-
}
|
|
113
|
-
return request;
|
|
114
|
-
}
|
|
115
|
-
exports.createStartRequest = createStartRequest;
|
|
116
|
-
function calculateMaxParallel(options) {
|
|
117
|
-
if (options.parallel === 'false' || options.parallel === false) {
|
|
118
|
-
return 1;
|
|
119
|
-
}
|
|
120
|
-
else if (options.parallel === 'true' || options.parallel === true) {
|
|
121
|
-
return Number(options.maxParallel || 3);
|
|
122
|
-
}
|
|
123
|
-
else if (options.parallel === undefined) {
|
|
124
|
-
return options.maxParallel ? Number(options.maxParallel) : 3;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
return Number(options.parallel) || 3;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=distributed-execution.api.js.map
|
|
1
|
+
const a6_0x29c3=['target','apply','value','join','status','../../../utilities/metric-logger','then','mapRespToPerfEntry','next','createMetricRecorder','/nx-cloud/executions/start','project','../../../utilities/nx-imports','stopAgentsOnFailure','axiosException','message','throw','dteStatus','data','Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.','defineProperty','apiAxiosInstance','recordMetric','RUNNER_FAILURE_PERF_ENTRY','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','parseCommand','DistributedExecutionApi','/nx-cloud/executions/status','post','getBranch','completeRunGroup','response','map','maxParallel','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','axiosMultipleTries','done','__esModule','completeRunGroupWithError','error','true','__awaiter','parallel','exit','start'];(function(_0x3b8619,_0x29c3c7){const _0x4b8b2c=function(_0x279801){while(--_0x279801){_0x3b8619['push'](_0x3b8619['shift']());}};_0x4b8b2c(++_0x29c3c7);}(a6_0x29c3,0x15e));const a6_0x4b8b=function(_0x3b8619,_0x29c3c7){_0x3b8619=_0x3b8619-0x0;let _0x4b8b2c=a6_0x29c3[_0x3b8619];return _0x4b8b2c;};'use strict';var __awaiter=this&&this[a6_0x4b8b('0x6')]||function(_0x407b6d,_0x180953,_0x201a15,_0x53feb6){function _0xdbdea0(_0x37163e){return _0x37163e instanceof _0x201a15?_0x37163e:new _0x201a15(function(_0x1c830c){_0x1c830c(_0x37163e);});}return new(_0x201a15||(_0x201a15=Promise))(function(_0x449614,_0x8ece6){function _0x431e6d(_0x504b84){try{_0x287417(_0x53feb6[a6_0x4b8b('0x12')](_0x504b84));}catch(_0x497388){_0x8ece6(_0x497388);}}function _0x228921(_0x3245d3){try{_0x287417(_0x53feb6[a6_0x4b8b('0x1a')](_0x3245d3));}catch(_0x5db920){_0x8ece6(_0x5db920);}}function _0x287417(_0x1f815c){_0x1f815c[a6_0x4b8b('0x1')]?_0x449614(_0x1f815c[a6_0x4b8b('0xc')]):_0xdbdea0(_0x1f815c[a6_0x4b8b('0xc')])[a6_0x4b8b('0x10')](_0x431e6d,_0x228921);}_0x287417((_0x53feb6=_0x53feb6[a6_0x4b8b('0xb')](_0x407b6d,_0x180953||[]))[a6_0x4b8b('0x12')]());});};Object[a6_0x4b8b('0x1e')](exports,a6_0x4b8b('0x2'),{'value':!![]});exports['createStartRequest']=exports[a6_0x4b8b('0x24')]=void 0x0;const axios_1=require('../../../utilities/axios');const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a6_0x4b8b('0xf'));const {output,unparse}=require(a6_0x4b8b('0x16'));class DistributedExecutionApi{constructor(_0x20fa9f){this['apiAxiosInstance']=(0x0,axios_1['createApiAxiosInstance'])(_0x20fa9f);}[a6_0x4b8b('0x9')](_0x46a09b){var _0x41e071;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5189b5=(0x0,metric_logger_1[a6_0x4b8b('0x13')])('dteStart');let _0x3cad43;try{_0x3cad43=yield(0x0,axios_1[a6_0x4b8b('0x0')])(()=>this[a6_0x4b8b('0x1f')]['post'](a6_0x4b8b('0x14'),_0x46a09b));_0x5189b5[a6_0x4b8b('0x20')]((0x0,metric_logger_1[a6_0x4b8b('0x11')])(_0x3cad43));}catch(_0x1adb92){_0x5189b5[a6_0x4b8b('0x20')](((_0x41e071=_0x1adb92===null||_0x1adb92===void 0x0?void 0x0:_0x1adb92[a6_0x4b8b('0x18')])===null||_0x41e071===void 0x0?void 0x0:_0x41e071[a6_0x4b8b('0x29')])?(0x0,metric_logger_1[a6_0x4b8b('0x11')])(_0x1adb92['axiosException'][a6_0x4b8b('0x29')]):metric_logger_1[a6_0x4b8b('0x21')]);throw _0x1adb92;}if(!_0x3cad43[a6_0x4b8b('0x1c')]['enabled']){throw new Error(a6_0x4b8b('0x1d'));}if(_0x3cad43[a6_0x4b8b('0x1c')][a6_0x4b8b('0x4')]){throw new Error(_0x3cad43['data']['error']);}return _0x3cad43[a6_0x4b8b('0x1c')]['id'];});}[a6_0x4b8b('0xe')](_0x53c0ec){var _0x3bc9af;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x41edea=(0x0,metric_logger_1['createMetricRecorder'])(a6_0x4b8b('0x1b'));try{const _0xd0d28f=yield(0x0,axios_1[a6_0x4b8b('0x0')])(()=>this[a6_0x4b8b('0x1f')][a6_0x4b8b('0x26')](a6_0x4b8b('0x25'),{'id':_0x53c0ec}));_0x41edea[a6_0x4b8b('0x20')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0xd0d28f));return _0xd0d28f[a6_0x4b8b('0x1c')];}catch(_0x38cfa0){_0x41edea[a6_0x4b8b('0x20')](((_0x3bc9af=_0x38cfa0===null||_0x38cfa0===void 0x0?void 0x0:_0x38cfa0[a6_0x4b8b('0x18')])===null||_0x3bc9af===void 0x0?void 0x0:_0x3bc9af['response'])?(0x0,metric_logger_1[a6_0x4b8b('0x11')])(_0x38cfa0[a6_0x4b8b('0x18')]['response']):metric_logger_1[a6_0x4b8b('0x21')]);output[a6_0x4b8b('0x4')]({'title':_0x38cfa0[a6_0x4b8b('0x19')]});process[a6_0x4b8b('0x8')](0x1);}});}[a6_0x4b8b('0x3')](_0x3f8831,_0x17c509){var _0x14daba;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x6f0561=(0x0,metric_logger_1['createMetricRecorder'])(a6_0x4b8b('0x28'));try{const _0x2862b9=yield(0x0,axios_1[a6_0x4b8b('0x0')])(()=>this[a6_0x4b8b('0x1f')][a6_0x4b8b('0x26')]('/nx-cloud/executions/complete-run-group',{'runGroup':_0x3f8831,'criticalErrorMessage':_0x17c509}),0x3);_0x6f0561[a6_0x4b8b('0x20')]((0x0,metric_logger_1[a6_0x4b8b('0x11')])(_0x2862b9));}catch(_0xde1497){_0x6f0561[a6_0x4b8b('0x20')](((_0x14daba=_0xde1497===null||_0xde1497===void 0x0?void 0x0:_0xde1497[a6_0x4b8b('0x18')])===null||_0x14daba===void 0x0?void 0x0:_0x14daba[a6_0x4b8b('0x29')])?(0x0,metric_logger_1[a6_0x4b8b('0x11')])(_0xde1497[a6_0x4b8b('0x18')][a6_0x4b8b('0x29')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);}});}}exports[a6_0x4b8b('0x24')]=DistributedExecutionApi;function createStartRequest(_0x5b5f71,_0x3274de,_0x3956ca){const _0x531b87=_0x3274de['map'](_0x1609b7=>{return _0x1609b7[a6_0x4b8b('0x2a')](_0x3734e8=>{return{'taskId':_0x3734e8['id'],'hash':_0x3734e8['hash'],'projectName':_0x3734e8[a6_0x4b8b('0xa')][a6_0x4b8b('0x15')],'target':_0x3734e8[a6_0x4b8b('0xa')][a6_0x4b8b('0xa')],'configuration':_0x3734e8['target']['configuration']||null,'params':unparse(_0x3734e8['overrides'])[a6_0x4b8b('0xd')]('\x20')};});});const _0x270b9a={'command':(0x0,environment_1[a6_0x4b8b('0x23')])(),'branch':(0x0,environment_1[a6_0x4b8b('0x27')])(),'runGroup':_0x5b5f71,'tasks':_0x531b87,'maxParallel':calculateMaxParallel(_0x3956ca)};if(environment_1[a6_0x4b8b('0x2c')]){_0x270b9a['agentCount']=environment_1[a6_0x4b8b('0x2c')];}if(!environment_1[a6_0x4b8b('0x22')]){_0x270b9a[a6_0x4b8b('0x17')]=![];}return _0x270b9a;}exports['createStartRequest']=createStartRequest;function calculateMaxParallel(_0x496534){if(_0x496534[a6_0x4b8b('0x7')]==='false'||_0x496534[a6_0x4b8b('0x7')]===![]){return 0x1;}else if(_0x496534[a6_0x4b8b('0x7')]===a6_0x4b8b('0x5')||_0x496534[a6_0x4b8b('0x7')]===!![]){return Number(_0x496534[a6_0x4b8b('0x2b')]||0x3);}else if(_0x496534['parallel']===undefined){return _0x496534[a6_0x4b8b('0x2b')]?Number(_0x496534[a6_0x4b8b('0x2b')]):0x3;}else{return Number(_0x496534[a6_0x4b8b('0x7')])||0x3;}}
|
|
@@ -1,309 +1 @@
|
|
|
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.TaskGraphCreator = exports.nxCloudDistributedTasksRunner = void 0;
|
|
13
|
-
const stripJsonComments = require("strip-json-comments");
|
|
14
|
-
const fs_1 = require("fs");
|
|
15
|
-
const distributed_execution_api_1 = require("./distributed-execution.api");
|
|
16
|
-
const file_storage_1 = require("../../file-storage/file-storage");
|
|
17
|
-
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
18
|
-
const waiter_1 = require("../../../utilities/waiter");
|
|
19
|
-
const environment_1 = require("../../../utilities/environment");
|
|
20
|
-
const print_run_group_error_1 = require("../../error/print-run-group-error");
|
|
21
|
-
const create_no_new_messages_timeout_1 = require("../../../utilities/create-no-new-messages-timeout");
|
|
22
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
23
|
-
const { output, workspaceRoot, getDependencyConfigs, getOutputs, unparse, Cache, } = require('../../../utilities/nx-imports');
|
|
24
|
-
class NoopLifeCycle {
|
|
25
|
-
scheduleTask(task) { }
|
|
26
|
-
startTask(task) { }
|
|
27
|
-
endTask(task, code) { }
|
|
28
|
-
}
|
|
29
|
-
function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString()));
|
|
32
|
-
const stages = new TaskOrderer(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).splitTasksIntoStages(tasks);
|
|
33
|
-
const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, stages, options));
|
|
34
|
-
return yield processTasks(api, fileStorage, cache, options, id, tasks, context);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function processTasks(api, fileStorage, cache, options, executionId, tasks, context) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const processedTasks = {};
|
|
40
|
-
const failIfNumberOfCompletedTasksDoesNotChangeIn30Mins = (0, create_no_new_messages_timeout_1.createNoNewMessagesTimeout)();
|
|
41
|
-
const waiter = new waiter_1.Waiter();
|
|
42
|
-
while (true) {
|
|
43
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
44
|
-
output.note({
|
|
45
|
-
title: 'Waiting...',
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
yield waiter.wait();
|
|
49
|
-
const r = yield api.status(executionId);
|
|
50
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
51
|
-
output.note({
|
|
52
|
-
title: `Status update`,
|
|
53
|
-
bodyLines: [
|
|
54
|
-
`executionId: ${executionId}`,
|
|
55
|
-
`executionStatus: ${r.executionStatus}`,
|
|
56
|
-
`number of completed tasks: ${r.completedTasks.length}`,
|
|
57
|
-
`error: ${r.criticalErrorMessage}`,
|
|
58
|
-
],
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
if (r.criticalErrorMessage) {
|
|
62
|
-
output.error({
|
|
63
|
-
title: 'Distributed Execution Terminated',
|
|
64
|
-
bodyLines: ['Error:', r.criticalErrorMessage],
|
|
65
|
-
});
|
|
66
|
-
process.exit(1);
|
|
67
|
-
}
|
|
68
|
-
failIfNumberOfCompletedTasksDoesNotChangeIn30Mins(r.completedTasks.length);
|
|
69
|
-
for (const t of r.completedTasks) {
|
|
70
|
-
if (processedTasks[t.taskId])
|
|
71
|
-
continue;
|
|
72
|
-
yield processTask(fileStorage, cache, context, options, tasks, t);
|
|
73
|
-
waiter.reset();
|
|
74
|
-
processedTasks[t.taskId] = true;
|
|
75
|
-
}
|
|
76
|
-
if (r.executionStatus === 'COMPLETED') {
|
|
77
|
-
return { commandStatus: r.commandStatus, runUrl: r.runUrl };
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function processTask(fileStorage, cache, context, options, tasks, completedTask) {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
85
|
-
output.note({
|
|
86
|
-
title: `Processing task ${completedTask.taskId}`,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
|
|
90
|
-
if (!matchingTask) {
|
|
91
|
-
throw new Error(`Found unknown task: ${completedTask.taskId}`);
|
|
92
|
-
}
|
|
93
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
94
|
-
output.note({
|
|
95
|
-
title: `Retrieving artifacts from ${completedTask.url}`,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
yield fileStorage.retrieve(completedTask.hash, completedTask.url, options.cacheDirectory || './node_modules/.cache/nx');
|
|
99
|
-
const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
|
|
100
|
-
const outputs = getOutputs(context.projectGraph.nodes, matchingTask);
|
|
101
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
102
|
-
output.note({
|
|
103
|
-
title: `Extracting artifacts`,
|
|
104
|
-
bodyLines: outputs,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
yield cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
|
|
108
|
-
output.logCommand(getCommand(matchingTask));
|
|
109
|
-
process.stdout.write(cachedResult.terminalOutput);
|
|
110
|
-
output.addVerticalSeparator();
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function getCommand(task) {
|
|
114
|
-
const args = unparse(task.overrides || {});
|
|
115
|
-
const config = task.target.configuration
|
|
116
|
-
? `:${task.target.configuration}`
|
|
117
|
-
: '';
|
|
118
|
-
return [
|
|
119
|
-
'nx',
|
|
120
|
-
'run',
|
|
121
|
-
`${task.target.project}:${task.target.target}${config}`,
|
|
122
|
-
...args,
|
|
123
|
-
].join(' ');
|
|
124
|
-
}
|
|
125
|
-
const nxCloudDistributedTasksRunner = (tasks, options, context) => {
|
|
126
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
127
|
-
output.note({
|
|
128
|
-
title: 'Starting distributed command execution',
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
options.lifeCycle = new NoopLifeCycle();
|
|
132
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
133
|
-
if (!runGroup) {
|
|
134
|
-
(0, print_run_group_error_1.printRunGroupError)();
|
|
135
|
-
return process.exit(1);
|
|
136
|
-
}
|
|
137
|
-
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
138
|
-
const fileStorage = new file_storage_1.FileStorage(encryption);
|
|
139
|
-
const cache = new Cache(options);
|
|
140
|
-
const api = new distributed_execution_api_1.DistributedExecutionApi(options);
|
|
141
|
-
runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks)
|
|
142
|
-
.then((r) => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
-
if (r.commandStatus === 0) {
|
|
144
|
-
output.success({
|
|
145
|
-
title: 'Successfully completed running the command.',
|
|
146
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
output.error({
|
|
151
|
-
title: 'Command execution failed.',
|
|
152
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
yield (0, metric_logger_1.submitRunMetrics)(options);
|
|
156
|
-
process.exit(r.commandStatus);
|
|
157
|
-
}))
|
|
158
|
-
.catch((e) => {
|
|
159
|
-
output.error({
|
|
160
|
-
title: 'Unable to complete a run.',
|
|
161
|
-
bodyLines: [e.message],
|
|
162
|
-
});
|
|
163
|
-
if (e.axiosException) {
|
|
164
|
-
console.log(e.axiosException);
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
console.log(e);
|
|
168
|
-
}
|
|
169
|
-
api
|
|
170
|
-
.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`)
|
|
171
|
-
.finally(() => process.exit(1));
|
|
172
|
-
});
|
|
173
|
-
// have to return a fake observable, so it works with older versions of Nx (pre 13.3).
|
|
174
|
-
// we don't have to do anything in it cause we call process.exit
|
|
175
|
-
return {
|
|
176
|
-
subscribe: (next, b, complete) => { },
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
|
|
180
|
-
class TaskOrderer {
|
|
181
|
-
constructor(projectGraph, defaultTargetDependencies) {
|
|
182
|
-
this.projectGraph = projectGraph;
|
|
183
|
-
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
184
|
-
}
|
|
185
|
-
splitTasksIntoStages(tasks) {
|
|
186
|
-
if (tasks.length === 0)
|
|
187
|
-
return [];
|
|
188
|
-
const stages = [];
|
|
189
|
-
const taskGraph = this.createTaskGraph(tasks);
|
|
190
|
-
const notStagedTaskIds = new Set(tasks.map((t) => t.id));
|
|
191
|
-
let stageIndex = 0;
|
|
192
|
-
// Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
|
|
193
|
-
while (notStagedTaskIds.size > 0) {
|
|
194
|
-
const currentStage = (stages[stageIndex] = []);
|
|
195
|
-
for (const taskId of notStagedTaskIds) {
|
|
196
|
-
let ready = true;
|
|
197
|
-
for (const dependency of taskGraph.dependencies[taskId]) {
|
|
198
|
-
if (notStagedTaskIds.has(dependency)) {
|
|
199
|
-
// dependency has not been staged yet, this task is not ready to be staged.
|
|
200
|
-
ready = false;
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
// Some dependency still has not been staged, skip it for now, it will be processed again
|
|
205
|
-
if (!ready) {
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
// All the dependencies have been staged, let's stage it.
|
|
209
|
-
const task = taskGraph.tasks[taskId];
|
|
210
|
-
currentStage.push(task);
|
|
211
|
-
}
|
|
212
|
-
// Remove the entire new stage of tasks from the list
|
|
213
|
-
for (const task of currentStage) {
|
|
214
|
-
notStagedTaskIds.delete(task.id);
|
|
215
|
-
}
|
|
216
|
-
stageIndex++;
|
|
217
|
-
}
|
|
218
|
-
return stages;
|
|
219
|
-
}
|
|
220
|
-
createTaskGraph(tasks) {
|
|
221
|
-
const t = new TaskGraphCreator(this.projectGraph, this.defaultTargetDependencies);
|
|
222
|
-
return t.createTaskGraph(tasks);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
class TaskGraphCreator {
|
|
226
|
-
constructor(projectGraph, defaultTargetDependencies) {
|
|
227
|
-
this.projectGraph = projectGraph;
|
|
228
|
-
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
229
|
-
}
|
|
230
|
-
createTaskGraph(tasks) {
|
|
231
|
-
const graph = {
|
|
232
|
-
roots: [],
|
|
233
|
-
tasks: {},
|
|
234
|
-
dependencies: {},
|
|
235
|
-
};
|
|
236
|
-
for (const task of tasks) {
|
|
237
|
-
this.addTaskToGraph(task, graph);
|
|
238
|
-
const dependencyConfigs = getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
|
|
239
|
-
if (!dependencyConfigs) {
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
242
|
-
this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
|
|
243
|
-
}
|
|
244
|
-
graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
|
|
245
|
-
return graph;
|
|
246
|
-
}
|
|
247
|
-
addTaskDependencies(task, dependencyConfigs, tasks, graph) {
|
|
248
|
-
for (const dependencyConfig of dependencyConfigs) {
|
|
249
|
-
if (dependencyConfig.projects === 'self') {
|
|
250
|
-
for (const t of tasks) {
|
|
251
|
-
if (t.target.project === task.target.project &&
|
|
252
|
-
t.target.target === dependencyConfig.target) {
|
|
253
|
-
graph.dependencies[task.id].push(t.id);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
else if (dependencyConfig.projects === 'dependencies') {
|
|
258
|
-
const seen = new Set();
|
|
259
|
-
this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
addDependencies(project, target, tasks, graph, taskId, seen) {
|
|
264
|
-
seen.add(project);
|
|
265
|
-
const dependencies = this.projectGraph.dependencies[project];
|
|
266
|
-
if (dependencies) {
|
|
267
|
-
const projectDependencies = dependencies.map((dependency) => dependency.target);
|
|
268
|
-
for (const projectDependency of projectDependencies) {
|
|
269
|
-
if (seen.has(projectDependency)) {
|
|
270
|
-
continue;
|
|
271
|
-
}
|
|
272
|
-
const dependency = this.findTask({ project: projectDependency, target }, tasks);
|
|
273
|
-
if (dependency) {
|
|
274
|
-
if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
|
|
275
|
-
graph.dependencies[taskId].push(dependency.id);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
findTask({ project, target }, tasks) {
|
|
285
|
-
return tasks.find((t) => t.target.project === project && t.target.target === target);
|
|
286
|
-
}
|
|
287
|
-
addTaskToGraph(task, graph) {
|
|
288
|
-
graph.tasks[task.id] = task;
|
|
289
|
-
graph.dependencies[task.id] = [];
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
exports.TaskGraphCreator = TaskGraphCreator;
|
|
293
|
-
function getDefaultDependencyConfigs(nxJson, runnerOptions) {
|
|
294
|
-
var _a, _b;
|
|
295
|
-
const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
|
|
296
|
-
const strictlyOrderedTargets = runnerOptions
|
|
297
|
-
? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
|
|
298
|
-
: [];
|
|
299
|
-
// Strictly Ordered Targets depend on their dependencies
|
|
300
|
-
for (const target of strictlyOrderedTargets) {
|
|
301
|
-
defaults[target] = defaults[target] || [];
|
|
302
|
-
defaults[target].push({
|
|
303
|
-
target,
|
|
304
|
-
projects: 'dependencies',
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
return defaults;
|
|
308
|
-
}
|
|
309
|
-
//# sourceMappingURL=distributed-execution.runner.js.map
|
|
1
|
+
const a7_0x340b=['COMPLETED','push','criticalErrorMessage','createNoNewMessagesTimeout','roots','hash','completedTasks','axiosException','value','Found\x20unknown\x20task:\x20','VERBOSE_LOGGING','log','commandStatus','success','lifeCycle','submitRunMetrics','Error:','tasks','../../../utilities/nx-imports','wait','See\x20run\x20details\x20at\x20','next','note','Retrieving\x20artifacts\x20from\x20','Waiting...','targetDependencies','defaultTargetDependencies','addTaskDependencies','status','configuration','throw','reset','projectGraph','__awaiter','keys','projects','runUrl','splitTasksIntoStages','target','length','../../error/print-run-group-error','nxCloudDistributedTasksRunner','message','apply','build','logCommand','Successfully\x20completed\x20running\x20the\x20command.','copyFilesFromCache','terminalOutput','executionStatus','find','map','Starting\x20distributed\x20command\x20execution','../../../utilities/metric-logger','dependencies','cacheDirectory','then','../../../utilities/environment','filter','./distributed-execution.api','addTaskToGraph','Unable\x20to\x20complete\x20a\x20run.','addVerticalSeparator','size','findTask','parse','error','Command\x20execution\x20failed.','Extracting\x20artifacts','strip-json-comments','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','delete','project','assign','Waiter','ENCRYPTION_KEY','executionId:\x20','scheduleTask','TaskGraphCreator','taskId','start','number\x20of\x20completed\x20tasks:\x20','__esModule','printRunGroupError','/nx.json','DistributedExecutionApi','url','createStartRequest','startTask','has','completeRunGroupWithError','nodes','run','addDependencies','toString','indexOf','error:\x20','E2EEncryption','createTaskGraph','exit','overrides','endTask','Distributed\x20Execution\x20Terminated','../../file-storage/e2e-encryption','strictlyOrderedTargets','add'];(function(_0x12ed6d,_0x340b75){const _0x473c34=function(_0x32ac72){while(--_0x32ac72){_0x12ed6d['push'](_0x12ed6d['shift']());}};_0x473c34(++_0x340b75);}(a7_0x340b,0xb3));const a7_0x473c=function(_0x12ed6d,_0x340b75){_0x12ed6d=_0x12ed6d-0x0;let _0x473c34=a7_0x340b[_0x12ed6d];return _0x473c34;};'use strict';var __awaiter=this&&this[a7_0x473c('0x42')]||function(_0x276365,_0x2fee74,_0x5ab7d6,_0x45cadd){function _0x392d6e(_0x5c5df7){return _0x5c5df7 instanceof _0x5ab7d6?_0x5c5df7:new _0x5ab7d6(function(_0x2cc013){_0x2cc013(_0x5c5df7);});}return new(_0x5ab7d6||(_0x5ab7d6=Promise))(function(_0x485446,_0x3b4dad){function _0x1acd2e(_0xbdaf97){try{_0x9c1f72(_0x45cadd['next'](_0xbdaf97));}catch(_0x1e0bac){_0x3b4dad(_0x1e0bac);}}function _0x150449(_0x210431){try{_0x9c1f72(_0x45cadd[a7_0x473c('0x3f')](_0x210431));}catch(_0x288ef3){_0x3b4dad(_0x288ef3);}}function _0x9c1f72(_0x5ecfcb){_0x5ecfcb['done']?_0x485446(_0x5ecfcb['value']):_0x392d6e(_0x5ecfcb[a7_0x473c('0x29')])[a7_0x473c('0x59')](_0x1acd2e,_0x150449);}_0x9c1f72((_0x45cadd=_0x45cadd[a7_0x473c('0x4c')](_0x276365,_0x2fee74||[]))[a7_0x473c('0x36')]());});};Object['defineProperty'](exports,a7_0x473c('0x9'),{'value':!![]});exports[a7_0x473c('0x5')]=exports[a7_0x473c('0x4a')]=void 0x0;const stripJsonComments=require(a7_0x473c('0x66'));const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x473c('0x5c'));const file_storage_1=require('../../file-storage/file-storage');const e2e_encryption_1=require(a7_0x473c('0x1e'));const waiter_1=require('../../../utilities/waiter');const environment_1=require(a7_0x473c('0x5a'));const print_run_group_error_1=require(a7_0x473c('0x49'));const create_no_new_messages_timeout_1=require('../../../utilities/create-no-new-messages-timeout');const metric_logger_1=require(a7_0x473c('0x56'));const {output,workspaceRoot,getDependencyConfigs,getOutputs,unparse,Cache}=require(a7_0x473c('0x33'));class NoopLifeCycle{[a7_0x473c('0x4')](_0x374dbe){}[a7_0x473c('0xf')](_0x4848f5){}[a7_0x473c('0x1c')](_0x75c481,_0x58675a){}}function runDistributedExecution(_0x46f9b4,_0x2b1503,_0x14893b,_0x326f6b,_0x5f4119,_0x508a16,_0x125c5d){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x54c2a3=JSON[a7_0x473c('0x62')](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a7_0x473c('0xb'))[a7_0x473c('0x15')]()));const _0x51a449=new TaskOrderer(_0x14893b[a7_0x473c('0x41')],getDefaultDependencyConfigs(_0x54c2a3,_0x2b1503))[a7_0x473c('0x46')](_0x125c5d);const _0x259311=yield _0x46f9b4[a7_0x473c('0x7')]((0x0,distributed_execution_api_1[a7_0x473c('0xe')])(_0x508a16,_0x51a449,_0x2b1503));return yield processTasks(_0x46f9b4,_0x326f6b,_0x5f4119,_0x2b1503,_0x259311,_0x125c5d,_0x14893b);});}function processTasks(_0x335fb8,_0x128238,_0xb05f43,_0x2110e8,_0x5ed40a,_0x2f3f82,_0x3350c9){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x32cab1={};const _0x3a2f0c=(0x0,create_no_new_messages_timeout_1[a7_0x473c('0x24')])();const _0x57903b=new waiter_1[(a7_0x473c('0x1'))]();while(!![]){if(environment_1['VERBOSE_LOGGING']){output[a7_0x473c('0x37')]({'title':a7_0x473c('0x39')});}yield _0x57903b[a7_0x473c('0x34')]();const _0x5d3168=yield _0x335fb8[a7_0x473c('0x3d')](_0x5ed40a);if(environment_1[a7_0x473c('0x2b')]){output[a7_0x473c('0x37')]({'title':'Status\x20update','bodyLines':[a7_0x473c('0x3')+_0x5ed40a,'executionStatus:\x20'+_0x5d3168[a7_0x473c('0x52')],a7_0x473c('0x8')+_0x5d3168['completedTasks']['length'],a7_0x473c('0x17')+_0x5d3168['criticalErrorMessage']]});}if(_0x5d3168['criticalErrorMessage']){output[a7_0x473c('0x63')]({'title':a7_0x473c('0x1d'),'bodyLines':[a7_0x473c('0x31'),_0x5d3168[a7_0x473c('0x23')]]});process[a7_0x473c('0x1a')](0x1);}_0x3a2f0c(_0x5d3168[a7_0x473c('0x27')][a7_0x473c('0x48')]);for(const _0x432195 of _0x5d3168[a7_0x473c('0x27')]){if(_0x32cab1[_0x432195[a7_0x473c('0x6')]])continue;yield processTask(_0x128238,_0xb05f43,_0x3350c9,_0x2110e8,_0x2f3f82,_0x432195);_0x57903b[a7_0x473c('0x40')]();_0x32cab1[_0x432195[a7_0x473c('0x6')]]=!![];}if(_0x5d3168['executionStatus']===a7_0x473c('0x21')){return{'commandStatus':_0x5d3168[a7_0x473c('0x2d')],'runUrl':_0x5d3168['runUrl']};}}});}function processTask(_0x4c010c,_0x538c3c,_0x53e1c7,_0x5f22fd,_0x1a02e1,_0x192c48){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output['note']({'title':'Processing\x20task\x20'+_0x192c48['taskId']});}const _0x2604c6=_0x1a02e1[a7_0x473c('0x53')](_0x4a91ca=>_0x192c48[a7_0x473c('0x6')]===_0x4a91ca['id']);if(!_0x2604c6){throw new Error(a7_0x473c('0x2a')+_0x192c48['taskId']);}if(environment_1[a7_0x473c('0x2b')]){output[a7_0x473c('0x37')]({'title':a7_0x473c('0x38')+_0x192c48[a7_0x473c('0xd')]});}yield _0x4c010c['retrieve'](_0x192c48['hash'],_0x192c48['url'],_0x5f22fd[a7_0x473c('0x58')]||'./node_modules/.cache/nx');const _0x3a9d2b=yield _0x538c3c['get'](Object['assign'](Object[a7_0x473c('0x0')]({},_0x2604c6),{'hash':_0x192c48[a7_0x473c('0x26')]}));const _0x28acec=getOutputs(_0x53e1c7[a7_0x473c('0x41')][a7_0x473c('0x12')],_0x2604c6);if(environment_1[a7_0x473c('0x2b')]){output['note']({'title':a7_0x473c('0x65'),'bodyLines':_0x28acec});}yield _0x538c3c[a7_0x473c('0x50')](_0x192c48[a7_0x473c('0x26')],_0x3a9d2b,_0x28acec);output[a7_0x473c('0x4e')](getCommand(_0x2604c6));process['stdout']['write'](_0x3a9d2b[a7_0x473c('0x51')]);output[a7_0x473c('0x5f')]();});}function getCommand(_0x24b2c8){const _0x3e04bb=unparse(_0x24b2c8[a7_0x473c('0x1b')]||{});const _0x4d479b=_0x24b2c8[a7_0x473c('0x47')][a7_0x473c('0x3e')]?':'+_0x24b2c8[a7_0x473c('0x47')][a7_0x473c('0x3e')]:'';return['nx',a7_0x473c('0x13'),_0x24b2c8[a7_0x473c('0x47')][a7_0x473c('0x69')]+':'+_0x24b2c8[a7_0x473c('0x47')]['target']+_0x4d479b,..._0x3e04bb]['join']('\x20');}const nxCloudDistributedTasksRunner=(_0x54ec2e,_0x252c70,_0x20a840)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1[a7_0x473c('0x2b')]){output[a7_0x473c('0x37')]({'title':a7_0x473c('0x55')});}_0x252c70[a7_0x473c('0x2f')]=new NoopLifeCycle();const _0x596e84=(0x0,environment_1['getRunGroup'])();if(!_0x596e84){(0x0,print_run_group_error_1[a7_0x473c('0xa')])();return process[a7_0x473c('0x1a')](0x1);}const _0x5c3446=new e2e_encryption_1[(a7_0x473c('0x18'))](environment_1[a7_0x473c('0x2')]||_0x252c70['encryptionKey']);const _0x1878a8=new file_storage_1['FileStorage'](_0x5c3446);const _0x4188f0=new Cache(_0x252c70);const _0x32eaab=new distributed_execution_api_1[(a7_0x473c('0xc'))](_0x252c70);try{const _0x52f8c4=yield runDistributedExecution(_0x32eaab,_0x252c70,_0x20a840,_0x1878a8,_0x4188f0,_0x596e84,_0x54ec2e);if(_0x52f8c4[a7_0x473c('0x2d')]===0x0){output[a7_0x473c('0x2e')]({'title':a7_0x473c('0x4f'),'bodyLines':[a7_0x473c('0x35')+_0x52f8c4[a7_0x473c('0x45')]]});}else{output[a7_0x473c('0x63')]({'title':a7_0x473c('0x64'),'bodyLines':[a7_0x473c('0x35')+_0x52f8c4[a7_0x473c('0x45')]]});}yield(0x0,metric_logger_1[a7_0x473c('0x30')])(_0x252c70);process[a7_0x473c('0x1a')](_0x52f8c4[a7_0x473c('0x2d')]);}catch(_0x203526){output[a7_0x473c('0x63')]({'title':a7_0x473c('0x5e'),'bodyLines':[_0x203526[a7_0x473c('0x4b')]]});if(_0x203526[a7_0x473c('0x28')]){console[a7_0x473c('0x2c')](_0x203526[a7_0x473c('0x28')]);}else{console[a7_0x473c('0x2c')](_0x203526);}try{yield _0x32eaab[a7_0x473c('0x11')](_0x596e84,a7_0x473c('0x67')+_0x203526[a7_0x473c('0x4b')]+'\x22');}finally{process[a7_0x473c('0x1a')](0x1);}}});exports[a7_0x473c('0x4a')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x1ad6fc,_0x45141b){this[a7_0x473c('0x41')]=_0x1ad6fc;this[a7_0x473c('0x3b')]=_0x45141b;}[a7_0x473c('0x46')](_0x322e8c){if(_0x322e8c[a7_0x473c('0x48')]===0x0)return[];const _0x227ad0=[];const _0x2aa476=this[a7_0x473c('0x19')](_0x322e8c);const _0x398d0e=new Set(_0x322e8c[a7_0x473c('0x54')](_0x2f2a2f=>_0x2f2a2f['id']));let _0x3b6330=0x0;while(_0x398d0e[a7_0x473c('0x60')]>0x0){const _0x4f5b22=_0x227ad0[_0x3b6330]=[];for(const _0x57065b of _0x398d0e){let _0x3d0674=!![];for(const _0x39ebb8 of _0x2aa476[a7_0x473c('0x57')][_0x57065b]){if(_0x398d0e[a7_0x473c('0x10')](_0x39ebb8)){_0x3d0674=![];break;}}if(!_0x3d0674){continue;}const _0xbe1e7=_0x2aa476[a7_0x473c('0x32')][_0x57065b];_0x4f5b22['push'](_0xbe1e7);}for(const _0x50e006 of _0x4f5b22){_0x398d0e[a7_0x473c('0x68')](_0x50e006['id']);}_0x3b6330++;}return _0x227ad0;}['createTaskGraph'](_0x1a0440){const _0x1fdece=new TaskGraphCreator(this[a7_0x473c('0x41')],this[a7_0x473c('0x3b')]);return _0x1fdece[a7_0x473c('0x19')](_0x1a0440);}}class TaskGraphCreator{constructor(_0x1c6c94,_0x395fb9){this[a7_0x473c('0x41')]=_0x1c6c94;this[a7_0x473c('0x3b')]=_0x395fb9;}[a7_0x473c('0x19')](_0x7b0014){const _0x4dff03={'roots':[],'tasks':{},'dependencies':{}};for(const _0x3d48aa of _0x7b0014){this[a7_0x473c('0x5d')](_0x3d48aa,_0x4dff03);const _0x5c45a6=getDependencyConfigs(_0x3d48aa['target'],this['defaultTargetDependencies'],this['projectGraph']);if(!_0x5c45a6){continue;}this[a7_0x473c('0x3c')](_0x3d48aa,_0x5c45a6,_0x7b0014,_0x4dff03);}_0x4dff03[a7_0x473c('0x25')]=Object[a7_0x473c('0x43')](_0x4dff03['dependencies'])[a7_0x473c('0x5b')](_0x446df2=>_0x4dff03['dependencies'][_0x446df2][a7_0x473c('0x48')]===0x0);return _0x4dff03;}[a7_0x473c('0x3c')](_0x20ba9f,_0x5d72e6,_0x441022,_0x530cb9){for(const _0x567cd9 of _0x5d72e6){if(_0x567cd9['projects']==='self'){for(const _0x19457e of _0x441022){if(_0x19457e[a7_0x473c('0x47')][a7_0x473c('0x69')]===_0x20ba9f['target']['project']&&_0x19457e['target'][a7_0x473c('0x47')]===_0x567cd9[a7_0x473c('0x47')]){_0x530cb9[a7_0x473c('0x57')][_0x20ba9f['id']]['push'](_0x19457e['id']);}}}else if(_0x567cd9[a7_0x473c('0x44')]===a7_0x473c('0x57')){const _0x28b06e=new Set();this[a7_0x473c('0x14')](_0x20ba9f[a7_0x473c('0x47')][a7_0x473c('0x69')],_0x567cd9[a7_0x473c('0x47')],_0x441022,_0x530cb9,_0x20ba9f['id'],_0x28b06e);}}}[a7_0x473c('0x14')](_0x1526ea,_0x158282,_0xaac9f3,_0x58b985,_0x5331a9,_0x2c1986){_0x2c1986[a7_0x473c('0x20')](_0x1526ea);const _0x48a8ee=this['projectGraph'][a7_0x473c('0x57')][_0x1526ea];if(_0x48a8ee){const _0x1255e2=_0x48a8ee['map'](_0x44852d=>_0x44852d[a7_0x473c('0x47')]);for(const _0xb24f9d of _0x1255e2){if(_0x2c1986[a7_0x473c('0x10')](_0xb24f9d)){continue;}const _0x54d9cb=this[a7_0x473c('0x61')]({'project':_0xb24f9d,'target':_0x158282},_0xaac9f3);if(_0x54d9cb){if(_0x58b985[a7_0x473c('0x57')][_0x5331a9][a7_0x473c('0x16')](_0x54d9cb['id'])===-0x1){_0x58b985[a7_0x473c('0x57')][_0x5331a9][a7_0x473c('0x22')](_0x54d9cb['id']);}}else{this[a7_0x473c('0x14')](_0xb24f9d,_0x158282,_0xaac9f3,_0x58b985,_0x5331a9,_0x2c1986);}}}}['findTask']({project,target},_0x46417f){return _0x46417f[a7_0x473c('0x53')](_0xbfa14d=>_0xbfa14d[a7_0x473c('0x47')][a7_0x473c('0x69')]===project&&_0xbfa14d[a7_0x473c('0x47')][a7_0x473c('0x47')]===target);}[a7_0x473c('0x5d')](_0x19e59f,_0x55d12f){_0x55d12f[a7_0x473c('0x32')][_0x19e59f['id']]=_0x19e59f;_0x55d12f[a7_0x473c('0x57')][_0x19e59f['id']]=[];}}exports[a7_0x473c('0x5')]=TaskGraphCreator;function getDefaultDependencyConfigs(_0x5f3048,_0x2b6922){var _0x3812c9,_0x2c3c30;const _0x5a461c=(_0x3812c9=_0x5f3048[a7_0x473c('0x3a')])!==null&&_0x3812c9!==void 0x0?_0x3812c9:{};const _0x5e400f=_0x2b6922?(_0x2c3c30=_0x2b6922[a7_0x473c('0x1f')])!==null&&_0x2c3c30!==void 0x0?_0x2c3c30:[a7_0x473c('0x4d')]:[];for(const _0x1d9b16 of _0x5e400f){_0x5a461c[_0x1d9b16]=_0x5a461c[_0x1d9b16]||[];_0x5a461c[_0x1d9b16][a7_0x473c('0x22')]({'target':_0x1d9b16,'projects':a7_0x473c('0x57')});}return _0x5a461c;}
|
|
@@ -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,yDAAyD;AACzD,2BAAkC;AAClC,2EAGqC;AAErC,kEAA8D;AAC9D,sEAAkE;AAClE,sDAAmD;AACnD,gEAIwC;AACxC,6EAAuE;AACvE,sGAA+F;AAC/F,oEAAoE;AAGpE,MAAM,EACJ,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,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,KAAa;;QAEb,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,GAAG,aAAa,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,CACvE,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,WAAW,CAC5B,OAAO,CAAC,YAAY,EACpB,2BAA2B,CAAC,MAAM,EAAE,OAAc,CAAC,CACpD,CAAC,oBAAoB,CAAC,KAAK,CAAC,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AAC,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,CAC3D,CAAC;IACX,CAAC;IAEO,cAAc,CAAC,IAAU,EAAE,KAAU;QAC3C,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QAC5B,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC;CACF;AAvHD,4CAuHC;AAED,SAAS,2BAA2B,CAClC,MAAW,EACX,aAEC;;IAED,MAAM,QAAQ,GAA0B,MAAA,MAAM,CAAC,kBAAkB,mCAAI,EAAE,CAAC;IAExE,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
|
+
{"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,yDAAyD;AACzD,2BAAkC;AAClC,2EAGqC;AAErC,kEAA8D;AAC9D,sEAAkE;AAClE,sDAAmD;AACnD,gEAIwC;AACxC,6EAAuE;AACvE,sGAA+F;AAC/F,oEAAoE;AAGpE,MAAM,EACJ,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,OAA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,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -3,33 +3,62 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.printMessage = void 0;
|
|
4
4
|
const { output } = require('./nx-imports');
|
|
5
5
|
function printMessage(message) {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
if (newTerminalOutput()) {
|
|
7
|
+
process.stdout.write(` ${formatMessage(message)}`);
|
|
8
|
+
output.addNewline();
|
|
9
|
+
output.addNewline();
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
if (runOneCommand()) {
|
|
13
|
+
output.addNewline();
|
|
14
|
+
process.stdout.write(`${formatMessage(message)}`);
|
|
15
|
+
output.addNewline();
|
|
16
|
+
output.addNewline();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
process.stdout.write(` ${formatMessage(message)}`);
|
|
20
|
+
output.addNewline();
|
|
21
|
+
output.addNewline();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.printMessage = printMessage;
|
|
26
|
+
function newTerminalOutput() {
|
|
8
27
|
try {
|
|
9
28
|
require('nx/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle');
|
|
10
|
-
|
|
29
|
+
return true;
|
|
11
30
|
}
|
|
12
|
-
catch (e) {
|
|
31
|
+
catch (e) {
|
|
32
|
+
try {
|
|
33
|
+
require('@nrwl/workspace/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle');
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch (ee) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function formatMessage(message) {
|
|
13
42
|
let formattedMessage;
|
|
14
43
|
// TODO(Altan): Remove after Nx 15-ish
|
|
15
44
|
// output.dim causes incompatibility with older versions of Nx, so fall back
|
|
16
45
|
// to old method if function is undefined
|
|
17
46
|
if (typeof output.dim === 'function') {
|
|
18
|
-
|
|
47
|
+
return output.dim(message);
|
|
19
48
|
}
|
|
20
49
|
else {
|
|
21
50
|
try {
|
|
22
51
|
// Old (pre 13.4/13.5) method
|
|
23
|
-
|
|
52
|
+
return output.colors.gray(message);
|
|
24
53
|
}
|
|
25
54
|
catch (e) {
|
|
26
55
|
// Ultra fallback, we should never hit this
|
|
27
|
-
|
|
56
|
+
return message;
|
|
28
57
|
}
|
|
29
58
|
}
|
|
30
|
-
process.stdout.write(`${offset}${formattedMessage}`);
|
|
31
|
-
output.addNewline();
|
|
32
|
-
output.addNewline();
|
|
33
59
|
}
|
|
34
|
-
|
|
60
|
+
function runOneCommand() {
|
|
61
|
+
return (process.argv.indexOf('run-many') === -1 &&
|
|
62
|
+
process.argv.indexOf('affected') === -1);
|
|
63
|
+
}
|
|
35
64
|
//# sourceMappingURL=print-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/print-message.ts"],"names":[],"mappings":";;;AAAA,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,SAAgB,YAAY,CAAC,OAAe;IAC1C,
|
|
1
|
+
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/print-message.ts"],"names":[],"mappings":";;;AAAA,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,SAAgB,YAAY,CAAC,OAAe;IAC1C,IAAI,iBAAiB,EAAE,EAAE;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACrD,MAAM,CAAC,UAAU,EAAE,CAAC;QACpB,MAAM,CAAC,UAAU,EAAE,CAAC;KACrB;SAAM;QACL,IAAI,aAAa,E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