@nrwl/nx-cloud 15.0.2 → 15.1.0-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 (30) hide show
  1. package/lib/core/api/error-reporter.api.js +36 -1
  2. package/lib/core/api/run-group.api.js +68 -1
  3. package/lib/core/commands/clean-up-agents.js +1 -1
  4. package/lib/core/commands/clean-up-agents.js.map +1 -1
  5. package/lib/core/commands/upload-and-show-run-details.js +1 -1
  6. package/lib/core/commands/upload-and-show-run-details.js.map +1 -1
  7. package/lib/core/error/print-invalid-runner-error.d.ts +1 -0
  8. package/lib/core/error/print-invalid-runner-error.js +17 -0
  9. package/lib/core/error/print-invalid-runner-error.js.map +1 -0
  10. package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +109 -1
  11. package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +288 -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 +113 -1
  14. package/lib/core/runners/cloud-enabled/cloud-run.api.js +167 -1
  15. package/lib/core/runners/cloud-enabled/id-generator.js +16 -1
  16. package/lib/core/runners/distributed-agent/distributed-agent.api.js +79 -1
  17. package/lib/core/runners/distributed-agent/distributed-agent.impl.js +269 -1
  18. package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +1 -1
  19. package/lib/core/runners/distributed-execution/distributed-execution.api.js +143 -1
  20. package/lib/core/runners/distributed-execution/distributed-execution.runner.js +220 -1
  21. package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
  22. package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +37 -1
  23. package/lib/core/runners/distributed-execution/task-graph-creator.js +77 -1
  24. package/lib/utilities/distributed-task-execution-detection.js +1 -1
  25. package/lib/utilities/distributed-task-execution-detection.js.map +1 -1
  26. package/lib/utilities/environment.d.ts +2 -0
  27. package/lib/utilities/environment.js +18 -10
  28. package/lib/utilities/environment.js.map +1 -1
  29. package/package.json +1 -1
  30. package/project.json +2 -1
