@nrwl/nx-cloud 15.3.1 → 15.3.3-beta.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.
Files changed (34) hide show
  1. package/lib/core/api/error-reporter.api.js +36 -1
  2. package/lib/core/api/run-group.api.js +73 -1
  3. package/lib/core/api/run-group.api.js.map +1 -1
  4. package/lib/core/commands/record-output.js +6 -2
  5. package/lib/core/commands/record-output.js.map +1 -1
  6. package/lib/core/commands/upload-and-show-run-details.js +2 -1
  7. package/lib/core/commands/upload-and-show-run-details.js.map +1 -1
  8. package/lib/core/file-storage/file-storage.js +1 -1
  9. package/lib/core/file-storage/file-storage.js.map +1 -1
  10. package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +93 -1
  11. package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +320 -1
  12. package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
  13. package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +133 -1
  14. package/lib/core/runners/cloud-enabled/cloud-run.api.js +168 -1
  15. package/lib/core/runners/cloud-enabled/id-generator.js +16 -1
  16. package/lib/core/runners/distributed-agent/distributed-agent.api.js +93 -1
  17. package/lib/core/runners/distributed-agent/distributed-agent.impl.js +157 -1
  18. package/lib/core/runners/distributed-agent/execute-tasks.js +114 -1
  19. package/lib/core/runners/distributed-agent/invoke-tasks-using-nx-imperative-api.js +58 -1
  20. package/lib/core/runners/distributed-agent/invoke-tasks-using-run-many.js +97 -1
  21. package/lib/core/runners/distributed-execution/distributed-execution.api.d.ts +1 -1
  22. package/lib/core/runners/distributed-execution/distributed-execution.api.js +152 -1
  23. package/lib/core/runners/distributed-execution/distributed-execution.api.js.map +1 -1
  24. package/lib/core/runners/distributed-execution/distributed-execution.runner.js +118 -1
  25. package/lib/core/runners/distributed-execution/process-task.js +45 -1
  26. package/lib/core/runners/distributed-execution/process-tasks.js +67 -1
  27. package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +37 -1
  28. package/lib/core/runners/distributed-execution/task-graph-creator.js +100 -1
  29. package/lib/utilities/environment.js +8 -2
  30. package/lib/utilities/environment.js.map +1 -1
  31. package/lib/utilities/is-private-cloud.d.ts +1 -0
  32. package/lib/utilities/is-private-cloud.js +30 -0
  33. package/lib/utilities/is-private-cloud.js.map +1 -0
  34. package/package.json +1 -1
