@nrwl/nx-cloud 14.4.0-beta.1 → 14.4.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/bin/nx-cloud.js +3 -3
- package/bin/nx-cloud.js.map +1 -1
- package/lib/core/api/error-reporter.api.js +1 -36
- package/lib/core/api/run-group.api.d.ts +1 -1
- package/lib/core/api/run-group.api.js +1 -65
- package/lib/core/api/run-group.api.js.map +1 -1
- package/lib/core/commands/start-ci-run.js +7 -1
- package/lib/core/commands/start-ci-run.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-life-cycle.js +1 -156
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -176
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -113
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -166
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -79
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +1 -252
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -137
- package/lib/core/runners/distributed-execution/distributed-execution.api.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -217
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +1 -37
- package/lib/core/runners/distributed-execution/task-graph-creator.js +1 -77
- package/lib/utilities/create-unchanged-value-timeout.d.ts +4 -0
- package/lib/utilities/{create-no-new-messages-timeout.js → create-unchanged-value-timeout.js} +6 -7
- package/lib/utilities/create-unchanged-value-timeout.js.map +1 -0
- package/lib/utilities/environment.d.ts +1 -0
- package/lib/utilities/environment.js +5 -1
- package/lib/utilities/environment.js.map +1 -1
- package/package.json +4 -2
- package/tsconfig.spec.json +2 -1
- package/lib/utilities/create-no-new-messages-timeout.d.ts +0 -1
- package/lib/utilities/create-no-new-messages-timeout.js.map +0 -1
package/bin/nx-cloud.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const distributed_agent_impl_1 = require("../lib/core/runners/distributed-agent/distributed-agent.impl");
|
|
5
|
-
const start_ci_run_1 = require("../lib/core/commands/start-ci-run");
|
|
6
|
-
const stop_all_agents_1 = require("../lib/core/commands/stop-all-agents");
|
|
7
4
|
const clean_up_agents_1 = require("../lib/core/commands/clean-up-agents");
|
|
8
5
|
const record_output_1 = require("../lib/core/commands/record-output");
|
|
6
|
+
const start_ci_run_1 = require("../lib/core/commands/start-ci-run");
|
|
7
|
+
const stop_all_agents_1 = require("../lib/core/commands/stop-all-agents");
|
|
8
|
+
const distributed_agent_impl_1 = require("../lib/core/runners/distributed-agent/distributed-agent.impl");
|
|
9
9
|
const command = process.argv[2];
|
|
10
10
|
if (command === 'start-agent') {
|
|
11
11
|
(0, distributed_agent_impl_1.startAgent)().catch((e) => {
|
package/bin/nx-cloud.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-cloud.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/bin/nx-cloud.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"nx-cloud.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/bin/nx-cloud.ts"],"names":[],"mappings":";;;AAEA,0EAAqE;AACrE,sEAA+E;AAC/E,oEAA+D;AAC/D,0EAAqE;AACrE,yGAA0F;AAE1F,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,IAAI,OAAO,KAAK,aAAa,EAAE;IAC7B,IAAA,mCAAU,GAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ;KAAM,IAAI,OAAO,KAAK,iBAAiB,EAAE;IACxC,IAAA,+BAAa,GAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ;KAAM,IAAI,OAAO,KAAK,cAAc,EAAE;IACrC,IAAA,yBAAU,GAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ;KAAM,IAAI,OAAO,KAAK,iBAAiB,EAAE;IACxC,IAAA,+BAAa,GAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ;KAAM,IAAI,OAAO,KAAK,QAAQ,EAAE;IAC/B,IAAA,yCAAyB,GAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACtC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;CACJ;KAAM;IACL,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;CACtE"}
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ErrorReporterApi = void 0;
|
|
13
|
-
const axios_1 = require("../../utilities/axios");
|
|
14
|
-
const { output } = require('../../utilities/nx-imports');
|
|
15
|
-
class ErrorReporterApi {
|
|
16
|
-
constructor(options) {
|
|
17
|
-
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
18
|
-
}
|
|
19
|
-
reportError(message) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
try {
|
|
22
|
-
yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/report-client-error', {
|
|
23
|
-
message,
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
output.warn({
|
|
28
|
-
title: `Unable to record the following error: '${message}'`,
|
|
29
|
-
bodyLines: [e.message],
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.ErrorReporterApi = ErrorReporterApi;
|
|
36
|
-
//# sourceMappingURL=error-reporter.api.js.map
|
|
1
|
+
const a0_0x3e13=['__awaiter','../../utilities/axios','apply','message','done','value','apiAxiosInstance','reportError','warn','then','next','post','__esModule','throw','/nx-cloud/report-client-error','Unable\x20to\x20record\x20the\x20following\x20error:\x20\x27','axiosMultipleTries','ErrorReporterApi','defineProperty'];(function(_0x3fdef4,_0x3e1389){const _0x5d5429=function(_0x1373ef){while(--_0x1373ef){_0x3fdef4['push'](_0x3fdef4['shift']());}};_0x5d5429(++_0x3e1389);}(a0_0x3e13,0x170));const a0_0x5d54=function(_0x3fdef4,_0x3e1389){_0x3fdef4=_0x3fdef4-0x0;let _0x5d5429=a0_0x3e13[_0x3fdef4];return _0x5d5429;};'use strict';var __awaiter=this&&this[a0_0x5d54('0xc')]||function(_0x4c7d54,_0x23f4c4,_0x782b4f,_0x46d0b1){function _0x55402(_0x4c3413){return _0x4c3413 instanceof _0x782b4f?_0x4c3413:new _0x782b4f(function(_0x10d649){_0x10d649(_0x4c3413);});}return new(_0x782b4f||(_0x782b4f=Promise))(function(_0x53261a,_0x2af320){function _0x183482(_0x25eefe){try{_0x1ef6a0(_0x46d0b1['next'](_0x25eefe));}catch(_0x4b2ea1){_0x2af320(_0x4b2ea1);}}function _0xdb853c(_0x935d4e){try{_0x1ef6a0(_0x46d0b1[a0_0x5d54('0x6')](_0x935d4e));}catch(_0x2b4a4){_0x2af320(_0x2b4a4);}}function _0x1ef6a0(_0x5044c6){_0x5044c6[a0_0x5d54('0x10')]?_0x53261a(_0x5044c6[a0_0x5d54('0x11')]):_0x55402(_0x5044c6[a0_0x5d54('0x11')])[a0_0x5d54('0x2')](_0x183482,_0xdb853c);}_0x1ef6a0((_0x46d0b1=_0x46d0b1[a0_0x5d54('0xe')](_0x4c7d54,_0x23f4c4||[]))[a0_0x5d54('0x3')]());});};Object[a0_0x5d54('0xb')](exports,a0_0x5d54('0x5'),{'value':!![]});exports['ErrorReporterApi']=void 0x0;const axios_1=require(a0_0x5d54('0xd'));const {output}=require('../../utilities/nx-imports');class ErrorReporterApi{constructor(_0x435cf4){this[a0_0x5d54('0x12')]=(0x0,axios_1['createApiAxiosInstance'])(_0x435cf4);}[a0_0x5d54('0x0')](_0x18bd9c){return __awaiter(this,void 0x0,void 0x0,function*(){try{yield(0x0,axios_1[a0_0x5d54('0x9')])(()=>this[a0_0x5d54('0x12')][a0_0x5d54('0x4')](a0_0x5d54('0x7'),{'message':_0x18bd9c}));}catch(_0xaa5fe6){output[a0_0x5d54('0x1')]({'title':a0_0x5d54('0x8')+_0x18bd9c+'\x27','bodyLines':[_0xaa5fe6[a0_0x5d54('0xf')]]});}});}}exports[a0_0x5d54('0xa')]=ErrorReporterApi;
|
|
@@ -2,6 +2,6 @@ import { CloudTaskRunnerOptions } from '../models/cloud-task-runner-options';
|
|
|
2
2
|
export declare class RunGroupApi {
|
|
3
3
|
private apiAxiosInstance;
|
|
4
4
|
constructor(options: CloudTaskRunnerOptions);
|
|
5
|
-
createRunGroup(branch: string | null, runGroup: string): Promise<void>;
|
|
5
|
+
createRunGroup(branch: string | null, runGroup: string, stopAgentsOnFailure?: boolean, agentCount?: number, commandCount?: number): Promise<void>;
|
|
6
6
|
completeRunGroup(runGroup: string): Promise<void>;
|
|
7
7
|
}
|
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RunGroupApi = void 0;
|
|
13
|
-
const axios_1 = require("../../utilities/axios");
|
|
14
|
-
const metric_logger_1 = require("../../utilities/metric-logger");
|
|
15
|
-
const { output } = require('../../utilities/nx-imports');
|
|
16
|
-
class RunGroupApi {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
this.apiAxiosInstance = (0, axios_1.createApiAxiosInstance)(options);
|
|
19
|
-
}
|
|
20
|
-
createRunGroup(branch, runGroup) {
|
|
21
|
-
var _a;
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('createRunGroup');
|
|
24
|
-
try {
|
|
25
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/create-run-group', {
|
|
26
|
-
branch: branch,
|
|
27
|
-
runGroup: runGroup,
|
|
28
|
-
}));
|
|
29
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
33
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
34
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
35
|
-
output.error({
|
|
36
|
-
title: e.message,
|
|
37
|
-
});
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
completeRunGroup(runGroup) {
|
|
43
|
-
var _a;
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const recorder = (0, metric_logger_1.createMetricRecorder)('createRunGroup');
|
|
46
|
-
try {
|
|
47
|
-
const resp = yield (0, axios_1.axiosMultipleTries)(() => this.apiAxiosInstance.post('/nx-cloud/executions/complete-run-group', {
|
|
48
|
-
runGroup: runGroup,
|
|
49
|
-
}));
|
|
50
|
-
recorder.recordMetric((0, metric_logger_1.mapRespToPerfEntry)(resp));
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
recorder.recordMetric(((_a = e === null || e === void 0 ? void 0 : e.axiosException) === null || _a === void 0 ? void 0 : _a.response)
|
|
54
|
-
? (0, metric_logger_1.mapRespToPerfEntry)(e.axiosException.response)
|
|
55
|
-
: metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
56
|
-
output.error({
|
|
57
|
-
title: e.message,
|
|
58
|
-
});
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.RunGroupApi = RunGroupApi;
|
|
65
|
-
//# sourceMappingURL=run-group.api.js.map
|
|
1
|
+
const a1_0x4f1d=['exit','axiosMultipleTries','axiosException','next','apiAxiosInstance','RunGroupApi','__awaiter','../../utilities/metric-logger','RUNNER_FAILURE_PERF_ENTRY','createRunGroup','mapRespToPerfEntry','createMetricRecorder','../../utilities/axios','post','createApiAxiosInstance','__esModule','value','completeRunGroup','defineProperty','/nx-cloud/executions/create-run-group','message','recordMetric','/nx-cloud/executions/complete-run-group','response'];(function(_0x5241a6,_0x4f1d41){const _0x384848=function(_0x294cfb){while(--_0x294cfb){_0x5241a6['push'](_0x5241a6['shift']());}};_0x384848(++_0x4f1d41);}(a1_0x4f1d,0x1bd));const a1_0x3848=function(_0x5241a6,_0x4f1d41){_0x5241a6=_0x5241a6-0x0;let _0x384848=a1_0x4f1d[_0x5241a6];return _0x384848;};'use strict';var __awaiter=this&&this[a1_0x3848('0x11')]||function(_0x2b62d1,_0x280e0e,_0xb2eecd,_0x2ae793){function _0x22def6(_0x422180){return _0x422180 instanceof _0xb2eecd?_0x422180:new _0xb2eecd(function(_0x36c45c){_0x36c45c(_0x422180);});}return new(_0xb2eecd||(_0xb2eecd=Promise))(function(_0x2ce0c0,_0x18ddb5){function _0x20d67b(_0x211b0e){try{_0x4c0c16(_0x2ae793[a1_0x3848('0xe')](_0x211b0e));}catch(_0x2404c2){_0x18ddb5(_0x2404c2);}}function _0x24defb(_0x47ee89){try{_0x4c0c16(_0x2ae793['throw'](_0x47ee89));}catch(_0x32b7a6){_0x18ddb5(_0x32b7a6);}}function _0x4c0c16(_0x104cb4){_0x104cb4['done']?_0x2ce0c0(_0x104cb4[a1_0x3848('0x3')]):_0x22def6(_0x104cb4[a1_0x3848('0x3')])['then'](_0x20d67b,_0x24defb);}_0x4c0c16((_0x2ae793=_0x2ae793['apply'](_0x2b62d1,_0x280e0e||[]))['next']());});};Object[a1_0x3848('0x5')](exports,a1_0x3848('0x2'),{'value':!![]});exports['RunGroupApi']=void 0x0;const axios_1=require(a1_0x3848('0x17'));const metric_logger_1=require(a1_0x3848('0x12'));const {output}=require('../../utilities/nx-imports');class RunGroupApi{constructor(_0x307592){this[a1_0x3848('0xf')]=(0x0,axios_1[a1_0x3848('0x1')])(_0x307592);}['createRunGroup'](_0x56809c,_0x1f91f7,_0x2f6979,_0x1dc1e4,_0x2baa72){var _0x374755;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3cbcf1=(0x0,metric_logger_1[a1_0x3848('0x16')])(a1_0x3848('0x14'));try{const _0x56d963=yield(0x0,axios_1[a1_0x3848('0xc')])(()=>this[a1_0x3848('0xf')][a1_0x3848('0x0')](a1_0x3848('0x6'),{'branch':_0x56809c,'runGroup':_0x1f91f7,'stopAgentsOnFailure':_0x2f6979,'agentCount':_0x1dc1e4,'commandCount':_0x2baa72}));_0x3cbcf1['recordMetric']((0x0,metric_logger_1[a1_0x3848('0x15')])(_0x56d963));}catch(_0x39b94e){_0x3cbcf1['recordMetric'](((_0x374755=_0x39b94e===null||_0x39b94e===void 0x0?void 0x0:_0x39b94e[a1_0x3848('0xd')])===null||_0x374755===void 0x0?void 0x0:_0x374755['response'])?(0x0,metric_logger_1[a1_0x3848('0x15')])(_0x39b94e[a1_0x3848('0xd')][a1_0x3848('0xa')]):metric_logger_1[a1_0x3848('0x13')]);output['error']({'title':_0x39b94e[a1_0x3848('0x7')]});process[a1_0x3848('0xb')](0x1);}});}[a1_0x3848('0x4')](_0x4ae560){var _0x4fa6c1;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x455946=(0x0,metric_logger_1[a1_0x3848('0x16')])(a1_0x3848('0x14'));try{const _0x552643=yield(0x0,axios_1[a1_0x3848('0xc')])(()=>this[a1_0x3848('0xf')][a1_0x3848('0x0')](a1_0x3848('0x9'),{'runGroup':_0x4ae560}));_0x455946['recordMetric']((0x0,metric_logger_1[a1_0x3848('0x15')])(_0x552643));}catch(_0x542bb1){_0x455946[a1_0x3848('0x8')](((_0x4fa6c1=_0x542bb1===null||_0x542bb1===void 0x0?void 0x0:_0x542bb1[a1_0x3848('0xd')])===null||_0x4fa6c1===void 0x0?void 0x0:_0x4fa6c1[a1_0x3848('0xa')])?(0x0,metric_logger_1[a1_0x3848('0x15')])(_0x542bb1[a1_0x3848('0xd')][a1_0x3848('0xa')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);output['error']({'title':_0x542bb1['message']});process[a1_0x3848('0xb')](0x1);}});}}exports[a1_0x3848('0x10')]=RunGroupApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-group.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/api/run-group.api.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"run-group.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/api/run-group.api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAG+B;AAC/B,iEAIuC;AAGvC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAa,WAAW;IAGtB,YAAY,OAA+B;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAA,8BAAsB,EAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEK,cAAc,CAClB,MAAqB,EACrB,QAAgB,EAChB,mBAA6B,EAC7B,UAAmB,EACnB,YAAqB;;;YAErB,MAAM,QAAQ,GAAG,IAAA,oCAAoB,EAAC,gBAAgB,CAAC,CAAC;YACxD,IAAI;gBACF,MAAM,IAAI,GAAG,MAAM,IAAA,0BAAkB,EAAC,GAAG,EAAE,CACzC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,uCAAuC,EAAE;oBAClE,MAAM;oBACN,QAAQ;oBACR,mBAAmB;oBACnB,UAAU;oBACV,YAAY;iBACb,CAAC,CACH,CAAC;gBACF,QAAQ,CAAC,YAAY,CAAC,IAAA,kCAAkB,EAAC,IAAI,CAAC,CAAC,CAAC;aACjD;YAAC,OAAO,CAAM,EAAE;gBACf,QAAQ,CAAC,YAAY,CACnB,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,cAAc,0CAAE,QAAQ;oBACzB,CAAC,CAAC,IAAA,kCAAkB,EAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAC/C,CAAC,CAAC,yCAAyB,CAC9B,CAAC;gBAEF,MAAM,CAAC,KAAK,CAAC;oBACX,KAAK,EAAE,CAAC,CAAC,OAAO;iBACjB,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;;KACF;IAEK,gBAAgB,CAAC,QAAgB;;;YACrC,MAAM,QAAQ,GAAG,IAAA,oCAAoB,EAAC,gBAAgB,CAAC,CAAC;YAExD,IAAI;gBACF,MAAM,IAAI,GAAG,MAAM,IAAA,0BAAkB,EAAC,GAAG,EAAE,CACzC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,yCAAyC,EAAE;oBACpE,QAAQ,EAAE,QAAQ;iBACnB,CAAC,CACH,CAAC;gBACF,QAAQ,CAAC,YAAY,CAAC,IAAA,kCAAkB,EAAC,IAAI,CAAC,CAAC,CAAC;aACjD;YAAC,OAAO,CAAM,EAAE;gBACf,QAAQ,CAAC,YAAY,CACnB,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,cAAc,0CAAE,QAAQ;oBACzB,CAAC,CAAC,IAAA,kCAAkB,EAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAC/C,CAAC,CAAC,yCAAyB,CAC9B,CAAC;gBAEF,MAAM,CAAC,KAAK,CAAC;oBACX,KAAK,EAAE,CAAC,CAAC,OAAO;iBACjB,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;;KACF;CACF;AA/DD,kCA+DC"}
|
|
@@ -15,7 +15,12 @@ const environment_1 = require("../../utilities/environment");
|
|
|
15
15
|
const print_run_group_error_1 = require("../error/print-run-group-error");
|
|
16
16
|
const run_group_api_1 = require("../api/run-group.api");
|
|
17
17
|
const fs_1 = require("fs");
|
|
18
|
+
const yargsParser = require("yargs-parser");
|
|
18
19
|
const { output, workspaceRoot } = require('../../utilities/nx-imports');
|
|
20
|
+
const args = yargsParser(process.argv, {
|
|
21
|
+
boolean: ['stop-agents-on-failure'],
|
|
22
|
+
number: ['agent-count', 'command-count'],
|
|
23
|
+
});
|
|
19
24
|
function startCiRun() {
|
|
20
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
26
|
const branch = (0, environment_1.getBranch)();
|
|
@@ -31,7 +36,8 @@ function startCiRun() {
|
|
|
31
36
|
}
|
|
32
37
|
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString())).tasksRunnerOptions.default.options;
|
|
33
38
|
const api = new run_group_api_1.RunGroupApi(options);
|
|
34
|
-
|
|
39
|
+
console.log(args);
|
|
40
|
+
yield api.createRunGroup(branch, runGroup, args.stopAgentsOnFailure, args.agentCount, args.commandCount);
|
|
35
41
|
});
|
|
36
42
|
}
|
|
37
43
|
exports.startCiRun = startCiRun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-ci-run.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/start-ci-run.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,6DAIqC;AACrC,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;
|
|
1
|
+
{"version":3,"file":"start-ci-run.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/start-ci-run.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,6DAIqC;AACrC,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAClC,4CAA4C;AAE5C,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AACxE,MAAM,IAAI,GAAQ,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE;IAC1C,OAAO,EAAE,CAAC,wBAAwB,CAAC;IACnC,MAAM,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;CACzC,CAAC,CAAC;AAEH,SAAsB,UAAU;;QAC9B,MAAM,MAAM,GAAG,IAAA,uBAAS,GAAE,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;QAE/B,IAAI,CAAC,QAAQ,EAAE;YACb,IAAA,0CAAkB,GAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;QAED,IAAI,6BAAe,EAAE;YACnB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,sBAAsB,QAAQ,EAAE;aACxC,CAAC,CAAC;SACJ;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,GAAG,aAAa,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,CACvE,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;QAErC,MAAM,GAAG,GAAG,IAAI,2BAAW,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,MAAM,GAAG,CAAC,cAAc,CACtB,MAAM,EACN,QAAQ,EACR,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,YAAY,CAClB,CAAC;IACJ,CAAC;CAAA;AA3BD,gCA2BC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TaskToExecute } from './task-to-execute.model';
|
|
2
2
|
export interface TasksApiResponse {
|
|
3
3
|
completed: boolean;
|
|
4
|
+
status?: 'RUN_GROUP_COMPLETED' | 'NO_FURTHER_TASKS_TO_RUN' | 'IN_PROGRESS';
|
|
4
5
|
retryDuring: number | null;
|
|
5
6
|
executionId: string | null;
|
|
6
7
|
tasks: TaskToExecute[];
|
|
@@ -1,156 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudEnabledLifeCycle = void 0;
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
const fs_1 = require("fs");
|
|
7
|
-
const environment_1 = require("../../../utilities/environment");
|
|
8
|
-
const serializer_overrides_1 = require("../../../utilities/serializer-overrides");
|
|
9
|
-
const { workspaceRoot } = require('../../../utilities/nx-imports');
|
|
10
|
-
class CloudEnabledLifeCycle {
|
|
11
|
-
constructor(runContext, cacheDirectory, skipNxCache, collectTerminalOutput, cacheableOperations, outputObfuscator, tasks) {
|
|
12
|
-
this.runContext = runContext;
|
|
13
|
-
this.cacheDirectory = cacheDirectory;
|
|
14
|
-
this.skipNxCache = skipNxCache;
|
|
15
|
-
this.collectTerminalOutput = collectTerminalOutput;
|
|
16
|
-
this.cacheableOperations = cacheableOperations;
|
|
17
|
-
this.outputObfuscator = outputObfuscator;
|
|
18
|
-
this.tasks = tasks;
|
|
19
|
-
}
|
|
20
|
-
scheduleTask(task) {
|
|
21
|
-
this.runContext.scheduledTasks.push(task);
|
|
22
|
-
}
|
|
23
|
-
startTask(task) {
|
|
24
|
-
this.tasks.push({
|
|
25
|
-
taskId: task.id,
|
|
26
|
-
startTime: new Date().toISOString(),
|
|
27
|
-
target: task.target.target,
|
|
28
|
-
projectName: task.target.project,
|
|
29
|
-
hash: task.hash,
|
|
30
|
-
hashDetails: this.cleanUpHashDetails(task.hashDetails),
|
|
31
|
-
params: (0, serializer_overrides_1.serializeOverrides)(task),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
// Used for older version for Nx. Remove in Dec 2022
|
|
35
|
-
endTask(task, code) {
|
|
36
|
-
let cacheStatus;
|
|
37
|
-
if (this.runContext.statuses[task.hash]) {
|
|
38
|
-
cacheStatus = this.runContext.statuses[task.hash];
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
if (this.cacheableOperations.indexOf(task.target.target) > -1 &&
|
|
42
|
-
!this.skipNxCache) {
|
|
43
|
-
cacheStatus = 'local-cache-hit';
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
cacheStatus = 'cache-miss';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
this.updateStartedTask(task, code, cacheStatus);
|
|
50
|
-
}
|
|
51
|
-
endTasks(tasks) {
|
|
52
|
-
for (let t of tasks) {
|
|
53
|
-
let cacheStatus;
|
|
54
|
-
const taskIsRemoteCacheHit = t.status === 'remote-cache';
|
|
55
|
-
const taskIsLocalCacheHitPreNx135 = t.status === 'cache';
|
|
56
|
-
const taskIsLocalCacheHit = t.status === 'local-cache' ||
|
|
57
|
-
t.status === 'local-cache-kept-existing' ||
|
|
58
|
-
taskIsLocalCacheHitPreNx135;
|
|
59
|
-
if (this.runContext.statuses[t.task.hash]) {
|
|
60
|
-
cacheStatus = this.runContext.statuses[t.task.hash];
|
|
61
|
-
}
|
|
62
|
-
else if (taskIsRemoteCacheHit) {
|
|
63
|
-
cacheStatus = 'remote-cache-hit';
|
|
64
|
-
}
|
|
65
|
-
else if (taskIsLocalCacheHit) {
|
|
66
|
-
cacheStatus = 'local-cache-hit';
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
if (this.cacheableOperations.indexOf(t.task.target.target) > -1 &&
|
|
70
|
-
!this.skipNxCache) {
|
|
71
|
-
cacheStatus = 'local-cache-hit';
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
cacheStatus = 'cache-miss';
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
this.updateStartedTask(t.task, t.code, cacheStatus);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
endCommand() { }
|
|
81
|
-
updateStartedTask(task, code, cacheStatus) {
|
|
82
|
-
const startedTask = this.tasks.find((t) => t.taskId === task.id);
|
|
83
|
-
if (!startedTask) {
|
|
84
|
-
throw new Error(`Cannot find task ${task.id}`);
|
|
85
|
-
}
|
|
86
|
-
startedTask.endTime = new Date().toISOString();
|
|
87
|
-
startedTask.status = code;
|
|
88
|
-
startedTask.params = this.outputObfuscator.obfuscate(startedTask.params);
|
|
89
|
-
startedTask.cacheStatus = cacheStatus;
|
|
90
|
-
if (this.collectTerminalOutput) {
|
|
91
|
-
startedTask.terminalOutput = this.getTerminalOutput(task.hash, startedTask.cacheStatus, code);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
getTerminalOutput(hash, cacheStatus, code) {
|
|
95
|
-
let dir;
|
|
96
|
-
if (this.cacheDirectory) {
|
|
97
|
-
if (this.cacheDirectory.startsWith('./')) {
|
|
98
|
-
dir = (0, path_1.join)(workspaceRoot, this.cacheDirectory);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
dir = this.cacheDirectory;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
dir = (0, path_1.join)(workspaceRoot, 'node_modules', '.cache', 'nx');
|
|
106
|
-
}
|
|
107
|
-
try {
|
|
108
|
-
const taskOutput = this.readTerminalOutputFile(dir, hash);
|
|
109
|
-
const taskOutputSanitized = this.outputObfuscator.obfuscate(taskOutput);
|
|
110
|
-
if (environment_1.NX_CLOUD_UNLIMITED_OUTPUT)
|
|
111
|
-
return taskOutputSanitized;
|
|
112
|
-
const maxCharacters = cacheStatus === 'cache-miss'
|
|
113
|
-
? code === 0
|
|
114
|
-
? CloudEnabledLifeCycle.MAX_CHARACTERS_SUCCESSFUL_TASK
|
|
115
|
-
: CloudEnabledLifeCycle.MAX_CHARACTERS_FAILED_TASK
|
|
116
|
-
: CloudEnabledLifeCycle.MAX_CHARACTERS_CACHED_TASK;
|
|
117
|
-
return taskOutputSanitized.length > maxCharacters
|
|
118
|
-
? `TRUNCATED\n\n${taskOutputSanitized.slice(taskOutputSanitized.length - maxCharacters)}`
|
|
119
|
-
: taskOutputSanitized;
|
|
120
|
-
}
|
|
121
|
-
catch (e) {
|
|
122
|
-
return '';
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
cleanUpHashDetails(hashDetails) {
|
|
126
|
-
const nodes = {};
|
|
127
|
-
Object.keys(hashDetails.nodes)
|
|
128
|
-
.filter((k) => !k.startsWith('npm:'))
|
|
129
|
-
.forEach((k) => {
|
|
130
|
-
nodes[k] = hashDetails.nodes[k];
|
|
131
|
-
});
|
|
132
|
-
return {
|
|
133
|
-
nodes,
|
|
134
|
-
runtime: hashDetails.runtime,
|
|
135
|
-
implicitDeps: hashDetails.implicitDeps,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
readTerminalOutputFile(dir, hash) {
|
|
139
|
-
try {
|
|
140
|
-
return (0, fs_1.readFileSync)(path.join(dir, 'terminalOutputs', hash)).toString();
|
|
141
|
-
}
|
|
142
|
-
catch (_a) {
|
|
143
|
-
try {
|
|
144
|
-
return (0, fs_1.readFileSync)(path.join(dir, hash, 'terminalOutput')).toString();
|
|
145
|
-
}
|
|
146
|
-
catch (_b) {
|
|
147
|
-
return '';
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
exports.CloudEnabledLifeCycle = CloudEnabledLifeCycle;
|
|
153
|
-
CloudEnabledLifeCycle.MAX_CHARACTERS_FAILED_TASK = 200000;
|
|
154
|
-
CloudEnabledLifeCycle.MAX_CHARACTERS_SUCCESSFUL_TASK = 20000;
|
|
155
|
-
CloudEnabledLifeCycle.MAX_CHARACTERS_CACHED_TASK = 20000;
|
|
156
|
-
//# sourceMappingURL=cloud-enabled-life-cycle.js.map
|
|
1
|
+
const a0_0x40d3=['join','readFileSync','startTask','scheduleTask','serializeOverrides','endTime','node_modules','cleanUpHashDetails','path','readTerminalOutputFile','CloudEnabledLifeCycle','endCommand','push','find','terminalOutput','MAX_CHARACTERS_FAILED_TASK','keys','target','endTasks','hashDetails','scheduledTasks','getTerminalOutput','runContext','cacheStatus','code','cacheDirectory','../../../utilities/serializer-overrides','MAX_CHARACTERS_CACHED_TASK','toISOString','runtime','terminalOutputs','collectTerminalOutput','hash','MAX_CHARACTERS_SUCCESSFUL_TASK','NX_CLOUD_UNLIMITED_OUTPUT','defineProperty','startsWith','updateStartedTask','statuses','filter','cacheableOperations','outputObfuscator','toString','forEach','skipNxCache','obfuscate','task','taskId','nodes','Cannot\x20find\x20task\x20','endTask','local-cache-hit','implicitDeps','../../../utilities/environment','length','cache-miss','indexOf','.cache','cache','params','../../../utilities/nx-imports','tasks','TRUNCATED\x0a\x0a','project','status'];(function(_0x13bae9,_0x40d374){const _0x4efa5e=function(_0x2a32cc){while(--_0x2a32cc){_0x13bae9['push'](_0x13bae9['shift']());}};_0x4efa5e(++_0x40d374);}(a0_0x40d3,0xb6));const a0_0x4efa=function(_0x13bae9,_0x40d374){_0x13bae9=_0x13bae9-0x0;let _0x4efa5e=a0_0x40d3[_0x13bae9];return _0x4efa5e;};'use strict';Object[a0_0x4efa('0x30')](exports,'__esModule',{'value':!![]});exports[a0_0x4efa('0x17')]=void 0x0;const path=require(a0_0x4efa('0x15'));const path_1=require(a0_0x4efa('0x15'));const fs_1=require('fs');const environment_1=require(a0_0x4efa('0x1'));const serializer_overrides_1=require(a0_0x4efa('0x27'));const {workspaceRoot}=require(a0_0x4efa('0x8'));class CloudEnabledLifeCycle{constructor(_0x4eb463,_0x1319b8,_0x84c4d1,_0x5613bb,_0x249914,_0x1853a7,_0x3ec88d){this[a0_0x4efa('0x23')]=_0x4eb463;this[a0_0x4efa('0x26')]=_0x1319b8;this[a0_0x4efa('0x39')]=_0x84c4d1;this[a0_0x4efa('0x2c')]=_0x5613bb;this[a0_0x4efa('0x35')]=_0x249914;this[a0_0x4efa('0x36')]=_0x1853a7;this['tasks']=_0x3ec88d;}[a0_0x4efa('0x10')](_0x579583){this[a0_0x4efa('0x23')][a0_0x4efa('0x21')][a0_0x4efa('0x19')](_0x579583);}[a0_0x4efa('0xf')](_0x3c367c){this[a0_0x4efa('0x9')]['push']({'taskId':_0x3c367c['id'],'startTime':new Date()[a0_0x4efa('0x29')](),'target':_0x3c367c[a0_0x4efa('0x1e')]['target'],'projectName':_0x3c367c[a0_0x4efa('0x1e')][a0_0x4efa('0xb')],'hash':_0x3c367c[a0_0x4efa('0x2d')],'hashDetails':this[a0_0x4efa('0x14')](_0x3c367c[a0_0x4efa('0x20')]),'params':(0x0,serializer_overrides_1[a0_0x4efa('0x11')])(_0x3c367c)});}[a0_0x4efa('0x3f')](_0x2c8d1f,_0x53f10e){let _0x366512;if(this[a0_0x4efa('0x23')][a0_0x4efa('0x33')][_0x2c8d1f[a0_0x4efa('0x2d')]]){_0x366512=this[a0_0x4efa('0x23')]['statuses'][_0x2c8d1f[a0_0x4efa('0x2d')]];}else{if(this[a0_0x4efa('0x35')][a0_0x4efa('0x4')](_0x2c8d1f[a0_0x4efa('0x1e')]['target'])>-0x1&&!this[a0_0x4efa('0x39')]){_0x366512='local-cache-hit';}else{_0x366512='cache-miss';}}this['updateStartedTask'](_0x2c8d1f,_0x53f10e,_0x366512);}[a0_0x4efa('0x1f')](_0x246f85){for(let _0x35b490 of _0x246f85){let _0x1c4c40;const _0x434b88=_0x35b490[a0_0x4efa('0xc')]==='remote-cache';const _0xbe7637=_0x35b490[a0_0x4efa('0xc')]===a0_0x4efa('0x6');const _0x437e65=_0x35b490['status']==='local-cache'||_0x35b490[a0_0x4efa('0xc')]==='local-cache-kept-existing'||_0xbe7637;if(this['runContext'][a0_0x4efa('0x33')][_0x35b490[a0_0x4efa('0x3b')][a0_0x4efa('0x2d')]]){_0x1c4c40=this[a0_0x4efa('0x23')][a0_0x4efa('0x33')][_0x35b490['task']['hash']];}else if(_0x434b88){_0x1c4c40='remote-cache-hit';}else if(_0x437e65){_0x1c4c40=a0_0x4efa('0x40');}else{if(this[a0_0x4efa('0x35')]['indexOf'](_0x35b490[a0_0x4efa('0x3b')][a0_0x4efa('0x1e')][a0_0x4efa('0x1e')])>-0x1&&!this[a0_0x4efa('0x39')]){_0x1c4c40=a0_0x4efa('0x40');}else{_0x1c4c40=a0_0x4efa('0x3');}}this[a0_0x4efa('0x32')](_0x35b490[a0_0x4efa('0x3b')],_0x35b490[a0_0x4efa('0x25')],_0x1c4c40);}}[a0_0x4efa('0x18')](){}[a0_0x4efa('0x32')](_0x183961,_0x1c40f5,_0x215b54){const _0x28d9c0=this[a0_0x4efa('0x9')][a0_0x4efa('0x1a')](_0x4a1cec=>_0x4a1cec[a0_0x4efa('0x3c')]===_0x183961['id']);if(!_0x28d9c0){throw new Error(a0_0x4efa('0x3e')+_0x183961['id']);}_0x28d9c0[a0_0x4efa('0x12')]=new Date()[a0_0x4efa('0x29')]();_0x28d9c0['status']=_0x1c40f5;_0x28d9c0[a0_0x4efa('0x7')]=this['outputObfuscator'][a0_0x4efa('0x3a')](_0x28d9c0[a0_0x4efa('0x7')]);_0x28d9c0[a0_0x4efa('0x24')]=_0x215b54;if(this[a0_0x4efa('0x2c')]){_0x28d9c0[a0_0x4efa('0x1b')]=this['getTerminalOutput'](_0x183961['hash'],_0x28d9c0[a0_0x4efa('0x24')],_0x1c40f5);}}[a0_0x4efa('0x22')](_0x537422,_0x62e657,_0x460e3a){let _0x514066;if(this[a0_0x4efa('0x26')]){if(this[a0_0x4efa('0x26')][a0_0x4efa('0x31')]('./')){_0x514066=(0x0,path_1[a0_0x4efa('0xd')])(workspaceRoot,this['cacheDirectory']);}else{_0x514066=this[a0_0x4efa('0x26')];}}else{_0x514066=(0x0,path_1['join'])(workspaceRoot,a0_0x4efa('0x13'),a0_0x4efa('0x5'),'nx');}try{const _0x55be19=this[a0_0x4efa('0x16')](_0x514066,_0x537422);const _0x530e0f=this[a0_0x4efa('0x36')]['obfuscate'](_0x55be19);if(environment_1[a0_0x4efa('0x2f')])return _0x530e0f;const _0x5ebb16=_0x62e657===a0_0x4efa('0x3')?_0x460e3a===0x0?CloudEnabledLifeCycle[a0_0x4efa('0x2e')]:CloudEnabledLifeCycle[a0_0x4efa('0x1c')]:CloudEnabledLifeCycle[a0_0x4efa('0x28')];return _0x530e0f[a0_0x4efa('0x2')]>_0x5ebb16?a0_0x4efa('0xa')+_0x530e0f['slice'](_0x530e0f[a0_0x4efa('0x2')]-_0x5ebb16):_0x530e0f;}catch(_0x5673d5){return'';}}[a0_0x4efa('0x14')](_0x1c6b71){const _0x4a6f01={};Object[a0_0x4efa('0x1d')](_0x1c6b71[a0_0x4efa('0x3d')])[a0_0x4efa('0x34')](_0x74e73f=>!_0x74e73f['startsWith']('npm:'))[a0_0x4efa('0x38')](_0x5091bc=>{_0x4a6f01[_0x5091bc]=_0x1c6b71[a0_0x4efa('0x3d')][_0x5091bc];});return{'nodes':_0x4a6f01,'runtime':_0x1c6b71[a0_0x4efa('0x2a')],'implicitDeps':_0x1c6b71[a0_0x4efa('0x0')]};}[a0_0x4efa('0x16')](_0x577196,_0x5951b9){try{return(0x0,fs_1[a0_0x4efa('0xe')])(path[a0_0x4efa('0xd')](_0x577196,a0_0x4efa('0x2b'),_0x5951b9))[a0_0x4efa('0x37')]();}catch(_0x5a52e6){try{return(0x0,fs_1[a0_0x4efa('0xe')])(path[a0_0x4efa('0xd')](_0x577196,_0x5951b9,a0_0x4efa('0x1b')))['toString']();}catch(_0x12bb7){return'';}}}}exports[a0_0x4efa('0x17')]=CloudEnabledLifeCycle;CloudEnabledLifeCycle[a0_0x4efa('0x1c')]=0x30d40;CloudEnabledLifeCycle[a0_0x4efa('0x2e')]=0x4e20;CloudEnabledLifeCycle[a0_0x4efa('0x28')]=0x4e20;
|
|
@@ -1,176 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.cloudEnabledTasksRunner = void 0;
|
|
13
|
-
const message_reporter_1 = require("../../terminal-output/message-reporter");
|
|
14
|
-
const end_of_run_message_1 = require("../../terminal-output/end-of-run-message");
|
|
15
|
-
const output_obfuscator_1 = require("../../terminal-output/output-obfuscator");
|
|
16
|
-
const cloud_enabled_life_cycle_1 = require("./cloud-enabled-life-cycle");
|
|
17
|
-
const file_storage_1 = require("../../file-storage/file-storage");
|
|
18
|
-
const e2e_encryption_1 = require("../../file-storage/e2e-encryption");
|
|
19
|
-
const environment_1 = require("../../../utilities/environment");
|
|
20
|
-
const cloud_remote_cache_1 = require("./cloud-remote-cache");
|
|
21
|
-
const cloud_run_api_1 = require("./cloud-run.api");
|
|
22
|
-
const fs_1 = require("fs");
|
|
23
|
-
const path = require("path");
|
|
24
|
-
const metric_logger_1 = require("../../../utilities/metric-logger");
|
|
25
|
-
const error_reporter_api_1 = require("../../api/error-reporter.api");
|
|
26
|
-
const { tasksRunner, output } = require('../../../utilities/nx-imports');
|
|
27
|
-
function createApi(errors, options, runContext) {
|
|
28
|
-
const machineInfo = (0, environment_1.getMachineInfo)(options);
|
|
29
|
-
return new cloud_run_api_1.CloudRunApi(errors, runContext, options, machineInfo);
|
|
30
|
-
}
|
|
31
|
-
function storeTaskHashes(taskExecutions, directory, distributedExecutionId) {
|
|
32
|
-
const hashes = JSON.stringify(taskExecutions.map((t) => ({
|
|
33
|
-
taskId: t.taskId,
|
|
34
|
-
hash: t.hash,
|
|
35
|
-
})));
|
|
36
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
37
|
-
output.note({
|
|
38
|
-
title: `Executed tasks with hashes: ${hashes}`,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
(0, fs_1.writeFileSync)(path.join(directory, `tasks-hashes-${distributedExecutionId}`), hashes);
|
|
42
|
-
}
|
|
43
|
-
function onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const runEndTime = new Date().toISOString();
|
|
46
|
-
const branch = (0, environment_1.getBranch)();
|
|
47
|
-
const runData = {
|
|
48
|
-
command: outputObfuscator.obfuscate((0, environment_1.parseCommand)()),
|
|
49
|
-
startTime: runStartTime,
|
|
50
|
-
endTime: runEndTime,
|
|
51
|
-
distributedExecutionId: environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID,
|
|
52
|
-
branch: branch,
|
|
53
|
-
scan: true,
|
|
54
|
-
runGroup: (0, environment_1.getRunGroup)(),
|
|
55
|
-
// only set sha if branch is set because we invoke a separate process,
|
|
56
|
-
// which adds a few millis
|
|
57
|
-
sha: branch ? (0, environment_1.extractGitSha)() : undefined,
|
|
58
|
-
inner: inner,
|
|
59
|
-
};
|
|
60
|
-
if (environment_1.AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION) {
|
|
61
|
-
storeTaskHashes(taskExecutions, options.cacheDirectory || './node_modules/.cache/nx', environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID);
|
|
62
|
-
try {
|
|
63
|
-
yield remoteCache.waitForStoreRequestsToComplete();
|
|
64
|
-
}
|
|
65
|
-
catch (e) {
|
|
66
|
-
output.error({
|
|
67
|
-
title: `Agent wasn't able to store artifacts`,
|
|
68
|
-
});
|
|
69
|
-
messages.printMessages();
|
|
70
|
-
process.exit(environment_1.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE);
|
|
71
|
-
}
|
|
72
|
-
try {
|
|
73
|
-
yield api.endRun(runData, taskExecutions);
|
|
74
|
-
}
|
|
75
|
-
catch (e) {
|
|
76
|
-
output.error({
|
|
77
|
-
title: `Agent wasn't able to record its run`,
|
|
78
|
-
});
|
|
79
|
-
messages.printMessages();
|
|
80
|
-
process.exit(environment_1.DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
yield Promise.all([
|
|
85
|
-
remoteCache.waitForStoreRequestsToComplete(),
|
|
86
|
-
api.endRun(runData, taskExecutions),
|
|
87
|
-
]);
|
|
88
|
-
}
|
|
89
|
-
// this workaround is required because prior to Nx 13.3 we printed
|
|
90
|
-
// the end message after the runner completes, so we need to wait for the
|
|
91
|
-
// message to appear in the right place
|
|
92
|
-
if (versionOfNxBefore133) {
|
|
93
|
-
setTimeout(() => {
|
|
94
|
-
messages.printMessages();
|
|
95
|
-
if (!messages.anyErrors && !inner) {
|
|
96
|
-
endOfRunMessage.printCacheHitsMessage();
|
|
97
|
-
}
|
|
98
|
-
}, 0);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
messages.printMessages();
|
|
102
|
-
if (!messages.anyErrors && !inner) {
|
|
103
|
-
endOfRunMessage.printCacheHitsMessage();
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
yield (0, metric_logger_1.submitRunMetrics)(options);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function createLifeCycle(runContext, options, outputObfuscator, tasks) {
|
|
110
|
-
const cloudEnabledLifeCycle = new cloud_enabled_life_cycle_1.CloudEnabledLifeCycle(runContext, options.cacheDirectory, !!options.skipNxCache, options.scan === undefined ? true : options.scan, options.cacheableOperations || [], outputObfuscator, tasks);
|
|
111
|
-
try {
|
|
112
|
-
const { CompositeLifeCycle } = require('../../../utilities/nx-imports');
|
|
113
|
-
if (!CompositeLifeCycle)
|
|
114
|
-
return cloudEnabledLifeCycle;
|
|
115
|
-
return new CompositeLifeCycle([options.lifeCycle, cloudEnabledLifeCycle]);
|
|
116
|
-
}
|
|
117
|
-
catch (e) {
|
|
118
|
-
return cloudEnabledLifeCycle;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function cloudEnabledTasksRunner(tasks, options, context, inner = false) {
|
|
122
|
-
const runContext = {
|
|
123
|
-
statuses: {},
|
|
124
|
-
scheduledTasks: [],
|
|
125
|
-
requests: {},
|
|
126
|
-
allTasks: tasks,
|
|
127
|
-
};
|
|
128
|
-
const versionOfNxBefore133 = options.lifeCycle === undefined;
|
|
129
|
-
const taskExecutions = [];
|
|
130
|
-
const messages = new message_reporter_1.MessageReporter(options);
|
|
131
|
-
const api = createApi(messages, options, runContext);
|
|
132
|
-
const endOfRunMessage = new end_of_run_message_1.EndOfRunMessage(runContext, taskExecutions);
|
|
133
|
-
const outputObfuscator = new output_obfuscator_1.OutputObfuscator(options.maskedProperties);
|
|
134
|
-
const hashes = tasks.map((t) => t.hash).filter((h) => !!h);
|
|
135
|
-
const startRunRequest = api.startRun(environment_1.NX_CLOUD_DISTRIBUTED_EXECUTION_ID, hashes);
|
|
136
|
-
hashes.forEach((hash) => {
|
|
137
|
-
runContext.requests[hash] = startRunRequest;
|
|
138
|
-
});
|
|
139
|
-
const runStartTime = new Date().toISOString();
|
|
140
|
-
const lifeCycle = createLifeCycle(runContext, options, outputObfuscator, taskExecutions);
|
|
141
|
-
const encryption = new e2e_encryption_1.E2EEncryption(environment_1.ENCRYPTION_KEY || options.encryptionKey);
|
|
142
|
-
const errorApi = new error_reporter_api_1.ErrorReporterApi(options);
|
|
143
|
-
const fileStorage = new file_storage_1.FileStorage(encryption, errorApi, false);
|
|
144
|
-
const remoteCache = new cloud_remote_cache_1.CloudRemoteCache(messages, api, runContext, fileStorage);
|
|
145
|
-
// have to reset it so we don't capture inner tasks
|
|
146
|
-
delete process.env.NX_CLOUD_DISTRIBUTED_EXECUTION_ID;
|
|
147
|
-
const res = tasksRunner(tasks, Object.assign(Object.assign({}, options), { remoteCache, lifeCycle }), context);
|
|
148
|
-
// observable -> legacy
|
|
149
|
-
if (res.subscribe) {
|
|
150
|
-
const { Subject } = require('rxjs/internal/Subject');
|
|
151
|
-
const wrappedRes = new Subject();
|
|
152
|
-
res.subscribe({
|
|
153
|
-
next: (value) => wrappedRes.next(value),
|
|
154
|
-
error: (err) => wrappedRes.error(err),
|
|
155
|
-
complete: () => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
157
|
-
wrappedRes.complete();
|
|
158
|
-
}),
|
|
159
|
-
});
|
|
160
|
-
return wrappedRes;
|
|
161
|
-
// promise
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
return res
|
|
165
|
-
.then((r) => __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
167
|
-
return r;
|
|
168
|
-
}))
|
|
169
|
-
.catch((e) => __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
yield onComplete(lifeCycle, options, remoteCache, api, outputObfuscator, runStartTime, messages, endOfRunMessage, taskExecutions, versionOfNxBefore133, inner);
|
|
171
|
-
throw e;
|
|
172
|
-
}));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
exports.cloudEnabledTasksRunner = cloudEnabledTasksRunner;
|
|
176
|
-
//# sourceMappingURL=cloud-enabled.runner.js.map
|
|
1
|
+
const a1_0x58e3=['../../../utilities/nx-imports','catch','obfuscate','./cloud-run.api','OutputObfuscator','next','CloudRemoteCache','../../terminal-output/output-obfuscator','path','parseCommand','map','../../file-storage/file-storage','scan','skipNxCache','extractGitSha','then','subscribe','hash','./node_modules/.cache/nx','getMachineInfo','env','tasks-hashes-','../../terminal-output/message-reporter','Agent\x20wasn\x27t\x20able\x20to\x20record\x20its\x20run','E2EEncryption','Agent\x20wasn\x27t\x20able\x20to\x20store\x20artifacts','writeFileSync','done','throw','complete','printCacheHitsMessage','./cloud-remote-cache','stringify','./cloud-enabled-life-cycle','printMessages','../../../utilities/environment','ErrorReporterApi','FileStorage','rxjs/internal/Subject','EndOfRunMessage','endRun','forEach','error','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','cacheableOperations','note','../../file-storage/e2e-encryption','toISOString','apply','../../api/error-reporter.api','cacheDirectory','all','AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION','join','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','defineProperty','__awaiter','anyErrors','ENCRYPTION_KEY','lifeCycle','../../terminal-output/end-of-run-message','waitForStoreRequestsToComplete','requests','maskedProperties','filter','assign','value','submitRunMetrics'];(function(_0x15c369,_0x58e369){const _0x56e5e0=function(_0x374cfc){while(--_0x374cfc){_0x15c369['push'](_0x15c369['shift']());}};_0x56e5e0(++_0x58e369);}(a1_0x58e3,0xbf));const a1_0x56e5=function(_0x15c369,_0x58e369){_0x15c369=_0x15c369-0x0;let _0x56e5e0=a1_0x58e3[_0x15c369];return _0x56e5e0;};'use strict';var __awaiter=this&&this[a1_0x56e5('0x1')]||function(_0x11c10f,_0x22484a,_0x5b5e2b,_0x2b4fd4){function _0xd746fa(_0x48fcf5){return _0x48fcf5 instanceof _0x5b5e2b?_0x48fcf5:new _0x5b5e2b(function(_0x12ffc0){_0x12ffc0(_0x48fcf5);});}return new(_0x5b5e2b||(_0x5b5e2b=Promise))(function(_0x462185,_0x8e826f){function _0x4a6440(_0x193353){try{_0x42f6b3(_0x2b4fd4[a1_0x56e5('0x12')](_0x193353));}catch(_0xbab189){_0x8e826f(_0xbab189);}}function _0x11c81f(_0x2196d9){try{_0x42f6b3(_0x2b4fd4[a1_0x56e5('0x29')](_0x2196d9));}catch(_0x4803be){_0x8e826f(_0x4803be);}}function _0x42f6b3(_0x5d1f0d){_0x5d1f0d[a1_0x56e5('0x28')]?_0x462185(_0x5d1f0d[a1_0x56e5('0xb')]):_0xd746fa(_0x5d1f0d['value'])['then'](_0x4a6440,_0x11c81f);}_0x42f6b3((_0x2b4fd4=_0x2b4fd4[a1_0x56e5('0x3d')](_0x11c10f,_0x22484a||[]))[a1_0x56e5('0x12')]());});};Object[a1_0x56e5('0x0')](exports,'__esModule',{'value':!![]});exports['cloudEnabledTasksRunner']=void 0x0;const message_reporter_1=require(a1_0x56e5('0x23'));const end_of_run_message_1=require(a1_0x56e5('0x5'));const output_obfuscator_1=require(a1_0x56e5('0x14'));const cloud_enabled_life_cycle_1=require(a1_0x56e5('0x2e'));const file_storage_1=require(a1_0x56e5('0x18'));const e2e_encryption_1=require(a1_0x56e5('0x3b'));const environment_1=require(a1_0x56e5('0x30'));const cloud_remote_cache_1=require(a1_0x56e5('0x2c'));const cloud_run_api_1=require(a1_0x56e5('0x10'));const fs_1=require('fs');const path=require(a1_0x56e5('0x15'));const metric_logger_1=require('../../../utilities/metric-logger');const error_reporter_api_1=require(a1_0x56e5('0x3e'));const {tasksRunner,output}=require('../../../utilities/nx-imports');function createApi(_0x3050e2,_0x11209e,_0x483fd){const _0x1bc57a=(0x0,environment_1[a1_0x56e5('0x20')])(_0x11209e);return new cloud_run_api_1['CloudRunApi'](_0x3050e2,_0x483fd,_0x11209e,_0x1bc57a);}function storeTaskHashes(_0x3d303f,_0x4835e0,_0x2a790e){const _0x5dc8cb=JSON[a1_0x56e5('0x2d')](_0x3d303f[a1_0x56e5('0x17')](_0xb3e78f=>({'taskId':_0xb3e78f['taskId'],'hash':_0xb3e78f[a1_0x56e5('0x1e')]})));if(environment_1['VERBOSE_LOGGING']){output[a1_0x56e5('0x3a')]({'title':'Executed\x20tasks\x20with\x20hashes:\x20'+_0x5dc8cb});}(0x0,fs_1[a1_0x56e5('0x27')])(path[a1_0x56e5('0x42')](_0x4835e0,a1_0x56e5('0x22')+_0x2a790e),_0x5dc8cb);}function onComplete(_0x4f8aa0,_0x1f795f,_0x4967e5,_0x2201b3,_0x2855bd,_0xe0fe33,_0x37f922,_0x1bf268,_0xfaa793,_0x540e66,_0x1baa6e){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3970b7=new Date()[a1_0x56e5('0x3c')]();const _0x2cdfa1=(0x0,environment_1['getBranch'])();const _0x4da0fd={'command':_0x2855bd[a1_0x56e5('0xf')]((0x0,environment_1[a1_0x56e5('0x16')])()),'startTime':_0xe0fe33,'endTime':_0x3970b7,'distributedExecutionId':environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],'branch':_0x2cdfa1,'scan':!![],'runGroup':(0x0,environment_1['getRunGroup'])(),'sha':_0x2cdfa1?(0x0,environment_1[a1_0x56e5('0x1b')])():undefined,'inner':_0x1baa6e};if(environment_1[a1_0x56e5('0x41')]){storeTaskHashes(_0xfaa793,_0x1f795f[a1_0x56e5('0x3f')]||a1_0x56e5('0x1f'),environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID']);try{yield _0x4967e5[a1_0x56e5('0x6')]();}catch(_0x1d087f){output[a1_0x56e5('0x37')]({'title':a1_0x56e5('0x26')});_0x37f922[a1_0x56e5('0x2f')]();process['exit'](environment_1[a1_0x56e5('0x38')]);}try{yield _0x2201b3[a1_0x56e5('0x35')](_0x4da0fd,_0xfaa793);}catch(_0x210a52){output[a1_0x56e5('0x37')]({'title':a1_0x56e5('0x24')});_0x37f922[a1_0x56e5('0x2f')]();process['exit'](environment_1['DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE']);}}else{yield Promise[a1_0x56e5('0x40')]([_0x4967e5[a1_0x56e5('0x6')](),_0x2201b3['endRun'](_0x4da0fd,_0xfaa793)]);}if(_0x540e66){setTimeout(()=>{_0x37f922[a1_0x56e5('0x2f')]();if(!_0x37f922[a1_0x56e5('0x2')]&&!_0x1baa6e){_0x1bf268[a1_0x56e5('0x2b')]();}},0x0);}else{_0x37f922[a1_0x56e5('0x2f')]();if(!_0x37f922[a1_0x56e5('0x2')]&&!_0x1baa6e){_0x1bf268['printCacheHitsMessage']();}}yield(0x0,metric_logger_1[a1_0x56e5('0xc')])(_0x1f795f);});}function createLifeCycle(_0x367a45,_0x3dd3f2,_0x134d3e,_0x842809){const _0x3d9afd=new cloud_enabled_life_cycle_1['CloudEnabledLifeCycle'](_0x367a45,_0x3dd3f2[a1_0x56e5('0x3f')],!!_0x3dd3f2[a1_0x56e5('0x1a')],_0x3dd3f2[a1_0x56e5('0x19')]===undefined?!![]:_0x3dd3f2[a1_0x56e5('0x19')],_0x3dd3f2[a1_0x56e5('0x39')]||[],_0x134d3e,_0x842809);try{const {CompositeLifeCycle}=require(a1_0x56e5('0xd'));if(!CompositeLifeCycle)return _0x3d9afd;return new CompositeLifeCycle([_0x3dd3f2[a1_0x56e5('0x4')],_0x3d9afd]);}catch(_0x931f98){return _0x3d9afd;}}function cloudEnabledTasksRunner(_0x2af874,_0x7994ab,_0x3b146e,_0xf10d00=![]){const _0x183757={'statuses':{},'scheduledTasks':[],'requests':{},'allTasks':_0x2af874};const _0x9c19ec=_0x7994ab[a1_0x56e5('0x4')]===undefined;const _0x38592b=[];const _0x4da954=new message_reporter_1['MessageReporter'](_0x7994ab);const _0x5b9f23=createApi(_0x4da954,_0x7994ab,_0x183757);const _0x569eb5=new end_of_run_message_1[(a1_0x56e5('0x34'))](_0x183757,_0x38592b);const _0x21dd9f=new output_obfuscator_1[(a1_0x56e5('0x11'))](_0x7994ab[a1_0x56e5('0x8')]);const _0x3d9334=_0x2af874[a1_0x56e5('0x17')](_0x5d2271=>_0x5d2271[a1_0x56e5('0x1e')])[a1_0x56e5('0x9')](_0x14deb0=>!!_0x14deb0);const _0x5e5af9=_0x5b9f23['startRun'](environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],_0x3d9334);_0x3d9334[a1_0x56e5('0x36')](_0x183099=>{_0x183757[a1_0x56e5('0x7')][_0x183099]=_0x5e5af9;});const _0x33edc2=new Date()['toISOString']();const _0x45ac21=createLifeCycle(_0x183757,_0x7994ab,_0x21dd9f,_0x38592b);const _0xfee9bf=new e2e_encryption_1[(a1_0x56e5('0x25'))](environment_1[a1_0x56e5('0x3')]||_0x7994ab['encryptionKey']);const _0x44e27e=new error_reporter_api_1[(a1_0x56e5('0x31'))](_0x7994ab);const _0x205d6f=new file_storage_1[(a1_0x56e5('0x32'))](_0xfee9bf,_0x44e27e,![]);const _0x5046d6=new cloud_remote_cache_1[(a1_0x56e5('0x13'))](_0x4da954,_0x5b9f23,_0x183757,_0x205d6f);delete process[a1_0x56e5('0x21')][a1_0x56e5('0x43')];const _0x3abf86=tasksRunner(_0x2af874,Object[a1_0x56e5('0xa')](Object[a1_0x56e5('0xa')]({},_0x7994ab),{'remoteCache':_0x5046d6,'lifeCycle':_0x45ac21}),_0x3b146e);if(_0x3abf86['subscribe']){const {Subject}=require(a1_0x56e5('0x33'));const _0x612aa0=new Subject();_0x3abf86[a1_0x56e5('0x1d')]({'next':_0x13f8f0=>_0x612aa0[a1_0x56e5('0x12')](_0x13f8f0),'error':_0x24252a=>_0x612aa0[a1_0x56e5('0x37')](_0x24252a),'complete':()=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x45ac21,_0x7994ab,_0x5046d6,_0x5b9f23,_0x21dd9f,_0x33edc2,_0x4da954,_0x569eb5,_0x38592b,_0x9c19ec,_0xf10d00);_0x612aa0[a1_0x56e5('0x2a')]();})});return _0x612aa0;}else{return _0x3abf86[a1_0x56e5('0x1c')](_0x380745=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x45ac21,_0x7994ab,_0x5046d6,_0x5b9f23,_0x21dd9f,_0x33edc2,_0x4da954,_0x569eb5,_0x38592b,_0x9c19ec,_0xf10d00);return _0x380745;}))[a1_0x56e5('0xe')](_0x130051=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x45ac21,_0x7994ab,_0x5046d6,_0x5b9f23,_0x21dd9f,_0x33edc2,_0x4da954,_0x569eb5,_0x38592b,_0x9c19ec,_0xf10d00);throw _0x130051;}));}}exports['cloudEnabledTasksRunner']=cloudEnabledTasksRunner;
|