@@ -1 +1,220 @@
1
- const a8_0x3607=['../../api/error-reporter.api','VERBOSE_LOGGING','logCommand','submitRunMetrics','./task-graph-creator','write','commandStatus','../../../utilities/waiter','copyFilesFromCache','NO_COMPLETED_TASKS_TIMEOUT','terminalOutput','createStartRequest','../../../utilities/create-unchanged-value-timeout','No\x20new\x20completed\x20tasks\x20after\x20','values','Command\x20execution\x20failed.','value','build','executionStatus:\x20','Waiter','COMPLETED','../../../utilities/nx-imports','printRunGroupError','scheduleTask','find','url','note','Distributed\x20Execution\x20Terminated','../../file-storage/e2e-encryption','../../../utilities/metric-logger','wait','../../error/print-run-group-error','apply','SIGINT','next','runUrl','configuration','DistributedExecutionApi','Extracting\x20artifacts','taskId','Found\x20unknown\x20task:\x20','\x20seconds.','error','retrieve','dependencies','run','targetDependencies','Processing\x20task\x20','get','serializeOverrides','ErrorReporterApi','number\x20of\x20completed\x20tasks:\x20','completedTasks','FileStorage','target','then','Error:','encryptionKey','E2EEncryption','TaskGraphCreator','nodes','success','join','throw','nxCloudDistributedTasksRunner','splitTasksIntoStages','/nx.json','See\x20run\x20details\x20at\x20','tasks','Successfully\x20completed\x20running\x20the\x20command.','./split-task-graph-into-stages','taskGraph','criticalErrorMessage','assign','strictlyOrderedTargets','toString','lifeCycle','Main\x20job\x20was\x20terminated\x20via\x20SIGTERM','done','Retrieving\x20artifacts\x20from\x20','push','createTaskGraph','hash','log','exit','defineProperty','executionStatus','ENCRYPTION_KEY','message','../../file-storage/file-storage','project','../../../utilities/serializer-overrides','SIGTERM','axiosException','completeRunGroupWithError','projectGraph','Unable\x20to\x20complete\x20a\x20run.'];(function(_0x2e8bb2,_0x36072a){const _0xabe0d3=function(_0x560c78){while(--_0x560c78){_0x2e8bb2['push'](_0x2e8bb2['shift']());}};_0xabe0d3(++_0x36072a);}(a8_0x3607,0x127));const a8_0xabe0=function(_0x2e8bb2,_0x36072a){_0x2e8bb2=_0x2e8bb2-0x0;let _0xabe0d3=a8_0x3607[_0x2e8bb2];return _0xabe0d3;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x56dfe0,_0x599c4b,_0x1e3a6e,_0x2cafb0){function _0x22dab2(_0xa2f227){return _0xa2f227 instanceof _0x1e3a6e?_0xa2f227:new _0x1e3a6e(function(_0x55a22d){_0x55a22d(_0xa2f227);});}return new(_0x1e3a6e||(_0x1e3a6e=Promise))(function(_0x189344,_0x337fb6){function _0x48240b(_0x33cdab){try{_0x3bc4f3(_0x2cafb0[a8_0xabe0('0x1e')](_0x33cdab));}catch(_0xa315b0){_0x337fb6(_0xa315b0);}}function _0x5289c2(_0x5a2b18){try{_0x3bc4f3(_0x2cafb0[a8_0xabe0('0x3b')](_0x5a2b18));}catch(_0x203d22){_0x337fb6(_0x203d22);}}function _0x3bc4f3(_0xc51ea9){_0xc51ea9[a8_0xabe0('0x4a')]?_0x189344(_0xc51ea9['value']):_0x22dab2(_0xc51ea9[a8_0xabe0('0xc')])[a8_0xabe0('0x33')](_0x48240b,_0x5289c2);}_0x3bc4f3((_0x2cafb0=_0x2cafb0[a8_0xabe0('0x1c')](_0x56dfe0,_0x599c4b||[]))[a8_0xabe0('0x1e')]());});};Object[a8_0xabe0('0x51')](exports,'__esModule',{'value':!![]});exports[a8_0xabe0('0x3c')]=void 0x0;const fs_1=require('fs');const stripJsonComments=require('strip-json-comments');const create_unchanged_value_timeout_1=require(a8_0xabe0('0x8'));const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a8_0xabe0('0x19'));const serializer_overrides_1=require(a8_0xabe0('0x57'));const waiter_1=require(a8_0xabe0('0x3'));const error_reporter_api_1=require(a8_0xabe0('0x5d'));const print_run_group_error_1=require(a8_0xabe0('0x1b'));const e2e_encryption_1=require(a8_0xabe0('0x18'));const file_storage_1=require(a8_0xabe0('0x55'));const distributed_execution_api_1=require('./distributed-execution.api');const split_task_graph_into_stages_1=require(a8_0xabe0('0x42'));const task_graph_creator_1=require(a8_0xabe0('0x0'));const {output,workspaceRoot,getOutputs,Cache}=require(a8_0xabe0('0x11'));class NoopLifeCycle{[a8_0xabe0('0x13')](_0x3acd79){}['startTask'](_0x1d0003){}['endTask'](_0x51985c,_0x2b9d08){}}function runDistributedExecution(_0x4677cf,_0x553e2c,_0x1ef5d4,_0x3868c6,_0x447811,_0x3de93d,_0x3d2ca1){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x55cc7d=yield _0x4677cf['start']((0x0,distributed_execution_api_1[a8_0xabe0('0x7')])(_0x3de93d,(0x0,split_task_graph_into_stages_1[a8_0xabe0('0x3d')])(_0x3d2ca1),_0x553e2c));return yield processTasks(_0x4677cf,_0x3868c6,_0x447811,_0x553e2c,_0x55cc7d,Object[a8_0xabe0('0xa')](_0x3d2ca1[a8_0xabe0('0x40')]),_0x1ef5d4);});}function processTasks(_0x33002a,_0x1563a1,_0x4e63bd,_0x548057,_0x19fe5c,_0x350d7c,_0xf87c9d){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2572c4={};const _0x50ced4=(0x0,create_unchanged_value_timeout_1['createUnchangedValueTimeout'])({'title':a8_0xabe0('0x9')+environment_1[a8_0xabe0('0x5')]/0x3e8+a8_0xabe0('0x25'),'timeout':environment_1['NO_COMPLETED_TASKS_TIMEOUT']});const _0x3b2d20=new waiter_1[(a8_0xabe0('0xf'))]();while(!![]){if(environment_1[a8_0xabe0('0x5e')]){output[a8_0xabe0('0x16')]({'title':'Waiting...'});}yield _0x3b2d20[a8_0xabe0('0x1a')]();const _0x1fa9f5=yield _0x33002a['status'](_0x19fe5c);if(environment_1[a8_0xabe0('0x5e')]){output[a8_0xabe0('0x16')]({'title':'Status\x20update','bodyLines':['executionId:\x20'+_0x19fe5c,a8_0xabe0('0xe')+_0x1fa9f5[a8_0xabe0('0x52')],a8_0xabe0('0x2f')+_0x1fa9f5['completedTasks']['length'],'error:\x20'+_0x1fa9f5[a8_0xabe0('0x44')]]});}if(_0x1fa9f5['criticalErrorMessage']){output[a8_0xabe0('0x26')]({'title':a8_0xabe0('0x17'),'bodyLines':[a8_0xabe0('0x34'),_0x1fa9f5[a8_0xabe0('0x44')]]});process[a8_0xabe0('0x50')](0x1);}_0x50ced4(_0x1fa9f5['completedTasks']['length']);for(const _0x42154f of _0x1fa9f5[a8_0xabe0('0x30')]){if(_0x2572c4[_0x42154f[a8_0xabe0('0x23')]])continue;yield processTask(_0x1563a1,_0x4e63bd,_0xf87c9d,_0x548057,_0x350d7c,_0x42154f);_0x3b2d20['reset']();_0x2572c4[_0x42154f[a8_0xabe0('0x23')]]=!![];}if(_0x1fa9f5[a8_0xabe0('0x52')]===a8_0xabe0('0x10')){return{'commandStatus':_0x1fa9f5['commandStatus'],'runUrl':_0x1fa9f5[a8_0xabe0('0x1f')]};}}});}function processTask(_0x4a7a98,_0x1a6b1b,_0x371c9e,_0x1a5776,_0x39201d,_0x5b0012){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a8_0xabe0('0x5e')]){output[a8_0xabe0('0x16')]({'title':a8_0xabe0('0x2b')+_0x5b0012[a8_0xabe0('0x23')]});}const _0x34d691=_0x39201d[a8_0xabe0('0x14')](_0x11f68d=>_0x5b0012[a8_0xabe0('0x23')]===_0x11f68d['id']);if(!_0x34d691){throw new Error(a8_0xabe0('0x24')+_0x5b0012[a8_0xabe0('0x23')]);}if(environment_1[a8_0xabe0('0x5e')]){output[a8_0xabe0('0x16')]({'title':a8_0xabe0('0x4b')+_0x5b0012['url']});}yield _0x4a7a98[a8_0xabe0('0x27')](_0x5b0012[a8_0xabe0('0x4e')],_0x5b0012[a8_0xabe0('0x15')],_0x1a5776['cacheDirectory']||'./node_modules/.cache/nx');const _0x97b55f=yield _0x1a6b1b[a8_0xabe0('0x2c')](Object['assign'](Object[a8_0xabe0('0x45')]({},_0x34d691),{'hash':_0x5b0012[a8_0xabe0('0x4e')]}));const _0x31d5f1=getOutputs(_0x371c9e[a8_0xabe0('0x5b')][a8_0xabe0('0x38')],_0x34d691);if(environment_1[a8_0xabe0('0x5e')]){output[a8_0xabe0('0x16')]({'title':a8_0xabe0('0x22'),'bodyLines':_0x31d5f1});}yield _0x1a6b1b[a8_0xabe0('0x4')](_0x5b0012[a8_0xabe0('0x4e')],_0x97b55f,_0x31d5f1);output[a8_0xabe0('0x5f')](getCommand(_0x34d691));process['stdout'][a8_0xabe0('0x1')](_0x97b55f[a8_0xabe0('0x6')]);output['addVerticalSeparator']();});}function getCommand(_0x7c30){const _0x3b8a98=_0x7c30[a8_0xabe0('0x32')][a8_0xabe0('0x20')]?':'+_0x7c30[a8_0xabe0('0x32')][a8_0xabe0('0x20')]:'';return['nx',a8_0xabe0('0x29'),_0x7c30['target'][a8_0xabe0('0x56')]+':'+_0x7c30[a8_0xabe0('0x32')][a8_0xabe0('0x32')]+_0x3b8a98,(0x0,serializer_overrides_1[a8_0xabe0('0x2d')])(_0x7c30)][a8_0xabe0('0x3a')]('\x20');}function attachSignalListenersToCompleteRunGroupOnError(_0xdcd200,_0x37bd82){process['on'](a8_0xabe0('0x1d'),()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0xdcd200[a8_0xabe0('0x5a')](_0x37bd82,'Main\x20job\x20was\x20terminated\x20via\x20SIGINT');process[a8_0xabe0('0x50')](0x1);}));process['on'](a8_0xabe0('0x58'),()=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0xdcd200[a8_0xabe0('0x5a')](_0x37bd82,a8_0xabe0('0x49'));process[a8_0xabe0('0x50')](0x1);}));}const nxCloudDistributedTasksRunner=(_0x21e129,_0x21d772,_0x232c79)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output['note']({'title':'Starting\x20distributed\x20command\x20execution'});}_0x21d772[a8_0xabe0('0x48')]=new NoopLifeCycle();const _0x3e70f1=(0x0,environment_1['getRunGroup'])();if(!_0x3e70f1){(0x0,print_run_group_error_1[a8_0xabe0('0x12')])();return process['exit'](0x1);}const _0x190ee6=new e2e_encryption_1[(a8_0xabe0('0x36'))](environment_1[a8_0xabe0('0x53')]||_0x21d772[a8_0xabe0('0x35')]);const _0x1c1c21=new error_reporter_api_1[(a8_0xabe0('0x2e'))](_0x21d772);const _0xcf5c49=new file_storage_1[(a8_0xabe0('0x31'))](_0x190ee6,_0x1c1c21,!![],![]);const _0x4a98db=new Cache(_0x21d772);const _0x45651e=new distributed_execution_api_1[(a8_0xabe0('0x21'))](_0x21d772);attachSignalListenersToCompleteRunGroupOnError(_0x45651e,_0x3e70f1);try{const _0x794e01=getTaskGraph(_0x232c79,_0x21e129,_0x21d772);const _0x4d9f0b=yield runDistributedExecution(_0x45651e,_0x21d772,_0x232c79,_0xcf5c49,_0x4a98db,_0x3e70f1,_0x794e01);if(_0x4d9f0b[a8_0xabe0('0x2')]===0x0){output[a8_0xabe0('0x39')]({'title':a8_0xabe0('0x41'),'bodyLines':[a8_0xabe0('0x3f')+_0x4d9f0b[a8_0xabe0('0x1f')]]});}else{output['error']({'title':a8_0xabe0('0xb'),'bodyLines':[a8_0xabe0('0x3f')+_0x4d9f0b['runUrl']]});}yield(0x0,metric_logger_1[a8_0xabe0('0x60')])(_0x21d772);process[a8_0xabe0('0x50')](_0x4d9f0b[a8_0xabe0('0x2')]);}catch(_0x163f8b){output['error']({'title':a8_0xabe0('0x5c'),'bodyLines':[_0x163f8b['message']]});if(_0x163f8b[a8_0xabe0('0x59')]){console[a8_0xabe0('0x4f')](_0x163f8b[a8_0xabe0('0x59')]);}else{console[a8_0xabe0('0x4f')](_0x163f8b);}try{yield _0x45651e[a8_0xabe0('0x5a')](_0x3e70f1,'Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22'+_0x163f8b[a8_0xabe0('0x54')]+'\x22');}finally{process[a8_0xabe0('0x50')](0x1);}}});exports[a8_0xabe0('0x3c')]=nxCloudDistributedTasksRunner;function getTaskGraph(_0x4a51c3,_0x11c5f3,_0x18fd02){if(_0x4a51c3[a8_0xabe0('0x43')]){return _0x4a51c3[a8_0xabe0('0x43')];}else{const _0xc0a7cc=JSON['parse'](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a8_0xabe0('0x3e'))[a8_0xabe0('0x47')]()));return new task_graph_creator_1[(a8_0xabe0('0x37'))](_0x4a51c3[a8_0xabe0('0x5b')],getDefaultDependencyConfigs(_0xc0a7cc,_0x18fd02))[a8_0xabe0('0x4d')](_0x11c5f3);}}function getDefaultDependencyConfigs(_0x23089d,_0x14f237){var _0x1274a8,_0xf1a72a;const _0x1ce27d=(_0x1274a8=_0x23089d[a8_0xabe0('0x2a')])!==null&&_0x1274a8!==void 0x0?_0x1274a8:{};const _0x404a7d=_0x14f237?(_0xf1a72a=_0x14f237[a8_0xabe0('0x46')])!==null&&_0xf1a72a!==void 0x0?_0xf1a72a:[a8_0xabe0('0xd')]:[];for(const _0x47f3e7 of _0x404a7d){_0x1ce27d[_0x47f3e7]=_0x1ce27d[_0x47f3e7]||[];_0x1ce27d[_0x47f3e7][a8_0xabe0('0x4c')]({'target':_0x47f3e7,'projects':a8_0xabe0('0x28')});}return _0x1ce27d;}
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.nxCloudDistributedTasksRunner = void 0;
13
+ const fs_1 = require("fs");
14
+ const stripJsonComments = require("strip-json-comments");
15
+ const create_unchanged_value_timeout_1 = require("../../../utilities/create-unchanged-value-timeout");
16
+ const environment_1 = require("../../../utilities/environment");
17
+ const metric_logger_1 = require("../../../utilities/metric-logger");
18
+ const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
19
+ const waiter_1 = require("../../../utilities/waiter");
20
+ const error_reporter_api_1 = require("../../api/error-reporter.api");
21
+ const print_run_group_error_1 = require("../../error/print-run-group-error");
22
+ const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
23
+ const file_storage_1 = require("../../file-storage/file-storage");
24
+ const distributed_execution_api_1 = require("./distributed-execution.api");
25
+ const split_task_graph_into_stages_1 = require("./split-task-graph-into-stages");
26
+ const task_graph_creator_1 = require("./task-graph-creator");
27
+ const { output, workspaceRoot, getOutputs, Cache, } = require('../../../utilities/nx-imports');
28
+ class NoopLifeCycle {
29
+ scheduleTask(task) { }
30
+ startTask(task) { }
31
+ endTask(task, code) { }
32
+ }
33
+ function runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const id = yield api.start((0, distributed_execution_api_1.createStartRequest)(runGroup, (0, split_task_graph_into_stages_1.splitTasksIntoStages)(taskGraph), options));
36
+ return yield processTasks(api, fileStorage, cache, options, id, Object.values(taskGraph.tasks), context);
37
+ });
38
+ }
39
+ function processTasks(api, fileStorage, cache, options, executionId, tasks, context) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const processedTasks = {};
42
+ const failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout = (0, create_unchanged_value_timeout_1.createUnchangedValueTimeout)({
43
+ title: `No new completed tasks after ${environment_1.NO_COMPLETED_TASKS_TIMEOUT / 1000} seconds.`,
44
+ timeout: environment_1.NO_COMPLETED_TASKS_TIMEOUT,
45
+ });
46
+ const waiter = new waiter_1.Waiter();
47
+ while (true) {
48
+ if (environment_1.VERBOSE_LOGGING) {
49
+ output.note({
50
+ title: 'Waiting...',
51
+ });
52
+ }
53
+ yield waiter.wait();
54
+ const r = yield api.status(executionId);
55
+ if (environment_1.VERBOSE_LOGGING) {
56
+ output.note({
57
+ title: `Status update`,
58
+ bodyLines: [
59
+ `executionId: ${executionId}`,
60
+ `executionStatus: ${r.executionStatus}`,
61
+ `number of completed tasks: ${r.completedTasks.length}`,
62
+ `error: ${r.criticalErrorMessage}`,
63
+ ],
64
+ });
65
+ }
66
+ if (r.criticalErrorMessage) {
67
+ output.error({
68
+ title: 'Distributed Execution Terminated',
69
+ bodyLines: ['Error:', r.criticalErrorMessage],
70
+ });
71
+ process.exit(1);
72
+ }
73
+ failIfNumberOfCompletedTasksDoesNotChangeAfterTimeout(r.completedTasks.length);
74
+ for (const t of r.completedTasks) {
75
+ if (processedTasks[t.taskId])
76
+ continue;
77
+ yield processTask(fileStorage, cache, context, options, tasks, t);
78
+ waiter.reset();
79
+ processedTasks[t.taskId] = true;
80
+ }
81
+ if (r.executionStatus === 'COMPLETED') {
82
+ return { commandStatus: r.commandStatus, runUrl: r.runUrl };
83
+ }
84
+ }
85
+ });
86
+ }
87
+ function processTask(fileStorage, cache, context, options, tasks, completedTask) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (environment_1.VERBOSE_LOGGING) {
90
+ output.note({
91
+ title: `Processing task ${completedTask.taskId}`,
92
+ });
93
+ }
94
+ const matchingTask = tasks.find((tt) => completedTask.taskId === tt.id);
95
+ if (!matchingTask) {
96
+ throw new Error(`Found unknown task: ${completedTask.taskId}`);
97
+ }
98
+ if (environment_1.VERBOSE_LOGGING) {
99
+ output.note({
100
+ title: `Retrieving artifacts from ${completedTask.url}`,
101
+ });
102
+ }
103
+ yield fileStorage.retrieve(completedTask.hash, completedTask.url, (0, environment_1.getNxCacheDirectory)(options));
104
+ const cachedResult = yield cache.get(Object.assign(Object.assign({}, matchingTask), { hash: completedTask.hash }));
105
+ const outputs = getOutputs(context.projectGraph.nodes, matchingTask);
106
+ if (environment_1.VERBOSE_LOGGING) {
107
+ output.note({
108
+ title: `Extracting artifacts`,
109
+ bodyLines: outputs,
110
+ });
111
+ }
112
+ yield cache.copyFilesFromCache(completedTask.hash, cachedResult, outputs);
113
+ output.logCommand(getCommand(matchingTask));
114
+ process.stdout.write(cachedResult.terminalOutput);
115
+ output.addVerticalSeparator();
116
+ });
117
+ }
118
+ function getCommand(task) {
119
+ const config = task.target.configuration
120
+ ? `:${task.target.configuration}`
121
+ : '';
122
+ return [
123
+ 'nx',
124
+ 'run',
125
+ `${task.target.project}:${task.target.target}${config}`,
126
+ (0, serializer_overrides_1.serializeOverrides)(task),
127
+ ].join(' ');
128
+ }
129
+ function attachSignalListenersToCompleteRunGroupOnError(api, runGroup) {
130
+ process.on('SIGINT', () => __awaiter(this, void 0, void 0, function* () {
131
+ yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGINT');
132
+ process.exit(1);
133
+ }));
134
+ process.on('SIGTERM', () => __awaiter(this, void 0, void 0, function* () {
135
+ yield api.completeRunGroupWithError(runGroup, 'Main job was terminated via SIGTERM');
136
+ process.exit(1);
137
+ }));
138
+ }
139
+ const nxCloudDistributedTasksRunner = (tasks, options, context) => __awaiter(void 0, void 0, void 0, function* () {
140
+ if (environment_1.VERBOSE_LOGGING) {
141
+ output.note({
142
+ title: 'Starting distributed command execution',
143
+ });
144
+ }
145
+ options.lifeCycle = new NoopLifeCycle();
146
+ const runGroup = (0, environment_1.getRunGroup)();
147
+ if (!runGroup) {
148
+ (0, print_run_group_error_1.printRunGroupError)();
149
+ return process.exit(1);
150
+ }
151
+ const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
152
+ const errorReporter = new error_reporter_api_1.ErrorReporterApi(options);
153
+ const fileStorage = new file_storage_1.FileStorage(encryption, errorReporter, true, false);
154
+ const cache = new Cache(options);
155
+ const api = new distributed_execution_api_1.DistributedExecutionApi(options);
156
+ attachSignalListenersToCompleteRunGroupOnError(api, runGroup);
157
+ try {
158
+ const taskGraph = getTaskGraph(context, tasks, options);
159
+ const r = yield runDistributedExecution(api, options, context, fileStorage, cache, runGroup, taskGraph);
160
+ if (r.commandStatus === 0) {
161
+ output.success({
162
+ title: 'Successfully completed running the command.',
163
+ bodyLines: [`See run details at ${r.runUrl}`],
164
+ });
165
+ }
166
+ else {
167
+ output.error({
168
+ title: 'Command execution failed.',
169
+ bodyLines: [`See run details at ${r.runUrl}`],
170
+ });
171
+ }
172
+ yield (0, metric_logger_1.submitRunMetrics)(options);
173
+ process.exit(r.commandStatus);
174
+ }
175
+ catch (e) {
176
+ output.error({
177
+ title: 'Unable to complete a run.',
178
+ bodyLines: [e.message],
179
+ });
180
+ if (e.axiosException) {
181
+ console.log(e.axiosException);
182
+ }
183
+ else {
184
+ console.log(e);
185
+ }
186
+ try {
187
+ yield api.completeRunGroupWithError(runGroup, `Main job terminated with an error: "${e.message}"`);
188
+ }
189
+ finally {
190
+ process.exit(1);
191
+ }
192
+ }
193
+ });
194
+ exports.nxCloudDistributedTasksRunner = nxCloudDistributedTasksRunner;
195
+ function getTaskGraph(context, tasks, options) {
196
+ if (context.taskGraph) {
197
+ return context.taskGraph;
198
+ }
199
+ else {
200
+ const nxjson = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString()));
201
+ return new task_graph_creator_1.TaskGraphCreator(context.projectGraph, getDefaultDependencyConfigs(nxjson, options)).createTaskGraph(tasks);
202
+ }
203
+ }
204
+ function getDefaultDependencyConfigs(nxJson, runnerOptions) {
205
+ var _a, _b;
206
+ const defaults = (_a = nxJson.targetDependencies) !== null && _a !== void 0 ? _a : {};
207
+ const strictlyOrderedTargets = runnerOptions
208
+ ? (_b = runnerOptions.strictlyOrderedTargets) !== null && _b !== void 0 ? _b : ['build']
209
+ : [];
210
+ // Strictly Ordered Targets depend on their dependencies
211
+ for (const target of strictlyOrderedTargets) {
212
+ defaults[target] = defaults[target] || [];
213
+ defaults[target].push({
214
+ target,
215
+ projects: 'dependencies',
216
+ });
217
+ }
218
+ return defaults;
219
+ }
220
+ //# sourceMappingURL=distributed-execution.runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,yDAAyD;AACzD,sGAAgG;AAChG,gEAKwC;AACxC,oEAAoE;AACpE,kFAA6E;AAC7E,sDAAmD;AACnD,qEAAgE;AAChE,6EAAuE;AACvE,sEAAkE;AAClE,kEAA8D;AAG9D,2EAGqC;AACrC,iFAAsE;AACtE,6DAAwD;AAExD,MAAM,EACJ,MAAM,EACN,aAAa,EACb,UAAU,EACV,KAAK,GACN,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AAY7C,MAAM,aAAa;IACjB,YAAY,CAAC,IAAU,IAAS,CAAC;IAEjC,SAAS,CAAC,IAAU,IAAS,CAAC;IAE9B,OAAO,CAAC,IAAU,EAAE,IAAY,IAAS,CAAC;CAC3C;AAED,SAAe,uBAAuB,CACpC,GAA4B,EAC5B,OAA+B,EAC/B,OAAY,EACZ,WAAwB,EACxB,KAAY,EACZ,QAAgB,EAChB,SAAoB;;QAEpB,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,CACxB,IAAA,8CAAkB,EAAC,QAAQ,EAAE,IAAA,mDAAoB,EAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CACvE,CAAC;QACF,OAAO,MAAM,YAAY,CACvB,GAAG,EACH,WAAW,EACX,KAAK,EACL,OAAO,EACP,EAAE,EACF,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAC9B,OAAO,CACR,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,YAAY,CACzB,GAA4B,EAC5B,WAAwB,EACxB,KAAY,EACZ,OAA+B,EAC/B,WAAmB,EACnB,KAAa,EACb,OAAY;;QAEZ,MAAM,cAAc,GAAG,EAAE,CAAC;QAC1B,MAAM,qDAAqD,GACzD,IAAA,4DAA2B,EAAC;YAC1B,KAAK,EAAE,gCACL,wCAA0B,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;;IAED,MAAM,QAAQ,GAA0B,MAAA,MAAM,CAAC,kBAAkB,mCAAI,EAAE,CAAC;IACxE,MAAM,sBAAsB,GAAG,aAAa;QAC1C,CAAC,CAAC,MAAA,aAAa,CAAC,sBAAsB,mCAAI,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC;IACP,wDAAwD;IACxD,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE;QAC3C,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACpB,MAAM;YACN,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"distributed-execution.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/lib/core/runners/distributed-execution/distributed-execution.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAkC;AAClC,yDAAyD;AACzD,sGAAgG;AAChG,gEAMwC;AACxC,oEAAoE;AACpE,kFAA6E;AAC7E,sDAAmD;AACnD,qEAAgE;AAChE,6EAAuE;AACvE,sEAAkE;AAClE,kEAA8D;AAG9D,2EAGqC;AACrC,iFAAsE;AACtE,6DAAwD;AAExD,MAAM,EACJ,MAAM,EACN,aAAa,EACb,UAAU,EACV,KAAK,GACN,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AAY7C,MAAM,aAAa;IACjB,YAAY,CAAC,IAAU,IAAS,CAAC;IAEjC,SAAS,CAAC,IAAU,IAAS,CAAC;IAE9B,OAAO,CAAC,IAAU,EAAE,IAAY,IAAS,CAAC;CAC3C;AAED,SAAe,uBAAuB,CACpC,GAA4B,EAC5B,OAA+B,EAC/B,OAAY,EACZ,WAAwB,EACxB,KAAY,EACZ,QAAgB,EAChB,SAAoB;;QAEpB,MAAM,EAAE,GAAG,MAAM,G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C,CAAA,CAAC;AApEW,QAAA,6BAA6B,iCAoExC;AAEF,SAAS,YAAY,CACnB,OAAY,EACZ,KAAa,EACb,OAA+B;IAE/B,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,OAAO,OAAO,CAAC,SAAS,CAAC;KAC1B;SAAM;QACL,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,GAAG,aAAa,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,CACvE,CAAC;QACF,OAAO,IAAI,qCAAgB,CACzB,OAAO,CAAC,YAAY,EACpB,2BAA2B,CAAC,MAAM,EAAE,OAAc,CAAC,CACpD,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAC1B;AACH,CAAC;AAED,SAAS,2BAA2B,CAClC,MAAW,EACX,aAEC;;IAED,MAAM,QAAQ,GAA0B,MAAA,MAAM,CAAC,kBAAkB,mCAAI,EAAE,CAAC;IACxE,MAAM,sBAAsB,GAAG,aAAa;QAC1C,CAAC,CAAC,MAAA,aAAa,CAAC,sBAAsB,mCAAI,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC;IACP,wDAAwD;IACxD,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE;QAC3C,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACpB,MAAM;YACN,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1 +1,37 @@
1
- const a9_0x2fb3=['dependencies','__esModule','map','size','push','has','values','delete','tasks','splitTasksIntoStages'];(function(_0x3a9bb2,_0x2fb356){const _0x2a9b91=function(_0x59cad9){while(--_0x59cad9){_0x3a9bb2['push'](_0x3a9bb2['shift']());}};_0x2a9b91(++_0x2fb356);}(a9_0x2fb3,0x15a));const a9_0x2a9b=function(_0x3a9bb2,_0x2fb356){_0x3a9bb2=_0x3a9bb2-0x0;let _0x2a9b91=a9_0x2fb3[_0x3a9bb2];return _0x2a9b91;};'use strict';Object['defineProperty'](exports,a9_0x2a9b('0x5'),{'value':!![]});exports[a9_0x2a9b('0x3')]=void 0x0;function splitTasksIntoStages(_0xc43b09){const _0x561711=[];const _0x358edd=new Set(Object[a9_0x2a9b('0x0')](_0xc43b09[a9_0x2a9b('0x2')])[a9_0x2a9b('0x6')](_0x3ec559=>_0x3ec559['id']));let _0x138357=0x0;while(_0x358edd[a9_0x2a9b('0x7')]>0x0){const _0xd711b8=_0x561711[_0x138357]=[];for(const _0x3a9b9e of _0x358edd){let _0x55068c=!![];for(const _0x13d21f of _0xc43b09[a9_0x2a9b('0x4')][_0x3a9b9e]){if(_0x358edd[a9_0x2a9b('0x9')](_0x13d21f)){_0x55068c=![];break;}}if(!_0x55068c){continue;}const _0x5be283=_0xc43b09[a9_0x2a9b('0x2')][_0x3a9b9e];_0xd711b8[a9_0x2a9b('0x8')](_0x5be283);}for(const _0x1e5ef0 of _0xd711b8){_0x358edd[a9_0x2a9b('0x1')](_0x1e5ef0['id']);}_0x138357++;}return _0x561711;}exports[a9_0x2a9b('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,77 @@
1
- const a10_0x5e59=['filter','projects','self','addDependencies','roots','addTaskDependencies','defaultTargetDependencies','keys','createTaskGraph','__esModule','../../../utilities/nx-imports','findTask','dependencies','add','map','project','defineProperty','push','TaskGraphCreator','has','length','target','tasks','projectGraph'];(function(_0x46de61,_0x5e596f){const _0x2ffb18=function(_0x159aaa){while(--_0x159aaa){_0x46de61['push'](_0x46de61['shift']());}};_0x2ffb18(++_0x5e596f);}(a10_0x5e59,0x18d));const a10_0x2ffb=function(_0x46de61,_0x5e596f){_0x46de61=_0x46de61-0x0;let _0x2ffb18=a10_0x5e59[_0x46de61];return _0x2ffb18;};'use strict';Object[a10_0x2ffb('0x3')](exports,a10_0x2ffb('0x14'),{'value':!![]});exports[a10_0x2ffb('0x5')]=void 0x0;const {getDependencyConfigs}=require(a10_0x2ffb('0x15'));class TaskGraphCreator{constructor(_0x129b01,_0x49c498){this[a10_0x2ffb('0xa')]=_0x129b01;this[a10_0x2ffb('0x11')]=_0x49c498;}[a10_0x2ffb('0x13')](_0x583aba){const _0x53eb2e={'roots':[],'tasks':{},'dependencies':{}};for(const _0x2edbdb of _0x583aba){this['addTaskToGraph'](_0x2edbdb,_0x53eb2e);const _0x1548ec=getDependencyConfigs(_0x2edbdb[a10_0x2ffb('0x8')],this['defaultTargetDependencies'],this['projectGraph']);if(!_0x1548ec){continue;}this['addTaskDependencies'](_0x2edbdb,_0x1548ec,_0x583aba,_0x53eb2e);}_0x53eb2e[a10_0x2ffb('0xf')]=Object[a10_0x2ffb('0x12')](_0x53eb2e[a10_0x2ffb('0x17')])[a10_0x2ffb('0xb')](_0x424bde=>_0x53eb2e[a10_0x2ffb('0x17')][_0x424bde][a10_0x2ffb('0x7')]===0x0);return _0x53eb2e;}[a10_0x2ffb('0x10')](_0x2fd589,_0x219273,_0xd70c87,_0x4bced9){for(const _0x540616 of _0x219273){if(_0x540616[a10_0x2ffb('0xc')]===a10_0x2ffb('0xd')){for(const _0x3ceb4d of _0xd70c87){if(_0x3ceb4d[a10_0x2ffb('0x8')][a10_0x2ffb('0x2')]===_0x2fd589[a10_0x2ffb('0x8')][a10_0x2ffb('0x2')]&&_0x3ceb4d[a10_0x2ffb('0x8')][a10_0x2ffb('0x8')]===_0x540616[a10_0x2ffb('0x8')]){_0x4bced9[a10_0x2ffb('0x17')][_0x2fd589['id']][a10_0x2ffb('0x4')](_0x3ceb4d['id']);}}}else if(_0x540616['projects']===a10_0x2ffb('0x17')){const _0x3d0135=new Set();this[a10_0x2ffb('0xe')](_0x2fd589['target'][a10_0x2ffb('0x2')],_0x540616[a10_0x2ffb('0x8')],_0xd70c87,_0x4bced9,_0x2fd589['id'],_0x3d0135);}}}['addDependencies'](_0x487c07,_0x711104,_0x23ebad,_0x35e8bd,_0x158b9c,_0x480f9c){_0x480f9c[a10_0x2ffb('0x0')](_0x487c07);const _0x546eb9=this[a10_0x2ffb('0xa')][a10_0x2ffb('0x17')][_0x487c07];if(_0x546eb9){const _0xa584ad=_0x546eb9[a10_0x2ffb('0x1')](_0x26922c=>_0x26922c[a10_0x2ffb('0x8')]);for(const _0x2551ca of _0xa584ad){if(_0x480f9c[a10_0x2ffb('0x6')](_0x2551ca)){continue;}const _0x1b4894=this[a10_0x2ffb('0x16')]({'project':_0x2551ca,'target':_0x711104},_0x23ebad);if(_0x1b4894){if(_0x35e8bd['dependencies'][_0x158b9c]['indexOf'](_0x1b4894['id'])===-0x1){_0x35e8bd[a10_0x2ffb('0x17')][_0x158b9c]['push'](_0x1b4894['id']);}}else{this[a10_0x2ffb('0xe')](_0x2551ca,_0x711104,_0x23ebad,_0x35e8bd,_0x158b9c,_0x480f9c);}}}}[a10_0x2ffb('0x16')]({project,target},_0x5954cf){return _0x5954cf['find'](_0x5aa3ae=>_0x5aa3ae[a10_0x2ffb('0x8')][a10_0x2ffb('0x2')]===project&&_0x5aa3ae[a10_0x2ffb('0x8')][a10_0x2ffb('0x8')]===target);}['addTaskToGraph'](_0x584987,_0x51b9d2){_0x51b9d2[a10_0x2ffb('0x9')][_0x584987['id']]=_0x584987;_0x51b9d2[a10_0x2ffb('0x17')][_0x584987['id']]=[];}}exports['TaskGraphCreator']=TaskGraphCreator;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskGraphCreator = void 0;
4
+ const { getDependencyConfigs } = require('../../../utilities/nx-imports');
5
+ /**
6
+ * This is only used for versions of Nx prior to 14 where the task graph
7
+ * wasn't part of the context so we have to recreate it
8
+ */
9
+ class TaskGraphCreator {
10
+ constructor(projectGraph, defaultTargetDependencies) {
11
+ this.projectGraph = projectGraph;
12
+ this.defaultTargetDependencies = defaultTargetDependencies;
13
+ }
14
+ createTaskGraph(tasks) {
15
+ const graph = {
16
+ roots: [],
17
+ tasks: {},
18
+ dependencies: {},
19
+ };
20
+ for (const task of tasks) {
21
+ this.addTaskToGraph(task, graph);
22
+ const dependencyConfigs = getDependencyConfigs(task.target, this.defaultTargetDependencies, this.projectGraph);
23
+ if (!dependencyConfigs) {
24
+ continue;
25
+ }
26
+ this.addTaskDependencies(task, dependencyConfigs, tasks, graph);
27
+ }
28
+ graph.roots = Object.keys(graph.dependencies).filter((k) => graph.dependencies[k].length === 0);
29
+ return graph;
30
+ }
31
+ addTaskDependencies(task, dependencyConfigs, tasks, graph) {
32
+ for (const dependencyConfig of dependencyConfigs) {
33
+ if (dependencyConfig.projects === 'self') {
34
+ for (const t of tasks) {
35
+ if (t.target.project === task.target.project &&
36
+ t.target.target === dependencyConfig.target) {
37
+ graph.dependencies[task.id].push(t.id);
38
+ }
39
+ }
40
+ }
41
+ else if (dependencyConfig.projects === 'dependencies') {
42
+ const seen = new Set();
43
+ this.addDependencies(task.target.project, dependencyConfig.target, tasks, graph, task.id, seen);
44
+ }
45
+ }
46
+ }
47
+ addDependencies(project, target, tasks, graph, taskId, seen) {
48
+ seen.add(project);
49
+ const dependencies = this.projectGraph.dependencies[project];
50
+ if (dependencies) {
51
+ const projectDependencies = dependencies.map((dependency) => dependency.target);
52
+ for (const projectDependency of projectDependencies) {
53
+ if (seen.has(projectDependency)) {
54
+ continue;
55
+ }
56
+ const dependency = this.findTask({ project: projectDependency, target }, tasks);
57
+ if (dependency) {
58
+ if (graph.dependencies[taskId].indexOf(dependency.id) === -1) {
59
+ graph.dependencies[taskId].push(dependency.id);
60
+ }
61
+ }
62
+ else {
63
+ this.addDependencies(projectDependency, target, tasks, graph, taskId, seen);
64
+ }
65
+ }
66
+ }
67
+ }
68
+ findTask({ project, target }, tasks) {
69
+ return tasks.find((t) => t.target.project === project && t.target.target === target);
70
+ }
71
+ addTaskToGraph(task, graph) {
72
+ graph.tasks[task.id] = task;
73
+ graph.dependencies[task.id] = [];
74
+ }
75
+ }
76
+ exports.TaskGraphCreator = TaskGraphCreator;
77
+ //# sourceMappingURL=task-graph-creator.js.map
@@ -6,7 +6,7 @@ const path_1 = require("path");
6
6
  const fs_1 = require("fs");
7
7
  const nxCacheDirectory = process.env.NX_CACHE_DIRECTORY
8
8
  ? [process.env['NX_CACHE_DIRECTORY']]
9
- : ['node_modules', '.cache', '.nx'];
9
+ : ['node_modules', '.cache', 'nx'];
10
10
  const dir = (0, path_1.join)(process.cwd(), ...nxCacheDirectory);
11
11
  const dteMarker = (0, path_1.join)(dir, 'NX_CLOUD_DISTRIBUTED_EXECUTION');
12
12
  function storeDteMarker() {
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-task-execution-detection.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/distributed-task-execution-detection.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AACxD,+BAA4B;AAC5B,2BAAkC;AAElC,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB;IACrD,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACtC,MAAM,GAAG,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC;AACrD,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,GAAG,EAAE,gCAAgC,CAAC,CAAC;AAE9D,SAAgB,cAAc;IAC5B,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC;IACnB,IAAA,wBAAa,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC;AAHD,wCAGC;AAED,SAAgB,6BAA6B,CAC3C,cAAwC;IAExC,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,cAAc,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAC1D,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAE1E,IAAI;QACF,IAAA,iBAAY,EAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAhBD,sEAgBC"}
1
+ {"version":3,"file":"distributed-task-execution-detection.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/distributed-task-execution-detection.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;AACxD,+BAA4B;AAC5B,2BAAkC;AAElC,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB;IACrD,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC,cAAc,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACrC,MAAM,GAAG,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC;AACrD,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,GAAG,EAAE,gCAAgC,CAAC,CAAC;AAE9D,SAAgB,cAAc;IAC5B,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC;IACnB,IAAA,wBAAa,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC;AAHD,wCAGC;AAED,SAAgB,6BAA6B,CAC3C,cAAwC;IAExC,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,cAAc,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAC1D,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAE1E,IAAI;QACF,IAAA,iBAAY,EAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAhBD,sEAgBC"}
@@ -1,5 +1,6 @@
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_DEFAULT_CACHE_LOCATION = "./node_modules/.cache/nx";
3
4
  export declare const UNLIMITED_TIMEOUT = 9999999;
4
5
  export declare const NO_MESSAGES_TIMEOUT: number;
5
6
  export declare const NO_COMPLETED_TASKS_TIMEOUT: number;
@@ -23,3 +24,4 @@ export declare function getRunGroup(): string | undefined;
23
24
  export declare function getBranch(): string | null;
24
25
  export declare function getMachineInfo(options: CloudTaskRunnerOptions): MachineInfo;
25
26
  export declare function parseCommand(): string;
27
+ export declare function getNxCacheDirectory(options: CloudTaskRunnerOptions): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.NX_CLOUD_FORCE_METRICS = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT = exports.NUMBER_OF_AXIOS_RETRIES = exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = exports.NX_INVOKED_BY_RUNNER = exports.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = exports.DEFAULT_FILE_SIZE_LIMIT = exports.NX_CLOUD_UNLIMITED_OUTPUT = exports.UNLIMITED_FILE_SIZE = exports.NO_COMPLETED_TASKS_TIMEOUT = exports.NO_MESSAGES_TIMEOUT = exports.UNLIMITED_TIMEOUT = void 0;
3
+ exports.getNxCacheDirectory = 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.NX_CLOUD_FORCE_METRICS = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT = exports.NUMBER_OF_AXIOS_RETRIES = exports.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION = exports.NX_CLOUD_DISTRIBUTED_EXECUTION_ID = exports.NX_INVOKED_BY_RUNNER = exports.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE = exports.DEFAULT_FILE_SIZE_LIMIT = exports.NX_CLOUD_UNLIMITED_OUTPUT = exports.UNLIMITED_FILE_SIZE = exports.NO_COMPLETED_TASKS_TIMEOUT = exports.NO_MESSAGES_TIMEOUT = exports.UNLIMITED_TIMEOUT = exports.NX_DEFAULT_CACHE_LOCATION = void 0;
4
4
  const child_process_1 = require("child_process");
5
5
  const dotenv = require("dotenv");
6
6
  const fs_1 = require("fs");
@@ -9,6 +9,7 @@ const path_1 = require("path");
9
9
  const distributed_task_execution_detection_1 = require("./distributed-task-execution-detection");
10
10
  const is_ci_1 = require("./is-ci");
11
11
  const { workspaceRoot } = require('./nx-imports');
12
+ exports.NX_DEFAULT_CACHE_LOCATION = './node_modules/.cache/nx';
12
13
  exports.UNLIMITED_TIMEOUT = 9999999;
13
14
  exports.NO_MESSAGES_TIMEOUT = process.env.NX_CLOUD_AGENT_TIMEOUT_MS
14
15
  ? Number(process.env.NX_CLOUD_AGENT_TIMEOUT_MS)
@@ -133,22 +134,21 @@ function getBranch() {
133
134
  }
134
135
  return (_a = process.env.GITHUB_HEAD_REF) !== null && _a !== void 0 ? _a : '';
135
136
  }
136
- // For gitlab merge requests.
137
- // See: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
138
- if (process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !== undefined) {
139
- return process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME;
140
- }
141
- if (process.env.BITBUCKET_BRANCH !== undefined) {
142
- return process.env.BITBUCKET_BRANCH;
137
+ if (process.env.BITBUCKET_PR_ID !== undefined) {
138
+ return process.env.BITBUCKET_PR_ID;
143
139
  }
144
140
  if (process.env.VERCEL_GIT_COMMIT_SHA !== undefined) {
145
141
  return process.env.VERCEL_GIT_COMMIT_SHA;
146
142
  }
147
143
  // Gitlab, merge request flow only
148
- if (process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME) {
149
- return process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME;
144
+ // For support: Users must have their pipeline configured as merge requests
145
+ // ONLY to have this variable appear.
146
+ // https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-only-to-add-jobs
147
+ if (process.env.CI_MERGE_REQUEST_IID) {
148
+ return process.env.CI_MERGE_REQUEST_IID;
150
149
  }
151
150
  // Gitlab, branch pipeline flow only
151
+ // Will not work with bot comments
152
152
  if (process.env.CI_COMMIT_BRANCH) {
153
153
  return process.env.CI_COMMIT_BRANCH;
154
154
  }
@@ -187,4 +187,12 @@ function parseCommand() {
187
187
  return env ? `${env} ${res}` : res;
188
188
  }
189
189
  exports.parseCommand = parseCommand;
190
+ function getNxCacheDirectory(options) {
191
+ if (process.env.NX_CACHE_DIRECTORY)
192
+ return process.env.NX_CACHE_DIRECTORY;
193
+ if (options.cacheDirectory)
194
+ return options.cacheDirectory;
195
+ return exports.NX_DEFAULT_CACHE_LOCATION;
196
+ }
197
+ exports.getNxCacheDirectory = getNxCacheDirectory;
190
198
  //# sourceMappingURL=environment.js.map
@@ -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;AAClC,qDAAgD;A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AAG,MAAA,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,SAAS,CAAC;IACvD,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;AAND,oCAMC"}
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;AAClC,qDAAgD;AAChD,+BAAmC;AAGnC,iGAAuF;AACvF,mCAA+B;AAE/B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAErC,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,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;IACtD,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa;AACb,QAAA,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAC1C,QAAA,y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AAC;IAC1D,OAAO,iCAAyB,CAAC;AACnC,CAAC;AAJD,kDAIC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/nx-cloud",
3
- "version": "15.0.2",
3
+ "version": "15.1.0-beta.1",
4
4
  "description": "Nx Cloud plugin for Nx",
5
5
  "keywords": [
6
6
  "Monorepo",
package/project.json CHANGED
@@ -32,5 +32,6 @@
32
32
  },
33
33
  "outputs": ["{options.outputPath}"]
34
34
  }
35
- }
35
+ },
36
+ "name": "nx-packages-nx-cloud"
36
37
  }