@@ -1 +1,67 @@
1
- const a13_0x528c=['status','next','createUnchangedValueTimeout','reset','Error:','processTask','__esModule','number\x20of\x20completed\x20tasks:\x20','exit','__awaiter','apply','processTasks','Waiting...','criticalErrorMessage','executionStatus','value','commandStatus','../../../utilities/waiter','../../../utilities/nx-imports','then','note','done','COMPLETED','Status\x20update','length','NO_COMPLETED_TASKS_TIMEOUT','Waiter','./process-task','wait','Distributed\x20Execution\x20Terminated','taskId','../../../utilities/environment','VERBOSE_LOGGING','No\x20new\x20completed\x20tasks\x20after\x20','completedTasks','runUrl'];(function(_0x385e13,_0x528cac){const _0x290083=function(_0x2299af){while(--_0x2299af){_0x385e13['push'](_0x385e13['shift']());}};_0x290083(++_0x528cac);}(a13_0x528c,0x150));const a13_0x2900=function(_0x385e13,_0x528cac){_0x385e13=_0x385e13-0x0;let _0x290083=a13_0x528c[_0x385e13];return _0x290083;};'use strict';var __awaiter=this&&this[a13_0x2900('0x21')]||function(_0x336ac0,_0x231a42,_0x212e8a,_0x474fa2){function _0x4a604a(_0x2beaa2){return _0x2beaa2 instanceof _0x212e8a?_0x2beaa2:new _0x212e8a(function(_0x39ac97){_0x39ac97(_0x2beaa2);});}return new(_0x212e8a||(_0x212e8a=Promise))(function(_0x10af4c,_0x4492ed){function _0x47e7ff(_0x4590e5){try{_0x51c6c1(_0x474fa2[a13_0x2900('0x19')](_0x4590e5));}catch(_0x1fdfbe){_0x4492ed(_0x1fdfbe);}}function _0x4b76b3(_0x324227){try{_0x51c6c1(_0x474fa2['throw'](_0x324227));}catch(_0x260e1f){_0x4492ed(_0x260e1f);}}function _0x51c6c1(_0x138c9a){_0x138c9a[a13_0x2900('0x9')]?_0x10af4c(_0x138c9a[a13_0x2900('0x3')]):_0x4a604a(_0x138c9a[a13_0x2900('0x3')])[a13_0x2900('0x7')](_0x47e7ff,_0x4b76b3);}_0x51c6c1((_0x474fa2=_0x474fa2[a13_0x2900('0x22')](_0x336ac0,_0x231a42||[]))[a13_0x2900('0x19')]());});};Object['defineProperty'](exports,a13_0x2900('0x1e'),{'value':!![]});exports[a13_0x2900('0x23')]=void 0x0;const create_unchanged_value_timeout_1=require('../../../utilities/create-unchanged-value-timeout');const environment_1=require(a13_0x2900('0x13'));const waiter_1=require(a13_0x2900('0x5'));const process_task_1=require(a13_0x2900('0xf'));const {output}=require(a13_0x2900('0x6'));function processTasks(_0x174a14,_0x37af6a,_0x4cde48,_0xd119ee){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x390970={};const _0x56b3e0=(0x0,create_unchanged_value_timeout_1[a13_0x2900('0x1a')])({'title':a13_0x2900('0x15')+environment_1[a13_0x2900('0xd')]/0x3e8+'\x20seconds.','timeout':environment_1[a13_0x2900('0xd')]});const _0x282246=new waiter_1[(a13_0x2900('0xe'))]();while(!![]){if(environment_1[a13_0x2900('0x14')]){output[a13_0x2900('0x8')]({'title':a13_0x2900('0x0')});}yield _0x282246[a13_0x2900('0x10')]();const _0x81c062=yield _0x174a14[a13_0x2900('0x18')](_0x4cde48);if(environment_1[a13_0x2900('0x14')]){output[a13_0x2900('0x8')]({'title':a13_0x2900('0xb'),'bodyLines':['executionId:\x20'+_0x4cde48,'executionStatus:\x20'+_0x81c062[a13_0x2900('0x2')],a13_0x2900('0x1f')+_0x81c062['completedTasks'][a13_0x2900('0xc')],'error:\x20'+_0x81c062[a13_0x2900('0x1')]]});}if(_0x81c062['criticalErrorMessage']){output['error']({'title':a13_0x2900('0x11'),'bodyLines':[a13_0x2900('0x1c'),_0x81c062[a13_0x2900('0x1')]]});process[a13_0x2900('0x20')](0x1);}_0x56b3e0(_0x81c062[a13_0x2900('0x16')][a13_0x2900('0xc')]);for(const _0xe60542 of _0x81c062[a13_0x2900('0x16')]){if(_0x390970[_0xe60542[a13_0x2900('0x12')]])continue;yield(0x0,process_task_1[a13_0x2900('0x1d')])(_0x37af6a,_0xd119ee,_0xe60542);_0x282246[a13_0x2900('0x1b')]();_0x390970[_0xe60542['taskId']]=!![];}if(_0x81c062['executionStatus']===a13_0x2900('0xa')){return{'commandStatus':_0x81c062[a13_0x2900('0x4')],'runUrl':_0x81c062[a13_0x2900('0x17')]};}}});}exports[a13_0x2900('0x23')]=processTasks;
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.processTasks = void 0;
13
+ const create_unchanged_value_timeout_1 = require("../../../utilities/create-unchanged-value-timeout");
14
+ const environment_1 = require("../../../utilities/environment");
15
+ const waiter_1 = require("../../../utilities/waiter");
16
+ const process_task_1 = require("./process-task");
17
+ const { output } = require('../../../utilities/nx-imports');
18
+ function processTasks(api, dteArtifactStorage, executionId, tasks) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const processedTasks = {};
21
+ const failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout = (0, create_unchanged_value_timeout_1.createUnchangedValueTimeout)({
22
+ title: `No new completed tasks after ${environment_1.NO_COMPLETED_TASKS_TIMEOUT / 1000} seconds.`,
23
+ timeout: environment_1.NO_COMPLETED_TASKS_TIMEOUT,
24
+ });
25
+ const waiter = new waiter_1.Waiter();
26
+ while (true) {
27
+ if (environment_1.VERBOSE_LOGGING) {
28
+ output.note({
29
+ title: 'Waiting...',
30
+ });
31
+ }
32
+ yield waiter.wait();
33
+ const r = yield api.status(executionId);
34
+ if (environment_1.VERBOSE_LOGGING) {
35
+ output.note({
36
+ title: `Status update`,
37
+ bodyLines: [
38
+ `executionId: ${executionId}`,
39
+ `executionStatus: ${r.executionStatus}`,
40
+ `number of completed tasks: ${r.completedTasks.length}`,
41
+ `error: ${r.criticalErrorMessage}`,
42
+ ],
43
+ });
44
+ }
45
+ if (r.criticalErrorMessage) {
46
+ output.error({
47
+ title: 'Distributed Execution Terminated',
48
+ bodyLines: ['Error:', r.criticalErrorMessage],
49
+ });
50
+ process.exit(1);
51
+ }
52
+ failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout(r.completedTasks.length);
53
+ for (const t of r.completedTasks) {
54
+ if (processedTasks[t.taskId])
55
+ continue;
56
+ yield (0, process_task_1.processTask)(dteArtifactStorage, tasks, t);
57
+ waiter.reset();
58
+ processedTasks[t.taskId] = true;
59
+ }
60
+ if (r.executionStatus === 'COMPLETED') {
61
+ return { commandStatus: r.commandStatus, runUrl: r.runUrl };
62
+ }
63
+ }
64
+ });
65
+ }
66
+ exports.processTasks = processTasks;
67
+ //# sourceMappingURL=process-tasks.js.map
@@ -1 +1,37 @@
1
- const a14_0x5839=['tasks','map','splitTasksIntoStages','__esModule','has','dependencies','defineProperty','values','size'];(function(_0x151893,_0x5839a3){const _0x280abd=function(_0x3962c8){while(--_0x3962c8){_0x151893['push'](_0x151893['shift']());}};_0x280abd(++_0x5839a3);}(a14_0x5839,0xbc));const a14_0x280a=function(_0x151893,_0x5839a3){_0x151893=_0x151893-0x0;let _0x280abd=a14_0x5839[_0x151893];return _0x280abd;};'use strict';Object[a14_0x280a('0x7')](exports,a14_0x280a('0x4'),{'value':!![]});exports['splitTasksIntoStages']=void 0x0;function splitTasksIntoStages(_0x5e5b6d){const _0x4006f8=[];const _0x3657cb=new Set(Object[a14_0x280a('0x8')](_0x5e5b6d[a14_0x280a('0x1')])[a14_0x280a('0x2')](_0x5280e5=>_0x5280e5['id']));let _0xfa7e61=0x0;while(_0x3657cb[a14_0x280a('0x0')]>0x0){const _0xb072f=_0x4006f8[_0xfa7e61]=[];for(const _0xafe8ab of _0x3657cb){let _0x1e1949=!![];for(const _0x1da54e of _0x5e5b6d[a14_0x280a('0x6')][_0xafe8ab]){if(_0x3657cb[a14_0x280a('0x5')](_0x1da54e)){_0x1e1949=![];break;}}if(!_0x1e1949){continue;}const _0x3284bb=_0x5e5b6d[a14_0x280a('0x1')][_0xafe8ab];_0xb072f['push'](_0x3284bb);}for(const _0x9a64fa of _0xb072f){_0x3657cb['delete'](_0x9a64fa['id']);}_0xfa7e61++;}return _0x4006f8;}exports[a14_0x280a('0x3')]=splitTasksIntoStages;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.splitTasksIntoStages = void 0;
4
+ function splitTasksIntoStages(taskGraph) {
5
+ const stages = [];
6
+ const notStagedTaskIds = new Set(Object.values(taskGraph.tasks).map((t) => t.id));
7
+ let stageIndex = 0;
8
+ // Loop through tasks and try to stage them. As tasks are staged, they are removed from the loop
9
+ while (notStagedTaskIds.size > 0) {
10
+ const currentStage = (stages[stageIndex] = []);
11
+ for (const taskId of notStagedTaskIds) {
12
+ let ready = true;
13
+ for (const dependency of taskGraph.dependencies[taskId]) {
14
+ if (notStagedTaskIds.has(dependency)) {
15
+ // dependency has not been staged yet, this task is not ready to be staged.
16
+ ready = false;
17
+ break;
18
+ }
19
+ }
20
+ // Some dependency still has not been staged, skip it for now, it will be processed again
21
+ if (!ready) {
22
+ continue;
23
+ }
24
+ // All the dependencies have been staged, let's stage it.
25
+ const task = taskGraph.tasks[taskId];
26
+ currentStage.push(task);
27
+ }
28
+ // Remove the entire new stage of tasks from the list
29
+ for (const task of currentStage) {
30
+ notStagedTaskIds.delete(task.id);
31
+ }
32
+ stageIndex++;
33
+ }
34
+ return stages;
35
+ }
36
+ exports.splitTasksIntoStages = splitTasksIntoStages;
37
+ //# sourceMappingURL=split-task-graph-into-stages.js.map
@@ -1 +1,100 @@
1
- const a15_0x5da6=['indexOf','../../../utilities/nx-imports','dependencies','strictlyOrderedTargets','build','toString','has','addTaskToGraph','projectGraph','addDependencies','addTaskDependencies','target','filter','/nx.json','createTaskGraphCompat','add','defineProperty','self','parse','push','projects','map','defaultTargetDependencies','findTask','roots','project','targetDependencies','TaskGraphCreator','length','createTaskGraph','__esModule','keys'];(function(_0x25a342,_0x5da6bc){const _0xc6b05f=function(_0x43f220){while(--_0x43f220){_0x25a342['push'](_0x25a342['shift']());}};_0xc6b05f(++_0x5da6bc);}(a15_0x5da6,0x102));const a15_0xc6b0=function(_0x25a342,_0x5da6bc){_0x25a342=_0x25a342-0x0;let _0xc6b05f=a15_0x5da6[_0x25a342];return _0xc6b05f;};'use strict';Object[a15_0xc6b0('0xe')](exports,a15_0xc6b0('0x1c'),{'value':!![]});exports[a15_0xc6b0('0x19')]=exports[a15_0xc6b0('0xc')]=void 0x0;const stripJsonComments=require('strip-json-comments');const fs_1=require('fs');const {getDependencyConfigs,workspaceRoot}=require(a15_0xc6b0('0x1f'));function createTaskGraphCompat(_0x4282dd,_0x56dded,_0x321846){const _0x5b2581=JSON[a15_0xc6b0('0x10')](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a15_0xc6b0('0xb'))[a15_0xc6b0('0x3')]()));return new TaskGraphCreator(_0x56dded,getDefaultDependencyConfigs(_0x5b2581,_0x4282dd))[a15_0xc6b0('0x1b')](_0x321846);}exports[a15_0xc6b0('0xc')]=createTaskGraphCompat;function getDefaultDependencyConfigs(_0x2cf7d0,_0x47b197){var _0xe8d37f,_0x1f4f2a;const _0x2bbfa1=(_0xe8d37f=_0x2cf7d0[a15_0xc6b0('0x18')])!==null&&_0xe8d37f!==void 0x0?_0xe8d37f:{};const _0x431715=_0x47b197?(_0x1f4f2a=_0x47b197[a15_0xc6b0('0x1')])!==null&&_0x1f4f2a!==void 0x0?_0x1f4f2a:[a15_0xc6b0('0x2')]:[];for(const _0x3dfa02 of _0x431715){_0x2bbfa1[_0x3dfa02]=_0x2bbfa1[_0x3dfa02]||[];_0x2bbfa1[_0x3dfa02][a15_0xc6b0('0x11')]({'target':_0x3dfa02,'projects':a15_0xc6b0('0x0')});}return _0x2bbfa1;}class TaskGraphCreator{constructor(_0x5a7745,_0x1c0ec6){this[a15_0xc6b0('0x6')]=_0x5a7745;this[a15_0xc6b0('0x14')]=_0x1c0ec6;}[a15_0xc6b0('0x1b')](_0x3faf57){const _0x2ccd32={'roots':[],'tasks':{},'dependencies':{}};for(const _0xc290ce of _0x3faf57){this[a15_0xc6b0('0x5')](_0xc290ce,_0x2ccd32);const _0x30fc0f=getDependencyConfigs(_0xc290ce[a15_0xc6b0('0x9')],this[a15_0xc6b0('0x14')],this[a15_0xc6b0('0x6')]);if(!_0x30fc0f){continue;}this[a15_0xc6b0('0x8')](_0xc290ce,_0x30fc0f,_0x3faf57,_0x2ccd32);}_0x2ccd32[a15_0xc6b0('0x16')]=Object[a15_0xc6b0('0x1d')](_0x2ccd32['dependencies'])[a15_0xc6b0('0xa')](_0x4b9e58=>_0x2ccd32[a15_0xc6b0('0x0')][_0x4b9e58][a15_0xc6b0('0x1a')]===0x0);return _0x2ccd32;}[a15_0xc6b0('0x8')](_0x43bc94,_0x44930a,_0x33d845,_0x594ddf){for(const _0x4fbbf3 of _0x44930a){if(_0x4fbbf3[a15_0xc6b0('0x12')]===a15_0xc6b0('0xf')){for(const _0x39e3f4 of _0x33d845){if(_0x39e3f4['target'][a15_0xc6b0('0x17')]===_0x43bc94['target'][a15_0xc6b0('0x17')]&&_0x39e3f4[a15_0xc6b0('0x9')]['target']===_0x4fbbf3[a15_0xc6b0('0x9')]){_0x594ddf[a15_0xc6b0('0x0')][_0x43bc94['id']][a15_0xc6b0('0x11')](_0x39e3f4['id']);}}}else if(_0x4fbbf3[a15_0xc6b0('0x12')]===a15_0xc6b0('0x0')){const _0x29373c=new Set();this['addDependencies'](_0x43bc94[a15_0xc6b0('0x9')][a15_0xc6b0('0x17')],_0x4fbbf3[a15_0xc6b0('0x9')],_0x33d845,_0x594ddf,_0x43bc94['id'],_0x29373c);}}}[a15_0xc6b0('0x7')](_0x5681ec,_0x21b82f,_0x7846fb,_0x3b8859,_0x1b2e29,_0x6f0933){_0x6f0933[a15_0xc6b0('0xd')](_0x5681ec);const _0x843049=this[a15_0xc6b0('0x6')]['dependencies'][_0x5681ec];if(_0x843049){const _0x4699c0=_0x843049[a15_0xc6b0('0x13')](_0x22298d=>_0x22298d['target']);for(const _0x5343a8 of _0x4699c0){if(_0x6f0933[a15_0xc6b0('0x4')](_0x5343a8)){continue;}const _0x94d580=this[a15_0xc6b0('0x15')]({'project':_0x5343a8,'target':_0x21b82f},_0x7846fb);if(_0x94d580){if(_0x3b8859['dependencies'][_0x1b2e29][a15_0xc6b0('0x1e')](_0x94d580['id'])===-0x1){_0x3b8859['dependencies'][_0x1b2e29]['push'](_0x94d580['id']);}}else{this[a15_0xc6b0('0x7')](_0x5343a8,_0x21b82f,_0x7846fb,_0x3b8859,_0x1b2e29,_0x6f0933);}}}}[a15_0xc6b0('0x15')]({project,target},_0x1224c0){return _0x1224c0['find'](_0x3ff52d=>_0x3ff52d[a15_0xc6b0('0x9')][a15_0xc6b0('0x17')]===project&&_0x3ff52d[a15_0xc6b0('0x9')][a15_0xc6b0('0x9')]===target);}[a15_0xc6b0('0x5')](_0x54df5b,_0x9f74b6){_0x9f74b6['tasks'][_0x54df5b['id']]=_0x54df5b;_0x9f74b6[a15_0xc6b0('0x0')][_0x54df5b['id']]=[];}}exports[a15_0xc6b0('0x19')]=TaskGraphCreator;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskGraphCreator = exports.createTaskGraphCompat = void 0;
4
+ const stripJsonComments = require("strip-json-comments");
5
+ const fs_1 = require("fs");
6
+ const { getDependencyConfigs, workspaceRoot, } = require('../../../utilities/nx-imports');
7
+ function createTaskGraphCompat(options, projectGraph, tasks) {
8
+ const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString()));
9
+ return new TaskGraphCreator(projectGraph, getDefaultDependencyConfigs(nxjson, options)).createTaskGraph(tasks);
10
+ }
11
+ exports.createTaskGraphCompat = createTaskGraphCompat;
12
+ function getDefaultDependencyConfigs(nxJson, runnerOptions) {
13
+ var _a, _b;
14
+ const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
15
+ const strictlyOrderedTargets = runnerOptions
16
+ ? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
17
+ : [];
18
+ // Strictly Ordered Targets depend on their dependencies
19
+ for (const target of strictlyOrderedTargets) {
20
+ defaults[target] = defaults[target] || [];
21
+ defaults[target].push({
22
+ target,
23
+ projects: 'dependencies',
24
+ });
25
+ }
26
+ return defaults;
27
+ }
28
+ /**
29
+ * This is only used for versions of Nx prior to 14 where the task graph
30
+ * wasn't part of the context so we have to recreate it
31
+ */
32
+ class TaskGraphCreator {
33
+ constructor(projectGraph, defaultTargetDependencies) {
34
+ this.projectGraph = projectGraph;
35
+ this.defaultTargetDependencies = defaultTargetDependencies;
36
+ }
37
+ createTaskGraph(tasks) {
38
+ const graph = {
39
+ roots: [],
40
+ tasks: {},
41
+ dependencies: {},
42
+ };
43
+ for (const task of tasks) {
44
+ this.addTaskToGraph(task, graph);
45
+ const dependencyConfigs = getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
46
+ if (!dependencyConfigs) {
47
+ continue;
48
+ }
49
+ this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
50
+ }
51
+ graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
52
+ return graph;
53
+ }
54
+ addTaskDependencies(task, dependencyConfigs, tasks, graph) {
55
+ for (const dependencyConfig of dependencyConfigs) {
56
+ if (dependencyConfig.projects === 'self') {
57
+ for (const t of tasks) {
58
+ if (t.target.project === task.target.project &&
59
+ t.target.target === dependencyConfig.target) {
60
+ graph.dependencies[task.id].push(t.id);
61
+ }
62
+ }
63
+ }
64
+ else if (dependencyConfig.projects === 'dependencies') {
65
+ const seen = new Set();
66
+ this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
67
+ }
68
+ }
69
+ }
70
+ addDependencies(project, target, tasks, graph, taskId, seen) {
71
+ seen.add(project);
72
+ const dependencies = this.projectGraph.dependencies[project];
73
+ if (dependencies) {
74
+ const projectDependencies = dependencies.map((dependency) => dependency.target);
75
+ for (const projectDependency of projectDependencies) {
76
+ if (seen.has(projectDependency)) {
77
+ continue;
78
+ }
79
+ const dependency = this.findTask({ project: projectDependency, target }, tasks);
80
+ if (dependency) {
81
+ if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
82
+ graph.dependencies[taskId].push(dependency.id);
83
+ }
84
+ }
85
+ else {
86
+ this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
87
+ }
88
+ }
89
+ }
90
+ }
91
+ findTask({ project, target }, tasks) {
92
+ return tasks.find((t) => t.target.project === project && t.target.target === target);
93
+ }
94
+ addTaskToGraph(task, graph) {
95
+ graph.tasks[task.id] = task;
96
+ graph.dependencies[task.id] = [];
97
+ }
98
+ }
99
+ exports.TaskGraphCreator = TaskGraphCreator;
100
+ //# sourceMappingURL=task-graph-creator.js.map
@@ -6,6 +6,7 @@ const dotenv = require("dotenv");
6
6
  const fs_1 = require("fs");
