@nrwl/nx-cloud 14.0.6 → 14.0.7
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/lib/core/api/error-reporter.api.js +1 -1
- package/lib/core/api/run-group.api.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled-life-cycle.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-enabled.runner.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-remote-cache.js +1 -1
- package/lib/core/runners/cloud-enabled/cloud-run.api.js +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.api.js +1 -1
- package/lib/core/runners/distributed-agent/distributed-agent.impl.js +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.api.js +1 -1
- package/lib/core/runners/distributed-execution/distributed-execution.runner.js +1 -1
- package/lib/utilities/nx-imports.js +1 -1
- package/lib/utilities/nx-imports.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x1c06=['Unable\x20to\x20record\x20the\x20following\x20error:\x20\x27','then','reportError','createApiAxiosInstance','message','ErrorReporterApi','__awaiter','done','__esModule','throw','axiosMultipleTries','apiAxiosInstance','value'];(function(_0x57811d,_0x1c06f9){const _0x1a2ca0=function(_0x5308d0){while(--_0x5308d0){_0x57811d['push'](_0x57811d['shift']());}};_0x1a2ca0(++_0x1c06f9);}(a0_0x1c06,0x1d3));const a0_0x1a2c=function(_0x57811d,_0x1c06f9){_0x57811d=_0x57811d-0x0;let _0x1a2ca0=a0_0x1c06[_0x57811d];return _0x1a2ca0;};'use strict';var __awaiter=this&&this[a0_0x1a2c('0x7')]||function(_0x5b47aa,_0x1a032b,_0x58ea04,_0x4873ad){function _0x21ce09(_0x554b0e){return _0x554b0e instanceof _0x58ea04?_0x554b0e:new _0x58ea04(function(_0x4a4ac3){_0x4a4ac3(_0x554b0e);});}return new(_0x58ea04||(_0x58ea04=Promise))(function(_0x3fe23d,_0x29f1d6){function _0x14ed77(_0x3e39fe){try{_0xe5ba3c(_0x4873ad['next'](_0x3e39fe));}catch(_0x30e29f){_0x29f1d6(_0x30e29f);}}function _0x1d2d0c(_0x4e7fe8){try{_0xe5ba3c(_0x4873ad[a0_0x1a2c('0xa')](_0x4e7fe8));}catch(_0x26ccc8){_0x29f1d6(_0x26ccc8);}}function _0xe5ba3c(_0xad764c){_0xad764c[a0_0x1a2c('0x8')]?_0x3fe23d(_0xad764c[a0_0x1a2c('0x0')]):_0x21ce09(_0xad764c[a0_0x1a2c('0x0')])[a0_0x1a2c('0x2')](_0x14ed77,_0x1d2d0c);}_0xe5ba3c((_0x4873ad=_0x4873ad['apply'](_0x5b47aa,_0x1a032b||[]))['next']());});};Object['defineProperty'](exports,a0_0x1a2c('0x9'),{'value':!![]});exports[a0_0x1a2c('0x6')]=void 0x0;const axios_1=require('../../utilities/axios');const {output}=require('../../utilities/nx-imports');class ErrorReporterApi{constructor(_0x28eb4a){this[a0_0x1a2c('0xc')]=(0x0,axios_1[a0_0x1a2c('0x4')])(_0x28eb4a);}[a0_0x1a2c('0x3')](_0x1baf19){return __awaiter(this,void 0x0,void 0x0,function*(){try{yield(0x0,axios_1[a0_0x1a2c('0xb')])(()=>this[a0_0x1a2c('0xc')]['post']('/nx-cloud/report-client-error',{'message':_0x1baf19}));}catch(_0x36ac06){output['warn']({'title':a0_0x1a2c('0x1')+_0x1baf19+'\x27','bodyLines':[_0x36ac06[a0_0x1a2c('0x5')]]});}});}}exports[a0_0x1a2c('0x6')]=ErrorReporterApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0xa0cf=['completeRunGroup','/nx-cloud/executions/complete-run-group','response','__esModule','defineProperty','RunGroupApi','apply','RUNNER_FAILURE_PERF_ENTRY','createMetricRecorder','__awaiter','createApiAxiosInstance','recordMetric','value','next','../../utilities/metric-logger','throw','createRunGroup','error','then','axiosMultipleTries','apiAxiosInstance','axiosException','exit','message','../../utilities/axios','post','mapRespToPerfEntry'];(function(_0x2977bc,_0xa0cfbd){const _0x27259b=function(_0x141d8e){while(--_0x141d8e){_0x2977bc['push'](_0x2977bc['shift']());}};_0x27259b(++_0xa0cfbd);}(a1_0xa0cf,0x112));const a1_0x2725=function(_0x2977bc,_0xa0cfbd){_0x2977bc=_0x2977bc-0x0;let _0x27259b=a1_0xa0cf[_0x2977bc];return _0x27259b;};'use strict';var __awaiter=this&&this[a1_0x2725('0x5')]||function(_0x150702,_0x56c26d,_0x4de7dd,_0x515379){function _0xc80b21(_0x223f86){return _0x223f86 instanceof _0x4de7dd?_0x223f86:new _0x4de7dd(function(_0x487edb){_0x487edb(_0x223f86);});}return new(_0x4de7dd||(_0x4de7dd=Promise))(function(_0x5a8ff0,_0x3b193b){function _0x55c175(_0x2f00dc){try{_0x486a79(_0x515379[a1_0x2725('0x9')](_0x2f00dc));}catch(_0x4681f9){_0x3b193b(_0x4681f9);}}function _0x368843(_0xf57fc6){try{_0x486a79(_0x515379[a1_0x2725('0xb')](_0xf57fc6));}catch(_0x26ce58){_0x3b193b(_0x26ce58);}}function _0x486a79(_0x52d475){_0x52d475['done']?_0x5a8ff0(_0x52d475[a1_0x2725('0x8')]):_0xc80b21(_0x52d475[a1_0x2725('0x8')])[a1_0x2725('0xe')](_0x55c175,_0x368843);}_0x486a79((_0x515379=_0x515379[a1_0x2725('0x2')](_0x150702,_0x56c26d||[]))['next']());});};Object[a1_0x2725('0x0')](exports,a1_0x2725('0x1a'),{'value':!![]});exports[a1_0x2725('0x1')]=void 0x0;const axios_1=require(a1_0x2725('0x14'));const metric_logger_1=require(a1_0x2725('0xa'));const {output}=require('../../utilities/nx-imports');class RunGroupApi{constructor(_0x5d665f){this[a1_0x2725('0x10')]=(0x0,axios_1[a1_0x2725('0x6')])(_0x5d665f);}['createRunGroup'](_0x1750bd,_0x289787){var _0x36951d;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5ad673=(0x0,metric_logger_1[a1_0x2725('0x4')])(a1_0x2725('0xc'));try{const _0x19ae00=yield(0x0,axios_1[a1_0x2725('0xf')])(()=>this['apiAxiosInstance'][a1_0x2725('0x15')]('/nx-cloud/executions/create-run-group',{'branch':_0x1750bd,'runGroup':_0x289787}));_0x5ad673[a1_0x2725('0x7')]((0x0,metric_logger_1[a1_0x2725('0x16')])(_0x19ae00));}catch(_0x85c8d5){_0x5ad673['recordMetric'](((_0x36951d=_0x85c8d5===null||_0x85c8d5===void 0x0?void 0x0:_0x85c8d5['axiosException'])===null||_0x36951d===void 0x0?void 0x0:_0x36951d[a1_0x2725('0x19')])?(0x0,metric_logger_1[a1_0x2725('0x16')])(_0x85c8d5['axiosException'][a1_0x2725('0x19')]):metric_logger_1[a1_0x2725('0x3')]);output[a1_0x2725('0xd')]({'title':_0x85c8d5['message']});process[a1_0x2725('0x12')](0x1);}});}[a1_0x2725('0x17')](_0x1a8d89){var _0x17a6a3;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x60a10b=(0x0,metric_logger_1[a1_0x2725('0x4')])(a1_0x2725('0xc'));try{const _0x2e7a67=yield(0x0,axios_1[a1_0x2725('0xf')])(()=>this[a1_0x2725('0x10')][a1_0x2725('0x15')](a1_0x2725('0x18'),{'runGroup':_0x1a8d89}));_0x60a10b[a1_0x2725('0x7')]((0x0,metric_logger_1[a1_0x2725('0x16')])(_0x2e7a67));}catch(_0x393a4d){_0x60a10b['recordMetric'](((_0x17a6a3=_0x393a4d===null||_0x393a4d===void 0x0?void 0x0:_0x393a4d[a1_0x2725('0x11')])===null||_0x17a6a3===void 0x0?void 0x0:_0x17a6a3['response'])?(0x0,metric_logger_1[a1_0x2725('0x16')])(_0x393a4d[a1_0x2725('0x11')][a1_0x2725('0x19')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);output[a1_0x2725('0xd')]({'title':_0x393a4d[a1_0x2725('0x13')]});process[a1_0x2725('0x12')](0x1);}});}}exports[a1_0x2725('0x1')]=RunGroupApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x5301=['updateStartedTask','scheduleTask','outputObfuscator','remote-cache','runContext','toISOString','endTime','.cache','getTerminalOutput','hash','find','status','NX_CLOUD_UNLIMITED_OUTPUT','cacheableOperations','hashDetails','defineProperty','local-cache-hit','cacheStatus','params','project','readTerminalOutputFile','path','task','indexOf','endTask','statuses','terminalOutputs','keys','nodes','remote-cache-hit','local-cache-kept-existing','assign','target','Cannot\x20find\x20task\x20','startsWith','scheduledTasks','length','cacheDirectory','readFileSync','collectTerminalOutput','node_modules','cleanUpHashDetails','configuration','filter','MAX_CHARACTERS_CACHED_TASK','MAX_CHARACTERS_SUCCESSFUL_TASK','MAX_CHARACTERS_FAILED_TASK','forEach','obfuscate','taskId','endCommand','tasks','npm:','join','skipNxCache','startTask','../../../utilities/environment','CloudEnabledLifeCycle','local-cache','cache-miss','../../../utilities/nx-imports','endTasks','terminalOutput'];(function(_0x4e5950,_0x53016c){const _0x46b805=function(_0x8c9dd7){while(--_0x8c9dd7){_0x4e5950['push'](_0x4e5950['shift']());}};_0x46b805(++_0x53016c);}(a0_0x5301,0x1ad));const a0_0x46b8=function(_0x4e5950,_0x53016c){_0x4e5950=_0x4e5950-0x0;let _0x46b805=a0_0x5301[_0x4e5950];return _0x46b805;};'use strict';Object[a0_0x46b8('0x1b')](exports,'__esModule',{'value':!![]});exports['CloudEnabledLifeCycle']=void 0x0;const path=require(a0_0x46b8('0x21'));const path_1=require('path');const fs_1=require('fs');const environment_1=require(a0_0x46b8('0x5'));const {workspaceRoot,unparse}=require(a0_0x46b8('0x9'));class CloudEnabledLifeCycle{constructor(_0x4846a7,_0x4e8c6a,_0x3d93eb,_0x5c2a03,_0x3933ff,_0xd4d1b8,_0x291de7){this[a0_0x46b8('0x10')]=_0x4846a7;this[a0_0x46b8('0x31')]=_0x4e8c6a;this[a0_0x46b8('0x3')]=_0x3d93eb;this['collectTerminalOutput']=_0x5c2a03;this[a0_0x46b8('0x19')]=_0x3933ff;this['outputObfuscator']=_0xd4d1b8;this['tasks']=_0x291de7;}[a0_0x46b8('0xd')](_0x326f37){this[a0_0x46b8('0x10')][a0_0x46b8('0x2f')]['push'](_0x326f37);}[a0_0x46b8('0x4')](_0x47d4d0){const _0x1a6a56=Object[a0_0x46b8('0x2b')]({},_0x47d4d0['overrides']||{});if(_0x47d4d0['target']['configuration']){_0x1a6a56[a0_0x46b8('0x36')]=_0x47d4d0[a0_0x46b8('0x2c')]['configuration'];}this[a0_0x46b8('0x0')]['push']({'taskId':_0x47d4d0['id'],'startTime':new Date()[a0_0x46b8('0x11')](),'target':_0x47d4d0['target'][a0_0x46b8('0x2c')],'projectName':_0x47d4d0['target'][a0_0x46b8('0x1f')],'hash':_0x47d4d0[a0_0x46b8('0x15')],'hashDetails':this[a0_0x46b8('0x35')](_0x47d4d0[a0_0x46b8('0x1a')]),'params':unparse(_0x1a6a56)['join']('\x20')});}[a0_0x46b8('0x24')](_0x1ecf7b,_0x32b873){let _0x55a2e7;if(this[a0_0x46b8('0x10')][a0_0x46b8('0x25')][_0x1ecf7b[a0_0x46b8('0x15')]]){_0x55a2e7=this[a0_0x46b8('0x10')][a0_0x46b8('0x25')][_0x1ecf7b['hash']];}else{if(this[a0_0x46b8('0x19')][a0_0x46b8('0x23')](_0x1ecf7b['target'][a0_0x46b8('0x2c')])>-0x1&&!this[a0_0x46b8('0x3')]){_0x55a2e7=a0_0x46b8('0x1c');}else{_0x55a2e7=a0_0x46b8('0x8');}}this[a0_0x46b8('0xc')](_0x1ecf7b,_0x32b873,_0x55a2e7);}[a0_0x46b8('0xa')](_0x1bff5d){for(let _0x594809 of _0x1bff5d){const _0x1d0c2f=_0x594809[a0_0x46b8('0x17')]===a0_0x46b8('0xf')?a0_0x46b8('0x29'):_0x594809[a0_0x46b8('0x17')]===a0_0x46b8('0x7')||_0x594809[a0_0x46b8('0x17')]===a0_0x46b8('0x2a')?'local-cache-hit':a0_0x46b8('0x8');this[a0_0x46b8('0xc')](_0x594809[a0_0x46b8('0x22')],_0x594809['code'],_0x1d0c2f);}}[a0_0x46b8('0x3e')](){}[a0_0x46b8('0xc')](_0x3da63b,_0x507ee7,_0xcbe921){const _0x416417=this['tasks'][a0_0x46b8('0x16')](_0x2e1e75=>_0x2e1e75[a0_0x46b8('0x3d')]===_0x3da63b['id']);if(!_0x416417){throw new Error(a0_0x46b8('0x2d')+_0x3da63b['id']);}_0x416417[a0_0x46b8('0x12')]=new Date()[a0_0x46b8('0x11')]();_0x416417['status']=_0x507ee7;_0x416417[a0_0x46b8('0x1e')]=this[a0_0x46b8('0xe')]['obfuscate'](_0x416417[a0_0x46b8('0x1e')]);_0x416417[a0_0x46b8('0x1d')]=_0xcbe921;if(this[a0_0x46b8('0x33')]){_0x416417['terminalOutput']=this[a0_0x46b8('0x14')](_0x3da63b[a0_0x46b8('0x15')],_0x416417[a0_0x46b8('0x1d')],_0x507ee7);}}[a0_0x46b8('0x14')](_0x245b9b,_0x14176f,_0x1c3b98){let _0xeef764;if(this[a0_0x46b8('0x31')]){if(this[a0_0x46b8('0x31')][a0_0x46b8('0x2e')]('./')){_0xeef764=(0x0,path_1['join'])(workspaceRoot,this[a0_0x46b8('0x31')]);}else{_0xeef764=this[a0_0x46b8('0x31')];}}else{_0xeef764=(0x0,path_1[a0_0x46b8('0x2')])(workspaceRoot,a0_0x46b8('0x34'),a0_0x46b8('0x13'),'nx');}try{const _0x1c4bef=this[a0_0x46b8('0x20')](_0xeef764,_0x245b9b);const _0x2c1a0c=this[a0_0x46b8('0xe')][a0_0x46b8('0x3c')](_0x1c4bef);if(environment_1[a0_0x46b8('0x18')])return _0x2c1a0c;const _0x4cef22=_0x14176f===a0_0x46b8('0x8')?_0x1c3b98===0x0?CloudEnabledLifeCycle[a0_0x46b8('0x39')]:CloudEnabledLifeCycle[a0_0x46b8('0x3a')]:CloudEnabledLifeCycle['MAX_CHARACTERS_CACHED_TASK'];return _0x2c1a0c[a0_0x46b8('0x30')]>_0x4cef22?'TRUNCATED\x0a\x0a'+_0x2c1a0c['slice'](_0x2c1a0c[a0_0x46b8('0x30')]-_0x4cef22):_0x2c1a0c;}catch(_0x347f65){return'';}}[a0_0x46b8('0x35')](_0x4615eb){const _0x273869={};Object[a0_0x46b8('0x27')](_0x4615eb[a0_0x46b8('0x28')])[a0_0x46b8('0x37')](_0x46a0c7=>!_0x46a0c7[a0_0x46b8('0x2e')](a0_0x46b8('0x1')))[a0_0x46b8('0x3b')](_0x3b57b5=>{_0x273869[_0x3b57b5]=_0x4615eb['nodes'][_0x3b57b5];});return{'nodes':_0x273869,'runtime':_0x4615eb['runtime'],'implicitDeps':_0x4615eb['implicitDeps']};}[a0_0x46b8('0x20')](_0x270129,_0xa64961){try{return(0x0,fs_1[a0_0x46b8('0x32')])(path['join'](_0x270129,a0_0x46b8('0x26'),_0xa64961))['toString']();}catch(_0x40ce77){try{return(0x0,fs_1[a0_0x46b8('0x32')])(path[a0_0x46b8('0x2')](_0x270129,_0xa64961,a0_0x46b8('0xb')))['toString']();}catch(_0x86c24){return'';}}}}exports[a0_0x46b8('0x6')]=CloudEnabledLifeCycle;CloudEnabledLifeCycle['MAX_CHARACTERS_FAILED_TASK']=0x30d40;CloudEnabledLifeCycle[a0_0x46b8('0x39')]=0x4e20;CloudEnabledLifeCycle[a0_0x46b8('0x38')]=0x4e20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x4aea=['complete','filter','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','../../file-storage/e2e-encryption','encryptionKey','note','waitForStoreRequestsToComplete','cacheDirectory','printCacheHitsMessage','./cloud-run.api','cloudEnabledTasksRunner','toISOString','map','writeFileSync','printMessages','__awaiter','subscribe','done','stringify','ENCRYPTION_KEY','lifeCycle','value','hash','all','E2EEncryption','throw','../../terminal-output/output-obfuscator','../../../utilities/environment','next','../../terminal-output/message-reporter','defineProperty','anyErrors','skipNxCache','../../../utilities/nx-imports','ErrorReporterApi','Executed\x20tasks\x20with\x20hashes:\x20','OutputObfuscator','assign','cacheableOperations','maskedProperties','getBranch','../../api/error-reporter.api','../../../utilities/metric-logger','error','exit','path','./node_modules/.cache/nx','./cloud-remote-cache','../../terminal-output/end-of-run-message','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','Agent\x20wasn\x27t\x20able\x20to\x20record\x20its\x20run','MessageReporter','forEach','tasks-hashes-','CloudRunApi','join','__esModule','EndOfRunMessage','CloudEnabledLifeCycle','./cloud-enabled-life-cycle','parseCommand','catch','scan','obfuscate','taskId','rxjs/internal/Subject'];(function(_0x1765d8,_0x4aea3b){const _0xeffc4e=function(_0x22521b){while(--_0x22521b){_0x1765d8['push'](_0x1765d8['shift']());}};_0xeffc4e(++_0x4aea3b);}(a1_0x4aea,0xc6));const a1_0xeffc=function(_0x1765d8,_0x4aea3b){_0x1765d8=_0x1765d8-0x0;let _0xeffc4e=a1_0x4aea[_0x1765d8];return _0xeffc4e;};'use strict';var __awaiter=this&&this[a1_0xeffc('0xf')]||function(_0x3a3289,_0x2acf9e,_0x54682b,_0x422987){function _0x5daab2(_0x20ffb1){return _0x20ffb1 instanceof _0x54682b?_0x20ffb1:new _0x54682b(function(_0x295b00){_0x295b00(_0x20ffb1);});}return new(_0x54682b||(_0x54682b=Promise))(function(_0x1348a8,_0x20207){function _0xdbc13d(_0x935b31){try{_0x18391b(_0x422987[a1_0xeffc('0x1c')](_0x935b31));}catch(_0x51535d){_0x20207(_0x51535d);}}function _0x1c99d0(_0xee72f6){try{_0x18391b(_0x422987[a1_0xeffc('0x19')](_0xee72f6));}catch(_0x2d4711){_0x20207(_0x2d4711);}}function _0x18391b(_0x9f5916){_0x9f5916[a1_0xeffc('0x11')]?_0x1348a8(_0x9f5916[a1_0xeffc('0x15')]):_0x5daab2(_0x9f5916[a1_0xeffc('0x15')])['then'](_0xdbc13d,_0x1c99d0);}_0x18391b((_0x422987=_0x422987['apply'](_0x3a3289,_0x2acf9e||[]))[a1_0xeffc('0x1c')]());});};Object[a1_0xeffc('0x1e')](exports,a1_0xeffc('0x38'),{'value':!![]});exports[a1_0xeffc('0xa')]=void 0x0;const message_reporter_1=require(a1_0xeffc('0x1d'));const end_of_run_message_1=require(a1_0xeffc('0x30'));const output_obfuscator_1=require(a1_0xeffc('0x1a'));const cloud_enabled_life_cycle_1=require(a1_0xeffc('0x3b'));const file_storage_1=require('../../file-storage/file-storage');const e2e_encryption_1=require(a1_0xeffc('0x3'));const environment_1=require(a1_0xeffc('0x1b'));const cloud_remote_cache_1=require(a1_0xeffc('0x2f'));const cloud_run_api_1=require(a1_0xeffc('0x9'));const fs_1=require('fs');const path=require(a1_0xeffc('0x2d'));const metric_logger_1=require(a1_0xeffc('0x2a'));const error_reporter_api_1=require(a1_0xeffc('0x29'));const {tasksRunner,output}=require(a1_0xeffc('0x21'));function createApi(_0x2138e9,_0x30e247,_0x47c1d6){const _0x23b9dd=(0x0,environment_1['getMachineInfo'])(_0x30e247);return new cloud_run_api_1[(a1_0xeffc('0x36'))](_0x2138e9,_0x47c1d6,_0x30e247,_0x23b9dd);}function storeTaskHashes(_0x200feb,_0x5f534a,_0xccce7d){const _0x5be0be=JSON[a1_0xeffc('0x12')](_0x200feb[a1_0xeffc('0xc')](_0x2888dc=>({'taskId':_0x2888dc[a1_0xeffc('0x40')],'hash':_0x2888dc[a1_0xeffc('0x16')]})));if(environment_1['VERBOSE_LOGGING']){output[a1_0xeffc('0x5')]({'title':a1_0xeffc('0x23')+_0x5be0be});}(0x0,fs_1[a1_0xeffc('0xd')])(path[a1_0xeffc('0x37')](_0x5f534a,a1_0xeffc('0x35')+_0xccce7d),_0x5be0be);}function onComplete(_0x2cd96f,_0x5a9237,_0x5d9544,_0x205465,_0x5404b7,_0x1f8be5,_0x4d7b26,_0x22836c,_0x3030ae,_0x494af8,_0x4457e0){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x43346a=new Date()[a1_0xeffc('0xb')]();if(environment_1['AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION']){storeTaskHashes(_0x3030ae,_0x5a9237[a1_0xeffc('0x7')]||a1_0xeffc('0x2e'),environment_1[a1_0xeffc('0x2')]);}const _0x1f1709=(0x0,environment_1[a1_0xeffc('0x28')])();const _0x338b87=yield Promise[a1_0xeffc('0x17')]([_0x5d9544[a1_0xeffc('0x6')](),_0x205465['endRun']({'command':_0x5404b7[a1_0xeffc('0x3f')]((0x0,environment_1[a1_0xeffc('0x3c')])()),'startTime':_0x1f8be5,'endTime':_0x43346a,'distributedExecutionId':environment_1[a1_0xeffc('0x2')],'branch':_0x1f1709,'scan':!![],'runGroup':(0x0,environment_1['getRunGroup'])(),'sha':_0x1f1709?(0x0,environment_1['extractGitSha'])():undefined,'inner':_0x4457e0},_0x3030ae)]);if(_0x494af8){setTimeout(()=>{_0x4d7b26[a1_0xeffc('0xe')]();if(!_0x4d7b26[a1_0xeffc('0x1f')]&&!_0x4457e0){_0x22836c['printCacheHitsMessage']();}},0x0);}else{_0x4d7b26['printMessages']();if(!_0x4d7b26[a1_0xeffc('0x1f')]&&!_0x4457e0){_0x22836c[a1_0xeffc('0x8')]();}}if(environment_1['AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION']){if(!_0x338b87[0x0]){output[a1_0xeffc('0x2b')]({'title':'Agent\x20wasn\x27t\x20able\x20to\x20store\x20artifacts'});_0x4d7b26['printMessages']();process['exit'](environment_1[a1_0xeffc('0x31')]);}if(!_0x338b87[0x1]){output[a1_0xeffc('0x2b')]({'title':a1_0xeffc('0x32')});_0x4d7b26['printMessages']();process[a1_0xeffc('0x2c')](environment_1[a1_0xeffc('0x31')]);}}yield(0x0,metric_logger_1['submitRunMetrics'])(_0x5a9237);});}function createLifeCycle(_0x401704,_0x3bf4ec,_0x5b8466,_0x5cf16e){const _0x492b43=new cloud_enabled_life_cycle_1[(a1_0xeffc('0x3a'))](_0x401704,_0x3bf4ec[a1_0xeffc('0x7')],!!_0x3bf4ec[a1_0xeffc('0x20')],_0x3bf4ec[a1_0xeffc('0x3e')]===undefined?!![]:_0x3bf4ec[a1_0xeffc('0x3e')],_0x3bf4ec[a1_0xeffc('0x26')]||[],_0x5b8466,_0x5cf16e);try{const {CompositeLifeCycle}=require(a1_0xeffc('0x21'));if(!CompositeLifeCycle)return _0x492b43;return new CompositeLifeCycle([_0x3bf4ec[a1_0xeffc('0x14')],_0x492b43]);}catch(_0x5a80cf){return _0x492b43;}}function cloudEnabledTasksRunner(_0x476bba,_0x33ec23,_0x48243b,_0x159759=![]){const _0x50aaa6={'statuses':{},'scheduledTasks':[],'requests':{},'allTasks':_0x476bba};const _0x580a37=_0x33ec23[a1_0xeffc('0x14')]===undefined;const _0x30b710=[];const _0x1f56d9=new message_reporter_1[(a1_0xeffc('0x33'))](_0x33ec23);const _0x29ff52=createApi(_0x1f56d9,_0x33ec23,_0x50aaa6);const _0x47856b=new end_of_run_message_1[(a1_0xeffc('0x39'))](_0x50aaa6,_0x30b710);const _0x875a75=new output_obfuscator_1[(a1_0xeffc('0x24'))](_0x33ec23[a1_0xeffc('0x27')]);const _0x99ec55=_0x476bba[a1_0xeffc('0xc')](_0xa98351=>_0xa98351[a1_0xeffc('0x16')])[a1_0xeffc('0x1')](_0xfdace0=>!!_0xfdace0);const _0x572fa4=_0x29ff52['startRun'](environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],_0x99ec55);_0x99ec55[a1_0xeffc('0x34')](_0x5c4799=>{_0x50aaa6['requests'][_0x5c4799]=_0x572fa4;});const _0x3b9656=new Date()['toISOString']();const _0x8dcb0a=createLifeCycle(_0x50aaa6,_0x33ec23,_0x875a75,_0x30b710);const _0x32c671=new e2e_encryption_1[(a1_0xeffc('0x18'))](environment_1[a1_0xeffc('0x13')]||_0x33ec23[a1_0xeffc('0x4')]);const _0xb37e57=new error_reporter_api_1[(a1_0xeffc('0x22'))](_0x33ec23);const _0x2ed4c7=new file_storage_1['FileStorage'](_0x32c671,_0xb37e57,![]);const _0x17e066=new cloud_remote_cache_1['CloudRemoteCache'](_0x1f56d9,_0x29ff52,_0x50aaa6,_0x2ed4c7);delete process['env']['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'];const _0x3dff61=tasksRunner(_0x476bba,Object[a1_0xeffc('0x25')](Object[a1_0xeffc('0x25')]({},_0x33ec23),{'remoteCache':_0x17e066,'lifeCycle':_0x8dcb0a}),_0x48243b);if(_0x3dff61[a1_0xeffc('0x10')]){const {Subject}=require(a1_0xeffc('0x41'));const _0x36e90e=new Subject();_0x3dff61[a1_0xeffc('0x10')]({'next':_0x3fe9c4=>_0x36e90e[a1_0xeffc('0x1c')](_0x3fe9c4),'error':_0x2d097=>_0x36e90e[a1_0xeffc('0x2b')](_0x2d097),'complete':()=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x8dcb0a,_0x33ec23,_0x17e066,_0x29ff52,_0x875a75,_0x3b9656,_0x1f56d9,_0x47856b,_0x30b710,_0x580a37,_0x159759);_0x36e90e[a1_0xeffc('0x0')]();})});return _0x36e90e;}else{return _0x3dff61['then'](_0x4934a3=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x8dcb0a,_0x33ec23,_0x17e066,_0x29ff52,_0x875a75,_0x3b9656,_0x1f56d9,_0x47856b,_0x30b710,_0x580a37,_0x159759);return _0x4934a3;}))[a1_0xeffc('0x3d')](_0x38add6=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x8dcb0a,_0x33ec23,_0x17e066,_0x29ff52,_0x875a75,_0x3b9656,_0x1f56d9,_0x47856b,_0x30b710,_0x580a37,_0x159759);throw _0x38add6;}));}}exports[a1_0xeffc('0xa')]=cloudEnabledTasksRunner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x5880=['startRun','waitForStoreRequestsToComplete','messages','../../../utilities/environment','apply','Nx\x20Cloud:\x20Cache\x20miss\x20','__esModule','then','cacheError','retrieve','map','put','push','indexOf','fileStorage','CloudRemoteCache','cache-miss','storage','reduce','response','.\x20Read\x20only\x20token\x20is\x20used.','extractErrorMessage','throw','hash','VERBOSE_LOGGING','runContext','store','remote-cache-hit','storeRequests','axiosException','forEach','resolve','requests','note','.\x20Status\x20404.','statuses','hashUrls','value','done','scheduledTasks','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','get','api'];(function(_0x52e8f3,_0x588053){const _0x7bb928=function(_0x553c12){while(--_0x553c12){_0x52e8f3['push'](_0x52e8f3['shift']());}};_0x7bb928(++_0x588053);}(a2_0x5880,0x1c0));const a2_0x7bb9=function(_0x52e8f3,_0x588053){_0x52e8f3=_0x52e8f3-0x0;let _0x7bb928=a2_0x5880[_0x52e8f3];return _0x7bb928;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x316a85,_0x392f59,_0x371a6c,_0x4ed630){function _0x12ff0a(_0x5a6434){return _0x5a6434 instanceof _0x371a6c?_0x5a6434:new _0x371a6c(function(_0x5c779d){_0x5c779d(_0x5a6434);});}return new(_0x371a6c||(_0x371a6c=Promise))(function(_0x58af4e,_0x2058ce){function _0x108949(_0x367727){try{_0x2bd471(_0x4ed630['next'](_0x367727));}catch(_0x314dde){_0x2058ce(_0x314dde);}}function _0x18affb(_0x58bcaa){try{_0x2bd471(_0x4ed630[a2_0x7bb9('0x4')](_0x58bcaa));}catch(_0x3157c3){_0x2058ce(_0x3157c3);}}function _0x2bd471(_0x2c913d){_0x2c913d[a2_0x7bb9('0x14')]?_0x58af4e(_0x2c913d[a2_0x7bb9('0x13')]):_0x12ff0a(_0x2c913d['value'])[a2_0x7bb9('0x20')](_0x108949,_0x18affb);}_0x2bd471((_0x4ed630=_0x4ed630[a2_0x7bb9('0x1d')](_0x316a85,_0x392f59||[]))['next']());});};Object['defineProperty'](exports,a2_0x7bb9('0x1f'),{'value':!![]});exports[a2_0x7bb9('0x28')]=void 0x0;const environment_1=require(a2_0x7bb9('0x1c'));const {output}=require('../../../utilities/nx-imports');class CloudRemoteCache{constructor(_0x4f3d3c,_0xf36d1,_0x3ed61d,_0x47d84a){this[a2_0x7bb9('0x1b')]=_0x4f3d3c;this[a2_0x7bb9('0x18')]=_0xf36d1;this[a2_0x7bb9('0x7')]=_0x3ed61d;this['fileStorage']=_0x47d84a;this['storeRequests']=[];}[a2_0x7bb9('0x22')](_0x330177,_0x5add10){var _0x3dfe26;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a2_0x7bb9('0x1b')][a2_0x7bb9('0x21')])return![];const _0x3b309d=yield this[a2_0x7bb9('0x12')](_0x330177);if(!_0x3b309d||!_0x3b309d[a2_0x7bb9('0x17')]){if(environment_1[a2_0x7bb9('0x6')]){output[a2_0x7bb9('0xf')]({'title':a2_0x7bb9('0x1e')+_0x330177+'.'});}this[a2_0x7bb9('0x7')][a2_0x7bb9('0x11')][_0x330177]=a2_0x7bb9('0x29');return![];}try{yield this[a2_0x7bb9('0x27')][a2_0x7bb9('0x22')](_0x330177,_0x3b309d[a2_0x7bb9('0x17')],_0x5add10);this['runContext'][a2_0x7bb9('0x11')][_0x330177]=a2_0x7bb9('0x9');return!![];}catch(_0x51ee2d){const _0x396e33=(_0x3dfe26=_0x51ee2d['axiosException'])!==null&&_0x3dfe26!==void 0x0?_0x3dfe26:_0x51ee2d;if(_0x396e33[a2_0x7bb9('0x1')]&&_0x396e33[a2_0x7bb9('0x1')]['status']===0x194){if(environment_1[a2_0x7bb9('0x6')]){output[a2_0x7bb9('0xf')]({'title':a2_0x7bb9('0x1e')+_0x330177+a2_0x7bb9('0x10')});}}else{this[a2_0x7bb9('0x1b')][a2_0x7bb9('0x21')]=this['messages'][a2_0x7bb9('0x3')](_0x396e33,a2_0x7bb9('0x2a'));}this[a2_0x7bb9('0x7')][a2_0x7bb9('0x11')][_0x330177]=a2_0x7bb9('0x29');return![];}});}[a2_0x7bb9('0x8')](_0x50bf68,_0x4d0234){return __awaiter(this,void 0x0,void 0x0,function*(){if(this['messages'][a2_0x7bb9('0x21')])return![];const _0x5747ee=Promise[a2_0x7bb9('0xd')]()[a2_0x7bb9('0x20')](()=>__awaiter(this,void 0x0,void 0x0,function*(){var _0x52a812;const _0x105e97=yield this[a2_0x7bb9('0x12')](_0x50bf68);if(!_0x105e97)return![];if(!_0x105e97[a2_0x7bb9('0x24')]){if(environment_1[a2_0x7bb9('0x6')]){output[a2_0x7bb9('0xf')]({'title':'Nx\x20Cloud:\x20Skipping\x20storing\x20'+_0x50bf68+a2_0x7bb9('0x2')});}return!![];}try{yield this[a2_0x7bb9('0x27')][a2_0x7bb9('0x8')](_0x50bf68,_0x105e97['put'],_0x4d0234);return!![];}catch(_0x156ddd){const _0xfbfa3f=(_0x52a812=_0x156ddd[a2_0x7bb9('0xb')])!==null&&_0x52a812!==void 0x0?_0x52a812:_0x156ddd;this[a2_0x7bb9('0x1b')]['cacheError']=this[a2_0x7bb9('0x1b')][a2_0x7bb9('0x3')](_0xfbfa3f,a2_0x7bb9('0x2a'));return![];}}));this['storeRequests'][a2_0x7bb9('0x25')](_0x5747ee);return _0x5747ee;});}[a2_0x7bb9('0x12')](_0x2dc5ae){return __awaiter(this,void 0x0,void 0x0,function*(){if(_0x2dc5ae in this['runContext'][a2_0x7bb9('0xe')]){return(yield this['runContext'][a2_0x7bb9('0xe')][_0x2dc5ae])[_0x2dc5ae];}else{const _0x2d8a4a=this[a2_0x7bb9('0x7')][a2_0x7bb9('0x15')]['filter'](_0x3fff2a=>!this[a2_0x7bb9('0x7')][a2_0x7bb9('0xe')][_0x3fff2a[a2_0x7bb9('0x5')]])[a2_0x7bb9('0x23')](_0x49b2b7=>_0x49b2b7['hash']);if(_0x2d8a4a[a2_0x7bb9('0x26')](_0x2dc5ae)===-0x1){_0x2d8a4a[a2_0x7bb9('0x25')](_0x2dc5ae);}const _0x2eebe4=this[a2_0x7bb9('0x18')][a2_0x7bb9('0x19')](environment_1[a2_0x7bb9('0x16')],_0x2d8a4a);_0x2d8a4a[a2_0x7bb9('0xc')](_0x4839f9=>{this[a2_0x7bb9('0x7')]['requests'][_0x4839f9]=_0x2eebe4;});return(yield _0x2eebe4)[_0x2dc5ae];}});}[a2_0x7bb9('0x1a')](){return Promise['all'](this[a2_0x7bb9('0xa')])['then'](_0x6f4c2a=>_0x6f4c2a[a2_0x7bb9('0x0')]((_0xf09926,_0x13f535)=>_0xf09926&&_0x13f535,!![]));}}exports[a2_0x7bb9('0x28')]=CloudRemoteCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x4b5b=['package.json','VERBOSE_LOGGING','axiosMultipleTries','../../../utilities/axios','stringify','api','Run\x20Details:','mapRespToPerfEntry','getRunGroup','message','gzip','RunEnd.\x20Completed\x20tasks','createMetricRecorder','startRun','post','response','createApiAxiosInstance','application/octet-stream','apiError','throw','CloudRunApi','urls','apiAxiosInstance','/nx-cloud/runs/start','zlib','promisify','@nrwl/nx-cloud','...','createReqBody','endRun','apply','messages','Invalid\x20end\x20run\x20response:\x20','slice','assign','success','extractErrorMessage','data','from','Nx\x20Cloud:\x20Unknown\x20Error\x20Occurred','parse','next','terminalOutput','done','stack','machineInfo','status','RUNNER_FAILURE_PERF_ENTRY','Invalid\x20Nx\x20Cloud\x20response:\x20','runContext','runUrl','Invalid\x20end\x20run\x20response','RunStart','__esModule','__awaiter','../../../utilities/nx-imports','util','axiosException','unknown','note','length','value','recordMetric','Stack\x20Trace:','nxCloudVersion'];(function(_0x1b0584,_0x4b5bca){const _0x1862c4=function(_0x40c5ae){while(--_0x40c5ae){_0x1b0584['push'](_0x1b0584['shift']());}};_0x1862c4(++_0x4b5bca);}(a3_0x4b5b,0xd5));const a3_0x1862=function(_0x1b0584,_0x4b5bca){_0x1b0584=_0x1b0584-0x0;let _0x1862c4=a3_0x4b5b[_0x1b0584];return _0x1862c4;};'use strict';var __awaiter=this&&this[a3_0x1862('0x24')]||function(_0x1395f6,_0x41c1e4,_0x2b16f6,_0x39b255){function _0x51ff92(_0x1f7c56){return _0x1f7c56 instanceof _0x2b16f6?_0x1f7c56:new _0x2b16f6(function(_0x5217b5){_0x5217b5(_0x1f7c56);});}return new(_0x2b16f6||(_0x2b16f6=Promise))(function(_0x4d8070,_0x5544e4){function _0x205ee2(_0x14ce5a){try{_0xf33123(_0x39b255[a3_0x1862('0x17')](_0x14ce5a));}catch(_0x49fd30){_0x5544e4(_0x49fd30);}}function _0x4ee55b(_0x99710f){try{_0xf33123(_0x39b255[a3_0x1862('0x1')](_0x99710f));}catch(_0x48eb71){_0x5544e4(_0x48eb71);}}function _0xf33123(_0x37b183){_0x37b183[a3_0x1862('0x19')]?_0x4d8070(_0x37b183[a3_0x1862('0x2b')]):_0x51ff92(_0x37b183[a3_0x1862('0x2b')])['then'](_0x205ee2,_0x4ee55b);}_0xf33123((_0x39b255=_0x39b255[a3_0x1862('0xc')](_0x1395f6,_0x41c1e4||[]))[a3_0x1862('0x17')]());});};Object['defineProperty'](exports,a3_0x1862('0x23'),{'value':!![]});exports['CloudRunApi']=void 0x0;const axios_1=require(a3_0x1862('0x32'));const environment_1=require('../../../utilities/environment');const fs_1=require('fs');const zlib_1=require(a3_0x1862('0x6'));const util_1=require(a3_0x1862('0x26'));const metric_logger_1=require('../../../utilities/metric-logger');const {output}=require(a3_0x1862('0x25'));class CloudRunApi{constructor(_0x19791d,_0x45dfb5,_0xc4b7af,_0x5bae14){this[a3_0x1862('0xd')]=_0x19791d;this[a3_0x1862('0x1f')]=_0x45dfb5;this['machineInfo']=_0x5bae14;this['apiAxiosInstance']=(0x0,axios_1[a3_0x1862('0x3f')])(_0xc4b7af);}[a3_0x1862('0x3c')](_0x134098,_0xa374fb){var _0x342521;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1e5ca6=(0x0,metric_logger_1[a3_0x1862('0x3b')])(a3_0x1862('0x3c'));try{const _0x2042e3={'meta':{'nxCloudVersion':this[a3_0x1862('0x2e')]()},'branch':(0x0,environment_1['getBranch'])(),'runGroup':(0x0,environment_1[a3_0x1862('0x37')])(),'distributedExecutionId':_0x134098,'hashes':_0xa374fb};if(environment_1[a3_0x1862('0x30')]){output[a3_0x1862('0x29')]({'title':a3_0x1862('0x22'),'bodyLines':['\x0a'+JSON[a3_0x1862('0x33')](_0x2042e3,null,0x2)]});}const _0x1c2330=yield(0x0,axios_1[a3_0x1862('0x31')])(()=>this['apiAxiosInstance'][a3_0x1862('0x3d')](a3_0x1862('0x5'),_0x2042e3));_0x1e5ca6[a3_0x1862('0x2c')]((0x0,metric_logger_1[a3_0x1862('0x36')])(_0x1c2330));if(_0x1c2330[a3_0x1862('0x13')]&&_0x1c2330[a3_0x1862('0x13')][a3_0x1862('0x38')]){this[a3_0x1862('0xd')][a3_0x1862('0x38')]=_0x1c2330[a3_0x1862('0x13')][a3_0x1862('0x38')];}if(!_0x1c2330[a3_0x1862('0x13')]||!_0x1c2330[a3_0x1862('0x13')][a3_0x1862('0x3')]){this[a3_0x1862('0xd')][a3_0x1862('0x0')]=a3_0x1862('0x1e')+JSON[a3_0x1862('0x33')](_0x1c2330['data']);return{};}return _0x1c2330[a3_0x1862('0x13')][a3_0x1862('0x3')];}catch(_0x4e9fe2){_0x1e5ca6['recordMetric'](((_0x342521=_0x4e9fe2===null||_0x4e9fe2===void 0x0?void 0x0:_0x4e9fe2[a3_0x1862('0x27')])===null||_0x342521===void 0x0?void 0x0:_0x342521['response'])?(0x0,metric_logger_1[a3_0x1862('0x36')])(_0x4e9fe2[a3_0x1862('0x27')][a3_0x1862('0x3e')]):metric_logger_1[a3_0x1862('0x1d')]);this[a3_0x1862('0xd')][a3_0x1862('0x0')]=this[a3_0x1862('0xd')][a3_0x1862('0x12')](_0x4e9fe2,a3_0x1862('0x34'));return{};}});}[a3_0x1862('0xa')](_0x57da7f,_0x2ad5c0){const _0x35b745={'meta':{'nxCloudVersion':this[a3_0x1862('0x2e')]()},'tasks':_0x2ad5c0,'run':_0x57da7f,'machineInfo':this[a3_0x1862('0x1b')]};return JSON[a3_0x1862('0x33')](_0x35b745);}['endRun'](_0x4b7770,_0x588b21){var _0x1480dc,_0x34f338;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a3_0x1862('0xd')][a3_0x1862('0x0')])return![];let _0x566f23=this[a3_0x1862('0xa')](_0x4b7770,_0x588b21);if(_0x566f23[a3_0x1862('0x2a')]>0x14*0x3e8*0x3e8){_0x566f23=this['createReqBody'](_0x4b7770,_0x588b21['map'](_0x8f3b8b=>Object[a3_0x1862('0x10')](Object[a3_0x1862('0x10')]({},_0x8f3b8b),{'hashDetails':undefined})));}const _0x44442e=Buffer[a3_0x1862('0x14')](_0x566f23);const _0x2682a5=yield(0x0,util_1[a3_0x1862('0x7')])(zlib_1[a3_0x1862('0x39')])(_0x44442e);const _0x1a11ad=(0x0,metric_logger_1[a3_0x1862('0x3b')])(a3_0x1862('0xb'));try{if(environment_1['VERBOSE_LOGGING']){const _0x5dc662=_0x588b21['map'](_0x25dc1c=>{return Object[a3_0x1862('0x10')](Object['assign']({},_0x25dc1c),{'terminalOutput':_0x25dc1c[a3_0x1862('0x18')]?_0x25dc1c[a3_0x1862('0x18')][a3_0x1862('0xf')](0x0,0x14)+a3_0x1862('0x9'):undefined});});output[a3_0x1862('0x29')]({'title':a3_0x1862('0x3a'),'bodyLines':['\x0a'+JSON[a3_0x1862('0x33')](_0x5dc662,null,0x2)]});}const _0x24f980=yield(0x0,axios_1[a3_0x1862('0x31')])(()=>this[a3_0x1862('0x4')]['post']('/nx-cloud/runs/end',_0x2682a5,{'headers':Object[a3_0x1862('0x10')](Object[a3_0x1862('0x10')]({},this[a3_0x1862('0x4')]['defaults']['headers']),{'Content-Encoding':'gzip','Content-Type':a3_0x1862('0x40')})}));if(_0x24f980){_0x1a11ad[a3_0x1862('0x2c')]((0x0,metric_logger_1[a3_0x1862('0x36')])(_0x24f980));if(_0x24f980[a3_0x1862('0x13')]&&_0x24f980[a3_0x1862('0x13')][a3_0x1862('0x20')]&&_0x24f980[a3_0x1862('0x13')][a3_0x1862('0x1c')]===a3_0x1862('0x11')){this['runContext'][a3_0x1862('0x20')]=_0x24f980['data']['runUrl'];return!![];}if(_0x24f980[a3_0x1862('0x13')]&&_0x24f980['data']['status']){this[a3_0x1862('0xd')][a3_0x1862('0x0')]=a3_0x1862('0xe')+JSON[a3_0x1862('0x33')](_0x24f980[a3_0x1862('0x13')][a3_0x1862('0x38')]);}else if(_0x24f980[a3_0x1862('0x13')]&&typeof _0x24f980[a3_0x1862('0x13')]==='string'){if(_0x24f980[a3_0x1862('0x13')]!==a3_0x1862('0x11')){this[a3_0x1862('0xd')][a3_0x1862('0x0')]=a3_0x1862('0xe')+JSON[a3_0x1862('0x33')](_0x24f980[a3_0x1862('0x13')]);}}else{this[a3_0x1862('0xd')]['apiError']=a3_0x1862('0xe')+JSON['stringify'](_0x24f980[a3_0x1862('0x13')]);}if(environment_1['VERBOSE_LOGGING']){output[a3_0x1862('0x29')]({'title':a3_0x1862('0x21'),'bodyLines':[JSON['stringify'](_0x24f980[a3_0x1862('0x13')],null,0x2)]});}}else{output['error']({'title':a3_0x1862('0x15'),'bodyLines':['Run\x20completion\x20responded\x20with\x20`undefined`.',a3_0x1862('0x35'),JSON[a3_0x1862('0x33')](_0x4b7770,null,0x2),a3_0x1862('0x2d'),JSON[a3_0x1862('0x33')](new Error()[a3_0x1862('0x1a')],null,0x2)]});}return![];}catch(_0x252ef7){_0x1a11ad['recordMetric'](((_0x1480dc=_0x252ef7===null||_0x252ef7===void 0x0?void 0x0:_0x252ef7['axiosException'])===null||_0x1480dc===void 0x0?void 0x0:_0x1480dc['response'])?(0x0,metric_logger_1[a3_0x1862('0x36')])(_0x252ef7[a3_0x1862('0x27')][a3_0x1862('0x3e')]):metric_logger_1[a3_0x1862('0x1d')]);const _0x4d1c0a=(_0x34f338=_0x252ef7[a3_0x1862('0x27')])!==null&&_0x34f338!==void 0x0?_0x34f338:_0x252ef7;this[a3_0x1862('0xd')]['apiError']=this[a3_0x1862('0xd')][a3_0x1862('0x12')](_0x4d1c0a,'api');return![];}});}[a3_0x1862('0x2e')](){try{const _0x3b1dab=JSON[a3_0x1862('0x16')]((0x0,fs_1['readFileSync'])(a3_0x1862('0x2f'))['toString']());return _0x3b1dab['devDependencies'][a3_0x1862('0x8')];}catch(_0x186476){return a3_0x1862('0x28');}}}exports[a3_0x1862('0x2')]=CloudRunApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x5a14=['/nx-cloud/executions/tasks','runGroup','mapRespToPerfEntry','axiosException','apiAxiosInstance','completeRunGroupWithError','data','../../../utilities/nx-imports','runGroup:\x20','dtePollTasks','../../../utilities/environment','throw','createApiAxiosInstance','__awaiter','VERBOSE_LOGGING','defineProperty','note','createMetricRecorder','axiosMultipleTries','apply','recordMetric','/nx-cloud/executions/complete-run-group','value','post','Completing\x20run\x20group\x20with\x20an\x20error','agentName','RUNNER_FAILURE_PERF_ENTRY','done','error','completeRunGroup','DistributedAgentApi','then','response','next'];(function(_0x5db141,_0x5a14bf){const _0x571529=function(_0x11379a){while(--_0x11379a){_0x5db141['push'](_0x5db141['shift']());}};_0x571529(++_0x5a14bf);}(a4_0x5a14,0x1ed));const a4_0x5715=function(_0x5db141,_0x5a14bf){_0x5db141=_0x5db141-0x0;let _0x571529=a4_0x5a14[_0x5db141];return _0x571529;};'use strict';var __awaiter=this&&this[a4_0x5715('0x1e')]||function(_0x303533,_0x1e0486,_0x170c7e,_0x5a29e2){function _0x3064d9(_0x2a3615){return _0x2a3615 instanceof _0x170c7e?_0x2a3615:new _0x170c7e(function(_0x251115){_0x251115(_0x2a3615);});}return new(_0x170c7e||(_0x170c7e=Promise))(function(_0x3cfef7,_0x2e6902){function _0x43ae9a(_0xd4696e){try{_0x1f8d5e(_0x5a29e2[a4_0x5715('0x10')](_0xd4696e));}catch(_0x56b59f){_0x2e6902(_0x56b59f);}}function _0x414aa4(_0x2f6683){try{_0x1f8d5e(_0x5a29e2[a4_0x5715('0x1c')](_0x2f6683));}catch(_0x31a391){_0x2e6902(_0x31a391);}}function _0x1f8d5e(_0x4285e8){_0x4285e8[a4_0x5715('0xa')]?_0x3cfef7(_0x4285e8[a4_0x5715('0x5')]):_0x3064d9(_0x4285e8['value'])[a4_0x5715('0xe')](_0x43ae9a,_0x414aa4);}_0x1f8d5e((_0x5a29e2=_0x5a29e2[a4_0x5715('0x2')](_0x303533,_0x1e0486||[]))[a4_0x5715('0x10')]());});};Object[a4_0x5715('0x20')](exports,'__esModule',{'value':!![]});exports['DistributedAgentApi']=void 0x0;const axios_1=require('../../../utilities/axios');const environment_1=require(a4_0x5715('0x1b'));const metric_logger_1=require('../../../utilities/metric-logger');const {output}=require(a4_0x5715('0x18'));class DistributedAgentApi{constructor(_0x3e927d,_0x2fa937,_0xa029bc){this[a4_0x5715('0x12')]=_0x2fa937;this['agentName']=_0xa029bc;this['apiAxiosInstance']=(0x0,axios_1[a4_0x5715('0x1d')])(_0x3e927d);}['tasks'](_0x5ad640,_0x284662,_0x15f9db){var _0x559caf;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3cc01e=(0x0,metric_logger_1[a4_0x5715('0x0')])(a4_0x5715('0x1a'));try{const _0x54f682=yield(0x0,axios_1[a4_0x5715('0x1')])(()=>this[a4_0x5715('0x15')]['post'](a4_0x5715('0x11'),{'runGroup':this['runGroup'],'agentName':this[a4_0x5715('0x8')],'executionId':_0x5ad640,'statusCode':_0x284662,'completedTasks':_0x15f9db}));_0x3cc01e[a4_0x5715('0x3')]((0x0,metric_logger_1[a4_0x5715('0x13')])(_0x54f682));return _0x54f682[a4_0x5715('0x17')];}catch(_0x277ba9){_0x3cc01e['recordMetric'](((_0x559caf=_0x277ba9===null||_0x277ba9===void 0x0?void 0x0:_0x277ba9['axiosException'])===null||_0x559caf===void 0x0?void 0x0:_0x559caf[a4_0x5715('0xf')])?(0x0,metric_logger_1[a4_0x5715('0x13')])(_0x277ba9['axiosException'][a4_0x5715('0xf')]):metric_logger_1[a4_0x5715('0x9')]);throw _0x277ba9;}});}[a4_0x5715('0x16')](_0x6673b7){var _0x45cd8c;return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a4_0x5715('0x1f')]){output['note']({'title':a4_0x5715('0x7'),'bodyLines':[a4_0x5715('0x19')+this['runGroup'],'error:\x20'+_0x6673b7]});}const _0x1e580b=(0x0,metric_logger_1[a4_0x5715('0x0')])(a4_0x5715('0xc'));try{const _0x328c0a=yield(0x0,axios_1[a4_0x5715('0x1')])(()=>this[a4_0x5715('0x15')][a4_0x5715('0x6')](a4_0x5715('0x4'),{'runGroup':this['runGroup'],'agentName':this[a4_0x5715('0x8')],'criticalErrorMessage':_0x6673b7}));if(environment_1[a4_0x5715('0x1f')]){output[a4_0x5715('0x21')]({'title':'Completed\x20run\x20group\x20with\x20an\x20error'});}_0x1e580b[a4_0x5715('0x3')]((0x0,metric_logger_1[a4_0x5715('0x13')])(_0x328c0a));}catch(_0x4d09ff){_0x1e580b[a4_0x5715('0x3')](((_0x45cd8c=_0x4d09ff===null||_0x4d09ff===void 0x0?void 0x0:_0x4d09ff[a4_0x5715('0x14')])===null||_0x45cd8c===void 0x0?void 0x0:_0x45cd8c[a4_0x5715('0xf')])?(0x0,metric_logger_1[a4_0x5715('0x13')])(_0x4d09ff['axiosException'][a4_0x5715('0xf')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);console[a4_0x5715('0xb')](_0x4d09ff);}});}}exports[a4_0x5715('0xd')]=DistributedAgentApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x3495=['API\x20Response','This\x20can\x20also\x20be\x20a\x20false\x20positive\x20caused\x20by\x20agents\x20that\x20did\x20not\x20shut\x20down\x20correctly.','CIRCLE_STAGE','options','then','completed','env','assign','Critical\x20Error\x20in\x20Agent:\x20\x22','apply','End\x20all\x20currently\x20running\x20agents,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22,\x20and\x20try\x20again.','params','__esModule','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','push','../../../utilities/nx-imports','child_process','unlinkSync','inherit','note','toString','configuration','CIRCLECI','error:\x20','startAgent','./node_modules/.cache/nx','projectName','default','projects','maxParallel:\x20','executionId','cacheDirectory','executionId:\x20','Distributed\x20Execution\x20Terminated','/lockfiles','./distributed-agent.api','retryDuring','criticalErrorMessage','exit','\x20--parallel\x20--max-parallel=','getTime','We\x20have\x20detected\x20other\x20agents\x20running\x20in\x20this\x20workspace.\x20This\x20can\x20cause\x20unexpected\x20behavior.','includes','Waiting...','../../../utilities/waiter','throw','We\x20have\x20detected\x20another\x20agent\x20with\x20this\x20ID\x20running\x20in\x20this\x20workspace.\x20This\x20should\x20not\x20happen.','Error:','printRunGroupError','Starting\x20an\x20agent\x20for\x20running\x20Nx\x20tasks','wait','existsSync','status','Fetching\x20tasks...','maxParallel','Waiter','\x20--projects=','error','length','.lock','next','join','reset','/nx.json','/tasks-hashes-','tasksRunnerOptions','mkdirSync','If\x20you\x20believe\x20this\x20is\x20the\x20case,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22.','number\x20of\x20tasks:\x20','Duplicate\x20Agent\x20ID\x20Detected','writeFileSync','strip-json-comments','NX_AGENT_NAME','warn','npx\x20nx\x20run-many\x20--target=','completedTasks','Executing:\x20\x27','readFileSync','completeRunGroupWithError','../../../utilities/environment','taskId','VERBOSE_LOGGING','tasks','getRunGroup','completed:\x20','value','DistributedAgentApi','../../../utilities/metric-logger','submitRunMetrics','target','find','parse'];(function(_0x557cb8,_0x34956e){const _0x313c1b=function(_0x4c1e90){while(--_0x4c1e90){_0x557cb8['push'](_0x557cb8['shift']());}};_0x313c1b(++_0x34956e);}(a5_0x3495,0x1cb));const a5_0x313c=function(_0x557cb8,_0x34956e){_0x557cb8=_0x557cb8-0x0;let _0x313c1b=a5_0x3495[_0x557cb8];return _0x313c1b;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x273d69,_0x55a5c9,_0x2d731b,_0x1fd206){function _0x49ca25(_0x417828){return _0x417828 instanceof _0x2d731b?_0x417828:new _0x2d731b(function(_0x3ad566){_0x3ad566(_0x417828);});}return new(_0x2d731b||(_0x2d731b=Promise))(function(_0x399e4f,_0x5082f9){function _0x4bd769(_0x283cf6){try{_0x4f2288(_0x1fd206['next'](_0x283cf6));}catch(_0x45c81e){_0x5082f9(_0x45c81e);}}function _0x3ec6cc(_0x2bce0c){try{_0x4f2288(_0x1fd206[a5_0x313c('0x2e')](_0x2bce0c));}catch(_0x33adc2){_0x5082f9(_0x33adc2);}}function _0x4f2288(_0x470d18){_0x470d18['done']?_0x399e4f(_0x470d18[a5_0x313c('0x56')]):_0x49ca25(_0x470d18[a5_0x313c('0x56')])[a5_0x313c('0x5')](_0x4bd769,_0x3ec6cc);}_0x4f2288((_0x1fd206=_0x1fd206[a5_0x313c('0xa')](_0x273d69,_0x55a5c9||[]))[a5_0x313c('0x3d')]());});};Object['defineProperty'](exports,a5_0x313c('0xd'),{'value':!![]});exports[a5_0x313c('0x19')]=void 0x0;const child_process_1=require(a5_0x313c('0x11'));const stripJsonComments=require(a5_0x313c('0x48'));const distributed_agent_api_1=require(a5_0x313c('0x24'));const waiter_1=require(a5_0x313c('0x2d'));const environment_1=require(a5_0x313c('0x50'));const print_run_group_error_1=require('../../error/print-run-group-error');const create_no_new_messages_timeout_1=require('../../../utilities/create-no-new-messages-timeout');const fs_1=require('fs');const metric_logger_1=require(a5_0x313c('0x58'));const {output,workspaceRoot}=require(a5_0x313c('0x10'));function executeTasks(_0x4edf97,_0x205338){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x47c2dd=0x0;let _0x54e799=null;const _0x523165=(0x0,create_no_new_messages_timeout_1['createNoNewMessagesTimeout'])();const _0x5f15e9=new waiter_1[(a5_0x313c('0x38'))]();let _0xdb262a=[];const _0x16097e=new Date();let _0x1b1193=![];while(!![]){if(environment_1[a5_0x313c('0x52')]){output['note']({'title':a5_0x313c('0x36')});}_0x54e799=yield _0x205338[a5_0x313c('0x53')](_0x54e799?_0x54e799[a5_0x313c('0x1f')]:null,_0x47c2dd,_0xdb262a);if(environment_1[a5_0x313c('0x52')]){output[a5_0x313c('0x14')]({'title':a5_0x313c('0x1'),'bodyLines':[a5_0x313c('0x55')+_0x54e799['completed'],'retryDuring:\x20'+_0x54e799[a5_0x313c('0x25')],a5_0x313c('0x21')+_0x54e799[a5_0x313c('0x1f')],a5_0x313c('0x45')+_0x54e799['tasks'][a5_0x313c('0x3b')],a5_0x313c('0x18')+_0x54e799['criticalErrorMessage'],a5_0x313c('0x1e')+_0x54e799[a5_0x313c('0x37')]]});}if(_0x54e799[a5_0x313c('0x26')]){output[a5_0x313c('0x3a')]({'title':a5_0x313c('0x22'),'bodyLines':[a5_0x313c('0x30'),_0x54e799['criticalErrorMessage']]});process[a5_0x313c('0x27')](0x0);}if((_0x54e799===null||_0x54e799===void 0x0?void 0x0:_0x54e799[a5_0x313c('0x25')])&&(_0x54e799===null||_0x54e799===void 0x0?void 0x0:_0x54e799[a5_0x313c('0x25')])!==0x0&&!_0x1b1193&&new Date()[a5_0x313c('0x29')]()-_0x16097e[a5_0x313c('0x29')]()>_0x54e799[a5_0x313c('0x25')]){yield _0x5f15e9[a5_0x313c('0x33')]();continue;}if(_0x54e799[a5_0x313c('0x6')])return;_0x523165(_0x54e799['tasks']['map'](_0x44cbc1=>_0x44cbc1[a5_0x313c('0x51')])[a5_0x313c('0x3e')](''));if(!_0x54e799['executionId']){if(environment_1[a5_0x313c('0x52')]){output['note']({'title':a5_0x313c('0x2c')});}yield _0x5f15e9['wait']();_0x47c2dd=0x0;_0xdb262a=[];continue;}_0x5f15e9[a5_0x313c('0x3f')]();_0x1b1193=!![];const _0x3fb97d=invokeTasksUsingRunMany(_0x4edf97,_0x54e799[a5_0x313c('0x1f')],_0x54e799[a5_0x313c('0x53')],_0x54e799['maxParallel']);_0x47c2dd=_0x3fb97d['completedStatusCode'];_0xdb262a=_0x3fb97d[a5_0x313c('0x4c')];}});}function readCompletedTasks(_0xcef947,_0x5147a6){const _0x5f5d95='Command\x20execution\x20failed\x20(distributed\x20task\x20execution:\x20'+_0x5147a6+').\x20Tasks\x20hashes\x20haven\x27t\x20been\x20recorded.';let _0x6c8643;try{const _0x52a3ec=_0xcef947[a5_0x313c('0x20')]||a5_0x313c('0x1a');const _0x2f86fc=_0x52a3ec+a5_0x313c('0x41')+_0x5147a6;_0x6c8643=JSON[a5_0x313c('0x0')]((0x0,fs_1['readFileSync'])(_0x2f86fc)[a5_0x313c('0x15')]());(0x0,fs_1[a5_0x313c('0x12')])(_0x2f86fc);}catch(_0x44b557){throw new Error(_0x5f5d95);}if(_0x6c8643['length']==0x0){throw new Error(_0x5f5d95);}return _0x6c8643;}function invokeTasksUsingRunMany(_0xb9470a,_0x39103f,_0x386a7e,_0x1164e6){let _0x475421=0x0;const _0x40c8cc=[];for(const _0x53d375 of groupByTarget(_0x386a7e)){const _0x331bbb=_0x53d375[a5_0x313c('0x16')]?'--configuration='+_0x53d375[a5_0x313c('0x16')]:'';const _0x40870c=_0x1164e6>0x1?a5_0x313c('0x28')+_0x1164e6:'';const _0x289345=a5_0x313c('0x4b')+_0x53d375[a5_0x313c('0x5a')]+'\x20'+_0x331bbb+a5_0x313c('0x39')+_0x53d375[a5_0x313c('0x1d')]['join'](',')+'\x20'+_0x53d375[a5_0x313c('0xc')]+_0x40870c;if(environment_1[a5_0x313c('0x52')]){output['note']({'title':a5_0x313c('0x4d')+_0x289345+'\x27'});}try{(0x0,child_process_1['execSync'])(_0x289345,{'stdio':[a5_0x313c('0x13'),a5_0x313c('0x13'),'inherit'],'env':Object['assign'](Object[a5_0x313c('0x8')]({},process[a5_0x313c('0x7')]),{'NX_CACHE_FAILURES':'true','NX_CLOUD_DISTRIBUTED_EXECUTION_ID':_0x39103f})});}catch(_0x29ca74){if(_0x29ca74[a5_0x313c('0x35')]===environment_1[a5_0x313c('0xe')]){throw _0x29ca74;}else{_0x475421=0x1;}}finally{_0x40c8cc[a5_0x313c('0xf')](...readCompletedTasks(_0xb9470a,_0x39103f));}}return{'completedStatusCode':_0x475421,'completedTasks':_0x40c8cc};}function groupByTarget(_0x3abbf8){const _0x26269b=[];_0x3abbf8['forEach'](_0x421d5f=>{const _0x4dbbc9=_0x26269b[a5_0x313c('0x5b')](_0x5e7e6a=>_0x5e7e6a[a5_0x313c('0x5a')]===_0x421d5f[a5_0x313c('0x5a')]&&_0x5e7e6a[a5_0x313c('0x16')]===_0x421d5f[a5_0x313c('0x16')]);if(_0x4dbbc9){_0x4dbbc9[a5_0x313c('0x1d')][a5_0x313c('0xf')](_0x421d5f[a5_0x313c('0x1b')]);}else{_0x26269b[a5_0x313c('0xf')]({'target':_0x421d5f[a5_0x313c('0x5a')],'projects':[_0x421d5f['projectName']],'params':_0x421d5f[a5_0x313c('0xc')],'configuration':_0x421d5f[a5_0x313c('0x16')]});}});return _0x26269b;}function getAgentName(){if(process[a5_0x313c('0x7')][a5_0x313c('0x49')]!==undefined){return process['env'][a5_0x313c('0x49')];}else if(process[a5_0x313c('0x7')][a5_0x313c('0x17')]!==undefined){return process[a5_0x313c('0x7')][a5_0x313c('0x3')];}else{return'Agent\x20'+Math['floor'](Math['random']()*0x186a0);}}function createAgentLockfile(_0x2774bd,_0x516a94){const _0x1c0ae4=_0x2774bd[a5_0x313c('0x20')]||'./node_modules/.cache/nx';const _0x526efe=_0x1c0ae4+a5_0x313c('0x23');const _0x475782=_0x526efe+'/'+_0x516a94+a5_0x313c('0x3c');if(!(0x0,fs_1[a5_0x313c('0x34')])(_0x526efe)){(0x0,fs_1[a5_0x313c('0x43')])(_0x526efe,{'recursive':!![]});}const _0x585cd7=(0x0,fs_1['readdirSync'])(_0x526efe);if(_0x585cd7['length']){if(_0x585cd7[a5_0x313c('0x2b')](_0x516a94+'.lock')){output[a5_0x313c('0x3a')]({'title':a5_0x313c('0x46'),'bodyLines':[a5_0x313c('0x2f'),'',a5_0x313c('0xb')]});process[a5_0x313c('0x27')](0x1);}output[a5_0x313c('0x4a')]({'title':'Other\x20Nx\x20Cloud\x20Agents\x20Detected','bodyLines':[a5_0x313c('0x2a'),'',a5_0x313c('0x2'),a5_0x313c('0x44')]});}(0x0,fs_1[a5_0x313c('0x47')])(_0x475782,'');process['on'](a5_0x313c('0x27'),_0x5c7f12=>cleanupAgentLockfile(_0x475782,_0x5c7f12));process['on']('SIGINT',()=>cleanupAgentLockfile(_0x475782,0x0));}function cleanupAgentLockfile(_0x50c368,_0x536f1f){if((0x0,fs_1[a5_0x313c('0x34')])(_0x50c368)){(0x0,fs_1[a5_0x313c('0x12')])(_0x50c368);process[a5_0x313c('0x27')](_0x536f1f);}}function startAgent(){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x31a296=(0x0,environment_1[a5_0x313c('0x54')])();if(!_0x31a296){(0x0,print_run_group_error_1[a5_0x313c('0x31')])();return process[a5_0x313c('0x27')](0x1);}output[a5_0x313c('0x14')]({'title':a5_0x313c('0x32')});const _0x42e8ce=JSON[a5_0x313c('0x0')](stripJsonComments((0x0,fs_1[a5_0x313c('0x4e')])(workspaceRoot+a5_0x313c('0x40'))['toString']()))[a5_0x313c('0x42')][a5_0x313c('0x1c')][a5_0x313c('0x4')];const _0x2f6fda=getAgentName();createAgentLockfile(_0x42e8ce,_0x2f6fda);const _0x56d334=new distributed_agent_api_1[(a5_0x313c('0x57'))](_0x42e8ce,_0x31a296,_0x2f6fda);return executeTasks(_0x42e8ce,_0x56d334)[a5_0x313c('0x5')](_0x116942=>__awaiter(this,void 0x0,void 0x0,function*(){yield(0x0,metric_logger_1[a5_0x313c('0x59')])(_0x42e8ce);return _0x116942;}))['catch'](_0x3f6f87=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x56d334[a5_0x313c('0x4f')](a5_0x313c('0x9')+_0x3f6f87['message']+'\x22');throw _0x3f6f87;}));});}exports['startAgent']=startAgent;
|
|
1
|
+
const a5_0x58dd=[').\x20Tasks\x20hashes\x20haven\x27t\x20been\x20recorded.','Other\x20Nx\x20Cloud\x20Agents\x20Detected','.lock','params','Waiter','message','./distributed-agent.api','strip-json-comments','Executing:\x20\x27','SIGINT','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','wait','VERBOSE_LOGGING','catch','execSync','../../../utilities/waiter','inherit','readFileSync','projects','criticalErrorMessage','createNoNewMessagesTimeout','child_process','Command\x20execution\x20failed\x20(distributed\x20task\x20execution:\x20','mkdirSync','toString','target','maxParallel:\x20','warn','completeRunGroupWithError','getTime','floor','number\x20of\x20tasks:\x20','reset','We\x20have\x20detected\x20other\x20agents\x20running\x20in\x20this\x20workspace.\x20This\x20can\x20cause\x20unexpected\x20behavior.','includes','defineProperty','length','assign','then','exit','tasks','executionId','projectName','tasksRunnerOptions','note','../../../utilities/nx-imports','CIRCLECI','retryDuring','maxParallel','This\x20can\x20also\x20be\x20a\x20false\x20positive\x20caused\x20by\x20agents\x20that\x20did\x20not\x20shut\x20down\x20correctly.','cacheDirectory','unlinkSync','existsSync','apply','startAgent','If\x20you\x20believe\x20this\x20is\x20the\x20case,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22.','error','retryDuring:\x20','DistributedAgentApi','printRunGroupError','__esModule','Agent\x20','./node_modules/.cache/nx','Error:','completedStatusCode','completedTasks','parse','Distributed\x20Execution\x20Terminated','__awaiter','completed','taskId','--configuration=','getRunGroup','Fetching\x20tasks...','value','npx\x20nx\x20run-many\x20--target=','CIRCLE_STAGE','env','forEach','next','executionId:\x20','../../../utilities/create-no-new-messages-timeout','Starting\x20an\x20agent\x20for\x20running\x20Nx\x20tasks','push','\x20--parallel\x20--max-parallel=','/nx.json','Critical\x20Error\x20in\x20Agent:\x20\x22','configuration','status','done','submitRunMetrics','NX_AGENT_NAME','../../error/print-run-group-error','error:\x20','join'];(function(_0x4fe529,_0x58ddd8){const _0x369278=function(_0x693cc3){while(--_0x693cc3){_0x4fe529['push'](_0x4fe529['shift']());}};_0x369278(++_0x58ddd8);}(a5_0x58dd,0x1b3));const a5_0x3692=function(_0x4fe529,_0x58ddd8){_0x4fe529=_0x4fe529-0x0;let _0x369278=a5_0x58dd[_0x4fe529];return _0x369278;};'use strict';var __awaiter=this&&this[a5_0x3692('0xd')]||function(_0x2a80b3,_0x1c3276,_0x470ad4,_0x4a2b65){function _0x3bba14(_0x53a368){return _0x53a368 instanceof _0x470ad4?_0x53a368:new _0x470ad4(function(_0x269800){_0x269800(_0x53a368);});}return new(_0x470ad4||(_0x470ad4=Promise))(function(_0x53d0d3,_0x52e4ca){function _0x16a2f5(_0x5b2a60){try{_0x584bb9(_0x4a2b65['next'](_0x5b2a60));}catch(_0x504b71){_0x52e4ca(_0x504b71);}}function _0x486508(_0x36a7a8){try{_0x584bb9(_0x4a2b65['throw'](_0x36a7a8));}catch(_0x7b2064){_0x52e4ca(_0x7b2064);}}function _0x584bb9(_0x205d31){_0x205d31[a5_0x3692('0x22')]?_0x53d0d3(_0x205d31[a5_0x3692('0x13')]):_0x3bba14(_0x205d31[a5_0x3692('0x13')])[a5_0x3692('0x4e')](_0x16a2f5,_0x486508);}_0x584bb9((_0x4a2b65=_0x4a2b65[a5_0x3692('0x5d')](_0x2a80b3,_0x1c3276||[]))[a5_0x3692('0x18')]());});};Object[a5_0x3692('0x4b')](exports,a5_0x3692('0x5'),{'value':!![]});exports[a5_0x3692('0x5e')]=void 0x0;const child_process_1=require(a5_0x3692('0x3d'));const stripJsonComments=require(a5_0x3692('0x2f'));const distributed_agent_api_1=require(a5_0x3692('0x2e'));const waiter_1=require(a5_0x3692('0x37'));const environment_1=require('../../../utilities/environment');const print_run_group_error_1=require(a5_0x3692('0x25'));const create_no_new_messages_timeout_1=require(a5_0x3692('0x1a'));const fs_1=require('fs');const metric_logger_1=require('../../../utilities/metric-logger');const {output,workspaceRoot}=require(a5_0x3692('0x55'));function executeTasks(_0x367487,_0x20acf5){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x1d5934=0x0;let _0x292df0=null;const _0xe25667=(0x0,create_no_new_messages_timeout_1[a5_0x3692('0x3c')])();const _0x2b8c0d=new waiter_1[(a5_0x3692('0x2c'))]();let _0x455cdd=[];const _0x5ea178=new Date();let _0x52a39f=![];while(!![]){if(environment_1[a5_0x3692('0x34')]){output[a5_0x3692('0x54')]({'title':a5_0x3692('0x12')});}_0x292df0=yield _0x20acf5[a5_0x3692('0x50')](_0x292df0?_0x292df0[a5_0x3692('0x51')]:null,_0x1d5934,_0x455cdd);if(environment_1[a5_0x3692('0x34')]){output[a5_0x3692('0x54')]({'title':'API\x20Response','bodyLines':['completed:\x20'+_0x292df0[a5_0x3692('0xe')],a5_0x3692('0x2')+_0x292df0[a5_0x3692('0x57')],a5_0x3692('0x19')+_0x292df0[a5_0x3692('0x51')],a5_0x3692('0x47')+_0x292df0[a5_0x3692('0x50')][a5_0x3692('0x4c')],a5_0x3692('0x26')+_0x292df0[a5_0x3692('0x3b')],a5_0x3692('0x42')+_0x292df0[a5_0x3692('0x58')]]});}if(_0x292df0[a5_0x3692('0x3b')]){output[a5_0x3692('0x1')]({'title':a5_0x3692('0xc'),'bodyLines':[a5_0x3692('0x8'),_0x292df0['criticalErrorMessage']]});process[a5_0x3692('0x4f')](0x0);}if((_0x292df0===null||_0x292df0===void 0x0?void 0x0:_0x292df0[a5_0x3692('0x57')])&&(_0x292df0===null||_0x292df0===void 0x0?void 0x0:_0x292df0[a5_0x3692('0x57')])!==0x0&&!_0x52a39f&&new Date()[a5_0x3692('0x45')]()-_0x5ea178[a5_0x3692('0x45')]()>_0x292df0['retryDuring']){yield _0x2b8c0d[a5_0x3692('0x33')]();continue;}if(_0x292df0[a5_0x3692('0xe')])return;_0xe25667(_0x292df0[a5_0x3692('0x50')]['map'](_0xa06bb7=>_0xa06bb7[a5_0x3692('0xf')])[a5_0x3692('0x27')](''));if(!_0x292df0[a5_0x3692('0x51')]){if(environment_1['VERBOSE_LOGGING']){output[a5_0x3692('0x54')]({'title':'Waiting...'});}yield _0x2b8c0d[a5_0x3692('0x33')]();_0x1d5934=0x0;_0x455cdd=[];continue;}_0x2b8c0d[a5_0x3692('0x48')]();_0x52a39f=!![];const _0x591b32=invokeTasksUsingRunMany(_0x367487,_0x292df0[a5_0x3692('0x51')],_0x292df0['tasks'],_0x292df0[a5_0x3692('0x58')]);_0x1d5934=_0x591b32[a5_0x3692('0x9')];_0x455cdd=_0x591b32[a5_0x3692('0xa')];}});}function readCompletedTasks(_0x245a37,_0x3e36dc){const _0x32c783=a5_0x3692('0x3e')+_0x3e36dc+a5_0x3692('0x28');let _0x34a641;try{const _0x11895c=_0x245a37[a5_0x3692('0x5a')]||a5_0x3692('0x7');const _0x143c4f=_0x11895c+'/tasks-hashes-'+_0x3e36dc;_0x34a641=JSON['parse']((0x0,fs_1['readFileSync'])(_0x143c4f)[a5_0x3692('0x40')]());(0x0,fs_1['unlinkSync'])(_0x143c4f);}catch(_0x246d8b){throw new Error(_0x32c783);}if(_0x34a641['length']==0x0){throw new Error(_0x32c783);}return _0x34a641;}function invokeTasksUsingRunMany(_0x543543,_0x16e988,_0x350b21,_0x5ecc27){let _0x495aca=0x0;const _0x3ed7c2=[];for(const _0x58b6c5 of groupByTarget(_0x350b21)){const _0xc240be=_0x58b6c5[a5_0x3692('0x20')]?a5_0x3692('0x10')+_0x58b6c5['configuration']:'';const _0x5718da=_0x5ecc27>0x1?a5_0x3692('0x1d')+_0x5ecc27:'';const _0x39c372=a5_0x3692('0x14')+_0x58b6c5[a5_0x3692('0x41')]+'\x20'+_0xc240be+'\x20--projects='+_0x58b6c5[a5_0x3692('0x3a')]['join'](',')+'\x20'+_0x58b6c5[a5_0x3692('0x2b')]+_0x5718da;if(environment_1['VERBOSE_LOGGING']){output[a5_0x3692('0x54')]({'title':a5_0x3692('0x30')+_0x39c372+'\x27'});}try{(0x0,child_process_1[a5_0x3692('0x36')])(_0x39c372,{'stdio':[a5_0x3692('0x38'),a5_0x3692('0x38'),a5_0x3692('0x38')],'env':Object[a5_0x3692('0x4d')](Object['assign']({},process['env']),{'NX_CACHE_FAILURES':'true','NX_CLOUD_DISTRIBUTED_EXECUTION_ID':_0x16e988})});}catch(_0x47362f){if(_0x47362f[a5_0x3692('0x21')]===environment_1[a5_0x3692('0x32')]){throw _0x47362f;}else{_0x495aca=0x1;}}finally{_0x3ed7c2['push'](...readCompletedTasks(_0x543543,_0x16e988));}}return{'completedStatusCode':_0x495aca,'completedTasks':_0x3ed7c2};}function groupByTarget(_0x47af7f){const _0x4a6fbb=[];_0x47af7f[a5_0x3692('0x17')](_0xf40fd2=>{const _0x26340e=_0x4a6fbb['find'](_0x953b30=>_0x953b30[a5_0x3692('0x41')]===_0xf40fd2['target']&&_0x953b30[a5_0x3692('0x20')]===_0xf40fd2['configuration']);if(_0x26340e){_0x26340e['projects'][a5_0x3692('0x1c')](_0xf40fd2[a5_0x3692('0x52')]);}else{_0x4a6fbb[a5_0x3692('0x1c')]({'target':_0xf40fd2[a5_0x3692('0x41')],'projects':[_0xf40fd2[a5_0x3692('0x52')]],'params':_0xf40fd2[a5_0x3692('0x2b')],'configuration':_0xf40fd2[a5_0x3692('0x20')]});}});return _0x4a6fbb;}function getAgentName(){if(process[a5_0x3692('0x16')]['NX_AGENT_NAME']!==undefined){return process[a5_0x3692('0x16')][a5_0x3692('0x24')];}else if(process[a5_0x3692('0x16')][a5_0x3692('0x56')]!==undefined){return process['env'][a5_0x3692('0x15')];}else{return a5_0x3692('0x6')+Math[a5_0x3692('0x46')](Math['random']()*0x186a0);}}function createAgentLockfile(_0x259bdb,_0x5552a2){const _0x39d992=_0x259bdb[a5_0x3692('0x5a')]||a5_0x3692('0x7');const _0x4e038d=_0x39d992+'/lockfiles';const _0x39fa2e=_0x4e038d+'/'+_0x5552a2+a5_0x3692('0x2a');if(!(0x0,fs_1[a5_0x3692('0x5c')])(_0x4e038d)){(0x0,fs_1[a5_0x3692('0x3f')])(_0x4e038d,{'recursive':!![]});}const _0x4d5ee7=(0x0,fs_1['readdirSync'])(_0x4e038d);if(_0x4d5ee7[a5_0x3692('0x4c')]){if(_0x4d5ee7[a5_0x3692('0x4a')](_0x5552a2+a5_0x3692('0x2a'))){output[a5_0x3692('0x1')]({'title':'Duplicate\x20Agent\x20ID\x20Detected','bodyLines':['We\x20have\x20detected\x20another\x20agent\x20with\x20this\x20ID\x20running\x20in\x20this\x20workspace.\x20This\x20should\x20not\x20happen.','','End\x20all\x20currently\x20running\x20agents,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22,\x20and\x20try\x20again.']});process['exit'](0x1);}output[a5_0x3692('0x43')]({'title':a5_0x3692('0x29'),'bodyLines':[a5_0x3692('0x49'),'',a5_0x3692('0x59'),a5_0x3692('0x0')]});}(0x0,fs_1['writeFileSync'])(_0x39fa2e,'');process['on'](a5_0x3692('0x4f'),_0xe08ecb=>cleanupAgentLockfile(_0x39fa2e,_0xe08ecb));process['on'](a5_0x3692('0x31'),()=>cleanupAgentLockfile(_0x39fa2e,0x0));}function cleanupAgentLockfile(_0x23b2eb,_0x177d1e){if((0x0,fs_1['existsSync'])(_0x23b2eb)){(0x0,fs_1[a5_0x3692('0x5b')])(_0x23b2eb);process[a5_0x3692('0x4f')](_0x177d1e);}}function startAgent(){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x400cb1=(0x0,environment_1[a5_0x3692('0x11')])();if(!_0x400cb1){(0x0,print_run_group_error_1[a5_0x3692('0x4')])();return process[a5_0x3692('0x4f')](0x1);}output[a5_0x3692('0x54')]({'title':a5_0x3692('0x1b')});const _0x44ef60=JSON[a5_0x3692('0xb')](stripJsonComments((0x0,fs_1[a5_0x3692('0x39')])(workspaceRoot+a5_0x3692('0x1e'))[a5_0x3692('0x40')]()))[a5_0x3692('0x53')]['default']['options'];const _0x4d5af7=getAgentName();createAgentLockfile(_0x44ef60,_0x4d5af7);const _0x499221=new distributed_agent_api_1[(a5_0x3692('0x3'))](_0x44ef60,_0x400cb1,_0x4d5af7);return executeTasks(_0x44ef60,_0x499221)[a5_0x3692('0x4e')](_0x5efe75=>__awaiter(this,void 0x0,void 0x0,function*(){yield(0x0,metric_logger_1[a5_0x3692('0x23')])(_0x44ef60);return _0x5efe75;}))[a5_0x3692('0x35')](_0x137377=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x499221[a5_0x3692('0x44')](a5_0x3692('0x1f')+_0x137377[a5_0x3692('0x2d')]+'\x22');throw _0x137377;}));});}exports[a5_0x3692('0x5e')]=startAgent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0xbfc8=['map','axiosMultipleTries','/nx-cloud/executions/complete-run-group','stopAgentsOnFailure','project','defineProperty','__esModule','data','next','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','target','apiAxiosInstance','dteStatus','RUNNER_FAILURE_PERF_ENTRY','true','response','overrides','parseCommand','getBranch','Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.','parallel','throw','join','exit','../../../utilities/environment','createMetricRecorder','then','start','../../../utilities/axios','status','/nx-cloud/executions/status','/nx-cloud/executions/start','__awaiter','maxParallel','value','DistributedExecutionApi','recordMetric','createApiAxiosInstance','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','axiosException','done','message','error','completeRunGroup','false','post','mapRespToPerfEntry','dteStart'];(function(_0x5d29a6,_0xbfc8c0){const _0x440a4c=function(_0x3ec05e){while(--_0x3ec05e){_0x5d29a6['push'](_0x5d29a6['shift']());}};_0x440a4c(++_0xbfc8c0);}(a6_0xbfc8,0x1eb));const a6_0x440a=function(_0x5d29a6,_0xbfc8c0){_0x5d29a6=_0x5d29a6-0x0;let _0x440a4c=a6_0xbfc8[_0x5d29a6];return _0x440a4c;};'use strict';var __awaiter=this&&this[a6_0x440a('0x15')]||function(_0x2951b2,_0x2219c1,_0x11deeb,_0x2ba70e){function _0xcd63a3(_0x3d1c71){return _0x3d1c71 instanceof _0x11deeb?_0x3d1c71:new _0x11deeb(function(_0x243529){_0x243529(_0x3d1c71);});}return new(_0x11deeb||(_0x11deeb=Promise))(function(_0x52e823,_0x5b7f39){function _0x1c0fd1(_0x3e530c){try{_0x233c07(_0x2ba70e[a6_0x440a('0x2d')](_0x3e530c));}catch(_0xb4b52){_0x5b7f39(_0xb4b52);}}function _0xd0787(_0x21e773){try{_0x233c07(_0x2ba70e[a6_0x440a('0xa')](_0x21e773));}catch(_0x36474e){_0x5b7f39(_0x36474e);}}function _0x233c07(_0x4e1b04){_0x4e1b04[a6_0x440a('0x1d')]?_0x52e823(_0x4e1b04[a6_0x440a('0x17')]):_0xcd63a3(_0x4e1b04[a6_0x440a('0x17')])[a6_0x440a('0xf')](_0x1c0fd1,_0xd0787);}_0x233c07((_0x2ba70e=_0x2ba70e['apply'](_0x2951b2,_0x2219c1||[]))[a6_0x440a('0x2d')]());});};Object[a6_0x440a('0x2a')](exports,a6_0x440a('0x2b'),{'value':!![]});exports['createStartRequest']=exports[a6_0x440a('0x18')]=void 0x0;const axios_1=require(a6_0x440a('0x11'));const environment_1=require(a6_0x440a('0xd'));const metric_logger_1=require('../../../utilities/metric-logger');const {output,unparse}=require('../../../utilities/nx-imports');class DistributedExecutionApi{constructor(_0x432272){this[a6_0x440a('0x0')]=(0x0,axios_1[a6_0x440a('0x1a')])(_0x432272);}[a6_0x440a('0x10')](_0xdd9dce){var _0x44fbd1;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x429682=(0x0,metric_logger_1['createMetricRecorder'])(a6_0x440a('0x24'));let _0x3eb522;try{_0x3eb522=yield(0x0,axios_1[a6_0x440a('0x26')])(()=>this[a6_0x440a('0x0')][a6_0x440a('0x22')](a6_0x440a('0x14'),_0xdd9dce));_0x429682[a6_0x440a('0x19')]((0x0,metric_logger_1[a6_0x440a('0x23')])(_0x3eb522));}catch(_0x2b9e93){_0x429682[a6_0x440a('0x19')](((_0x44fbd1=_0x2b9e93===null||_0x2b9e93===void 0x0?void 0x0:_0x2b9e93[a6_0x440a('0x1c')])===null||_0x44fbd1===void 0x0?void 0x0:_0x44fbd1['response'])?(0x0,metric_logger_1[a6_0x440a('0x23')])(_0x2b9e93['axiosException']['response']):metric_logger_1[a6_0x440a('0x2')]);throw _0x2b9e93;}if(!_0x3eb522[a6_0x440a('0x2c')]['enabled']){throw new Error(a6_0x440a('0x8'));}if(_0x3eb522[a6_0x440a('0x2c')][a6_0x440a('0x1f')]){throw new Error(_0x3eb522[a6_0x440a('0x2c')][a6_0x440a('0x1f')]);}return _0x3eb522[a6_0x440a('0x2c')]['id'];});}[a6_0x440a('0x12')](_0x165fdd){var _0x3cdc66;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x79a252=(0x0,metric_logger_1[a6_0x440a('0xe')])(a6_0x440a('0x1'));try{const _0x56ea5e=yield(0x0,axios_1[a6_0x440a('0x26')])(()=>this[a6_0x440a('0x0')][a6_0x440a('0x22')](a6_0x440a('0x13'),{'id':_0x165fdd}));_0x79a252[a6_0x440a('0x19')]((0x0,metric_logger_1[a6_0x440a('0x23')])(_0x56ea5e));return _0x56ea5e[a6_0x440a('0x2c')];}catch(_0x717b53){_0x79a252[a6_0x440a('0x19')](((_0x3cdc66=_0x717b53===null||_0x717b53===void 0x0?void 0x0:_0x717b53[a6_0x440a('0x1c')])===null||_0x3cdc66===void 0x0?void 0x0:_0x3cdc66['response'])?(0x0,metric_logger_1['mapRespToPerfEntry'])(_0x717b53[a6_0x440a('0x1c')][a6_0x440a('0x4')]):metric_logger_1[a6_0x440a('0x2')]);output['error']({'title':_0x717b53[a6_0x440a('0x1e')]});process[a6_0x440a('0xc')](0x1);}});}['completeRunGroupWithError'](_0x538721,_0x35d40c){var _0x29fd6e;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2c7c57=(0x0,metric_logger_1[a6_0x440a('0xe')])(a6_0x440a('0x20'));try{const _0x439cd4=yield(0x0,axios_1[a6_0x440a('0x26')])(()=>this['apiAxiosInstance'][a6_0x440a('0x22')](a6_0x440a('0x27'),{'runGroup':_0x538721,'criticalErrorMessage':_0x35d40c}),0x3);_0x2c7c57[a6_0x440a('0x19')]((0x0,metric_logger_1[a6_0x440a('0x23')])(_0x439cd4));}catch(_0x9463ab){_0x2c7c57[a6_0x440a('0x19')](((_0x29fd6e=_0x9463ab===null||_0x9463ab===void 0x0?void 0x0:_0x9463ab[a6_0x440a('0x1c')])===null||_0x29fd6e===void 0x0?void 0x0:_0x29fd6e[a6_0x440a('0x4')])?(0x0,metric_logger_1['mapRespToPerfEntry'])(_0x9463ab[a6_0x440a('0x1c')][a6_0x440a('0x4')]):metric_logger_1[a6_0x440a('0x2')]);}});}}exports[a6_0x440a('0x18')]=DistributedExecutionApi;function createStartRequest(_0x1a3e22,_0x21da0e,_0x5d7e91){const _0x2ea020=_0x21da0e[a6_0x440a('0x25')](_0x4f6228=>{return _0x4f6228[a6_0x440a('0x25')](_0x1b1fa8=>{return{'taskId':_0x1b1fa8['id'],'hash':_0x1b1fa8['hash'],'projectName':_0x1b1fa8['target'][a6_0x440a('0x29')],'target':_0x1b1fa8['target'][a6_0x440a('0x2f')],'configuration':_0x1b1fa8[a6_0x440a('0x2f')]['configuration']||null,'params':unparse(_0x1b1fa8[a6_0x440a('0x5')])[a6_0x440a('0xb')]('\x20')};});});const _0x3d9a05={'command':(0x0,environment_1[a6_0x440a('0x6')])(),'branch':(0x0,environment_1[a6_0x440a('0x7')])(),'runGroup':_0x1a3e22,'tasks':_0x2ea020,'maxParallel':calculateMaxParallel(_0x5d7e91)};if(environment_1[a6_0x440a('0x1b')]){_0x3d9a05['agentCount']=environment_1[a6_0x440a('0x1b')];}if(!environment_1[a6_0x440a('0x2e')]){_0x3d9a05[a6_0x440a('0x28')]=![];}return _0x3d9a05;}exports['createStartRequest']=createStartRequest;function calculateMaxParallel(_0x30b1b9){if(_0x30b1b9[a6_0x440a('0x9')]===a6_0x440a('0x21')||_0x30b1b9[a6_0x440a('0x9')]===![]){return 0x1;}else if(_0x30b1b9[a6_0x440a('0x9')]===a6_0x440a('0x3')||_0x30b1b9[a6_0x440a('0x9')]===!![]){return Number(_0x30b1b9[a6_0x440a('0x16')]||0x3);}else if(_0x30b1b9[a6_0x440a('0x9')]===undefined){return _0x30b1b9['maxParallel']?Number(_0x30b1b9[a6_0x440a('0x16')]):0x3;}else{return Number(_0x30b1b9['parallel'])||0x3;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a7_0x2ced=['error:\x20','../../../utilities/nx-imports','nxCloudDistributedTasksRunner','find','next','Processing\x20task\x20','FileStorage','error','push','exit','strictlyOrderedTargets','Successfully\x20completed\x20running\x20the\x20command.','Status\x20update','map','length','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','roots','Error:','ErrorReporterApi','retrieve','completedTasks','E2EEncryption','scheduleTask','executionStatus','../../file-storage/e2e-encryption','target','has','findTask','Found\x20unknown\x20task:\x20','projectGraph','delete','executionStatus:\x20','../../error/print-run-group-error','hash','terminalOutput','logCommand','filter','See\x20run\x20details\x20at\x20','splitTasksIntoStages','../../../utilities/create-no-new-messages-timeout','strip-json-comments','addDependencies','completeRunGroupWithError','taskId','message','addTaskDependencies','number\x20of\x20completed\x20tasks:\x20','Starting\x20distributed\x20command\x20execution','../../../utilities/waiter','status','dependencies','__esModule','stdout','copyFilesFromCache','apply','startTask','value','addVerticalSeparator','reset','run','../../../utilities/metric-logger','criticalErrorMessage','defaultTargetDependencies','toString','commandStatus','executionId:\x20','Unable\x20to\x20complete\x20a\x20run.','../../api/error-reporter.api','write','parse','note','encryptionKey','VERBOSE_LOGGING','createTaskGraph','addTaskToGraph','Extracting\x20artifacts','projects','createNoNewMessagesTimeout','axiosException','/nx.json','get','./node_modules/.cache/nx','url','wait','log','ENCRYPTION_KEY','printRunGroupError','createStartRequest','runUrl','start','project','size','Waiting...','COMPLETED','done','add','configuration','defineProperty','keys','../../../utilities/environment','DistributedExecutionApi'];(function(_0xbf4dc4,_0x2ced8a){const _0x2fab7a=function(_0x487e3d){while(--_0x487e3d){_0xbf4dc4['push'](_0xbf4dc4['shift']());}};_0x2fab7a(++_0x2ced8a);}(a7_0x2ced,0x96));const a7_0x2fab=function(_0xbf4dc4,_0x2ced8a){_0xbf4dc4=_0xbf4dc4-0x0;let _0x2fab7a=a7_0x2ced[_0xbf4dc4];return _0x2fab7a;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x42a9e3,_0xae2d89,_0x29f09a,_0x212847){function _0x57a8b1(_0xdc47ff){return _0xdc47ff instanceof _0x29f09a?_0xdc47ff:new _0x29f09a(function(_0x531132){_0x531132(_0xdc47ff);});}return new(_0x29f09a||(_0x29f09a=Promise))(function(_0x2b9e29,_0x586c0a){function _0x88942b(_0x3fc65f){try{_0x3d9cb7(_0x212847[a7_0x2fab('0x38')](_0x3fc65f));}catch(_0x54f3b2){_0x586c0a(_0x54f3b2);}}function _0x34b3c4(_0x79d45f){try{_0x3d9cb7(_0x212847['throw'](_0x79d45f));}catch(_0x40291a){_0x586c0a(_0x40291a);}}function _0x3d9cb7(_0x16c20e){_0x16c20e[a7_0x2fab('0x2d')]?_0x2b9e29(_0x16c20e['value']):_0x57a8b1(_0x16c20e[a7_0x2fab('0x7')])['then'](_0x88942b,_0x34b3c4);}_0x3d9cb7((_0x212847=_0x212847[a7_0x2fab('0x5')](_0x42a9e3,_0xae2d89||[]))['next']());});};Object[a7_0x2fab('0x30')](exports,a7_0x2fab('0x2'),{'value':!![]});exports['TaskGraphCreator']=exports[a7_0x2fab('0x36')]=void 0x0;const stripJsonComments=require(a7_0x2fab('0x5c'));const fs_1=require('fs');const distributed_execution_api_1=require('./distributed-execution.api');const file_storage_1=require('../../file-storage/file-storage');const e2e_encryption_1=require(a7_0x2fab('0x4c'));const waiter_1=require(a7_0x2fab('0x64'));const environment_1=require(a7_0x2fab('0x32'));const print_run_group_error_1=require(a7_0x2fab('0x54'));const create_no_new_messages_timeout_1=require(a7_0x2fab('0x5b'));const metric_logger_1=require(a7_0x2fab('0xb'));const error_reporter_api_1=require(a7_0x2fab('0x12'));const {output,workspaceRoot,getDependencyConfigs,getOutputs,unparse,Cache}=require(a7_0x2fab('0x35'));class NoopLifeCycle{[a7_0x2fab('0x4a')](_0x3ec705){}[a7_0x2fab('0x6')](_0xb18882){}['endTask'](_0x2f70c0,_0x51d9ef){}}function runDistributedExecution(_0xd496a5,_0x228471,_0xd3432,_0x3f51c8,_0x10dbd4,_0x5eda5e,_0x379547){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x433a5c=JSON[a7_0x2fab('0x14')](stripJsonComments((0x0,fs_1['readFileSync'])(workspaceRoot+a7_0x2fab('0x1e'))[a7_0x2fab('0xe')]()));const _0x31dcb0=new TaskOrderer(_0xd3432[a7_0x2fab('0x51')],getDefaultDependencyConfigs(_0x433a5c,_0x228471))[a7_0x2fab('0x5a')](_0x379547);const _0x4dad9c=yield _0xd496a5[a7_0x2fab('0x28')]((0x0,distributed_execution_api_1[a7_0x2fab('0x26')])(_0x5eda5e,_0x31dcb0,_0x228471));return yield processTasks(_0xd496a5,_0x3f51c8,_0x10dbd4,_0x228471,_0x4dad9c,_0x379547,_0xd3432);});}function processTasks(_0x51301d,_0x13e6fe,_0x52e804,_0x391133,_0x5c5425,_0x1b9af4,_0x397851){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x46a82f={};const _0x13d4f5=(0x0,create_no_new_messages_timeout_1[a7_0x2fab('0x1c')])();const _0x263981=new waiter_1['Waiter']();while(!![]){if(environment_1[a7_0x2fab('0x17')]){output[a7_0x2fab('0x15')]({'title':a7_0x2fab('0x2b')});}yield _0x263981[a7_0x2fab('0x22')]();const _0x4fbbbe=yield _0x51301d[a7_0x2fab('0x0')](_0x5c5425);if(environment_1[a7_0x2fab('0x17')]){output[a7_0x2fab('0x15')]({'title':a7_0x2fab('0x40'),'bodyLines':[a7_0x2fab('0x10')+_0x5c5425,a7_0x2fab('0x53')+_0x4fbbbe[a7_0x2fab('0x4b')],a7_0x2fab('0x62')+_0x4fbbbe['completedTasks']['length'],a7_0x2fab('0x34')+_0x4fbbbe[a7_0x2fab('0xc')]]});}if(_0x4fbbbe['criticalErrorMessage']){output[a7_0x2fab('0x3b')]({'title':'Distributed\x20Execution\x20Terminated','bodyLines':[a7_0x2fab('0x45'),_0x4fbbbe[a7_0x2fab('0xc')]]});process['exit'](0x1);}_0x13d4f5(_0x4fbbbe[a7_0x2fab('0x48')][a7_0x2fab('0x42')]);for(const _0x509b95 of _0x4fbbbe['completedTasks']){if(_0x46a82f[_0x509b95['taskId']])continue;yield processTask(_0x13e6fe,_0x52e804,_0x397851,_0x391133,_0x1b9af4,_0x509b95);_0x263981[a7_0x2fab('0x9')]();_0x46a82f[_0x509b95[a7_0x2fab('0x5f')]]=!![];}if(_0x4fbbbe['executionStatus']===a7_0x2fab('0x2c')){return{'commandStatus':_0x4fbbbe[a7_0x2fab('0xf')],'runUrl':_0x4fbbbe[a7_0x2fab('0x27')]};}}});}function processTask(_0x5189b1,_0x5b5a15,_0x24de8f,_0x1a4290,_0x298dd2,_0x56b614){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output[a7_0x2fab('0x15')]({'title':a7_0x2fab('0x39')+_0x56b614[a7_0x2fab('0x5f')]});}const _0x5696e6=_0x298dd2[a7_0x2fab('0x37')](_0x161073=>_0x56b614['taskId']===_0x161073['id']);if(!_0x5696e6){throw new Error(a7_0x2fab('0x50')+_0x56b614[a7_0x2fab('0x5f')]);}if(environment_1[a7_0x2fab('0x17')]){output['note']({'title':'Retrieving\x20artifacts\x20from\x20'+_0x56b614[a7_0x2fab('0x21')]});}yield _0x5189b1[a7_0x2fab('0x47')](_0x56b614[a7_0x2fab('0x55')],_0x56b614['url'],_0x1a4290['cacheDirectory']||a7_0x2fab('0x20'));const _0x28f945=yield _0x5b5a15[a7_0x2fab('0x1f')](Object['assign'](Object['assign']({},_0x5696e6),{'hash':_0x56b614[a7_0x2fab('0x55')]}));const _0x3713be=getOutputs(_0x24de8f[a7_0x2fab('0x51')]['nodes'],_0x5696e6);if(environment_1['VERBOSE_LOGGING']){output[a7_0x2fab('0x15')]({'title':a7_0x2fab('0x1a'),'bodyLines':_0x3713be});}yield _0x5b5a15[a7_0x2fab('0x4')](_0x56b614[a7_0x2fab('0x55')],_0x28f945,_0x3713be);output[a7_0x2fab('0x57')](getCommand(_0x5696e6));process[a7_0x2fab('0x3')][a7_0x2fab('0x13')](_0x28f945[a7_0x2fab('0x56')]);output[a7_0x2fab('0x8')]();});}function getCommand(_0x51b8ed){const _0x3c58b5=unparse(_0x51b8ed['overrides']||{});const _0x8a27bb=_0x51b8ed[a7_0x2fab('0x4d')][a7_0x2fab('0x2f')]?':'+_0x51b8ed[a7_0x2fab('0x4d')]['configuration']:'';return['nx',a7_0x2fab('0xa'),_0x51b8ed[a7_0x2fab('0x4d')][a7_0x2fab('0x29')]+':'+_0x51b8ed[a7_0x2fab('0x4d')][a7_0x2fab('0x4d')]+_0x8a27bb,..._0x3c58b5]['join']('\x20');}const nxCloudDistributedTasksRunner=(_0x4b200d,_0x419918,_0x471125)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1[a7_0x2fab('0x17')]){output['note']({'title':a7_0x2fab('0x63')});}_0x419918['lifeCycle']=new NoopLifeCycle();const _0x3c92ad=(0x0,environment_1['getRunGroup'])();if(!_0x3c92ad){(0x0,print_run_group_error_1[a7_0x2fab('0x25')])();return process[a7_0x2fab('0x3d')](0x1);}const _0x4fa275=new e2e_encryption_1[(a7_0x2fab('0x49'))](environment_1[a7_0x2fab('0x24')]||_0x419918[a7_0x2fab('0x16')]);const _0xa8db4=new error_reporter_api_1[(a7_0x2fab('0x46'))](_0x419918);const _0x5dc0c7=new file_storage_1[(a7_0x2fab('0x3a'))](_0x4fa275,_0xa8db4,!![]);const _0x3b5599=new Cache(_0x419918);const _0x2ebc4b=new distributed_execution_api_1[(a7_0x2fab('0x33'))](_0x419918);try{const _0x40a53c=yield runDistributedExecution(_0x2ebc4b,_0x419918,_0x471125,_0x5dc0c7,_0x3b5599,_0x3c92ad,_0x4b200d);if(_0x40a53c[a7_0x2fab('0xf')]===0x0){output['success']({'title':a7_0x2fab('0x3f'),'bodyLines':[a7_0x2fab('0x59')+_0x40a53c[a7_0x2fab('0x27')]]});}else{output[a7_0x2fab('0x3b')]({'title':'Command\x20execution\x20failed.','bodyLines':['See\x20run\x20details\x20at\x20'+_0x40a53c[a7_0x2fab('0x27')]]});}yield(0x0,metric_logger_1['submitRunMetrics'])(_0x419918);process[a7_0x2fab('0x3d')](_0x40a53c[a7_0x2fab('0xf')]);}catch(_0x787622){output[a7_0x2fab('0x3b')]({'title':a7_0x2fab('0x11'),'bodyLines':[_0x787622[a7_0x2fab('0x60')]]});if(_0x787622['axiosException']){console[a7_0x2fab('0x23')](_0x787622[a7_0x2fab('0x1d')]);}else{console[a7_0x2fab('0x23')](_0x787622);}try{yield _0x2ebc4b[a7_0x2fab('0x5e')](_0x3c92ad,a7_0x2fab('0x43')+_0x787622[a7_0x2fab('0x60')]+'\x22');}finally{process[a7_0x2fab('0x3d')](0x1);}}});exports[a7_0x2fab('0x36')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x38e04f,_0x11aac6){this[a7_0x2fab('0x51')]=_0x38e04f;this[a7_0x2fab('0xd')]=_0x11aac6;}['splitTasksIntoStages'](_0x1c452f){if(_0x1c452f[a7_0x2fab('0x42')]===0x0)return[];const _0x486cb4=[];const _0xfa7f8e=this[a7_0x2fab('0x18')](_0x1c452f);const _0x520ec8=new Set(_0x1c452f['map'](_0x29c760=>_0x29c760['id']));let _0x2bfff1=0x0;while(_0x520ec8[a7_0x2fab('0x2a')]>0x0){const _0x383f42=_0x486cb4[_0x2bfff1]=[];for(const _0x1018b6 of _0x520ec8){let _0x2aba8c=!![];for(const _0x5f28bf of _0xfa7f8e[a7_0x2fab('0x1')][_0x1018b6]){if(_0x520ec8[a7_0x2fab('0x4e')](_0x5f28bf)){_0x2aba8c=![];break;}}if(!_0x2aba8c){continue;}const _0x259dd3=_0xfa7f8e['tasks'][_0x1018b6];_0x383f42[a7_0x2fab('0x3c')](_0x259dd3);}for(const _0x262c46 of _0x383f42){_0x520ec8[a7_0x2fab('0x52')](_0x262c46['id']);}_0x2bfff1++;}return _0x486cb4;}[a7_0x2fab('0x18')](_0xa00008){const _0x220928=new TaskGraphCreator(this['projectGraph'],this['defaultTargetDependencies']);return _0x220928[a7_0x2fab('0x18')](_0xa00008);}}class TaskGraphCreator{constructor(_0x5d6a8d,_0x3eae16){this['projectGraph']=_0x5d6a8d;this[a7_0x2fab('0xd')]=_0x3eae16;}[a7_0x2fab('0x18')](_0x49d376){const _0x2b2b26={'roots':[],'tasks':{},'dependencies':{}};for(const _0x14a137 of _0x49d376){this[a7_0x2fab('0x19')](_0x14a137,_0x2b2b26);const _0x339e80=getDependencyConfigs(_0x14a137[a7_0x2fab('0x4d')],this[a7_0x2fab('0xd')],this['projectGraph']);if(!_0x339e80){continue;}this[a7_0x2fab('0x61')](_0x14a137,_0x339e80,_0x49d376,_0x2b2b26);}_0x2b2b26[a7_0x2fab('0x44')]=Object[a7_0x2fab('0x31')](_0x2b2b26['dependencies'])[a7_0x2fab('0x58')](_0x4a8971=>_0x2b2b26[a7_0x2fab('0x1')][_0x4a8971][a7_0x2fab('0x42')]===0x0);return _0x2b2b26;}[a7_0x2fab('0x61')](_0x343b2b,_0x4bb119,_0x18630d,_0x5361c3){for(const _0x5598f0 of _0x4bb119){if(_0x5598f0['projects']==='self'){for(const _0x56138a of _0x18630d){if(_0x56138a[a7_0x2fab('0x4d')][a7_0x2fab('0x29')]===_0x343b2b['target'][a7_0x2fab('0x29')]&&_0x56138a[a7_0x2fab('0x4d')][a7_0x2fab('0x4d')]===_0x5598f0[a7_0x2fab('0x4d')]){_0x5361c3[a7_0x2fab('0x1')][_0x343b2b['id']][a7_0x2fab('0x3c')](_0x56138a['id']);}}}else if(_0x5598f0[a7_0x2fab('0x1b')]===a7_0x2fab('0x1')){const _0x4608d9=new Set();this[a7_0x2fab('0x5d')](_0x343b2b['target'][a7_0x2fab('0x29')],_0x5598f0['target'],_0x18630d,_0x5361c3,_0x343b2b['id'],_0x4608d9);}}}[a7_0x2fab('0x5d')](_0x3639a4,_0x534373,_0x3f71df,_0x35a484,_0x57b76c,_0x58a094){_0x58a094[a7_0x2fab('0x2e')](_0x3639a4);const _0x204852=this[a7_0x2fab('0x51')][a7_0x2fab('0x1')][_0x3639a4];if(_0x204852){const _0x5ca87e=_0x204852[a7_0x2fab('0x41')](_0xaf9ced=>_0xaf9ced[a7_0x2fab('0x4d')]);for(const _0x463308 of _0x5ca87e){if(_0x58a094[a7_0x2fab('0x4e')](_0x463308)){continue;}const _0x1839ea=this[a7_0x2fab('0x4f')]({'project':_0x463308,'target':_0x534373},_0x3f71df);if(_0x1839ea){if(_0x35a484[a7_0x2fab('0x1')][_0x57b76c]['indexOf'](_0x1839ea['id'])===-0x1){_0x35a484[a7_0x2fab('0x1')][_0x57b76c][a7_0x2fab('0x3c')](_0x1839ea['id']);}}else{this['addDependencies'](_0x463308,_0x534373,_0x3f71df,_0x35a484,_0x57b76c,_0x58a094);}}}}[a7_0x2fab('0x4f')]({project,target},_0x45265d){return _0x45265d[a7_0x2fab('0x37')](_0x3fdcdd=>_0x3fdcdd[a7_0x2fab('0x4d')]['project']===project&&_0x3fdcdd[a7_0x2fab('0x4d')]['target']===target);}[a7_0x2fab('0x19')](_0x566639,_0x45f42e){_0x45f42e['tasks'][_0x566639['id']]=_0x566639;_0x45f42e[a7_0x2fab('0x1')][_0x566639['id']]=[];}}exports['TaskGraphCreator']=TaskGraphCreator;function getDefaultDependencyConfigs(_0x296c5e,_0x35292e){var _0x2fbd29,_0x1c7b36;const _0x73d235=(_0x2fbd29=_0x296c5e['targetDependencies'])!==null&&_0x2fbd29!==void 0x0?_0x2fbd29:{};const _0x59dac3=_0x35292e?(_0x1c7b36=_0x35292e[a7_0x2fab('0x3e')])!==null&&_0x1c7b36!==void 0x0?_0x1c7b36:['build']:[];for(const _0x26ca8e of _0x59dac3){_0x73d235[_0x26ca8e]=_0x73d235[_0x26ca8e]||[];_0x73d235[_0x26ca8e][a7_0x2fab('0x3c')]({'target':_0x26ca8e,'projects':a7_0x2fab('0x1')});}return _0x73d235;}
|
|
1
|
+
const a7_0x43ad=['indexOf','criticalErrorMessage','Extracting\x20artifacts','keys','addTaskDependencies','../../../utilities/metric-logger','logCommand','overrides','/nx.json','number\x20of\x20completed\x20tasks:\x20','map','then','filter','dependencies','has','../../error/print-run-group-error','find','terminalOutput','error','Retrieving\x20artifacts\x20from\x20','self','reset','get','readFileSync','addDependencies','ENCRYPTION_KEY','log','executionStatus','See\x20run\x20details\x20at\x20','join','printRunGroupError','Successfully\x20completed\x20running\x20the\x20command.','axiosException','run','next','completedTasks','completeRunGroupWithError','splitTasksIntoStages','configuration','executionId:\x20','wait','Status\x20update','note','length','Command\x20execution\x20failed.','Found\x20unknown\x20task:\x20','projects','nxCloudDistributedTasksRunner','../../../utilities/environment','VERBOSE_LOGGING','createTaskGraph','push','success','strictlyOrderedTargets','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','executionStatus:\x20','taskId','startTask','add','size','error:\x20','start','commandStatus','../../../utilities/create-no-new-messages-timeout','defineProperty','projectGraph','Starting\x20distributed\x20command\x20execution','Waiter','url','done','throw','tasks','ErrorReporterApi','createStartRequest','strip-json-comments','addTaskToGraph','./distributed-execution.api','message','addVerticalSeparator','createNoNewMessagesTimeout','Error:','status','build','target','hash','../../api/error-reporter.api','project','../../file-storage/file-storage','endTask','toString','runUrl','exit','defaultTargetDependencies','TaskGraphCreator','Processing\x20task\x20','__esModule','FileStorage','nodes','../../file-storage/e2e-encryption','value','../../../utilities/nx-imports','targetDependencies','assign','findTask','stdout','getRunGroup'];(function(_0x36cbfa,_0x43ad29){const _0x33cd3e=function(_0x5a7e7e){while(--_0x5a7e7e){_0x36cbfa['push'](_0x36cbfa['shift']());}};_0x33cd3e(++_0x43ad29);}(a7_0x43ad,0x14a));const a7_0x33cd=function(_0x36cbfa,_0x43ad29){_0x36cbfa=_0x36cbfa-0x0;let _0x33cd3e=a7_0x43ad[_0x36cbfa];return _0x33cd3e;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x2f91ba,_0x5a0d42,_0x22e0d2,_0x39cf93){function _0x506b4c(_0xe07f0){return _0xe07f0 instanceof _0x22e0d2?_0xe07f0:new _0x22e0d2(function(_0x66c508){_0x66c508(_0xe07f0);});}return new(_0x22e0d2||(_0x22e0d2=Promise))(function(_0x1d5efb,_0x8a74af){function _0x8d26f9(_0x322ea3){try{_0x557d8f(_0x39cf93[a7_0x33cd('0x16')](_0x322ea3));}catch(_0x31d101){_0x8a74af(_0x31d101);}}function _0x4e550e(_0x346a7f){try{_0x557d8f(_0x39cf93[a7_0x33cd('0x3a')](_0x346a7f));}catch(_0x3f355d){_0x8a74af(_0x3f355d);}}function _0x557d8f(_0x4f116f){_0x4f116f[a7_0x33cd('0x39')]?_0x1d5efb(_0x4f116f[a7_0x33cd('0x57')]):_0x506b4c(_0x4f116f[a7_0x33cd('0x57')])[a7_0x33cd('0x69')](_0x8d26f9,_0x4e550e);}_0x557d8f((_0x39cf93=_0x39cf93['apply'](_0x2f91ba,_0x5a0d42||[]))['next']());});};Object[a7_0x33cd('0x34')](exports,a7_0x33cd('0x53'),{'value':!![]});exports[a7_0x33cd('0x51')]=exports[a7_0x33cd('0x23')]=void 0x0;const stripJsonComments=require(a7_0x33cd('0x3e'));const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x33cd('0x40'));const file_storage_1=require(a7_0x33cd('0x4b'));const e2e_encryption_1=require(a7_0x33cd('0x56'));const waiter_1=require('../../../utilities/waiter');const environment_1=require(a7_0x33cd('0x24'));const print_run_group_error_1=require(a7_0x33cd('0x3'));const create_no_new_messages_timeout_1=require(a7_0x33cd('0x33'));const metric_logger_1=require(a7_0x33cd('0x63'));const error_reporter_api_1=require(a7_0x33cd('0x49'));const {output,workspaceRoot,getDependencyConfigs,getOutputs,unparse,Cache}=require(a7_0x33cd('0x58'));class NoopLifeCycle{['scheduleTask'](_0x39ec35){}[a7_0x33cd('0x2d')](_0x357ba6){}[a7_0x33cd('0x4c')](_0x546ce6,_0x4678c2){}}function runDistributedExecution(_0x5839ae,_0x2285df,_0x1cff46,_0x455ba6,_0x46b690,_0x3d9140,_0x42fb4b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3672e4=JSON['parse'](stripJsonComments((0x0,fs_1[a7_0x33cd('0xb')])(workspaceRoot+a7_0x33cd('0x66'))[a7_0x33cd('0x4d')]()));const _0x163799=new TaskOrderer(_0x1cff46[a7_0x33cd('0x35')],getDefaultDependencyConfigs(_0x3672e4,_0x2285df))['splitTasksIntoStages'](_0x42fb4b);const _0x5d338e=yield _0x5839ae[a7_0x33cd('0x31')]((0x0,distributed_execution_api_1[a7_0x33cd('0x3d')])(_0x3d9140,_0x163799,_0x2285df));return yield processTasks(_0x5839ae,_0x455ba6,_0x46b690,_0x2285df,_0x5d338e,_0x42fb4b,_0x1cff46);});}function processTasks(_0x288e38,_0x36c01e,_0x151fc0,_0x482edb,_0x477b3a,_0x483eb4,_0x513ce7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3e8562={};const _0x530bf5=(0x0,create_no_new_messages_timeout_1[a7_0x33cd('0x43')])();const _0x48773d=new waiter_1[(a7_0x33cd('0x37'))]();while(!![]){if(environment_1[a7_0x33cd('0x25')]){output['note']({'title':'Waiting...'});}yield _0x48773d[a7_0x33cd('0x1c')]();const _0x49ab1c=yield _0x288e38[a7_0x33cd('0x45')](_0x477b3a);if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a7_0x33cd('0x1d'),'bodyLines':[a7_0x33cd('0x1b')+_0x477b3a,a7_0x33cd('0x2b')+_0x49ab1c[a7_0x33cd('0xf')],a7_0x33cd('0x67')+_0x49ab1c[a7_0x33cd('0x17')][a7_0x33cd('0x1f')],a7_0x33cd('0x30')+_0x49ab1c['criticalErrorMessage']]});}if(_0x49ab1c[a7_0x33cd('0x5f')]){output[a7_0x33cd('0x6')]({'title':'Distributed\x20Execution\x20Terminated','bodyLines':[a7_0x33cd('0x44'),_0x49ab1c[a7_0x33cd('0x5f')]]});process[a7_0x33cd('0x4f')](0x1);}_0x530bf5(_0x49ab1c[a7_0x33cd('0x17')][a7_0x33cd('0x1f')]);for(const _0x53eeb4 of _0x49ab1c[a7_0x33cd('0x17')]){if(_0x3e8562[_0x53eeb4[a7_0x33cd('0x2c')]])continue;yield processTask(_0x36c01e,_0x151fc0,_0x513ce7,_0x482edb,_0x483eb4,_0x53eeb4);_0x48773d[a7_0x33cd('0x9')]();_0x3e8562[_0x53eeb4[a7_0x33cd('0x2c')]]=!![];}if(_0x49ab1c[a7_0x33cd('0xf')]==='COMPLETED'){return{'commandStatus':_0x49ab1c[a7_0x33cd('0x32')],'runUrl':_0x49ab1c[a7_0x33cd('0x4e')]};}}});}function processTask(_0x47e947,_0x180865,_0x180247,_0x3afed1,_0x17a4cc,_0x2c56d9){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a7_0x33cd('0x52')+_0x2c56d9[a7_0x33cd('0x2c')]});}const _0x306746=_0x17a4cc[a7_0x33cd('0x4')](_0x2ec78a=>_0x2c56d9['taskId']===_0x2ec78a['id']);if(!_0x306746){throw new Error(a7_0x33cd('0x21')+_0x2c56d9[a7_0x33cd('0x2c')]);}if(environment_1[a7_0x33cd('0x25')]){output[a7_0x33cd('0x1e')]({'title':a7_0x33cd('0x7')+_0x2c56d9['url']});}yield _0x47e947['retrieve'](_0x2c56d9['hash'],_0x2c56d9[a7_0x33cd('0x38')],_0x3afed1['cacheDirectory']||'./node_modules/.cache/nx');const _0x2df3b4=yield _0x180865[a7_0x33cd('0xa')](Object[a7_0x33cd('0x5a')](Object[a7_0x33cd('0x5a')]({},_0x306746),{'hash':_0x2c56d9[a7_0x33cd('0x48')]}));const _0x2fe417=getOutputs(_0x180247['projectGraph'][a7_0x33cd('0x55')],_0x306746);if(environment_1[a7_0x33cd('0x25')]){output[a7_0x33cd('0x1e')]({'title':a7_0x33cd('0x60'),'bodyLines':_0x2fe417});}yield _0x180865['copyFilesFromCache'](_0x2c56d9[a7_0x33cd('0x48')],_0x2df3b4,_0x2fe417);output[a7_0x33cd('0x64')](getCommand(_0x306746));process[a7_0x33cd('0x5c')]['write'](_0x2df3b4[a7_0x33cd('0x5')]);output[a7_0x33cd('0x42')]();});}function getCommand(_0x87149a){const _0x1624df=unparse(_0x87149a[a7_0x33cd('0x65')]||{});const _0x19159f=_0x87149a[a7_0x33cd('0x47')][a7_0x33cd('0x1a')]?':'+_0x87149a[a7_0x33cd('0x47')][a7_0x33cd('0x1a')]:'';return['nx',a7_0x33cd('0x15'),_0x87149a[a7_0x33cd('0x47')][a7_0x33cd('0x4a')]+':'+_0x87149a['target'][a7_0x33cd('0x47')]+_0x19159f,..._0x1624df][a7_0x33cd('0x11')]('\x20');}const nxCloudDistributedTasksRunner=(_0x1cb563,_0x593152,_0x3f78c6)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a7_0x33cd('0x36')});}_0x593152['lifeCycle']=new NoopLifeCycle();const _0x4a53e3=(0x0,environment_1[a7_0x33cd('0x5d')])();if(!_0x4a53e3){(0x0,print_run_group_error_1[a7_0x33cd('0x12')])();return process[a7_0x33cd('0x4f')](0x1);}const _0x3ce51a=new e2e_encryption_1['E2EEncryption'](environment_1[a7_0x33cd('0xd')]||_0x593152['encryptionKey']);const _0xde889f=new error_reporter_api_1[(a7_0x33cd('0x3c'))](_0x593152);const _0x1cc365=new file_storage_1[(a7_0x33cd('0x54'))](_0x3ce51a,_0xde889f,!![]);const _0x5451b9=new Cache(_0x593152);const _0x3da63e=new distributed_execution_api_1['DistributedExecutionApi'](_0x593152);try{const _0x468c52=yield runDistributedExecution(_0x3da63e,_0x593152,_0x3f78c6,_0x1cc365,_0x5451b9,_0x4a53e3,_0x1cb563);if(_0x468c52[a7_0x33cd('0x32')]===0x0){output[a7_0x33cd('0x28')]({'title':a7_0x33cd('0x13'),'bodyLines':[a7_0x33cd('0x10')+_0x468c52[a7_0x33cd('0x4e')]]});}else{output[a7_0x33cd('0x6')]({'title':a7_0x33cd('0x20'),'bodyLines':['See\x20run\x20details\x20at\x20'+_0x468c52[a7_0x33cd('0x4e')]]});}yield(0x0,metric_logger_1['submitRunMetrics'])(_0x593152);process[a7_0x33cd('0x4f')](_0x468c52[a7_0x33cd('0x32')]);}catch(_0x2119b2){output[a7_0x33cd('0x6')]({'title':'Unable\x20to\x20complete\x20a\x20run.','bodyLines':[_0x2119b2[a7_0x33cd('0x41')]]});if(_0x2119b2[a7_0x33cd('0x14')]){console['log'](_0x2119b2[a7_0x33cd('0x14')]);}else{console[a7_0x33cd('0xe')](_0x2119b2);}try{yield _0x3da63e[a7_0x33cd('0x18')](_0x4a53e3,a7_0x33cd('0x2a')+_0x2119b2[a7_0x33cd('0x41')]+'\x22');}finally{process[a7_0x33cd('0x4f')](0x1);}}});exports[a7_0x33cd('0x23')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x34d180,_0x4c4cd0){this['projectGraph']=_0x34d180;this[a7_0x33cd('0x50')]=_0x4c4cd0;}[a7_0x33cd('0x19')](_0x51e5fe){if(_0x51e5fe[a7_0x33cd('0x1f')]===0x0)return[];const _0x542246=[];const _0x103742=this['createTaskGraph'](_0x51e5fe);const _0x232beb=new Set(_0x51e5fe[a7_0x33cd('0x68')](_0x375191=>_0x375191['id']));let _0x56c55e=0x0;while(_0x232beb[a7_0x33cd('0x2f')]>0x0){const _0x5290aa=_0x542246[_0x56c55e]=[];for(const _0x4da15e of _0x232beb){let _0x291d7b=!![];for(const _0x37f65e of _0x103742['dependencies'][_0x4da15e]){if(_0x232beb[a7_0x33cd('0x2')](_0x37f65e)){_0x291d7b=![];break;}}if(!_0x291d7b){continue;}const _0x4941e5=_0x103742['tasks'][_0x4da15e];_0x5290aa[a7_0x33cd('0x27')](_0x4941e5);}for(const _0x2b92a7 of _0x5290aa){_0x232beb['delete'](_0x2b92a7['id']);}_0x56c55e++;}return _0x542246;}['createTaskGraph'](_0x54b15a){const _0x4b652e=new TaskGraphCreator(this[a7_0x33cd('0x35')],this[a7_0x33cd('0x50')]);return _0x4b652e[a7_0x33cd('0x26')](_0x54b15a);}}class TaskGraphCreator{constructor(_0x477ecb,_0x3156bd){this[a7_0x33cd('0x35')]=_0x477ecb;this[a7_0x33cd('0x50')]=_0x3156bd;}[a7_0x33cd('0x26')](_0x3bb3df){const _0xbc3408={'roots':[],'tasks':{},'dependencies':{}};for(const _0x167024 of _0x3bb3df){this[a7_0x33cd('0x3f')](_0x167024,_0xbc3408);const _0x47f3cc=getDependencyConfigs(_0x167024[a7_0x33cd('0x47')],this[a7_0x33cd('0x50')],this[a7_0x33cd('0x35')]);if(!_0x47f3cc){continue;}this[a7_0x33cd('0x62')](_0x167024,_0x47f3cc,_0x3bb3df,_0xbc3408);}_0xbc3408['roots']=Object[a7_0x33cd('0x61')](_0xbc3408[a7_0x33cd('0x1')])[a7_0x33cd('0x0')](_0xd3a579=>_0xbc3408[a7_0x33cd('0x1')][_0xd3a579][a7_0x33cd('0x1f')]===0x0);return _0xbc3408;}[a7_0x33cd('0x62')](_0x4f725e,_0x50a6eb,_0x56251c,_0x1d7a2c){for(const _0x31c108 of _0x50a6eb){if(_0x31c108[a7_0x33cd('0x22')]===a7_0x33cd('0x8')){for(const _0x4bf6cb of _0x56251c){if(_0x4bf6cb[a7_0x33cd('0x47')]['project']===_0x4f725e['target'][a7_0x33cd('0x4a')]&&_0x4bf6cb[a7_0x33cd('0x47')][a7_0x33cd('0x47')]===_0x31c108[a7_0x33cd('0x47')]){_0x1d7a2c[a7_0x33cd('0x1')][_0x4f725e['id']][a7_0x33cd('0x27')](_0x4bf6cb['id']);}}}else if(_0x31c108[a7_0x33cd('0x22')]===a7_0x33cd('0x1')){const _0x613504=new Set();this[a7_0x33cd('0xc')](_0x4f725e['target'][a7_0x33cd('0x4a')],_0x31c108['target'],_0x56251c,_0x1d7a2c,_0x4f725e['id'],_0x613504);}}}[a7_0x33cd('0xc')](_0x4b7777,_0x4afca2,_0x526786,_0x48ecd1,_0x55e939,_0x43e100){_0x43e100[a7_0x33cd('0x2e')](_0x4b7777);const _0x5df530=this[a7_0x33cd('0x35')][a7_0x33cd('0x1')][_0x4b7777];if(_0x5df530){const _0x7780c=_0x5df530[a7_0x33cd('0x68')](_0x289cb3=>_0x289cb3[a7_0x33cd('0x47')]);for(const _0x2befd5 of _0x7780c){if(_0x43e100['has'](_0x2befd5)){continue;}const _0x5d74c6=this[a7_0x33cd('0x5b')]({'project':_0x2befd5,'target':_0x4afca2},_0x526786);if(_0x5d74c6){if(_0x48ecd1['dependencies'][_0x55e939][a7_0x33cd('0x5e')](_0x5d74c6['id'])===-0x1){_0x48ecd1[a7_0x33cd('0x1')][_0x55e939][a7_0x33cd('0x27')](_0x5d74c6['id']);}}else{this[a7_0x33cd('0xc')](_0x2befd5,_0x4afca2,_0x526786,_0x48ecd1,_0x55e939,_0x43e100);}}}}['findTask']({project,target},_0x5f006b){return _0x5f006b[a7_0x33cd('0x4')](_0x3b72d6=>_0x3b72d6['target'][a7_0x33cd('0x4a')]===project&&_0x3b72d6['target']['target']===target);}[a7_0x33cd('0x3f')](_0x1c8b28,_0x4c9092){_0x4c9092[a7_0x33cd('0x3b')][_0x1c8b28['id']]=_0x1c8b28;_0x4c9092[a7_0x33cd('0x1')][_0x1c8b28['id']]=[];}}exports[a7_0x33cd('0x51')]=TaskGraphCreator;function getDefaultDependencyConfigs(_0x252251,_0x56d98d){var _0x3ec4e7,_0xb601c8;const _0x318ec4=(_0x3ec4e7=_0x252251[a7_0x33cd('0x59')])!==null&&_0x3ec4e7!==void 0x0?_0x3ec4e7:{};const _0x23da57=_0x56d98d?(_0xb601c8=_0x56d98d[a7_0x33cd('0x29')])!==null&&_0xb601c8!==void 0x0?_0xb601c8:[a7_0x33cd('0x46')]:[];for(const _0x3f6045 of _0x23da57){_0x318ec4[_0x3f6045]=_0x318ec4[_0x3f6045]||[];_0x318ec4[_0x3f6045][a7_0x33cd('0x27')]({'target':_0x3f6045,'projects':'dependencies'});}return _0x318ec4;}
|
|
@@ -10,7 +10,7 @@ try {
|
|
|
10
10
|
}
|
|
11
11
|
const { unparse, getDependencyConfigs, getOutputs, } = require('nx/src/tasks-runner/utils');
|
|
12
12
|
const { Cache } = require('nx/src/tasks-runner/cache');
|
|
13
|
-
const { tasksRunner } = require('nx/tasks-
|
|
13
|
+
const { tasksRunner } = require('nx/tasks-runners/default').default;
|
|
14
14
|
const { CompositeLifeCycle } = require('nx/src/tasks-runner/life-cycle');
|
|
15
15
|
exports.runnerReturnsPromise = true;
|
|
16
16
|
exports.output = output;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-imports.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/nx-imports.ts"],"names":[],"mappings":";AAAA,IAAI;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAClD,IAAI,aAAa,CAAC;IAClB,IAAI;QACF,aAAa,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,aAAa,CAAC;KAChE;IAAC,OAAO,EAAE,EAAE;QACX,aAAa,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC,aAAa,CAAC;KACtE;IACD,MAAM,EACJ,OAAO,EACP,oBAAoB,EACpB,UAAU,GACX,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACzC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"nx-imports.js","sourceRoot":"","sources":["../../../../../../libs/nx-packages/nx-cloud/lib/utilities/nx-imports.ts"],"names":[],"mappings":";AAAA,IAAI;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAClD,IAAI,aAAa,CAAC;IAClB,IAAI;QACF,aAAa,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,aAAa,CAAC;KAChE;IAAC,OAAO,EAAE,EAAE;QACX,aAAa,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC,aAAa,CAAC;KACtE;IACD,MAAM,EACJ,OAAO,EACP,oBAAoB,EACpB,UAAU,GACX,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACzC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC;IACpE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAEzE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;IACtC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IAC1B,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;IAClC,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAChD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACpD,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;CACvB;AAAC,WAAM;IACN,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACnE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAChE,MAAM,EACJ,OAAO,EACP,oBAAoB,EACpB,UAAU,GACX,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;IACtD,MAAM,EACJ,aAAa,GACd,GAAG,OAAO,CAAC,kDAAkD,CAAC,CAAC;IAEhE,IAAI,kBAAkB,CAAC;IACvB,IAAI;QACF,kBAAkB;YAChB,OAAO,CAAC,6CAA6C,CAAC,CAAC,kBAAkB,CAAC;KAC7E;IAAC,OAAO,CAAC,EAAE,GAAE;IACd,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;IAEpE,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC;IACrC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,aAAa,GAAG,WAAW,CAAC;IACpC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IAC1B,OAAO,CAAC,WAAW,GAAG,aAAa,CAAC;IACpC,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAChD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACpD,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;CACvB"}
|