@nrwl/nx-cloud 12.4.0-beta.3 → 12.5.1
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 -52
- package/lib/core/file-storage/file-storage.d.ts +1 -0
- package/lib/core/file-storage/file-storage.js +23 -6
- package/lib/core/file-storage/file-storage.js.map +1 -1
- package/lib/core/models/distributed-agent/tasks-api-response.model.d.ts +1 -0
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.d.ts +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -125
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -111
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -120
- package/lib/core/runners/cloud-enabled/cloud-run.api.js.map +1 -1
- package/lib/core/runners/cloud-enabled/task-runner-life-cycle.d.ts +4 -1
- package/lib/core/runners/cloud-enabled/task-runner-life-cycle.js +1 -99
- package/lib/core/runners/cloud-enabled/task-runner-life-cycle.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -61
- package/lib/core/runners/distributed-agent/distributed-agent.runner.js +1 -204
- package/lib/core/runners/distributed-agent/distributed-agent.runner.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -84
- package/lib/core/runners/distributed-execution/distributed-execution.api.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -268
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/lib/core/terminal-output/message-reporter.js +3 -2
- package/lib/core/terminal-output/message-reporter.js.map +1 -1
- package/lib/generators/init/init.js +3 -2
- package/lib/generators/init/init.js.map +1 -1
- package/lib/nx-cloud-tasks-runner.js +4 -4
- package/lib/nx-cloud-tasks-runner.js.map +1 -1
- package/lib/utilities/axios.js +2 -1
- package/lib/utilities/axios.js.map +1 -1
- package/lib/utilities/environment.d.ts +4 -3
- package/lib/utilities/environment.js +31 -4
- package/lib/utilities/environment.js.map +1 -1
- package/lib/utilities/print-message.js +1 -1
- package/lib/utilities/print-message.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,268 +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.nxCloudDistributedTasksRunner = void 0;
|
|
13
|
-
const rxjs_1 = require("rxjs");
|
|
14
|
-
const cache_1 = require("@nrwl/workspace/src/tasks-runner/cache");
|
|
15
|
-
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
16
|
-
const utils_1 = require("@nrwl/workspace/src/tasks-runner/utils");
|
|
17
|
-
const stripJsonComments = require("strip-json-comments");
|
|
18
|
-
const fs_1 = require("fs");
|
|
19
|
-
const distributed_execution_api_1 = require("./distributed-execution.api");
|
|
20
|
-
const file_storage_1 = require("../../file-storage/file-storage");
|
|
21
|
-
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
22
|
-
const waiter_1 = require("../../../utilities/waiter");
|
|
23
|
-
const environment_1 = require("../../../utilities/environment");
|
|
24
|
-
const print_run_group_error_1 = require("../../error/print-run-group-error");
|
|
25
|
-
const create_no_new_messages_timeout_1 = require("../../../utilities/create-no-new-messages-timeout");
|
|
26
|
-
class NoopLifeCycle {
|
|
27
|
-
scheduleTask(task) { }
|
|
28
|
-
startTask(task) { }
|
|
29
|
-
endTask(task, code) { }
|
|
30
|
-
}
|
|
31
|
-
function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks) {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
const nxjson = JSON.parse(stripJsonComments(fs_1.readFileSync('nx.json').toString()));
|
|
34
|
-
const stages = new TaskOrderer(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).splitTasksIntoStages(tasks);
|
|
35
|
-
const id = yield api.start(distributed_execution_api_1.createStartRequest(runGroup, stages, options));
|
|
36
|
-
return yield processTasks(api, fileStorage, cache, options, id, 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 failIfNumberOfCompletedTasksDoesNotChangeIn30Mins = create_no_new_messages_timeout_1.createNoNewMessagesTimeout();
|
|
43
|
-
const waiter = new waiter_1.Waiter();
|
|
44
|
-
while (true) {
|
|
45
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
46
|
-
output_1.output.note({
|
|
47
|
-
title: 'Waiting...',
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
yield waiter.wait();
|
|
51
|
-
const r = yield api.status(executionId);
|
|
52
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
53
|
-
output_1.output.note({
|
|
54
|
-
title: `Status update`,
|
|
55
|
-
bodyLines: [
|
|
56
|
-
`executionId: ${executionId}`,
|
|
57
|
-
`executionStatus: ${r.executionStatus}`,
|
|
58
|
-
`number of completed tasks: ${r.completedTasks.length}`,
|
|
59
|
-
`error: ${r.criticalErrorMessage}`,
|
|
60
|
-
],
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
if (r.criticalErrorMessage) {
|
|
64
|
-
output_1.output.error({
|
|
65
|
-
title: 'Distributed Execution Terminated',
|
|
66
|
-
bodyLines: ['Error:', r.criticalErrorMessage],
|
|
67
|
-
});
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
failIfNumberOfCompletedTasksDoesNotChangeIn30Mins(r.completedTasks.length);
|
|
71
|
-
for (const t of r.completedTasks) {
|
|
72
|
-
if (processedTasks[t.taskId])
|
|
73
|
-
continue;
|
|
74
|
-
yield processTask(fileStorage, cache, context, options, tasks, t);
|
|
75
|
-
waiter.reset();
|
|
76
|
-
processedTasks[t.taskId] = true;
|
|
77
|
-
}
|
|
78
|
-
if (r.executionStatus === 'COMPLETED') {
|
|
79
|
-
return { commandStatus: r.commandStatus, runUrl: r.runUrl };
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function processTask(fileStorage, cache, context, options, tasks, completedTask) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
87
|
-
output_1.output.note({
|
|
88
|
-
title: `Processing task ${completedTask.taskId}`,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
|
|
92
|
-
if (!matchingTask) {
|
|
93
|
-
throw new Error(`Found unknown task: ${completedTask.taskId}`);
|
|
94
|
-
}
|
|
95
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
96
|
-
output_1.output.note({
|
|
97
|
-
title: `Retrieving artifacts from ${completedTask.url}`,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
yield fileStorage.retrieve(completedTask.hash, completedTask.url, options.cacheDirectory || './node_modules/.cache/nx');
|
|
101
|
-
const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
|
|
102
|
-
const outputs = utils_1.getOutputs(context.projectGraph.nodes, matchingTask);
|
|
103
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
104
|
-
output_1.output.note({
|
|
105
|
-
title: `Extracting artifacts`,
|
|
106
|
-
bodyLines: outputs,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
|
|
110
|
-
output_1.output.logCommand(getCommand(matchingTask));
|
|
111
|
-
process.stdout.write(cachedResult.terminalOutput);
|
|
112
|
-
output_1.output.addVerticalSeparator();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
function getCommand(task) {
|
|
116
|
-
const args = utils_1.unparse(task.overrides || {});
|
|
117
|
-
const config = task.target.configuration
|
|
118
|
-
? `:${task.target.configuration}`
|
|
119
|
-
: '';
|
|
120
|
-
return [
|
|
121
|
-
'nx',
|
|
122
|
-
'run',
|
|
123
|
-
`${task.target.project}:${task.target.target}${config}`,
|
|
124
|
-
...args,
|
|
125
|
-
].join(' ');
|
|
126
|
-
}
|
|
127
|
-
const nxCloudDistributedTasksRunner = (tasks, options, context) => {
|
|
128
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
129
|
-
output_1.output.note({
|
|
130
|
-
title: 'Starting distributed command execution',
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
options.lifeCycle = new NoopLifeCycle();
|
|
134
|
-
const runGroup = environment_1.getRunGroup();
|
|
135
|
-
if (!runGroup) {
|
|
136
|
-
print_run_group_error_1.printRunGroupError();
|
|
137
|
-
return process.exit(1);
|
|
138
|
-
}
|
|
139
|
-
const encryption = new e2e_encryption_1.E2EEncryption(process.env.NX_CLOUD_ENCRYPTION_KEY || options.encryptionKey);
|
|
140
|
-
const fileStorage = new file_storage_1.FileStorage(encryption, 3);
|
|
141
|
-
const cache = new cache_1.Cache(options);
|
|
142
|
-
const api = new distributed_execution_api_1.DistributedExecutionApi(options);
|
|
143
|
-
runDistributedExecution(api, options, context, fileStorage, cache, runGroup, tasks)
|
|
144
|
-
.then((r) => {
|
|
145
|
-
if (r.commandStatus === 0) {
|
|
146
|
-
output_1.output.success({
|
|
147
|
-
title: 'Successfully completed running the command.',
|
|
148
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
output_1.output.error({
|
|
153
|
-
title: 'Command execution failed.',
|
|
154
|
-
bodyLines: [`See run details at ${r.runUrl}`],
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
process.exit(r.commandStatus);
|
|
158
|
-
})
|
|
159
|
-
.catch((e) => {
|
|
160
|
-
output_1.output.error({
|
|
161
|
-
title: 'Unable to complete a run.',
|
|
162
|
-
bodyLines: [e.message],
|
|
163
|
-
});
|
|
164
|
-
if (e.axiosException) {
|
|
165
|
-
console.log(e.axiosException);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
console.log(e);
|
|
169
|
-
}
|
|
170
|
-
api
|
|
171
|
-
.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`)
|
|
172
|
-
.finally(() => process.exit(1));
|
|
173
|
-
});
|
|
174
|
-
return new rxjs_1.Observable(() => { });
|
|
175
|
-
};
|
|
176
|
-
exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
|
|
177
|
-
class TaskOrderer {
|
|
178
|
-
constructor(projectGraph, defaultTargetDependencies) {
|
|
179
|
-
this.projectGraph = projectGraph;
|
|
180
|
-
this.defaultTargetDependencies = defaultTargetDependencies;
|
|
181
|
-
}
|
|
182
|
-
splitTasksIntoStages(tasks) {
|
|
183
|
-
if (tasks.length === 0)
|
|
184
|
-
return [];
|
|
185
|
-
const stages = [];
|
|
186
|
-
const taskGraph = this.createTaskGraph(tasks);
|
|
187
|
-
const notStagedTaskIds = new Set(tasks.map((t) => t.id));
|
|
188
|
-
let stageIndex = 0;
|
|
189
|
-
// Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
|
|
190
|
-
while (notStagedTaskIds.size > 0) {
|
|
191
|
-
const currentStage = (stages[stageIndex] = []);
|
|
192
|
-
for (const taskId of notStagedTaskIds) {
|
|
193
|
-
let ready = true;
|
|
194
|
-
for (const dependency of taskGraph.dependencies[taskId]) {
|
|
195
|
-
if (notStagedTaskIds.has(dependency)) {
|
|
196
|
-
// dependency has not been staged yet, this task is not ready to be staged.
|
|
197
|
-
ready = false;
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// Some dependency still has not been staged, skip it for now, it will be processed again
|
|
202
|
-
if (!ready) {
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
// All the dependencies have been staged, let's stage it.
|
|
206
|
-
const task = taskGraph.tasks[taskId];
|
|
207
|
-
currentStage.push(task);
|
|
208
|
-
}
|
|
209
|
-
// Remove the entire new stage of tasks from the list
|
|
210
|
-
for (const task of currentStage) {
|
|
211
|
-
notStagedTaskIds.delete(task.id);
|
|
212
|
-
}
|
|
213
|
-
stageIndex++;
|
|
214
|
-
}
|
|
215
|
-
return stages;
|
|
216
|
-
}
|
|
217
|
-
createTaskGraph(tasks) {
|
|
218
|
-
const graph = {
|
|
219
|
-
tasks: {},
|
|
220
|
-
dependencies: {},
|
|
221
|
-
};
|
|
222
|
-
for (const task of tasks) {
|
|
223
|
-
graph.tasks[task.id] = task;
|
|
224
|
-
graph.dependencies[task.id] = [];
|
|
225
|
-
const dependencyConfigs = utils_1.getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
|
|
226
|
-
if (!dependencyConfigs) {
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
const projectDependencies = new Set(this.projectGraph.dependencies[task.target.project].map((dependency) => dependency.target));
|
|
230
|
-
for (const dependencyConfig of dependencyConfigs) {
|
|
231
|
-
if (dependencyConfig.projects === 'self') {
|
|
232
|
-
for (const t of tasks) {
|
|
233
|
-
if (t.target.project === task.target.project &&
|
|
234
|
-
t.target.target === dependencyConfig.target) {
|
|
235
|
-
graph.dependencies[task.id].push(t.id);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
else if (dependencyConfig.projects === 'dependencies') {
|
|
240
|
-
for (const t of tasks) {
|
|
241
|
-
if (projectDependencies.has(t.target.project) &&
|
|
242
|
-
t.target.target === dependencyConfig.target) {
|
|
243
|
-
graph.dependencies[task.id].push(t.id);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return graph;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
function getDefaultDependencyConfigs(nxJson, runnerOptions) {
|
|
253
|
-
var _a, _b;
|
|
254
|
-
const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
|
|
255
|
-
const strictlyOrderedTargets = runnerOptions
|
|
256
|
-
? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
|
|
257
|
-
: [];
|
|
258
|
-
// Strictly Ordered Targets depend on their dependencies
|
|
259
|
-
for (const target of strictlyOrderedTargets) {
|
|
260
|
-
defaults[target] = defaults[target] || [];
|
|
261
|
-
defaults[target].push({
|
|
262
|
-
target,
|
|
263
|
-
projects: 'dependencies',
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
return defaults;
|
|
267
|
-
}
|
|
268
|
-
//# sourceMappingURL=distributed-execution.runner.js.map
|
|
1
|
+
const a7_0x4c9f=['../../../utilities/environment','output','runUrl','VERBOSE_LOGGING','getOutputs','completedTasks','Cache','__awaiter','axiosException','tasks','Starting\x20distributed\x20command\x20execution','Retrieving\x20artifacts\x20from\x20','startTask','@nrwl/workspace/src/utilities/output','COMPLETED','assign','DistributedExecutionApi','See\x20run\x20details\x20at\x20','nx.json','parse','write','readFileSync','../../file-storage/file-storage','unparse','apply','terminalOutput','error:\x20','Found\x20unknown\x20task:\x20','nodes','../../file-storage/e2e-encryption','Successfully\x20completed\x20running\x20the\x20command.','hash','size','printRunGroupError','dependencies','configuration','Command\x20execution\x20failed.','strip-json-comments','addVerticalSeparator','getRunGroup','target','projectGraph','nxCloudDistributedTasksRunner','value','map','../../error/print-run-group-error','defineProperty','FileStorage','projects','self','log','status','./node_modules/.cache/nx','join','completeRunGroupWithError','then','createTaskGraph','../../../utilities/create-no-new-messages-timeout','get','catch','url','Extracting\x20artifacts','lifeCycle','Waiter','Observable','build','wait','createStartRequest','executionStatus:\x20','@nrwl/workspace/src/tasks-runner/cache','criticalErrorMessage','defaultTargetDependencies','length','exit','has','ENCRYPTION_KEY','targetDependencies','E2EEncryption','next','scheduleTask','copyFilesFromCache','./distributed-execution.api','createNoNewMessagesTimeout','rxjs/internal/Observable','@nrwl/workspace/src/tasks-runner/utils','push','reset','retrieve','Status\x20update','executionStatus','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','../../../utilities/waiter','executionId:\x20','taskId','note','endTask','Unable\x20to\x20complete\x20a\x20run.','throw','project','delete','splitTasksIntoStages','error','stdout','find','__esModule','encryptionKey','overrides','commandStatus','Distributed\x20Execution\x20Terminated','Error:','cacheDirectory','message'];(function(_0x1ba93d,_0x4c9f0f){const _0x42553f=function(_0xad4e3d){while(--_0xad4e3d){_0x1ba93d['push'](_0x1ba93d['shift']());}};_0x42553f(++_0x4c9f0f);}(a7_0x4c9f,0xd8));const a7_0x4255=function(_0x1ba93d,_0x4c9f0f){_0x1ba93d=_0x1ba93d-0x0;let _0x42553f=a7_0x4c9f[_0x1ba93d];return _0x42553f;};'use strict';var __awaiter=this&&this[a7_0x4255('0xf')]||function(_0x245f4a,_0x4554a7,_0x4ffad3,_0x3bdaf3){function _0x123642(_0x8d89ba){return _0x8d89ba instanceof _0x4ffad3?_0x8d89ba:new _0x4ffad3(function(_0x448b63){_0x448b63(_0x8d89ba);});}return new(_0x4ffad3||(_0x4ffad3=Promise))(function(_0x24f7ad,_0x3fe69a){function _0x1660b8(_0x505c03){try{_0x20a24b(_0x3bdaf3['next'](_0x505c03));}catch(_0x2b1a3f){_0x3fe69a(_0x2b1a3f);}}function _0x178abc(_0x120aec){try{_0x20a24b(_0x3bdaf3[a7_0x4255('0x69')](_0x120aec));}catch(_0x15cc5e){_0x3fe69a(_0x15cc5e);}}function _0x20a24b(_0x3bdca8){_0x3bdca8['done']?_0x24f7ad(_0x3bdca8[a7_0x4255('0x33')]):_0x123642(_0x3bdca8[a7_0x4255('0x33')])['then'](_0x1660b8,_0x178abc);}_0x20a24b((_0x3bdaf3=_0x3bdaf3[a7_0x4255('0x20')](_0x245f4a,_0x4554a7||[]))[a7_0x4255('0x56')]());});};Object[a7_0x4255('0x36')](exports,a7_0x4255('0x0'),{'value':!![]});exports[a7_0x4255('0x32')]=void 0x0;const Observable_1=require(a7_0x4255('0x5b'));const cache_1=require(a7_0x4255('0x4d'));const output_1=require(a7_0x4255('0x15'));const utils_1=require(a7_0x4255('0x5c'));const stripJsonComments=require(a7_0x4255('0x2d'));const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x4255('0x59'));const file_storage_1=require(a7_0x4255('0x1e'));const e2e_encryption_1=require(a7_0x4255('0x25'));const waiter_1=require(a7_0x4255('0x63'));const environment_1=require(a7_0x4255('0x8'));const print_run_group_error_1=require(a7_0x4255('0x35'));const create_no_new_messages_timeout_1=require(a7_0x4255('0x41'));class NoopLifeCycle{[a7_0x4255('0x57')](_0x51183a){}[a7_0x4255('0x14')](_0x13e2c4){}[a7_0x4255('0x67')](_0x4ab680,_0xba7384){}}function runDistributedExecution(_0x26422f,_0x5c8697,_0x25b5f3,_0x10f225,_0x316354,_0x2b69b3,_0x597544){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3c1882=JSON[a7_0x4255('0x1b')](stripJsonComments(fs_1[a7_0x4255('0x1d')](a7_0x4255('0x1a'))['toString']()));const _0x3a0a38=new TaskOrderer(_0x25b5f3[a7_0x4255('0x31')],getDefaultDependencyConfigs(_0x3c1882,_0x5c8697))[a7_0x4255('0x6c')](_0x597544);const _0x384fff=yield _0x26422f['start'](distributed_execution_api_1[a7_0x4255('0x4b')](_0x2b69b3,_0x3a0a38,_0x5c8697));return yield processTasks(_0x26422f,_0x10f225,_0x316354,_0x5c8697,_0x384fff,_0x597544,_0x25b5f3);});}function processTasks(_0x5a73be,_0x583f85,_0x5b23c4,_0x2c55a1,_0x46d9e5,_0x4ebeee,_0x3ed123){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x30820d={};const _0x20974a=create_no_new_messages_timeout_1[a7_0x4255('0x5a')]();const _0x14c154=new waiter_1[(a7_0x4255('0x47'))]();while(!![]){if(environment_1[a7_0x4255('0xb')]){output_1['output']['note']({'title':'Waiting...'});}yield _0x14c154[a7_0x4255('0x4a')]();const _0x3584c3=yield _0x5a73be[a7_0x4255('0x3b')](_0x46d9e5);if(environment_1['VERBOSE_LOGGING']){output_1['output'][a7_0x4255('0x66')]({'title':a7_0x4255('0x60'),'bodyLines':[a7_0x4255('0x64')+_0x46d9e5,a7_0x4255('0x4c')+_0x3584c3[a7_0x4255('0x61')],'number\x20of\x20completed\x20tasks:\x20'+_0x3584c3['completedTasks'][a7_0x4255('0x50')],a7_0x4255('0x22')+_0x3584c3[a7_0x4255('0x4e')]]});}if(_0x3584c3[a7_0x4255('0x4e')]){output_1[a7_0x4255('0x9')][a7_0x4255('0x6d')]({'title':a7_0x4255('0x4'),'bodyLines':[a7_0x4255('0x5'),_0x3584c3[a7_0x4255('0x4e')]]});process[a7_0x4255('0x51')](0x1);}_0x20974a(_0x3584c3[a7_0x4255('0xd')][a7_0x4255('0x50')]);for(const _0x4d8919 of _0x3584c3[a7_0x4255('0xd')]){if(_0x30820d[_0x4d8919[a7_0x4255('0x65')]])continue;yield processTask(_0x583f85,_0x5b23c4,_0x3ed123,_0x2c55a1,_0x4ebeee,_0x4d8919);_0x14c154[a7_0x4255('0x5e')]();_0x30820d[_0x4d8919['taskId']]=!![];}if(_0x3584c3[a7_0x4255('0x61')]===a7_0x4255('0x16')){return{'commandStatus':_0x3584c3['commandStatus'],'runUrl':_0x3584c3['runUrl']};}}});}function processTask(_0x49cfc3,_0xd5228e,_0x3a72b8,_0x1099ef,_0x2b06e2,_0x37e08c){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output_1[a7_0x4255('0x9')][a7_0x4255('0x66')]({'title':'Processing\x20task\x20'+_0x37e08c[a7_0x4255('0x65')]});}const _0x30b855=_0x2b06e2[a7_0x4255('0x6f')](_0x3101df=>_0x37e08c[a7_0x4255('0x65')]===_0x3101df['id']);if(!_0x30b855){throw new Error(a7_0x4255('0x23')+_0x37e08c[a7_0x4255('0x65')]);}if(environment_1[a7_0x4255('0xb')]){output_1[a7_0x4255('0x9')]['note']({'title':a7_0x4255('0x13')+_0x37e08c[a7_0x4255('0x44')]});}yield _0x49cfc3[a7_0x4255('0x5f')](_0x37e08c[a7_0x4255('0x27')],_0x37e08c[a7_0x4255('0x44')],_0x1099ef[a7_0x4255('0x6')]||a7_0x4255('0x3c'));const _0x50c2d8=yield _0xd5228e[a7_0x4255('0x42')](Object[a7_0x4255('0x17')](Object[a7_0x4255('0x17')]({},_0x30b855),{'hash':_0x37e08c[a7_0x4255('0x27')]}));const _0x50721a=utils_1[a7_0x4255('0xc')](_0x3a72b8[a7_0x4255('0x31')][a7_0x4255('0x24')],_0x30b855);if(environment_1[a7_0x4255('0xb')]){output_1[a7_0x4255('0x9')][a7_0x4255('0x66')]({'title':a7_0x4255('0x45'),'bodyLines':_0x50721a});}yield _0xd5228e[a7_0x4255('0x58')](_0x37e08c[a7_0x4255('0x27')],_0x50c2d8,_0x50721a);output_1[a7_0x4255('0x9')]['logCommand'](getCommand(_0x30b855));process[a7_0x4255('0x6e')][a7_0x4255('0x1c')](_0x50c2d8[a7_0x4255('0x21')]);output_1[a7_0x4255('0x9')][a7_0x4255('0x2e')]();});}function getCommand(_0x59c68e){const _0x5a6924=utils_1[a7_0x4255('0x1f')](_0x59c68e[a7_0x4255('0x2')]||{});const _0x3c2079=_0x59c68e[a7_0x4255('0x30')][a7_0x4255('0x2b')]?':'+_0x59c68e[a7_0x4255('0x30')][a7_0x4255('0x2b')]:'';return['nx','run',_0x59c68e[a7_0x4255('0x30')][a7_0x4255('0x6a')]+':'+_0x59c68e[a7_0x4255('0x30')][a7_0x4255('0x30')]+_0x3c2079,..._0x5a6924][a7_0x4255('0x3d')]('\x20');}const nxCloudDistributedTasksRunner=(_0x5aae1b,_0x276128,_0x1d2409)=>{if(environment_1[a7_0x4255('0xb')]){output_1[a7_0x4255('0x9')][a7_0x4255('0x66')]({'title':a7_0x4255('0x12')});}_0x276128[a7_0x4255('0x46')]=new NoopLifeCycle();const _0x3ebf3c=environment_1[a7_0x4255('0x2f')]();if(!_0x3ebf3c){print_run_group_error_1[a7_0x4255('0x29')]();return process[a7_0x4255('0x51')](0x1);}const _0x5ddc00=new e2e_encryption_1[(a7_0x4255('0x55'))](environment_1[a7_0x4255('0x53')]||_0x276128[a7_0x4255('0x1')]);const _0x3461c8=new file_storage_1[(a7_0x4255('0x37'))](_0x5ddc00,0x3);const _0x28d095=new cache_1[(a7_0x4255('0xe'))](_0x276128);const _0x5d8bdd=new distributed_execution_api_1[(a7_0x4255('0x18'))](_0x276128);runDistributedExecution(_0x5d8bdd,_0x276128,_0x1d2409,_0x3461c8,_0x28d095,_0x3ebf3c,_0x5aae1b)[a7_0x4255('0x3f')](_0x1cdc07=>{if(_0x1cdc07[a7_0x4255('0x3')]===0x0){output_1[a7_0x4255('0x9')]['success']({'title':a7_0x4255('0x26'),'bodyLines':[a7_0x4255('0x19')+_0x1cdc07[a7_0x4255('0xa')]]});}else{output_1[a7_0x4255('0x9')][a7_0x4255('0x6d')]({'title':a7_0x4255('0x2c'),'bodyLines':[a7_0x4255('0x19')+_0x1cdc07['runUrl']]});}process[a7_0x4255('0x51')](_0x1cdc07['commandStatus']);})[a7_0x4255('0x43')](_0x3933c0=>{output_1[a7_0x4255('0x9')][a7_0x4255('0x6d')]({'title':a7_0x4255('0x68'),'bodyLines':[_0x3933c0['message']]});if(_0x3933c0['axiosException']){console[a7_0x4255('0x3a')](_0x3933c0[a7_0x4255('0x10')]);}else{console[a7_0x4255('0x3a')](_0x3933c0);}_0x5d8bdd[a7_0x4255('0x3e')](_0x3ebf3c,a7_0x4255('0x62')+_0x3933c0[a7_0x4255('0x7')]+'\x22')['finally'](()=>process[a7_0x4255('0x51')](0x1));});return new Observable_1[(a7_0x4255('0x48'))](()=>{});};exports[a7_0x4255('0x32')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x4817de,_0x5d94a1){this['projectGraph']=_0x4817de;this[a7_0x4255('0x4f')]=_0x5d94a1;}[a7_0x4255('0x6c')](_0x4524f8){if(_0x4524f8[a7_0x4255('0x50')]===0x0)return[];const _0x54f51b=[];const _0x46e136=this[a7_0x4255('0x40')](_0x4524f8);const _0xf56638=new Set(_0x4524f8[a7_0x4255('0x34')](_0x5d4bf2=>_0x5d4bf2['id']));let _0x4c99f4=0x0;while(_0xf56638[a7_0x4255('0x28')]>0x0){const _0x4d5270=_0x54f51b[_0x4c99f4]=[];for(const _0x23f52a of _0xf56638){let _0x46e7aa=!![];for(const _0x2030c4 of _0x46e136[a7_0x4255('0x2a')][_0x23f52a]){if(_0xf56638[a7_0x4255('0x52')](_0x2030c4)){_0x46e7aa=![];break;}}if(!_0x46e7aa){continue;}const _0x51b5b5=_0x46e136[a7_0x4255('0x11')][_0x23f52a];_0x4d5270[a7_0x4255('0x5d')](_0x51b5b5);}for(const _0x325537 of _0x4d5270){_0xf56638[a7_0x4255('0x6b')](_0x325537['id']);}_0x4c99f4++;}return _0x54f51b;}[a7_0x4255('0x40')](_0x56a6a8){const _0x5d370f={'tasks':{},'dependencies':{}};for(const _0x2b10e7 of _0x56a6a8){_0x5d370f[a7_0x4255('0x11')][_0x2b10e7['id']]=_0x2b10e7;_0x5d370f[a7_0x4255('0x2a')][_0x2b10e7['id']]=[];const _0x350dfb=utils_1['getDependencyConfigs'](_0x2b10e7[a7_0x4255('0x30')],this['defaultTargetDependencies'],this[a7_0x4255('0x31')]);if(!_0x350dfb){continue;}const _0x56b242=new Set(this['projectGraph'][a7_0x4255('0x2a')][_0x2b10e7[a7_0x4255('0x30')][a7_0x4255('0x6a')]][a7_0x4255('0x34')](_0x3c1f0f=>_0x3c1f0f['target']));for(const _0x155720 of _0x350dfb){if(_0x155720[a7_0x4255('0x38')]===a7_0x4255('0x39')){for(const _0x2b5560 of _0x56a6a8){if(_0x2b5560['target'][a7_0x4255('0x6a')]===_0x2b10e7['target'][a7_0x4255('0x6a')]&&_0x2b5560[a7_0x4255('0x30')]['target']===_0x155720['target']){_0x5d370f[a7_0x4255('0x2a')][_0x2b10e7['id']][a7_0x4255('0x5d')](_0x2b5560['id']);}}}else if(_0x155720[a7_0x4255('0x38')]===a7_0x4255('0x2a')){for(const _0x262663 of _0x56a6a8){if(_0x56b242[a7_0x4255('0x52')](_0x262663[a7_0x4255('0x30')][a7_0x4255('0x6a')])&&_0x262663[a7_0x4255('0x30')]['target']===_0x155720[a7_0x4255('0x30')]){_0x5d370f[a7_0x4255('0x2a')][_0x2b10e7['id']][a7_0x4255('0x5d')](_0x262663['id']);}}}}}return _0x5d370f;}}function getDefaultDependencyConfigs(_0x49d5c2,_0x5d9074){var _0x55efad,_0x49cd64;const _0x595c79=(_0x55efad=_0x49d5c2[a7_0x4255('0x54')])!==null&&_0x55efad!==void 0x0?_0x55efad:{};const _0x3be6dd=_0x5d9074?(_0x49cd64=_0x5d9074['strictlyOrderedTargets'])!==null&&_0x49cd64!==void 0x0?_0x49cd64:[a7_0x4255('0x49')]:[];for(const _0x18f49b of _0x3be6dd){_0x595c79[_0x18f49b]=_0x595c79[_0x18f49b]||[];_0x595c79[_0x18f49b][a7_0x4255('0x5d')]({'target':_0x18f49b,'projects':a7_0x4255('0x2a')});}return _0x595c79;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA
|
|
1
|
+
{"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,yDAAsD;AACtD,kEAA+D;AAC/D,iEAA8D;AAC9D,kEAIgD;AAChD,yDAAyD;AACzD,2BAAkC;AAClC,2EAGqC;AAErC,kEAA8D;AAC9D,sEAAkE;AAClE,sDAAmD;AACnD,gEAIwC;AACxC,6EAAuE;AACvE,sGAA+F;AAE/F,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,iBAAY,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,WAAW,CAC5B,OAAO,CAAC,YAAY,EACpB,2BAA2B,CAAC,MAAM,EAAE,OAAc,CAAC,CACpD,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAE9B,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,8CAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1E,OAAO,MAAM,YAAY,CACvB,GAAG,EACH,WAAW,EACX,KAAK,EACL,OAAO,EACP,EAAE,EACF,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,YAAY,CACzB,G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Property(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageReporter = void 0;
|
|
4
|
-
const output_1 = require("@nrwl/workspace/src/
|
|
4
|
+
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
5
5
|
const print_message_1 = require("../../utilities/print-message");
|
|
6
6
|
class MessageReporter {
|
|
7
7
|
constructor(options) {
|
|
@@ -47,7 +47,8 @@ class MessageReporter {
|
|
|
47
47
|
: e.response.data;
|
|
48
48
|
}
|
|
49
49
|
else if (e.response && e.response.status === 402) {
|
|
50
|
-
if (this.options.showUsageWarnings === false
|
|
50
|
+
if (this.options.showUsageWarnings === false ||
|
|
51
|
+
this.options.showUsageWarnings === undefined)
|
|
51
52
|
return null;
|
|
52
53
|
return e.response.data.message
|
|
53
54
|
? e.response.data.message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-reporter.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/terminal-output/message-reporter.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"message-reporter.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/terminal-output/message-reporter.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAE9D,iEAA6D;AAE7D,MAAa,eAAe;IAK1B,YAA6B,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;QAJ5D,eAAU,GAAkB,IAAI,CAAC;QACjC,aAAQ,GAAkB,IAAI,CAAC;QAC/B,YAAO,GAAkB,IAAI,CAAC;IAEiC,CAAC;IAEhE,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAM,SAAS,GAAG,EAAW,CAAC;YAC9B,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC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AAS;gBAE5C,OAAO,IAAI,CAAC;YACd,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC5B,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO;gBACzB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;SACrB;aAAM;YACL,IAAI,OAAO,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE;gBAC5D,OAAO,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;aAC1C;iBAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACxC,OAAO,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;aAClC;YACD,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,OAAO,GAAG,IAAI,EAAE,CAAC;SACxC;IACH,CAAC;CACF;AAhED,0CAgEC"}
|
|
@@ -15,7 +15,8 @@ const rxjs_1 = require("rxjs");
|
|
|
15
15
|
function updateNxJson(json, token) {
|
|
16
16
|
var _a, _b, _c;
|
|
17
17
|
const alreadySetOptions = (_c = (_b = (_a = json.tasksRunnerOptions) === null || _a === void 0 ? void 0 : _a.default) === null || _b === void 0 ? void 0 : _b.options) !== null && _c !== void 0 ? _c : {};
|
|
18
|
-
const options = Object.assign(Object.assign({}, alreadySetOptions), { accessToken: token
|
|
18
|
+
const options = Object.assign(Object.assign({}, alreadySetOptions), { accessToken: token });
|
|
19
|
+
// TODO: remove after Nx 13 is out
|
|
19
20
|
if (process.env.NRWL_API) {
|
|
20
21
|
options.url = process.env.NRWL_API;
|
|
21
22
|
}
|
|
@@ -63,7 +64,7 @@ function createNxCloudWorkspace(workspaceName) {
|
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
function printMessage(url) {
|
|
66
|
-
const output = require('@nrwl/workspace/src/
|
|
67
|
+
const output = require('@nrwl/workspace/src/utilities/output').output;
|
|
67
68
|
let host = 'nx.app';
|
|
68
69
|
try {
|
|
69
70
|
host = new (require('url').URL)(url).host;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/generators/init/init.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,+BAAkC;AAElC,SAAS,YAAY,CAAC,IAAI,EAAE,KAAa;;IACvC,MAAM,iBAAiB,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,OAAO,0CAAE,OAAO,mCAAI,EAAE,CAAC;IAE1E,MAAM,OAAO,mCACR,iBAAiB,KACpB,WAAW,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/generators/init/init.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,+BAAkC;AAElC,SAAS,YAAY,CAAC,IAAI,EAAE,KAAa;;IACvC,MAAM,iBAAiB,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,OAAO,0CAAE,OAAO,mCAAI,EAAE,CAAC;IAE1E,MAAM,OAAO,mCACR,iBAAiB,KACpB,WAAW,EAAE,KAAK,GACnB,CAAC;IAEF,kCAAkC;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE;QACxB,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;KACpC;IACD,IAAI,OAAO,CAAC,GAA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ClC,MAAM,CAAC,GAAG,MAAM,sBAAsB,CAAC,YAAY,EAAE,CAAC,CAAC;QACvD,uBAAuB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;CAAA;AAJD,8BAIC;AAED,SAAgB,SAAS;IACvB,OAAO,GAAS,EAAE;QAChB,MAAM,CAAC,GAAG,MAAM,sBAAsB,CAAC,YAAY,EAAE,CAAC,CAAC;QACvD,OAAO,CAAC,IAAS,EAAE,OAAY,EAAE,EAAE;YACjC,MAAM,UAAU,GAAI,OAAO,CAAC,MAAM,CAAC,QAAgB,CAAC,UAAU,CAAC;YAC/D,UAAU,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACjE,OAAO,CAAC,OAAO,CAAC;gBACd,eAAe;oBACb,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;gBACzC,CAAC;aACF,CAAC,CAAC;YACH,8BAA8B,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC,CAAC;IACJ,CAAC,CAAA,CAAC;AACJ,CAAC;AAdD,8BAcC"}
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
12
|
+
const from_1 = require("rxjs/internal/observable/from");
|
|
13
|
+
const switchMap_1 = require("rxjs/internal/operators/switchMap");
|
|
13
14
|
const tasks_runner_v2_1 = require("@nrwl/workspace/src/tasks-runner/tasks-runner-v2");
|
|
14
|
-
const output_1 = require("@nrwl/workspace/src/
|
|
15
|
+
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
15
16
|
const environment_1 = require("./utilities/environment");
|
|
16
17
|
const axios_1 = require("./utilities/axios");
|
|
17
|
-
const operators_1 = require("rxjs/operators");
|
|
18
18
|
const cloud_enabled_runner_1 = require("./core/runners/cloud-enabled/cloud-enabled.runner");
|
|
19
19
|
const nxCloudTasksRunner = (tasks, options, context) => {
|
|
20
20
|
if (!environment_1.ACCESS_TOKEN && !options.accessToken) {
|
|
@@ -30,7 +30,7 @@ const nxCloudTasksRunner = (tasks, options, context) => {
|
|
|
30
30
|
if (process.env.NX_CLOUD_DISTRIBUTED_EXECUTION === 'true' &&
|
|
31
31
|
!environment_1.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION) {
|
|
32
32
|
verifyAllOperationsAreCacheableOnMainJob(tasks, options);
|
|
33
|
-
return
|
|
33
|
+
return from_1.from(verifyNxCloudWorkspaceEnabled(options)).pipe(switchMap_1.switchMap((res) => {
|
|
34
34
|
if (res.data.enabled) {
|
|
35
35
|
return require('./core/runners/distributed-execution/distributed-execution.runner').nxCloudDistributedTasksRunner(tasks, options, context);
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-cloud-tasks-runner.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/lib/nx-cloud-tasks-runner.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"nx-cloud-tasks-runner.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/lib/nx-cloud-tasks-runner.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,wDAAqD;AACrD,iEAA8D;AAC9D,sFAAiF;AACjF,iEAA8D;AAE9D,yDAMiC;AACjC,6CAA+E;AAC/E,4FAA4F;AAE5F,MAAM,kBAAkB,GAAQ,CAC9B,KAAa,EACb,OAA+B,EAC/B,OAAY,EACe,EAAE;IAC7B,IAAI,CAAC,0BAAY,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;QACzC,OAAO,+BAAa,CAAC,KAAK,EAAE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,kBAAe,kBAAkB,CAAC"}
|
package/lib/utilities/axios.js
CHANGED
|
@@ -47,7 +47,8 @@ function axiosMultipleTries(axiosCallCreator, attemptsLeft = 10) {
|
|
|
47
47
|
code === 'EAI_AGAIN' ||
|
|
48
48
|
code === 'ENOTFOUND' ||
|
|
49
49
|
code === 'EPROTO' ||
|
|
50
|
-
code === 404
|
|
50
|
+
code === 404 ||
|
|
51
|
+
code === 503) {
|
|
51
52
|
if (attemptsLeft === 1) {
|
|
52
53
|
throw new AxiosException('timeout', `Cannot connect to Nx Cloud. Code: ${code}`, e);
|
|
53
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,+CAKuB;AACvB,qCAAgC;AAGhC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B,MAAa,cAAc;IACzB,YACkB,IAA2B,EAC3B,OAAe,EACf,cAAmB;QAFnB,SAAI,GAAJ,IAAI,CAAuB;QAC3B,YAAO,GAAP,OAAO,CAAQ;QACf,mBAAc,GAAd,cAAc,CAAK;IAClC,CAAC;CACL;AAND,wCAMC;AAED,SAAgB,sBAAsB,CAAC,OAA+B;IACpE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI,qBAAqB,CAAC;IACrD,MAAM,SAAS,GAAG,0BAAY,CAAC,CAAC,CAAC,0BAAY,CAAC,CAAC,CAAC,OAAO,CAAC,WAAY,CAAC;IAErE,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,SAAS,EAAE,CAAC,CAAC;KACzD;IAED,OAAO,KAAK,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,kCAAoB,CAAC,CAAC,CAAC,+BAAiB,CAAC,CAAC,CAAC,KAAK;QAC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,OAAO;oBACzB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACpB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;oBAC/B,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;iBACrB;gBACD,MAAM,IAAI,cAAc,CACtB,SAAS,EACT,6CAA6C,OAAO,EAAE,EACtD,CAAC,CACF,CAAC;aACH;SACF;IACH,CAAC;CAAA;
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,+CAKuB;AACvB,qCAAgC;AAGhC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B,MAAa,cAAc;IACzB,YACkB,IAA2B,EAC3B,OAAe,EACf,cAAmB;QAFnB,SAAI,GAAJ,IAAI,CAAuB;QAC3B,YAAO,GAAP,OAAO,CAAQ;QACf,mBAAc,GAAd,cAAc,CAAK;IAClC,CAAC;CACL;AAND,wCAMC;AAED,SAAgB,sBAAsB,CAAC,OAA+B;IACpE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI,qBAAqB,CAAC;IACrD,MAAM,SAAS,GAAG,0BAAY,CAAC,CAAC,CAAC,0BAAY,CAAC,CAAC,CAAC,OAAO,CAAC,WAAY,CAAC;IAErE,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,SAAS,EAAE,CAAC,CAAC;KACzD;IAED,OAAO,KAAK,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,kCAAoB,CAAC,CAAC,CAAC,+BAAiB,CAAC,CAAC,CAAC,KAAK;QACzD,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE;KACtC,CAAC,CAAC;AACL,CAAC;AAbD,wDAaC;AAED,SAAsB,kBAAkB,CACtC,gBAAoC,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AQ,EAAE;oBAC/B,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;iBACrB;gBACD,MAAM,IAAI,cAAc,CACtB,SAAS,EACT,6CAA6C,OAAO,EAAE,EACtD,CAAC,CACF,CAAC;aACH;SACF;IACH,CAAC;CAAA;AAtDD,gDAsDC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { CloudTaskRunnerOptions } from '../core/models/cloud-task-runner-options';
|
|
2
2
|
import { MachineInfo } from '../core/models/machine-info.model';
|
|
3
|
-
export declare const NX_CLOUD_NO_TIMEOUTS: boolean;
|
|
4
3
|
export declare const UNLIMITED_TIMEOUT = 9999999;
|
|
5
4
|
export declare const NO_MESSAGES_TIMEOUT = 3600000;
|
|
6
|
-
export declare const VERBOSE_LOGGING: boolean;
|
|
7
5
|
export declare const DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = 166;
|
|
8
|
-
export declare const ACCESS_TOKEN: string | undefined;
|
|
9
6
|
export declare const INVOKED_BY_RUNNER: boolean;
|
|
10
7
|
export declare const NX_CLOUD_DISTRIBUTED_EXECUTION_ID: string | undefined;
|
|
11
8
|
export declare const AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION: boolean;
|
|
12
9
|
export declare const NUMBER_OF_TRIES: number;
|
|
10
|
+
export declare let ACCESS_TOKEN: any;
|
|
11
|
+
export declare let ENCRYPTION_KEY: any;
|
|
12
|
+
export declare let VERBOSE_LOGGING: any;
|
|
13
|
+
export declare let NX_CLOUD_NO_TIMEOUTS: any;
|
|
13
14
|
export declare function extractGitSha(): string | undefined;
|
|
14
15
|
export declare function getRunGroup(): string | undefined;
|
|
15
16
|
export declare function getBranch(): string | undefined;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseCommand = exports.getMachineInfo = exports.getBranch = exports.getRunGroup = exports.extractGitSha = exports.
|
|
3
|
+
exports.parseCommand = exports.getMachineInfo = exports.getBranch = exports.getRunGroup = exports.extractGitSha = exports.NX_CLOUD_NO_TIMEOUTS = exports.VERBOSE_LOGGING = exports.ENCRYPTION_KEY = exports.ACCESS_TOKEN = exports.NUMBER_OF_TRIES = exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = exports.INVOKED_BY_RUNNER = exports.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = exports.NO_MESSAGES_TIMEOUT = exports.UNLIMITED_TIMEOUT = void 0;
|
|
4
4
|
const node_machine_id_1 = require("node-machine-id");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
|
-
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const app_root_1 = require("@nrwl/tao/src/utils/app-root");
|
|
9
|
+
const dotenv = require("dotenv");
|
|
7
10
|
exports.UNLIMITED_TIMEOUT = 9999999;
|
|
8
11
|
exports.NO_MESSAGES_TIMEOUT = 3600000; // 60 minutes
|
|
9
|
-
exports.VERBOSE_LOGGING = process.env.NX_VERBOSE_LOGGING === 'true';
|
|
10
12
|
exports.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = 166;
|
|
11
|
-
exports.ACCESS_TOKEN = process.env.NX_CLOUD_AUTH_TOKEN || process.env.NX_CLOUD_ACCESS_TOKEN;
|
|
12
13
|
exports.INVOKED_BY_RUNNER = process.env.NX_INVOKED_BY_RUNNER === 'true';
|
|
13
14
|
exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = process.env.NX_CLOUD_DISTRIBUTED_EXECUTION_ID;
|
|
14
15
|
exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION = !!exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID;
|
|
15
16
|
exports.NUMBER_OF_TRIES = exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION ? 3 : 1;
|
|
17
|
+
loadEnvVars();
|
|
16
18
|
function extractGitSha() {
|
|
17
19
|
try {
|
|
18
20
|
return child_process_1.execSync(`git rev-parse HEAD`).toString().trim();
|
|
@@ -22,6 +24,30 @@ function extractGitSha() {
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
exports.extractGitSha = extractGitSha;
|
|
27
|
+
function parseEnv() {
|
|
28
|
+
try {
|
|
29
|
+
const envContents = fs_1.readFileSync(path_1.join(app_root_1.appRootPath, 'nx-cloud.env'));
|
|
30
|
+
return dotenv.parse(envContents);
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function loadEnvVars() {
|
|
37
|
+
const parsed = parseEnv();
|
|
38
|
+
exports.ACCESS_TOKEN =
|
|
39
|
+
process.env.NX_CLOUD_AUTH_TOKEN ||
|
|
40
|
+
process.env.NX_CLOUD_ACCESS_TOKEN ||
|
|
41
|
+
parsed.NX_CLOUD_AUTH_TOKEN;
|
|
42
|
+
exports.ENCRYPTION_KEY =
|
|
43
|
+
process.env.NX_CLOUD_ENCRYPTION_KEY || parsed.NX_CLOUD_ENCRYPTION_KEY;
|
|
44
|
+
exports.VERBOSE_LOGGING =
|
|
45
|
+
process.env.NX_VERBOSE_LOGGING === 'true' ||
|
|
46
|
+
parsed.NX_VERBOSE_LOGGING === 'true';
|
|
47
|
+
exports.NX_CLOUD_NO_TIMEOUTS =
|
|
48
|
+
process.env.NX_CLOUD_NO_TIMEOUTS === 'true' ||
|
|
49
|
+
parsed.NX_CLOUD_NO_TIMEOUTS === 'true';
|
|
50
|
+
}
|
|
25
51
|
function getRunGroup() {
|
|
26
52
|
if (process.env.NX_RUN_GROUP !== undefined) {
|
|
27
53
|
return process.env.NX_RUN_GROUP;
|
|
@@ -82,6 +108,7 @@ exports.getBranch = getBranch;
|
|
|
82
108
|
function getMachineInfo(options) {
|
|
83
109
|
const os = require('os');
|
|
84
110
|
let machineId = '';
|
|
111
|
+
// TODO: vsavkin remove it
|
|
85
112
|
if (options.canTrackAnalytics) {
|
|
86
113
|
try {
|
|
87
114
|
machineId = node_machine_id_1.machineIdSync();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/environment.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAEhD,iDAAyC;
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/environment.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAEhD,iDAAyC;AACzC,2BAAkC;AAClC,+BAA4B;AAC5B,2DAA2D;AAC3D,iCAAiC;AAEpB,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,mBAAmB,GAAG,OAAO,CAAC,CAAC,aAAa;AAC5C,QAAA,qDAAqD,GAAG,GAAG,CAAC;AAC5D,QAAA,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,MAAM,CAAC;AAChE,QAAA,iCAAiC,GAC5C,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC;AACnC,QAAA,sCAAsC,GACjD,CAAC,CAAC,yCAAiC,CAAC;AACzB,QAAA,eAAe,GAAG,8CAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAO9E,WAAW,EAAE,CAAC;AAEd,SAAgB,aAAa;IAC3B,IAAI;QACF,OAAO,wBAAQ,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;KACzD;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAND,sCAMC;AAED,SAAS,QAAQ;IACf,IAAI;QACF,MAAM,WAAW,GAAG,iBAAY,CAAC,WAAI,CAAC,sBAAW,EAAE,cAAc,CAAC,CAAC,CAAC;QACpE,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,GAAG,CAAC,mCAAmC,KAAK,SAAS,EAAE;QACjE,OAAO,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;KACxD;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAtCD,8BAsCC;AAED,SAAgB,cAAc,CAAC,OAA+B;IAC5D,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,0BAA0B;IAC1B,IAAI,OAAO,CAAC,iBAAiB,EAAE;QAC7B,IAAI;YACF,SAAS,GAAG,+BAAa,EAAE,CAAC;SAC7B;QAAC,WAAM,GAAE;KACX;IAED,OAAO;QACL,SAAS;QACT,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;QACvB,OAAO,EAAG,EAAU,CAAC,OAAO,CAAC,CAAC,CAAE,EAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;QACzD,QAAQ,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM;KAC3B,CAAC;AACJ,CAAC;AAjBD,wCAiBC;AAED,SAAgB,YAAY;;IAC1B,MAAM,GAAG,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,SAAS,CAAC;IACvD,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACpD,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AAJD,oCAIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printMessage = void 0;
|
|
4
|
-
const output_1 = require("@nrwl/workspace/src/
|
|
4
|
+
const output_1 = require("@nrwl/workspace/src/utilities/output");
|
|
5
5
|
function printMessage(message) {
|
|
6
6
|
const chalk = require('chalk');
|
|
7
7
|
const formattedMessage = output_1.output.colors.gray(message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/print-message.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/src/lib/utilities/print-message.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAE9D,SAAgB,YAAY,CAAC,OAAe;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,gBAAgB,GAAG,eAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErD,eAAM,CAAC,UAAU,EAAE,CAAC;IACnB,eAAc,CAAC,gBAAgB,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC;QAC1D,KAAK,EAAI,KAAa,CAAC,OAAO,CAAC,MAAM,CAAS,CAAC,gBAAgB,CAAC;KACjE,CAAC,CAAC;IACH,eAAM,CAAC,UAAU,EAAE,CAAC;AACtB,CAAC;AAVD,oCAUC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/nx-cloud",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.1",
|
|
4
4
|
"description": "Nx Cloud plugin for Nx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Monorepo",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"axios": "^0.21.1",
|
|
24
24
|
"node-machine-id": "^1.1.12",
|
|
25
|
-
"tar": "
|
|
25
|
+
"tar": "6.1.11",
|
|
26
26
|
"strip-json-comments": "^3.1.1",
|
|
27
27
|
"rxjs": "6.5.5",
|
|
28
28
|
"chalk": "4.1.0"
|
|
29
29
|
},
|
|
30
30
|
"typings": "./src/index.d.ts",
|
|
31
31
|
"peerDependencies": {}
|
|
32
|
-
}
|
|
32
|
+
}
|