@nrwl/nx-cloud 13.2.1 → 13.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/package.json +4 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x54ff=['mapRespToPerfEntry','../../utilities/axios','axiosException','/nx-cloud/executions/complete-run-group','response','completeRunGroup','exit','then','recordMetric','RUNNER_FAILURE_PERF_ENTRY','apiAxiosInstance','axiosMultipleTries','createRunGroup','apply','post','../../utilities/metric-logger','RunGroupApi','../../utilities/nx-imports','throw','value','__awaiter','error','/nx-cloud/executions/create-run-group','createMetricRecorder','__esModule','message','createApiAxiosInstance','done'];(function(_0x3c3ac2,_0x54ff92){const _0x2b399e=function(_0x127907){while(--_0x127907){_0x3c3ac2['push'](_0x3c3ac2['shift']());}};_0x2b399e(++_0x54ff92);}(a0_0x54ff,0x161));const a0_0x2b39=function(_0x3c3ac2,_0x54ff92){_0x3c3ac2=_0x3c3ac2-0x0;let _0x2b399e=a0_0x54ff[_0x3c3ac2];return _0x2b399e;};'use strict';var __awaiter=this&&this[a0_0x2b39('0x3')]||function(_0xb5bd92,_0x18c675,_0x2817cc,_0x4ba41a){function _0x1b1097(_0x3522bf){return _0x3522bf instanceof _0x2817cc?_0x3522bf:new _0x2817cc(function(_0xfab067){_0xfab067(_0x3522bf);});}return new(_0x2817cc||(_0x2817cc=Promise))(function(_0x131155,_0x22c41e){function _0x580c0e(_0x2de508){try{_0xf20894(_0x4ba41a['next'](_0x2de508));}catch(_0x1c64b8){_0x22c41e(_0x1c64b8);}}function _0x54c0de(_0x28fc2e){try{_0xf20894(_0x4ba41a[a0_0x2b39('0x1')](_0x28fc2e));}catch(_0x3ca1e0){_0x22c41e(_0x3ca1e0);}}function _0xf20894(_0x1791e4){_0x1791e4[a0_0x2b39('0xa')]?_0x131155(_0x1791e4[a0_0x2b39('0x2')]):_0x1b1097(_0x1791e4[a0_0x2b39('0x2')])[a0_0x2b39('0x12')](_0x580c0e,_0x54c0de);}_0xf20894((_0x4ba41a=_0x4ba41a[a0_0x2b39('0x18')](_0xb5bd92,_0x18c675||[]))['next']());});};Object['defineProperty'](exports,a0_0x2b39('0x7'),{'value':!![]});exports[a0_0x2b39('0x1b')]=void 0x0;const axios_1=require(a0_0x2b39('0xc'));const metric_logger_1=require(a0_0x2b39('0x1a'));const {output}=require(a0_0x2b39('0x0'));class RunGroupApi{constructor(_0x187af4){this[a0_0x2b39('0x15')]=(0x0,axios_1[a0_0x2b39('0x9')])(_0x187af4);}[a0_0x2b39('0x17')](_0xe48bae,_0x46a74f){var _0x491041;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x510e3c=(0x0,metric_logger_1[a0_0x2b39('0x6')])(a0_0x2b39('0x17'));try{const _0x47c536=yield(0x0,axios_1[a0_0x2b39('0x16')])(()=>this[a0_0x2b39('0x15')]['post'](a0_0x2b39('0x5'),{'branch':_0xe48bae,'runGroup':_0x46a74f}));_0x510e3c['recordMetric']((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x47c536));}catch(_0x23a636){_0x510e3c[a0_0x2b39('0x13')](((_0x491041=_0x23a636===null||_0x23a636===void 0x0?void 0x0:_0x23a636[a0_0x2b39('0xd')])===null||_0x491041===void 0x0?void 0x0:_0x491041['response'])?(0x0,metric_logger_1[a0_0x2b39('0xb')])(_0x23a636[a0_0x2b39('0xd')][a0_0x2b39('0xf')]):metric_logger_1[a0_0x2b39('0x14')]);output[a0_0x2b39('0x4')]({'title':_0x23a636['message']});process['exit'](0x1);}});}[a0_0x2b39('0x10')](_0x1ef6a5){var _0x10ebb9;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x324370=(0x0,metric_logger_1[a0_0x2b39('0x6')])(a0_0x2b39('0x17'));try{const _0x178905=yield(0x0,axios_1['axiosMultipleTries'])(()=>this[a0_0x2b39('0x15')][a0_0x2b39('0x19')](a0_0x2b39('0xe'),{'runGroup':_0x1ef6a5}));_0x324370[a0_0x2b39('0x13')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x178905));}catch(_0xb804bc){_0x324370['recordMetric'](((_0x10ebb9=_0xb804bc===null||_0xb804bc===void 0x0?void 0x0:_0xb804bc[a0_0x2b39('0xd')])===null||_0x10ebb9===void 0x0?void 0x0:_0x10ebb9[a0_0x2b39('0xf')])?(0x0,metric_logger_1['mapRespToPerfEntry'])(_0xb804bc['axiosException'][a0_0x2b39('0xf')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);output[a0_0x2b39('0x4')]({'title':_0xb804bc[a0_0x2b39('0x8')]});process[a0_0x2b39('0x11')](0x1);}});}}exports['RunGroupApi']=RunGroupApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3867=['configuration','params','cacheDirectory','startsWith','../../../utilities/nx-imports','local-cache-hit','toISOString','collectTerminalOutput','statuses','indexOf','defineProperty','tasks','join','readTerminalOutputFile','endTask','.cache','readFileSync','getTerminalOutput','outputObfuscator','endCommand','MAX_CHARACTERS_CACHED_TASK','forEach','cleanUpHashDetails','assign','toString','terminalOutputs','slice','nodes','keys','startTask','cacheStatus','hashDetails','scheduledTasks','status','cacheableOperations','MAX_CHARACTERS_FAILED_TASK','terminalOutput','local-cache','task','runContext','push','endTasks','__esModule','remote-cache','obfuscate','project','Cannot\x20find\x20task\x20','hash','skipNxCache','cache-miss','target','endTime','MAX_CHARACTERS_SUCCESSFUL_TASK','length','CloudEnabledLifeCycle','path','remote-cache-hit','local-cache-kept-existing','TRUNCATED\x0a\x0a','overrides','updateStartedTask','find'];(function(_0x1c1fb6,_0x386714){const _0x552254=function(_0x1731ea){while(--_0x1731ea){_0x1c1fb6['push'](_0x1c1fb6['shift']());}};_0x552254(++_0x386714);}(a0_0x3867,0x6b));const a0_0x5522=function(_0x1c1fb6,_0x386714){_0x1c1fb6=_0x1c1fb6-0x0;let _0x552254=a0_0x3867[_0x1c1fb6];return _0x552254;};'use strict';Object[a0_0x5522('0x1b')](exports,a0_0x5522('0x3b'),{'value':!![]});exports['CloudEnabledLifeCycle']=void 0x0;const path=require(a0_0x5522('0xa'));const path_1=require('path');const fs_1=require('fs');const {appRootPath,unparse}=require(a0_0x5522('0x15'));class CloudEnabledLifeCycle{constructor(_0x2ddde3,_0x482a8d,_0x4adb04,_0xae1955,_0x5532ed,_0x240dc9,_0x19c3e4){this[a0_0x5522('0x38')]=_0x2ddde3;this[a0_0x5522('0x13')]=_0x482a8d;this[a0_0x5522('0x3')]=_0x4adb04;this['collectTerminalOutput']=_0xae1955;this[a0_0x5522('0x33')]=_0x5532ed;this[a0_0x5522('0x23')]=_0x240dc9;this[a0_0x5522('0x1c')]=_0x19c3e4;}['scheduleTask'](_0x45123e){this['runContext'][a0_0x5522('0x31')][a0_0x5522('0x39')](_0x45123e);}[a0_0x5522('0x2e')](_0x4e37ce){const _0x3f65e2=Object[a0_0x5522('0x28')]({},_0x4e37ce[a0_0x5522('0xe')]||{});if(_0x4e37ce['target']['configuration']){_0x3f65e2[a0_0x5522('0x11')]=_0x4e37ce[a0_0x5522('0x5')][a0_0x5522('0x11')];}this['tasks'][a0_0x5522('0x39')]({'taskId':_0x4e37ce['id'],'startTime':new Date()[a0_0x5522('0x17')](),'target':_0x4e37ce[a0_0x5522('0x5')][a0_0x5522('0x5')],'projectName':_0x4e37ce[a0_0x5522('0x5')][a0_0x5522('0x0')],'hash':_0x4e37ce['hash'],'hashDetails':this['cleanUpHashDetails'](_0x4e37ce[a0_0x5522('0x30')]),'params':unparse(_0x3f65e2)['join']('\x20')});}[a0_0x5522('0x1f')](_0x3a2d26,_0x573033){let _0x2a93f1;if(this['runContext'][a0_0x5522('0x19')][_0x3a2d26[a0_0x5522('0x2')]]){_0x2a93f1=this['runContext'][a0_0x5522('0x19')][_0x3a2d26[a0_0x5522('0x2')]];}else{if(this[a0_0x5522('0x33')][a0_0x5522('0x1a')](_0x3a2d26[a0_0x5522('0x5')][a0_0x5522('0x5')])>-0x1&&!this[a0_0x5522('0x3')]){_0x2a93f1=a0_0x5522('0x16');}else{_0x2a93f1=a0_0x5522('0x4');}}this[a0_0x5522('0xf')](_0x3a2d26,_0x573033,_0x2a93f1);}[a0_0x5522('0x3a')](_0x471ae4){for(let _0x166858 of _0x471ae4){const _0x5384d9=_0x166858[a0_0x5522('0x32')]===a0_0x5522('0x3c')?a0_0x5522('0xb'):_0x166858[a0_0x5522('0x32')]===a0_0x5522('0x36')||_0x166858['status']===a0_0x5522('0xc')?a0_0x5522('0x16'):'cache-miss';this[a0_0x5522('0xf')](_0x166858[a0_0x5522('0x37')],_0x166858['code'],_0x5384d9);}}[a0_0x5522('0x24')](){}[a0_0x5522('0xf')](_0x3dc606,_0x1e011c,_0x4ecc57){const _0x483003=this[a0_0x5522('0x1c')][a0_0x5522('0x10')](_0x2ca212=>_0x2ca212['taskId']===_0x3dc606['id']);if(!_0x483003){throw new Error(a0_0x5522('0x1')+_0x3dc606['id']);}_0x483003[a0_0x5522('0x6')]=new Date()[a0_0x5522('0x17')]();_0x483003[a0_0x5522('0x32')]=_0x1e011c;_0x483003['params']=this[a0_0x5522('0x23')][a0_0x5522('0x3d')](_0x483003[a0_0x5522('0x12')]);_0x483003[a0_0x5522('0x2f')]=_0x4ecc57;if(this[a0_0x5522('0x18')]){_0x483003[a0_0x5522('0x35')]=this[a0_0x5522('0x22')](_0x3dc606['hash'],_0x483003['cacheStatus'],_0x1e011c);}}[a0_0x5522('0x22')](_0x35e3e1,_0x1d8a18,_0x5477cb){let _0x3853cc;if(this[a0_0x5522('0x13')]){if(this['cacheDirectory'][a0_0x5522('0x14')]('./')){_0x3853cc=(0x0,path_1[a0_0x5522('0x1d')])(appRootPath,this[a0_0x5522('0x13')]);}else{_0x3853cc=this['cacheDirectory'];}}else{_0x3853cc=(0x0,path_1[a0_0x5522('0x1d')])(appRootPath,'node_modules',a0_0x5522('0x20'),'nx');}try{const _0x5bae87=this[a0_0x5522('0x1e')](_0x3853cc,_0x35e3e1);const _0xd4d81d=this[a0_0x5522('0x23')][a0_0x5522('0x3d')](_0x5bae87);const _0x23e950=_0x1d8a18===a0_0x5522('0x4')?_0x5477cb===0x0?CloudEnabledLifeCycle[a0_0x5522('0x7')]:CloudEnabledLifeCycle['MAX_CHARACTERS_FAILED_TASK']:CloudEnabledLifeCycle[a0_0x5522('0x25')];return _0xd4d81d[a0_0x5522('0x8')]>_0x23e950?a0_0x5522('0xd')+_0xd4d81d[a0_0x5522('0x2b')](_0xd4d81d[a0_0x5522('0x8')]-_0x23e950):_0xd4d81d;}catch(_0x1aff01){return'';}}[a0_0x5522('0x27')](_0x1c7cef){const _0x2896fd={};Object[a0_0x5522('0x2d')](_0x1c7cef['nodes'])['filter'](_0x2ac5fc=>!_0x2ac5fc[a0_0x5522('0x14')]('npm:'))[a0_0x5522('0x26')](_0x3bd13a=>{_0x2896fd[_0x3bd13a]=_0x1c7cef[a0_0x5522('0x2c')][_0x3bd13a];});return{'nodes':_0x2896fd,'runtime':_0x1c7cef['runtime'],'implicitDeps':_0x1c7cef['implicitDeps']};}[a0_0x5522('0x1e')](_0x37fa10,_0x8b916b){try{return(0x0,fs_1[a0_0x5522('0x21')])(path[a0_0x5522('0x1d')](_0x37fa10,a0_0x5522('0x2a'),_0x8b916b))['toString']();}catch(_0x279348){try{return(0x0,fs_1[a0_0x5522('0x21')])(path[a0_0x5522('0x1d')](_0x37fa10,_0x8b916b,a0_0x5522('0x35')))[a0_0x5522('0x29')]();}catch(_0x4926bb){return'';}}}}exports[a0_0x5522('0x9')]=CloudEnabledLifeCycle;CloudEnabledLifeCycle[a0_0x5522('0x34')]=0x30d40;CloudEnabledLifeCycle[a0_0x5522('0x7')]=0x4e20;CloudEnabledLifeCycle['MAX_CHARACTERS_CACHED_TASK']=0x1388;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x1a7e=['tasks-hashes-','all','scan','assign','throw','EndOfRunMessage','lifeCycle','../../file-storage/file-storage','subscribe','MessageReporter','extractGitSha','waitForStoreRequestsToComplete','toISOString','encryptionKey','CloudRunApi','exit','CloudEnabledLifeCycle','env','getRunGroup','cacheDirectory','../../terminal-output/end-of-run-message','skipNxCache','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION','path','anyErrors','printCacheHitsMessage','./cloud-enabled-life-cycle','then','../../../utilities/nx-imports','printMessages','next','submitRunMetrics','maskedProperties','OutputObfuscator','Subject','getBranch','VERBOSE_LOGGING','error','done','../../terminal-output/message-reporter','__esModule','E2EEncryption','Agent\x20wasn\x27t\x20able\x20to\x20store\x20artifacts','note','../../../utilities/metric-logger','map','forEach','value','hash','__awaiter','parseCommand','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','cacheableOperations','writeFileSync','Executed\x20tasks\x20with\x20hashes:\x20','Agent\x20wasn\x27t\x20able\x20to\x20record\x20its\x20run','taskId','endRun','./node_modules/.cache/nx','getMachineInfo'];(function(_0x495555,_0x1a7e07){const _0x2e5687=function(_0x89ba06){while(--_0x89ba06){_0x495555['push'](_0x495555['shift']());}};_0x2e5687(++_0x1a7e07);}(a1_0x1a7e,0x198));const a1_0x2e56=function(_0x495555,_0x1a7e07){_0x495555=_0x495555-0x0;let _0x2e5687=a1_0x1a7e[_0x495555];return _0x2e5687;};'use strict';var __awaiter=this&&this[a1_0x2e56('0x8')]||function(_0x39d90a,_0x49a1b5,_0x188742,_0x27317a){function _0xcc899(_0x10956f){return _0x10956f instanceof _0x188742?_0x10956f:new _0x188742(function(_0x1ac0d3){_0x1ac0d3(_0x10956f);});}return new(_0x188742||(_0x188742=Promise))(function(_0x4fc4b0,_0x544bac){function _0x5aca2f(_0xc02672){try{_0x53d4f4(_0x27317a[a1_0x2e56('0x32')](_0xc02672));}catch(_0x4bb9ff){_0x544bac(_0x4bb9ff);}}function _0x3a19de(_0xd8eda6){try{_0x53d4f4(_0x27317a[a1_0x2e56('0x17')](_0xd8eda6));}catch(_0x17eb3a){_0x544bac(_0x17eb3a);}}function _0x53d4f4(_0x34752b){_0x34752b[a1_0x2e56('0x3a')]?_0x4fc4b0(_0x34752b[a1_0x2e56('0x6')]):_0xcc899(_0x34752b[a1_0x2e56('0x6')])[a1_0x2e56('0x2f')](_0x5aca2f,_0x3a19de);}_0x53d4f4((_0x27317a=_0x27317a['apply'](_0x39d90a,_0x49a1b5||[]))[a1_0x2e56('0x32')]());});};Object['defineProperty'](exports,a1_0x2e56('0x3c'),{'value':!![]});exports['cloudEnabledTasksRunner']=void 0x0;const Subject_1=require('rxjs/internal/Subject');const message_reporter_1=require(a1_0x2e56('0x3b'));const end_of_run_message_1=require(a1_0x2e56('0x27'));const output_obfuscator_1=require('../../terminal-output/output-obfuscator');const cloud_enabled_life_cycle_1=require(a1_0x2e56('0x2e'));const file_storage_1=require(a1_0x2e56('0x1a'));const e2e_encryption_1=require('../../file-storage/e2e-encryption');const environment_1=require('../../../utilities/environment');const cloud_remote_cache_1=require('./cloud-remote-cache');const cloud_run_api_1=require('./cloud-run.api');const fs_1=require('fs');const path=require(a1_0x2e56('0x2b'));const metric_logger_1=require(a1_0x2e56('0x3'));const {tasksRunnerV2,output}=require('../../../utilities/nx-imports');function createApi(_0x189fc2,_0x3a7d05,_0x5f4a1a){const _0x5840ed=(0x0,environment_1[a1_0x2e56('0x12')])(_0x3a7d05);return new cloud_run_api_1[(a1_0x2e56('0x21'))](_0x189fc2,_0x5f4a1a,_0x3a7d05,_0x5840ed);}function storeTaskHashes(_0x1f150b,_0x538f8e,_0x81e255){const _0xc3d61f=JSON['stringify'](_0x1f150b['map'](_0x2103aa=>({'taskId':_0x2103aa[a1_0x2e56('0xf')],'hash':_0x2103aa[a1_0x2e56('0x7')]})));if(environment_1[a1_0x2e56('0x38')]){output[a1_0x2e56('0x2')]({'title':a1_0x2e56('0xd')+_0xc3d61f});}(0x0,fs_1[a1_0x2e56('0xc')])(path['join'](_0x538f8e,a1_0x2e56('0x13')+_0x81e255),_0xc3d61f);}function onComplete(_0x370f61,_0x2d3a88,_0x2053e2,_0x41b168,_0x4b44a0,_0x183a08,_0x2cbbea,_0x57fc56,_0x524e3f,_0x58a699){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x531132=new Date()[a1_0x2e56('0x1f')]();if(environment_1[a1_0x2e56('0x2a')]){storeTaskHashes(_0x524e3f,_0x2d3a88[a1_0x2e56('0x26')]||a1_0x2e56('0x11'),environment_1[a1_0x2e56('0x29')]);}const _0x5a6098=(0x0,environment_1[a1_0x2e56('0x37')])();const _0x15f0ad=yield Promise[a1_0x2e56('0x14')]([_0x2053e2[a1_0x2e56('0x1e')](),_0x41b168[a1_0x2e56('0x10')]({'command':_0x4b44a0['obfuscate']((0x0,environment_1[a1_0x2e56('0x9')])()),'startTime':_0x183a08,'endTime':_0x531132,'distributedExecutionId':environment_1[a1_0x2e56('0x29')],'branch':_0x5a6098,'scan':!![],'runGroup':(0x0,environment_1[a1_0x2e56('0x25')])(),'sha':_0x5a6098?(0x0,environment_1[a1_0x2e56('0x1d')])():undefined},_0x524e3f)]);if(_0x58a699){setTimeout(()=>{_0x2cbbea[a1_0x2e56('0x31')]();if(!_0x2cbbea[a1_0x2e56('0x2c')]){_0x57fc56[a1_0x2e56('0x2d')]();}},0x0);}else{_0x2cbbea[a1_0x2e56('0x31')]();if(!_0x2cbbea[a1_0x2e56('0x2c')]){_0x57fc56[a1_0x2e56('0x2d')]();}}if(environment_1['AGENT_RUNNING_IN_DISTRIBUTED_EXECUTION']){if(!_0x15f0ad[0x0]){output[a1_0x2e56('0x39')]({'title':a1_0x2e56('0x1')});_0x2cbbea[a1_0x2e56('0x31')]();process[a1_0x2e56('0x22')](environment_1[a1_0x2e56('0xa')]);}if(!_0x15f0ad[0x1]){output[a1_0x2e56('0x39')]({'title':a1_0x2e56('0xe')});_0x2cbbea[a1_0x2e56('0x31')]();process[a1_0x2e56('0x22')](environment_1['DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE']);}}yield(0x0,metric_logger_1[a1_0x2e56('0x33')])(_0x2d3a88);});}function createLifeCycle(_0x403434,_0x396e69,_0x1a5406,_0x345b58){const _0x5876d0=new cloud_enabled_life_cycle_1[(a1_0x2e56('0x23'))](_0x403434,_0x396e69[a1_0x2e56('0x26')],!!_0x396e69[a1_0x2e56('0x28')],_0x396e69[a1_0x2e56('0x15')]===undefined?!![]:_0x396e69['scan'],_0x396e69[a1_0x2e56('0xb')]||[],_0x1a5406,_0x345b58);try{const {CompositeLifeCycle}=require(a1_0x2e56('0x30'));if(!CompositeLifeCycle)return _0x5876d0;return new CompositeLifeCycle([_0x396e69['lifeCycle'],_0x5876d0]);}catch(_0xf5f066){return _0x5876d0;}}function cloudEnabledTasksRunner(_0x1c7391,_0x55f356,_0x187cc8){const _0x387627={'statuses':{},'scheduledTasks':[],'requests':{},'allTasks':_0x1c7391};const _0x391e40=_0x55f356[a1_0x2e56('0x19')]===undefined;const _0x555679=[];const _0x5baef8=new message_reporter_1[(a1_0x2e56('0x1c'))](_0x55f356);const _0x50be99=createApi(_0x5baef8,_0x55f356,_0x387627);const _0x520e74=new end_of_run_message_1[(a1_0x2e56('0x18'))](_0x387627,_0x555679);const _0xb96ded=new output_obfuscator_1[(a1_0x2e56('0x35'))](_0x55f356[a1_0x2e56('0x34')]);const _0x522f47=_0x1c7391[a1_0x2e56('0x4')](_0x218df9=>_0x218df9['hash'])['filter'](_0x35f80c=>!!_0x35f80c);const _0x373a11=_0x50be99['startRun'](environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_ID'],_0x522f47);_0x522f47[a1_0x2e56('0x5')](_0x5d3935=>{_0x387627['requests'][_0x5d3935]=_0x373a11;});const _0x4404db=new Date()[a1_0x2e56('0x1f')]();const _0x4ecae9=createLifeCycle(_0x387627,_0x55f356,_0xb96ded,_0x555679);const _0x4b65ac=new e2e_encryption_1[(a1_0x2e56('0x0'))](environment_1['ENCRYPTION_KEY']||_0x55f356[a1_0x2e56('0x20')]);const _0x21dec6=new file_storage_1['FileStorage'](_0x4b65ac);const _0xbc87fa=new cloud_remote_cache_1['CloudRemoteCache'](_0x5baef8,_0x50be99,_0x387627,_0x21dec6);delete process[a1_0x2e56('0x24')][a1_0x2e56('0x29')];const _0x24f702=tasksRunnerV2(_0x1c7391,Object[a1_0x2e56('0x16')](Object['assign']({},_0x55f356),{'remoteCache':_0xbc87fa,'lifeCycle':_0x4ecae9}),_0x187cc8);if(_0x24f702[a1_0x2e56('0x1b')]){const _0x4457ed=new Subject_1[(a1_0x2e56('0x36'))]();_0x24f702[a1_0x2e56('0x1b')]({'next':_0x11d664=>_0x4457ed[a1_0x2e56('0x32')](_0x11d664),'error':_0x115c94=>_0x4457ed['error'](_0x115c94),'complete':()=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x4ecae9,_0x55f356,_0xbc87fa,_0x50be99,_0xb96ded,_0x4404db,_0x5baef8,_0x520e74,_0x555679,_0x391e40);_0x4457ed['complete']();})});return _0x4457ed;}else{return _0x24f702['then'](_0x3265f2=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x4ecae9,_0x55f356,_0xbc87fa,_0x50be99,_0xb96ded,_0x4404db,_0x5baef8,_0x520e74,_0x555679,_0x391e40);return _0x3265f2;}))['catch'](_0x40b459=>__awaiter(this,void 0x0,void 0x0,function*(){yield onComplete(_0x4ecae9,_0x55f356,_0xbc87fa,_0x50be99,_0xb96ded,_0x4404db,_0x5baef8,_0x520e74,_0x555679,_0x391e40);throw _0x40b459;}));}}exports['cloudEnabledTasksRunner']=cloudEnabledTasksRunner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x495a=['requests','VERBOSE_LOGGING','remote-cache-hit','resolve','value','hashUrls','filter','cache-miss','extractErrorMessage','defineProperty','messages','storeRequests','runContext','retrieve','get','store','axiosException','../../../utilities/environment','statuses','CloudRemoteCache','push','Nx\x20Cloud:\x20Cache\x20miss\x20','api','response','waitForStoreRequestsToComplete','hash','throw','cacheError','put','NX_CLOUD_DISTRIBUTED_EXECUTION_ID','then','.\x20Read\x20only\x20token\x20is\x20used.','../../../utilities/nx-imports','storage','fileStorage','reduce','.\x20Status\x20404.','all','map','startRun','apply','done'];(function(_0x3df1c9,_0x495a09){const _0x135098=function(_0x4ab5cd){while(--_0x4ab5cd){_0x3df1c9['push'](_0x3df1c9['shift']());}};_0x135098(++_0x495a09);}(a2_0x495a,0x168));const a2_0x1350=function(_0x3df1c9,_0x495a09){_0x3df1c9=_0x3df1c9-0x0;let _0x135098=a2_0x495a[_0x3df1c9];return _0x135098;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x4f4422,_0x134dca,_0x3e0c42,_0x17706d){function _0x359e3e(_0x496fc3){return _0x496fc3 instanceof _0x3e0c42?_0x496fc3:new _0x3e0c42(function(_0x173975){_0x173975(_0x496fc3);});}return new(_0x3e0c42||(_0x3e0c42=Promise))(function(_0xdd88c6,_0x777d7c){function _0x36eef3(_0x15cfdf){try{_0x2decca(_0x17706d['next'](_0x15cfdf));}catch(_0x29c030){_0x777d7c(_0x29c030);}}function _0x1f6d42(_0x48fbbf){try{_0x2decca(_0x17706d[a2_0x1350('0x2')](_0x48fbbf));}catch(_0x25fd92){_0x777d7c(_0x25fd92);}}function _0x2decca(_0x140e1c){_0x140e1c[a2_0x1350('0x11')]?_0xdd88c6(_0x140e1c[a2_0x1350('0x16')]):_0x359e3e(_0x140e1c[a2_0x1350('0x16')])[a2_0x1350('0x6')](_0x36eef3,_0x1f6d42);}_0x2decca((_0x17706d=_0x17706d[a2_0x1350('0x10')](_0x4f4422,_0x134dca||[]))['next']());});};Object[a2_0x1350('0x1b')](exports,'__esModule',{'value':!![]});exports[a2_0x1350('0x25')]=void 0x0;const environment_1=require(a2_0x1350('0x23'));const {output}=require(a2_0x1350('0x8'));class CloudRemoteCache{constructor(_0x2aa2d3,_0x417e5a,_0x208a03,_0x232547){this['messages']=_0x2aa2d3;this[a2_0x1350('0x28')]=_0x417e5a;this[a2_0x1350('0x1e')]=_0x208a03;this[a2_0x1350('0xa')]=_0x232547;this[a2_0x1350('0x1d')]=[];}[a2_0x1350('0x1f')](_0x2fb89c,_0x41a874){var _0x2643de;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a2_0x1350('0x1c')][a2_0x1350('0x3')])return![];const _0x49feab=yield this[a2_0x1350('0x17')](_0x2fb89c);if(!_0x49feab||!_0x49feab[a2_0x1350('0x20')]){if(environment_1[a2_0x1350('0x13')]){output['note']({'title':a2_0x1350('0x27')+_0x2fb89c+'.'});}this[a2_0x1350('0x1e')][a2_0x1350('0x24')][_0x2fb89c]=a2_0x1350('0x19');return![];}try{yield this[a2_0x1350('0xa')]['retrieve'](_0x2fb89c,_0x49feab[a2_0x1350('0x20')],_0x41a874);this[a2_0x1350('0x1e')][a2_0x1350('0x24')][_0x2fb89c]=a2_0x1350('0x14');return!![];}catch(_0xdfbe53){const _0x2205ca=(_0x2643de=_0xdfbe53['axiosException'])!==null&&_0x2643de!==void 0x0?_0x2643de:_0xdfbe53;if(_0x2205ca[a2_0x1350('0x29')]&&_0x2205ca[a2_0x1350('0x29')]['status']===0x194){if(environment_1[a2_0x1350('0x13')]){output['note']({'title':a2_0x1350('0x27')+_0x2fb89c+a2_0x1350('0xc')});}}else{this[a2_0x1350('0x1c')][a2_0x1350('0x3')]=this[a2_0x1350('0x1c')]['extractErrorMessage'](_0x2205ca,a2_0x1350('0x9'));}this[a2_0x1350('0x1e')][a2_0x1350('0x24')][_0x2fb89c]='cache-miss';return![];}});}[a2_0x1350('0x21')](_0x5ddeea,_0x33eee9){return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a2_0x1350('0x1c')][a2_0x1350('0x3')])return![];const _0x3bbfca=Promise[a2_0x1350('0x15')]()[a2_0x1350('0x6')](()=>__awaiter(this,void 0x0,void 0x0,function*(){var _0x15975b;const _0x1fcc30=yield this[a2_0x1350('0x17')](_0x5ddeea);if(!_0x1fcc30)return![];if(!_0x1fcc30[a2_0x1350('0x4')]){if(environment_1[a2_0x1350('0x13')]){output['note']({'title':'Nx\x20Cloud:\x20Skipping\x20storing\x20'+_0x5ddeea+a2_0x1350('0x7')});}return!![];}try{yield this[a2_0x1350('0xa')][a2_0x1350('0x21')](_0x5ddeea,_0x1fcc30[a2_0x1350('0x4')],_0x33eee9);return!![];}catch(_0x5921b9){const _0x199941=(_0x15975b=_0x5921b9[a2_0x1350('0x22')])!==null&&_0x15975b!==void 0x0?_0x15975b:_0x5921b9;this['messages']['cacheError']=this[a2_0x1350('0x1c')][a2_0x1350('0x1a')](_0x199941,a2_0x1350('0x9'));return![];}}));this[a2_0x1350('0x1d')][a2_0x1350('0x26')](_0x3bbfca);return _0x3bbfca;});}[a2_0x1350('0x17')](_0x7cfb39){return __awaiter(this,void 0x0,void 0x0,function*(){if(_0x7cfb39 in this[a2_0x1350('0x1e')]['requests']){return(yield this[a2_0x1350('0x1e')][a2_0x1350('0x12')][_0x7cfb39])[_0x7cfb39];}else{const _0x4e9843=this[a2_0x1350('0x1e')]['scheduledTasks'][a2_0x1350('0x18')](_0x26c84a=>!this[a2_0x1350('0x1e')]['requests'][_0x26c84a[a2_0x1350('0x1')]])[a2_0x1350('0xe')](_0x37a0a8=>_0x37a0a8[a2_0x1350('0x1')]);if(_0x4e9843['indexOf'](_0x7cfb39)===-0x1){_0x4e9843[a2_0x1350('0x26')](_0x7cfb39);}const _0x35aa74=this[a2_0x1350('0x28')][a2_0x1350('0xf')](environment_1[a2_0x1350('0x5')],_0x4e9843);_0x4e9843['forEach'](_0x45d8ae=>{this[a2_0x1350('0x1e')][a2_0x1350('0x12')][_0x45d8ae]=_0x35aa74;});return(yield _0x35aa74)[_0x7cfb39];}});}[a2_0x1350('0x0')](){return Promise[a2_0x1350('0xd')](this[a2_0x1350('0x1d')])[a2_0x1350('0x6')](_0x333194=>_0x333194[a2_0x1350('0xb')]((_0x48e1a3,_0x4f6e0f)=>_0x48e1a3&&_0x4f6e0f,!![]));}}exports[a2_0x1350('0x25')]=CloudRemoteCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x885d=['createApiAxiosInstance','__esModule','defineProperty','__awaiter','terminalOutput','axiosMultipleTries','unknown','promisify','api','success','value','apiError','next','Stack\x20Trace:','status','slice','mapRespToPerfEntry','util','headers','runContext','Run\x20Details:','../../../utilities/axios','error','data','nxCloudVersion','readFileSync','endRun','from','Run\x20completion\x20responded\x20with\x20`undefined`.','stack','string','response','../../../utilities/nx-imports','apiAxiosInstance','VERBOSE_LOGGING','RUNNER_FAILURE_PERF_ENTRY','startRun','assign','@nrwl/nx-cloud','CloudRunApi','defaults','apply','urls','Invalid\x20end\x20run\x20response:\x20','/nx-cloud/runs/end','note','...','stringify','Nx\x20Cloud:\x20Unknown\x20Error\x20Occurred','axiosException','extractErrorMessage','messages','gzip','message','Invalid\x20Nx\x20Cloud\x20response:\x20','runUrl','recordMetric','Invalid\x20end\x20run\x20response','getBranch','/nx-cloud/runs/start'];(function(_0x515497,_0x885d0e){const _0xe1c6a0=function(_0x4074b3){while(--_0x4074b3){_0x515497['push'](_0x515497['shift']());}};_0xe1c6a0(++_0x885d0e);}(a3_0x885d,0x79));const a3_0xe1c6=function(_0x515497,_0x885d0e){_0x515497=_0x515497-0x0;let _0xe1c6a0=a3_0x885d[_0x515497];return _0xe1c6a0;};'use strict';var __awaiter=this&&this[a3_0xe1c6('0x2')]||function(_0x4672c6,_0x35ba64,_0x129dc4,_0x2ecea3){function _0x407fb9(_0x4d73d8){return _0x4d73d8 instanceof _0x129dc4?_0x4d73d8:new _0x129dc4(function(_0x42c52b){_0x42c52b(_0x4d73d8);});}return new(_0x129dc4||(_0x129dc4=Promise))(function(_0x4674a6,_0x1dfed2){function _0x289f85(_0x3c36ae){try{_0x24a912(_0x2ecea3[a3_0xe1c6('0xb')](_0x3c36ae));}catch(_0x5f140a){_0x1dfed2(_0x5f140a);}}function _0x2a7a81(_0x43c6ab){try{_0x24a912(_0x2ecea3['throw'](_0x43c6ab));}catch(_0x55a167){_0x1dfed2(_0x55a167);}}function _0x24a912(_0xace957){_0xace957['done']?_0x4674a6(_0xace957[a3_0xe1c6('0x9')]):_0x407fb9(_0xace957[a3_0xe1c6('0x9')])['then'](_0x289f85,_0x2a7a81);}_0x24a912((_0x2ecea3=_0x2ecea3[a3_0xe1c6('0x28')](_0x4672c6,_0x35ba64||[]))[a3_0xe1c6('0xb')]());});};Object[a3_0xe1c6('0x1')](exports,a3_0xe1c6('0x0'),{'value':!![]});exports['CloudRunApi']=void 0x0;const axios_1=require(a3_0xe1c6('0x14'));const environment_1=require('../../../utilities/environment');const fs_1=require('fs');const zlib_1=require('zlib');const util_1=require(a3_0xe1c6('0x10'));const metric_logger_1=require('../../../utilities/metric-logger');const {output}=require(a3_0xe1c6('0x1f'));class CloudRunApi{constructor(_0x583147,_0xb5373c,_0xd58050,_0x1f1e2e){this[a3_0xe1c6('0x32')]=_0x583147;this[a3_0xe1c6('0x12')]=_0xb5373c;this['machineInfo']=_0x1f1e2e;this['apiAxiosInstance']=(0x0,axios_1[a3_0xe1c6('0x3b')])(_0xd58050);}[a3_0xe1c6('0x23')](_0x7b4b0c,_0x42a9f6){var _0x4b8062;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2e70ea=(0x0,metric_logger_1['createMetricRecorder'])(a3_0xe1c6('0x23'));try{const _0xc619d7={'meta':{'nxCloudVersion':this[a3_0xe1c6('0x17')]()},'branch':(0x0,environment_1[a3_0xe1c6('0x39')])(),'runGroup':(0x0,environment_1['getRunGroup'])(),'distributedExecutionId':_0x7b4b0c,'hashes':_0x42a9f6};if(environment_1[a3_0xe1c6('0x21')]){output[a3_0xe1c6('0x2c')]({'title':'RunStart','bodyLines':['\x0a'+JSON[a3_0xe1c6('0x2e')](_0xc619d7,null,0x2)]});}const _0x28a458=yield(0x0,axios_1[a3_0xe1c6('0x4')])(()=>this[a3_0xe1c6('0x20')]['post'](a3_0xe1c6('0x3a'),_0xc619d7));_0x2e70ea[a3_0xe1c6('0x37')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x28a458));if(_0x28a458[a3_0xe1c6('0x16')]&&_0x28a458[a3_0xe1c6('0x16')][a3_0xe1c6('0x34')]){this[a3_0xe1c6('0x32')]['message']=_0x28a458[a3_0xe1c6('0x16')][a3_0xe1c6('0x34')];}if(!_0x28a458[a3_0xe1c6('0x16')]||!_0x28a458[a3_0xe1c6('0x16')][a3_0xe1c6('0x29')]){this[a3_0xe1c6('0x32')]['apiError']=a3_0xe1c6('0x35')+JSON['stringify'](_0x28a458['data']);return{};}return _0x28a458['data'][a3_0xe1c6('0x29')];}catch(_0x3598c9){_0x2e70ea[a3_0xe1c6('0x37')](((_0x4b8062=_0x3598c9===null||_0x3598c9===void 0x0?void 0x0:_0x3598c9[a3_0xe1c6('0x30')])===null||_0x4b8062===void 0x0?void 0x0:_0x4b8062[a3_0xe1c6('0x1e')])?(0x0,metric_logger_1[a3_0xe1c6('0xf')])(_0x3598c9[a3_0xe1c6('0x30')][a3_0xe1c6('0x1e')]):metric_logger_1[a3_0xe1c6('0x22')]);this[a3_0xe1c6('0x32')][a3_0xe1c6('0xa')]=this['messages']['extractErrorMessage'](_0x3598c9,a3_0xe1c6('0x7'));return{};}});}[a3_0xe1c6('0x19')](_0x45364a,_0x5ed028){var _0xa9805e,_0x1a05e5;return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a3_0xe1c6('0x32')][a3_0xe1c6('0xa')])return![];const _0x53bc74={'meta':{'nxCloudVersion':this[a3_0xe1c6('0x17')]()},'tasks':_0x5ed028,'run':_0x45364a,'machineInfo':this['machineInfo']};const _0x12dc60=Buffer[a3_0xe1c6('0x1a')](JSON['stringify'](_0x53bc74));const _0x4965a8=yield(0x0,util_1[a3_0xe1c6('0x6')])(zlib_1['gzip'])(_0x12dc60);const _0x2dc373=(0x0,metric_logger_1['createMetricRecorder'])(a3_0xe1c6('0x19'));try{if(environment_1[a3_0xe1c6('0x21')]){const _0x2ba73d=_0x5ed028['map'](_0x258cc4=>{return Object['assign'](Object[a3_0xe1c6('0x24')]({},_0x258cc4),{'terminalOutput':_0x258cc4[a3_0xe1c6('0x3')]?_0x258cc4['terminalOutput'][a3_0xe1c6('0xe')](0x0,0x14)+a3_0xe1c6('0x2d'):undefined});});output[a3_0xe1c6('0x2c')]({'title':'RunEnd.\x20Completed\x20tasks','bodyLines':['\x0a'+JSON[a3_0xe1c6('0x2e')](_0x2ba73d,null,0x2)]});}const _0x4f15e2=yield(0x0,axios_1[a3_0xe1c6('0x4')])(()=>this['apiAxiosInstance']['post'](a3_0xe1c6('0x2b'),_0x4965a8,{'headers':Object[a3_0xe1c6('0x24')](Object[a3_0xe1c6('0x24')]({},this[a3_0xe1c6('0x20')][a3_0xe1c6('0x27')][a3_0xe1c6('0x11')]),{'Content-Encoding':a3_0xe1c6('0x33'),'Content-Type':'application/octet-stream'})}));if(_0x4f15e2){_0x2dc373[a3_0xe1c6('0x37')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x4f15e2));if(_0x4f15e2[a3_0xe1c6('0x16')]&&_0x4f15e2[a3_0xe1c6('0x16')][a3_0xe1c6('0x36')]&&_0x4f15e2[a3_0xe1c6('0x16')]['status']===a3_0xe1c6('0x8')){this[a3_0xe1c6('0x12')]['runUrl']=_0x4f15e2['data'][a3_0xe1c6('0x36')];return!![];}if(_0x4f15e2[a3_0xe1c6('0x16')]&&_0x4f15e2[a3_0xe1c6('0x16')][a3_0xe1c6('0xd')]){this[a3_0xe1c6('0x32')]['apiError']='Invalid\x20end\x20run\x20response:\x20'+JSON[a3_0xe1c6('0x2e')](_0x4f15e2[a3_0xe1c6('0x16')][a3_0xe1c6('0x34')]);}else if(_0x4f15e2['data']&&typeof _0x4f15e2['data']===a3_0xe1c6('0x1d')){if(_0x4f15e2['data']!==a3_0xe1c6('0x8')){this[a3_0xe1c6('0x32')][a3_0xe1c6('0xa')]=a3_0xe1c6('0x2a')+JSON['stringify'](_0x4f15e2[a3_0xe1c6('0x16')]);}}else{this[a3_0xe1c6('0x32')]['apiError']=a3_0xe1c6('0x2a')+JSON[a3_0xe1c6('0x2e')](_0x4f15e2['data']);}if(environment_1['VERBOSE_LOGGING']){output[a3_0xe1c6('0x2c')]({'title':a3_0xe1c6('0x38'),'bodyLines':[JSON[a3_0xe1c6('0x2e')](_0x4f15e2[a3_0xe1c6('0x16')],null,0x2)]});}}else{output[a3_0xe1c6('0x15')]({'title':a3_0xe1c6('0x2f'),'bodyLines':[a3_0xe1c6('0x1b'),a3_0xe1c6('0x13'),JSON[a3_0xe1c6('0x2e')](_0x45364a,null,0x2),a3_0xe1c6('0xc'),JSON[a3_0xe1c6('0x2e')](new Error()[a3_0xe1c6('0x1c')],null,0x2)]});}return![];}catch(_0x27f861){_0x2dc373[a3_0xe1c6('0x37')](((_0xa9805e=_0x27f861===null||_0x27f861===void 0x0?void 0x0:_0x27f861[a3_0xe1c6('0x30')])===null||_0xa9805e===void 0x0?void 0x0:_0xa9805e[a3_0xe1c6('0x1e')])?(0x0,metric_logger_1[a3_0xe1c6('0xf')])(_0x27f861[a3_0xe1c6('0x30')][a3_0xe1c6('0x1e')]):metric_logger_1[a3_0xe1c6('0x22')]);const _0x3623d9=(_0x1a05e5=_0x27f861[a3_0xe1c6('0x30')])!==null&&_0x1a05e5!==void 0x0?_0x1a05e5:_0x27f861;this[a3_0xe1c6('0x32')]['apiError']=this[a3_0xe1c6('0x32')][a3_0xe1c6('0x31')](_0x3623d9,'api');return![];}});}[a3_0xe1c6('0x17')](){try{const _0x10927f=JSON['parse']((0x0,fs_1[a3_0xe1c6('0x18')])('package.json')['toString']());return _0x10927f['devDependencies'][a3_0xe1c6('0x25')];}catch(_0x1e6509){return a3_0xe1c6('0x5');}}}exports[a3_0xe1c6('0x26')]=CloudRunApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1b01=['completeRunGroup','__awaiter','response','data','../../../utilities/metric-logger','dtePollTasks','createMetricRecorder','apiAxiosInstance','axiosMultipleTries','/nx-cloud/executions/complete-run-group','note','completeRunGroupWithError','mapRespToPerfEntry','recordMetric','/nx-cloud/executions/tasks','Completing\x20run\x20group\x20with\x20an\x20error','tasks','DistributedAgentApi','agentName','RUNNER_FAILURE_PERF_ENTRY','../../../utilities/axios','createApiAxiosInstance','error','__esModule','defineProperty','axiosException','VERBOSE_LOGGING','../../../utilities/nx-imports','value','runGroup'];(function(_0x1c7656,_0x1b01c3){const _0xbe91f0=function(_0x955fbd){while(--_0x955fbd){_0x1c7656['push'](_0x1c7656['shift']());}};_0xbe91f0(++_0x1b01c3);}(a4_0x1b01,0xdb));const a4_0xbe91=function(_0x1c7656,_0x1b01c3){_0x1c7656=_0x1c7656-0x0;let _0xbe91f0=a4_0x1b01[_0x1c7656];return _0xbe91f0;};'use strict';var __awaiter=this&&this[a4_0xbe91('0x16')]||function(_0x27c2d9,_0x324cc3,_0x37e554,_0xf53a1c){function _0x8c3be1(_0x3bbeb0){return _0x3bbeb0 instanceof _0x37e554?_0x3bbeb0:new _0x37e554(function(_0x53be28){_0x53be28(_0x3bbeb0);});}return new(_0x37e554||(_0x37e554=Promise))(function(_0x490000,_0x581552){function _0x310ddf(_0x441c25){try{_0x47333c(_0xf53a1c['next'](_0x441c25));}catch(_0x3c8348){_0x581552(_0x3c8348);}}function _0x2eb104(_0x84ea6d){try{_0x47333c(_0xf53a1c['throw'](_0x84ea6d));}catch(_0x2a5a7f){_0x581552(_0x2a5a7f);}}function _0x47333c(_0x23e819){_0x23e819['done']?_0x490000(_0x23e819[a4_0xbe91('0x13')]):_0x8c3be1(_0x23e819[a4_0xbe91('0x13')])['then'](_0x310ddf,_0x2eb104);}_0x47333c((_0xf53a1c=_0xf53a1c['apply'](_0x27c2d9,_0x324cc3||[]))['next']());});};Object[a4_0xbe91('0xf')](exports,a4_0xbe91('0xe'),{'value':!![]});exports[a4_0xbe91('0x8')]=void 0x0;const axios_1=require(a4_0xbe91('0xb'));const environment_1=require('../../../utilities/environment');const metric_logger_1=require(a4_0xbe91('0x19'));const {output}=require(a4_0xbe91('0x12'));class DistributedAgentApi{constructor(_0x2e3a1d,_0x229a83,_0x19c879){this['runGroup']=_0x229a83;this[a4_0xbe91('0x9')]=_0x19c879;this[a4_0xbe91('0x1c')]=(0x0,axios_1[a4_0xbe91('0xc')])(_0x2e3a1d);}[a4_0xbe91('0x7')](_0x18ba89,_0x322859,_0xc532f){var _0x556d91;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x180874=(0x0,metric_logger_1[a4_0xbe91('0x1b')])(a4_0xbe91('0x1a'));try{const _0x221214=yield(0x0,axios_1['axiosMultipleTries'])(()=>this['apiAxiosInstance']['post'](a4_0xbe91('0x5'),{'runGroup':this[a4_0xbe91('0x14')],'agentName':this[a4_0xbe91('0x9')],'executionId':_0x18ba89,'statusCode':_0x322859,'completedTasks':_0xc532f}));_0x180874[a4_0xbe91('0x4')]((0x0,metric_logger_1[a4_0xbe91('0x3')])(_0x221214));return _0x221214[a4_0xbe91('0x18')];}catch(_0xda2cb2){_0x180874[a4_0xbe91('0x4')](((_0x556d91=_0xda2cb2===null||_0xda2cb2===void 0x0?void 0x0:_0xda2cb2['axiosException'])===null||_0x556d91===void 0x0?void 0x0:_0x556d91['response'])?(0x0,metric_logger_1[a4_0xbe91('0x3')])(_0xda2cb2[a4_0xbe91('0x10')][a4_0xbe91('0x17')]):metric_logger_1[a4_0xbe91('0xa')]);throw _0xda2cb2;}});}[a4_0xbe91('0x2')](_0x4b37c0){var _0x49c34d;return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1[a4_0xbe91('0x11')]){output[a4_0xbe91('0x1')]({'title':a4_0xbe91('0x6'),'bodyLines':['runGroup:\x20'+this[a4_0xbe91('0x14')],'error:\x20'+_0x4b37c0]});}const _0x820dad=(0x0,metric_logger_1[a4_0xbe91('0x1b')])(a4_0xbe91('0x15'));try{const _0x5f39e5=yield(0x0,axios_1[a4_0xbe91('0x1d')])(()=>this[a4_0xbe91('0x1c')]['post'](a4_0xbe91('0x0'),{'runGroup':this[a4_0xbe91('0x14')],'agentName':this[a4_0xbe91('0x9')],'criticalErrorMessage':_0x4b37c0}));if(environment_1[a4_0xbe91('0x11')]){output[a4_0xbe91('0x1')]({'title':'Completed\x20run\x20group\x20with\x20an\x20error'});}_0x820dad['recordMetric']((0x0,metric_logger_1[a4_0xbe91('0x3')])(_0x5f39e5));}catch(_0x5020a5){_0x820dad[a4_0xbe91('0x4')](((_0x49c34d=_0x5020a5===null||_0x5020a5===void 0x0?void 0x0:_0x5020a5[a4_0xbe91('0x10')])===null||_0x49c34d===void 0x0?void 0x0:_0x49c34d[a4_0xbe91('0x17')])?(0x0,metric_logger_1['mapRespToPerfEntry'])(_0x5020a5[a4_0xbe91('0x10')][a4_0xbe91('0x17')]):metric_logger_1['RUNNER_FAILURE_PERF_ENTRY']);console[a4_0xbe91('0xd')](_0x5020a5);}});}}exports[a4_0xbe91('0x8')]=DistributedAgentApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x2a36=['completed:\x20','done','value','maxParallel','VERBOSE_LOGGING','includes','unlinkSync','startAgent','npx\x20nx\x20run-many\x20--target=','target','random','\x20--parallel\x20--max-parallel=','note','configuration','map','executionId','next','mkdirSync','cacheDirectory','assign','reset','Waiting...','floor','strip-json-comments','execSync','existsSync','number\x20of\x20tasks:\x20','NX_AGENT_NAME','./node_modules/.cache/nx','getTime','executionId:\x20','readdirSync','warn','--configuration=','Duplicate\x20Agent\x20ID\x20Detected','taskId','.lock','../../../utilities/environment','If\x20you\x20believe\x20this\x20is\x20the\x20case,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22.','readFileSync','submitRunMetrics','We\x20have\x20detected\x20other\x20agents\x20running\x20in\x20this\x20workspace.\x20This\x20can\x20cause\x20unexpected\x20behavior.','Distributed\x20Execution\x20Terminated','Fetching\x20tasks...','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','projects','env','exit','Waiter','catch','We\x20have\x20detected\x20another\x20agent\x20with\x20this\x20ID\x20running\x20in\x20this\x20workspace.\x20This\x20should\x20not\x20happen.','Critical\x20Error\x20in\x20Agent:\x20\x22','Agent\x20','../../../utilities/metric-logger','message','wait','SIGINT','length','This\x20can\x20also\x20be\x20a\x20false\x20positive\x20caused\x20by\x20agents\x20that\x20did\x20not\x20shut\x20down\x20correctly.','./distributed-agent.api','child_process','apply','tasks','inherit','Executing:\x20\x27','projectName','/tasks-hashes-','criticalErrorMessage','defineProperty','API\x20Response','writeFileSync','push','tasksRunnerOptions','then','completedStatusCode','nx.json','true','__awaiter','\x20--projects=','/lockfiles','retryDuring',').\x20Tasks\x20hashes\x20haven\x27t\x20been\x20recorded.','completedTasks','status'];(function(_0x138255,_0x2a3635){const _0x3d6cdf=function(_0x1e3da3){while(--_0x1e3da3){_0x138255['push'](_0x138255['shift']());}};_0x3d6cdf(++_0x2a3635);}(a5_0x2a36,0xb5));const a5_0x3d6c=function(_0x138255,_0x2a3635){_0x138255=_0x138255-0x0;let _0x3d6cdf=a5_0x2a36[_0x138255];return _0x3d6cdf;};'use strict';var __awaiter=this&&this[a5_0x3d6c('0x40')]||function(_0x32765b,_0x5bc795,_0x1f7a80,_0x4a0dd8){function _0x505fbc(_0x4580e5){return _0x4580e5 instanceof _0x1f7a80?_0x4580e5:new _0x1f7a80(function(_0x189000){_0x189000(_0x4580e5);});}return new(_0x1f7a80||(_0x1f7a80=Promise))(function(_0x5afc27,_0x4f1102){function _0x58b18b(_0x11b798){try{_0x52aab7(_0x4a0dd8[a5_0x3d6c('0x3')](_0x11b798));}catch(_0x2df098){_0x4f1102(_0x2df098);}}function _0x5d7c14(_0x364b4e){try{_0x52aab7(_0x4a0dd8['throw'](_0x364b4e));}catch(_0x21a916){_0x4f1102(_0x21a916);}}function _0x52aab7(_0x4210d4){_0x4210d4[a5_0x3d6c('0x48')]?_0x5afc27(_0x4210d4[a5_0x3d6c('0x49')]):_0x505fbc(_0x4210d4[a5_0x3d6c('0x49')])[a5_0x3d6c('0x3c')](_0x58b18b,_0x5d7c14);}_0x52aab7((_0x4a0dd8=_0x4a0dd8[a5_0x3d6c('0x30')](_0x32765b,_0x5bc795||[]))[a5_0x3d6c('0x3')]());});};Object[a5_0x3d6c('0x37')](exports,'__esModule',{'value':!![]});exports[a5_0x3d6c('0x4e')]=void 0x0;const child_process_1=require(a5_0x3d6c('0x2f'));const stripJsonComments=require(a5_0x3d6c('0xa'));const distributed_agent_api_1=require(a5_0x3d6c('0x2e'));const waiter_1=require('../../../utilities/waiter');const environment_1=require(a5_0x3d6c('0x18'));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_0x3d6c('0x28'));const {output}=require('../../../utilities/nx-imports');function executeTasks(_0x36bc1a,_0x3651eb){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x5af26c=0x0;let _0x1f8698=null;const _0x6b89b6=(0x0,create_no_new_messages_timeout_1['createNoNewMessagesTimeout'])();const _0x34f2c8=new waiter_1[(a5_0x3d6c('0x23'))]();let _0x5a4691=[];const _0x595765=new Date();let _0x30c9b1=![];while(!![]){if(environment_1[a5_0x3d6c('0x4b')]){output[a5_0x3d6c('0x53')]({'title':a5_0x3d6c('0x1e')});}_0x1f8698=yield _0x3651eb['tasks'](_0x1f8698?_0x1f8698[a5_0x3d6c('0x2')]:null,_0x5af26c,_0x5a4691);if(environment_1['VERBOSE_LOGGING']){output[a5_0x3d6c('0x53')]({'title':a5_0x3d6c('0x38'),'bodyLines':[a5_0x3d6c('0x47')+_0x1f8698['completed'],'retryDuring:\x20'+_0x1f8698['retryDuring'],a5_0x3d6c('0x11')+_0x1f8698[a5_0x3d6c('0x2')],a5_0x3d6c('0xd')+_0x1f8698['tasks']['length'],'error:\x20'+_0x1f8698[a5_0x3d6c('0x36')],'maxParallel:\x20'+_0x1f8698[a5_0x3d6c('0x4a')]]});}if(_0x1f8698['criticalErrorMessage']){output['error']({'title':a5_0x3d6c('0x1d'),'bodyLines':['Error:',_0x1f8698[a5_0x3d6c('0x36')]]});process[a5_0x3d6c('0x22')](0x0);}if((_0x1f8698===null||_0x1f8698===void 0x0?void 0x0:_0x1f8698['retryDuring'])&&(_0x1f8698===null||_0x1f8698===void 0x0?void 0x0:_0x1f8698[a5_0x3d6c('0x43')])!==0x0&&!_0x30c9b1&&new Date()[a5_0x3d6c('0x10')]()-_0x595765['getTime']()>_0x1f8698['retryDuring']){yield _0x34f2c8[a5_0x3d6c('0x2a')]();continue;}if(_0x1f8698['completed'])return;_0x6b89b6(_0x1f8698[a5_0x3d6c('0x31')][a5_0x3d6c('0x1')](_0x1278aa=>_0x1278aa[a5_0x3d6c('0x16')])['join'](''));if(!_0x1f8698[a5_0x3d6c('0x2')]){if(environment_1[a5_0x3d6c('0x4b')]){output[a5_0x3d6c('0x53')]({'title':a5_0x3d6c('0x8')});}yield _0x34f2c8['wait']();_0x5af26c=0x0;_0x5a4691=[];continue;}_0x34f2c8[a5_0x3d6c('0x7')]();_0x30c9b1=!![];const _0x4e26dd=invokeTasksUsingRunMany(_0x36bc1a,_0x1f8698[a5_0x3d6c('0x2')],_0x1f8698['tasks'],_0x1f8698[a5_0x3d6c('0x4a')]);_0x5af26c=_0x4e26dd[a5_0x3d6c('0x3d')];_0x5a4691=_0x4e26dd[a5_0x3d6c('0x45')];}});}function readCompletedTasks(_0x873370,_0x1662ad){const _0x4238fc='Command\x20execution\x20failed\x20(distributed\x20task\x20execution:\x20'+_0x1662ad+a5_0x3d6c('0x44');let _0x1fabfe;try{const _0x50f954=_0x873370[a5_0x3d6c('0x5')]||a5_0x3d6c('0xf');const _0x49a71b=_0x50f954+a5_0x3d6c('0x35')+_0x1662ad;_0x1fabfe=JSON['parse']((0x0,fs_1[a5_0x3d6c('0x1a')])(_0x49a71b)['toString']());(0x0,fs_1[a5_0x3d6c('0x4d')])(_0x49a71b);}catch(_0x3a712c){throw new Error(_0x4238fc);}if(_0x1fabfe['length']==0x0){throw new Error(_0x4238fc);}return _0x1fabfe;}function invokeTasksUsingRunMany(_0x2e0b53,_0x3a2856,_0xc2e3ed,_0x5db54f){let _0x1c9cdd=0x0;const _0x3ca81e=[];for(const _0x3d6c0a of groupByTarget(_0xc2e3ed)){const _0xea88bd=_0x3d6c0a['configuration']?a5_0x3d6c('0x14')+_0x3d6c0a[a5_0x3d6c('0x0')]:'';const _0xb064cf=_0x5db54f>0x1?a5_0x3d6c('0x52')+_0x5db54f:'';const _0x27eb4f=a5_0x3d6c('0x4f')+_0x3d6c0a['target']+'\x20'+_0xea88bd+a5_0x3d6c('0x41')+_0x3d6c0a[a5_0x3d6c('0x20')]['join'](',')+'\x20'+_0x3d6c0a['params']+_0xb064cf;if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a5_0x3d6c('0x33')+_0x27eb4f+'\x27'});}try{(0x0,child_process_1[a5_0x3d6c('0xb')])(_0x27eb4f,{'stdio':[a5_0x3d6c('0x32'),a5_0x3d6c('0x32'),a5_0x3d6c('0x32')],'env':Object[a5_0x3d6c('0x6')](Object[a5_0x3d6c('0x6')]({},process['env']),{'NX_CACHE_FAILURES':a5_0x3d6c('0x3f'),'NX_CLOUD_DISTRIBUTED_EXECUTION_ID':_0x3a2856})});}catch(_0x5c9f64){if(_0x5c9f64[a5_0x3d6c('0x46')]===environment_1[a5_0x3d6c('0x1f')]){throw _0x5c9f64;}else{_0x1c9cdd=0x1;}}finally{_0x3ca81e[a5_0x3d6c('0x3a')](...readCompletedTasks(_0x2e0b53,_0x3a2856));}}return{'completedStatusCode':_0x1c9cdd,'completedTasks':_0x3ca81e};}function groupByTarget(_0x555866){const _0x471be0=[];_0x555866['forEach'](_0xc29a13=>{const _0x4568f4=_0x471be0['find'](_0x2225b6=>_0x2225b6[a5_0x3d6c('0x50')]===_0xc29a13[a5_0x3d6c('0x50')]&&_0x2225b6['configuration']===_0xc29a13[a5_0x3d6c('0x0')]);if(_0x4568f4){_0x4568f4[a5_0x3d6c('0x20')][a5_0x3d6c('0x3a')](_0xc29a13['projectName']);}else{_0x471be0[a5_0x3d6c('0x3a')]({'target':_0xc29a13[a5_0x3d6c('0x50')],'projects':[_0xc29a13[a5_0x3d6c('0x34')]],'params':_0xc29a13['params'],'configuration':_0xc29a13[a5_0x3d6c('0x0')]});}});return _0x471be0;}function getAgentName(){if(process[a5_0x3d6c('0x21')]['NX_AGENT_NAME']!==undefined){return process['env'][a5_0x3d6c('0xe')];}else if(process[a5_0x3d6c('0x21')]['CIRCLECI']!==undefined){return process['env']['CIRCLE_STAGE'];}else{return a5_0x3d6c('0x27')+Math[a5_0x3d6c('0x9')](Math[a5_0x3d6c('0x51')]()*0x186a0);}}function createAgentLockfile(_0x508ad0,_0x38e19a){const _0x4b41e2=_0x508ad0[a5_0x3d6c('0x5')]||a5_0x3d6c('0xf');const _0x5cc898=_0x4b41e2+a5_0x3d6c('0x42');const _0x6f5ce0=_0x5cc898+'/'+_0x38e19a+a5_0x3d6c('0x17');if(!(0x0,fs_1[a5_0x3d6c('0xc')])(_0x5cc898)){(0x0,fs_1[a5_0x3d6c('0x4')])(_0x5cc898,{'recursive':!![]});}const _0x1b7f96=(0x0,fs_1[a5_0x3d6c('0x12')])(_0x5cc898);if(_0x1b7f96[a5_0x3d6c('0x2c')]){if(_0x1b7f96[a5_0x3d6c('0x4c')](_0x38e19a+a5_0x3d6c('0x17'))){output['error']({'title':a5_0x3d6c('0x15'),'bodyLines':[a5_0x3d6c('0x25'),'','End\x20all\x20currently\x20running\x20agents,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22,\x20and\x20try\x20again.']});process[a5_0x3d6c('0x22')](0x1);}output[a5_0x3d6c('0x13')]({'title':'Other\x20Nx\x20Cloud\x20Agents\x20Detected','bodyLines':[a5_0x3d6c('0x1c'),'',a5_0x3d6c('0x2d'),a5_0x3d6c('0x19')]});}(0x0,fs_1[a5_0x3d6c('0x39')])(_0x6f5ce0,'');process['on'](a5_0x3d6c('0x22'),()=>cleanupAgentLockfile(_0x6f5ce0));process['on'](a5_0x3d6c('0x2b'),()=>cleanupAgentLockfile(_0x6f5ce0));}function cleanupAgentLockfile(_0x400c4){if((0x0,fs_1[a5_0x3d6c('0xc')])(_0x400c4)){(0x0,fs_1[a5_0x3d6c('0x4d')])(_0x400c4);}}function startAgent(){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3a3960=(0x0,environment_1['getRunGroup'])();if(!_0x3a3960){(0x0,print_run_group_error_1['printRunGroupError'])();return process[a5_0x3d6c('0x22')](0x1);}output['note']({'title':'Starting\x20an\x20agent\x20for\x20running\x20Nx\x20tasks'});const _0x5e46ab=JSON['parse'](stripJsonComments((0x0,fs_1[a5_0x3d6c('0x1a')])(a5_0x3d6c('0x3e'))['toString']()))[a5_0x3d6c('0x3b')]['default']['options'];const _0x359b14=getAgentName();createAgentLockfile(_0x5e46ab,_0x359b14);const _0x34f9cb=new distributed_agent_api_1['DistributedAgentApi'](_0x5e46ab,_0x3a3960,_0x359b14);return executeTasks(_0x5e46ab,_0x34f9cb)[a5_0x3d6c('0x3c')](_0x3df956=>__awaiter(this,void 0x0,void 0x0,function*(){yield(0x0,metric_logger_1[a5_0x3d6c('0x1b')])(_0x5e46ab);return _0x3df956;}))[a5_0x3d6c('0x24')](_0xb7fae1=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x34f9cb['completeRunGroupWithError'](a5_0x3d6c('0x26')+_0xb7fae1[a5_0x3d6c('0x29')]+'\x22');throw _0xb7fae1;}));});}exports[a5_0x3d6c('0x4e')]=startAgent;
|
|
1
|
+
const a5_0x1d19=['/tasks-hashes-','strip-json-comments','\x20--parallel\x20--max-parallel=','NX_AGENT_NAME','target','Critical\x20Error\x20in\x20Agent:\x20\x22','options','This\x20can\x20also\x20be\x20a\x20false\x20positive\x20caused\x20by\x20agents\x20that\x20did\x20not\x20shut\x20down\x20correctly.','../../error/print-run-group-error','\x20--projects=','readdirSync','execSync','getTime','number\x20of\x20tasks:\x20','If\x20you\x20believe\x20this\x20is\x20the\x20case,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22.','error','params','--configuration=','inherit','readFileSync','Duplicate\x20Agent\x20ID\x20Detected','startAgent','We\x20have\x20detected\x20another\x20agent\x20with\x20this\x20ID\x20running\x20in\x20this\x20workspace.\x20This\x20should\x20not\x20happen.','wait','Waiting...','note','completedStatusCode','Other\x20Nx\x20Cloud\x20Agents\x20Detected','__esModule','message','writeFileSync','./distributed-agent.api','projects','maxParallel:\x20','../../../utilities/waiter','mkdirSync','status','./node_modules/.cache/nx','value','completeRunGroupWithError','executionId','toString','We\x20have\x20detected\x20other\x20agents\x20running\x20in\x20this\x20workspace.\x20This\x20can\x20cause\x20unexpected\x20behavior.','true','Command\x20execution\x20failed\x20(distributed\x20task\x20execution:\x20','Agent\x20','../../../utilities/nx-imports','tasks','../../../utilities/create-no-new-messages-timeout','retryDuring:\x20','maxParallel','completed','Waiter','projectName','Executing:\x20\x27','unlinkSync','then','next','forEach','VERBOSE_LOGGING','DistributedAgentApi','defineProperty','apply','DISTRIBUTED_TASK_EXECUTION_INTERNAL_ERROR_STATUS_CODE','floor','API\x20Response','reset','length','find','throw','cacheDirectory','Fetching\x20tasks...','child_process','completedTasks','assign','tasksRunnerOptions','End\x20all\x20currently\x20running\x20agents,\x20run\x20\x22npx\x20nx-cloud\x20clean-up-agents\x22,\x20and\x20try\x20again.','/lockfiles','existsSync','../../../utilities/environment','criticalErrorMessage','env','.lock','CIRCLECI','map','configuration','random','retryDuring','Distributed\x20Execution\x20Terminated','SIGINT','__awaiter','exit','submitRunMetrics','includes','createNoNewMessagesTimeout','push','getRunGroup'];(function(_0x273a34,_0x1d195d){const _0x22fd70=function(_0x328a60){while(--_0x328a60){_0x273a34['push'](_0x273a34['shift']());}};_0x22fd70(++_0x1d195d);}(a5_0x1d19,0x108));const a5_0x22fd=function(_0x273a34,_0x1d195d){_0x273a34=_0x273a34-0x0;let _0x22fd70=a5_0x1d19[_0x273a34];return _0x22fd70;};'use strict';var __awaiter=this&&this[a5_0x22fd('0x14')]||function(_0x56ab32,_0xa4f178,_0x5e1b9a,_0x3b02fa){function _0x3720c3(_0x458a29){return _0x458a29 instanceof _0x5e1b9a?_0x458a29:new _0x5e1b9a(function(_0x198629){_0x198629(_0x458a29);});}return new(_0x5e1b9a||(_0x5e1b9a=Promise))(function(_0x2a527c,_0x400977){function _0x21b396(_0x45ea00){try{_0x4e88ea(_0x3b02fa[a5_0x22fd('0x54')](_0x45ea00));}catch(_0xf3542e){_0x400977(_0xf3542e);}}function _0x321d70(_0xdebb8f){try{_0x4e88ea(_0x3b02fa[a5_0x22fd('0x60')](_0xdebb8f));}catch(_0x1a86bf){_0x400977(_0x1a86bf);}}function _0x4e88ea(_0x3b4124){_0x3b4124['done']?_0x2a527c(_0x3b4124[a5_0x22fd('0x41')]):_0x3720c3(_0x3b4124['value'])[a5_0x22fd('0x53')](_0x21b396,_0x321d70);}_0x4e88ea((_0x3b02fa=_0x3b02fa[a5_0x22fd('0x59')](_0x56ab32,_0xa4f178||[]))['next']());});};Object[a5_0x22fd('0x58')](exports,a5_0x22fd('0x37'),{'value':!![]});exports['startAgent']=void 0x0;const child_process_1=require(a5_0x22fd('0x2'));const stripJsonComments=require(a5_0x22fd('0x1c'));const distributed_agent_api_1=require(a5_0x22fd('0x3a'));const waiter_1=require(a5_0x22fd('0x3d'));const environment_1=require(a5_0x22fd('0x9'));const print_run_group_error_1=require(a5_0x22fd('0x23'));const create_no_new_messages_timeout_1=require(a5_0x22fd('0x4b'));const fs_1=require('fs');const metric_logger_1=require('../../../utilities/metric-logger');const {output}=require(a5_0x22fd('0x49'));function executeTasks(_0x5542e6,_0x3759f3){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x591718=0x0;let _0x5987c0=null;const _0x139891=(0x0,create_no_new_messages_timeout_1[a5_0x22fd('0x18')])();const _0x26bdf7=new waiter_1[(a5_0x22fd('0x4f'))]();let _0x59adcc=[];const _0x52c42b=new Date();let _0x2210a9=![];while(!![]){if(environment_1[a5_0x22fd('0x56')]){output[a5_0x22fd('0x34')]({'title':a5_0x22fd('0x1')});}_0x5987c0=yield _0x3759f3[a5_0x22fd('0x4a')](_0x5987c0?_0x5987c0[a5_0x22fd('0x43')]:null,_0x591718,_0x59adcc);if(environment_1[a5_0x22fd('0x56')]){output[a5_0x22fd('0x34')]({'title':a5_0x22fd('0x5c'),'bodyLines':['completed:\x20'+_0x5987c0[a5_0x22fd('0x4e')],a5_0x22fd('0x4c')+_0x5987c0[a5_0x22fd('0x11')],'executionId:\x20'+_0x5987c0['executionId'],a5_0x22fd('0x28')+_0x5987c0[a5_0x22fd('0x4a')][a5_0x22fd('0x5e')],'error:\x20'+_0x5987c0['criticalErrorMessage'],a5_0x22fd('0x3c')+_0x5987c0[a5_0x22fd('0x4d')]]});}if(_0x5987c0[a5_0x22fd('0xa')]){output['error']({'title':a5_0x22fd('0x12'),'bodyLines':['Error:',_0x5987c0[a5_0x22fd('0xa')]]});process[a5_0x22fd('0x15')](0x0);}if((_0x5987c0===null||_0x5987c0===void 0x0?void 0x0:_0x5987c0[a5_0x22fd('0x11')])&&(_0x5987c0===null||_0x5987c0===void 0x0?void 0x0:_0x5987c0[a5_0x22fd('0x11')])!==0x0&&!_0x2210a9&&new Date()[a5_0x22fd('0x27')]()-_0x52c42b[a5_0x22fd('0x27')]()>_0x5987c0[a5_0x22fd('0x11')]){yield _0x26bdf7['wait']();continue;}if(_0x5987c0[a5_0x22fd('0x4e')])return;_0x139891(_0x5987c0['tasks'][a5_0x22fd('0xe')](_0x23f628=>_0x23f628['taskId'])['join'](''));if(!_0x5987c0['executionId']){if(environment_1['VERBOSE_LOGGING']){output[a5_0x22fd('0x34')]({'title':a5_0x22fd('0x33')});}yield _0x26bdf7[a5_0x22fd('0x32')]();_0x591718=0x0;_0x59adcc=[];continue;}_0x26bdf7[a5_0x22fd('0x5d')]();_0x2210a9=!![];const _0x47c7d6=invokeTasksUsingRunMany(_0x5542e6,_0x5987c0[a5_0x22fd('0x43')],_0x5987c0['tasks'],_0x5987c0[a5_0x22fd('0x4d')]);_0x591718=_0x47c7d6[a5_0x22fd('0x35')];_0x59adcc=_0x47c7d6[a5_0x22fd('0x3')];}});}function readCompletedTasks(_0x142286,_0x2a3a89){const _0x49469c=a5_0x22fd('0x47')+_0x2a3a89+').\x20Tasks\x20hashes\x20haven\x27t\x20been\x20recorded.';let _0x523882;try{const _0x15e85a=_0x142286[a5_0x22fd('0x0')]||'./node_modules/.cache/nx';const _0xf98d59=_0x15e85a+a5_0x22fd('0x1b')+_0x2a3a89;_0x523882=JSON['parse']((0x0,fs_1[a5_0x22fd('0x2e')])(_0xf98d59)[a5_0x22fd('0x44')]());(0x0,fs_1['unlinkSync'])(_0xf98d59);}catch(_0x35489e){throw new Error(_0x49469c);}if(_0x523882[a5_0x22fd('0x5e')]==0x0){throw new Error(_0x49469c);}return _0x523882;}function invokeTasksUsingRunMany(_0xe64b75,_0x3523f6,_0x238a2,_0x585a66){let _0x3dc286=0x0;const _0x46a634=[];for(const _0x259e30 of groupByTarget(_0x238a2)){const _0x3c565a=_0x259e30[a5_0x22fd('0xf')]?a5_0x22fd('0x2c')+_0x259e30['configuration']:'';const _0x22ebd6=_0x585a66>0x1?a5_0x22fd('0x1d')+_0x585a66:'';const _0x53108e='npx\x20nx\x20run-many\x20--target='+_0x259e30[a5_0x22fd('0x1f')]+'\x20'+_0x3c565a+a5_0x22fd('0x24')+_0x259e30[a5_0x22fd('0x3b')]['join'](',')+'\x20'+_0x259e30[a5_0x22fd('0x2b')]+_0x22ebd6;if(environment_1[a5_0x22fd('0x56')]){output[a5_0x22fd('0x34')]({'title':a5_0x22fd('0x51')+_0x53108e+'\x27'});}try{(0x0,child_process_1[a5_0x22fd('0x26')])(_0x53108e,{'stdio':[a5_0x22fd('0x2d'),a5_0x22fd('0x2d'),a5_0x22fd('0x2d')],'env':Object[a5_0x22fd('0x4')](Object[a5_0x22fd('0x4')]({},process['env']),{'NX_CACHE_FAILURES':a5_0x22fd('0x46'),'NX_CLOUD_DISTRIBUTED_EXECUTION_ID':_0x3523f6})});}catch(_0x13f5b0){if(_0x13f5b0[a5_0x22fd('0x3f')]===environment_1[a5_0x22fd('0x5a')]){throw _0x13f5b0;}else{_0x3dc286=0x1;}}finally{_0x46a634[a5_0x22fd('0x19')](...readCompletedTasks(_0xe64b75,_0x3523f6));}}return{'completedStatusCode':_0x3dc286,'completedTasks':_0x46a634};}function groupByTarget(_0x143134){const _0x1780dd=[];_0x143134[a5_0x22fd('0x55')](_0x2e5d8d=>{const _0x5e2b82=_0x1780dd[a5_0x22fd('0x5f')](_0x3caa26=>_0x3caa26[a5_0x22fd('0x1f')]===_0x2e5d8d[a5_0x22fd('0x1f')]&&_0x3caa26[a5_0x22fd('0xf')]===_0x2e5d8d[a5_0x22fd('0xf')]);if(_0x5e2b82){_0x5e2b82['projects']['push'](_0x2e5d8d[a5_0x22fd('0x50')]);}else{_0x1780dd['push']({'target':_0x2e5d8d[a5_0x22fd('0x1f')],'projects':[_0x2e5d8d['projectName']],'params':_0x2e5d8d['params'],'configuration':_0x2e5d8d[a5_0x22fd('0xf')]});}});return _0x1780dd;}function getAgentName(){if(process['env'][a5_0x22fd('0x1e')]!==undefined){return process[a5_0x22fd('0xb')]['NX_AGENT_NAME'];}else if(process[a5_0x22fd('0xb')][a5_0x22fd('0xd')]!==undefined){return process[a5_0x22fd('0xb')]['CIRCLE_STAGE'];}else{return a5_0x22fd('0x48')+Math[a5_0x22fd('0x5b')](Math[a5_0x22fd('0x10')]()*0x186a0);}}function createAgentLockfile(_0xa18e4c,_0xb12c26){const _0x5b92d9=_0xa18e4c[a5_0x22fd('0x0')]||a5_0x22fd('0x40');const _0xf6818b=_0x5b92d9+a5_0x22fd('0x7');const _0x99983f=_0xf6818b+'/'+_0xb12c26+a5_0x22fd('0xc');if(!(0x0,fs_1[a5_0x22fd('0x8')])(_0xf6818b)){(0x0,fs_1[a5_0x22fd('0x3e')])(_0xf6818b,{'recursive':!![]});}const _0x416ed9=(0x0,fs_1[a5_0x22fd('0x25')])(_0xf6818b);if(_0x416ed9[a5_0x22fd('0x5e')]){if(_0x416ed9[a5_0x22fd('0x17')](_0xb12c26+a5_0x22fd('0xc'))){output[a5_0x22fd('0x2a')]({'title':a5_0x22fd('0x2f'),'bodyLines':[a5_0x22fd('0x31'),'',a5_0x22fd('0x6')]});process[a5_0x22fd('0x15')](0x1);}output['warn']({'title':a5_0x22fd('0x36'),'bodyLines':[a5_0x22fd('0x45'),'',a5_0x22fd('0x22'),a5_0x22fd('0x29')]});}(0x0,fs_1[a5_0x22fd('0x39')])(_0x99983f,'');process['on']('exit',()=>cleanupAgentLockfile(_0x99983f));process['on'](a5_0x22fd('0x13'),()=>cleanupAgentLockfile(_0x99983f));}function cleanupAgentLockfile(_0x3f6926){if((0x0,fs_1['existsSync'])(_0x3f6926)){(0x0,fs_1[a5_0x22fd('0x52')])(_0x3f6926);}}function startAgent(){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4b9411=(0x0,environment_1[a5_0x22fd('0x1a')])();if(!_0x4b9411){(0x0,print_run_group_error_1['printRunGroupError'])();return process[a5_0x22fd('0x15')](0x1);}output[a5_0x22fd('0x34')]({'title':'Starting\x20an\x20agent\x20for\x20running\x20Nx\x20tasks'});const _0x57b0f3=JSON['parse'](stripJsonComments((0x0,fs_1['readFileSync'])('nx.json')[a5_0x22fd('0x44')]()))[a5_0x22fd('0x5')]['default'][a5_0x22fd('0x21')];const _0x1f35c6=getAgentName();createAgentLockfile(_0x57b0f3,_0x1f35c6);const _0x5583a3=new distributed_agent_api_1[(a5_0x22fd('0x57'))](_0x57b0f3,_0x4b9411,_0x1f35c6);return executeTasks(_0x57b0f3,_0x5583a3)['then'](_0x5bc62d=>__awaiter(this,void 0x0,void 0x0,function*(){yield(0x0,metric_logger_1[a5_0x22fd('0x16')])(_0x57b0f3);return _0x5bc62d;}))['catch'](_0x442115=>__awaiter(this,void 0x0,void 0x0,function*(){yield _0x5583a3[a5_0x22fd('0x42')](a5_0x22fd('0x20')+_0x442115[a5_0x22fd('0x38')]+'\x22');throw _0x442115;}));});}exports[a5_0x22fd('0x30')]=startAgent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x6608=['stopAgentsOnFailure','dteStart','apiAxiosInstance','message','/nx-cloud/executions/start','NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT','map','mapRespToPerfEntry','parallel','start','/nx-cloud/executions/complete-run-group','maxParallel','getBranch','configuration','../../../utilities/metric-logger','apply','createStartRequest','overrides','recordMetric','../../../utilities/axios','true','error','createMetricRecorder','next','throw','value','__esModule','RUNNER_FAILURE_PERF_ENTRY','completeRunGroupWithError','status','axiosMultipleTries','dteStatus','completeRunGroup','enabled','done','defineProperty','NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE','then','../../../utilities/environment','Workspace\x20is\x20disabled.\x20Cannot\x20perform\x20distributed\x20task\x20executions.','post','target','project','parseCommand','../../../utilities/nx-imports','data','hash','axiosException','agentCount','response','/nx-cloud/executions/status','exit'];(function(_0xcea6c7,_0x6608aa){const _0x1c7797=function(_0x4b9d40){while(--_0x4b9d40){_0xcea6c7['push'](_0xcea6c7['shift']());}};_0x1c7797(++_0x6608aa);}(a6_0x6608,0x9a));const a6_0x1c77=function(_0xcea6c7,_0x6608aa){_0xcea6c7=_0xcea6c7-0x0;let _0x1c7797=a6_0x6608[_0xcea6c7];return _0x1c7797;};'use strict';var __awaiter=this&&this['__awaiter']||function(_0x46f8fb,_0x3a5c87,_0x10c1f2,_0x19338a){function _0x42ec82(_0x19c485){return _0x19c485 instanceof _0x10c1f2?_0x19c485:new _0x10c1f2(function(_0x133f31){_0x133f31(_0x19c485);});}return new(_0x10c1f2||(_0x10c1f2=Promise))(function(_0x13bce8,_0x41515c){function _0x490347(_0x3cd341){try{_0x38fee0(_0x19338a[a6_0x1c77('0x19')](_0x3cd341));}catch(_0x4b288e){_0x41515c(_0x4b288e);}}function _0x4b794d(_0xbf0dbf){try{_0x38fee0(_0x19338a[a6_0x1c77('0x1a')](_0xbf0dbf));}catch(_0x2ed3fa){_0x41515c(_0x2ed3fa);}}function _0x38fee0(_0xde6dd8){_0xde6dd8[a6_0x1c77('0x24')]?_0x13bce8(_0xde6dd8[a6_0x1c77('0x1b')]):_0x42ec82(_0xde6dd8['value'])[a6_0x1c77('0x27')](_0x490347,_0x4b794d);}_0x38fee0((_0x19338a=_0x19338a[a6_0x1c77('0x11')](_0x46f8fb,_0x3a5c87||[]))[a6_0x1c77('0x19')]());});};Object[a6_0x1c77('0x25')](exports,a6_0x1c77('0x1c'),{'value':!![]});exports[a6_0x1c77('0x12')]=exports['DistributedExecutionApi']=void 0x0;const axios_1=require(a6_0x1c77('0x15'));const environment_1=require(a6_0x1c77('0x28'));const metric_logger_1=require(a6_0x1c77('0x10'));const {output,unparse}=require(a6_0x1c77('0x2e'));class DistributedExecutionApi{constructor(_0x45ccc0){this[a6_0x1c77('0x4')]=(0x0,axios_1['createApiAxiosInstance'])(_0x45ccc0);}[a6_0x1c77('0xb')](_0x30794e){var _0x317707;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x378d3e=(0x0,metric_logger_1[a6_0x1c77('0x18')])(a6_0x1c77('0x3'));let _0x2050f6;try{_0x2050f6=yield(0x0,axios_1[a6_0x1c77('0x20')])(()=>this['apiAxiosInstance']['post'](a6_0x1c77('0x6'),_0x30794e));_0x378d3e[a6_0x1c77('0x14')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x2050f6));}catch(_0x96e210){_0x378d3e[a6_0x1c77('0x14')](((_0x317707=_0x96e210===null||_0x96e210===void 0x0?void 0x0:_0x96e210[a6_0x1c77('0x31')])===null||_0x317707===void 0x0?void 0x0:_0x317707['response'])?(0x0,metric_logger_1[a6_0x1c77('0x9')])(_0x96e210[a6_0x1c77('0x31')][a6_0x1c77('0x33')]):metric_logger_1[a6_0x1c77('0x1d')]);throw _0x96e210;}if(!_0x2050f6[a6_0x1c77('0x2f')][a6_0x1c77('0x23')]){throw new Error(a6_0x1c77('0x29'));}if(_0x2050f6[a6_0x1c77('0x2f')][a6_0x1c77('0x17')]){throw new Error(_0x2050f6[a6_0x1c77('0x2f')][a6_0x1c77('0x17')]);}return _0x2050f6[a6_0x1c77('0x2f')]['id'];});}[a6_0x1c77('0x1f')](_0x50b953){var _0x4c7822;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x433d3f=(0x0,metric_logger_1[a6_0x1c77('0x18')])(a6_0x1c77('0x21'));try{const _0x5f5b88=yield(0x0,axios_1[a6_0x1c77('0x20')])(()=>this[a6_0x1c77('0x4')]['post'](a6_0x1c77('0x0'),{'id':_0x50b953}));_0x433d3f[a6_0x1c77('0x14')]((0x0,metric_logger_1['mapRespToPerfEntry'])(_0x5f5b88));return _0x5f5b88[a6_0x1c77('0x2f')];}catch(_0x519a7c){_0x433d3f['recordMetric'](((_0x4c7822=_0x519a7c===null||_0x519a7c===void 0x0?void 0x0:_0x519a7c['axiosException'])===null||_0x4c7822===void 0x0?void 0x0:_0x4c7822['response'])?(0x0,metric_logger_1[a6_0x1c77('0x9')])(_0x519a7c[a6_0x1c77('0x31')][a6_0x1c77('0x33')]):metric_logger_1[a6_0x1c77('0x1d')]);output[a6_0x1c77('0x17')]({'title':_0x519a7c[a6_0x1c77('0x5')]});process[a6_0x1c77('0x1')](0x1);}});}[a6_0x1c77('0x1e')](_0x53c591,_0x5c62d4){var _0x3964a5;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4c433d=(0x0,metric_logger_1['createMetricRecorder'])(a6_0x1c77('0x22'));try{const _0x24b48d=yield(0x0,axios_1['axiosMultipleTries'])(()=>this[a6_0x1c77('0x4')][a6_0x1c77('0x2a')](a6_0x1c77('0xc'),{'runGroup':_0x53c591,'criticalErrorMessage':_0x5c62d4}),0x3);_0x4c433d['recordMetric']((0x0,metric_logger_1[a6_0x1c77('0x9')])(_0x24b48d));}catch(_0x4b3b45){_0x4c433d[a6_0x1c77('0x14')](((_0x3964a5=_0x4b3b45===null||_0x4b3b45===void 0x0?void 0x0:_0x4b3b45['axiosException'])===null||_0x3964a5===void 0x0?void 0x0:_0x3964a5['response'])?(0x0,metric_logger_1[a6_0x1c77('0x9')])(_0x4b3b45[a6_0x1c77('0x31')]['response']):metric_logger_1[a6_0x1c77('0x1d')]);}});}}exports['DistributedExecutionApi']=DistributedExecutionApi;function createStartRequest(_0x114aa9,_0x4edc8a,_0x4ade37){const _0x4b3bb3=_0x4edc8a['map'](_0x1c27c5=>{return _0x1c27c5[a6_0x1c77('0x8')](_0x4b9734=>{return{'taskId':_0x4b9734['id'],'hash':_0x4b9734[a6_0x1c77('0x30')],'projectName':_0x4b9734[a6_0x1c77('0x2b')][a6_0x1c77('0x2c')],'target':_0x4b9734[a6_0x1c77('0x2b')]['target'],'configuration':_0x4b9734[a6_0x1c77('0x2b')][a6_0x1c77('0xf')]||null,'params':unparse(_0x4b9734[a6_0x1c77('0x13')])['join']('\x20')};});});const _0x44048d={'command':(0x0,environment_1[a6_0x1c77('0x2d')])(),'branch':(0x0,environment_1[a6_0x1c77('0xe')])(),'runGroup':_0x114aa9,'tasks':_0x4b3bb3,'maxParallel':calculateMaxParallel(_0x4ade37)};if(environment_1[a6_0x1c77('0x7')]){_0x44048d[a6_0x1c77('0x32')]=environment_1['NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT'];}if(!environment_1[a6_0x1c77('0x26')]){_0x44048d[a6_0x1c77('0x2')]=![];}return _0x44048d;}exports['createStartRequest']=createStartRequest;function calculateMaxParallel(_0x3d648d){if(_0x3d648d[a6_0x1c77('0xa')]==='false'||_0x3d648d[a6_0x1c77('0xa')]===![]){return 0x1;}else if(_0x3d648d[a6_0x1c77('0xa')]===a6_0x1c77('0x16')||_0x3d648d[a6_0x1c77('0xa')]===!![]){return Number(_0x3d648d['maxParallel']||0x3);}else if(_0x3d648d[a6_0x1c77('0xa')]===undefined){return _0x3d648d[a6_0x1c77('0xd')]?Number(_0x3d648d['maxParallel']):0x3;}else{return Number(_0x3d648d[a6_0x1c77('0xa')])||0x3;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a7_0x1262=['targetDependencies','parse','./distributed-execution.api','error:\x20','commandStatus','COMPLETED','criticalErrorMessage','join','run','completeRunGroupWithError','value','DistributedExecutionApi','size','url','addTaskDependencies','Unable\x20to\x20complete\x20a\x20run.','FileStorage','executionId:\x20','reset','roots','then','Waiting...','VERBOSE_LOGGING','addTaskToGraph','length','axiosException','status','Command\x20execution\x20failed.','tasks','Waiter','throw','exit','See\x20run\x20details\x20at\x20','message','Processing\x20task\x20','configuration','indexOf','createTaskGraph','terminalOutput','retrieve','projectGraph','addDependencies','nxCloudDistributedTasksRunner','add','../../file-storage/file-storage','Distributed\x20Execution\x20Terminated','TaskGraphCreator','./node_modules/.cache/nx','next','defineProperty','map','project','build','lifeCycle','executionStatus','overrides','Found\x20unknown\x20task:\x20','error','get','dependencies','Status\x20update','done','catch','wait','hash','../../../utilities/nx-imports','__esModule','taskId','projects','Error:','log','../../file-storage/e2e-encryption','../../error/print-run-group-error','ENCRYPTION_KEY','completedTasks','defaultTargetDependencies','E2EEncryption','delete','submitRunMetrics','logCommand','stdout','Extracting\x20artifacts','../../../utilities/create-no-new-messages-timeout','printRunGroupError','finally','cacheDirectory','runUrl','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','getRunGroup','push','executionStatus:\x20','createNoNewMessagesTimeout','find','../../../utilities/environment','number\x20of\x20completed\x20tasks:\x20','splitTasksIntoStages','assign','strictlyOrderedTargets','Observable','../../../utilities/metric-logger','strip-json-comments','target','__awaiter','encryptionKey','note','start','apply','endTask','success'];(function(_0x857951,_0x1262b2){const _0x4eac35=function(_0x4518ba){while(--_0x4518ba){_0x857951['push'](_0x857951['shift']());}};_0x4eac35(++_0x1262b2);}(a7_0x1262,0x87));const a7_0x4eac=function(_0x857951,_0x1262b2){_0x857951=_0x857951-0x0;let _0x4eac35=a7_0x1262[_0x857951];return _0x4eac35;};'use strict';var __awaiter=this&&this[a7_0x4eac('0x4c')]||function(_0x37205a,_0xc83eb9,_0x48dd20,_0x55696e){function _0x41d6c7(_0x1b5ef9){return _0x1b5ef9 instanceof _0x48dd20?_0x1b5ef9:new _0x48dd20(function(_0x3f4cb1){_0x3f4cb1(_0x1b5ef9);});}return new(_0x48dd20||(_0x48dd20=Promise))(function(_0x5c2504,_0x4f58a5){function _0x547e4a(_0x2dbc30){try{_0x53efb0(_0x55696e['next'](_0x2dbc30));}catch(_0x2968ab){_0x4f58a5(_0x2968ab);}}function _0x26364f(_0x5d9838){try{_0x53efb0(_0x55696e[a7_0x4eac('0x4')](_0x5d9838));}catch(_0x43564d){_0x4f58a5(_0x43564d);}}function _0x53efb0(_0x2d0356){_0x2d0356[a7_0x4eac('0x23')]?_0x5c2504(_0x2d0356[a7_0x4eac('0x5d')]):_0x41d6c7(_0x2d0356[a7_0x4eac('0x5d')])[a7_0x4eac('0x67')](_0x547e4a,_0x26364f);}_0x53efb0((_0x55696e=_0x55696e[a7_0x4eac('0x50')](_0x37205a,_0xc83eb9||[]))[a7_0x4eac('0x16')]());});};Object[a7_0x4eac('0x17')](exports,a7_0x4eac('0x28'),{'value':!![]});exports[a7_0x4eac('0x14')]=exports['nxCloudDistributedTasksRunner']=void 0x0;const Observable_1=require('rxjs/internal/Observable');const stripJsonComments=require(a7_0x4eac('0x4a'));const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x4eac('0x55'));const file_storage_1=require(a7_0x4eac('0x12'));const e2e_encryption_1=require(a7_0x4eac('0x2d'));const waiter_1=require('../../../utilities/waiter');const environment_1=require(a7_0x4eac('0x43'));const print_run_group_error_1=require(a7_0x4eac('0x2e'));const create_no_new_messages_timeout_1=require(a7_0x4eac('0x38'));const metric_logger_1=require(a7_0x4eac('0x49'));const {output,getDependencyConfigs,getOutputs,unparse,Cache}=require(a7_0x4eac('0x27'));class NoopLifeCycle{['scheduleTask'](_0x3ea615){}['startTask'](_0x26f83c){}[a7_0x4eac('0x51')](_0x74e1d2,_0x36cf54){}}function runDistributedExecution(_0x30080b,_0x4dba9b,_0x46571b,_0x5de3ed,_0x5abcb6,_0x143c99,_0x4dad1b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x245bb6=JSON[a7_0x4eac('0x54')](stripJsonComments((0x0,fs_1['readFileSync'])('nx.json')['toString']()));const _0x1c8873=new TaskOrderer(_0x46571b[a7_0x4eac('0xe')],getDefaultDependencyConfigs(_0x245bb6,_0x4dba9b))[a7_0x4eac('0x45')](_0x4dad1b);const _0x27ee49=yield _0x30080b[a7_0x4eac('0x4f')]((0x0,distributed_execution_api_1['createStartRequest'])(_0x143c99,_0x1c8873,_0x4dba9b));return yield processTasks(_0x30080b,_0x5de3ed,_0x5abcb6,_0x4dba9b,_0x27ee49,_0x4dad1b,_0x46571b);});}function processTasks(_0x5c0371,_0x1baa9b,_0x16bcf8,_0x4130a2,_0xee56f4,_0x337971,_0x5ebf56){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1732b5={};const _0x4d21c4=(0x0,create_no_new_messages_timeout_1[a7_0x4eac('0x41')])();const _0x3c2ff3=new waiter_1[(a7_0x4eac('0x3'))]();while(!![]){if(environment_1[a7_0x4eac('0x69')]){output[a7_0x4eac('0x4e')]({'title':a7_0x4eac('0x68')});}yield _0x3c2ff3[a7_0x4eac('0x25')]();const _0x45a8bd=yield _0x5c0371[a7_0x4eac('0x0')](_0xee56f4);if(environment_1['VERBOSE_LOGGING']){output['note']({'title':a7_0x4eac('0x22'),'bodyLines':[a7_0x4eac('0x64')+_0xee56f4,a7_0x4eac('0x40')+_0x45a8bd[a7_0x4eac('0x1c')],a7_0x4eac('0x44')+_0x45a8bd[a7_0x4eac('0x30')]['length'],a7_0x4eac('0x56')+_0x45a8bd['criticalErrorMessage']]});}if(_0x45a8bd[a7_0x4eac('0x59')]){output[a7_0x4eac('0x1f')]({'title':a7_0x4eac('0x13'),'bodyLines':[a7_0x4eac('0x2b'),_0x45a8bd[a7_0x4eac('0x59')]]});process['exit'](0x1);}_0x4d21c4(_0x45a8bd[a7_0x4eac('0x30')][a7_0x4eac('0x6b')]);for(const _0x2180a8 of _0x45a8bd['completedTasks']){if(_0x1732b5[_0x2180a8[a7_0x4eac('0x29')]])continue;yield processTask(_0x1baa9b,_0x16bcf8,_0x5ebf56,_0x4130a2,_0x337971,_0x2180a8);_0x3c2ff3[a7_0x4eac('0x65')]();_0x1732b5[_0x2180a8[a7_0x4eac('0x29')]]=!![];}if(_0x45a8bd[a7_0x4eac('0x1c')]===a7_0x4eac('0x58')){return{'commandStatus':_0x45a8bd['commandStatus'],'runUrl':_0x45a8bd[a7_0x4eac('0x3c')]};}}});}function processTask(_0x2cb77a,_0xb8d4d8,_0x160844,_0x4f2c5a,_0x60be7e,_0x55435f){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output[a7_0x4eac('0x4e')]({'title':a7_0x4eac('0x8')+_0x55435f[a7_0x4eac('0x29')]});}const _0x39d589=_0x60be7e[a7_0x4eac('0x42')](_0x557dde=>_0x55435f['taskId']===_0x557dde['id']);if(!_0x39d589){throw new Error(a7_0x4eac('0x1e')+_0x55435f[a7_0x4eac('0x29')]);}if(environment_1['VERBOSE_LOGGING']){output['note']({'title':'Retrieving\x20artifacts\x20from\x20'+_0x55435f[a7_0x4eac('0x60')]});}yield _0x2cb77a[a7_0x4eac('0xd')](_0x55435f[a7_0x4eac('0x26')],_0x55435f[a7_0x4eac('0x60')],_0x4f2c5a[a7_0x4eac('0x3b')]||a7_0x4eac('0x15'));const _0x40613a=yield _0xb8d4d8[a7_0x4eac('0x20')](Object[a7_0x4eac('0x46')](Object[a7_0x4eac('0x46')]({},_0x39d589),{'hash':_0x55435f['hash']}));const _0x10c51a=getOutputs(_0x160844['projectGraph']['nodes'],_0x39d589);if(environment_1[a7_0x4eac('0x69')]){output[a7_0x4eac('0x4e')]({'title':a7_0x4eac('0x37'),'bodyLines':_0x10c51a});}yield _0xb8d4d8['copyFilesFromCache'](_0x55435f[a7_0x4eac('0x26')],_0x40613a,_0x10c51a);output[a7_0x4eac('0x35')](getCommand(_0x39d589));process[a7_0x4eac('0x36')]['write'](_0x40613a[a7_0x4eac('0xc')]);output['addVerticalSeparator']();});}function getCommand(_0x35ccc3){const _0x126b68=unparse(_0x35ccc3[a7_0x4eac('0x1d')]||{});const _0x92528=_0x35ccc3[a7_0x4eac('0x4b')][a7_0x4eac('0x9')]?':'+_0x35ccc3['target'][a7_0x4eac('0x9')]:'';return['nx',a7_0x4eac('0x5b'),_0x35ccc3[a7_0x4eac('0x4b')][a7_0x4eac('0x19')]+':'+_0x35ccc3[a7_0x4eac('0x4b')][a7_0x4eac('0x4b')]+_0x92528,..._0x126b68][a7_0x4eac('0x5a')]('\x20');}const nxCloudDistributedTasksRunner=(_0x1cb758,_0x2c5638,_0x7b53a1)=>{if(environment_1[a7_0x4eac('0x69')]){output[a7_0x4eac('0x4e')]({'title':'Starting\x20distributed\x20command\x20execution'});}_0x2c5638[a7_0x4eac('0x1b')]=new NoopLifeCycle();const _0x487171=(0x0,environment_1[a7_0x4eac('0x3e')])();if(!_0x487171){(0x0,print_run_group_error_1[a7_0x4eac('0x39')])();return process['exit'](0x1);}const _0x5644fe=new e2e_encryption_1[(a7_0x4eac('0x32'))](environment_1[a7_0x4eac('0x2f')]||_0x2c5638[a7_0x4eac('0x4d')]);const _0x5f28f0=new file_storage_1[(a7_0x4eac('0x63'))](_0x5644fe);const _0x1681c8=new Cache(_0x2c5638);const _0xdf5c8=new distributed_execution_api_1[(a7_0x4eac('0x5e'))](_0x2c5638);runDistributedExecution(_0xdf5c8,_0x2c5638,_0x7b53a1,_0x5f28f0,_0x1681c8,_0x487171,_0x1cb758)[a7_0x4eac('0x67')](_0xfd2d6b=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(_0xfd2d6b[a7_0x4eac('0x57')]===0x0){output[a7_0x4eac('0x52')]({'title':'Successfully\x20completed\x20running\x20the\x20command.','bodyLines':[a7_0x4eac('0x6')+_0xfd2d6b[a7_0x4eac('0x3c')]]});}else{output[a7_0x4eac('0x1f')]({'title':a7_0x4eac('0x1'),'bodyLines':[a7_0x4eac('0x6')+_0xfd2d6b['runUrl']]});}yield(0x0,metric_logger_1[a7_0x4eac('0x34')])(_0x2c5638);process[a7_0x4eac('0x5')](_0xfd2d6b[a7_0x4eac('0x57')]);}))[a7_0x4eac('0x24')](_0x18d3ab=>{output[a7_0x4eac('0x1f')]({'title':a7_0x4eac('0x62'),'bodyLines':[_0x18d3ab[a7_0x4eac('0x7')]]});if(_0x18d3ab[a7_0x4eac('0x6c')]){console[a7_0x4eac('0x2c')](_0x18d3ab[a7_0x4eac('0x6c')]);}else{console[a7_0x4eac('0x2c')](_0x18d3ab);}_0xdf5c8[a7_0x4eac('0x5c')](_0x487171,a7_0x4eac('0x3d')+_0x18d3ab['message']+'\x22')[a7_0x4eac('0x3a')](()=>process['exit'](0x1));});return new Observable_1[(a7_0x4eac('0x48'))](()=>{});};exports[a7_0x4eac('0x10')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x5aba69,_0x5c93f8){this[a7_0x4eac('0xe')]=_0x5aba69;this[a7_0x4eac('0x31')]=_0x5c93f8;}[a7_0x4eac('0x45')](_0x13e31a){if(_0x13e31a['length']===0x0)return[];const _0x1dfc6a=[];const _0x5c03cd=this['createTaskGraph'](_0x13e31a);const _0x5f022a=new Set(_0x13e31a['map'](_0x2b5d24=>_0x2b5d24['id']));let _0x179440=0x0;while(_0x5f022a[a7_0x4eac('0x5f')]>0x0){const _0x255725=_0x1dfc6a[_0x179440]=[];for(const _0x412c50 of _0x5f022a){let _0x137cf4=!![];for(const _0x485c5b of _0x5c03cd[a7_0x4eac('0x21')][_0x412c50]){if(_0x5f022a['has'](_0x485c5b)){_0x137cf4=![];break;}}if(!_0x137cf4){continue;}const _0x23fcbb=_0x5c03cd[a7_0x4eac('0x2')][_0x412c50];_0x255725[a7_0x4eac('0x3f')](_0x23fcbb);}for(const _0x4c95fa of _0x255725){_0x5f022a[a7_0x4eac('0x33')](_0x4c95fa['id']);}_0x179440++;}return _0x1dfc6a;}['createTaskGraph'](_0x301da9){const _0x52b26f=new TaskGraphCreator(this[a7_0x4eac('0xe')],this[a7_0x4eac('0x31')]);return _0x52b26f[a7_0x4eac('0xb')](_0x301da9);}}class TaskGraphCreator{constructor(_0xb73ede,_0x3b69e5){this[a7_0x4eac('0xe')]=_0xb73ede;this[a7_0x4eac('0x31')]=_0x3b69e5;}['createTaskGraph'](_0x599736){const _0x4ca1e9={'roots':[],'tasks':{},'dependencies':{}};for(const _0x249d0b of _0x599736){this[a7_0x4eac('0x6a')](_0x249d0b,_0x4ca1e9);const _0x1a93b0=getDependencyConfigs(_0x249d0b['target'],this[a7_0x4eac('0x31')],this[a7_0x4eac('0xe')]);if(!_0x1a93b0){continue;}this[a7_0x4eac('0x61')](_0x249d0b,_0x1a93b0,_0x599736,_0x4ca1e9);}_0x4ca1e9[a7_0x4eac('0x66')]=Object['keys'](_0x4ca1e9[a7_0x4eac('0x21')])['filter'](_0x31a255=>_0x4ca1e9[a7_0x4eac('0x21')][_0x31a255][a7_0x4eac('0x6b')]===0x0);return _0x4ca1e9;}[a7_0x4eac('0x61')](_0x3d5898,_0x1f63cb,_0x5af7a3,_0x4000b4){for(const _0x3f139 of _0x1f63cb){if(_0x3f139[a7_0x4eac('0x2a')]==='self'){for(const _0x264d7a of _0x5af7a3){if(_0x264d7a[a7_0x4eac('0x4b')][a7_0x4eac('0x19')]===_0x3d5898[a7_0x4eac('0x4b')]['project']&&_0x264d7a[a7_0x4eac('0x4b')][a7_0x4eac('0x4b')]===_0x3f139[a7_0x4eac('0x4b')]){_0x4000b4[a7_0x4eac('0x21')][_0x3d5898['id']][a7_0x4eac('0x3f')](_0x264d7a['id']);}}}else if(_0x3f139[a7_0x4eac('0x2a')]==='dependencies'){const _0x128ff2=new Set();this[a7_0x4eac('0xf')](_0x3d5898[a7_0x4eac('0x4b')][a7_0x4eac('0x19')],_0x3f139[a7_0x4eac('0x4b')],_0x5af7a3,_0x4000b4,_0x3d5898['id'],_0x128ff2);}}}[a7_0x4eac('0xf')](_0x47d3ad,_0x4fa4ac,_0x32ed3c,_0x3a21e6,_0x52c421,_0x2fe424){_0x2fe424[a7_0x4eac('0x11')](_0x47d3ad);const _0x25c08e=this[a7_0x4eac('0xe')][a7_0x4eac('0x21')][_0x47d3ad];if(_0x25c08e){const _0x5eedf8=_0x25c08e[a7_0x4eac('0x18')](_0x557183=>_0x557183[a7_0x4eac('0x4b')]);for(const _0x18a81c of _0x5eedf8){if(_0x2fe424['has'](_0x18a81c)){continue;}const _0x2c704d=this['findTask']({'project':_0x18a81c,'target':_0x4fa4ac},_0x32ed3c);if(_0x2c704d){if(_0x3a21e6[a7_0x4eac('0x21')][_0x52c421][a7_0x4eac('0xa')](_0x2c704d['id'])===-0x1){_0x3a21e6[a7_0x4eac('0x21')][_0x52c421][a7_0x4eac('0x3f')](_0x2c704d['id']);}}else{this[a7_0x4eac('0xf')](_0x18a81c,_0x4fa4ac,_0x32ed3c,_0x3a21e6,_0x52c421,_0x2fe424);}}}}['findTask']({project,target},_0x4dca16){return _0x4dca16[a7_0x4eac('0x42')](_0x5f5103=>_0x5f5103[a7_0x4eac('0x4b')][a7_0x4eac('0x19')]===project&&_0x5f5103[a7_0x4eac('0x4b')][a7_0x4eac('0x4b')]===target);}[a7_0x4eac('0x6a')](_0x297c9e,_0x369d12){_0x369d12[a7_0x4eac('0x2')][_0x297c9e['id']]=_0x297c9e;_0x369d12['dependencies'][_0x297c9e['id']]=[];}}exports['TaskGraphCreator']=TaskGraphCreator;function getDefaultDependencyConfigs(_0x541013,_0x2bbc68){var _0x54883f,_0x3e0231;const _0x4ebc90=(_0x54883f=_0x541013[a7_0x4eac('0x53')])!==null&&_0x54883f!==void 0x0?_0x54883f:{};const _0xb1e16=_0x2bbc68?(_0x3e0231=_0x2bbc68[a7_0x4eac('0x47')])!==null&&_0x3e0231!==void 0x0?_0x3e0231:[a7_0x4eac('0x1a')]:[];for(const _0x8438ef of _0xb1e16){_0x4ebc90[_0x8438ef]=_0x4ebc90[_0x8438ef]||[];_0x4ebc90[_0x8438ef][a7_0x4eac('0x3f')]({'target':_0x8438ef,'projects':a7_0x4eac('0x21')});}return _0x4ebc90;}
|
|
1
|
+
const a7_0xc9ef=['ENCRYPTION_KEY','TaskGraphCreator','roots','runUrl','Waiting...','addVerticalSeparator','error:\x20','axiosException','__awaiter','Extracting\x20artifacts','catch','executionStatus','hash','startTask','../../error/print-run-group-error','assign','E2EEncryption','submitRunMetrics','createTaskGraph','Main\x20job\x20terminated\x20with\x20an\x20error:\x20\x22','nxCloudDistributedTasksRunner','next','self','Error:','configuration','__esModule','./distributed-execution.api','push','url','dependencies','See\x20run\x20details\x20at\x20','Distributed\x20Execution\x20Terminated','log','executionId:\x20','finally','readFileSync','findTask','success','../../../utilities/waiter','encryptionKey','Unable\x20to\x20complete\x20a\x20run.','note','nx.json','projects','projectGraph','retrieve','./node_modules/.cache/nx','../../file-storage/e2e-encryption','length','taskId','wait','target','defaultTargetDependencies','terminalOutput','../../file-storage/file-storage','message','addTaskDependencies','indexOf','find','Status\x20update','exit','nodes','keys','defineProperty','targetDependencies','getRunGroup','project','printRunGroupError','value','logCommand','VERBOSE_LOGGING','criticalErrorMessage','createNoNewMessagesTimeout','createStartRequest','then','delete','overrides','Successfully\x20completed\x20running\x20the\x20command.','error','../../../utilities/metric-logger','executionStatus:\x20','scheduleTask','lifeCycle','stdout','addDependencies','../../../utilities/environment','completeRunGroupWithError','addTaskToGraph','completedTasks','Command\x20execution\x20failed.','commandStatus','parse','reset','FileStorage','DistributedExecutionApi','Found\x20unknown\x20task:\x20','done','apply','copyFilesFromCache','endTask','strictlyOrderedTargets','build','../../../utilities/create-no-new-messages-timeout','has','map','throw'];(function(_0x24da4,_0xc9efb4){const _0x247c0c=function(_0x28ff1d){while(--_0x28ff1d){_0x24da4['push'](_0x24da4['shift']());}};_0x247c0c(++_0xc9efb4);}(a7_0xc9ef,0x64));const a7_0x247c=function(_0x24da4,_0xc9efb4){_0x24da4=_0x24da4-0x0;let _0x247c0c=a7_0xc9ef[_0x24da4];return _0x247c0c;};'use strict';var __awaiter=this&&this[a7_0x247c('0xe')]||function(_0x30935f,_0x2446cd,_0xd57e5f,_0x1ec0ad){function _0x398579(_0xad6757){return _0xad6757 instanceof _0xd57e5f?_0xad6757:new _0xd57e5f(function(_0x265d7c){_0x265d7c(_0xad6757);});}return new(_0xd57e5f||(_0xd57e5f=Promise))(function(_0x20f22e,_0x529d39){function _0x4294b0(_0x56d5cf){try{_0x2080c9(_0x1ec0ad[a7_0x247c('0x1b')](_0x56d5cf));}catch(_0x1d5f7e){_0x529d39(_0x1d5f7e);}}function _0x2f0a88(_0x93643f){try{_0x2080c9(_0x1ec0ad[a7_0x247c('0x5')](_0x93643f));}catch(_0xca1aef){_0x529d39(_0xca1aef);}}function _0x2080c9(_0x23365b){_0x23365b[a7_0x247c('0x66')]?_0x20f22e(_0x23365b[a7_0x247c('0x4a')]):_0x398579(_0x23365b[a7_0x247c('0x4a')])[a7_0x247c('0x50')](_0x4294b0,_0x2f0a88);}_0x2080c9((_0x1ec0ad=_0x1ec0ad[a7_0x247c('0x67')](_0x30935f,_0x2446cd||[]))[a7_0x247c('0x1b')]());});};Object[a7_0x247c('0x45')](exports,a7_0x247c('0x1f'),{'value':!![]});exports[a7_0x247c('0x7')]=exports[a7_0x247c('0x1a')]=void 0x0;const Observable_1=require('rxjs/internal/Observable');const stripJsonComments=require('strip-json-comments');const fs_1=require('fs');const distributed_execution_api_1=require(a7_0x247c('0x20'));const file_storage_1=require(a7_0x247c('0x3c'));const e2e_encryption_1=require(a7_0x247c('0x35'));const waiter_1=require(a7_0x247c('0x2c'));const environment_1=require(a7_0x247c('0x5b'));const print_run_group_error_1=require(a7_0x247c('0x14'));const create_no_new_messages_timeout_1=require(a7_0x247c('0x2'));const metric_logger_1=require(a7_0x247c('0x55'));const {output,getDependencyConfigs,getOutputs,unparse,Cache}=require('../../../utilities/nx-imports');class NoopLifeCycle{[a7_0x247c('0x57')](_0x456b9d){}[a7_0x247c('0x13')](_0x1243ca){}[a7_0x247c('0x69')](_0x2f44b8,_0x5ce368){}}function runDistributedExecution(_0xcba97,_0x1b640f,_0x89144b,_0x5c2fbd,_0x33fc6b,_0x1494d0,_0x3b60eb){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x56fa29=JSON[a7_0x247c('0x61')](stripJsonComments((0x0,fs_1[a7_0x247c('0x29')])(a7_0x247c('0x30'))['toString']()));const _0xb4d4d2=new TaskOrderer(_0x89144b[a7_0x247c('0x32')],getDefaultDependencyConfigs(_0x56fa29,_0x1b640f))['splitTasksIntoStages'](_0x3b60eb);const _0xd301a8=yield _0xcba97['start']((0x0,distributed_execution_api_1[a7_0x247c('0x4f')])(_0x1494d0,_0xb4d4d2,_0x1b640f));return yield processTasks(_0xcba97,_0x5c2fbd,_0x33fc6b,_0x1b640f,_0xd301a8,_0x3b60eb,_0x89144b);});}function processTasks(_0x3fbf08,_0x322dec,_0x13a70a,_0xe0f742,_0x407ad2,_0x55c02f,_0x590ed5){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x49419b={};const _0x377fc4=(0x0,create_no_new_messages_timeout_1[a7_0x247c('0x4e')])();const _0x51b5eb=new waiter_1['Waiter']();while(!![]){if(environment_1[a7_0x247c('0x4c')]){output[a7_0x247c('0x2f')]({'title':a7_0x247c('0xa')});}yield _0x51b5eb[a7_0x247c('0x38')]();const _0x6024b3=yield _0x3fbf08['status'](_0x407ad2);if(environment_1['VERBOSE_LOGGING']){output[a7_0x247c('0x2f')]({'title':a7_0x247c('0x41'),'bodyLines':[a7_0x247c('0x27')+_0x407ad2,a7_0x247c('0x56')+_0x6024b3[a7_0x247c('0x11')],'number\x20of\x20completed\x20tasks:\x20'+_0x6024b3['completedTasks'][a7_0x247c('0x36')],a7_0x247c('0xc')+_0x6024b3[a7_0x247c('0x4d')]]});}if(_0x6024b3['criticalErrorMessage']){output['error']({'title':a7_0x247c('0x25'),'bodyLines':[a7_0x247c('0x1d'),_0x6024b3[a7_0x247c('0x4d')]]});process[a7_0x247c('0x42')](0x1);}_0x377fc4(_0x6024b3[a7_0x247c('0x5e')][a7_0x247c('0x36')]);for(const _0x5d029b of _0x6024b3[a7_0x247c('0x5e')]){if(_0x49419b[_0x5d029b['taskId']])continue;yield processTask(_0x322dec,_0x13a70a,_0x590ed5,_0xe0f742,_0x55c02f,_0x5d029b);_0x51b5eb[a7_0x247c('0x62')]();_0x49419b[_0x5d029b[a7_0x247c('0x37')]]=!![];}if(_0x6024b3['executionStatus']==='COMPLETED'){return{'commandStatus':_0x6024b3['commandStatus'],'runUrl':_0x6024b3[a7_0x247c('0x9')]};}}});}function processTask(_0x3a2d32,_0x2ab294,_0x33d4fe,_0x182e70,_0x3e01ec,_0x205ff5){return __awaiter(this,void 0x0,void 0x0,function*(){if(environment_1['VERBOSE_LOGGING']){output[a7_0x247c('0x2f')]({'title':'Processing\x20task\x20'+_0x205ff5[a7_0x247c('0x37')]});}const _0x22fe79=_0x3e01ec[a7_0x247c('0x40')](_0x3e1a8b=>_0x205ff5[a7_0x247c('0x37')]===_0x3e1a8b['id']);if(!_0x22fe79){throw new Error(a7_0x247c('0x65')+_0x205ff5[a7_0x247c('0x37')]);}if(environment_1[a7_0x247c('0x4c')]){output[a7_0x247c('0x2f')]({'title':'Retrieving\x20artifacts\x20from\x20'+_0x205ff5[a7_0x247c('0x22')]});}yield _0x3a2d32[a7_0x247c('0x33')](_0x205ff5[a7_0x247c('0x12')],_0x205ff5[a7_0x247c('0x22')],_0x182e70['cacheDirectory']||a7_0x247c('0x34'));const _0x571726=yield _0x2ab294['get'](Object[a7_0x247c('0x15')](Object[a7_0x247c('0x15')]({},_0x22fe79),{'hash':_0x205ff5['hash']}));const _0x26c37e=getOutputs(_0x33d4fe[a7_0x247c('0x32')][a7_0x247c('0x43')],_0x22fe79);if(environment_1[a7_0x247c('0x4c')]){output['note']({'title':a7_0x247c('0xf'),'bodyLines':_0x26c37e});}yield _0x2ab294[a7_0x247c('0x68')](_0x205ff5[a7_0x247c('0x12')],_0x571726,_0x26c37e);output[a7_0x247c('0x4b')](getCommand(_0x22fe79));process[a7_0x247c('0x59')]['write'](_0x571726[a7_0x247c('0x3b')]);output[a7_0x247c('0xb')]();});}function getCommand(_0x3bab65){const _0x3f5e2f=unparse(_0x3bab65[a7_0x247c('0x52')]||{});const _0x4fa791=_0x3bab65['target']['configuration']?':'+_0x3bab65[a7_0x247c('0x39')][a7_0x247c('0x1e')]:'';return['nx','run',_0x3bab65[a7_0x247c('0x39')][a7_0x247c('0x48')]+':'+_0x3bab65[a7_0x247c('0x39')][a7_0x247c('0x39')]+_0x4fa791,..._0x3f5e2f]['join']('\x20');}const nxCloudDistributedTasksRunner=(_0x39cdaa,_0x59287d,_0x107c99)=>{if(environment_1[a7_0x247c('0x4c')]){output[a7_0x247c('0x2f')]({'title':'Starting\x20distributed\x20command\x20execution'});}_0x59287d[a7_0x247c('0x58')]=new NoopLifeCycle();const _0x5eeb2d=(0x0,environment_1[a7_0x247c('0x47')])();if(!_0x5eeb2d){(0x0,print_run_group_error_1[a7_0x247c('0x49')])();return process[a7_0x247c('0x42')](0x1);}const _0x2dacd6=new e2e_encryption_1[(a7_0x247c('0x16'))](environment_1[a7_0x247c('0x6')]||_0x59287d[a7_0x247c('0x2d')]);const _0x320243=new file_storage_1[(a7_0x247c('0x63'))](_0x2dacd6);const _0xd47c9=new Cache(_0x59287d);const _0x8d738=new distributed_execution_api_1[(a7_0x247c('0x64'))](_0x59287d);runDistributedExecution(_0x8d738,_0x59287d,_0x107c99,_0x320243,_0xd47c9,_0x5eeb2d,_0x39cdaa)[a7_0x247c('0x50')](_0x2ed2ac=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){if(_0x2ed2ac[a7_0x247c('0x60')]===0x0){output[a7_0x247c('0x2b')]({'title':a7_0x247c('0x53'),'bodyLines':[a7_0x247c('0x24')+_0x2ed2ac[a7_0x247c('0x9')]]});}else{output[a7_0x247c('0x54')]({'title':a7_0x247c('0x5f'),'bodyLines':[a7_0x247c('0x24')+_0x2ed2ac[a7_0x247c('0x9')]]});}yield(0x0,metric_logger_1[a7_0x247c('0x17')])(_0x59287d);process[a7_0x247c('0x42')](_0x2ed2ac[a7_0x247c('0x60')]);}))[a7_0x247c('0x10')](_0x512fb2=>{output[a7_0x247c('0x54')]({'title':a7_0x247c('0x2e'),'bodyLines':[_0x512fb2[a7_0x247c('0x3d')]]});if(_0x512fb2['axiosException']){console[a7_0x247c('0x26')](_0x512fb2[a7_0x247c('0xd')]);}else{console['log'](_0x512fb2);}_0x8d738[a7_0x247c('0x5c')](_0x5eeb2d,a7_0x247c('0x19')+_0x512fb2[a7_0x247c('0x3d')]+'\x22')[a7_0x247c('0x28')](()=>process['exit'](0x1));});return new Observable_1['Observable'](()=>{});};exports[a7_0x247c('0x1a')]=nxCloudDistributedTasksRunner;class TaskOrderer{constructor(_0x5eef82,_0x84ac3a){this['projectGraph']=_0x5eef82;this[a7_0x247c('0x3a')]=_0x84ac3a;}['splitTasksIntoStages'](_0xc04f01){if(_0xc04f01[a7_0x247c('0x36')]===0x0)return[];const _0x3a55ac=[];const _0x2f7ac0=this['createTaskGraph'](_0xc04f01);const _0x2ffa08=new Set(_0xc04f01[a7_0x247c('0x4')](_0x41df56=>_0x41df56['id']));let _0x2013f6=0x0;while(_0x2ffa08['size']>0x0){const _0x1c18a0=_0x3a55ac[_0x2013f6]=[];for(const _0x28ab49 of _0x2ffa08){let _0x2b5b82=!![];for(const _0x569ad7 of _0x2f7ac0[a7_0x247c('0x23')][_0x28ab49]){if(_0x2ffa08[a7_0x247c('0x3')](_0x569ad7)){_0x2b5b82=![];break;}}if(!_0x2b5b82){continue;}const _0x1c65ca=_0x2f7ac0['tasks'][_0x28ab49];_0x1c18a0[a7_0x247c('0x21')](_0x1c65ca);}for(const _0x2071f1 of _0x1c18a0){_0x2ffa08[a7_0x247c('0x51')](_0x2071f1['id']);}_0x2013f6++;}return _0x3a55ac;}['createTaskGraph'](_0x699c67){const _0x44112e=new TaskGraphCreator(this[a7_0x247c('0x32')],this[a7_0x247c('0x3a')]);return _0x44112e['createTaskGraph'](_0x699c67);}}class TaskGraphCreator{constructor(_0x365591,_0x2b1eff){this[a7_0x247c('0x32')]=_0x365591;this[a7_0x247c('0x3a')]=_0x2b1eff;}[a7_0x247c('0x18')](_0x5e170f){const _0x53cd1a={'roots':[],'tasks':{},'dependencies':{}};for(const _0x5d33d1 of _0x5e170f){this[a7_0x247c('0x5d')](_0x5d33d1,_0x53cd1a);const _0x213a8c=getDependencyConfigs(_0x5d33d1[a7_0x247c('0x39')],this[a7_0x247c('0x3a')],this[a7_0x247c('0x32')]);if(!_0x213a8c){continue;}this['addTaskDependencies'](_0x5d33d1,_0x213a8c,_0x5e170f,_0x53cd1a);}_0x53cd1a[a7_0x247c('0x8')]=Object[a7_0x247c('0x44')](_0x53cd1a[a7_0x247c('0x23')])['filter'](_0x5d1ed3=>_0x53cd1a[a7_0x247c('0x23')][_0x5d1ed3][a7_0x247c('0x36')]===0x0);return _0x53cd1a;}[a7_0x247c('0x3e')](_0x11150d,_0x44a519,_0x227d74,_0x108818){for(const _0x51196b of _0x44a519){if(_0x51196b[a7_0x247c('0x31')]===a7_0x247c('0x1c')){for(const _0x300986 of _0x227d74){if(_0x300986['target'][a7_0x247c('0x48')]===_0x11150d[a7_0x247c('0x39')][a7_0x247c('0x48')]&&_0x300986[a7_0x247c('0x39')][a7_0x247c('0x39')]===_0x51196b[a7_0x247c('0x39')]){_0x108818[a7_0x247c('0x23')][_0x11150d['id']][a7_0x247c('0x21')](_0x300986['id']);}}}else if(_0x51196b[a7_0x247c('0x31')]===a7_0x247c('0x23')){const _0x177434=new Set();this['addDependencies'](_0x11150d['target'][a7_0x247c('0x48')],_0x51196b[a7_0x247c('0x39')],_0x227d74,_0x108818,_0x11150d['id'],_0x177434);}}}[a7_0x247c('0x5a')](_0x272838,_0x2536f7,_0x27a58b,_0x5aac49,_0x1bbfdd,_0x317758){_0x317758['add'](_0x272838);const _0x596858=this[a7_0x247c('0x32')][a7_0x247c('0x23')][_0x272838];if(_0x596858){const _0x2a2112=_0x596858[a7_0x247c('0x4')](_0x222fc3=>_0x222fc3[a7_0x247c('0x39')]);for(const _0x45aea7 of _0x2a2112){if(_0x317758[a7_0x247c('0x3')](_0x45aea7)){continue;}const _0xc739=this[a7_0x247c('0x2a')]({'project':_0x45aea7,'target':_0x2536f7},_0x27a58b);if(_0xc739){if(_0x5aac49[a7_0x247c('0x23')][_0x1bbfdd][a7_0x247c('0x3f')](_0xc739['id'])===-0x1){_0x5aac49[a7_0x247c('0x23')][_0x1bbfdd][a7_0x247c('0x21')](_0xc739['id']);}}else{this[a7_0x247c('0x5a')](_0x45aea7,_0x2536f7,_0x27a58b,_0x5aac49,_0x1bbfdd,_0x317758);}}}}[a7_0x247c('0x2a')]({project,target},_0x4b8197){return _0x4b8197[a7_0x247c('0x40')](_0x5f3fe3=>_0x5f3fe3['target']['project']===project&&_0x5f3fe3[a7_0x247c('0x39')][a7_0x247c('0x39')]===target);}['addTaskToGraph'](_0x1692c0,_0x443958){_0x443958['tasks'][_0x1692c0['id']]=_0x1692c0;_0x443958[a7_0x247c('0x23')][_0x1692c0['id']]=[];}}exports['TaskGraphCreator']=TaskGraphCreator;function getDefaultDependencyConfigs(_0x1e3b97,_0x23a679){var _0x2e47f8,_0x4349e5;const _0x381c40=(_0x2e47f8=_0x1e3b97[a7_0x247c('0x46')])!==null&&_0x2e47f8!==void 0x0?_0x2e47f8:{};const _0x3e72d9=_0x23a679?(_0x4349e5=_0x23a679[a7_0x247c('0x0')])!==null&&_0x4349e5!==void 0x0?_0x4349e5:[a7_0x247c('0x1')]:[];for(const _0x340ff5 of _0x3e72d9){_0x381c40[_0x340ff5]=_0x381c40[_0x340ff5]||[];_0x381c40[_0x340ff5]['push']({'target':_0x340ff5,'projects':a7_0x247c('0x23')});}return _0x381c40;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/nx-cloud",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.2",
|
|
4
4
|
"description": "Nx Cloud plugin for Nx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Monorepo",
|
|
@@ -23,11 +23,8 @@
|
|
|
23
23
|
"axios": "^0.21.1",
|
|
24
24
|
"node-machine-id": "^1.1.12",
|
|
25
25
|
"tar": "6.1.11",
|
|
26
|
-
"strip-json-comments": "^3.1.1"
|
|
27
|
-
},
|
|
28
|
-
"typings": "./index.d.ts",
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"rxjs": "6.5.5",
|
|
26
|
+
"strip-json-comments": "^3.1.1",
|
|
31
27
|
"chalk": "4.1.0"
|
|
32
|
-
}
|
|
28
|
+
},
|
|
29
|
+
"typings": "./index.d.ts"
|
|
33
30
|
}
|