@nrwl/nx-cloud 12.5.0 → 12.5.4
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 +4 -4
- package/bin/nx-cloud.js.map +1 -1
- package/lib/core/api/run-group.api.d.ts +1 -1
- package/lib/core/api/run-group.api.js +1 -1
- package/lib/core/api/run-group.api.js.map +1 -1
- package/lib/core/commands/clean-up-agents.js +2 -2
- package/lib/core/commands/clean-up-agents.js.map +1 -1
- package/lib/core/commands/start-ci-run.js +4 -4
- package/lib/core/commands/start-ci-run.js.map +1 -1
- package/lib/core/commands/stop-all-agents.js +3 -3
- package/lib/core/commands/stop-all-agents.js.map +1 -1
- package/lib/core/file-storage/e2e-encryption.js +7 -7
- package/lib/core/file-storage/e2e-encryption.js.map +1 -1
- package/lib/core/file-storage/file-storage.js +43 -24
- package/lib/core/file-storage/file-storage.js.map +1 -1
- package/lib/core/models/run-data.model.d.ts +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js.map +1 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js.map +1 -1
- package/lib/core/runners/cloud-enabled/task-runner-life-cycle.js +1 -1
- package/lib/core/runners/cloud-enabled/task-runner-life-cycle.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js.map +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.runner.js +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.runner.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.d.ts +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js.map +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +1 -1
- package/lib/core/terminal-output/end-of-run-message.js +1 -1
- package/lib/core/terminal-output/end-of-run-message.js.map +1 -1
- package/lib/core/terminal-output/message-reporter.js +1 -1
- package/lib/core/terminal-output/message-reporter.js.map +1 -1
- package/lib/core/terminal-output/output-obfuscator.js +1 -1
- package/lib/core/terminal-output/output-obfuscator.js.map +1 -1
- package/lib/generators/init/init.js +1 -1
- package/lib/generators/init/init.js.map +1 -1
- package/lib/nx-cloud-tasks-runner.js +7 -7
- package/lib/nx-cloud-tasks-runner.js.map +1 -1
- package/lib/utilities/axios.js +1 -1
- package/lib/utilities/axios.js.map +1 -1
- package/lib/utilities/environment.d.ts +2 -1
- package/lib/utilities/environment.js +7 -6
- package/lib/utilities/environment.js.map +1 -1
- package/lib/utilities/metric-logger.d.ts +34 -0
- package/lib/utilities/metric-logger.js +77 -0
- package/lib/utilities/metric-logger.js.map +1 -0
- package/package.json +1 -1
package/bin/nx-cloud.js
CHANGED
|
@@ -7,25 +7,25 @@ const stop_all_agents_1 = require("../lib/core/commands/stop-all-agents");
|
|
|
7
7
|
const clean_up_agents_1 = require("../lib/core/commands/clean-up-agents");
|
|
8
8
|
const command = process.argv[2];
|
|
9
9
|
if (command === 'start-agent') {
|
|
10
|
-
distributed_agent_runner_1.startAgent().catch((e) => {
|
|
10
|
+
(0, distributed_agent_runner_1.startAgent)().catch((e) => {
|
|
11
11
|
console.error(e);
|
|
12
12
|
process.exit(1);
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
else if (command === 'stop-all-agents') {
|
|
16
|
-
stop_all_agents_1.stopAllAgents().catch((e) => {
|
|
16
|
+
(0, stop_all_agents_1.stopAllAgents)().catch((e) => {
|
|
17
17
|
console.error(e);
|
|
18
18
|
process.exit(1);
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
else if (command === 'start-ci-run') {
|
|
22
|
-
start_ci_run_1.startCiRun().catch((e) => {
|
|
22
|
+
(0, start_ci_run_1.startCiRun)().catch((e) => {
|
|
23
23
|
console.error(e);
|
|
24
24
|
process.exit(1);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
else if (command === 'clean-up-agents') {
|
|
28
|
-
clean_up_agents_1.cleanUpAgents().catch((e) => {
|
|
28
|
+
(0, clean_up_agents_1.cleanUpAgents)().catch((e) => {
|
|
29
29
|
console.error(e);
|
|
30
30
|
process.exit(1);
|
|
31
31
|
});
|
package/bin/nx-cloud.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-cloud.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/bin/nx-cloud.ts"],"names":[],"mappings":";;;AAEA,6GAA4F;AAC5F,oEAA+D;AAC/D,0EAAqE;AACrE,0EAAqE;AAErE,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,IAAI,OAAO,KAAK,aAAa,EAAE;IAC7B,qCAAU,
|
|
1
|
+
{"version":3,"file":"nx-cloud.js","sourceRoot":"","sources":["../../../../../libs/nx-packages/nx-cloud/src/bin/nx-cloud.ts"],"names":[],"mappings":";;;AAEA,6GAA4F;AAC5F,oEAA+D;AAC/D,0EAAqE;AACrE,0EAAqE;AAErE,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,IAAI,OAAO,KAAK,aAAa,EAAE;IAC7B,IAAA,qCAAU,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;IACL,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;CACtE"}
|
|
@@ -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, runGroup: string): Promise<void>;
|
|
5
|
+
createRunGroup(branch: string | null, runGroup: string): Promise<void>;
|
|
6
6
|
completeRunGroup(runGroup: string): Promise<void>;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x5d64=['apply','recordMetric','error','/nx-cloud/executions/complete-run-group','RUNNER_FAILURE_PERF_ENTRY','defineProperty','createMetricRecorder','/nx-cloud/executions/create-run-group','output','then','mapRespToPerfEntry','__awaiter','post','axiosMultipleTries','../../utilities/axios','exit','createRunGroup','RunGroupApi','message','value','next','createApiAxiosInstance','@nrwl/workspace/src/utilities/output','apiAxiosInstance'];(function(_0x5b26d0,_0x5d6463){const _0x2c30df=function(_0x3612cf){while(--_0x3612cf){_0x5b26d0['push'](_0x5b26d0['shift']());}};_0x2c30df(++_0x5d6463);}(a0_0x5d64,0x1e3));const a0_0x2c30=function(_0x5b26d0,_0x5d6463){_0x5b26d0=_0x5b26d0-0x0;let _0x2c30df=a0_0x5d64[_0x5b26d0];return _0x2c30df;};'use strict';var __awaiter=this&&this[a0_0x2c30('0x8')]||function(_0x468b15,_0x3c5d6f,_0x8b8df3,_0x365ea6){function _0x7770d5(_0x38396b){return _0x38396b instanceof _0x8b8df3?_0x38396b:new _0x8b8df3(function(_0x1b2bda){_0x1b2bda(_0x38396b);});}return new(_0x8b8df3||(_0x8b8df3=Promise))(function(_0x5aea9c,_0x31867f){function _0x4c13b7(_0x515c08){try{_0x4ddc95(_0x365ea6[a0_0x2c30('0x11')](_0x515c08));}catch(_0x2d8bf2){_0x31867f(_0x2d8bf2);}}function _0x574909(_0x128dbb){try{_0x4ddc95(_0x365ea6['throw'](_0x128dbb));}catch(_0x5540c0){_0x31867f(_0x5540c0);}}function _0x4ddc95(_0x3a107a){_0x3a107a['done']?_0x5aea9c(_0x3a107a[a0_0x2c30('0x10')]):_0x7770d5(_0x3a107a[a0_0x2c30('0x10')])[a0_0x2c30('0x6')](_0x4c13b7,_0x574909);}_0x4ddc95((_0x365ea6=_0x365ea6[a0_0x2c30('0x15')](_0x468b15,_0x3c5d6f||[]))['next']());});};Object[a0_0x2c30('0x2')](exports,'__esModule',{'value':!![]});exports[a0_0x2c30('0xe')]=void 0x0;const output_1=require(a0_0x2c30('0x13'));const axios_1=require(a0_0x2c30('0xb'));const metric_logger_1=require('../../utilities/metric-logger');class RunGroupApi{constructor(_0x29ec1e){this[a0_0x2c30('0x14')]=(0x0,axios_1[a0_0x2c30('0x12')])(_0x29ec1e);}[a0_0x2c30('0xd')](_0x5eef3d,_0x1779d7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2bdc88=(0x0,metric_logger_1[a0_0x2c30('0x3')])('createRunGroup');try{const _0x339293=yield(0x0,axios_1[a0_0x2c30('0xa')])(()=>this[a0_0x2c30('0x14')][a0_0x2c30('0x9')](a0_0x2c30('0x4'),{'branch':_0x5eef3d,'runGroup':_0x1779d7}),0x3);_0x2bdc88[a0_0x2c30('0x16')]((0x0,metric_logger_1[a0_0x2c30('0x7')])(_0x339293));}catch(_0x3e8157){_0x2bdc88[a0_0x2c30('0x16')](metric_logger_1[a0_0x2c30('0x1')]);output_1[a0_0x2c30('0x5')][a0_0x2c30('0x17')]({'title':_0x3e8157[a0_0x2c30('0xf')]});process[a0_0x2c30('0xc')](0x1);}});}['completeRunGroup'](_0x500952){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3f0e95=(0x0,metric_logger_1['createMetricRecorder'])(a0_0x2c30('0xd'));try{const _0x31e1e6=yield(0x0,axios_1[a0_0x2c30('0xa')])(()=>this[a0_0x2c30('0x14')][a0_0x2c30('0x9')](a0_0x2c30('0x0'),{'runGroup':_0x500952}),0x3);_0x3f0e95[a0_0x2c30('0x16')]((0x0,metric_logger_1[a0_0x2c30('0x7')])(_0x31e1e6));}catch(_0x325d34){_0x3f0e95[a0_0x2c30('0x16')](metric_logger_1[a0_0x2c30('0x1')]);output_1[a0_0x2c30('0x5')][a0_0x2c30('0x17')]({'title':_0x325d34['message']});process['exit'](0x1);}});}}exports[a0_0x2c30('0xe')]=RunGroupApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-group.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/api/run-group.api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAE9D,iDAG+B;
|
|
1
|
+
{"version":3,"file":"run-group.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/api/run-group.api.ts"],"names":[],"mapp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AQ,CAAC,YAAY,CAAC,yCAAyB,CAAC,CAAC;gBAEjD,eAAM,CAAC,KAAK,CAAC;oBACX,KAAK,EAAE,CAAC,CAAC,OAAO;iBACjB,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;QACH,CAAC;KAAA;CACF;AArDD,kCAqDC"}
|
|
@@ -16,7 +16,7 @@ const environment_1 = require("../../utilities/environment");
|
|
|
16
16
|
const fs_1 = require("fs");
|
|
17
17
|
function cleanUpAgents() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const options = JSON.parse(stripJsonComments(fs_1.readFileSync('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
19
|
+
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
20
20
|
const cacheDirectory = options.cacheDirectory || './node_modules/.cache/nx';
|
|
21
21
|
const lockFileDirectory = `${cacheDirectory}/lockfiles`;
|
|
22
22
|
if (environment_1.VERBOSE_LOGGING) {
|
|
@@ -24,7 +24,7 @@ function cleanUpAgents() {
|
|
|
24
24
|
title: `Cleaning up agent metadata for this workspace.`,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
return fs_1.rm(lockFileDirectory, { recursive: true, force: true }, (err) => {
|
|
27
|
+
return (0, fs_1.rm)(lockFileDirectory, { recursive: true, force: true }, (err) => {
|
|
28
28
|
if (err)
|
|
29
29
|
throw err;
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-up-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/clean-up-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,iEAA8D;AAC9D,6DAA8D;AAC9D,2BAAsC;AAEtC,SAAsB,aAAa;;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,iBAAiB,CAAC,iBAAY,
|
|
1
|
+
{"version":3,"file":"clean-up-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/clean-up-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,iEAA8D;AAC9D,6DAA8D;AAC9D,2BAAsC;AAEtC,SAAsB,aAAa;;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;QACrC,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,0BAA0B,CAAC;QAC5E,MAAM,iBAAiB,GAAG,GAAG,cAAc,YAAY,CAAC;QAExD,IAAI,6BAAe,EAAE;YACnB,eAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,gDAAgD;aACxD,CAAC,CAAC;SACJ;QAED,OAAO,IAAA,OAAE,EAAC,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;YACrE,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAhBD,sCAgBC"}
|
|
@@ -18,10 +18,10 @@ const run_group_api_1 = require("../api/run-group.api");
|
|
|
18
18
|
const fs_1 = require("fs");
|
|
19
19
|
function startCiRun() {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const branch = environment_1.getBranch();
|
|
22
|
-
const runGroup = environment_1.getRunGroup();
|
|
21
|
+
const branch = (0, environment_1.getBranch)();
|
|
22
|
+
const runGroup = (0, environment_1.getRunGroup)();
|
|
23
23
|
if (!runGroup) {
|
|
24
|
-
print_run_group_error_1.printRunGroupError();
|
|
24
|
+
(0, print_run_group_error_1.printRunGroupError)();
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
if (environment_1.VERBOSE_LOGGING) {
|
|
@@ -29,7 +29,7 @@ function startCiRun() {
|
|
|
29
29
|
title: `Creating run group ${runGroup}`,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
const options = JSON.parse(stripJsonComments(fs_1.readFileSync('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
32
|
+
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
33
33
|
const api = new run_group_api_1.RunGroupApi(options);
|
|
34
34
|
yield api.createRunGroup(branch, runGroup);
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-ci-run.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/start-ci-run.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,yDAAyD;AACzD,6DAIqC;AACrC,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAElC,SAAsB,UAAU;;QAC9B,MAAM,MAAM,GAAG,uBAAS,
|
|
1
|
+
{"version":3,"file":"start-ci-run.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/start-ci-run.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,yDAAyD;AACzD,6DAIqC;AACrC,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAElC,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,eAAM,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,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;QAErC,MAAM,GAAG,GAAG,IAAI,2BAAW,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CAAA;AApBD,gCAoBC"}
|
|
@@ -18,9 +18,9 @@ const run_group_api_1 = require("../api/run-group.api");
|
|
|
18
18
|
const fs_1 = require("fs");
|
|
19
19
|
function stopAllAgents() {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const runGroup = environment_1.getRunGroup();
|
|
21
|
+
const runGroup = (0, environment_1.getRunGroup)();
|
|
22
22
|
if (!runGroup) {
|
|
23
|
-
print_run_group_error_1.printRunGroupError();
|
|
23
|
+
(0, print_run_group_error_1.printRunGroupError)();
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
if (environment_1.VERBOSE_LOGGING) {
|
|
@@ -28,7 +28,7 @@ function stopAllAgents() {
|
|
|
28
28
|
title: `Stopping all agents running tasks for run group ${runGroup}`,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
const options = JSON.parse(stripJsonComments(fs_1.readFileSync('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
31
|
+
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
32
32
|
const api = new run_group_api_1.RunGroupApi(options);
|
|
33
33
|
yield api.completeRunGroup(runGroup);
|
|
34
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop-all-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/stop-all-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,yDAAyD;AACzD,6DAA2E;AAC3E,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAElC,SAAsB,aAAa;;QACjC,MAAM,QAAQ,GAAG,yBAAW,
|
|
1
|
+
{"version":3,"file":"stop-all-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/commands/stop-all-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,yDAAyD;AACzD,6DAA2E;AAC3E,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAElC,SAAsB,aAAa;;QACjC,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;QAC/B,IAAI,CAAC,QAAQ,EAAE;YACb,IAAA,0CAAkB,GAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;QAED,IAAI,6BAAe,EAAE;YACnB,eAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,mDAAmD,QAAQ,EAAE;aACrE,CAAC,CAAC;SACJ;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,iBAAiB,CAAC,IAAA,iBAAY,EAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;QAErC,MAAM,GAAG,GAAG,IAAI,2BAAW,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CAAA;AAlBD,sCAkBC"}
|
|
@@ -20,22 +20,22 @@ class E2EEncryption {
|
|
|
20
20
|
return !!this.encryptionKey;
|
|
21
21
|
}
|
|
22
22
|
encryptFile(file) {
|
|
23
|
-
const iv = crypto_1.randomBytes(16);
|
|
24
|
-
const cipher = crypto_1.createCipheriv('aes-256-cbc', this.encryptionKey, iv);
|
|
25
|
-
const decryptedFileContents = fs_1.readFileSync(file);
|
|
23
|
+
const iv = (0, crypto_1.randomBytes)(16);
|
|
24
|
+
const cipher = (0, crypto_1.createCipheriv)('aes-256-cbc', this.encryptionKey, iv);
|
|
25
|
+
const decryptedFileContents = (0, fs_1.readFileSync)(file);
|
|
26
26
|
const e = cipher.update(decryptedFileContents);
|
|
27
27
|
const encryptedFileContents = Buffer.concat([iv, e, cipher.final()]);
|
|
28
|
-
fs_1.writeFileSync(file, encryptedFileContents);
|
|
28
|
+
(0, fs_1.writeFileSync)(file, encryptedFileContents);
|
|
29
29
|
}
|
|
30
30
|
decryptFile(file) {
|
|
31
|
-
const encryptedFileContents = fs_1.readFileSync(file);
|
|
31
|
+
const encryptedFileContents = (0, fs_1.readFileSync)(file);
|
|
32
32
|
try {
|
|
33
|
-
const decipher = crypto_1.createDecipheriv('aes-256-cbc', this.encryptionKey, encryptedFileContents.slice(0, 16) // iv
|
|
33
|
+
const decipher = (0, crypto_1.createDecipheriv)('aes-256-cbc', this.encryptionKey, encryptedFileContents.slice(0, 16) // iv
|
|
34
34
|
);
|
|
35
35
|
const encryptedText = encryptedFileContents.slice(16); // remove the iv
|
|
36
36
|
const d = decipher.update(encryptedText);
|
|
37
37
|
const decryptedFileContents = Buffer.concat([d, decipher.final()]);
|
|
38
|
-
fs_1.writeFileSync(file, decryptedFileContents);
|
|
38
|
+
(0, fs_1.writeFileSync)(file, decryptedFileContents);
|
|
39
39
|
}
|
|
40
40
|
catch (e) {
|
|
41
41
|
throw new Error(`Could not decrypt the artifact. Please check your encryption key.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e-encryption.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/file-storage/e2e-encryption.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AACjD,mCAAuE;AAEvE,MAAa,aAAa;IAGxB,YAAY,GAAuB;QACjC,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAC1C;IACH,CAAC;IAEO,SAAS,CAAC,GAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC;QACd,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,EAAE;YACtB,GAAG,IAAI,GAAG,CAAC;SACZ;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,WAAW,CAAC,IAAY;QACtB,MAAM,EAAE,GAAG,oBAAW,
|
|
1
|
+
{"version":3,"file":"e2e-encryption.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/file-storage/e2e-encryption.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AACjD,mCAAuE;AAEvE,MAAa,aAAa;IAGxB,YAAY,GAAuB;QACjC,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAC1C;IACH,CAAC;IAEO,SAAS,CAAC,GAAW;QAC3B,IAAI,GAAG,GAAG,GAAG,CAAC;QACd,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,EAAE;YACtB,GAAG,IAAI,GAAG,CAAC;SACZ;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,WAAW,CAAC,IAAY;QACtB,MAAM,EAAE,GAAG,IAAA,oBAAW,EAAC,EAAE,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,aAAa,EAAE,IAAI,CAAC,aAAc,EAAE,EAAE,CAAC,CAAC;QACtE,MAAM,qBAAqB,GAAG,IAAA,iBAAY,EAAC,IAAI,CAAC,CAAC;QACjD,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC/C,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACrE,IAAA,kBAAa,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAC7C,CAAC;IAED,WAAW,CAAC,IAAY;QACtB,MAAM,qBAAqB,GAAG,IAAA,iBAAY,EAAC,IAAI,CAAC,CAAC;QAEjD,IAAI;YACF,MAAM,QAAQ,GAAG,IAAA,yBAAgB,EAC/B,aAAa,EACb,IAAI,CAAC,aAAc,EACnB,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK;aACzC,CAAC;YACF,MAAM,aAAa,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB;YACvE,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YACzC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACnE,IAAA,kBAAa,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;SAC5C;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;IACH,CAAC;CACF;AAjDD,sCAiDC"}
|
|
@@ -16,6 +16,7 @@ const environment_1 = require("../../utilities/environment");
|
|
|
16
16
|
const axios_1 = require("../../utilities/axios");
|
|
17
17
|
const fs_1 = require("fs");
|
|
18
18
|
const waiter_1 = require("../../utilities/waiter");
|
|
19
|
+
const metric_logger_1 = require("../../utilities/metric-logger");
|
|
19
20
|
const axios = require('axios');
|
|
20
21
|
const tar = require('tar');
|
|
21
22
|
class FileStorage {
|
|
@@ -60,32 +61,42 @@ class FileStorage {
|
|
|
60
61
|
}
|
|
61
62
|
downloadFile(url, tgz, commitFilePath) {
|
|
62
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('retrieveFile');
|
|
65
|
+
let resp;
|
|
66
|
+
try {
|
|
67
|
+
resp = yield (0, axios_1.axiosMultipleTries)(() => axios(url, {
|
|
68
|
+
method: 'GET',
|
|
69
|
+
responseType: 'stream',
|
|
70
|
+
maxContentLength: 1000 * 1000 * 300,
|
|
71
|
+
maxBodyLength: 1000 * 1000 * 300,
|
|
72
|
+
timeout: environment_1.NX_CLOUD_NO_TIMEOUTS ? environment_1.UNLIMITED_TIMEOUT : 60000,
|
|
73
|
+
}), this.numberOfTries);
|
|
74
|
+
recorder.recordMetric(Object.assign(Object.assign({}, (0, metric_logger_1.mapRespToPerfEntry)(resp)), { fileSize: resp.data.headers['content-length'] }));
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
// Log performance metrics before re-throwing
|
|
78
|
+
recorder.recordMetric(metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
79
|
+
throw e;
|
|
80
|
+
}
|
|
70
81
|
// if the tar file is here, we wait for the commit file to appear for 25 seconds
|
|
71
82
|
// this is to avoid race conditions, where two processes are downloading the same
|
|
72
83
|
// artifact in parallel
|
|
73
|
-
if (fs_1.existsSync(tgz)) {
|
|
84
|
+
if ((0, fs_1.existsSync)(tgz)) {
|
|
74
85
|
let i = 0;
|
|
75
86
|
while (i++ < 50) {
|
|
76
|
-
if (fs_1.existsSync(commitFilePath))
|
|
87
|
+
if ((0, fs_1.existsSync)(commitFilePath))
|
|
77
88
|
return;
|
|
78
|
-
yield waiter_1.wait(500);
|
|
89
|
+
yield (0, waiter_1.wait)(500);
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
// if the tar file is already here, do nothing, wait for the commit file to appear
|
|
82
93
|
if (this.encryption.hasEncryption()) {
|
|
83
94
|
yield new Promise((res) => {
|
|
84
|
-
const f = resp.data.pipe(fs_1.createWriteStream(tgz));
|
|
95
|
+
const f = resp.data.pipe((0, fs_1.createWriteStream)(tgz));
|
|
85
96
|
f.on('close', () => res(null));
|
|
86
97
|
});
|
|
87
98
|
this.encryption.decryptFile(tgz);
|
|
88
|
-
const q = fs_1.createReadStream(tgz).pipe(tar.x({
|
|
99
|
+
const q = (0, fs_1.createReadStream)(tgz).pipe(tar.x({
|
|
89
100
|
cwd: path.dirname(tgz),
|
|
90
101
|
}));
|
|
91
102
|
return new Promise((res) => {
|
|
@@ -103,7 +114,7 @@ class FileStorage {
|
|
|
103
114
|
});
|
|
104
115
|
}
|
|
105
116
|
createCommitFile(commitFilePath) {
|
|
106
|
-
fs_1.writeFileSync(commitFilePath, 'true');
|
|
117
|
+
(0, fs_1.writeFileSync)(commitFilePath, 'true');
|
|
107
118
|
}
|
|
108
119
|
createCommitFilePath(hash, cacheDirectory) {
|
|
109
120
|
return path.join(cacheDirectory, `${hash}.commit`);
|
|
@@ -124,17 +135,25 @@ class FileStorage {
|
|
|
124
135
|
}
|
|
125
136
|
uploadFile(url, tgz) {
|
|
126
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
const recorder = (0, metric_logger_1.createMetricRecorder)('storeFile');
|
|
139
|
+
try {
|
|
140
|
+
const resp = yield (0, axios_1.axiosMultipleTries)(() => axios(url, {
|
|
141
|
+
method: 'PUT',
|
|
142
|
+
data: (0, fs_1.readFileSync)(tgz),
|
|
143
|
+
headers: {
|
|
144
|
+
'Content-Type': 'application/octet-stream',
|
|
145
|
+
'x-ms-blob-type': 'BlockBlob',
|
|
146
|
+
},
|
|
147
|
+
maxContentLength: 1000 * 1000 * 300,
|
|
148
|
+
maxBodyLength: 1000 * 1000 * 300,
|
|
149
|
+
timeout: environment_1.NX_CLOUD_NO_TIMEOUTS ? environment_1.UNLIMITED_TIMEOUT : 120000,
|
|
150
|
+
}), this.numberOfTries);
|
|
151
|
+
recorder.recordMetric(Object.assign(Object.assign({}, (0, metric_logger_1.mapRespToPerfEntry)(resp)), { fileSize: resp.config.headers['Content-Length'] }));
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
recorder.recordMetric(metric_logger_1.RUNNER_FAILURE_PERF_ENTRY);
|
|
155
|
+
throw e;
|
|
156
|
+
}
|
|
138
157
|
});
|
|
139
158
|
}
|
|
140
159
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-storage.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/file-storage/file-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,6BAA6B;AAC7B,6DAIqC;AACrC,iDAA2D;AAE3D,2BAMY;AACZ,mDAA8C;
|
|
1
|
+
{"version":3,"file":"file-storage.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/file-storage/file-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8D;AAC9D,6BAA6B;AAC7B,6DAIqC;AACrC,iDAA2D;AAE3D,2BAMY;AACZ,mDAA8C;AAC9C,iEAIuC;AAEvC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAE3B,MAAa,WAAW;IACtB,YACmB,UAAyB,EACzB,a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AAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAC/C,CAAC;aACJ;YAAC,OAAO,CAAC,EAAE;gBACV,QAAQ,CAAC,YAAY,CAAC,yCAAyB,CAAC,CAAC;gBACjD,MAAM,CAAC,CAAC;aACT;QACH,CAAC;KAAA;CACF;AApKD,kCAoKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2d97=['CloudRemoteCache','complete','ENCRYPTION_KEY','endRun','cloudEnabledTasksRunner','../../terminal-output/end-of-run-message','__awaiter','../../../utilities/metric-logger','next','slice','requests','assign','terminalOutput','E2EEncryption','scan','obfuscate','parseCommand','../../terminal-output/output-obfuscator','join','FileStorage','../../../utilities/environment','path','stringify','TaskRunnerLifeCycle','tasks','getRunGroup','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','./cloud-run.api','filter','VERBOSE_LOGGING','EndOfRunMessage','Executed\x20tasks\x20with\x20hashes:\x20','Completed\x20tasks','exit','error','printMessages','map','./cloud-remote-cache','forEach','Subject','../../terminal-output/message-reporter','hash','cacheableOperations','../../file-storage/file-storage','done','Agent\x20wasn\x27t\x20able\x20to\x20store\x20artifacts','NUMBER_OF_TRIES','tasks-hashes','submitRunMetrics','note','tasksRunnerV2','value','defineProperty','Agent\x20wasn\x27t\x20able\x20to\x20record\x20its\x20run','env','...','@nrwl/workspace/src/utilities/output','taskId','rxjs/internal/Subject','getMachineInfo','output','extractGitSha','apply','CloudRunApi','__esModule','then','../../file-storage/e2e-encryption','toISOString','all','writeFileSync','startRun'];(function(_0x246a78,_0x2d97e9){const _0xf79721=function(_0x5b3546){while(--_0x5b3546){_0x246a78['push'](_0x246a78['shift']());}};_0xf79721(++_0x2d97e9);}(a0_0x2d97,0xfd));const a0_0xf797=function(_0x246a78,_0x2d97e9){_0x246a78=_0x246a78-0x0;let _0xf79721=a0_0x2d97[_0x246a78];return _0xf79721;};'use strict';var __awaiter=this&&this[a0_0xf797('0x25')]||function(_0x8bddb9,_0x284147,_0x4c1705,_0x522ad7){function _0x30b27a(_0xc92683){return _0xc92683 instanceof _0x4c1705?_0xc92683:new _0x4c1705(function(_0x576f8a){_0x576f8a(_0xc92683);});}return new(_0x4c1705||(_0x4c1705=Promise))(function(_0x5b1a5d,_0x5675a2){function _0x34ab07(_0xd5776b){try{_0x22b9cb(_0x522ad7[a0_0xf797('0x27')](_0xd5776b));}catch(_0x40ed8c){_0x5675a2(_0x40ed8c);}}function _0x560255(_0x24bc29){try{_0x22b9cb(_0x522ad7['throw'](_0x24bc29));}catch(_0x57f69b){_0x5675a2(_0x57f69b);}}function _0x22b9cb(_0x5dba55){_0x5dba55[a0_0xf797('0x4')]?_0x5b1a5d(_0x5dba55[a0_0xf797('0xb')]):_0x30b27a(_0x5dba55[a0_0xf797('0xb')])[a0_0xf797('0x19')](_0x34ab07,_0x560255);}_0x22b9cb((_0x522ad7=_0x522ad7[a0_0xf797('0x16')](_0x8bddb9,_0x284147||[]))[a0_0xf797('0x27')]());});};Object[a0_0xf797('0xc')](exports,a0_0xf797('0x18'),{'value':!![]});exports[a0_0xf797('0x23')]=void 0x0;const Subject_1=require(a0_0xf797('0x12'));const message_reporter_1=require(a0_0xf797('0x0'));const end_of_run_message_1=require(a0_0xf797('0x24'));const output_obfuscator_1=require(a0_0xf797('0x30'));const task_runner_life_cycle_1=require('./task-runner-life-cycle');const file_storage_1=require(a0_0xf797('0x3'));const e2e_encryption_1=require(a0_0xf797('0x1a'));const environment_1=require(a0_0xf797('0x33'));const cloud_remote_cache_1=require(a0_0xf797('0x44'));const tasks_runner_v2_1=require('@nrwl/workspace/src/tasks-runner/tasks-runner-v2');const output_1=require(a0_0xf797('0x10'));const cloud_run_api_1=require(a0_0xf797('0x3a'));const fs_1=require('fs');const path=require(a0_0xf797('0x34'));const metric_logger_1=require(a0_0xf797('0x26'));function createApi(_0x3393a2,_0x198d27,_0x21333c){const _0x4e8b2c=(0x0,environment_1[a0_0xf797('0x13')])(_0x198d27);return new cloud_run_api_1[(a0_0xf797('0x17'))](_0x3393a2,_0x21333c,_0x198d27,_0x4e8b2c);}function storeTaskHashes(_0x7cb4cb,_0x4f0053){const _0x5bf0b3=JSON[a0_0xf797('0x35')](_0x7cb4cb[a0_0xf797('0x43')](_0x2d5d45=>({'taskId':_0x2d5d45[a0_0xf797('0x11')],'hash':_0x2d5d45[a0_0xf797('0x1')]})));if(environment_1[a0_0xf797('0x3c')]){output_1['output'][a0_0xf797('0x9')]({'title':a0_0xf797('0x3e')+_0x5bf0b3});}(0x0,fs_1[a0_0xf797('0x1d')])(path[a0_0xf797('0x31')](_0x4f0053,a0_0xf797('0x7')),_0x5bf0b3);}function cloudEnabledTasksRunner(_0x377cf8,_0x3de7cc,_0x41d202){const _0x368ce9={'statuses':{},'scheduledTasks':[],'requests':{},'allTasks':_0x377cf8};const _0x28512a=new message_reporter_1['MessageReporter'](_0x3de7cc);const _0x1aa068=createApi(_0x28512a,_0x3de7cc,_0x368ce9);const _0x554b60=new end_of_run_message_1[(a0_0xf797('0x3d'))](_0x28512a,_0x368ce9);const _0x5add1f=new output_obfuscator_1['OutputObfuscator']();const _0x3bf8e6=_0x377cf8[a0_0xf797('0x43')](_0x2589cc=>_0x2589cc[a0_0xf797('0x1')])[a0_0xf797('0x3b')](_0x46d531=>!!_0x46d531);const _0x281d1f=_0x1aa068[a0_0xf797('0x1e')](environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],_0x3bf8e6);_0x3bf8e6[a0_0xf797('0x45')](_0x21c300=>{_0x368ce9[a0_0xf797('0x29')][_0x21c300]=_0x281d1f;});const _0x58c7dc=new Date()[a0_0xf797('0x1b')]();const _0xcb61fe=new task_runner_life_cycle_1[(a0_0xf797('0x36'))](_0x368ce9,_0x3de7cc['cacheDirectory'],_0x3de7cc[a0_0xf797('0x2d')]===undefined?!![]:_0x3de7cc[a0_0xf797('0x2d')],_0x3de7cc[a0_0xf797('0x2')]||[],_0x5add1f);const _0x295a3a=new e2e_encryption_1[(a0_0xf797('0x2c'))](environment_1[a0_0xf797('0x21')]||_0x3de7cc['encryptionKey']);const _0x2653b=new file_storage_1[(a0_0xf797('0x32'))](_0x295a3a,environment_1[a0_0xf797('0x6')]);const _0x123634=new cloud_remote_cache_1[(a0_0xf797('0x1f'))](_0x28512a,_0x1aa068,_0x368ce9,_0x2653b);delete process[a0_0xf797('0xe')][a0_0xf797('0x39')];const _0x57e12f=(0x0,tasks_runner_v2_1[a0_0xf797('0xa')])(_0x377cf8,Object[a0_0xf797('0x2a')](Object['assign']({},_0x3de7cc),{'remoteCache':_0x123634,'lifeCycle':_0xcb61fe}),_0x41d202);const _0x9cc5a5=new Subject_1[(a0_0xf797('0x46'))]();_0x57e12f['subscribe']({'next':_0x1bfe57=>_0x9cc5a5[a0_0xf797('0x27')](_0x1bfe57),'error':_0x460689=>_0x9cc5a5[a0_0xf797('0x41')](_0x460689),'complete':()=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x4ead9c=new Date()[a0_0xf797('0x1b')]();if(environment_1[a0_0xf797('0x3c')]){const _0x16c26a=_0xcb61fe[a0_0xf797('0x37')][a0_0xf797('0x43')](_0x751d72=>{return Object[a0_0xf797('0x2a')](Object['assign']({},_0x751d72),{'terminalOutput':_0x751d72[a0_0xf797('0x2b')]?_0x751d72[a0_0xf797('0x2b')][a0_0xf797('0x28')](0x0,0x14)+a0_0xf797('0xf'):undefined});});output_1[a0_0xf797('0x14')][a0_0xf797('0x9')]({'title':a0_0xf797('0x3f'),'bodyLines':['\x0a'+JSON[a0_0xf797('0x35')](_0x16c26a,null,0x2)]});}if(environment_1['AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION']){storeTaskHashes(_0xcb61fe[a0_0xf797('0x37')],_0x3de7cc['cacheDirectory']||'./node_modules/.cache/nx');}const _0x146843=(0x0,environment_1['getBranch'])();const _0x2bb7f7=yield Promise[a0_0xf797('0x1c')]([_0x123634['waitForStoreRequestsToComplete'](),_0x1aa068[a0_0xf797('0x22')]({'command':_0x5add1f[a0_0xf797('0x2e')]((0x0,environment_1[a0_0xf797('0x2f')])()),'startTime':_0x58c7dc,'endTime':_0x4ead9c,'distributedExecutionId':environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],'branch':_0x146843,'scan':!![],'runGroup':(0x0,environment_1[a0_0xf797('0x38')])(),'sha':_0x146843?(0x0,environment_1[a0_0xf797('0x15')])():undefined},_0xcb61fe[a0_0xf797('0x37')])]);_0x28512a[a0_0xf797('0x42')]();_0x554b60[a0_0xf797('0x37')]=_0xcb61fe['tasks'];if(environment_1['AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION']){if(!_0x2bb7f7[0x0]){output_1['output'][a0_0xf797('0x41')]({'title':a0_0xf797('0x5')});process[a0_0xf797('0x40')](environment_1['DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE']);}if(!_0x2bb7f7[0x1]){output_1[a0_0xf797('0x14')][a0_0xf797('0x41')]({'title':a0_0xf797('0xd')});process[a0_0xf797('0x40')](environment_1['DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE']);}}try{yield(0x0,metric_logger_1[a0_0xf797('0x8')])(_0x3de7cc);}catch(_0x3e791d){}_0x9cc5a5[a0_0xf797('0x20')]();})});return _0x9cc5a5;}exports[a0_0xf797('0x23')]=cloudEnabledTasksRunner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-enabled.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/cloud-enabled/cloud-enabled.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,mDAAgD;AAEhD,6EAAyE;AACzE,iFAA2E;AAC3E,+EAA2E;AAC3E,qEAA+D;AAC/D,kEAA8D;AAC9D,sEAAkE;AAClE,gEAYwC;AACxC,6DAAwD;AACxD,sFAAiF;AACjF,iEAA8D;AAC9D,mDAA8C;AAE9C,2BAAmC;AACnC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"cloud-enabled.runner.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/cloud-enabled/cloud-enabled.runner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,mDAAgD;AAEhD,6EAAyE;AACzE,iFAA2E;AAC3E,+EAA2E;AAC3E,qEAA+D;AAC/D,kEAA8D;AAC9D,sEAAkE;AAClE,gEAYwC;AACxC,6DAAwD;AACxD,sFAAiF;AACjF,iEAA8D;AAC9D,mDAA8C;AAE9C,2BAAmC;AACnC,6BAA6B;AAC7B,oEAAoE;AAEpE,SAAS,SAAS,CAChB,MAAuB,EACvB,OAA+B,EAC/B,UAAsB;IAEtB,MAAM,WAAW,GAAG,IAAA,4BAAc,EAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,IAAI,2BAAW,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,eAAe,CAAC,cAA+B,EAAE,SAAiB;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAC3B,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;KACb,CAAC,CAAC,CACJ,CAAC;IAEF,IAAI,6BAAe,EAAE;QACnB,eAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,+BAA+B,MAAM,EAAE;SAC/C,CAAC,CAAC;KACJ;IAED,IAAA,kBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC;AAED,SAAgB,uBAAuB,CACrC,KAAa,EACb,OAA+B,EAC/B,OAAY;IAEZ,MAAM,UAAU,GAAG;QACjB,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,EAAE;QAClB,QAAQ,EAAE,EAAE;QACZ,QAA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@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x217f=['reduce','@nrwl/workspace/src/utilities/output','api','status','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','then','output','waitForStoreRequestsToComplete','axiosException','messages','retrieve','forEach','throw','../../../utilities/environment','indexOf','runContext','__esModule','requests','next','filter','note','statuses','scheduledTasks','VERBOSE_LOGGING','cacheError','hash','push','resolve','Nx\x20Cloud:\x20Cache\x20miss\x20','.\x20Read\x20only\x20token\x20is\x20used.','remote-cache-hit','defineProperty','storeRequests','value','put','fileStorage','CloudRemoteCache','get','apply','__awaiter','map','response','storage','all','Nx\x20Cloud:\x20Skipping\x20storing\x20','extractErrorMessage','store','hashUrls'];(function(_0x151f27,_0x217f31){const _0x5e4fe3=function(_0x257ed8){while(--_0x257ed8){_0x151f27['push'](_0x151f27['shift']());}};_0x5e4fe3(++_0x217f31);}(a1_0x217f,0xbc));const a1_0x5e4f=function(_0x151f27,_0x217f31){_0x151f27=_0x151f27-0x0;let _0x5e4fe3=a1_0x217f[_0x151f27];return _0x5e4fe3;};'use strict';var __awaiter=this&&this[a1_0x5e4f('0x2b')]||function(_0x2df8d7,_0x23b8ff,_0x11a5f0,_0x1847bd){function _0x1556b9(_0x41b001){return _0x41b001 instanceof _0x11a5f0?_0x41b001:new _0x11a5f0(function(_0x316152){_0x316152(_0x41b001);});}return new(_0x11a5f0||(_0x11a5f0=Promise))(function(_0x2bd98d,_0x3ebda6){function _0x5602ae(_0x4d084b){try{_0x1de3b7(_0x1847bd[a1_0x5e4f('0x16')](_0x4d084b));}catch(_0x4811e5){_0x3ebda6(_0x4811e5);}}function _0x4bb6fa(_0x5b06eb){try{_0x1de3b7(_0x1847bd[a1_0x5e4f('0x10')](_0x5b06eb));}catch(_0x2f0f19){_0x3ebda6(_0x2f0f19);}}function _0x1de3b7(_0x26447e){_0x26447e['done']?_0x2bd98d(_0x26447e[a1_0x5e4f('0x25')]):_0x1556b9(_0x26447e[a1_0x5e4f('0x25')])['then'](_0x5602ae,_0x4bb6fa);}_0x1de3b7((_0x1847bd=_0x1847bd[a1_0x5e4f('0x2a')](_0x2df8d7,_0x23b8ff||[]))[a1_0x5e4f('0x16')]());});};Object[a1_0x5e4f('0x23')](exports,a1_0x5e4f('0x14'),{'value':!![]});exports[a1_0x5e4f('0x28')]=void 0x0;const output_1=require(a1_0x5e4f('0x5'));const environment_1=require(a1_0x5e4f('0x11'));class CloudRemoteCache{constructor(_0x3f58ee,_0x31cc60,_0x52082a,_0x4a5cd9){this[a1_0x5e4f('0xd')]=_0x3f58ee;this[a1_0x5e4f('0x6')]=_0x31cc60;this[a1_0x5e4f('0x13')]=_0x52082a;this['fileStorage']=_0x4a5cd9;this[a1_0x5e4f('0x24')]=[];}[a1_0x5e4f('0xe')](_0x38dc60,_0x155a2a){var _0x1e249e;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a1_0x5e4f('0xd')][a1_0x5e4f('0x1c')])return![];const _0x2d2019=yield this['hashUrls'](_0x38dc60);if(!_0x2d2019||!_0x2d2019[a1_0x5e4f('0x29')]){if(environment_1[a1_0x5e4f('0x1b')]){output_1[a1_0x5e4f('0xa')][a1_0x5e4f('0x18')]({'title':a1_0x5e4f('0x20')+_0x38dc60+'.'});}this[a1_0x5e4f('0x13')]['statuses'][_0x38dc60]='cache-miss';return![];}try{yield this[a1_0x5e4f('0x27')][a1_0x5e4f('0xe')](_0x38dc60,_0x2d2019[a1_0x5e4f('0x29')],_0x155a2a);this[a1_0x5e4f('0x13')][a1_0x5e4f('0x19')][_0x38dc60]=a1_0x5e4f('0x22');return!![];}catch(_0x3b722c){const _0x28f24a=(_0x1e249e=_0x3b722c[a1_0x5e4f('0xc')])!==null&&_0x1e249e!==void 0x0?_0x1e249e:_0x3b722c;if(_0x28f24a[a1_0x5e4f('0x2d')]&&_0x28f24a[a1_0x5e4f('0x2d')][a1_0x5e4f('0x7')]===0x194){if(environment_1['VERBOSE_LOGGING']){output_1[a1_0x5e4f('0xa')]['note']({'title':a1_0x5e4f('0x20')+_0x38dc60+'.\x20Status\x20404.'});}}else{this[a1_0x5e4f('0xd')][a1_0x5e4f('0x1c')]=this[a1_0x5e4f('0xd')]['extractErrorMessage'](_0x28f24a,'storage');}this[a1_0x5e4f('0x13')][a1_0x5e4f('0x19')][_0x38dc60]='cache-miss';return![];}});}[a1_0x5e4f('0x2')](_0x224858,_0x288dd6){return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a1_0x5e4f('0xd')][a1_0x5e4f('0x1c')])return![];const _0x140740=Promise[a1_0x5e4f('0x1f')]()[a1_0x5e4f('0x9')](()=>__awaiter(this,void 0x0,void 0x0,function*(){var _0x5080de;const _0x35d2fe=yield this[a1_0x5e4f('0x3')](_0x224858);if(!_0x35d2fe)return![];if(!_0x35d2fe[a1_0x5e4f('0x26')]){if(environment_1[a1_0x5e4f('0x1b')]){output_1['output'][a1_0x5e4f('0x18')]({'title':a1_0x5e4f('0x0')+_0x224858+a1_0x5e4f('0x21')});}return!![];}try{yield this[a1_0x5e4f('0x27')][a1_0x5e4f('0x2')](_0x224858,_0x35d2fe[a1_0x5e4f('0x26')],_0x288dd6);return!![];}catch(_0x1ee276){const _0x1e0393=(_0x5080de=_0x1ee276[a1_0x5e4f('0xc')])!==null&&_0x5080de!==void 0x0?_0x5080de:_0x1ee276;this['messages'][a1_0x5e4f('0x1c')]=this[a1_0x5e4f('0xd')][a1_0x5e4f('0x1')](_0x1e0393,a1_0x5e4f('0x2e'));return![];}}));this[a1_0x5e4f('0x24')][a1_0x5e4f('0x1e')](_0x140740);return _0x140740;});}[a1_0x5e4f('0x3')](_0x4bc42c){return __awaiter(this,void 0x0,void 0x0,function*(){if(_0x4bc42c in this[a1_0x5e4f('0x13')]['requests']){return(yield this[a1_0x5e4f('0x13')][a1_0x5e4f('0x15')][_0x4bc42c])[_0x4bc42c];}else{const _0x644c7b=this[a1_0x5e4f('0x13')][a1_0x5e4f('0x1a')][a1_0x5e4f('0x17')](_0x36e077=>!this['runContext'][a1_0x5e4f('0x15')][_0x36e077[a1_0x5e4f('0x1d')]])[a1_0x5e4f('0x2c')](_0x447876=>_0x447876['hash']);if(_0x644c7b[a1_0x5e4f('0x12')](_0x4bc42c)===-0x1){_0x644c7b[a1_0x5e4f('0x1e')](_0x4bc42c);}const _0x4444c9=this[a1_0x5e4f('0x6')]['startRun'](environment_1[a1_0x5e4f('0x8')],_0x644c7b);_0x644c7b[a1_0x5e4f('0xf')](_0x5ce0f1=>{this[a1_0x5e4f('0x13')]['requests'][_0x5ce0f1]=_0x4444c9;});return(yield _0x4444c9)[_0x4bc42c];}});}[a1_0x5e4f('0xb')](){return Promise[a1_0x5e4f('0x2f')](this[a1_0x5e4f('0x24')])[a1_0x5e4f('0x9')](_0x38191d=>_0x38191d[a1_0x5e4f('0x4')]((_0x5c2ccc,_0x2cb0ea)=>_0x5c2ccc&&_0x2cb0ea,!![]));}}exports[a1_0x5e4f('0x28')]=CloudRemoteCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-remote-cache.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/cloud-enabled/cloud-remote-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iEAA8D;AAI9D,gEAGwC;AAGxC,MAAa,gBAAgB;IAG3B,YACmB,QAAyB,EACzB,GAAgB,EAChB,UAAsB,EACtB,WAAwB;QAHxB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,QAAG,GAAH,GAAG,CAAa;QAChB,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;QAN1B,kBAAa,GAAG,EAAwB,CAAC;IAOvD,CAAC;IAEE,QAAQ,CAAC,IAAY,EAAE,cAAsB;;;YACjD,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU;gBAAE,OAAO,KAAK,CAAC;YAE3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;gBAC9B,IAAI,6BAAe,EAAE;oBACnB,eAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,wBAAwB,IAAI,GAAG,EAAE,CAAC,CAAC;iBACzD;gBACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;gBAC9C,OAAO,KAAK,CAAC;aACd;YAED,IAAI;gBACF,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;gBACpE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC;gBACpD,OAAO,IAAI,CAAC;aACb;YAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"cloud-remote-cache.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-packages/nx-cloud/src/lib/core/runners/cloud-enabled/cloud-remote-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iEAA8D;AAI9D,gEAGwC;AAGxC,MAAa,gBAAgB;IAG3B,YACmB,QAAyB,EACzB,GAAgB,EAChB,UAAsB,EACtB,WAAwB;QAHxB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,QAAG,GAAH,GAAG,CAAa;QAChB,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;QAN1B,kBAAa,GAAG,EAAwB,CAAC;IAOvD,CAAC;IAEE,QAAQ,CAAC,IAAY,EAAE,cAAsB;;;YACjD,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU;gBAAE,OAAO,KAAK,CAAC;YAE3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;gBAC9B,IAAI,6BAAe,E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AAC,IAAM,CAAC,CAAC;gBACxB,IAAI,kCAAkC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC3D,kCAAkC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC/C;gBACD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAC/B,+CAAiC,EACjC,kCAAkC,CACnC,CAAC;gBACF,kCAAkC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACtD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;gBAC/C,CAAC,CAAC,CAAC;gBACH,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;aAC9B;QACH,CAAC;KAAA;IAED,8BAA8B;QAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAChD,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CACjC,CAAC;IACJ,CAAC;CACF;AAtGD,4CAsGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x18d7=['data','startRun','zlib','Stack\x20Trace:','unknown','apiAxiosInstance','axiosException','runUrl','promisify','throw','api','/nx-cloud/runs/start','apiError','parse','messages','string','nxCloudVersion','Invalid\x20end\x20run\x20response:\x20','headers','@nrwl/nx-cloud','../../../utilities/metric-logger','defineProperty','/nx-cloud/runs/end','createMetricRecorder','__esModule','Nx\x20Cloud:\x20Unknown\x20Error\x20Occurred','package.json','devDependencies','status','done','extractErrorMessage','runContext','VERBOSE_LOGGING','NUMBER_OF_TRIES','gzip','recordMetric','util','application/octet-stream','Invalid\x20end\x20run\x20response','Run\x20Details:','urls','getRunGroup','message','CloudRunApi','post','axiosMultipleTries','error','output','Invalid\x20Nx\x20Cloud\x20response:\x20','note','machineInfo','then','value','from','stringify','assign'];(function(_0x205f8e,_0x18d765){const _0x24f5b9=function(_0x4b61f0){while(--_0x4b61f0){_0x205f8e['push'](_0x205f8e['shift']());}};_0x24f5b9(++_0x18d765);}(a2_0x18d7,0xec));const a2_0x24f5=function(_0x205f8e,_0x18d765){_0x205f8e=_0x205f8e-0x0;let _0x24f5b9=a2_0x18d7[_0x205f8e];return _0x24f5b9;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x266887,_0x59ab5f,_0x455fc1,_0x22b77c){function _0x53f4b9(_0x5df25d){return _0x5df25d instanceof _0x455fc1?_0x5df25d:new _0x455fc1(function(_0xa57fd4){_0xa57fd4(_0x5df25d);});}return new(_0x455fc1||(_0x455fc1=Promise))(function(_0xc8d4a4,_0x256c0f){function _0x367b57(_0x67a388){try{_0x2ccde9(_0x22b77c['next'](_0x67a388));}catch(_0x577265){_0x256c0f(_0x577265);}}function _0x25fe22(_0xb7a055){try{_0x2ccde9(_0x22b77c[a2_0x24f5('0x35')](_0xb7a055));}catch(_0x5b928f){_0x256c0f(_0x5b928f);}}function _0x2ccde9(_0x1c8c60){_0x1c8c60[a2_0x24f5('0x11')]?_0xc8d4a4(_0x1c8c60[a2_0x24f5('0x28')]):_0x53f4b9(_0x1c8c60[a2_0x24f5('0x28')])[a2_0x24f5('0x27')](_0x367b57,_0x25fe22);}_0x2ccde9((_0x22b77c=_0x22b77c['apply'](_0x266887,_0x59ab5f||[]))['next']());});};Object[a2_0x24f5('0x9')](exports,a2_0x24f5('0xc'),{'value':!![]});exports[a2_0x24f5('0x1f')]=void 0x0;const output_1=require('@nrwl/workspace/src/utilities/output');const axios_1=require('../../../utilities/axios');const environment_1=require('../../../utilities/environment');const fs_1=require('fs');const zlib_1=require(a2_0x24f5('0x2e'));const util_1=require(a2_0x24f5('0x18'));const metric_logger_1=require(a2_0x24f5('0x8'));class CloudRunApi{constructor(_0x18cc12,_0x3bc1ae,_0x4818f7,_0x1f62b2){this['messages']=_0x18cc12;this['runContext']=_0x3bc1ae;this[a2_0x24f5('0x26')]=_0x1f62b2;this[a2_0x24f5('0x31')]=(0x0,axios_1['createApiAxiosInstance'])(_0x4818f7);}[a2_0x24f5('0x2d')](_0x5c1814,_0xd5af17){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x9c1fd2=(0x0,metric_logger_1['createMetricRecorder'])(a2_0x24f5('0x2d'));try{const _0x54edca=yield(0x0,axios_1[a2_0x24f5('0x21')])(()=>this['apiAxiosInstance']['post'](a2_0x24f5('0x37'),{'meta':{'nxCloudVersion':this[a2_0x24f5('0x4')]()},'branch':(0x0,environment_1['getBranch'])(),'runGroup':(0x0,environment_1[a2_0x24f5('0x1d')])(),'distributedExecutionId':_0x5c1814,'hashes':_0xd5af17}),environment_1[a2_0x24f5('0x15')]);_0x9c1fd2[a2_0x24f5('0x17')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x54edca));if(_0x54edca[a2_0x24f5('0x2c')]&&_0x54edca['data']['message']){this[a2_0x24f5('0x2')]['message']=_0x54edca[a2_0x24f5('0x2c')][a2_0x24f5('0x1e')];}if(!_0x54edca[a2_0x24f5('0x2c')]||!_0x54edca[a2_0x24f5('0x2c')][a2_0x24f5('0x1c')]){this['messages'][a2_0x24f5('0x0')]=a2_0x24f5('0x24')+JSON[a2_0x24f5('0x2a')](_0x54edca[a2_0x24f5('0x2c')]);return{};}return _0x54edca[a2_0x24f5('0x2c')][a2_0x24f5('0x1c')];}catch(_0x3dc18a){_0x9c1fd2['recordMetric'](metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);this[a2_0x24f5('0x2')]['apiError']=this[a2_0x24f5('0x2')][a2_0x24f5('0x12')](_0x3dc18a,a2_0x24f5('0x36'));return{};}});}['endRun'](_0xd347be,_0x47bbe3){var _0x38a25b;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a2_0x24f5('0x2')][a2_0x24f5('0x0')])return![];const _0x438fd2={'meta':{'nxCloudVersion':this[a2_0x24f5('0x4')]()},'tasks':_0x47bbe3,'run':_0xd347be,'machineInfo':this['machineInfo']};const _0x59ed2b=Buffer[a2_0x24f5('0x29')](JSON['stringify'](_0x438fd2));const _0x2176fc=yield(0x0,util_1[a2_0x24f5('0x34')])(zlib_1[a2_0x24f5('0x16')])(_0x59ed2b);const _0x441acf=(0x0,metric_logger_1[a2_0x24f5('0xb')])('endRun');try{const _0x50db4f=yield(0x0,axios_1[a2_0x24f5('0x21')])(()=>this[a2_0x24f5('0x31')][a2_0x24f5('0x20')](a2_0x24f5('0xa'),_0x2176fc,{'headers':Object[a2_0x24f5('0x2b')](Object[a2_0x24f5('0x2b')]({},this[a2_0x24f5('0x31')]['defaults'][a2_0x24f5('0x6')]),{'Content-Encoding':a2_0x24f5('0x16'),'Content-Type':a2_0x24f5('0x19')})}),environment_1[a2_0x24f5('0x15')]);if(_0x50db4f){_0x441acf[a2_0x24f5('0x17')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x50db4f));if(_0x50db4f[a2_0x24f5('0x2c')]&&_0x50db4f[a2_0x24f5('0x2c')][a2_0x24f5('0x33')]&&_0x50db4f[a2_0x24f5('0x2c')][a2_0x24f5('0x10')]==='success'){this[a2_0x24f5('0x13')][a2_0x24f5('0x33')]=_0x50db4f[a2_0x24f5('0x2c')]['runUrl'];return!![];}if(_0x50db4f[a2_0x24f5('0x2c')]&&_0x50db4f[a2_0x24f5('0x2c')][a2_0x24f5('0x10')]){this['messages'][a2_0x24f5('0x0')]=a2_0x24f5('0x5')+JSON[a2_0x24f5('0x2a')](_0x50db4f[a2_0x24f5('0x2c')]['message']);}else if(_0x50db4f['data']&&typeof _0x50db4f['data']===a2_0x24f5('0x3')){if(_0x50db4f[a2_0x24f5('0x2c')]!=='success'){this[a2_0x24f5('0x2')]['apiError']=a2_0x24f5('0x5')+JSON['stringify'](_0x50db4f[a2_0x24f5('0x2c')]);}}else{this[a2_0x24f5('0x2')]['apiError']=a2_0x24f5('0x5')+JSON['stringify'](_0x50db4f[a2_0x24f5('0x2c')]);}if(environment_1[a2_0x24f5('0x14')]){output_1[a2_0x24f5('0x23')][a2_0x24f5('0x25')]({'title':a2_0x24f5('0x1a'),'bodyLines':[JSON[a2_0x24f5('0x2a')](_0x50db4f[a2_0x24f5('0x2c')],null,0x2)]});}}else{output_1[a2_0x24f5('0x23')][a2_0x24f5('0x22')]({'title':a2_0x24f5('0xd'),'bodyLines':['Run\x20completion\x20responded\x20with\x20`undefined`.',a2_0x24f5('0x1b'),JSON[a2_0x24f5('0x2a')](_0xd347be,null,0x2),a2_0x24f5('0x2f'),JSON['stringify'](new Error()['stack'],null,0x2)]});}return![];}catch(_0x35bf0b){_0x441acf[a2_0x24f5('0x17')](metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);const _0x303d86=(_0x38a25b=_0x35bf0b[a2_0x24f5('0x32')])!==null&&_0x38a25b!==void 0x0?_0x38a25b:_0x35bf0b;this['messages']['apiError']=this[a2_0x24f5('0x2')][a2_0x24f5('0x12')](_0x303d86,a2_0x24f5('0x36'));return![];}});}[a2_0x24f5('0x4')](){try{const _0x5b3eff=JSON[a2_0x24f5('0x1')]((0x0,fs_1['readFileSync'])(a2_0x24f5('0xe'))['toString']());return _0x5b3eff[a2_0x24f5('0xf')][a2_0x24f5('0x7')];}catch(_0x4be606){return a2_0x24f5('0x30');}}}exports[a2_0x24f5('0x1f')]=CloudRunApi;
|