@ranger-testing/ranger-cli 3.0.0 → 3.0.1-alpha.55b593b-29
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/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/package.json +2 -2
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3bbba5,_0x5a9163){const _0x57dcce=_0x2795,_0x3ed740=_0x3bbba5();while(!![]){try{const _0x13aaf2=-parseInt(_0x57dcce(0x212))/0x1*(-parseInt(_0x57dcce(0x213))/0x2)+parseInt(_0x57dcce(0x1c6))/0x3+parseInt(_0x57dcce(0x20f))/0x4*(parseInt(_0x57dcce(0x1fc))/0x5)+parseInt(_0x57dcce(0x202))/0x6*(-parseInt(_0x57dcce(0x1b1))/0x7)+parseInt(_0x57dcce(0x1bf))/0x8+-parseInt(_0x57dcce(0x1e9))/0x9*(-parseInt(_0x57dcce(0x1b2))/0xa)+parseInt(_0x57dcce(0x1be))/0xb*(-parseInt(_0x57dcce(0x210))/0xc);if(_0x13aaf2===_0x5a9163)break;else _0x3ed740['push'](_0x3ed740['shift']());}catch(_0x2e7477){_0x3ed740['push'](_0x3ed740['shift']());}}}(_0x5ae9,0x436a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x307568 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x2795(_0x114df5,_0x52096b){_0x114df5=_0x114df5-0x1a5;const _0x5ae922=_0x5ae9();let _0x279577=_0x5ae922[_0x114df5];return _0x279577;}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2171f9=_0x2795;if(!process['stdout'][_0x2171f9(0x1d6)])return;console[_0x2171f9(0x1b7)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2d6fe7){const _0x367b2f=_0x2795,_0x1f7097={'DNRzY':function(_0x5a2666,_0x2740fc,_0x42df9f){return _0x5a2666(_0x2740fc,_0x42df9f);},'HnMqC':_0x367b2f(0x1f7),'xxqnv':function(_0x1eee70,_0x276a7c){return _0x1eee70(_0x276a7c);},'YIVvZ':function(_0x3f218e,_0x133b3a){return _0x3f218e<_0x133b3a;},'BtyHR':'TypeError'};try{const _0x13a374=new AbortController(),_0x515266=_0x1f7097[_0x367b2f(0x1fd)](setTimeout,()=>_0x13a374[_0x367b2f(0x21a)](),0x1388),_0x3eeecb={'method':_0x367b2f(0x1e5),'signal':_0x13a374['signal'],'redirect':_0x1f7097[_0x367b2f(0x21f)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x2d6fe7)&&(process['env'][_0x367b2f(0x1dc)]='0');const _0x2f6772=await fetch(_0x2d6fe7,_0x3eeecb);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f7097['xxqnv'](clearTimeout,_0x515266);if(_0x1f7097['YIVvZ'](_0x2f6772[_0x367b2f(0x200)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x2f6772[_0x367b2f(0x200)]};}catch(_0x326e7d){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x356a36=_0x326e7d,_0x25ddee=_0x356a36[_0x367b2f(0x1c5)]||_0x1f7097['xxqnv'](String,_0x326e7d),_0x11375c=_0x25ddee['includes']('Invalid\x20URL')||_0x356a36[_0x367b2f(0x1fb)]===_0x1f7097[_0x367b2f(0x214)]||_0x25ddee['includes'](_0x367b2f(0x1c2));return{'ok':![],'error':_0x25ddee,'isProtocolError':_0x11375c};}}async function sweepOrphanLocalProfile(_0x46992f,_0x507909,_0xbf0fa8){const _0x4cffeb=_0x2795,_0x5d964a={'IBvlw':function(_0x3140b5,_0x20e920,_0x9f485c){return _0x3140b5(_0x20e920,_0x9f485c);},'zFPtT':function(_0x1a322b,_0x2758a9){return _0x1a322b(_0x2758a9);}},_0x2f69c3=join(_0x507909,_0x4cffeb(0x1b6)),_0x504037=_0x5d964a[_0x4cffeb(0x1e2)](join,_0x2f69c3,_0x46992f);existsSync(_0x504037)&&(_0xbf0fa8&&await _0x5d964a[_0x4cffeb(0x1fe)](isPathGitTracked,_0x504037)?console[_0x4cffeb(0x1e1)](_0x4cffeb(0x203)+_0x504037+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x504037,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x504037)));if(_0x5d964a[_0x4cffeb(0x1fe)](existsSync,_0x2f69c3)){let _0x3bbda9=[];try{_0x3bbda9=await readdir(_0x2f69c3);}catch{return;}const _0x237fa8=_0x4cffeb(0x1b0)+_0x46992f+'-';for(const _0x4ee105 of _0x3bbda9){if(!_0x4ee105['startsWith'](_0x237fa8))continue;const _0x18e038=join(_0x2f69c3,_0x4ee105);await rm(_0x18e038,{'recursive':!![],'force':!![]}),console[_0x4cffeb(0x1e1)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x18e038);}}}async function sweepOrphansBestEffort(_0x24f400){const _0xd59a11=_0x2795,_0x4ec49d={'SsYyq':function(_0x17bcaa,_0xc9ce55,_0x1dca74,_0x3756a5){return _0x17bcaa(_0xc9ce55,_0x1dca74,_0x3756a5);},'hSWGd':function(_0x24f026){return _0x24f026();},'QIhZY':function(_0x22017b){return _0x22017b();},'goiQs':function(_0x228046,_0x84638c){return _0x228046(_0x84638c);}};try{await _0x4ec49d[_0xd59a11(0x1b3)](sweepOrphanLocalProfile,_0x24f400,_0x4ec49d['hSWGd'](getRangerHomeDir),![]);const _0x36e8c0=_0x4ec49d['hSWGd'](getRangerDir);_0x36e8c0!==_0x4ec49d['QIhZY'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x24f400,_0x36e8c0,!![]);}catch(_0x58a327){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x58a327 instanceof Error?_0x58a327['message']:_0x4ec49d[_0xd59a11(0x21e)](String,_0x58a327))+').');}}async function markActive(_0x415a50){const _0x9fa460=_0x2795,_0x598269={'GrLiy':function(_0x2c3c47,_0x59c95d){return _0x2c3c47(_0x59c95d);}};try{await _0x598269['GrLiy'](writeActiveProfileName,_0x415a50),console[_0x9fa460(0x1e1)]('\x20\x20Set\x20active\x20profile:\x20'+_0x415a50);}catch{console[_0x9fa460(0x1e1)](_0x9fa460(0x1d0));}}async function tryAutoRouteCloudProfile(_0x5bf623,_0x19805b,_0x35b78f,_0xa6be2d,_0x203d0e){const _0x37e69c=_0x2795,_0x234d37={'nOZJG':function(_0x195626,_0x528ffa){return _0x195626===_0x528ffa;},'rksyN':'profile.add.autoRouteSkipped','FFehE':function(_0x44e1ae,_0x25284c){return _0x44e1ae instanceof _0x25284c;},'SJXrA':function(_0x345bfe,_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a){return _0x345bfe(_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a);},'ndFlt':function(_0x512134,_0x27bea9){return _0x512134+_0x27bea9;},'ZcfVm':'\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','kWWOd':_0x37e69c(0x1bc),'imPWO':_0x37e69c(0x1b9),'FzJmb':_0x37e69c(0x1ab),'lmdhs':'no_match','bkjwY':_0x37e69c(0x1d2),'BzfoC':function(_0x6a5fd6,_0x381b37,_0x11b709,_0x19240c){return _0x6a5fd6(_0x381b37,_0x11b709,_0x19240c);},'HXOID':function(_0x1590fb,_0x59dc02){return _0x1590fb===_0x59dc02;},'WtnEg':function(_0x4d9fe5,_0x24d4fc){return _0x4d9fe5+_0x24d4fc;},'xcPgx':function(_0x43f6b3,_0x3c6835){return _0x43f6b3+_0x3c6835;},'PODcS':function(_0x32b87b,_0x140de8){return _0x32b87b(_0x140de8);}};let _0x11dc40;try{_0x11dc40=await fetchAuthConfig();}catch(_0x3e6a2a){return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x37e69c(0x1da)+(_0x234d37['FFehE'](_0x3e6a2a,Error)?_0x3e6a2a['message']:String(_0x3e6a2a))),![];}if(!_0x11dc40||!_0x11dc40[_0x37e69c(0x1d4)]||_0x234d37[_0x37e69c(0x1f5)](Object[_0x37e69c(0x1f6)](_0x11dc40['environments'])['length'],0x0)){if(_0xa6be2d)return await _0x234d37['SJXrA'](captureEnvLessProfile,_0x5bf623,_0x19805b,_0x35b78f,_0x203d0e);return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x234d37['ndFlt'](_0x234d37[_0x37e69c(0x1ad)](_0x234d37[_0x37e69c(0x1f8)]+'\x0a',_0x234d37['kWWOd']),_0x37e69c(0x1ac)+_0x5bf623+_0x37e69c(0x1c8)+_0x19805b+'\x20--skip-auth\x0a')+'\x0a'+_0x234d37[_0x37e69c(0x1fa)]+_0x234d37[_0x37e69c(0x222)]),![];}const _0x2b53ed=matchAuthEnvironment(_0x19805b,_0x11dc40);if(!_0x2b53ed)return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x234d37['lmdhs'],'profileName':_0x5bf623}),console[_0x37e69c(0x1c9)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x19805b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x11dc40[_0x37e69c(0x1d4)])['join'](',\x20')+'.'),![];const _0x13e46f=_0x11dc40[_0x37e69c(0x1d4)][_0x2b53ed],_0x349189=_0x13e46f?.['domains']??[];if(_0xa6be2d&&!_0x35b78f['yes']){const {saveToCloud:_0xe938ed}=await _0x307568['prompt']([{'type':_0x37e69c(0x20c),'name':_0x234d37['bkjwY'],'message':'Found\x20auth\x20environment\x20\x27'+_0x2b53ed+_0x37e69c(0x1aa)+_0x19805b+'\x0a\x20\x20(domains:\x20'+_0x349189['join'](',\x20')+_0x37e69c(0x201)+_0x5bf623+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xe938ed)return _0x203d0e?.[_0x37e69c(0x1ea)](_0x234d37['rksyN'],{'reason':_0x37e69c(0x218),'profileName':_0x5bf623}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0xc8c00b=_0x349189['some'](_0x450328=>{const _0x1c4916=_0x37e69c;try{return _0x234d37[_0x1c4916(0x1f5)](new URL(_0x450328)[_0x1c4916(0x1c3)],new URL(_0x19805b)[_0x1c4916(0x1c3)]);}catch{return![];}}),_0x18fa1d={};!_0xc8c00b&&(_0x18fa1d[_0x37e69c(0x1f4)]=_0x19805b);try{await _0x234d37[_0x37e69c(0x1d1)](createCloudProfile,_0x5bf623,_0x2b53ed,{'settings':_0x18fa1d}),warnCloudProfileSharedInOrg();}catch(_0x39110f){if(_0x39110f instanceof ApiError&&_0x234d37['HXOID'](_0x39110f[_0x37e69c(0x200)],0x199)){console['error'](_0x234d37[_0x37e69c(0x219)](_0x37e69c(0x1e7)+_0x5bf623+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5bf623));throw _0x39110f;}throw _0x39110f;}return console['log'](_0x234d37[_0x37e69c(0x20b)](_0x37e69c(0x20d)+_0x5bf623+_0x37e69c(0x1ef),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5bf623)),await _0x234d37['PODcS'](sweepOrphansBestEffort,_0x5bf623),_0x203d0e?.['trackPhaseEnd'](_0x37e69c(0x1d5),{'envKey':_0x2b53ed,'profileName':_0x5bf623}),!![];}function _0x5ae9(){const _0x692891=['\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Invalid\x20--setup-header\x20format:\x20\x22','11EKURot','715280Oyivmc','no_auth_config','ULmkg','fetch\x20failed','origin','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','message','743373BVIeuX','tTOmS','\x20--url\x20','error','`\x20again\x20without\x20--skip-auth.','AOSSm','yes','setupHeader','SfJlE','use_suggestion','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','BzfoC','saveToCloud','Enter\x20a\x20different\x20URL','environments','profile.add.autoRouted','isTTY','exit','isElectron','cdpEndpoint','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x0a🌐\x20Profile\x20Setup\x0a','NODE_TLS_REJECT_UNAUTHORIZED','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','slice','vvcpX','\x20\x20Did\x20you\x20mean\x20','log','IBvlw','zNpKd','HRYNF','HEAD','trim','\x0a\x20\x20A\x20profile\x20named\x20\x22','input','747ditNSG','trackPhaseEnd','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','lowIf','profile.add.autoRouteSkipped','force','\x27\x20created.\x0a','CkDbM','Use\x20','Tdaqf','cwd','baseUrl','nOZJG','keys','manual','ZcfVm','oyXJX','imPWO','name','175pIBdra','DNRzY','zFPtT','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','status',')\x0a\x20\x20Save\x20\x27','73122anEjPh','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','indexOf','setupHeaders','test','SFSbn','FGoDo','\x0a✓\x20Profile\x20\x27','UFMml','xcPgx','confirm','✓\x20Profile\x20\x27','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','44580TsyzhY','13405476kGkbsU','length','42577xNNnHv','24oaUckX','BtyHR','FcRPb','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x27\x20created\x20(CDP).','user_declined','WtnEg','abort','iHJXn','continue','CNxqH','goiQs','HnMqC','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','\x22:\x20','FzJmb','Kffbk','rxgCG','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','http://localhost:3000','skipAuth','\x27\x20matching\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','ndFlt','tyfYb','url','.tmp-','91JyguVY','37770ysAJIy','SsYyq','action','QmLni','local','warn','ghxMz','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','AyBVP'];_0x5ae9=function(){return _0x692891;};return _0x5ae9();}async function createUnconfiguredCloudProfile(_0x103cee,_0x1b8808){const _0x4dd917=_0x2795;try{await createCloudProfile(_0x103cee,undefined,{'settings':_0x1b8808}),warnCloudProfileSharedInOrg();}catch(_0x58385b){_0x58385b instanceof ApiError&&_0x58385b['status']===0x199&&console['error'](_0x4dd917(0x1e7)+_0x103cee+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4dd917(0x1dd)+_0x103cee));throw _0x58385b;}}async function captureEnvLessProfile(_0x3fe166,_0x212271,_0x3ba0e8,_0x3f1490){const _0x2ec8aa=_0x2795,_0x55000f={'KBWEM':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','SfJlE':_0x2ec8aa(0x1ed),'tyfYb':_0x2ec8aa(0x218),'FcRPb':function(_0x5aead3,_0x27735b){return _0x5aead3+_0x27735b;},'SFSbn':function(_0x22e265,_0x264596,_0x1c0e96){return _0x22e265(_0x264596,_0x1c0e96);},'hBqAl':function(_0x4c8b42,_0x50bf76){return _0x4c8b42>_0x50bf76;},'rxgCG':function(_0x226fd6,_0x55e310){return _0x226fd6(_0x55e310);},'eiXCP':'profile.add.autoRouted'};if(!_0x3ba0e8[_0x2ec8aa(0x1cc)]){const {capture:_0x1d218e}=await _0x307568['prompt']([{'type':'confirm','name':'capture','message':_0x55000f['KBWEM'],'default':!![]}]);if(!_0x1d218e)return _0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f[_0x2ec8aa(0x1ce)],{'reason':_0x55000f[_0x2ec8aa(0x1ae)],'profileName':_0x3fe166}),console[_0x2ec8aa(0x1c9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x2ec8aa(0x1ff)),![];}const _0x2ef095={};if(_0x3ba0e8['setupHeader'])for(const _0x499e6f of _0x3ba0e8[_0x2ec8aa(0x1cd)]){const _0x2a2c21=_0x499e6f[_0x2ec8aa(0x204)](':');if(_0x2a2c21===-0x1)continue;_0x2ef095[_0x499e6f[_0x2ec8aa(0x1de)](0x0,_0x2a2c21)['trim']()]=_0x499e6f[_0x2ec8aa(0x1de)](_0x2a2c21+0x1)[_0x2ec8aa(0x1e6)]();}const _0x17df1c={'baseUrl':_0x212271};Object['keys'](_0x2ef095)['length']>0x0&&(_0x17df1c[_0x2ec8aa(0x205)]=_0x2ef095);let _0x111b1b;try{_0x111b1b=await createCloudProfile(_0x3fe166,undefined,{'settings':_0x17df1c}),warnCloudProfileSharedInOrg();}catch(_0x259ec1){_0x259ec1 instanceof ApiError&&_0x259ec1['status']===0x199&&console[_0x2ec8aa(0x1c9)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x1e7)+_0x3fe166+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x2ec8aa(0x1dd)+_0x3fe166));throw _0x259ec1;}return await _0x55000f[_0x2ec8aa(0x207)](manualBrowserLogin,_0x111b1b,{'key':'','domains':[_0x212271],'setupHeaders':_0x55000f['hBqAl'](Object[_0x2ec8aa(0x1f6)](_0x2ef095)[_0x2ec8aa(0x211)],0x0)?_0x2ef095:undefined}),console[_0x2ec8aa(0x1e1)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x209)+_0x3fe166+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3fe166)),await _0x55000f[_0x2ec8aa(0x1a6)](sweepOrphansBestEffort,_0x3fe166),_0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f['eiXCP'],{'envKey':null,'profileName':_0x3fe166}),!![];}export async function addEnv(_0x39a8cd,_0x85392f={},_0x4a3cd6){const _0x1051e5=_0x2795,_0x28f6cc={'Kffbk':function(_0x1d9ea6,_0x4b1a45){return _0x1d9ea6+_0x4b1a45;},'UYGPZ':function(_0x1cdf39,_0x48d331){return _0x1cdf39+_0x48d331;},'GpBkH':function(_0x1de8ee,_0x1a5e92){return _0x1de8ee+_0x1a5e92;},'ghxMz':_0x1051e5(0x216),'CNxqH':_0x1051e5(0x1c4),'UFMml':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','lowIf':_0x1051e5(0x1ba),'FGoDo':function(_0x5a315d,_0x328834){return _0x5a315d===_0x328834;},'QmLni':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iHJXn':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vvcpX':_0x1051e5(0x1a7),'Tdaqf':function(_0x380f61,_0x3c4bc5){return _0x380f61>_0x3c4bc5;},'dGLYL':function(_0x2fb84d,_0x579075,_0x2cb946,_0x3a2168,_0x24233e){return _0x2fb84d(_0x579075,_0x2cb946,_0x3a2168,_0x24233e);},'UpXDm':'cdpEndpoint','CkDbM':function(_0x27d54a,_0x382faf){return _0x27d54a instanceof _0x382faf;},'HRYNF':function(_0x2deb4f,_0x4f3b37){return _0x2deb4f(_0x4f3b37);},'ULmkg':function(_0x786ac0,_0x5f33e4){return _0x786ac0>_0x5f33e4;},'fCrKL':function(_0xd64179,_0x2e27bd,_0x1243f0){return _0xd64179(_0x2e27bd,_0x1243f0);},'XOQHc':function(_0x5c2e40,_0x33643f){return _0x5c2e40(_0x33643f);},'AyBVP':_0x1051e5(0x1db),'xNhRa':_0x1051e5(0x1e8),'oyXJX':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zNpKd':'list','AOSSm':'What\x20would\x20you\x20like\x20to\x20do?','tTOmS':'Continue\x20anyway','gKTXc':function(_0x2afcd6,_0x1f0949){return _0x2afcd6(_0x1f0949);},'UcSZD':function(_0x3354f0,_0x391f2b){return _0x3354f0===_0x391f2b;},'MNxew':'continue'};_0x85392f['ci']&&(console[_0x1051e5(0x1c9)](_0x28f6cc['Kffbk'](_0x28f6cc['UYGPZ'](_0x28f6cc['GpBkH'](_0x28f6cc[_0x1051e5(0x1a5)](_0x28f6cc[_0x1051e5(0x1a5)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x28f6cc[_0x1051e5(0x1b8)]+'\x0a',_0x1051e5(0x1eb)),_0x28f6cc[_0x1051e5(0x21d)]),'\x0a'),_0x28f6cc[_0x1051e5(0x20a)]),_0x28f6cc[_0x1051e5(0x1ec)])),process[_0x1051e5(0x1d7)](0x1));const _0x33b768={};if(_0x85392f['setupHeader'])for(const _0x2ded9b of _0x85392f[_0x1051e5(0x1cd)]){const _0x1e12b4=_0x2ded9b['indexOf'](':');if(_0x1e12b4===-0x1)throw new Error(_0x1051e5(0x1bd)+_0x2ded9b+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x9257ef=_0x2ded9b['slice'](0x0,_0x1e12b4)['trim'](),_0x18e24d=_0x2ded9b['slice'](_0x1e12b4+0x1)['trim']();_0x33b768[_0x9257ef]=_0x18e24d;}if(_0x85392f['cdpEndpoint']!==undefined&&_0x28f6cc[_0x1051e5(0x208)](_0x85392f['cdpEndpoint'][_0x1051e5(0x1e6)](),''))throw new Error(_0x28f6cc[_0x1051e5(0x1b5)]);if(_0x85392f[_0x1051e5(0x1d9)]&&_0x85392f['url'])throw new Error(_0x28f6cc[_0x1051e5(0x21b)]);const _0x280904=Boolean(_0x85392f[_0x1051e5(0x1d9)]),_0x392b3f=isInteractive();if(!_0x392b3f&&!_0x85392f[_0x1051e5(0x1af)]&&!_0x280904&&!_0x85392f['skipAuth'])throw new Error(_0x1051e5(0x220));if(_0x280904){const _0x1d7373=_0x85392f[_0x1051e5(0x1d9)];console[_0x1051e5(0x1e1)](_0x28f6cc[_0x1051e5(0x1df)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1d7373);const _0x1719ec={'cdpEndpoint':_0x1d7373,'isElectron':!![]};_0x28f6cc[_0x1051e5(0x1f2)](Object['keys'](_0x33b768)['length'],0x0)&&(_0x1719ec[_0x1051e5(0x205)]=_0x33b768);await createUnconfiguredCloudProfile(_0x39a8cd,_0x1719ec);try{_0x28f6cc['dGLYL'](setProfileOverride,process[_0x1051e5(0x1f3)](),_0x39a8cd,_0x28f6cc['UpXDm'],_0x1d7373),_0x28f6cc['dGLYL'](setProfileOverride,process['cwd'](),_0x39a8cd,_0x1051e5(0x1d8),!![]);}catch(_0x3c92c6){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x28f6cc[_0x1051e5(0x1f0)](_0x3c92c6,Error)?_0x3c92c6['message']:String(_0x3c92c6)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x39a8cd+_0x1051e5(0x217)),await _0x28f6cc[_0x1051e5(0x1e4)](sweepOrphansBestEffort,_0x39a8cd),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);return;}if(_0x85392f[_0x1051e5(0x1a9)]){const _0x5a242c={};_0x85392f[_0x1051e5(0x1af)]&&(_0x5a242c['baseUrl']=_0x85392f['url']);_0x28f6cc[_0x1051e5(0x1c1)](Object[_0x1051e5(0x1f6)](_0x33b768)[_0x1051e5(0x211)],0x0)&&(_0x5a242c[_0x1051e5(0x205)]=_0x33b768);await _0x28f6cc['fCrKL'](createUnconfiguredCloudProfile,_0x39a8cd,_0x5a242c),console['log'](_0x28f6cc[_0x1051e5(0x1a5)]('✓\x20Profile\x20\x27'+_0x39a8cd+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x39a8cd+_0x1051e5(0x1ca))),await sweepOrphansBestEffort(_0x39a8cd),await _0x28f6cc['XOQHc'](markActive,_0x39a8cd);return;}if(_0x85392f['url']){const _0x35d1f9=_0x85392f[_0x1051e5(0x1af)],_0x1ca69e=await checkUrlReachability(_0x35d1f9);if(!_0x1ca69e['ok']&&!_0x85392f[_0x1051e5(0x1ee)])throw new Error('Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1ca69e['ok']&&_0x85392f[_0x1051e5(0x1ee)]&&console[_0x1051e5(0x1e1)]('⚠\x20Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e[_0x1051e5(0x1c9)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x28f6cc[_0x1051e5(0x1bb)]),console['log'](_0x1051e5(0x20e)),console[_0x1051e5(0x1e1)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2227ed='',_0x59405e=![];while(!![]){const _0x3ff74b=await _0x307568['prompt']([{'type':_0x28f6cc['xNhRa'],'name':_0x1051e5(0x1f4),'message':_0x59405e?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x28f6cc[_0x1051e5(0x1f9)],'default':_0x2227ed||_0x1051e5(0x1a8)}]);_0x2227ed=_0x3ff74b['baseUrl'];const _0x59b832=await checkUrlReachability(_0x2227ed);if(_0x59b832['ok'])break;const _0x380d92=/^[a-zA-Z][\w+.-]*:\/\//[_0x1051e5(0x206)](_0x2227ed),_0x1f33d7=_0x59b832['isProtocolError']&&!_0x380d92,_0x12855d=_0x1f33d7?'http://'+_0x2227ed:null;_0x59405e=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x59b832['error']);_0x12855d&&console['log'](_0x1051e5(0x1e0)+_0x12855d+'?');const {action:_0x23fc0b}=await _0x307568['prompt']([{'type':_0x28f6cc[_0x1051e5(0x1e3)],'name':_0x1051e5(0x1b4),'message':_0x28f6cc[_0x1051e5(0x1cb)],'choices':[..._0x12855d?[{'name':_0x1051e5(0x1f1)+_0x12855d,'value':_0x1051e5(0x1cf)}]:[],{'name':_0x1051e5(0x1d3),'value':'retry'},{'name':_0x28f6cc[_0x1051e5(0x1c7)],'value':_0x1051e5(0x21c)}]}]);if(_0x23fc0b===_0x1051e5(0x1cf)&&_0x12855d){_0x2227ed=_0x12855d;const _0x365be2=await _0x28f6cc['gKTXc'](checkUrlReachability,_0x2227ed);if(_0x365be2['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x365be2['error']);}else{if(_0x28f6cc['UcSZD'](_0x23fc0b,_0x28f6cc['MNxew']))break;}}_0x85392f={..._0x85392f,'url':_0x2227ed};}let _0x1cfe41=![];try{_0x1cfe41=await tryAutoRouteCloudProfile(_0x39a8cd,_0x85392f['url'],_0x85392f,_0x392b3f,_0x4a3cd6);}catch(_0x551c1a){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x39a8cd+_0x1051e5(0x221)+(_0x551c1a instanceof Error?_0x551c1a['message']:String(_0x551c1a))),process['exit'](0x1);}!_0x1cfe41&&process['exit'](0x1),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);}
|
|
1
|
+
const _0x2c48bc=_0x50c6;(function(_0x29be0a,_0x4634e1){const _0x9dc9cf=_0x50c6,_0x4eb88f=_0x29be0a();while(!![]){try{const _0x52faaa=parseInt(_0x9dc9cf(0x1b5))/0x1*(parseInt(_0x9dc9cf(0x185))/0x2)+-parseInt(_0x9dc9cf(0x1b8))/0x3+parseInt(_0x9dc9cf(0x15d))/0x4*(-parseInt(_0x9dc9cf(0x176))/0x5)+parseInt(_0x9dc9cf(0x164))/0x6*(-parseInt(_0x9dc9cf(0x156))/0x7)+parseInt(_0x9dc9cf(0x1a0))/0x8+-parseInt(_0x9dc9cf(0x1a8))/0x9+parseInt(_0x9dc9cf(0x14f))/0xa;if(_0x52faaa===_0x4634e1)break;else _0x4eb88f['push'](_0x4eb88f['shift']());}catch(_0x3c31dd){_0x4eb88f['push'](_0x4eb88f['shift']());}}}(_0x103c,0x33a23));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x50c6(_0x4e8e2f,_0x500f5a){_0x4e8e2f=_0x4e8e2f-0x148;const _0x103c6f=_0x103c();let _0x50c640=_0x103c6f[_0x4e8e2f];return _0x50c640;}import{existsSync}from'fs';import _0x3a8ca4 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x2c48bc(0x1bf);function warnCloudProfileSharedInOrg(){const _0x126352=_0x2c48bc;if(!process[_0x126352(0x1b6)][_0x126352(0x1aa)])return;console[_0x126352(0x1c2)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5d1323){const _0x40908b=_0x2c48bc,_0x17b90a={'SaxBu':function(_0xa19661,_0x5c1182,_0x139062){return _0xa19661(_0x5c1182,_0x139062);},'fjndh':'HEAD','QcNjD':'TypeError','nBQIO':'fetch\x20failed'};try{const _0x3e7030=new AbortController(),_0x2456d9=_0x17b90a['SaxBu'](setTimeout,()=>_0x3e7030[_0x40908b(0x19c)](),0x1388),_0x19104a={'method':_0x17b90a[_0x40908b(0x14a)],'signal':_0x3e7030[_0x40908b(0x160)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x40908b(0x1b4)](_0x5d1323)&&(process[_0x40908b(0x192)][_0x40908b(0x182)]='0');const _0x12aa86=await fetch(_0x5d1323,_0x19104a);delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x2456d9);if(_0x12aa86[_0x40908b(0x193)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x12aa86['status']};}catch(_0x56630e){delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x48a6cd=_0x56630e,_0x3fba42=_0x48a6cd[_0x40908b(0x195)]||String(_0x56630e),_0x3ed541=_0x3fba42[_0x40908b(0x19b)]('Invalid\x20URL')||_0x48a6cd['name']===_0x17b90a[_0x40908b(0x17d)]||_0x3fba42['includes'](_0x17b90a['nBQIO']);return{'ok':![],'error':_0x3fba42,'isProtocolError':_0x3ed541};}}function _0x103c(){const _0x28e298=['kBOrO','KlKoU','dnJlT','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','no_match','exit','prompt','3388977PAjyas','Continue\x20anyway','isTTY','nFuzv','length','lFUIt','OKpyZ','setupHeader','startsWith','What\x20would\x20you\x20like\x20to\x20do?',')\x0a\x20\x20Save\x20\x27','force','test','187102knleFY','stdout','✓\x20Cloud\x20profile\x20\x27','694692erbnbH','\x0a✓\x20Profile\x20\x27','environments','zQCDl','slice','\x27\x20matching\x20','jGCaR','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','✓\x20Profile\x20\x27','vPuvt','warn','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','some','trim','zonCP','fjndh','\x20\x20Did\x20you\x20mean\x20','lobTd','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','PYMXr','10626140CouAqn','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','OLgFt','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','⚠\x20Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','139741yOURhF','continue','user_declined','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','trackPhaseEnd','AYmjf','iRCoE','16broIok','origin','join','signal','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','VsSrn','fEVxy','78fBVTTQ','SEOZe','\x0a\x20\x20A\x20profile\x20named\x20\x22','capture','rKdnU','use_suggestion','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x0a\x20\x20(domains:\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','oVFUA','yHEYq','UTRaR','profile.add.autoRouteSkipped','url','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','local','399505rYnZQv','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','profile.add.autoRouted','Enter\x20a\x20different\x20URL','indexOf','\x20--skip-auth\x0a','QcNjD','.\x20Configured\x20envs:\x20','nSKuH','no_auth_config','isProtocolError','NODE_TLS_REJECT_UNAUTHORIZED','input','domains','2XZdtrn','skipAuth','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','Could\x20not\x20reach\x20','keys','confirm','cdpEndpoint','mzvxL','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','rouUn','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','list','env','status','cwd','message','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sUAwj','error','log','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','includes','abort','aqmBy','\x0a🌐\x20Profile\x20Setup\x0a','ycGmj','1192120tEmWkJ'];_0x103c=function(){return _0x28e298;};return _0x103c();}async function sweepOrphanLocalProfile(_0x131fd3,_0x506c6f,_0x4af4cc){const _0x2fc69c=_0x2c48bc,_0x2526e1={'OLgFt':function(_0x2c2b3f,_0xc49000){return _0x2c2b3f(_0xc49000);},'SSfNh':function(_0xdca2f9,_0x5d5ed2){return _0xdca2f9(_0x5d5ed2);},'OFXzm':function(_0x2c9993,_0x5941e7,_0x301473){return _0x2c9993(_0x5941e7,_0x301473);}},_0x2245b6=join(_0x506c6f,_0x2fc69c(0x175)),_0x41254c=join(_0x2245b6,_0x131fd3);_0x2526e1['OLgFt'](existsSync,_0x41254c)&&(_0x4af4cc&&await isPathGitTracked(_0x41254c)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x41254c+_0x2fc69c(0x1c3)):(await rm(_0x41254c,{'recursive':!![],'force':!![]}),console[_0x2fc69c(0x199)](_0x2fc69c(0x16a)+_0x41254c)));if(_0x2526e1[_0x2fc69c(0x151)](existsSync,_0x2245b6)){let _0x3981b0=[];try{_0x3981b0=await _0x2526e1['SSfNh'](readdir,_0x2245b6);}catch{return;}const _0x37811d='.tmp-'+_0x131fd3+'-';for(const _0x57beb1 of _0x3981b0){if(!_0x57beb1[_0x2fc69c(0x1b0)](_0x37811d))continue;const _0x107c80=join(_0x2245b6,_0x57beb1);await _0x2526e1['OFXzm'](rm,_0x107c80,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x107c80);}}}async function sweepOrphansBestEffort(_0x149228){const _0x2e698d=_0x2c48bc,_0x3ebeb3={'OKpyZ':function(_0x14158a,_0x44e9f3,_0x449e97,_0x3bb8ea){return _0x14158a(_0x44e9f3,_0x449e97,_0x3bb8ea);},'NZmFF':function(_0x737c87){return _0x737c87();},'VtrEN':function(_0x45fc66){return _0x45fc66();}};try{await _0x3ebeb3[_0x2e698d(0x1ae)](sweepOrphanLocalProfile,_0x149228,_0x3ebeb3['NZmFF'](getRangerHomeDir),![]);const _0x5d6da8=getRangerDir();_0x5d6da8!==_0x3ebeb3['VtrEN'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x149228,_0x5d6da8,!![]);}catch(_0x38f4a8){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x38f4a8 instanceof Error?_0x38f4a8[_0x2e698d(0x195)]:String(_0x38f4a8))+').');}}async function markActive(_0x1c5756){const _0xd30e25=_0x2c48bc,_0x42c61e={'eYBAj':function(_0x4f84b9,_0x1d2e0b){return _0x4f84b9(_0x1d2e0b);}};try{await _0x42c61e['eYBAj'](writeActiveProfileName,_0x1c5756),console[_0xd30e25(0x199)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1c5756);}catch{console[_0xd30e25(0x199)](_0xd30e25(0x159));}}async function tryAutoRouteCloudProfile(_0x1e570e,_0x25ca73,_0x479955,_0x230d10,_0x558394){const _0x226970=_0x2c48bc,_0x1523d3={'XkzMG':function(_0x19c235,_0x2295bf){return _0x19c235===_0x2295bf;},'sSBBx':function(_0x5f4e07){return _0x5f4e07();},'vPuvt':function(_0x1716ce,_0xc7783d){return _0x1716ce instanceof _0xc7783d;},'PYMXr':'profile.add.autoRouteSkipped','sUAwj':function(_0x582537,_0x52bf35){return _0x582537+_0x52bf35;},'xyABB':function(_0x18b29c,_0x461638){return _0x18b29c+_0x461638;},'WNpFA':function(_0x3fb860,_0x14732b){return _0x3fb860+_0x14732b;},'kBOrO':_0x226970(0x14d),'mGQaF':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','RHXHS':_0x226970(0x1a5),'eElTp':_0x226970(0x18a),'nSKuH':'saveToCloud','PIBZU':function(_0x297ace,_0x719245){return _0x297ace+_0x719245;},'KvmAW':function(_0x5144e0,_0x4c087b){return _0x5144e0+_0x4c087b;},'sGRKt':function(_0x79c28b,_0xc9d41e){return _0x79c28b(_0xc9d41e);}};let _0x256a1a;try{_0x256a1a=await _0x1523d3['sSBBx'](fetchAuthConfig);}catch(_0x4f0afb){return _0x558394?.['trackPhaseEnd'](_0x226970(0x171),{'reason':'no_auth_config','profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x150)+(_0x1523d3['vPuvt'](_0x4f0afb,Error)?_0x4f0afb['message']:String(_0x4f0afb))),![];}if(!_0x256a1a||!_0x256a1a['environments']||Object[_0x226970(0x189)](_0x256a1a[_0x226970(0x1ba)])['length']===0x0){if(_0x230d10)return await captureEnvLessProfile(_0x1e570e,_0x25ca73,_0x479955,_0x558394);return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x180),'profileName':_0x1e570e}),console['error'](_0x1523d3[_0x226970(0x197)](_0x1523d3['xyABB'](_0x1523d3['WNpFA'](_0x1523d3['sUAwj'](_0x1523d3[_0x226970(0x1a1)]+'\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1e570e+'\x20--url\x20'+_0x25ca73+_0x226970(0x17c))+'\x0a',_0x1523d3['mGQaF']),_0x226970(0x16d))),![];}const _0x59eca3=matchAuthEnvironment(_0x25ca73,_0x256a1a);if(!_0x59eca3)return _0x558394?.[_0x226970(0x15a)](_0x1523d3[_0x226970(0x14e)],{'reason':_0x1523d3['RHXHS'],'profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x1a4)+_0x25ca73+_0x226970(0x17e)+Object['keys'](_0x256a1a[_0x226970(0x1ba)])['join'](',\x20')+'.'),![];const _0x3ab8ef=_0x256a1a[_0x226970(0x1ba)][_0x59eca3],_0x1bc60b=_0x3ab8ef?.[_0x226970(0x184)]??[];if(_0x230d10&&!_0x479955['yes']){const {saveToCloud:_0x2c3d82}=await _0x3a8ca4['prompt']([{'type':_0x1523d3['eElTp'],'name':_0x1523d3[_0x226970(0x17f)],'message':'Found\x20auth\x20environment\x20\x27'+_0x59eca3+_0x226970(0x1bd)+_0x25ca73+_0x226970(0x16c)+_0x1bc60b[_0x226970(0x15f)](',\x20')+_0x226970(0x1b2)+_0x1e570e+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2c3d82)return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x158),'profileName':_0x1e570e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x168796=_0x1bc60b[_0x226970(0x1c5)](_0x5cc318=>{const _0x536970=_0x226970;try{return _0x1523d3['XkzMG'](new URL(_0x5cc318)[_0x536970(0x15e)],new URL(_0x25ca73)[_0x536970(0x15e)]);}catch{return![];}}),_0x21408d={};!_0x168796&&(_0x21408d['baseUrl']=_0x25ca73);try{await createCloudProfile(_0x1e570e,_0x59eca3,{'settings':_0x21408d}),_0x1523d3['sSBBx'](warnCloudProfileSharedInOrg);}catch(_0x4f7b54){if(_0x1523d3[_0x226970(0x1c1)](_0x4f7b54,ApiError)&&_0x4f7b54[_0x226970(0x193)]===0x199){console[_0x226970(0x198)](_0x1523d3['PIBZU'](_0x226970(0x166)+_0x1e570e+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1e570e));throw _0x4f7b54;}throw _0x4f7b54;}return console['log'](_0x1523d3['KvmAW']('✓\x20Profile\x20\x27'+_0x1e570e+'\x27\x20created.\x0a',_0x226970(0x173)+_0x1e570e)),await _0x1523d3['sGRKt'](sweepOrphansBestEffort,_0x1e570e),_0x558394?.['trackPhaseEnd'](_0x226970(0x179),{'envKey':_0x59eca3,'profileName':_0x1e570e}),!![];}async function createUnconfiguredCloudProfile(_0x5a7f5d,_0x4aa1b6){const _0xce5043=_0x2c48bc,_0x34c027={'AYmjf':function(_0x13c307,_0x43d90b,_0x5b4d8a,_0x293024){return _0x13c307(_0x43d90b,_0x5b4d8a,_0x293024);},'AUcKy':function(_0xab6ce4,_0x4b9489){return _0xab6ce4 instanceof _0x4b9489;}};try{await _0x34c027[_0xce5043(0x15b)](createCloudProfile,_0x5a7f5d,undefined,{'settings':_0x4aa1b6}),warnCloudProfileSharedInOrg();}catch(_0xc0c1d3){_0x34c027['AUcKy'](_0xc0c1d3,ApiError)&&_0xc0c1d3[_0xce5043(0x193)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5a7f5d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5a7f5d));throw _0xc0c1d3;}}async function captureEnvLessProfile(_0x3cc89f,_0x43d9e2,_0xd7b11e,_0x16715c){const _0x17032e=_0x2c48bc,_0x448c28={'LtDqu':'confirm','yUeDH':'profile.add.autoRouteSkipped','lmhXo':'user_declined','zonCP':function(_0x51d5b7,_0x2575c1){return _0x51d5b7===_0x2575c1;},'KlKoU':function(_0x175f8c,_0x5d1604){return _0x175f8c+_0x5d1604;},'lobTd':function(_0x317b4c,_0x94926c){return _0x317b4c>_0x94926c;},'NpjHX':function(_0x13acfb,_0x403763){return _0x13acfb instanceof _0x403763;},'ycGmj':function(_0x19bc32,_0x36c364){return _0x19bc32+_0x36c364;},'iRCoE':function(_0xc059c9,_0x5e5748,_0x220e06){return _0xc059c9(_0x5e5748,_0x220e06);},'oVFUA':function(_0x2b9306,_0x36e7e6){return _0x2b9306+_0x36e7e6;}};if(!_0xd7b11e['yes']){const {capture:_0x5126db}=await _0x3a8ca4[_0x17032e(0x1a7)]([{'type':_0x448c28['LtDqu'],'name':_0x17032e(0x167),'message':_0x17032e(0x196),'default':!![]}]);if(!_0x5126db)return _0x16715c?.[_0x17032e(0x15a)](_0x448c28['yUeDH'],{'reason':_0x448c28['lmhXo'],'profileName':_0x3cc89f}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x8d5419={};if(_0xd7b11e['setupHeader'])for(const _0x2cfe4d of _0xd7b11e[_0x17032e(0x1af)]){const _0x59bfd7=_0x2cfe4d['indexOf'](':');if(_0x448c28[_0x17032e(0x149)](_0x59bfd7,-0x1))continue;_0x8d5419[_0x2cfe4d['slice'](0x0,_0x59bfd7)['trim']()]=_0x2cfe4d[_0x17032e(0x1bc)](_0x448c28[_0x17032e(0x1a2)](_0x59bfd7,0x1))[_0x17032e(0x148)]();}const _0x435f80={'baseUrl':_0x43d9e2};_0x448c28['lobTd'](Object[_0x17032e(0x189)](_0x8d5419)[_0x17032e(0x1ac)],0x0)&&(_0x435f80['setupHeaders']=_0x8d5419);let _0x4c2e7a;try{_0x4c2e7a=await createCloudProfile(_0x3cc89f,undefined,{'settings':_0x435f80}),warnCloudProfileSharedInOrg();}catch(_0x334c75){_0x448c28['NpjHX'](_0x334c75,ApiError)&&_0x448c28[_0x17032e(0x149)](_0x334c75[_0x17032e(0x193)],0x199)&&console[_0x17032e(0x198)](_0x448c28[_0x17032e(0x19f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3cc89f+_0x17032e(0x161),_0x17032e(0x1c4)+_0x3cc89f));throw _0x334c75;}return await _0x448c28[_0x17032e(0x15c)](manualBrowserLogin,_0x4c2e7a,{'key':'','domains':[_0x43d9e2],'setupHeaders':_0x448c28[_0x17032e(0x14c)](Object['keys'](_0x8d5419)[_0x17032e(0x1ac)],0x0)?_0x8d5419:undefined}),console['log'](_0x448c28[_0x17032e(0x16e)](_0x17032e(0x1b9)+_0x3cc89f+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3cc89f)),await sweepOrphansBestEffort(_0x3cc89f),_0x16715c?.['trackPhaseEnd'](_0x17032e(0x179),{'envKey':null,'profileName':_0x3cc89f}),!![];}export async function addEnv(_0x3e91dc,_0x53f2a0={},_0x24a5f6){const _0x18665b=_0x2c48bc,_0x1441aa={'dnJlT':function(_0x5160f6,_0x41476c){return _0x5160f6+_0x41476c;},'aqmBy':function(_0x36e6c1,_0x3be76d){return _0x36e6c1+_0x3be76d;},'rKdnU':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','lFUIt':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','mzvxL':_0x18665b(0x178),'jGCaR':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ordUk':function(_0xb2ffe5,_0x4e44cf){return _0xb2ffe5===_0x4e44cf;},'VsSrn':function(_0x382e95,_0x95db8){return _0x382e95+_0x95db8;},'gUpMd':_0x18665b(0x18d),'rouUn':function(_0x10c489,_0x2aefc3){return _0x10c489(_0x2aefc3);},'hdIkx':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','Zrrvg':function(_0x84abff,_0x1cdeb0){return _0x84abff>_0x1cdeb0;},'Oaeor':_0x18665b(0x19e),'yHEYq':_0x18665b(0x177),'fEVxy':_0x18665b(0x183),'SEOZe':'baseUrl','zEaFL':_0x18665b(0x154),'nFuzv':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zQCDl':function(_0x39a5e5,_0x5c9e03){return _0x39a5e5||_0x5c9e03;},'UTRaR':'http://localhost:3000','DmwDJ':_0x18665b(0x1a9),'eUmsN':function(_0x2a241c,_0x4de17b){return _0x2a241c(_0x4de17b);},'eKDjv':_0x18665b(0x157),'wSPMK':function(_0x489d49,_0x4d8a89){return _0x489d49(_0x4d8a89);}};_0x53f2a0['ci']&&(console['error'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa[_0x18665b(0x19d)](_0x1441aa[_0x18665b(0x1a3)](_0x1441aa[_0x18665b(0x168)],_0x1441aa[_0x18665b(0x1ad)]),'\x0a'),_0x1441aa[_0x18665b(0x18c)])+_0x1441aa[_0x18665b(0x1be)],'\x0a'),_0x18665b(0x190))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x248737={};if(_0x53f2a0['setupHeader'])for(const _0x684dc0 of _0x53f2a0[_0x18665b(0x1af)]){const _0x158f94=_0x684dc0[_0x18665b(0x17b)](':');if(_0x1441aa['ordUk'](_0x158f94,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x684dc0+_0x18665b(0x18e));const _0x5ec60f=_0x684dc0[_0x18665b(0x1bc)](0x0,_0x158f94)[_0x18665b(0x148)](),_0x4827ca=_0x684dc0[_0x18665b(0x1bc)](_0x1441aa[_0x18665b(0x162)](_0x158f94,0x1))['trim']();_0x248737[_0x5ec60f]=_0x4827ca;}if(_0x53f2a0['cdpEndpoint']!==undefined&&_0x53f2a0[_0x18665b(0x18b)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x53f2a0[_0x18665b(0x18b)]&&_0x53f2a0[_0x18665b(0x172)])throw new Error(_0x1441aa['gUpMd']);const _0x48a449=_0x1441aa['rouUn'](Boolean,_0x53f2a0['cdpEndpoint']),_0x166cb4=isInteractive();if(!_0x166cb4&&!_0x53f2a0[_0x18665b(0x172)]&&!_0x48a449&&!_0x53f2a0[_0x18665b(0x186)])throw new Error(_0x18665b(0x187));if(_0x48a449){const _0x1350fc=_0x53f2a0[_0x18665b(0x18b)];console[_0x18665b(0x199)](_0x1441aa['hdIkx']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1350fc);const _0x3cb31a={'cdpEndpoint':_0x1350fc,'isElectron':!![]};Object[_0x18665b(0x189)](_0x248737)['length']>0x0&&(_0x3cb31a['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x3cb31a);try{setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,_0x18665b(0x18b),_0x1350fc),setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,'isElectron',!![]);}catch(_0x2efef2){console[_0x18665b(0x198)](_0x18665b(0x19a)+(_0x2efef2 instanceof Error?_0x2efef2['message']:String(_0x2efef2)));}console[_0x18665b(0x199)](_0x18665b(0x1b7)+_0x3e91dc+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0[_0x18665b(0x186)]){const _0x1937dd={};_0x53f2a0[_0x18665b(0x172)]&&(_0x1937dd[_0x18665b(0x174)]=_0x53f2a0[_0x18665b(0x172)]);_0x1441aa['Zrrvg'](Object['keys'](_0x248737)[_0x18665b(0x1ac)],0x0)&&(_0x1937dd['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x1937dd),console[_0x18665b(0x199)](_0x1441aa['VsSrn'](_0x18665b(0x1c0)+_0x3e91dc+'\x27\x20created\x20(no\x20session).\x0a',_0x18665b(0x16b)+_0x3e91dc+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0['url']){const _0x2346f6=_0x53f2a0[_0x18665b(0x172)],_0x30a93c=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2346f6);if(!_0x30a93c['ok']&&!_0x53f2a0[_0x18665b(0x1b3)])throw new Error(_0x18665b(0x188)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x30a93c['ok']&&_0x53f2a0['force']&&console['log'](_0x18665b(0x153)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x18665b(0x199)](_0x1441aa['Oaeor']),console['log'](_0x1441aa[_0x18665b(0x16f)]),console[_0x18665b(0x199)](_0x18665b(0x152));let _0x2f9767='',_0x57ae39=![];while(!![]){const _0x577f46=await _0x3a8ca4[_0x18665b(0x1a7)]([{'type':_0x1441aa[_0x18665b(0x163)],'name':_0x1441aa[_0x18665b(0x165)],'message':_0x57ae39?_0x1441aa['zEaFL']:_0x1441aa[_0x18665b(0x1ab)],'default':_0x1441aa[_0x18665b(0x1bb)](_0x2f9767,_0x1441aa[_0x18665b(0x170)])}]);_0x2f9767=_0x577f46[_0x18665b(0x174)];const _0xb09ac6=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2f9767);if(_0xb09ac6['ok'])break;const _0xb098ea=/^[a-zA-Z][\w+.-]*:\/\//[_0x18665b(0x1b4)](_0x2f9767),_0x3d719c=_0xb09ac6[_0x18665b(0x181)]&&!_0xb098ea,_0x163435=_0x3d719c?'http://'+_0x2f9767:null;_0x57ae39=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0xb09ac6[_0x18665b(0x198)]);_0x163435&&console['log'](_0x18665b(0x14b)+_0x163435+'?');const {action:_0x26bfad}=await _0x3a8ca4['prompt']([{'type':_0x18665b(0x191),'name':'action','message':_0x18665b(0x1b1),'choices':[..._0x163435?[{'name':'Use\x20'+_0x163435,'value':_0x18665b(0x169)}]:[],{'name':_0x18665b(0x17a),'value':'retry'},{'name':_0x1441aa['DmwDJ'],'value':'continue'}]}]);if(_0x26bfad===_0x18665b(0x169)&&_0x163435){_0x2f9767=_0x163435;const _0x5eafe4=await _0x1441aa['eUmsN'](checkUrlReachability,_0x2f9767);if(_0x5eafe4['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0x5eafe4[_0x18665b(0x198)]);}else{if(_0x26bfad===_0x1441aa['eKDjv'])break;}}_0x53f2a0={..._0x53f2a0,'url':_0x2f9767};}let _0x49091a=![];try{_0x49091a=await tryAutoRouteCloudProfile(_0x3e91dc,_0x53f2a0[_0x18665b(0x172)],_0x53f2a0,_0x166cb4,_0x24a5f6);}catch(_0x25894e){console[_0x18665b(0x198)](_0x18665b(0x155)+_0x3e91dc+'\x22:\x20'+(_0x25894e instanceof Error?_0x25894e['message']:String(_0x25894e))),process[_0x18665b(0x1a6)](0x1);}!_0x49091a&&process['exit'](0x1),await _0x1441aa['wSPMK'](markActive,_0x3e91dc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x820639,_0x58f3c2){var _0x3d6c6b=_0x8287,_0x19cf62=_0x820639();while(!![]){try{var _0x58b4d4=-parseInt(_0x3d6c6b(0x13c))/0x1+parseInt(_0x3d6c6b(0x130))/0x2*(parseInt(_0x3d6c6b(0x134))/0x3)+parseInt(_0x3d6c6b(0x131))/0x4+-parseInt(_0x3d6c6b(0x132))/0x5*(-parseInt(_0x3d6c6b(0x13b))/0x6)+-parseInt(_0x3d6c6b(0x137))/0x7*(parseInt(_0x3d6c6b(0x133))/0x8)+parseInt(_0x3d6c6b(0x138))/0x9+-parseInt(_0x3d6c6b(0x136))/0xa;if(_0x58b4d4===_0x58f3c2)break;else _0x19cf62['push'](_0x19cf62['shift']());}catch(_0xa3b6d4){_0x19cf62['push'](_0x19cf62['shift']());}}}(_0x4810,0xeaf8d));function _0x8287(_0x1e9164,_0x5f4554){_0x1e9164=_0x1e9164-0x130;var _0x48100a=_0x4810();var _0x8287d=_0x48100a[_0x1e9164];return _0x8287d;}export async function authEncrypt(_0x11e659){var _0x3f1253=_0x8287,_0x36cece={'jnsKg':function(_0x301257,_0x3d253c){return _0x301257+_0x3d253c;},'qWtsc':function(_0x4e79e2,_0x5d488d){return _0x4e79e2+_0x5d488d;},'MUHQq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'};console['error'](_0x36cece[_0x3f1253(0x135)](_0x36cece['qWtsc'](_0x36cece['qWtsc'](_0x36cece['jnsKg'](_0x3f1253(0x139)+_0x36cece['MUHQq'],'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x3f1253(0x13a)](0x1);}function _0x4810(){var _0x72eec5=['6193359qZhaYv','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','exit','5290440PzHdeC','834996LeBzMs','2pMVpIp','3086032nnWoqG','5QRfWIa','16pQyQvq','2942619FZRQPt','jnsKg','3117770uIRBvh','4245689ieQOQP'];_0x4810=function(){return _0x72eec5;};return _0x4810();}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3d4d1b=_0x3025;(function(_0x4647aa,_0x35e91f){const _0x2bb8ee=_0x3025,_0xd100be=_0x4647aa();while(!![]){try{const _0x577723=-parseInt(_0x2bb8ee(0x8f))/0x1+-parseInt(_0x2bb8ee(0x90))/0x2+-parseInt(_0x2bb8ee(0x86))/0x3*(-parseInt(_0x2bb8ee(0x9b))/0x4)+-parseInt(_0x2bb8ee(0x72))/0x5+-parseInt(_0x2bb8ee(0x83))/0x6*(parseInt(_0x2bb8ee(0x93))/0x7)+parseInt(_0x2bb8ee(0x87))/0x8+-parseInt(_0x2bb8ee(0x8e))/0x9*(-parseInt(_0x2bb8ee(0xa1))/0xa);if(_0x577723===_0x35e91f)break;else _0xd100be['push'](_0xd100be['shift']());}catch(_0x12673f){_0xd100be['push'](_0xd100be['shift']());}}}(_0x276a,0x464bd));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x3d4d1b(0x91),_0x3d4d1b(0x8a),_0x3d4d1b(0x88),_0x3d4d1b(0x85)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x9a96a4){const _0x37294a=_0x3d4d1b,_0x3b939e=_0x9a96a4['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4220c5=_0x3b939e[_0x37294a(0xa3)](/^\s*\/\/.*$/gm,''),_0x47fcd6=_0x4220c5['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x47fcd6);}async function removeOpencodePluginConfig(_0x24a807){const _0x5e9502=_0x3d4d1b,_0x3a8cf6={'RVAad':function(_0x429322,_0x4462a0,_0xaee1a2){return _0x429322(_0x4462a0,_0xaee1a2);},'Bvpfj':function(_0x5889fa,_0x2ce996){return _0x5889fa===_0x2ce996;},'cnkbH':function(_0x5e7ed1,_0x1e61ac){return _0x5e7ed1===_0x1e61ac;},'vijfk':function(_0x33ae50,_0x224128,_0x572ddd){return _0x33ae50(_0x224128,_0x572ddd);},'jaOHs':function(_0x5567f9,_0x315d7a){return _0x5567f9+_0x315d7a;}};if(!existsSync(_0x24a807))return![];let _0x5f96e5;try{const _0x4ab55e=await _0x3a8cf6['RVAad'](readFile,_0x24a807,_0x5e9502(0x9a));_0x5f96e5=parseJsonc(_0x4ab55e);}catch{return![];}const _0x339d59=Array['isArray'](_0x5f96e5[_0x5e9502(0xa6)])?_0x5f96e5['plugin']:[];if(_0x3a8cf6['Bvpfj'](_0x339d59[_0x5e9502(0x73)],0x0))return![];const _0xfc97eb=_0x339d59['filter'](_0x5b9acb=>{const _0x3518ff=_0x5e9502;if(typeof _0x5b9acb!==_0x3518ff(0xa5))return!![];return _0x5b9acb!==opencodePluginName;});if(_0x3a8cf6[_0x5e9502(0x89)](_0xfc97eb['length'],_0x339d59[_0x5e9502(0x73)]))return![];return _0x3a8cf6[_0x5e9502(0x7a)](_0xfc97eb[_0x5e9502(0x73)],0x0)?delete _0x5f96e5['plugin']:_0x5f96e5[_0x5e9502(0xa6)]=_0xfc97eb,await _0x3a8cf6[_0x5e9502(0x7f)](writeFile,_0x24a807,_0x3a8cf6['jaOHs'](JSON['stringify'](_0x5f96e5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x2f8550){const _0x548e0f=_0x3d4d1b,_0x199586={'hRavu':_0x548e0f(0x8c),'IVPDR':_0x548e0f(0x7c),'aJBML':function(_0xb54b70){return _0xb54b70();},'EIrkM':function(_0x1208e6,_0x40491f){return _0x1208e6===_0x40491f;},'FeoIU':_0x548e0f(0x98)};return new Promise(_0x1008d9=>{const _0x109da0=_0x548e0f,_0x3cf18b=['plugin',_0x109da0(0x7b),'ranger@trailhead'];_0x2f8550&&_0x3cf18b['push'](_0x199586['hRavu'],_0x2f8550);const _0x4ba81b=spawn(_0x109da0(0xa4),_0x3cf18b,{'stdio':[_0x109da0(0x7c),_0x199586['IVPDR'],_0x199586[_0x109da0(0x74)]],'cwd':_0x2f8550?_0x199586['aJBML'](getProjectRoot):undefined,'shell':_0x199586[_0x109da0(0x99)](process['platform'],_0x199586[_0x109da0(0x96)])});_0x4ba81b['on']('close',_0x3a92f6=>{_0x1008d9(_0x3a92f6===0x0);}),_0x4ba81b['on']('error',()=>{_0x1008d9(![]);});});}function _0x276a(){const _0x17ba29=['6JZDKCt','jcReo','e2e-test-recommender','49089OUgXjs','1438384xXzdkM','bug-bash','Bvpfj','feature-tracker','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','--scope','flIyY','36027oKiPwq','387158pclpQY','584388BPoFmM','ranger','✓\x20Removed\x20user\x20skill:\x20','3717091ELxgnX','HUCJs','blJPM','FeoIU','remove','win32','EIrkM','utf-8','56gvdISS','BSMyO','KCUrE','oeBSK','user','MxZfF','3470qInEXF','Nothing\x20to\x20clean\x20up.\x0a','replace','claude','string','plugin','yeaPu','opencode.json','1498115NbCkBO','length','IVPDR','project','✓\x20Removed\x20stored\x20credentials','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','BfDPp','cnkbH','uninstall','ignore','platform','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','vijfk','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','hAkxu','log'];_0x276a=function(){return _0x17ba29;};return _0x276a();}function _0x3025(_0x185c2b,_0x5d794a){_0x185c2b=_0x185c2b-0x71;const _0x276a91=_0x276a();let _0x30250a=_0x276a91[_0x185c2b];return _0x30250a;}async function removeMarketplace(){const _0x18461b=_0x3d4d1b,_0xf72ec4={'oeBSK':function(_0xc36d16,_0x2ddd2a){return _0xc36d16(_0x2ddd2a);},'ZhUAB':function(_0x4e966c,_0x710c43,_0x3a3571,_0x28e4b7){return _0x4e966c(_0x710c43,_0x3a3571,_0x28e4b7);},'BnEMy':'marketplace','fmpao':_0x18461b(0x97),'KCUrE':'trailhead','Eyfuq':'ignore','BfDPp':_0x18461b(0x98)};return new Promise(_0xd878c4=>{const _0x35f514=_0x18461b,_0x485599=_0xf72ec4['ZhUAB'](spawn,'claude',[_0x35f514(0xa6),_0xf72ec4['BnEMy'],_0xf72ec4['fmpao'],_0xf72ec4[_0x35f514(0x9d)]],{'stdio':[_0x35f514(0x7c),_0xf72ec4['Eyfuq'],_0x35f514(0x7c)],'shell':process[_0x35f514(0x7d)]===_0xf72ec4[_0x35f514(0x79)]});_0x485599['on'](_0x35f514(0x77),_0x4fb4d3=>{const _0x533603=_0x35f514;_0xf72ec4[_0x533603(0x9e)](_0xd878c4,_0x4fb4d3===0x0);}),_0x485599['on']('error',()=>{_0xd878c4(![]);});});}export async function clean(){const _0xbd5a60=_0x3d4d1b,_0x4979a7={'blJPM':_0xbd5a60(0x8b),'dSZvr':_0xbd5a60(0x76),'BSMyO':function(_0xc15088,_0x5c08f4){return _0xc15088(_0x5c08f4);},'jcReo':function(_0x35c71){return _0x35c71();},'pBHkg':function(_0x30b543,_0x488cfd,_0x3411f0){return _0x30b543(_0x488cfd,_0x3411f0);},'yeaPu':function(_0x137b5a,_0x125a7c,_0x34352c){return _0x137b5a(_0x125a7c,_0x34352c);},'HUCJs':function(_0x4ed363,_0x28b19e){return _0x4ed363(_0x28b19e);},'flIyY':'project','TKBca':function(_0xcae822,_0x297832,_0x35468b){return _0xcae822(_0x297832,_0x35468b);},'olwFq':function(_0x1b5d8d,_0xa28033,_0x194fa7){return _0x1b5d8d(_0xa28033,_0x194fa7);},'vvSBd':_0xbd5a60(0x80),'hAkxu':'user','MxZfF':function(_0x27ddba){return _0x27ddba();},'UBUKh':function(_0x418f5b,_0xab23c8){return _0x418f5b(_0xab23c8);},'GkUNa':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0xbd5a60(0x82)](_0x4979a7[_0xbd5a60(0x95)]);let _0x4787d1=![];try{await deleteAllCredentials(),console['log'](_0x4979a7['dSZvr']),_0x4787d1=!![];}catch{}const _0x4ee4d6=getCacheFile();existsSync(_0x4ee4d6)&&(await _0x4979a7[_0xbd5a60(0x9c)](rm,_0x4ee4d6),_0x4787d1=!![]);const _0x1452a4=getRangerDir();existsSync(_0x1452a4)&&(await rm(_0x1452a4,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20.ranger/\x20directory'),_0x4787d1=!![]);const _0x4ea148=_0x4979a7[_0xbd5a60(0x84)](getProjectSkillsDir);for(const _0x36036f of skillsToRemove){const _0x169a48=join(_0x4ea148,_0x36036f);existsSync(_0x169a48)&&(await rm(_0x169a48,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x36036f),_0x4787d1=!![]);}const _0x44d44a=_0x4979a7['jcReo'](getUserSkillsDir);for(const _0x30930f of skillsToRemove){const _0x21faf0=_0x4979a7['pBHkg'](join,_0x44d44a,_0x30930f);existsSync(_0x21faf0)&&(await _0x4979a7['yeaPu'](rm,_0x21faf0,{'recursive':!![]}),console['log'](_0xbd5a60(0x92)+_0x30930f),_0x4787d1=!![]);}const _0x3203f6=_0x4979a7['HUCJs'](getOpencodeSkillsDir,_0x4979a7[_0xbd5a60(0x8d)]);for(const _0x5b9eaf of skillsToRemove){const _0x3d0745=_0x4979a7['TKBca'](join,_0x3203f6,_0x5b9eaf);_0x4979a7[_0xbd5a60(0x94)](existsSync,_0x3d0745)&&(await rm(_0x3d0745,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5b9eaf),_0x4787d1=!![]);}const _0x327cac=getOpencodeSkillsDir(_0xbd5a60(0x9f));for(const _0x3b30e1 of skillsToRemove){const _0x4eee33=_0x4979a7[_0xbd5a60(0xa7)](join,_0x327cac,_0x3b30e1);_0x4979a7['BSMyO'](existsSync,_0x4eee33)&&(await rm(_0x4eee33,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x3b30e1),_0x4787d1=!![]);}const _0x258b71=_0x4979a7['olwFq'](join,getOpencodeConfigDir(_0xbd5a60(0x75)),'opencode.json');await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0x258b71)&&(console['log'](_0x4979a7['vvSBd']),_0x4787d1=!![]);const _0xcbd5b1=join(getOpencodeConfigDir(_0x4979a7[_0xbd5a60(0x81)]),_0xbd5a60(0x71));await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0xcbd5b1)&&(console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x4787d1=!![]);const _0x5c8292=await _0x4979a7[_0xbd5a60(0xa0)](uninstallClaudePlugin);_0x5c8292&&(console[_0xbd5a60(0x82)](_0xbd5a60(0x7e)),_0x4787d1=!![]);const _0x3d7ce9=await _0x4979a7['UBUKh'](uninstallClaudePlugin,'project');_0x3d7ce9&&(console['log'](_0xbd5a60(0x78)),_0x4787d1=!![]);const _0x207bd3=await removeMarketplace();_0x207bd3&&(console['log'](_0x4979a7['GkUNa']),_0x4787d1=!![]),_0x4787d1?console['log']('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0xbd5a60(0x82)](_0xbd5a60(0xa2));}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2ec00a=_0x45c0;(function(_0x19ddc8,_0x43ae07){const _0xb58b02=_0x45c0,_0x4def5b=_0x19ddc8();while(!![]){try{const _0x316599=parseInt(_0xb58b02(0x191))/0x1*(parseInt(_0xb58b02(0x1a8))/0x2)+parseInt(_0xb58b02(0x186))/0x3*(-parseInt(_0xb58b02(0x19b))/0x4)+-parseInt(_0xb58b02(0x196))/0x5*(parseInt(_0xb58b02(0x1a5))/0x6)+parseInt(_0xb58b02(0x189))/0x7*(-parseInt(_0xb58b02(0x1a0))/0x8)+-parseInt(_0xb58b02(0x1a9))/0x9*(-parseInt(_0xb58b02(0x195))/0xa)+parseInt(_0xb58b02(0x1b2))/0xb+-parseInt(_0xb58b02(0x18c))/0xc*(parseInt(_0xb58b02(0x187))/0xd);if(_0x316599===_0x43ae07)break;else _0x4def5b['push'](_0x4def5b['shift']());}catch(_0x3b9fd5){_0x4def5b['push'](_0x4def5b['shift']());}}}(_0x1543,0x85028));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x2ec00a(0x1a4)];function parseLocalValue(_0x38ed85,_0x4e10c5){const _0x5561c0=_0x2ec00a;if(BOOLEAN_KEYS[_0x5561c0(0x198)](_0x38ed85)){if(_0x4e10c5===_0x5561c0(0x1af))return!![];if(_0x4e10c5===_0x5561c0(0x18d))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x38ed85+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4e10c5;}function parseOverrideValue(_0x4357b5){const _0x3d170c=_0x2ec00a,_0x208e92={'dVGDz':_0x3d170c(0x18d),'KCJHR':function(_0x567944,_0x4390a7){return _0x567944===_0x4390a7;},'KwBGX':function(_0xcda5b8,_0x5f27bb){return _0xcda5b8(_0x5f27bb);}};if(_0x4357b5===_0x3d170c(0x1af))return!![];if(_0x4357b5===_0x208e92['dVGDz'])return![];if(_0x4357b5==='null')return null;if(_0x208e92[_0x3d170c(0x19e)](_0x4357b5,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x4357b5)){const _0x15246a=_0x208e92[_0x3d170c(0x192)](Number,_0x4357b5);if(Number[_0x3d170c(0x1b8)](_0x15246a))return _0x15246a;}if(/^-?\d+\.\d+$/['test'](_0x4357b5)){const _0x29a634=Number(_0x4357b5);if(!Number[_0x3d170c(0x1a7)](_0x29a634))return _0x29a634;}const _0x324eee=_0x4357b5[_0x3d170c(0x197)]();if(_0x324eee[_0x3d170c(0x194)]('{')&&_0x324eee['endsWith']('}')||_0x324eee[_0x3d170c(0x194)]('[')&&_0x324eee['endsWith'](']'))try{return JSON['parse'](_0x324eee);}catch{}return _0x4357b5;}async function resolveProfileTarget(_0x5dbf73){const _0x1e33bd=_0x2ec00a,_0x5dbac1={'ViJJg':function(_0x11d37b,_0x53876d){return _0x11d37b(_0x53876d);},'iRkgP':_0x1e33bd(0x193)},_0x23adfd=existsSync(getEnvDir(_0x5dbf73));let _0x3e7dfc=![];try{const _0x5b0e2b=await fetchCloudProfile(_0x5dbf73);_0x3e7dfc=_0x5dbac1['ViJJg'](Boolean,_0x5b0e2b);}catch{}if(_0x3e7dfc)return{'kind':'cloud','alsoExistsElsewhere':_0x23adfd};if(_0x23adfd)return{'kind':_0x5dbac1[_0x1e33bd(0x1ae)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5dbf73+_0x1e33bd(0x1aa)+_0x5dbf73);}function printDualExistsHint(_0x2be948){console['log']('\x20\x20Note:\x20\x22'+_0x2be948+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x4bd0fe=_0x2ec00a;return process[_0x4bd0fe(0x1b0)]();}function _0x45c0(_0x38e165,_0x37f94d){_0x38e165=_0x38e165-0x185;const _0x154391=_0x1543();let _0x45c03b=_0x154391[_0x38e165];return _0x45c03b;}async function loadEffectiveCloudSettings(_0x4d002b){const _0x4b8bdf=_0x2ec00a,_0x3ca187={'HkLND':function(_0x4399bd){return _0x4399bd();},'jPcON':function(_0x3392d2,_0x430542,_0xe8f7d4){return _0x3392d2(_0x430542,_0xe8f7d4);},'lkPuI':function(_0x19823d,_0x165983){return _0x19823d??_0x165983;}},_0x4b7258=await fetchCloudProfile(_0x4d002b),_0x7c66db=readProfileOverrides(_0x3ca187['HkLND'](getProjectPath),_0x4d002b);return _0x3ca187[_0x4b8bdf(0x1b4)](mergeCloudProfileSettings,_0x4b7258?.[_0x4b8bdf(0x18b)]??{},_0x3ca187['lkPuI'](_0x7c66db,undefined));}export async function configSet(_0xfcbfb6,_0x5c0610,_0x48ac66){const _0x507df0=_0x2ec00a,_0x40bcec={'nfEvE':function(_0x303c85,_0x5b241f){return _0x303c85===_0x5b241f;},'YQFKF':function(_0x2722c2,_0x574e43){return _0x2722c2(_0x574e43);},'EQztv':function(_0x2ad7c3,_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4){return _0x2ad7c3(_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4);},'GdKgI':function(_0x26b548,_0x2ca558,_0x877d7a){return _0x26b548(_0x2ca558,_0x877d7a);}},_0x22fc89=await resolveProfileTarget(_0xfcbfb6);if(_0x40bcec['nfEvE'](_0x22fc89['kind'],_0x507df0(0x1ac))){if(_0x22fc89['alsoExistsElsewhere'])_0x40bcec[_0x507df0(0x1ab)](printDualExistsHint,_0xfcbfb6);const _0x4dd201=_0x40bcec[_0x507df0(0x1ab)](parseOverrideValue,_0x48ac66);_0x40bcec['EQztv'](setProfileOverride,getProjectPath(),_0xfcbfb6,_0x5c0610,_0x4dd201),console[_0x507df0(0x199)](_0x507df0(0x1b6)+_0x5c0610+'\x20=\x20'+JSON[_0x507df0(0x185)](_0x4dd201)+_0x507df0(0x1a6)+_0xfcbfb6+'\x22');return;}const _0xfbe70e=_0x40bcec[_0x507df0(0x1b3)](parseLocalValue,_0x5c0610,_0x48ac66);setProfileOverride(getProjectPath(),_0xfcbfb6,_0x5c0610,_0xfbe70e),console['log']('Set\x20'+_0x5c0610+'\x20=\x20'+_0xfbe70e+'\x20for\x20\x22'+_0xfcbfb6+'\x22');}function _0x1543(){const _0x46e06c=['YQFKF','cloud','(not\x20set)','iRkgP','true','cwd','\x22\x20not\x20found','11044473BvCYmK','GdKgI','jPcON','No\x20configuration\x20set\x20for\x20\x22','Set\x20','eFmdx','isSafeInteger','stringify','238065KpDCpw','13UpNLcF','KJLXw','7637RfThKK','HwPHV','settings','1244028vPCDKc','false','Key\x20\x22','Removed\x20','kind','3jbwgJn','KwBGX','local','startsWith','10kFBVwc','93820HrAzhK','trim','includes','log','wnKlg','44ZFzfcE','hZRwQ','MiSLy','KCJHR','object','584BRABRR','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','URjyy','btVWg','allowInsecureLocalhost','276fsYLyG','\x20for\x20\x22','isNaN','254542YeguiN','9704817zJVxIr','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'];_0x1543=function(){return _0x46e06c;};return _0x1543();}export async function configGet(_0x1974f3,_0x3a56bd){const _0x2ab719=_0x2ec00a,_0x346c13={'hZRwQ':function(_0x5ed443,_0x5c8c16){return _0x5ed443(_0x5c8c16);},'YUbXf':function(_0x2b6601,_0x442bab){return _0x2b6601===_0x442bab;},'KJLXw':function(_0x51c8cd,_0x5c372b){return _0x51c8cd(_0x5c372b);},'wnKlg':function(_0x3fb3aa,_0x3a7589){return _0x3fb3aa===_0x3a7589;},'btVWg':'object','oUZJv':function(_0x370e1d,_0x2f68de,_0x399061){return _0x370e1d(_0x2f68de,_0x399061);}},_0x5b47d6=await _0x346c13[_0x2ab719(0x19c)](resolveProfileTarget,_0x1974f3);if(_0x346c13['YUbXf'](_0x5b47d6[_0x2ab719(0x190)],'cloud')){const _0x119139=await _0x346c13[_0x2ab719(0x188)](loadEffectiveCloudSettings,_0x1974f3),_0x2fff12=getNestedValue(_0x119139,_0x3a56bd);if(_0x346c13[_0x2ab719(0x19a)](_0x2fff12,undefined))console['log'](_0x2ab719(0x1ad));else typeof _0x2fff12===_0x346c13[_0x2ab719(0x1a3)]?console['log'](JSON[_0x2ab719(0x185)](_0x2fff12,null,0x2)):console[_0x2ab719(0x199)](_0x2fff12);return;}const _0x40e33a=await loadSettings(_0x1974f3),_0x47206a=_0x346c13['oUZJv'](getNestedValue,_0x40e33a,_0x3a56bd);if(_0x47206a===undefined)console['log'](_0x2ab719(0x1ad));else _0x346c13[_0x2ab719(0x19a)](typeof _0x47206a,_0x2ab719(0x19f))?console['log'](JSON[_0x2ab719(0x185)](_0x47206a,null,0x2)):console['log'](_0x47206a);}export async function configList(_0x2694bf){const _0xdf5b9=_0x2ec00a,_0x160442={'eFmdx':function(_0x33a8f9,_0x1798ed){return _0x33a8f9(_0x1798ed);},'DoBfI':function(_0x3ff3d6,_0x108748){return _0x3ff3d6===_0x108748;},'QphgZ':function(_0x343047,_0x15b08c){return _0x343047(_0x15b08c);}},_0x25a75f=await _0x160442[_0xdf5b9(0x1b7)](resolveProfileTarget,_0x2694bf);if(_0x160442['DoBfI'](_0x25a75f[_0xdf5b9(0x190)],'cloud')){const _0x4a0451=await loadEffectiveCloudSettings(_0x2694bf);if(!_0x4a0451||Object['keys'](_0x4a0451)['length']===0x0){console[_0xdf5b9(0x199)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22');return;}console[_0xdf5b9(0x199)](JSON['stringify'](_0x4a0451,null,0x2));return;}const _0x32e87a=_0x160442['eFmdx'](getSettingsPath,_0x2694bf);if(!_0x160442['QphgZ'](existsSync,_0x32e87a)){console['log'](_0xdf5b9(0x1b5)+_0x2694bf+'\x22');return;}const _0x54c77e=await loadSettings(_0x2694bf),_0x3702f8=_0x160442['eFmdx'](formatSettings,_0x54c77e);!_0x3702f8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22'):console[_0xdf5b9(0x199)](_0x3702f8);}export async function configUnset(_0x8647b7,_0x294979){const _0x535ac2=_0x2ec00a,_0x57c570={'fumpL':_0x535ac2(0x1ac),'HwPHV':function(_0x1438bf,_0x2aae19,_0x52fc90,_0x48c958){return _0x1438bf(_0x2aae19,_0x52fc90,_0x48c958);},'URjyy':function(_0x4673e0){return _0x4673e0();}},_0x983c23=await resolveProfileTarget(_0x8647b7);if(_0x983c23[_0x535ac2(0x190)]===_0x57c570['fumpL']){if(_0x983c23['alsoExistsElsewhere'])printDualExistsHint(_0x8647b7);const _0x5a4cd3=_0x57c570[_0x535ac2(0x18a)](unsetProfileOverride,_0x57c570[_0x535ac2(0x1a2)](getProjectPath),_0x8647b7,_0x294979);_0x5a4cd3?console[_0x535ac2(0x199)]('Removed\x20'+_0x294979+_0x535ac2(0x1a6)+_0x8647b7+'\x22'):console['log']('Key\x20\x22'+_0x294979+'\x22\x20not\x20found');return;}const _0x3807c9=unsetProfileOverride(_0x57c570['URjyy'](getProjectPath),_0x8647b7,_0x294979);if(_0x3807c9){console['log'](_0x535ac2(0x18f)+_0x294979);return;}const _0x4200f0=await loadSettings(_0x8647b7),_0x75ce8=deleteNestedValue(_0x4200f0,_0x294979);_0x75ce8?console['log']('Key\x20\x22'+_0x294979+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x8647b7+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x535ac2(0x199)](_0x535ac2(0x18e)+_0x294979+_0x535ac2(0x1b1));}export async function configReset(_0x5de621){const _0x40a1b6=_0x2ec00a,_0x35a9e9={'IRnra':_0x40a1b6(0x1ac),'MiSLy':function(_0x14bc33){return _0x14bc33();}},_0x45fa37=await resolveProfileTarget(_0x5de621);if(_0x45fa37['kind']===_0x35a9e9['IRnra']){resetProfileOverrides(_0x35a9e9[_0x40a1b6(0x19d)](getProjectPath),_0x5de621),console[_0x40a1b6(0x199)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x5de621+'\x22');return;}console[_0x40a1b6(0x199)]('\x22'+_0x5de621+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5de621+_0x40a1b6(0x1a1));}
|
|
1
|
+
const _0x3d0a5f=_0x4bcf;(function(_0x123a68,_0x3081fb){const _0x2d108a=_0x4bcf,_0x47a688=_0x123a68();while(!![]){try{const _0xa8b2b3=parseInt(_0x2d108a(0x125))/0x1+-parseInt(_0x2d108a(0xf8))/0x2*(-parseInt(_0x2d108a(0x100))/0x3)+-parseInt(_0x2d108a(0xef))/0x4*(parseInt(_0x2d108a(0x10f))/0x5)+-parseInt(_0x2d108a(0xf4))/0x6+parseInt(_0x2d108a(0xf3))/0x7*(parseInt(_0x2d108a(0xfc))/0x8)+-parseInt(_0x2d108a(0x127))/0x9+parseInt(_0x2d108a(0xf6))/0xa*(-parseInt(_0x2d108a(0x10d))/0xb);if(_0xa8b2b3===_0x3081fb)break;else _0x47a688['push'](_0x47a688['shift']());}catch(_0x3ab09a){_0x47a688['push'](_0x47a688['shift']());}}}(_0x58ce,0x1c85a));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x58ce(){const _0x24bba8=['nmCcu','\x20\x20Note:\x20\x22','(not\x20set)','134360mIGYpx','isSafeInteger','atzyZ','DgAum','647571MowBnD','VuCvD','DplXC','yOnAu','\x22\x20not\x20found','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','QUuXo','CWAmP','endsWith','UelEc','trim','Removed\x20','NVZVl','12914hbtUtn','Qbdun','177565cntnJc','dQpxt','local','HbhKJ','kind','alsoExistsElsewhere','uashe','aZmqy','Key\x20\x22','UyvIF','isNaN','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','oRGof','lPOER','cloud','GWJBZ','sWWiF','log','undefined','headless','test','226035dMvcOl','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','957609JNsQaH','allowInsecureLocalhost','true','LxCxl',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','12BuCrZu','Profile\x20\x22','startsWith','NbZdG','7xSSVHR','322710yxpUyH','NmwJp','640bIbvQN','keys','2FfdRRt'];_0x58ce=function(){return _0x24bba8;};return _0x58ce();}const BOOLEAN_KEYS=[_0x3d0a5f(0x123),_0x3d0a5f(0x128)];function parseLocalValue(_0x492acb,_0x43b473){const _0x451c57=_0x3d0a5f,_0x4b608b={'jMbjs':function(_0xb4acba,_0x3da5ad){return _0xb4acba===_0x3da5ad;},'DgAum':'false'};if(BOOLEAN_KEYS['includes'](_0x492acb)){if(_0x43b473==='true')return!![];if(_0x4b608b['jMbjs'](_0x43b473,_0x4b608b[_0x451c57(0xff)]))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x492acb+_0x451c57(0xed));}return _0x43b473;}function _0x4bcf(_0x3f43ef,_0x2b619b){_0x3f43ef=_0x3f43ef-0xeb;const _0x58ce60=_0x58ce();let _0x4bcfeb=_0x58ce60[_0x3f43ef];return _0x4bcfeb;}function parseOverrideValue(_0x17aac2){const _0x4b08c7=_0x3d0a5f,_0x11b46c={'uashe':'false'};if(_0x17aac2===_0x4b08c7(0xeb))return!![];if(_0x17aac2===_0x11b46c[_0x4b08c7(0x115)])return![];if(_0x17aac2==='null')return null;if(_0x17aac2===_0x4b08c7(0x122))return undefined;if(/^-?\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x4fb012=Number(_0x17aac2);if(Number[_0x4b08c7(0xfd)](_0x4fb012))return _0x4fb012;}if(/^-?\d+\.\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x2d7349=Number(_0x17aac2);if(!Number[_0x4b08c7(0x119)](_0x2d7349))return _0x2d7349;}const _0xa3f34f=_0x17aac2[_0x4b08c7(0x10a)]();if(_0xa3f34f[_0x4b08c7(0xf1)]('{')&&_0xa3f34f[_0x4b08c7(0x108)]('}')||_0xa3f34f['startsWith']('[')&&_0xa3f34f['endsWith'](']'))try{return JSON['parse'](_0xa3f34f);}catch{}return _0x17aac2;}async function resolveProfileTarget(_0x3e1e42){const _0x4220c8=_0x3d0a5f,_0x495a61={'Qbdun':function(_0x324aa2,_0x1e7c14){return _0x324aa2(_0x1e7c14);},'sWWiF':_0x4220c8(0x111)},_0x2f8300=_0x495a61[_0x4220c8(0x10e)](existsSync,getEnvDir(_0x3e1e42));let _0xb6fee5=![];try{const _0x4f3f22=await _0x495a61[_0x4220c8(0x10e)](fetchCloudProfile,_0x3e1e42);_0xb6fee5=Boolean(_0x4f3f22);}catch{}if(_0xb6fee5)return{'kind':_0x4220c8(0x11e),'alsoExistsElsewhere':_0x2f8300};if(_0x2f8300)return{'kind':_0x495a61[_0x4220c8(0x120)],'alsoExistsElsewhere':![]};throw new Error(_0x4220c8(0xf0)+_0x3e1e42+_0x4220c8(0x105)+_0x3e1e42);}function printDualExistsHint(_0x895bc1){const _0x40e005=_0x3d0a5f;console[_0x40e005(0x121)](_0x40e005(0xfa)+_0x895bc1+_0x40e005(0xee));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x29b6b9){const _0xe268c2=_0x3d0a5f,_0x2fed67={'qAzuS':function(_0x35556d,_0x48253e){return _0x35556d(_0x48253e);},'atzyZ':function(_0x4d19eb,_0x515de0,_0x31861a){return _0x4d19eb(_0x515de0,_0x31861a);},'VuCvD':function(_0x5c88a2){return _0x5c88a2();}},_0x49c13f=await _0x2fed67['qAzuS'](fetchCloudProfile,_0x29b6b9),_0x5e7e07=_0x2fed67[_0xe268c2(0xfe)](readProfileOverrides,_0x2fed67[_0xe268c2(0x101)](getProjectPath),_0x29b6b9);return mergeCloudProfileSettings(_0x49c13f?.['settings']??{},_0x5e7e07??undefined);}export async function configSet(_0x169ee3,_0x3f53bd,_0x4833e1){const _0x8e615f=_0x3d0a5f,_0x1275d7={'DCcZZ':function(_0x5e10e0,_0x394329){return _0x5e10e0(_0x394329);},'oRGof':function(_0x19f6d6,_0x1e0919){return _0x19f6d6===_0x1e0919;},'NVZVl':function(_0x328515,_0x3e790c){return _0x328515(_0x3e790c);},'Wcazj':function(_0x2ca454,_0x591a9e,_0x233598,_0x194af6,_0x11864b){return _0x2ca454(_0x591a9e,_0x233598,_0x194af6,_0x11864b);},'EnDbB':function(_0x2ee6ea){return _0x2ee6ea();},'mqLva':function(_0x549039,_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad){return _0x549039(_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad);}},_0x17ed42=await _0x1275d7['DCcZZ'](resolveProfileTarget,_0x169ee3);if(_0x1275d7[_0x8e615f(0x11c)](_0x17ed42['kind'],'cloud')){if(_0x17ed42[_0x8e615f(0x114)])_0x1275d7[_0x8e615f(0x10c)](printDualExistsHint,_0x169ee3);const _0x1567a6=_0x1275d7[_0x8e615f(0x10c)](parseOverrideValue,_0x4833e1);_0x1275d7['Wcazj'](setProfileOverride,_0x1275d7['EnDbB'](getProjectPath),_0x169ee3,_0x3f53bd,_0x1567a6),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+JSON[_0x8e615f(0x11a)](_0x1567a6)+'\x20for\x20\x22'+_0x169ee3+'\x22');return;}const _0x5de0b9=parseLocalValue(_0x3f53bd,_0x4833e1);_0x1275d7['mqLva'](setProfileOverride,getProjectPath(),_0x169ee3,_0x3f53bd,_0x5de0b9),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+_0x5de0b9+'\x20for\x20\x22'+_0x169ee3+'\x22');}export async function configGet(_0x2b9ca1,_0x420375){const _0x484890=_0x3d0a5f,_0x34f63a={'aUfQd':'cloud','DplXC':function(_0x4b89cc,_0x31d882){return _0x4b89cc(_0x31d882);},'fVOCk':function(_0x3f1617,_0x2b0f3a){return _0x3f1617===_0x2b0f3a;},'QUuXo':function(_0x235699,_0x339457){return _0x235699(_0x339457);},'Flxiy':function(_0x11aaf2,_0x123e6d,_0x1dce84){return _0x11aaf2(_0x123e6d,_0x1dce84);}},_0x227ea3=await resolveProfileTarget(_0x2b9ca1);if(_0x227ea3[_0x484890(0x113)]===_0x34f63a['aUfQd']){const _0xf8546=await _0x34f63a[_0x484890(0x102)](loadEffectiveCloudSettings,_0x2b9ca1),_0x4f99ee=getNestedValue(_0xf8546,_0x420375);if(_0x34f63a['fVOCk'](_0x4f99ee,undefined))console[_0x484890(0x121)](_0x484890(0xfb));else typeof _0x4f99ee==='object'?console['log'](JSON['stringify'](_0x4f99ee,null,0x2)):console['log'](_0x4f99ee);return;}const _0x5170a9=await _0x34f63a[_0x484890(0x106)](loadSettings,_0x2b9ca1),_0x2b4065=_0x34f63a['Flxiy'](getNestedValue,_0x5170a9,_0x420375);if(_0x2b4065===undefined)console['log']('(not\x20set)');else typeof _0x2b4065==='object'?console[_0x484890(0x121)](JSON[_0x484890(0x11a)](_0x2b4065,null,0x2)):console[_0x484890(0x121)](_0x2b4065);}export async function configList(_0x2d2a6c){const _0x6f5960=_0x3d0a5f,_0x4b1bed={'NmwJp':function(_0x4eed9e,_0x154d0f){return _0x4eed9e(_0x154d0f);},'UyvIF':'cloud','UelEc':function(_0x3d52c3,_0x1da2bd){return _0x3d52c3===_0x1da2bd;},'dQpxt':function(_0x22958d,_0xbe366b){return _0x22958d(_0xbe366b);},'lPOER':function(_0x368203,_0x1dff3e){return _0x368203(_0x1dff3e);},'GWJBZ':function(_0x36a92c,_0x5b6cb0){return _0x36a92c(_0x5b6cb0);}},_0x136915=await _0x4b1bed['NmwJp'](resolveProfileTarget,_0x2d2a6c);if(_0x136915[_0x6f5960(0x113)]===_0x4b1bed[_0x6f5960(0x118)]){const _0x73d315=await _0x4b1bed[_0x6f5960(0xf5)](loadEffectiveCloudSettings,_0x2d2a6c);if(!_0x73d315||_0x4b1bed[_0x6f5960(0x109)](Object[_0x6f5960(0xf7)](_0x73d315)['length'],0x0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}console['log'](JSON['stringify'](_0x73d315,null,0x2));return;}const _0x13256c=_0x4b1bed[_0x6f5960(0x110)](getSettingsPath,_0x2d2a6c);if(!_0x4b1bed[_0x6f5960(0x11d)](existsSync,_0x13256c)){console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}const _0x279bff=await loadSettings(_0x2d2a6c),_0x2301c6=_0x4b1bed[_0x6f5960(0x11f)](formatSettings,_0x279bff);!_0x2301c6?console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22'):console[_0x6f5960(0x121)](_0x2301c6);}export async function configUnset(_0x27b3bb,_0x6aaff9){const _0x260543=_0x3d0a5f,_0x8aeb8c={'HbhKJ':function(_0x806039,_0x3f58ab){return _0x806039(_0x3f58ab);},'nmCcu':function(_0x212635,_0x2c725a){return _0x212635===_0x2c725a;},'yOnAu':function(_0x19c1a8,_0x50c6a8,_0x4c7a2a,_0x1c02bd){return _0x19c1a8(_0x50c6a8,_0x4c7a2a,_0x1c02bd);},'LxCxl':function(_0x167960,_0x3191be,_0x3542c9,_0x356631){return _0x167960(_0x3191be,_0x3542c9,_0x356631);},'NbZdG':function(_0x32b221){return _0x32b221();},'YiJaZ':function(_0xe7366b,_0x1f8d88,_0x3b376a){return _0xe7366b(_0x1f8d88,_0x3b376a);}},_0x2373ac=await _0x8aeb8c[_0x260543(0x112)](resolveProfileTarget,_0x27b3bb);if(_0x8aeb8c[_0x260543(0xf9)](_0x2373ac['kind'],_0x260543(0x11e))){if(_0x2373ac['alsoExistsElsewhere'])printDualExistsHint(_0x27b3bb);const _0x4eeb7d=_0x8aeb8c[_0x260543(0x103)](unsetProfileOverride,getProjectPath(),_0x27b3bb,_0x6aaff9);_0x4eeb7d?console['log'](_0x260543(0x10b)+_0x6aaff9+'\x20for\x20\x22'+_0x27b3bb+'\x22'):console['log'](_0x260543(0x117)+_0x6aaff9+_0x260543(0x104));return;}const _0x65e891=_0x8aeb8c[_0x260543(0xec)](unsetProfileOverride,_0x8aeb8c[_0x260543(0xf2)](getProjectPath),_0x27b3bb,_0x6aaff9);if(_0x65e891){console[_0x260543(0x121)]('Removed\x20'+_0x6aaff9);return;}const _0x17861e=await loadSettings(_0x27b3bb),_0x3b5d59=_0x8aeb8c['YiJaZ'](deleteNestedValue,_0x17861e,_0x6aaff9);_0x3b5d59?console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x126)+_0x27b3bb+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x104));}export async function configReset(_0x12c474){const _0x53f085=_0x3d0a5f,_0x5f7693={'CWAmP':_0x53f085(0x11e),'aZmqy':function(_0x4ae52e){return _0x4ae52e();}},_0x3139e1=await resolveProfileTarget(_0x12c474);if(_0x3139e1['kind']===_0x5f7693[_0x53f085(0x107)]){resetProfileOverrides(_0x5f7693[_0x53f085(0x116)](getProjectPath),_0x12c474),console[_0x53f085(0x121)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x12c474+'\x22');return;}console[_0x53f085(0x121)]('\x22'+_0x12c474+_0x53f085(0x11b)+_0x12c474+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55bf30,_0x3d027d){const _0x2c28ab=_0x3927,_0x25b0ab=_0x55bf30();while(!![]){try{const _0x2c5a18=parseInt(_0x2c28ab(0x1d2))/0x1*(-parseInt(_0x2c28ab(0x1d5))/0x2)+parseInt(_0x2c28ab(0x1e5))/0x3+parseInt(_0x2c28ab(0x1d1))/0x4*(-parseInt(_0x2c28ab(0x1e4))/0x5)+-parseInt(_0x2c28ab(0x1d4))/0x6*(parseInt(_0x2c28ab(0x1db))/0x7)+parseInt(_0x2c28ab(0x1da))/0x8+-parseInt(_0x2c28ab(0x1d7))/0x9+parseInt(_0x2c28ab(0x1d9))/0xa;if(_0x2c5a18===_0x3d027d)break;else _0x25b0ab['push'](_0x25b0ab['shift']());}catch(_0x396274){_0x25b0ab['push'](_0x25b0ab['shift']());}}}(_0x41c2,0xea76d));import _0x5e1d5c from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x41c2(){const _0x1bd83c=['12027104lAxfum','686agywmQ','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x22\x20not\x20found.','cwd','WqKLy','yes','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','QTUZO','379565YeLOln','3877917SCeJsb','Type\x20\x22','12JsjaLz','102117aajJEI','input','28266mbokyU','24rycAIE','cQFNJ','3941055XimmdW','\x22\x20for\x20everyone\x20in\x20your\x20organization.','5170540SUHSbp'];_0x41c2=function(){return _0x1bd83c;};return _0x41c2();}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x3927(_0x3c9aa9,_0x22415f){_0x3c9aa9=_0x3c9aa9-0x1d0;const _0x41c2b0=_0x41c2();let _0x3927d2=_0x41c2b0[_0x3c9aa9];return _0x3927d2;}export async function deleteProfile(_0x11f510,_0x4e19b5={}){const _0x419161=_0x3927,_0x3a0078={'cQFNJ':function(_0x2b6794,_0x543aa9){return _0x2b6794(_0x543aa9);},'WqKLy':function(_0x18e7d2){return _0x18e7d2();},'QTUZO':_0x419161(0x1d3),'wVpaS':function(_0x55968e,_0x6420c6,_0x2a65ba){return _0x55968e(_0x6420c6,_0x2a65ba);}},_0x3b53f7=await _0x3a0078[_0x419161(0x1d6)](fetchCloudProfile,_0x11f510);if(!_0x3b53f7)throw new Error('Cloud\x20profile\x20\x22'+_0x11f510+_0x419161(0x1de));if(!_0x4e19b5[_0x419161(0x1e1)]&&!_0x3a0078[_0x419161(0x1e0)](isInteractive))throw new Error(_0x419161(0x1e2));console['log'](_0x419161(0x1dc)+_0x11f510+_0x419161(0x1d8));if(!_0x4e19b5[_0x419161(0x1e1)]){const {confirmation:_0x2cbe65}=await _0x5e1d5c['prompt']([{'type':_0x3a0078[_0x419161(0x1e3)],'name':'confirmation','message':_0x419161(0x1d0)+_0x11f510+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2cbe65!==_0x11f510)throw new Error(_0x419161(0x1dd));}await deleteCloudProfile(_0x11f510),_0x3a0078['wVpaS'](resetProfileOverrides,process[_0x419161(0x1df)](),_0x11f510),clearLastProfile(process['cwd'](),_0x11f510),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x11f510+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x24a807=_0x16ba;(function(_0x5684c1,_0x3a553b){const _0x3becbb=_0x16ba,_0x3dea15=_0x5684c1();while(!![]){try{const _0x3670cc=-parseInt(_0x3becbb(0xd3))/0x1+parseInt(_0x3becbb(0xe1))/0x2+-parseInt(_0x3becbb(0xd0))/0x3+-parseInt(_0x3becbb(0xd5))/0x4*(parseInt(_0x3becbb(0xd7))/0x5)+parseInt(_0x3becbb(0xe4))/0x6*(-parseInt(_0x3becbb(0xd8))/0x7)+parseInt(_0x3becbb(0xce))/0x8*(parseInt(_0x3becbb(0xe6))/0x9)+parseInt(_0x3becbb(0xdb))/0xa;if(_0x3670cc===_0x3a553b)break;else _0x3dea15['push'](_0x3dea15['shift']());}catch(_0x23aa84){_0x3dea15['push'](_0x3dea15['shift']());}}}(_0x28f0,0x25bba));import{readdir,stat}from'fs/promises';function _0x28f0(){const _0x5dd1fc=['push','cached\x20(updated\x20','sort','isDirectory','environmentKey','local','message','environmentDetails','map','LKAxc','414944wtfdAt','endsWith','539157PNvWqe','IJRoK','includes','207023HFsvyd','dOeIk','4VwUluH','name','323630hbxTsw','35MkGmfr','\x0aLocal\x20Profiles\x20(legacy):','\x20\x20\x20\x20\x20\x20Details:\x20','3897380WgHwoe','PQDso','log','\x20\x20\x20\x20\x20\x20Session:\x20','settings.json','sessions','254786dgqauD','\x0a*\x20=\x20active\x20profile','RwUTo','17814ijYaJv','no\x20session','18uQBumD'];_0x28f0=function(){return _0x5dd1fc;};return _0x28f0();}function _0x16ba(_0x30c290,_0x6a532a){_0x30c290=_0x30c290-0xcb;const _0x28f0a2=_0x28f0();let _0x16bab4=_0x28f0a2[_0x30c290];return _0x16bab4;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24a807(0xe0),'bug-bashes','reports',_0x24a807(0xec),'ci'];export async function getEnvNames(){const _0x574d37=_0x24a807,_0x3ab58d={'dOeIk':function(_0x3dc176){return _0x3dc176();},'fOtDE':function(_0x505cd9,_0x2b0b99){return _0x505cd9(_0x2b0b99);},'RwUTo':function(_0x95d8b,_0x553208){return _0x95d8b(_0x553208);},'rsDGd':'local','LKAxc':function(_0x1132f4,_0x303539,_0x520e89){return _0x1132f4(_0x303539,_0x520e89);},'rsXtP':function(_0x54aaf7,_0x25f45b,_0x142f9e){return _0x54aaf7(_0x25f45b,_0x142f9e);},'IJRoK':'.txt','fCUSh':_0x574d37(0xdf)},_0x3fdc5e=_0x3ab58d[_0x574d37(0xd4)](getRangerDir);if(!existsSync(_0x3fdc5e))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3871fd=await readActiveProfileName(),_0x5efc1f=[],_0x228292={},_0x41753a=join(_0x3fdc5e,'local');if(_0x3ab58d['fOtDE'](existsSync,_0x41753a)){const _0x4a83fa=await _0x3ab58d[_0x574d37(0xe3)](readdir,_0x41753a);for(const _0x5bb4c9 of _0x4a83fa){const _0x18a90f=join(_0x41753a,_0x5bb4c9),_0x5201bf=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x18a90f);_0x5201bf[_0x574d37(0xea)]()&&(_0x5efc1f['push'](_0x5bb4c9),_0x228292[_0x5bb4c9]=_0x3ab58d['rsDGd']);}}const _0x26a68b=_0x3ab58d[_0x574d37(0xcd)](join,_0x3fdc5e,'ci');if(existsSync(_0x26a68b)){const _0x11395a=await _0x3ab58d['fOtDE'](readdir,_0x26a68b);for(const _0x3a002b of _0x11395a){const _0x17b46e=_0x3ab58d['rsXtP'](join,_0x26a68b,_0x3a002b),_0x4395f3=await stat(_0x17b46e);_0x4395f3[_0x574d37(0xea)]()&&(_0x5efc1f[_0x574d37(0xe7)](_0x3a002b),_0x228292[_0x3a002b]='ci');}}const _0x3266bc=await readdir(_0x3fdc5e);for(const _0xa880e of _0x3266bc){if(NON_ENV_DIRS[_0x574d37(0xd2)](_0xa880e))continue;if(_0xa880e['startsWith']('.'))continue;if(_0xa880e[_0x574d37(0xcf)](_0x3ab58d[_0x574d37(0xd1)]))continue;const _0x2035a5=join(_0x3fdc5e,_0xa880e),_0x2faae=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x2035a5);_0x2faae[_0x574d37(0xea)]()&&existsSync(_0x3ab58d['rsXtP'](join,_0x2035a5,_0x3ab58d['fCUSh']))&&(!_0x5efc1f['includes'](_0xa880e)&&(_0x5efc1f['push'](_0xa880e),_0x228292[_0xa880e]='legacy'));}return{'envNames':_0x5efc1f,'activeEnv':_0x3871fd,'envTypes':_0x228292};}export async function envList(){const _0x1c7cd8=_0x24a807,_0x6728a1={'PQDso':function(_0x57e173){return _0x57e173();},'suyhP':function(_0xa803be,_0xe11903){return _0xa803be(_0xe11903);},'rlGyi':_0x1c7cd8(0xd9),'DDYRU':function(_0x553f9e,_0x180022){return _0x553f9e===_0x180022;},'KwokL':'legacy','lWAfU':function(_0x254a81,_0x52a48e){return _0x254a81>_0x52a48e;}},{envNames:_0x3c7b33,activeEnv:_0x1a4019,envTypes:_0x11c55a}=await _0x6728a1[_0x1c7cd8(0xdc)](getEnvNames);let _0x2c0d19=[];const _0x236f4f=await _0x6728a1[_0x1c7cd8(0xdc)](getToken);if(_0x236f4f)try{_0x2c0d19=await _0x6728a1['PQDso'](listCloudProfiles);}catch(_0x57fc73){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x57fc73 instanceof Error?_0x57fc73[_0x1c7cd8(0xed)]:_0x6728a1['suyhP'](String,_0x57fc73)));}if(_0x3c7b33['length']===0x0&&_0x2c0d19['length']===0x0){console['log']('\x0aNo\x20profiles\x20found.'),console[_0x1c7cd8(0xdd)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x1dff71=new Set(_0x2c0d19[_0x1c7cd8(0xcc)](_0x49b928=>_0x49b928['name']));if(_0x3c7b33['length']>0x0){console['log'](_0x6728a1['rlGyi']);for(const _0x54b7fe of _0x3c7b33[_0x1c7cd8(0xe9)]()){const _0x177c87=_0x6728a1['DDYRU'](_0x54b7fe,_0x1a4019)&&!_0x1dff71['has'](_0x54b7fe),_0x55019c=_0x11c55a[_0x54b7fe]||'local',_0x1fb08a=await loadSettings(_0x54b7fe),_0x4fb732=_0x55019c===_0x6728a1['KwokL']?'':'\x20['+_0x55019c+']';console['log']('\x20\x20'+(_0x177c87?'*\x20':'\x20\x20')+_0x54b7fe+_0x4fb732),_0x1fb08a['baseUrl']&&console[_0x1c7cd8(0xdd)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1fb08a['baseUrl']),_0x1fb08a[_0x1c7cd8(0xcb)]&&console[_0x1c7cd8(0xdd)](_0x1c7cd8(0xda)+_0x1fb08a['environmentDetails']);}}if(_0x6728a1['lWAfU'](_0x2c0d19['length'],0x0)){console[_0x1c7cd8(0xdd)]('\x0aCloud\x20Profiles:');for(const _0x593611 of _0x2c0d19[_0x1c7cd8(0xe9)]((_0x14b054,_0x1a3fce)=>_0x14b054['name']['localeCompare'](_0x1a3fce[_0x1c7cd8(0xd6)]))){const _0x5df93f=_0x593611[_0x1c7cd8(0xd6)]===_0x1a4019,_0x1561d9=_0x593611[_0x1c7cd8(0xeb)]?'\x20('+_0x593611['environmentKey']+')':'',_0x4f75fd=_0x593611['sessionUpdatedAt']?_0x1c7cd8(0xe8)+_0x593611['sessionUpdatedAt']+')':_0x1c7cd8(0xe5);console['log']('\x20\x20'+(_0x5df93f?'*\x20':'\x20\x20')+_0x593611[_0x1c7cd8(0xd6)]+'\x20[cloud]'+_0x1561d9),console['log'](_0x1c7cd8(0xde)+_0x4f75fd);}}_0x1a4019&&console['log'](_0x1c7cd8(0xe2));}
|