7
7
  const path_1 = require("path");
8
8
  const is_ci_1 = require("./is-ci");
9
+ const is_private_cloud_1 = require("./is-private-cloud");
9
10
  const { workspaceRoot } = require('./nx-imports');
10
11
  // Set once
11
12
  exports.NX_DEFAULT_CACHE_LOCATION = './node_modules/.cache/nx';
@@ -77,6 +78,12 @@ function loadEnvVars() {
77
78
  parsed.NX_CLOUD_NO_TIMEOUTS === 'true';
78
79
  }
79
80
  function getCIExecutionId() {
81
+ if ((0, is_private_cloud_1.isConnectedToPrivateCloud)())
82
+ return undefined;
83
+ return _ciExecutionId();
84
+ }
85
+ exports.getCIExecutionId = getCIExecutionId;
86
+ function _ciExecutionId() {
80
87
  if (process.env.NX_CI_EXECUTION_ID !== undefined) {
81
88
  return process.env.NX_CI_EXECUTION_ID;
82
89
  }
@@ -111,7 +118,6 @@ function getCIExecutionId() {
111
118
  }
112
119
  return null;
113
120
  }
114
- exports.getCIExecutionId = getCIExecutionId;
115
121
  function getCIExecutionEnv() {
116
122
  var _a;
117
123
  return (_a = process.env.NX_CI_EXECUTION_ENV) !== null && _a !== void 0 ? _a : '';
@@ -121,7 +127,7 @@ function getRunGroup() {
121
127
  if (process.env.NX_RUN_GROUP !== undefined) {
122
128
  return process.env.NX_RUN_GROUP;
123
129
  }
124
- const ciExecutionId = getCIExecutionId();
130
+ const ciExecutionId = _ciExecutionId();
125
131
  if (ciExecutionId) {
126
132
  return `${ciExecutionId}${getCIExecutionEnv()}`;
127
133
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/environment.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AACzC,iCAAiC;AACjC,2BAAkC;AAElC,+BAAmC;AAInC,mCAA+B;AAE/B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAElD,WAAW;AACE,QAAA,yBAAyB,GAAG,0BAA0B,CAAC;AACvD,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB;IACtE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC/C,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa;AACb,QAAA,0BAA0B,GAAG,OAAO,CAAC,GAAG;KAClD,gCAAgC;IACjC,CAAC,CAAC,MAAM,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,YAAY;;IAC1B,MAAM,GAAG,GACP,MAAA,MAAA,OAAO,CAAC,GAAG,CAAC,mBAAmB,mCAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAC7B,SAAS,CAAC;IACZ,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5C,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAClD,MAAM,GAAG,GAAG,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AATD,oCASC;AAED,SAAgB,mBAAmB,CAAC,OAA+B;IACjE,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAC1E,IAAI,OAAO,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,cAAc,CAAC;IAC1D,OAAO,iCAAyB,CAAC;AACnC,CAAC;AAJD,kDAIC"}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/environment.ts"],"names":[],"mappings":";;;AAAA,iDAAuC;AACvC,iCAAiC;AACjC,2BAAgC;AAEhC,+BAAiC;AAIjC,mCAA6B;AAC7B,yDAA6D;AAE7D,MAAM,EAAC,aAAa,EAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEhD,WAAW;AACE,QAAA,yBAAyB,GAAG,0BAA0B,CAAC;AACvD,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB;IACtE,CAAC,CAAC,MAAM,CAAC,OA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AAO;QACL,SAAS,EAAE,EAAE;QACb,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;AATD,wCASC;AAED,SAAgB,YAAY;;IAC1B,MAAM,GAAG,GACP,MAAA,MAAA,OAAO,CAAC,GAAG,CAAC,mBAAmB,mCAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAC7B,SAAS,CAAC;IACZ,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5C,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAClD,MAAM,GAAG,GAAG,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AATD,oCASC;AAED,SAAgB,mBAAmB,CAAC,OAA+B;IACjE,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAC1E,IAAI,OAAO,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,cAAc,CAAC;IAC1D,OAAO,iCAAyB,CAAC;AACnC,CAAC;AAJD,kDAIC"}
@@ -0,0 +1 @@
1
+ export declare function isConnectedToPrivateCloud(): boolean;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isConnectedToPrivateCloud = void 0;
4
+ const stripJsonComments = require("strip-json-comments");
5
+ const fs_1 = require("fs");
6
+ const path_1 = require("path");
7
+ const { workspaceRoot } = require("./nx-imports");
8
+ function isConnectedToPrivateCloud() {
9
+ const options = readOptions();
10
+ if (!options.url)
11
+ return false;
12
+ if (options.url.endsWith('snapshot.nx.app'))
13
+ return true;
14
+ if (options.url.endsWith('.nx.app'))
15
+ return false;
16
+ if (options.url.indexOf('localhost') > -1)
17
+ return false;
18
+ return true;
19
+ }
20
+ exports.isConnectedToPrivateCloud = isConnectedToPrivateCloud;
21
+ function readOptions() {
22
+ var _a, _b, _c;
23
+ try {
24
+ return (_c = (_b = (_a = JSON.parse(stripJsonComments((0, fs_1.readFileSync)((0, path_1.join)(workspaceRoot, 'nx.json')).toString()))) === null || _a === void 0 ? void 0 : _a.tasksRunnerOptions) === null || _b === void 0 ? void 0 : _b.default) === null || _c === void 0 ? void 0 : _c.options;
25
+ }
26
+ catch (e) {
27
+ return {};
28
+ }
29
+ }
30
+ //# sourceMappingURL=is-private-cloud.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-private-cloud.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/is-private-cloud.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,2BAAgC;AAEhC,+BAA0B;AAE1B,MAAM,EAAC,aAAa,EAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEhD,SAAgB,yBAAyB;IACrC,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAAE,OAAO,IAAI,CAAC;IACzD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC;AAPD,8DAOC;AAED,SAAS,WAAW;;IAChB,IAAI;QACA,OAAO,MAAA,MAAA,MAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,0CACvF,kBAAkB,0CAAE,OAAO,0CAAE,OAAO,CAAC;KAC9C;IAAC,OAAO,CAAC,EAAE;QACR,OAAO,EAA4B,CAAC;KACvC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/nx-cloud",
3
- "version": "15.3.1",
3
+ "version": "15.3.3-beta.1",
4
4
  "description": "Nx Cloud plugin for Nx",
5
5
  "keywords": [
6
6
  "Monorepo",