@nrwl/nx-cloud
Advanced tools
Comparing version 9.0.5 to 9.0.6
@@ -1,1 +0,1 @@ | ||
const a0_0x37c7=['NxCloud:\x20-\x20All\x20runtimeCacheInputs\x20in\x20nx.json\x20return\x20the\x20same\x20values.','tar','post','response','throw','defineProperty','storeCache','.commit','env','createFileName','EAI_AGAIN','NxCloud:\x20If\x20you\x20expected\x20the\x20results\x20to\x20be\x20fetched\x20from\x20the\x20cache,\x20check\x20the\x20following:','-end','store','assign','/nx-cloud/cache/','NxCloud:\x20-\x20Global\x20configuration\x20files\x20(e.g.,\x20nx.json,\x20package.json,\x20workspace.json)\x20are\x20the\x20same.','uploadFile','downloadFile','then','GET','split','Nx\x20Cloud\x20Problems','createFile','dirname','data','done','.\x20Read\x20only\x20token\x20is\x20used.','push','NxCloud:\x20Storing\x20','true','VERBOSE_LOGGING','target','NxCloud:\x20Nx\x20wasn\x27t\x20able\x20to\x20get\x20anything\x20from\x20the\x20distributed\x20cache.','path','__awaiter','axiosInstance','warn','NX_CLOUD_AUTH_TOKEN','NxCloud:\x20Cache\x20hit\x20','cacheHits','printErrors','.tar.gz','NxCloud:\x20-\x20Flags\x20passed\x20to\x20the\x20builder\x20are\x20the\x20same\x20(e.g.,\x20--max-workers,\x20--source-maps)','close','stream','createCommitFile','complete','@nrwl/workspace/src/tasks-runner/tasks-runner-v2','string','NX_VERBOSE_LOGGING','base64','code','isReadWrite','cacheError','__esModule','accessToken','startTask','ENOTFOUND','lifeCycleError','api','retrieveCache','error','NxCloud:\x20Skipping\x20storing\x20','hash','url','log','stringify','join','writeFileSync','promises','/nx-cloud/cache/store/','PUT','/nx-cloud/tasks/start','tasksRunnerV2','NxCloud:\x20Stored\x20','toString','read-write','uuid','Invalid\x20remote\x20cache\x20response:\x20','retrieve','get','create','errors','-start','catch','all','value','toISOString','message','endTask','ECONNREFUSED','Invalid\x20Nx\x20Cloud\x20access\x20token.','Cannot\x20connect\x20to\x20remote\x20cache.','@nrwl/workspace/src/utils/output','default','readFileSync','apply','application/octet-stream','project','subscribe','uniqRunId','next','/nx-cloud/tasks/end','output'];(function(_0x193679,_0x37c75c){const _0xcce994=function(_0x2d2471){while(--_0x2d2471){_0x193679['push'](_0x193679['shift']());}};_0xcce994(++_0x37c75c);}(a0_0x37c7,0xcd));const a0_0xcce9=function(_0x193679,_0x37c75c){_0x193679=_0x193679-0x0;let _0xcce994=a0_0x37c7[_0x193679];return _0xcce994;};'use strict';var __awaiter=this&&this[a0_0xcce9('0x28')]||function(_0x4607b2,_0x3faaed,_0x32c5cb,_0x36f3c1){function _0x2eff7c(_0x219b5d){return _0x219b5d instanceof _0x32c5cb?_0x219b5d:new _0x32c5cb(function(_0x1fa67b){_0x1fa67b(_0x219b5d);});}return new(_0x32c5cb||(_0x32c5cb=Promise))(function(_0x4274d4,_0x2bb3a9){function _0x52c83c(_0x54b5ab){try{_0x315b74(_0x36f3c1['next'](_0x54b5ab));}catch(_0x293890){_0x2bb3a9(_0x293890);}}function _0x3023bd(_0x253543){try{_0x315b74(_0x36f3c1[a0_0xcce9('0x9')](_0x253543));}catch(_0x40e779){_0x2bb3a9(_0x40e779);}}function _0x315b74(_0x303772){_0x303772[a0_0xcce9('0x1f')]?_0x4274d4(_0x303772[a0_0xcce9('0x5c')]):_0x2eff7c(_0x303772[a0_0xcce9('0x5c')])[a0_0xcce9('0x18')](_0x52c83c,_0x3023bd);}_0x315b74((_0x36f3c1=_0x36f3c1[a0_0xcce9('0x66')](_0x4607b2,_0x3faaed||[]))[a0_0xcce9('0x2')]());});};Object[a0_0xcce9('0xa')](exports,a0_0xcce9('0x3c'),{'value':!![]});const rxjs_1=require('rxjs');const tasks_runner_v2_1=require(a0_0xcce9('0x35'));const output_1=require(a0_0xcce9('0x63'));const fs=require('fs');const fs_1=require('fs');const path=require(a0_0xcce9('0x27'));const uuid_1=require(a0_0xcce9('0x53'));const axios=require('axios');const tar=require(a0_0xcce9('0x6'));class CloudApi{constructor(_0x355d93,_0x442218){this[a0_0xcce9('0x1')]=uuid_1['v4']();const [_0x94064e,_0x3155ac]=new Buffer(_0x442218,a0_0xcce9('0x38'))[a0_0xcce9('0x51')]()[a0_0xcce9('0x1a')]('|');this[a0_0xcce9('0x3a')]=_0x3155ac===a0_0xcce9('0x52');this[a0_0xcce9('0x29')]=axios[a0_0xcce9('0x57')]({'baseURL':_0x355d93,'timeout':0x7530,'headers':{'authorization':_0x442218}});}['startTask'](_0x3afbb3){return this[a0_0xcce9('0x29')][a0_0xcce9('0x7')](a0_0xcce9('0x4e'),{'taskId':_0x3afbb3['id']+'-'+this['uniqRunId'],'startTime':new Date()['toISOString'](),'target':_0x3afbb3[a0_0xcce9('0x25')][a0_0xcce9('0x25')],'projectName':_0x3afbb3[a0_0xcce9('0x25')][a0_0xcce9('0x68')],'hash':_0x3afbb3[a0_0xcce9('0x45')]});}['endTask'](_0x30b7ab){return this['axiosInstance']['post'](a0_0xcce9('0x3'),{'taskId':_0x30b7ab['id']+'-'+this['uniqRunId'],'endTime':new Date()[a0_0xcce9('0x5d')]()});}[a0_0xcce9('0xb')](_0x24377a){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3da21a=yield this[a0_0xcce9('0x29')]({'method':a0_0xcce9('0x56'),'url':a0_0xcce9('0x4c')+_0x24377a});if(!_0x3da21a[a0_0xcce9('0x1e')]||!_0x3da21a[a0_0xcce9('0x1e')][a0_0xcce9('0x46')]||!(typeof _0x3da21a[a0_0xcce9('0x1e')][a0_0xcce9('0x46')]===a0_0xcce9('0x36'))){throw new Error(a0_0xcce9('0x54')+JSON[a0_0xcce9('0x48')](_0x3da21a[a0_0xcce9('0x1e')]));}return _0x3da21a[a0_0xcce9('0x1e')][a0_0xcce9('0x46')];});}['retrieveCache'](_0xae877e){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x594abd=yield this['axiosInstance']({'method':'get','url':a0_0xcce9('0x14')+_0xae877e});if(!_0x594abd[a0_0xcce9('0x1e')]||!_0x594abd[a0_0xcce9('0x1e')][a0_0xcce9('0x46')]||!(typeof _0x594abd[a0_0xcce9('0x1e')][a0_0xcce9('0x46')]===a0_0xcce9('0x36'))){throw new Error(a0_0xcce9('0x54')+JSON['stringify'](_0x594abd[a0_0xcce9('0x1e')]));}return _0x594abd[a0_0xcce9('0x1e')][a0_0xcce9('0x46')];});}}class CloudRemoteCache{constructor(_0x330e5c,_0x487395){this[a0_0xcce9('0x58')]=_0x330e5c;this[a0_0xcce9('0x41')]=_0x487395;}[a0_0xcce9('0x55')](_0xde839f,_0x34383b){return __awaiter(this,void 0x0,void 0x0,function*(){try{if(CloudRemoteCache[a0_0xcce9('0x24')]){console['log']('NxCloud:\x20Downloading\x20'+_0xde839f);}const _0x1cdd90=yield this['api'][a0_0xcce9('0x42')](_0xde839f);const _0x2b7717=this[a0_0xcce9('0xe')](_0xde839f,_0x34383b);yield this[a0_0xcce9('0x17')](_0x1cdd90,_0x2b7717);this[a0_0xcce9('0x33')](_0xde839f,_0x34383b);if(CloudRemoteCache[a0_0xcce9('0x24')]){console['log'](a0_0xcce9('0x2c')+_0xde839f);}this[a0_0xcce9('0x58')][a0_0xcce9('0x2d')]=!![];return!![];}catch(_0x4a1e8e){if(_0x4a1e8e[a0_0xcce9('0x8')]&&_0x4a1e8e['response']['status']===0x194){if(CloudRemoteCache[a0_0xcce9('0x24')]){console['log']('NxCloud:\x20Cache\x20miss\x20'+_0xde839f);}}else{this[a0_0xcce9('0x58')][a0_0xcce9('0x3b')]=extractErrorMessage(_0x4a1e8e);}return![];}});}[a0_0xcce9('0x12')](_0x30c923,_0xfa09a2){return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a0_0xcce9('0x41')][a0_0xcce9('0x3a')]){try{if(CloudRemoteCache[a0_0xcce9('0x24')]){console[a0_0xcce9('0x47')](a0_0xcce9('0x22')+_0x30c923);}const _0x1e9173=yield this[a0_0xcce9('0x41')][a0_0xcce9('0xb')](_0x30c923);const _0x14e6b0=yield this[a0_0xcce9('0x1c')](_0x30c923,_0xfa09a2);yield this[a0_0xcce9('0x16')](_0x1e9173,_0x14e6b0);if(CloudRemoteCache['VERBOSE_LOGGING']){console[a0_0xcce9('0x47')](a0_0xcce9('0x50')+_0x30c923);}return!![];}catch(_0x3feacb){this[a0_0xcce9('0x58')][a0_0xcce9('0x3b')]=extractErrorMessage(_0x3feacb);return![];}}else{if(CloudRemoteCache[a0_0xcce9('0x24')]){console[a0_0xcce9('0x47')](a0_0xcce9('0x44')+_0x30c923+a0_0xcce9('0x20'));}return!![];}});}[a0_0xcce9('0xe')](_0x2637c1,_0x3e7374){return path[a0_0xcce9('0x49')](_0x3e7374,_0x2637c1+a0_0xcce9('0x2f'));}[a0_0xcce9('0x17')](_0x431b8c,_0x28d8c7){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3a43c8=yield axios(_0x431b8c,{'method':a0_0xcce9('0x19'),'responseType':a0_0xcce9('0x32'),'maxContentLength':0x3e8*0x3e8*0xc8});const _0x27d509=_0x3a43c8[a0_0xcce9('0x1e')]['pipe'](tar['x']({'cwd':path[a0_0xcce9('0x1d')](_0x28d8c7)}));return new Promise(_0x538100=>{_0x27d509['on'](a0_0xcce9('0x31'),()=>{_0x538100();});});});}[a0_0xcce9('0x33')](_0x5c7f1d,_0x1d0a7d){fs_1[a0_0xcce9('0x4a')](path[a0_0xcce9('0x49')](_0x1d0a7d,_0x5c7f1d+a0_0xcce9('0xc')),a0_0xcce9('0x23'));}[a0_0xcce9('0x1c')](_0x1f5903,_0x132585){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x34dfc1=this['createFileName'](_0x1f5903,_0x132585);yield tar['c']({'gzip':!![],'file':_0x34dfc1,'cwd':_0x132585},[_0x1f5903]);return _0x34dfc1;});}[a0_0xcce9('0x16')](_0x2fb9d2,_0x594935){return __awaiter(this,void 0x0,void 0x0,function*(){yield axios(_0x2fb9d2,{'method':a0_0xcce9('0x4d'),'data':fs[a0_0xcce9('0x65')](_0x594935),'headers':{'Content-Type':a0_0xcce9('0x67')},'maxContentLength':0x3e8*0x3e8*0xc8});});}}CloudRemoteCache[a0_0xcce9('0x24')]=process[a0_0xcce9('0xd')][a0_0xcce9('0x37')];const nxCloudTaskRunner=(_0x3f3375,_0xd88af7,_0x2b2415)=>{if(process[a0_0xcce9('0xd')][a0_0xcce9('0x2b')]||_0xd88af7[a0_0xcce9('0x3d')]){const _0x167308=createApi(_0xd88af7);const _0x283b96=new ErrorReporter();const _0x432d7b=new TaskRunnerLifeCycle(_0x283b96,_0x167308);const _0x1fb481=new CloudRemoteCache(_0x283b96,_0x167308);const _0x3c53d2=tasks_runner_v2_1[a0_0xcce9('0x4f')](_0x3f3375,Object[a0_0xcce9('0x13')](Object[a0_0xcce9('0x13')]({},_0xd88af7),{'remoteCache':_0x1fb481,'lifeCycle':_0x432d7b}),_0x2b2415);const _0x5ca6f3=new rxjs_1['Subject']();_0x3c53d2[a0_0xcce9('0x0')]({'next':_0x34a4fa=>_0x5ca6f3['next'](_0x34a4fa),'error':_0x25a23f=>_0x5ca6f3[a0_0xcce9('0x43')](_0x25a23f),'complete':()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){yield _0x432d7b['complete']();_0x283b96[a0_0xcce9('0x2e')]();_0x5ca6f3[a0_0xcce9('0x34')]();})});return _0x5ca6f3;}else{return tasks_runner_v2_1[a0_0xcce9('0x4f')](_0x3f3375,_0xd88af7,_0x2b2415);}};class TaskRunnerLifeCycle{constructor(_0x4e9721,_0x4d540d){this[a0_0xcce9('0x58')]=_0x4e9721;this[a0_0xcce9('0x41')]=_0x4d540d;this['promises']={};}[a0_0xcce9('0x3e')](_0x533af8){if(this[a0_0xcce9('0x41')][a0_0xcce9('0x3a')]){this[a0_0xcce9('0x4b')][_0x533af8['id']+'-start']=this[a0_0xcce9('0x41')][a0_0xcce9('0x3e')](_0x533af8)['catch'](_0xf8cc3=>{this[a0_0xcce9('0x58')]['lifeCycleError']=extractErrorMessage(_0xf8cc3);});}}['endTask'](_0x39c127,_0x24b06e){if(this[a0_0xcce9('0x41')][a0_0xcce9('0x3a')]){const _0x1a5871=this[a0_0xcce9('0x4b')][_0x39c127['id']+a0_0xcce9('0x59')][a0_0xcce9('0x18')](()=>{return this[a0_0xcce9('0x41')][a0_0xcce9('0x5f')](_0x39c127);})[a0_0xcce9('0x5a')](_0x269dd5=>{this[a0_0xcce9('0x58')][a0_0xcce9('0x40')]=extractErrorMessage(_0x269dd5);});this['promises'][_0x39c127['id']+a0_0xcce9('0x11')]=_0x1a5871;}}[a0_0xcce9('0x34')](){return Promise[a0_0xcce9('0x5b')](Object['values'](this['promises']));}}class ErrorReporter{constructor(){this[a0_0xcce9('0x3b')]=null;this[a0_0xcce9('0x40')]=null;this['cacheHits']=![];}[a0_0xcce9('0x2e')](){if(this[a0_0xcce9('0x3b')]||this[a0_0xcce9('0x40')]){const _0x1681d1=[];if(this[a0_0xcce9('0x3b')]){_0x1681d1[a0_0xcce9('0x21')]('-\x20'+this[a0_0xcce9('0x3b')]);}if(this[a0_0xcce9('0x40')]&&this[a0_0xcce9('0x40')]!==this[a0_0xcce9('0x3b')]){_0x1681d1[a0_0xcce9('0x21')]('-\x20'+this['lifeCycleError']);}output_1[a0_0xcce9('0x4')][a0_0xcce9('0x2a')]({'title':a0_0xcce9('0x1b'),'bodyLines':_0x1681d1});}if(!this[a0_0xcce9('0x2d')]&&ErrorReporter['VERBOSE_LOGGING']){console[a0_0xcce9('0x47')](a0_0xcce9('0x26'));console[a0_0xcce9('0x47')](a0_0xcce9('0x10'));console['log'](a0_0xcce9('0x5'));console[a0_0xcce9('0x47')](a0_0xcce9('0x15'));console[a0_0xcce9('0x47')](a0_0xcce9('0x30'));}}}ErrorReporter['VERBOSE_LOGGING']=process[a0_0xcce9('0xd')]['NX_VERBOSE_LOGGING'];function extractErrorMessage(_0xd77f43){if(_0xd77f43[a0_0xcce9('0x39')]===a0_0xcce9('0x60')||_0xd77f43[a0_0xcce9('0x39')]===a0_0xcce9('0xf')||_0xd77f43[a0_0xcce9('0x39')]===a0_0xcce9('0x3f')||_0xd77f43[a0_0xcce9('0x39')]==='EPROTO'){return a0_0xcce9('0x62');}else if(_0xd77f43[a0_0xcce9('0x8')]&&_0xd77f43[a0_0xcce9('0x8')]['status']===0x191){return a0_0xcce9('0x61');}else{let _0x3437f3='';if(_0xd77f43[a0_0xcce9('0x8')]&&_0xd77f43['response'][a0_0xcce9('0x1e')]&&_0xd77f43[a0_0xcce9('0x8')]['data'][a0_0xcce9('0x5e')]){_0x3437f3='.\x20'+_0xd77f43[a0_0xcce9('0x8')][a0_0xcce9('0x1e')][a0_0xcce9('0x5e')];}else if(_0xd77f43[a0_0xcce9('0x8')]&&_0xd77f43[a0_0xcce9('0x8')][a0_0xcce9('0x1e')]){_0x3437f3='.\x20'+_0xd77f43[a0_0xcce9('0x8')][a0_0xcce9('0x1e')];}return''+_0xd77f43['message']+_0x3437f3;}}function createApi(_0x4355d2){const _0x2b609f=_0x4355d2['url']||'https://api.nrwl.io';if(process[a0_0xcce9('0xd')][a0_0xcce9('0x2b')]){return new CloudApi(_0x2b609f,process[a0_0xcce9('0xd')][a0_0xcce9('0x2b')]);}else{return new CloudApi(_0x2b609f,_0x4355d2['accessToken']);}}exports[a0_0xcce9('0x64')]=nxCloudTaskRunner; | ||
const a0_0xdc4b=['NxCloud:\x20Downloading\x20','data','cacheHits','url','Nx\x20Cloud\x20Problems','axiosInstance','value','target','@nrwl/workspace/src/tasks-runner/tasks-runner-v2','accessToken','push','code','toString','cacheError','retrieveCache','createCommitFile','next','printErrors','createFile','endTaskRecord','storeCache','NxCloud:\x20If\x20you\x20expected\x20the\x20results\x20to\x20be\x20fetched\x20from\x20the\x20cache,\x20check\x20the\x20following:','lifeCycleError','response','store','NxCloud:\x20Storing\x20','base64','api','__awaiter','/nx-cloud/tasks/end','join','get','rxjs','message','error','uniqRunId','createFileName','endTask','env','ENOTFOUND','warn','promises','application/octet-stream','pipe','EAI_AGAIN','tar','log','Cannot\x20connect\x20to\x20remote\x20cache.','startTaskRecord','default','GET','catch','@nrwl/workspace/src/utils/output','downloadFile','PUT','errors','NxCloud:\x20Cache\x20hit\x20','tasksRunnerV2','Invalid\x20remote\x20cache\x20response:\x20','path','output','ECONNREFUSED','uploadFile','uuid','NxCloud:\x20Stored\x20','NxCloud:\x20Cache\x20miss\x20','toISOString','__esModule','complete','VERBOSE_LOGGING','NX_VERBOSE_LOGGING','NxCloud:\x20Nx\x20wasn\x27t\x20able\x20to\x20get\x20anything\x20from\x20the\x20distributed\x20cache.','https://api.nrwl.io','string','retrieve','stream','/nx-cloud/cache/store/','throw','read-write','then','NxCloud:\x20Skipping\x20storing\x20','startTask','isReadWrite','stringify','Subject','readFileSync','EPROTO','post','all','NX_CLOUD_AUTH_TOKEN','status','assign','close','executedTasks','startRecords','writeFileSync','hash','done','NxCloud:\x20-\x20All\x20runtimeCacheInputs\x20in\x20nx.json\x20return\x20the\x20same\x20values.','Invalid\x20Nx\x20Cloud\x20access\x20token.'];(function(_0x2fb0ba,_0xdc4b41){const _0x3a48e4=function(_0xa8ef59){while(--_0xa8ef59){_0x2fb0ba['push'](_0x2fb0ba['shift']());}};_0x3a48e4(++_0xdc4b41);}(a0_0xdc4b,0x12c));const a0_0x3a48=function(_0x2fb0ba,_0xdc4b41){_0x2fb0ba=_0x2fb0ba-0x0;let _0x3a48e4=a0_0xdc4b[_0x2fb0ba];return _0x3a48e4;};'use strict';var __awaiter=this&&this[a0_0x3a48('0x1c')]||function(_0x3de377,_0x3f04a0,_0x17b3dc,_0x24712e){function _0x338e88(_0x1bbfaa){return _0x1bbfaa instanceof _0x17b3dc?_0x1bbfaa:new _0x17b3dc(function(_0x5d8f11){_0x5d8f11(_0x1bbfaa);});}return new(_0x17b3dc||(_0x17b3dc=Promise))(function(_0x25b740,_0x43a766){function _0x346e2f(_0x9e3fdb){try{_0x1d489f(_0x24712e[a0_0x3a48('0x10')](_0x9e3fdb));}catch(_0x3bb320){_0x43a766(_0x3bb320);}}function _0x1fd9a3(_0x366754){try{_0x1d489f(_0x24712e[a0_0x3a48('0x4d')](_0x366754));}catch(_0x31f067){_0x43a766(_0x31f067);}}function _0x1d489f(_0x35a4ae){_0x35a4ae[a0_0x3a48('0x61')]?_0x25b740(_0x35a4ae['value']):_0x338e88(_0x35a4ae[a0_0x3a48('0x6')])[a0_0x3a48('0x4f')](_0x346e2f,_0x1fd9a3);}_0x1d489f((_0x24712e=_0x24712e['apply'](_0x3de377,_0x3f04a0||[]))['next']());});};Object['defineProperty'](exports,a0_0x3a48('0x43'),{'value':!![]});const rxjs_1=require(a0_0x3a48('0x20'));const tasks_runner_v2_1=require(a0_0x3a48('0x8'));const output_1=require(a0_0x3a48('0x34'));const fs=require('fs');const fs_1=require('fs');const path=require(a0_0x3a48('0x3b'));const uuid_1=require(a0_0x3a48('0x3f'));const axios=require('axios');const tar=require(a0_0x3a48('0x2d'));class CloudApi{constructor(_0x55d1ff,_0x38f560){this[a0_0x3a48('0x23')]=uuid_1['v4']();this[a0_0x3a48('0x5d')]={};const [_0x325ebc,_0x1cb8c0]=new Buffer(_0x38f560,a0_0x3a48('0x1a'))[a0_0x3a48('0xc')]()['split']('|');this[a0_0x3a48('0x52')]=_0x1cb8c0===a0_0x3a48('0x4e');this[a0_0x3a48('0x5')]=axios['create']({'baseURL':_0x55d1ff,'timeout':0x7530,'headers':{'authorization':_0x38f560}});}[a0_0x3a48('0x51')](_0x4aee91){return this[a0_0x3a48('0x5')]['post']('/nx-cloud/tasks/start',_0x4aee91);}['endTask'](_0x3ca2c8){return this[a0_0x3a48('0x5')][a0_0x3a48('0x57')](a0_0x3a48('0x1d'),_0x3ca2c8);}[a0_0x3a48('0x30')](_0x7410dd){return{'taskId':_0x7410dd['id']+'-'+this['uniqRunId'],'startTime':new Date()[a0_0x3a48('0x42')](),'target':_0x7410dd['target'][a0_0x3a48('0x7')],'projectName':_0x7410dd['target']['project'],'hash':_0x7410dd[a0_0x3a48('0x60')]};}[a0_0x3a48('0x13')](_0xee7a70){return{'taskId':_0xee7a70['id']+'-'+this[a0_0x3a48('0x23')],'endTime':new Date()[a0_0x3a48('0x42')]()};}[a0_0x3a48('0x14')](_0x7ef49b){return __awaiter(this,void 0x0,void 0x0,function*(){this[a0_0x3a48('0x5d')][_0x7ef49b]=!![];const _0x2b6016=yield this['axiosInstance']({'method':a0_0x3a48('0x1f'),'url':a0_0x3a48('0x4c')+_0x7ef49b});if(!_0x2b6016[a0_0x3a48('0x1')]||!_0x2b6016[a0_0x3a48('0x1')][a0_0x3a48('0x3')]||!(typeof _0x2b6016['data'][a0_0x3a48('0x3')]===a0_0x3a48('0x49'))){throw new Error(a0_0x3a48('0x3a')+JSON[a0_0x3a48('0x53')](_0x2b6016['data']));}return _0x2b6016[a0_0x3a48('0x1')][a0_0x3a48('0x3')];});}[a0_0x3a48('0xe')](_0x2a3f6b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x126e8d=yield this[a0_0x3a48('0x5')]({'method':'get','url':'/nx-cloud/cache/'+_0x2a3f6b});if(!_0x126e8d['data']||!_0x126e8d['data'][a0_0x3a48('0x3')]||!(typeof _0x126e8d[a0_0x3a48('0x1')]['url']===a0_0x3a48('0x49'))){throw new Error(a0_0x3a48('0x3a')+JSON[a0_0x3a48('0x53')](_0x126e8d[a0_0x3a48('0x1')]));}return _0x126e8d[a0_0x3a48('0x1')][a0_0x3a48('0x3')];});}}class CloudRemoteCache{constructor(_0x501b76,_0x2853b1){this[a0_0x3a48('0x37')]=_0x501b76;this['api']=_0x2853b1;}[a0_0x3a48('0x4a')](_0x22c4b4,_0x38eac3){return __awaiter(this,void 0x0,void 0x0,function*(){try{if(CloudRemoteCache[a0_0x3a48('0x45')]){console[a0_0x3a48('0x2e')](a0_0x3a48('0x0')+_0x22c4b4);}const _0x3e121d=yield this[a0_0x3a48('0x1b')][a0_0x3a48('0xe')](_0x22c4b4);const _0x56667b=this[a0_0x3a48('0x24')](_0x22c4b4,_0x38eac3);yield this['downloadFile'](_0x3e121d,_0x56667b);this[a0_0x3a48('0xf')](_0x22c4b4,_0x38eac3);if(CloudRemoteCache[a0_0x3a48('0x45')]){console['log'](a0_0x3a48('0x38')+_0x22c4b4);}this[a0_0x3a48('0x37')][a0_0x3a48('0x2')]=!![];return!![];}catch(_0x3ccce7){if(_0x3ccce7[a0_0x3a48('0x17')]&&_0x3ccce7['response'][a0_0x3a48('0x5a')]===0x194){if(CloudRemoteCache[a0_0x3a48('0x45')]){console[a0_0x3a48('0x2e')](a0_0x3a48('0x41')+_0x22c4b4);}}else{this['errors']['cacheError']=extractErrorMessage(_0x3ccce7);}return![];}});}[a0_0x3a48('0x18')](_0x4a15df,_0x5313fe){return __awaiter(this,void 0x0,void 0x0,function*(){if(this[a0_0x3a48('0x1b')][a0_0x3a48('0x52')]){try{if(CloudRemoteCache['VERBOSE_LOGGING']){console['log'](a0_0x3a48('0x19')+_0x4a15df);}const _0x24363a=yield this[a0_0x3a48('0x1b')]['storeCache'](_0x4a15df);const _0x15f9f8=yield this[a0_0x3a48('0x12')](_0x4a15df,_0x5313fe);yield this[a0_0x3a48('0x3e')](_0x24363a,_0x15f9f8);if(CloudRemoteCache[a0_0x3a48('0x45')]){console['log'](a0_0x3a48('0x40')+_0x4a15df);}return!![];}catch(_0x100f5c){this[a0_0x3a48('0x37')][a0_0x3a48('0xd')]=extractErrorMessage(_0x100f5c);return![];}}else{if(CloudRemoteCache[a0_0x3a48('0x45')]){console[a0_0x3a48('0x2e')](a0_0x3a48('0x50')+_0x4a15df+'.\x20Read\x20only\x20token\x20is\x20used.');}return!![];}});}['createFileName'](_0x52ce60,_0x4e1bab){return path[a0_0x3a48('0x1e')](_0x4e1bab,_0x52ce60+'.tar.gz');}[a0_0x3a48('0x35')](_0x42d941,_0x3ce951){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4dbce9=yield axios(_0x42d941,{'method':a0_0x3a48('0x32'),'responseType':a0_0x3a48('0x4b'),'maxContentLength':0x3e8*0x3e8*0xc8});const _0xf1ceff=_0x4dbce9[a0_0x3a48('0x1')][a0_0x3a48('0x2b')](tar['x']({'cwd':path['dirname'](_0x3ce951)}));return new Promise(_0x43cff1=>{_0xf1ceff['on'](a0_0x3a48('0x5c'),()=>{_0x43cff1();});});});}[a0_0x3a48('0xf')](_0x4d2cfb,_0xa23a1c){fs_1[a0_0x3a48('0x5f')](path[a0_0x3a48('0x1e')](_0xa23a1c,_0x4d2cfb+'.commit'),'true');}[a0_0x3a48('0x12')](_0x164cdd,_0x4146b8){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x46c13b=this['createFileName'](_0x164cdd,_0x4146b8);yield tar['c']({'gzip':!![],'file':_0x46c13b,'cwd':_0x4146b8},[_0x164cdd]);return _0x46c13b;});}[a0_0x3a48('0x3e')](_0x20b980,_0x1d5074){return __awaiter(this,void 0x0,void 0x0,function*(){yield axios(_0x20b980,{'method':a0_0x3a48('0x36'),'data':fs[a0_0x3a48('0x55')](_0x1d5074),'headers':{'Content-Type':a0_0x3a48('0x2a')},'maxContentLength':0x3e8*0x3e8*0xc8});});}}CloudRemoteCache[a0_0x3a48('0x45')]=process[a0_0x3a48('0x26')][a0_0x3a48('0x46')];const nxCloudTaskRunner=(_0x31e98e,_0x227bbb,_0xc96307)=>{if(process['env'][a0_0x3a48('0x59')]||_0x227bbb[a0_0x3a48('0x9')]){const _0x503b28=createApi(_0x227bbb);const _0x590b79=new ErrorReporter();const _0x4dd1dc=new TaskRunnerLifeCycle(_0x590b79,_0x503b28);const _0xe0da19=new CloudRemoteCache(_0x590b79,_0x503b28);const _0x4e837b=tasks_runner_v2_1[a0_0x3a48('0x39')](_0x31e98e,Object[a0_0x3a48('0x5b')](Object['assign']({},_0x227bbb),{'remoteCache':_0xe0da19,'lifeCycle':_0x4dd1dc}),_0xc96307);const _0x5304b7=new rxjs_1[(a0_0x3a48('0x54'))]();_0x4e837b['subscribe']({'next':_0x637958=>_0x5304b7[a0_0x3a48('0x10')](_0x637958),'error':_0x57efee=>_0x5304b7[a0_0x3a48('0x22')](_0x57efee),'complete':()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){yield _0x4dd1dc[a0_0x3a48('0x44')]();_0x590b79[a0_0x3a48('0x11')]();_0x5304b7[a0_0x3a48('0x44')]();})});return _0x5304b7;}else{return tasks_runner_v2_1[a0_0x3a48('0x39')](_0x31e98e,_0x227bbb,_0xc96307);}};class TaskRunnerLifeCycle{constructor(_0x471111,_0x40985f){this[a0_0x3a48('0x37')]=_0x471111;this['api']=_0x40985f;this[a0_0x3a48('0x29')]={};this[a0_0x3a48('0x5e')]={};}[a0_0x3a48('0x51')](_0x1ff19f){this[a0_0x3a48('0x5e')][_0x1ff19f['id']]=this[a0_0x3a48('0x1b')]['startTaskRecord'](_0x1ff19f);}[a0_0x3a48('0x25')](_0x3d055b,_0x132cd2){if(this[a0_0x3a48('0x1b')][a0_0x3a48('0x52')]&&this['api'][a0_0x3a48('0x5d')][_0x3d055b[a0_0x3a48('0x60')]]){this[a0_0x3a48('0x29')][_0x3d055b['id']]=this[a0_0x3a48('0x1b')]['startTask'](this[a0_0x3a48('0x5e')][_0x3d055b['id']])[a0_0x3a48('0x4f')](()=>{return this[a0_0x3a48('0x1b')]['endTask'](this['api'][a0_0x3a48('0x13')](_0x3d055b));})[a0_0x3a48('0x33')](_0x5e8184=>{this['errors']['lifeCycleError']=extractErrorMessage(_0x5e8184);});}}[a0_0x3a48('0x44')](){return Promise[a0_0x3a48('0x58')](Object['values'](this['promises']));}}class ErrorReporter{constructor(){this['cacheError']=null;this[a0_0x3a48('0x16')]=null;this[a0_0x3a48('0x2')]=![];}[a0_0x3a48('0x11')](){if(this[a0_0x3a48('0xd')]||this[a0_0x3a48('0x16')]){const _0x186e75=[];if(this[a0_0x3a48('0xd')]){_0x186e75[a0_0x3a48('0xa')]('-\x20'+this[a0_0x3a48('0xd')]);}if(this[a0_0x3a48('0x16')]&&this[a0_0x3a48('0x16')]!==this[a0_0x3a48('0xd')]){_0x186e75[a0_0x3a48('0xa')]('-\x20'+this[a0_0x3a48('0x16')]);}output_1[a0_0x3a48('0x3c')][a0_0x3a48('0x28')]({'title':a0_0x3a48('0x4'),'bodyLines':_0x186e75});}if(!this[a0_0x3a48('0x2')]&&ErrorReporter[a0_0x3a48('0x45')]){console[a0_0x3a48('0x2e')](a0_0x3a48('0x47'));console[a0_0x3a48('0x2e')](a0_0x3a48('0x15'));console['log'](a0_0x3a48('0x62'));console[a0_0x3a48('0x2e')]('NxCloud:\x20-\x20Global\x20configuration\x20files\x20(e.g.,\x20nx.json,\x20package.json,\x20workspace.json)\x20are\x20the\x20same.');console['log']('NxCloud:\x20-\x20Flags\x20passed\x20to\x20the\x20builder\x20are\x20the\x20same\x20(e.g.,\x20--max-workers,\x20--source-maps)');}}}ErrorReporter[a0_0x3a48('0x45')]=process[a0_0x3a48('0x26')][a0_0x3a48('0x46')];function extractErrorMessage(_0x593f01){if(_0x593f01[a0_0x3a48('0xb')]===a0_0x3a48('0x3d')||_0x593f01['code']===a0_0x3a48('0x2c')||_0x593f01[a0_0x3a48('0xb')]===a0_0x3a48('0x27')||_0x593f01[a0_0x3a48('0xb')]===a0_0x3a48('0x56')){return a0_0x3a48('0x2f');}else if(_0x593f01[a0_0x3a48('0x17')]&&_0x593f01['response'][a0_0x3a48('0x5a')]===0x191){return a0_0x3a48('0x63');}else{let _0x3f51bb='';if(_0x593f01['response']&&_0x593f01['response'][a0_0x3a48('0x1')]&&_0x593f01[a0_0x3a48('0x17')][a0_0x3a48('0x1')]['message']){_0x3f51bb='.\x20'+_0x593f01['response'][a0_0x3a48('0x1')][a0_0x3a48('0x21')];}else if(_0x593f01[a0_0x3a48('0x17')]&&_0x593f01[a0_0x3a48('0x17')][a0_0x3a48('0x1')]){_0x3f51bb='.\x20'+_0x593f01[a0_0x3a48('0x17')][a0_0x3a48('0x1')];}return''+_0x593f01[a0_0x3a48('0x21')]+_0x3f51bb;}}function createApi(_0x68e473){const _0x4827d1=_0x68e473['url']||a0_0x3a48('0x48');if(process[a0_0x3a48('0x26')][a0_0x3a48('0x59')]){return new CloudApi(_0x4827d1,process[a0_0x3a48('0x26')][a0_0x3a48('0x59')]);}else{return new CloudApi(_0x4827d1,_0x68e473[a0_0x3a48('0x9')]);}}exports[a0_0x3a48('0x31')]=nxCloudTaskRunner; |
{ | ||
"name": "@nrwl/nx-cloud", | ||
"version": "9.0.5", | ||
"version": "9.0.6", | ||
"description": "Nx Cloud plugin for Nx", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# Nx Cloud | ||
Enable distributed caching and analytics for your Nx Workspace.s | ||
Enable distributed caching and analytics for your Nx Workspace. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
24326
9