@nrwl/nx-cloud 15.0.3 → 15.0.4-beta.2
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/package.json +1 -1
- package/bin/nx-cloud.d.ts +0 -2
- package/bin/nx-cloud.js +0 -50
- package/bin/nx-cloud.js.map +0 -1
- package/index.d.ts +0 -2
- package/index.js +0 -5
- package/index.js.map +0 -1
- package/lib/core/api/error-reporter.api.d.ts +0 -6
- package/lib/core/api/error-reporter.api.js +0 -1
- package/lib/core/api/error-reporter.api.js.map +0 -1
- package/lib/core/api/run-group.api.d.ts +0 -7
- package/lib/core/api/run-group.api.js +0 -1
- package/lib/core/api/run-group.api.js.map +0 -1
- package/lib/core/commands/clean-up-agents.d.ts +0 -1
- package/lib/core/commands/clean-up-agents.js +0 -34
- package/lib/core/commands/clean-up-agents.js.map +0 -1
- package/lib/core/commands/record-output.d.ts +0 -1
- package/lib/core/commands/record-output.js +0 -177
- package/lib/core/commands/record-output.js.map +0 -1
- package/lib/core/commands/start-ci-run.d.ts +0 -1
- package/lib/core/commands/start-ci-run.js +0 -61
- package/lib/core/commands/start-ci-run.js.map +0 -1
- package/lib/core/commands/stop-all-agents.d.ts +0 -1
- package/lib/core/commands/stop-all-agents.js +0 -37
- package/lib/core/commands/stop-all-agents.js.map +0 -1
- package/lib/core/commands/upload-and-show-run-details.d.ts +0 -1
- package/lib/core/commands/upload-and-show-run-details.js +0 -60
- package/lib/core/commands/upload-and-show-run-details.js.map +0 -1
- package/lib/core/error/print-invalid-runner-error.d.ts +0 -1
- package/lib/core/error/print-invalid-runner-error.js +0 -17
- package/lib/core/error/print-invalid-runner-error.js.map +0 -1
- package/lib/core/error/print-run-group-error.d.ts +0 -1
- package/lib/core/error/print-run-group-error.js +0 -16
- package/lib/core/error/print-run-group-error.js.map +0 -1
- package/lib/core/file-storage/e2e-encryption.d.ts +0 -9
- package/lib/core/file-storage/e2e-encryption.js +0 -46
- package/lib/core/file-storage/e2e-encryption.js.map +0 -1
- package/lib/core/file-storage/file-storage.d.ts +0 -24
- package/lib/core/file-storage/file-storage.js +0 -262
- package/lib/core/file-storage/file-storage.js.map +0 -1
- package/lib/core/models/cache-urls.model.d.ts +0 -6
- package/lib/core/models/cache-urls.model.js +0 -3
- package/lib/core/models/cache-urls.model.js.map +0 -1
- package/lib/core/models/cloud-task-runner-options.d.ts +0 -20
- package/lib/core/models/cloud-task-runner-options.js +0 -3
- package/lib/core/models/cloud-task-runner-options.js.map +0 -1
- package/lib/core/models/distributed-agent/grouped-tasks.model.d.ts +0 -6
- package/lib/core/models/distributed-agent/grouped-tasks.model.js +0 -3
- package/lib/core/models/distributed-agent/grouped-tasks.model.js.map +0 -1
- package/lib/core/models/distributed-agent/index.d.ts +0 -3
- package/lib/core/models/distributed-agent/index.js +0 -20
- package/lib/core/models/distributed-agent/index.js.map +0 -1
- package/lib/core/models/distributed-agent/task-to-execute.model.d.ts +0 -7
- package/lib/core/models/distributed-agent/task-to-execute.model.js +0 -3
- package/lib/core/models/distributed-agent/task-to-execute.model.js.map +0 -1
- package/lib/core/models/distributed-agent/tasks-api-response.model.d.ts +0 -10
- package/lib/core/models/distributed-agent/tasks-api-response.model.js +0 -3
- package/lib/core/models/distributed-agent/tasks-api-response.model.js.map +0 -1
- package/lib/core/models/machine-info.model.d.ts +0 -6
- package/lib/core/models/machine-info.model.js +0 -3
- package/lib/core/models/machine-info.model.js.map +0 -1
- package/lib/core/models/run-context.model.d.ts +0 -128
- package/lib/core/models/run-context.model.js +0 -22
- package/lib/core/models/run-context.model.js.map +0 -1
- package/lib/core/models/run-data.model.d.ts +0 -11
- package/lib/core/models/run-data.model.js +0 -3
- package/lib/core/models/run-data.model.js.map +0 -1
- package/lib/core/models/task-execution.model.d.ts +0 -13
- package/lib/core/models/task-execution.model.js +0 -3
- package/lib/core/models/task-execution.model.js.map +0 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.d.ts +0 -21
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +0 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js.map +0 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.d.ts +0 -3
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +0 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js.map +0 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.d.ts +0 -16
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +0 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js.map +0 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.d.ts +0 -18
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +0 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js.map +0 -1
- package/lib/core/runners/cloud-enabled/id-generator.d.ts +0 -1
- package/lib/core/runners/cloud-enabled/id-generator.js +0 -1
- package/lib/core/runners/cloud-enabled/id-generator.js.map +0 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.d.ts +0 -13
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +0 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js.map +0 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.d.ts +0 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +0 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js.map +0 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.d.ts +0 -10
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +0 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js.map +0 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.d.ts +0 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +0 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js.map +0 -1
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.d.ts +0 -2
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js +0 -1
- package/lib/core/runners/distributed-execution/split-task-graph-into-stages.js.map +0 -1
- package/lib/core/runners/distributed-execution/task-graph-creator.d.ts +0 -15
- package/lib/core/runners/distributed-execution/task-graph-creator.js +0 -1
- package/lib/core/runners/distributed-execution/task-graph-creator.js.map +0 -1
- package/lib/core/terminal-output/end-of-run-message.d.ts +0 -8
- package/lib/core/terminal-output/end-of-run-message.js +0 -44
- package/lib/core/terminal-output/end-of-run-message.js.map +0 -1
- package/lib/core/terminal-output/message-reporter.d.ts +0 -11
- package/lib/core/terminal-output/message-reporter.js +0 -71
- package/lib/core/terminal-output/message-reporter.js.map +0 -1
- package/lib/core/terminal-output/output-obfuscator.d.ts +0 -6
- package/lib/core/terminal-output/output-obfuscator.js +0 -48
- package/lib/core/terminal-output/output-obfuscator.js.map +0 -1
- package/lib/core/terminal-output/read-task-terminal-output.d.ts +0 -2
- package/lib/core/terminal-output/read-task-terminal-output.js +0 -60
- package/lib/core/terminal-output/read-task-terminal-output.js.map +0 -1
- package/lib/daemon/process-run-end.d.ts +0 -3
- package/lib/daemon/process-run-end.js +0 -60
- package/lib/daemon/process-run-end.js.map +0 -1
- package/lib/generators/init/init.d.ts +0 -1
- package/lib/generators/init/init.js +0 -96
- package/lib/generators/init/init.js.map +0 -1
- package/lib/nx-cloud-tasks-runner.d.ts +0 -2
- package/lib/nx-cloud-tasks-runner.js +0 -146
- package/lib/nx-cloud-tasks-runner.js.map +0 -1
- package/lib/utilities/axios.d.ts +0 -10
- package/lib/utilities/axios.js +0 -87
- package/lib/utilities/axios.js.map +0 -1
- package/lib/utilities/create-unchanged-value-timeout.d.ts +0 -4
- package/lib/utilities/create-unchanged-value-timeout.js +0 -24
- package/lib/utilities/create-unchanged-value-timeout.js.map +0 -1
- package/lib/utilities/distributed-task-execution-detection.d.ts +0 -2
- package/lib/utilities/distributed-task-execution-detection.js +0 -36
- package/lib/utilities/distributed-task-execution-detection.js.map +0 -1
- package/lib/utilities/environment.d.ts +0 -27
- package/lib/utilities/environment.js +0 -198
- package/lib/utilities/environment.js.map +0 -1
- package/lib/utilities/is-ci.d.ts +0 -1
- package/lib/utilities/is-ci.js +0 -21
- package/lib/utilities/is-ci.js.map +0 -1
- package/lib/utilities/metric-logger.d.ts +0 -22
- package/lib/utilities/metric-logger.js +0 -70
- package/lib/utilities/metric-logger.js.map +0 -1
- package/lib/utilities/nx-imports.d.ts +0 -0
- package/lib/utilities/nx-imports.js +0 -59
- package/lib/utilities/nx-imports.js.map +0 -1
- package/lib/utilities/print-message.d.ts +0 -1
- package/lib/utilities/print-message.js +0 -64
- package/lib/utilities/print-message.js.map +0 -1
- package/lib/utilities/serializer-overrides.d.ts +0 -2
- package/lib/utilities/serializer-overrides.js +0 -40
- package/lib/utilities/serializer-overrides.js.map +0 -1
- package/lib/utilities/waiter.d.ts +0 -6
- package/lib/utilities/waiter.js +0 -36
- package/lib/utilities/waiter.js.map +0 -1
package/package.json
CHANGED
package/bin/nx-cloud.d.ts
DELETED
package/bin/nx-cloud.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const clean_up_agents_1 = require("../lib/core/commands/clean-up-agents");
|
|
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
|
-
const upload_and_show_run_details_1 = require("../lib/core/commands/upload-and-show-run-details");
|
|
10
|
-
const command = process.argv[2];
|
|
11
|
-
if (command === 'start-agent') {
|
|
12
|
-
(0, distributed_agent_impl_1.startAgent)().catch((e) => {
|
|
13
|
-
console.error(e);
|
|
14
|
-
process.exit(1);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
else if (command === 'stop-all-agents') {
|
|
18
|
-
(0, stop_all_agents_1.stopAllAgents)().catch((e) => {
|
|
19
|
-
console.error(e);
|
|
20
|
-
process.exit(1);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
else if (command === 'start-ci-run') {
|
|
24
|
-
(0, start_ci_run_1.startCiRun)().catch((e) => {
|
|
25
|
-
console.error(e);
|
|
26
|
-
process.exit(1);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
else if (command === 'clean-up-agents') {
|
|
30
|
-
(0, clean_up_agents_1.cleanUpAgents)().catch((e) => {
|
|
31
|
-
console.error(e);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
else if (command === 'record') {
|
|
36
|
-
(0, record_output_1.runCommandAndStoreInCloud)().catch((e) => {
|
|
37
|
-
console.error(e);
|
|
38
|
-
process.exit(1);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
else if (command === 'upload-and-show-run-details') {
|
|
42
|
-
(0, upload_and_show_run_details_1.uploadAndShowRunDetails)().catch((e) => {
|
|
43
|
-
console.error(e);
|
|
44
|
-
process.exit(1);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
console.log('Pass start-agent, stop-all-agents, or clean-up-agents');
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=nx-cloud.js.map
|
package/bin/nx-cloud.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAC1F,kGAA2F;AAE3F,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,IAAI,OAAO,KAAK,aAAa,EAAE;IAC7B,IAAA,mCAAU,GAAE,CA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,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"}
|
package/index.d.ts
DELETED
package/index.js
DELETED
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/nx-packages/nx-cloud/index.ts"],"names":[],"mappings":";;AAAA,uEAA6D;AAE7D,kBAAe,+BAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a0_0x2db2=['apiAxiosInstance','value','../../utilities/nx-imports','createApiAxiosInstance','ErrorReporterApi','__esModule','done','throw','__awaiter','reportError','warn','then','next'];(function(_0x3d7c8f,_0x2db20f){const _0x989221=function(_0x30f38a){while(--_0x30f38a){_0x3d7c8f['push'](_0x3d7c8f['shift']());}};_0x989221(++_0x2db20f);}(a0_0x2db2,0x166));const a0_0x9892=function(_0x3d7c8f,_0x2db20f){_0x3d7c8f=_0x3d7c8f-0x0;let _0x989221=a0_0x2db2[_0x3d7c8f];return _0x989221;};'use strict';var __awaiter=this&&this[a0_0x9892('0x1')]||function(_0x34b200,_0x332a08,_0x290d3e,_0x103d95){function _0x44bcce(_0x4c239b){return _0x4c239b instanceof _0x290d3e?_0x4c239b:new _0x290d3e(function(_0x46f252){_0x46f252(_0x4c239b);});}return new(_0x290d3e||(_0x290d3e=Promise))(function(_0x5c9a6b,_0x276606){function _0x131a14(_0x46c84b){try{_0x2fc12d(_0x103d95[a0_0x9892('0x5')](_0x46c84b));}catch(_0x46538a){_0x276606(_0x46538a);}}function _0x4cd306(_0x64f2cf){try{_0x2fc12d(_0x103d95[a0_0x9892('0x0')](_0x64f2cf));}catch(_0xde5894){_0x276606(_0xde5894);}}function _0x2fc12d(_0x34799b){_0x34799b[a0_0x9892('0xc')]?_0x5c9a6b(_0x34799b['value']):_0x44bcce(_0x34799b[a0_0x9892('0x7')])[a0_0x9892('0x4')](_0x131a14,_0x4cd306);}_0x2fc12d((_0x103d95=_0x103d95['apply'](_0x34b200,_0x332a08||[]))['next']());});};Object['defineProperty'](exports,a0_0x9892('0xb'),{'value':!![]});exports[a0_0x9892('0xa')]=void 0x0;const axios_1=require('../../utilities/axios');const {output}=require(a0_0x9892('0x8'));class ErrorReporterApi{constructor(_0x3d9c2b){this[a0_0x9892('0x6')]=(0x0,axios_1[a0_0x9892('0x9')])(_0x3d9c2b);}[a0_0x9892('0x2')](_0x4af54c){return __awaiter(this,void 0x0,void 0x0,function*(){try{yield(0x0,axios_1['axiosMultipleTries'])(()=>this[a0_0x9892('0x6')]['post']('/nx-cloud/report-client-error',{'message':_0x4af54c}));}catch(_0x3f613a){output[a0_0x9892('0x3')]({'title':'Unable\x20to\x20record\x20the\x20following\x20error:\x20\x27'+_0x4af54c+'\x27','bodyLines':[_0x3f613a['message']]});}});}}exports[a0_0x9892('0xa')]=ErrorReporterApi;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-reporter.api.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/api/error-reporter.api.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAG+B;AAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAa,gBAAgB;IAG3B,YAAY,OAA+B;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAA,8BAAsB,EAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEK,WAAW,CAAC,OAAe;;YAC/B,IAAI;gBACF,MAAM,IAAA,0BAAkB,EAAC,GAAG,EAAE,CAC5B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,+BAA+B,EAAE;oBAC1D,OAAO;iBACR,CAAC,CACH,CAAC;aACH;YAAC,OAAO,CAAM,EAAE;gBACf,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,0CAA0C,OAAO,GAAG;oBAC3D,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;iBACvB,CAAC,CAAC;aACJ;QACH,CAAC;KAAA;CACF;AArBD,4CAqBC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CloudTaskRunnerOptions } from '../models/cloud-task-runner-options';
|
|
2
|
-
export declare class RunGroupApi {
|
|
3
|
-
private apiAxiosInstance;
|
|
4
|
-
constructor(options: CloudTaskRunnerOptions);
|
|
5
|
-
createRunGroup(branch: string | null, runGroup: string, stopAgentsOnFailure?: boolean, agentCount?: number, stopAgentsAfter?: string): Promise<void>;
|
|
6
|
-
completeRunGroup(runGroup: string): Promise<void>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a1_0x4727=['throw','value','createRunGroup','response','createMetricRecorder','exit','axiosMultipleTries','../../utilities/nx-imports','apply','/nx-cloud/executions/create-run-group','apiAxiosInstance','post','axiosException','mapRespToPerfEntry','RunGroupApi','__esModule','error','createApiAxiosInstance','RUNNER_FAILURE_PERF_ENTRY','defineProperty','done','message','recordMetric','/nx-cloud/executions/complete-run-group'];(function(_0x1f8505,_0x47276c){const _0x4d71de=function(_0x55f037){while(--_0x55f037){_0x1f8505['push'](_0x1f8505['shift']());}};_0x4d71de(++_0x47276c);}(a1_0x4727,0xe8));const a1_0x4d71=function(_0x1f8505,_0x47276c){_0x1f8505=_0x1f8505-0x0;let _0x4d71de=a1_0x4727[_0x1f8505];return _0x4d71de;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x117dc6,_0x3cf067,_0x1b06d6,_0x1b8423){function _0x24e95c(_0x45ff36){return _0x45ff36 instanceof _0x1b06d6?_0x45ff36:new _0x1b06d6(function(_0x5b2462){_0x5b2462(_0x45ff36);});}return new(_0x1b06d6||(_0x1b06d6=Promise))(function(_0x3adee0,_0x5dfece){function _0x59e57a(_0x3e9124){try{_0x2ed0f0(_0x1b8423['next'](_0x3e9124));}catch(_0x2cbca2){_0x5dfece(_0x2cbca2);}}function _0x109d5e(_0x3516c9){try{_0x2ed0f0(_0x1b8423[a1_0x4d71('0x8')](_0x3516c9));}catch(_0x92f689){_0x5dfece(_0x92f689);}}function _0x2ed0f0(_0x148628){_0x148628[a1_0x4d71('0x4')]?_0x3adee0(_0x148628[a1_0x4d71('0x9')]):_0x24e95c(_0x148628[a1_0x4d71('0x9')])['then'](_0x59e57a,_0x109d5e);}_0x2ed0f0((_0x1b8423=_0x1b8423[a1_0x4d71('0x10')](_0x117dc6,_0x3cf067||[]))['next']());});};Object[a1_0x4d71('0x3')](exports,a1_0x4d71('0x17'),{'value':!![]});exports['RunGroupApi']=void 0x0;const axios_1=require('../../utilities/axios');const metric_logger_1=require('../../utilities/metric-logger');const {output}=require(a1_0x4d71('0xf'));class RunGroupApi{constructor(_0x573f27){this[a1_0x4d71('0x12')]=(0x0,axios_1[a1_0x4d71('0x1')])(_0x573f27);}[a1_0x4d71('0xa')](_0x4741e0,_0x221ce9,_0x3a4528,_0x17e5f2,_0x3b263f){var _0x1f4025;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x42f7fd=(0x0,metric_logger_1[a1_0x4d71('0xc')])('createRunGroup');try{const _0x16cbd9=yield(0x0,axios_1[a1_0x4d71('0xe')])(()=>this[a1_0x4d71('0x12')][a1_0x4d71('0x13')](a1_0x4d71('0x11'),{'branch':_0x4741e0,'runGroup':_0x221ce9,'stopAgentsOnFailure':_0x3a4528,'agentCount':_0x17e5f2,'stopAgentsAfter':_0x3b263f}));_0x42f7fd[a1_0x4d71('0x6')]((0x0,metric_logger_1[a1_0x4d71('0x15')])(_0x16cbd9));}catch(_0x3f7af4){_0x42f7fd[a1_0x4d71('0x6')](((_0x1f4025=_0x3f7af4===null||_0x3f7af4===void 0x0?void 0x0:_0x3f7af4[a1_0x4d71('0x14')])===null||_0x1f4025===void 0x0?void 0x0:_0x1f4025[a1_0x4d71('0xb')])?(0x0,metric_logger_1[a1_0x4d71('0x15')])(_0x3f7af4[a1_0x4d71('0x14')][a1_0x4d71('0xb')]):metric_logger_1[a1_0x4d71('0x2')]);output[a1_0x4d71('0x0')]({'title':_0x3f7af4[a1_0x4d71('0x5')]});process[a1_0x4d71('0xd')](0x1);}});}['completeRunGroup'](_0x23ddd8){var _0x366f7a;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x308007=(0x0,metric_logger_1[a1_0x4d71('0xc')])(a1_0x4d71('0xa'));try{const _0x292b84=yield(0x0,axios_1[a1_0x4d71('0xe')])(()=>this[a1_0x4d71('0x12')][a1_0x4d71('0x13')](a1_0x4d71('0x7'),{'runGroup':_0x23ddd8}));_0x308007[a1_0x4d71('0x6')]((0x0,metric_logger_1[a1_0x4d71('0x15')])(_0x292b84));}catch(_0x4cceb5){_0x308007[a1_0x4d71('0x6')](((_0x366f7a=_0x4cceb5===null||_0x4cceb5===void 0x0?void 0x0:_0x4cceb5[a1_0x4d71('0x14')])===null||_0x366f7a===void 0x0?void 0x0:_0x366f7a['response'])?(0x0,metric_logger_1[a1_0x4d71('0x15')])(_0x4cceb5[a1_0x4d71('0x14')][a1_0x4d71('0xb')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);output['error']({'title':_0x4cceb5['message']});process['exit'](0x1);}});}}exports[a1_0x4d71('0x16')]=RunGroupApi;
|
|
@@ -1 +0,0 @@
|
|
|
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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B,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function cleanUpAgents(): Promise<void>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.cleanUpAgents = void 0;
|
|
13
|
-
const stripJsonComments = require("strip-json-comments");
|
|
14
|
-
const environment_1 = require("../../utilities/environment");
|
|
15
|
-
const fs_1 = require("fs");
|
|
16
|
-
const { output, workspaceRoot } = require('../../utilities/nx-imports');
|
|
17
|
-
function cleanUpAgents() {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString())).tasksRunnerOptions.default.options;
|
|
20
|
-
const cacheDirectory = (0, environment_1.getNxCacheDirectory)(options);
|
|
21
|
-
const lockFileDirectory = `${cacheDirectory}/lockfiles`;
|
|
22
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
23
|
-
output.note({
|
|
24
|
-
title: `Cleaning up agent metadata for this workspace.`,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return (0, fs_1.rm)(lockFileDirectory, { recursive: true, force: true }, (err) => {
|
|
28
|
-
if (err)
|
|
29
|
-
throw err;
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.cleanUpAgents = cleanUpAgents;
|
|
34
|
-
//# sourceMappingURL=clean-up-agents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clean-up-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/clean-up-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,6DAGqC;AACrC,2BAAsC;AAEtC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAExE,SAAsB,aAAa;;QACjC,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;QACrC,MAAM,cAAc,GAAG,IAAA,iCAAmB,EAAC,OAAO,CAAC,CAAC;QACpD,MAAM,iBAAiB,GAAG,GAAG,cAAc,YAAY,CAAC;QAExD,IAAI,6BAAe,EAAE;YACnB,MAAM,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runCommandAndStoreInCloud(): Promise<void>;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.runCommandAndStoreInCloud = void 0;
|
|
13
|
-
const cp = require("child_process");
|
|
14
|
-
const environment_1 = require("../../utilities/environment");
|
|
15
|
-
const axios_1 = require("../../utilities/axios");
|
|
16
|
-
const util_1 = require("util");
|
|
17
|
-
const zlib_1 = require("zlib");
|
|
18
|
-
const output_obfuscator_1 = require("../terminal-output/output-obfuscator");
|
|
19
|
-
const print_message_1 = require("../../utilities/print-message");
|
|
20
|
-
const distributed_execution_api_1 = require("../runners/distributed-execution/distributed-execution.api");
|
|
21
|
-
const { output, workspaceRoot } = require('../../utilities/nx-imports');
|
|
22
|
-
const MAX_CHARACTERS_OUTPUT_CAPTURE = 200000;
|
|
23
|
-
function runCommandAndStoreInCloud() {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const taskRunnerOptions = getTaskRunnerOptions();
|
|
26
|
-
const axios = (0, axios_1.createApiAxiosInstance)(taskRunnerOptions);
|
|
27
|
-
const dteApi = new distributed_execution_api_1.DistributedExecutionApi(taskRunnerOptions);
|
|
28
|
-
const outputObfuscator = new output_obfuscator_1.OutputObfuscator(taskRunnerOptions.maskedProperties);
|
|
29
|
-
const branch = (0, environment_1.getBranch)();
|
|
30
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
31
|
-
const userCommandAndArgs = parseCommandAndFlags(process.argv);
|
|
32
|
-
const [userCommand, ...userArgs] = userCommandAndArgs;
|
|
33
|
-
const startTime = new Date().toISOString();
|
|
34
|
-
const { statusCode, terminalOutput } = yield spawnUserCommandAndCaptureOutput(userCommand, userArgs);
|
|
35
|
-
const endTime = new Date().toISOString();
|
|
36
|
-
const endRecordOutputRunParams = {
|
|
37
|
-
statusCode,
|
|
38
|
-
terminalOutput,
|
|
39
|
-
userCommandAndArgsString: userCommandAndArgs.join(' '),
|
|
40
|
-
startTime,
|
|
41
|
-
endTime,
|
|
42
|
-
branch,
|
|
43
|
-
runGroup,
|
|
44
|
-
};
|
|
45
|
-
yield endRecordOutputRun(axios, outputObfuscator, taskRunnerOptions, endRecordOutputRunParams, dteApi);
|
|
46
|
-
process.exit(statusCode);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
exports.runCommandAndStoreInCloud = runCommandAndStoreInCloud;
|
|
50
|
-
function getTaskRunnerOptions() {
|
|
51
|
-
var _a, _b, _c;
|
|
52
|
-
try {
|
|
53
|
-
const taskRunnerOptions = (_c = (_b = (_a = require(`${workspaceRoot}/nx.json`)) === null || _a === void 0 ? void 0 : _a.tasksRunnerOptions) === null || _b === void 0 ? void 0 : _b.default) === null || _c === void 0 ? void 0 : _c.options;
|
|
54
|
-
return taskRunnerOptions;
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
throw new Error('Unable to locate task runner options.');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function parseCommandAndFlags(args) {
|
|
61
|
-
let commandStartIndex = args.findIndex((arg) => arg === 'record') + 1;
|
|
62
|
-
let userCommandAndArgs;
|
|
63
|
-
if (commandStartIndex < process.argv.length) {
|
|
64
|
-
// Different package managers may remove not the "--" from the command automatically, so account for that
|
|
65
|
-
const sliceOffset = process.argv[commandStartIndex] === '--' ? 1 : 0;
|
|
66
|
-
userCommandAndArgs = process.argv.slice(commandStartIndex + sliceOffset);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
console.log('Invalid command. Use `nx-cloud record [my command] [my arg1] [my arg...]`');
|
|
70
|
-
process.exit(1);
|
|
71
|
-
}
|
|
72
|
-
return userCommandAndArgs;
|
|
73
|
-
}
|
|
74
|
-
function spawnUserCommandAndCaptureOutput(command, args) {
|
|
75
|
-
return new Promise((res, rej) => {
|
|
76
|
-
try {
|
|
77
|
-
const userCommandProcess = cp.spawn(command, args, {
|
|
78
|
-
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
|
|
79
|
-
});
|
|
80
|
-
const outLines = [];
|
|
81
|
-
userCommandProcess.stdout.on('data', (chunk) => {
|
|
82
|
-
process.stdout.write(chunk);
|
|
83
|
-
outLines.push(chunk.toString());
|
|
84
|
-
});
|
|
85
|
-
userCommandProcess.stderr.on('data', (chunk) => {
|
|
86
|
-
process.stderr.write(chunk);
|
|
87
|
-
outLines.push(chunk.toString());
|
|
88
|
-
});
|
|
89
|
-
userCommandProcess.on('exit', (exitCode, exitSignal) => {
|
|
90
|
-
const statusCode = exitCode !== null && exitCode !== void 0 ? exitCode : signalToCode(exitSignal || '');
|
|
91
|
-
const joinedOutput = outLines.join('');
|
|
92
|
-
res({
|
|
93
|
-
statusCode,
|
|
94
|
-
terminalOutput: joinedOutput,
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
catch (e) {
|
|
99
|
-
rej(e);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function createTaskDefinitionFromUserCommand(outputObfuscator, params) {
|
|
104
|
-
const sanitizedOutput = outputObfuscator.obfuscate(params.terminalOutput);
|
|
105
|
-
const truncatedOutput = sanitizedOutput.length > MAX_CHARACTERS_OUTPUT_CAPTURE
|
|
106
|
-
? `TRUNCATED\n\n${sanitizedOutput.slice(sanitizedOutput.length - MAX_CHARACTERS_OUTPUT_CAPTURE)}`
|
|
107
|
-
: sanitizedOutput;
|
|
108
|
-
return {
|
|
109
|
-
taskId: 'nx-cloud-tasks-runner:record-command',
|
|
110
|
-
target: 'record-command',
|
|
111
|
-
projectName: 'nx-cloud-tasks-runner',
|
|
112
|
-
hash: '',
|
|
113
|
-
startTime: params.startTime,
|
|
114
|
-
endTime: params.endTime,
|
|
115
|
-
hashDetails: {},
|
|
116
|
-
params: params.userCommandAndArgsString,
|
|
117
|
-
cacheStatus: 'n/a',
|
|
118
|
-
status: params.statusCode,
|
|
119
|
-
terminalOutput: truncatedOutput,
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function endRecordOutputRun(axios, obfuscator, taskRunnerOptions, params, dteApi) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
const commandWithPrefix = `nx-cloud record -- ${params.userCommandAndArgsString}`;
|
|
125
|
-
const endRunReq = {
|
|
126
|
-
meta: {
|
|
127
|
-
nxCloudVersion: '0.0.0',
|
|
128
|
-
},
|
|
129
|
-
tasks: [createTaskDefinitionFromUserCommand(obfuscator, params)],
|
|
130
|
-
run: {
|
|
131
|
-
command: commandWithPrefix,
|
|
132
|
-
startTime: params.startTime,
|
|
133
|
-
endTime: params.endTime,
|
|
134
|
-
branch: params.branch,
|
|
135
|
-
scan: true,
|
|
136
|
-
runGroup: params.runGroup,
|
|
137
|
-
// only set sha if branch is set because we invoke a separate process,
|
|
138
|
-
// which adds a few millis
|
|
139
|
-
sha: params.branch ? (0, environment_1.extractGitSha)() : undefined,
|
|
140
|
-
},
|
|
141
|
-
machineInfo: (0, environment_1.getMachineInfo)(taskRunnerOptions),
|
|
142
|
-
};
|
|
143
|
-
const uncompressedBuffer = Buffer.from(JSON.stringify(endRunReq));
|
|
144
|
-
const compressedBuffer = yield (0, util_1.promisify)(zlib_1.gzip)(uncompressedBuffer);
|
|
145
|
-
const endRunResp = yield (0, axios_1.axiosMultipleTries)(() => axios.post('/nx-cloud/runs/end', compressedBuffer, {
|
|
146
|
-
headers: Object.assign(Object.assign({}, axios.defaults.headers), { 'Content-Encoding': 'gzip', 'Content-Type': 'application/octet-stream' }),
|
|
147
|
-
}));
|
|
148
|
-
if (process.env.NX_CLOUD_SILENT_RECORD !== 'true') {
|
|
149
|
-
printRecordOutputRunEndMessage(endRunResp.data.runUrl);
|
|
150
|
-
}
|
|
151
|
-
if (params.statusCode !== 0 && params.runGroup) {
|
|
152
|
-
yield dteApi.completeRunGroupWithError(params.runGroup, `Command "${params.userCommandAndArgsString}" failed.`);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
function printRecordOutputRunEndMessage(runUrl) {
|
|
157
|
-
output.addVerticalSeparator();
|
|
158
|
-
output.note({ title: 'Nx Cloud: Successfully recorded command output' });
|
|
159
|
-
(0, print_message_1.printMessage)(`You can view or share your output by visiting ${runUrl}`);
|
|
160
|
-
}
|
|
161
|
-
// Everything from here down is ripped from the nx package
|
|
162
|
-
// You probably don't want to adjust this manually
|
|
163
|
-
/**
|
|
164
|
-
* https://github.com/nrwl/nx/blob/master/packages/nx/src/tasks-runner/forked-process-task-runner.ts
|
|
165
|
-
*
|
|
166
|
-
* @param signal
|
|
167
|
-
*/
|
|
168
|
-
function signalToCode(signal) {
|
|
169
|
-
if (signal === 'SIGHUP')
|
|
170
|
-
return 128 + 1;
|
|
171
|
-
if (signal === 'SIGINT')
|
|
172
|
-
return 128 + 2;
|
|
173
|
-
if (signal === 'SIGTERM')
|
|
174
|
-
return 128 + 15;
|
|
175
|
-
return 128;
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=record-output.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record-output.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/record-output.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,6DAKqC;AAErC,iDAG+B;AAC/B,+BAAiC;AACjC,+BAA4B;AAE5B,4EAAwE;AACxE,iEAA6D;AAC7D,0GAAqG;AAErG,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAYxE,MAAM,6BAA6B,GAAG,MAAO,CAAC;AAE9C,SAAsB,yBAAyB;;QAC7C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,IAAA,8BAAsB,EAAC,iBAAiB,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,IAAI,mDAAuB,CAAC,iBAAiB,CAAC,CAAC;QAC9D,MAAM,gBAAgB,GAAG,IAAI,oCAAgB,CAC3C,iBAAiB,CAAC,gBAAgB,CACnC,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,uBAAS,GAAE,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;QAE/B,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9D,MAAM,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC;QAEtD,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,MAAM,gCAAgC,CAC3E,WAAW,EACX,QAAQ,CACT,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAEzC,MAAM,wBAAwB,GAA6B;YACzD,UAAU;YACV,cAAc;YACd,w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c;IAClC,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,GAAG,GAAG,CAAC,CAAC;IACxC,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,GAAG,GAAG,CAAC,CAAC;IACxC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,GAAG,GAAG,EAAE,CAAC;IAC1C,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function startCiRun(): Promise<void>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.startCiRun = void 0;
|
|
13
|
-
const stripJsonComments = require("strip-json-comments");
|
|
14
|
-
const environment_1 = require("../../utilities/environment");
|
|
15
|
-
const print_run_group_error_1 = require("../error/print-run-group-error");
|
|
16
|
-
const run_group_api_1 = require("../api/run-group.api");
|
|
17
|
-
const fs_1 = require("fs");
|
|
18
|
-
const yargsParser = require("yargs-parser");
|
|
19
|
-
const distributed_task_execution_detection_1 = require("../../utilities/distributed-task-execution-detection");
|
|
20
|
-
const { output, workspaceRoot } = require('../../utilities/nx-imports');
|
|
21
|
-
const args = yargsParser(process.argv, {
|
|
22
|
-
boolean: ['stop-agents-on-failure', 'use-dte-by-default'],
|
|
23
|
-
number: ['agent-count', 'command-count'],
|
|
24
|
-
string: ['stop-agents-after'],
|
|
25
|
-
default: {
|
|
26
|
-
useDteByDefault: true,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
function startCiRun() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const branch = (0, environment_1.getBranch)();
|
|
32
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
33
|
-
if (!runGroup) {
|
|
34
|
-
(0, print_run_group_error_1.printRunGroupError)();
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
38
|
-
output.note({
|
|
39
|
-
title: `Creating run group ${runGroup}`,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (args.agentCount) {
|
|
43
|
-
// TODO: vsavkin: warn here once we finalize our batching strategy
|
|
44
|
-
}
|
|
45
|
-
if (args.commandCount) {
|
|
46
|
-
output.error({
|
|
47
|
-
title: `--command-count is deprecated. Use --stop-agents-after instead.`,
|
|
48
|
-
bodyLines: [`E.g., npx nx-cloud start-ci-run --stop-agents-after="e2e"`],
|
|
49
|
-
});
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)(`${workspaceRoot}/nx.json`).toString())).tasksRunnerOptions.default.options;
|
|
53
|
-
const api = new run_group_api_1.RunGroupApi(options);
|
|
54
|
-
yield api.createRunGroup(branch, runGroup, args.stopAgentsOnFailure, args.agentCount, args.stopAgentsAfter);
|
|
55
|
-
if (args.useDteByDefault) {
|
|
56
|
-
(0, distributed_task_execution_detection_1.storeDteMarker)();
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.startCiRun = startCiRun;
|
|
61
|
-
//# sourceMappingURL=start-ci-run.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start-ci-run.js","sourceRoot":"","sources":["../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Aa,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,MAAM,GAAG,CAAC,cAAc,CACtB,MAAM,EACN,QAAQ,EACR,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,eAAe,CACrB,CAAC;QAEF,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAA,qDAAc,GAAE,CAAC;SAClB;IACH,CAAC;CAAA;AA3CD,gCA2CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function stopAllAgents(): Promise<void>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.stopAllAgents = void 0;
|
|
13
|
-
const stripJsonComments = require("strip-json-comments");
|
|
14
|
-
const environment_1 = require("../../utilities/environment");
|
|
15
|
-
const print_run_group_error_1 = require("../error/print-run-group-error");
|
|
16
|
-
const run_group_api_1 = require("../api/run-group.api");
|
|
17
|
-
const fs_1 = require("fs");
|
|
18
|
-
const { output } = require('../../utilities/nx-imports');
|
|
19
|
-
function stopAllAgents() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const runGroup = (0, environment_1.getRunGroup)();
|
|
22
|
-
if (!runGroup) {
|
|
23
|
-
(0, print_run_group_error_1.printRunGroupError)();
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
if (environment_1.VERBOSE_LOGGING) {
|
|
27
|
-
output.note({
|
|
28
|
-
title: `Stopping all agents running tasks for run group ${runGroup}`,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
const options = JSON.parse(stripJsonComments((0, fs_1.readFileSync)('nx.json').toString())).tasksRunnerOptions.default.options;
|
|
32
|
-
const api = new run_group_api_1.RunGroupApi(options);
|
|
33
|
-
yield api.completeRunGroup(runGroup);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
exports.stopAllAgents = stopAllAgents;
|
|
37
|
-
//# sourceMappingURL=stop-all-agents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stop-all-agents.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/stop-all-agents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyD;AACzD,6DAA2E;AAC3E,0EAAoE;AACpE,wDAAmD;AACnD,2BAAkC;AAClC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,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,MAAM,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function uploadAndShowRunDetails(): Promise<void>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.uploadAndShowRunDetails = void 0;
|
|
13
|
-
const environment_1 = require("../../utilities/environment");
|
|
14
|
-
const cloud_run_api_1 = require("../runners/cloud-enabled/cloud-run.api");
|
|
15
|
-
const message_reporter_1 = require("../terminal-output/message-reporter");
|
|
16
|
-
const fs_1 = require("fs");
|
|
17
|
-
const path_1 = require("path");
|
|
18
|
-
const id_generator_1 = require("../runners/cloud-enabled/id-generator");
|
|
19
|
-
const open = require("open");
|
|
20
|
-
const read_task_terminal_output_1 = require("../terminal-output/read-task-terminal-output");
|
|
21
|
-
const output_obfuscator_1 = require("../terminal-output/output-obfuscator");
|
|
22
|
-
const { workspaceRoot, output } = require('../../utilities/nx-imports');
|
|
23
|
-
function uploadRunDetails(options) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const errors = new message_reporter_1.MessageReporter(options);
|
|
26
|
-
const runContext = {};
|
|
27
|
-
const machineInfo = (0, environment_1.getMachineInfo)(options);
|
|
28
|
-
const api = new cloud_run_api_1.CloudRunApi(errors, runContext, options, machineInfo);
|
|
29
|
-
const directory = (0, environment_1.getNxCacheDirectory)(options);
|
|
30
|
-
const outputObfusactor = new output_obfuscator_1.OutputObfuscator(options.maskedProperties);
|
|
31
|
-
const runInfo = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(directory, 'run.json')).toString());
|
|
32
|
-
// we need to connect to cloud if not connected yet
|
|
33
|
-
const tasks = runInfo.tasks.map((t) => (Object.assign(Object.assign({}, t), { terminalOutput: (0, read_task_terminal_output_1.readTaskTerminalOutput)(directory, outputObfusactor, t.hash, t.cacheStatus, t.status) })));
|
|
34
|
-
const linkId = (0, id_generator_1.generateUniqueLinkId)();
|
|
35
|
-
yield api.endRun(runInfo.run, tasks, linkId);
|
|
36
|
-
return `${options.url || 'https://nx.app'}/runs/${linkId}`;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function uploadAndShowRunDetails() {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const options = readOptions();
|
|
42
|
-
const url = yield uploadRunDetails(options);
|
|
43
|
-
output.success({
|
|
44
|
-
title: 'Successfully uploaded the run details',
|
|
45
|
-
bodyLines: [`View run details at ${url}`],
|
|
46
|
-
});
|
|
47
|
-
open(url);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
exports.uploadAndShowRunDetails = uploadAndShowRunDetails;
|
|
51
|
-
function readOptions() {
|
|
52
|
-
var _a, _b, _c;
|
|
53
|
-
try {
|
|
54
|
-
return (_c = (_b = (_a = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(workspaceRoot, 'nx.json')).toString())) === null || _a === void 0 ? void 0 : _a.tasksRunnerOptions) === null || _b === void 0 ? void 0 : _b.default) === null || _c === void 0 ? void 0 : _c.options;
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=upload-and-show-run-details.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-and-show-run-details.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/commands/upload-and-show-run-details.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAGqC;AACrC,0EAAqE;AACrE,0EAAsE;AACtE,2BAAkC;AAClC,+BAA4B;AAC5B,wEAA6E;AAC7E,6BAA6B;AAC7B,4FAAsF;AACtF,4EAAwE;AAExE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAExE,SAAe,gBAAgB,CAAC,OAAY;;QAC1C,MAAM,MAAM,GAAG,IAAI,kCAAe,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,UAAU,GAAG,EAAS,CAAC;QAC7B,MAAM,WAAW,GAAG,IAAA,4BAAc,EAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,GAAG,GAAG,IAAI,2BAAW,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAEtE,MAAM,SAAS,GAAG,IAAA,iCAAmB,EAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,gBAAgB,GAAG,IAAI,oCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAExE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CACrD,CAAC;QAEF,mDAAmD;QACnD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAClC,CAAC,KACJ,cAAc,EAAE,IAAA,kDAAsB,EACpC,SAAS,EACT,gBAAgB,EAChB,CAAC,CAAC,IAAI,EACN,CAAC,CAAC,WAAW,EACb,CAAC,CAAC,MAAM,CACT,IACD,CAAC,CAAC;QAEJ,MAAM,MAAM,GAAG,IAAA,mCAAoB,GAAE,CAAC;QACtC,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC7C,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI,gBAAgB,SAAS,MAAM,EAAE,CAAC;IAC7D,CAAC;CAAA;AAED,SAAsB,uBAAuB;;QAC3C,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC;YACb,KAAK,EAAE,uCAAuC;YAC9C,SAAS,EAAE,CAAC,uBAAuB,GAAG,EAAE,CAAC;SAC1C,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC;CAAA;AARD,0DAQC;AAED,SAAS,WAAW;;IAClB,IAAI;QACF,OAAO,MAAA,MAAA,MAAA,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,0CACtE,kBAAkB,0CAAE,OAAO,0CAAE,OAAO,CAAC;KAC1C;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAC;KACX;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function printInvalidRunnerError(): void;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.printInvalidRunnerError = void 0;
|
|
4
|
-
const { output } = require('../../utilities/nx-imports');
|
|
5
|
-
function printInvalidRunnerError() {
|
|
6
|
-
output.error({
|
|
7
|
-
title: `Invalid Task Runner Configuration`,
|
|
8
|
-
bodyLines: [
|
|
9
|
-
'To use Distributed Task Execution, your default task runner configuration must',
|
|
10
|
-
'use the "@nrwl/nx-cloud" task runner.',
|
|
11
|
-
'',
|
|
12
|
-
'This can be adjusted in "nx.json".',
|
|
13
|
-
],
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
exports.printInvalidRunnerError = printInvalidRunnerError;
|
|
17
|
-
//# sourceMappingURL=print-invalid-runner-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print-invalid-runner-error.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/error/print-invalid-runner-error.ts"],"names":[],"mappings":";;;AAAA,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,SAAgB,uBAAuB;IACrC,MAAM,CAAC,KAAK,CAAC;QACX,KAAK,EAAE,mCAAmC;QAC1C,SAAS,EAAE;YACT,gFAAgF;YAChF,uCAAuC;YACvC,EAAE;YACF,oCAAoC;SACrC;KACF,CAAC,CAAC;AACL,CAAC;AAVD,0DAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function printRunGroupError(): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.printRunGroupError = void 0;
|
|
4
|
-
const { output } = require('../../utilities/nx-imports');
|
|
5
|
-
function printRunGroupError() {
|
|
6
|
-
output.error({
|
|
7
|
-
title: `Unable to determine NX_RUN_GROUP`,
|
|
8
|
-
bodyLines: [
|
|
9
|
-
'- Agents run tasks for a given run group (which often corresponds to a run in CI).',
|
|
10
|
-
"- Nx tried to determine the run group automatically but wasn't able to do it.",
|
|
11
|
-
'- Use the NX_RUN_GROUP env variable to set the run group manually.',
|
|
12
|
-
],
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
exports.printRunGroupError = printRunGroupError;
|
|
16
|
-
//# sourceMappingURL=print-run-group-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print-run-group-error.js","sourceRoot":"","sources":["../../../../../../../libs/nx-packages/nx-cloud/lib/core/error/print-run-group-error.ts"],"names":[],"mappings":";;;AAAA,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEzD,SAAgB,kBAAkB;IAChC,MAAM,CAAC,KAAK,CAAC;QACX,KAAK,EAAE,kCAAkC;QACzC,SAAS,EAAE;YACT,oFAAoF;YACpF,+EAA+E;YAC/E,oEAAoE;SACrE;KACF,CAAC,CAAC;AACL,CAAC;AATD,gDASC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export declare class E2EEncryption {
|
|
3
|
-
encryptionKey: Buffer | undefined;
|
|
4
|
-
constructor(key: string | undefined);
|
|
5
|
-
private to32bytes;
|
|
6
|
-
hasEncryption(): boolean;
|
|
7
|
-
encryptFile(file: string): void;
|
|
8
|
-
decryptFile(file: string): void;
|
|
9
|
-
}
|