@ranger-testing/ranger-cli 2.5.4-alpha.bc88254-5 โ†’ 2.5.4-alpha.f4657dc-23

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.
Files changed (83) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/deleteProfile.js +1 -0
  8. package/build/commands/env.js +1 -1
  9. package/build/commands/feature.js +1 -1
  10. package/build/commands/hook.js +1 -1
  11. package/build/commands/hooks/autoPrompt.js +1 -1
  12. package/build/commands/hooks/disable.js +1 -1
  13. package/build/commands/hooks/enable.js +1 -1
  14. package/build/commands/hooks/exitPlanMode.js +1 -1
  15. package/build/commands/hooks/index.js +1 -1
  16. package/build/commands/hooks/output.js +1 -1
  17. package/build/commands/hooks/planReminder.js +1 -1
  18. package/build/commands/hooks/planStart.js +1 -1
  19. package/build/commands/hooks/postEdit.js +1 -1
  20. package/build/commands/hooks/preCompact.js +1 -1
  21. package/build/commands/hooks/sessionEnd.js +1 -1
  22. package/build/commands/hooks/sessionStart.js +1 -1
  23. package/build/commands/hooks/stopHook.js +1 -1
  24. package/build/commands/index.js +1 -1
  25. package/build/commands/login.js +1 -1
  26. package/build/commands/mcpBootstrap.js +1 -1
  27. package/build/commands/migrateProfile.js +1 -1
  28. package/build/commands/setup/claude.js +1 -1
  29. package/build/commands/setup/opencode.js +1 -1
  30. package/build/commands/setupCi.js +1 -1
  31. package/build/commands/skillup.js +1 -1
  32. package/build/commands/start.js +1 -1
  33. package/build/commands/status.js +1 -1
  34. package/build/commands/update.js +1 -1
  35. package/build/commands/updateEnv.js +1 -1
  36. package/build/commands/useEnv.js +1 -1
  37. package/build/commands/utils/activeProfile.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -0
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/playwrightCli.js +1 -1
  60. package/build/commands/utils/profileMessages.js +1 -1
  61. package/build/commands/utils/profileSetupBanner.js +1 -1
  62. package/build/commands/utils/projectsConfig.js +1 -1
  63. package/build/commands/utils/rangerConfig.js +1 -1
  64. package/build/commands/utils/rangerRoot.js +1 -1
  65. package/build/commands/utils/resolveProfileContext.js +1 -1
  66. package/build/commands/utils/resolveProfileUrl.js +1 -1
  67. package/build/commands/utils/retry.js +1 -1
  68. package/build/commands/utils/sessionCache.js +1 -1
  69. package/build/commands/utils/settings.js +1 -1
  70. package/build/commands/utils/skillContent.js +1 -1
  71. package/build/commands/utils/skills.js +1 -1
  72. package/build/commands/utils/stitchWebmFiles.js +1 -1
  73. package/build/commands/utils/telemetry.js +1 -1
  74. package/build/commands/utils/tokenRefresh.js +1 -1
  75. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  76. package/build/commands/utils/userApi.js +1 -1
  77. package/build/commands/utils/version.js +1 -1
  78. package/build/commands/verifyFeature.js +1 -1
  79. package/build/commands/verifyFeatureCli.js +1 -1
  80. package/build/skills/ranger/SKILL.md +35 -6
  81. package/build/skills/ranger/create.md +19 -0
  82. package/build/skills/ranger/verify.md +42 -15
  83. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x2d488c,_0x337335){const _0x179b2b=_0x3323,_0xe1962f=_0x2d488c();while(!![]){try{const _0x3237e9=parseInt(_0x179b2b(0x254))/0x1+-parseInt(_0x179b2b(0x25c))/0x2*(-parseInt(_0x179b2b(0x25f))/0x3)+parseInt(_0x179b2b(0x251))/0x4+-parseInt(_0x179b2b(0x23e))/0x5*(parseInt(_0x179b2b(0x269))/0x6)+parseInt(_0x179b2b(0x238))/0x7*(parseInt(_0x179b2b(0x220))/0x8)+parseInt(_0x179b2b(0x23f))/0x9+-parseInt(_0x179b2b(0x237))/0xa*(parseInt(_0x179b2b(0x215))/0xb);if(_0x3237e9===_0x337335)break;else _0xe1962f['push'](_0xe1962f['shift']());}catch(_0x363cd7){_0xe1962f['push'](_0xe1962f['shift']());}}}(_0x5046,0xe81f7));import{mkdir,writeFile,readFile,readdir,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x4b7edf from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';async function checkUrlReachability(_0x26a5a0){const _0x3d1c6f=_0x3323,_0xe568c5={'UNHQK':function(_0x2a5eab,_0x254ebc,_0x4121f5){return _0x2a5eab(_0x254ebc,_0x4121f5);},'LHHwa':_0x3d1c6f(0x1ed),'CAisl':function(_0xf87871,_0x5e8f67){return _0xf87871(_0x5e8f67);},'OhhZT':function(_0x3f665f,_0xc9f416){return _0x3f665f<_0xc9f416;},'aWVCA':function(_0x47bcd1,_0x4c63a2){return _0x47bcd1===_0x4c63a2;}};try{const _0x53e054=new AbortController(),_0x109c72=_0xe568c5[_0x3d1c6f(0x206)](setTimeout,()=>_0x53e054[_0x3d1c6f(0x1ef)](),0x1388),_0x302dc7={'method':_0x3d1c6f(0x1f2),'signal':_0x53e054['signal'],'redirect':_0xe568c5['LHHwa']};/^https:\/\/localhost(:\d+)?/i[_0x3d1c6f(0x256)](_0x26a5a0)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3ec9bc=await _0xe568c5[_0x3d1c6f(0x206)](fetch,_0x26a5a0,_0x302dc7);delete process['env'][_0x3d1c6f(0x26a)],_0xe568c5['CAisl'](clearTimeout,_0x109c72);if(_0xe568c5[_0x3d1c6f(0x214)](_0x3ec9bc['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x3d1c6f(0x264)+_0x3ec9bc['status']};}catch(_0x4ae19e){delete process[_0x3d1c6f(0x25a)][_0x3d1c6f(0x26a)];const _0x3c4072=_0x4ae19e,_0x3bf5af=_0x3c4072[_0x3d1c6f(0x1ff)]||_0xe568c5[_0x3d1c6f(0x241)](String,_0x4ae19e),_0x5a2971=_0x3bf5af['includes'](_0x3d1c6f(0x227))||_0xe568c5[_0x3d1c6f(0x261)](_0x3c4072['name'],_0x3d1c6f(0x22a))||_0x3bf5af[_0x3d1c6f(0x249)](_0x3d1c6f(0x252));return{'ok':![],'error':_0x3bf5af,'isProtocolError':_0x5a2971};}}function _0x3323(_0x5e9127,_0x42e655){_0x5e9127=_0x5e9127-0x1d9;const _0x50463c=_0x5046();let _0x332399=_0x50463c[_0x5e9127];return _0x332399;}function _0x5046(){const _0x489400=['\x0aโš ๏ธ\x20\x20Profile\x20\x22','trackPhaseStart','\x0a๐Ÿ“‹\x20Authentication\x20Setup','ZdeRA','cdjMW','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','isElectron','prompt','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','UdmVE','cTwQY','manual','\x0a\x20\x20(domains:\x20','abort','AUiAg','join','HEAD','jqZFU','local','xtKwg','confirm','profile.add.autoRouteSkipped','\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20','allowInsecureLocalhost','off','TcYul','twdsA','Found\x20auth\x20environment\x20\x27','message','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','What\x20would\x20you\x20like\x20to\x20do?','mIDmO','settings.json','UNHQK','\x22\x20configured','Aborted.','trackPhaseEnd','\x20\x20Set\x20active\x20profile:\x20','log','โœ“\x20Encrypted\x20auth\x20saved\x20to:\x20','svUmh','KPVuj','Enter\x20a\x20different\x20URL','.enc','location','stdin','\x0a\x20\x20Profile\x20\x22','OhhZT','143TZRhtJ','input','no_match','zfQft','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','uJECX','wfmAR','once','tZUXf','shouldReplace','ajuks','32TkVcPp','GTiAw','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','force','\x20\x20\x20Creating\x20it\x20in\x20','xJECf','rmwue','Invalid\x20URL','.tmp-','WPAMl','TypeError','EbUSy','startsWith','length','Use\x20','isTTY','fHCrB','status','url','domains','environments','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20','kDGlo','1865830ktnfEP','1762544gbwSZR','error','keys','browser_auth','path','url_setup','135DVHHMC','671697sxRLPC','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','CAisl','\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a','legacy','HsMMB','http://localhost:3000','extraHTTPHeaders','http://','newPage','includes','โœ“\x20Created\x20settings:\x20','SIGINT','stdout','pLyOF','origin','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','about:blank','526072wktXnw','fetch\x20failed','cdpEndpoint','668296eHArCo','JJUCt','test','AlnSI','newContext','user','env','skipAuth','31112xBiFOh','assign','EVWAq','318vPzXUG','fLFQS','aWVCA','action','crgjI','HTTP\x20','catch',')\x0a\x20\x20Save\x20\x27','STASY','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','34266gmsuCJ','NODE_TLS_REJECT_UNAUTHORIZED','slice','bgVTg','RmIxI','no_auth_config','mjDVz','jArNV','โœ“\x20Cloud\x20profile\x20\x27','user_declined','close','YQZhQ','safeMode','\x27\x20matching\x20'];_0x5046=function(){return _0x489400;};return _0x5046();}async function sweepOrphanLocalProfile(_0x55761d,_0x2caac0,_0xbdcaaf){const _0x3af569=_0x3323,_0x5569dc={'fHCrB':function(_0x515c93,_0x1e7e93,_0x517904){return _0x515c93(_0x1e7e93,_0x517904);},'jqZFU':function(_0x23e6a5,_0x364028){return _0x23e6a5(_0x364028);},'GTiAw':function(_0x1e5684,_0x556540,_0x2bc99f){return _0x1e5684(_0x556540,_0x2bc99f);}},_0xa37fab=_0x5569dc[_0x3af569(0x230)](join,_0x2caac0,_0x3af569(0x1f4)),_0x315d44=join(_0xa37fab,_0x55761d);_0x5569dc[_0x3af569(0x1f3)](existsSync,_0x315d44)&&(_0xbdcaaf&&await _0x5569dc['jqZFU'](isPathGitTracked,_0x315d44)?console[_0x3af569(0x20b)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x315d44+_0x3af569(0x1e4)):(await rm(_0x315d44,{'recursive':!![],'force':!![]}),console[_0x3af569(0x20b)](_0x3af569(0x1ea)+_0x315d44)));if(_0x5569dc[_0x3af569(0x1f3)](existsSync,_0xa37fab)){let _0x3040e1=[];try{_0x3040e1=await _0x5569dc['jqZFU'](readdir,_0xa37fab);}catch{return;}const _0x353050=_0x3af569(0x228)+_0x55761d+'-';for(const _0x38655d of _0x3040e1){if(!_0x38655d[_0x3af569(0x22c)](_0x353050))continue;const _0x2db486=_0x5569dc[_0x3af569(0x221)](join,_0xa37fab,_0x38655d);await _0x5569dc['fHCrB'](rm,_0x2db486,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2db486);}}}async function tryAutoRouteCloudProfile(_0x407640,_0x30b096,_0x4bee55,_0x50f703,_0x503d19){const _0x3b523c=_0x3323,_0x428d52={'jokMS':function(_0x48a86b,_0x74f19b){return _0x48a86b===_0x74f19b;},'KPVuj':_0x3b523c(0x26e),'wfmAR':'No\x20auth\x20env\x20matches\x20this\x20URL.\x20Creating\x20local\x20profile.','CZusB':_0x3b523c(0x1f7),'zfQft':_0x3b523c(0x217),'jcoCD':'saveToCloud','gDVOE':function(_0x39d288,_0x45b078){return _0x39d288 instanceof _0x45b078;},'jArNV':function(_0x2b4c95,_0x28664){return _0x2b4c95+_0x28664;},'drqdH':function(_0x3dd7a4){return _0x3dd7a4();},'HMbOL':function(_0x2d2731,_0x34024e,_0x4c1b32,_0x198851){return _0x2d2731(_0x34024e,_0x4c1b32,_0x198851);}};let _0x7838c3;try{_0x7838c3=await fetchAuthConfig();}catch{return _0x503d19?.[_0x3b523c(0x209)](_0x3b523c(0x1f7),{'reason':_0x428d52[_0x3b523c(0x20e)],'profileName':_0x407640}),![];}if(!_0x7838c3||!_0x7838c3[_0x3b523c(0x234)]||_0x428d52['jokMS'](Object[_0x3b523c(0x23a)](_0x7838c3[_0x3b523c(0x234)])['length'],0x0))return _0x503d19?.[_0x3b523c(0x209)]('profile.add.autoRouteSkipped',{'reason':_0x428d52['KPVuj'],'profileName':_0x407640}),![];const _0x2fa673=matchAuthEnvironment(_0x30b096,_0x7838c3);if(!_0x2fa673)return console['log'](_0x428d52[_0x3b523c(0x21b)]),_0x503d19?.['trackPhaseEnd'](_0x428d52['CZusB'],{'reason':_0x428d52[_0x3b523c(0x218)],'profileName':_0x407640}),![];const _0x1b3a51=_0x7838c3['environments'][_0x2fa673],_0x399e44=_0x1b3a51?.[_0x3b523c(0x233)]??[];if(_0x50f703&&!_0x4bee55['yes']){const {saveToCloud:_0x4a2347}=await _0x4b7edf['prompt']([{'type':_0x3b523c(0x1f6),'name':_0x428d52['jcoCD'],'message':_0x3b523c(0x1fe)+_0x2fa673+_0x3b523c(0x1de)+_0x30b096+_0x3b523c(0x1ee)+_0x399e44[_0x3b523c(0x1f1)](',\x20')+_0x3b523c(0x266)+_0x407640+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4a2347)return _0x503d19?.[_0x3b523c(0x209)](_0x3b523c(0x1f7),{'reason':_0x3b523c(0x1da),'profileName':_0x407640}),![];}const _0x2a1e7b=_0x399e44['some'](_0x3de8a4=>{const _0x397aa9=_0x3b523c;try{return _0x428d52['jokMS'](new URL(_0x3de8a4)[_0x397aa9(0x24e)],new URL(_0x30b096)['origin']);}catch{return![];}}),_0x4dbd3a={};!_0x2a1e7b&&(_0x4dbd3a['baseUrl']=_0x30b096);try{await createCloudProfile(_0x407640,_0x2fa673,{'settings':_0x4dbd3a});}catch(_0xb6f6b7){if(_0x428d52['gDVOE'](_0xb6f6b7,ApiError)&&_0xb6f6b7[_0x3b523c(0x231)]===0x199){console['error'](_0x3b523c(0x219)+_0x407640+_0x3b523c(0x1e5));throw _0xb6f6b7;}return console[_0x3b523c(0x20b)]('\x20\x20Could\x20not\x20reach\x20Ranger\x20API\x20to\x20create\x20a\x20cloud\x20profile\x20('+(_0xb6f6b7 instanceof Error?_0xb6f6b7[_0x3b523c(0x1ff)]:String(_0xb6f6b7))+').\x20Falling\x20back\x20to\x20local\x20profile.'),_0x503d19?.[_0x3b523c(0x209)](_0x3b523c(0x1f7),{'reason':_0x428d52['KPVuj'],'profileName':_0x407640}),![];}console[_0x3b523c(0x20b)](_0x428d52[_0x3b523c(0x270)](_0x3b523c(0x1d9)+_0x407640+'\x27\x20created,\x20linked\x20to\x20env\x20\x27'+_0x2fa673+'\x27.\x0a',_0x3b523c(0x1f9)+_0x407640));try{await sweepOrphanLocalProfile(_0x407640,getRangerHomeDir(),![]);const _0x1ea6c5=_0x428d52['drqdH'](getRangerDir);_0x1ea6c5!==getRangerHomeDir()&&await _0x428d52['HMbOL'](sweepOrphanLocalProfile,_0x407640,_0x1ea6c5,!![]);}catch(_0x5413b9){console[_0x3b523c(0x20b)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x5413b9 instanceof Error?_0x5413b9[_0x3b523c(0x1ff)]:String(_0x5413b9))+').');}return _0x503d19?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':_0x2fa673,'profileName':_0x407640}),!![];}export async function addEnv(_0x486961,_0x1b515d={},_0x4d7a36){const _0x576089=_0x3323,_0xbc6c54={'qpByT':function(_0x522290,_0x39ce20,_0x4de90b){return _0x522290(_0x39ce20,_0x4de90b);},'xJECf':'Saving\x20authentication\x20state...','uJECX':function(_0x398770){return _0x398770();},'mjDVz':'close','TewIB':function(_0x2831b1,_0x298e06){return _0x2831b1===_0x298e06;},'Vepec':_0x576089(0x259),'YQZhQ':function(_0x132362,_0x928ebd,_0x3d4d27,_0x41f4e1){return _0x132362(_0x928ebd,_0x3d4d27,_0x41f4e1);},'xtKwg':function(_0x11ff9f,_0x5cf0bc){return _0x11ff9f===_0x5cf0bc;},'WPAMl':function(_0x4df7d6,_0x3a9e38){return _0x4df7d6+_0x3a9e38;},'lABCR':function(_0x1afc12,_0xa15c27,_0x34a870){return _0x1afc12(_0xa15c27,_0x34a870);},'awcBY':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','TcYul':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','EhJqw':'--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.','pLyOF':function(_0x1fca78,_0x2628ff){return _0x1fca78(_0x2628ff);},'HsMMB':function(_0x2044bf,_0x22ace7,_0x41b129,_0x5c6b6e,_0x13bbfb,_0xa86e2e){return _0x2044bf(_0x22ace7,_0x41b129,_0x5c6b6e,_0x13bbfb,_0xa86e2e);},'STASY':function(_0x108e0a,_0x37cde0,_0x256f59){return _0x108e0a(_0x37cde0,_0x256f59);},'ZOibz':function(_0x44ab76,_0x1336bd){return _0x44ab76===_0x1336bd;},'AXNRI':'confirm','dbHiz':'overwrite','bgVTg':'Aborted.','nEtqF':function(_0x427ea7,_0x2fb6a7){return _0x427ea7===_0x2fb6a7;},'JJUCt':'root\x20(.ranger/)','GYlqg':_0x576089(0x21e),'svUmh':_0x576089(0x1e9),'EZolr':'\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','NhkIt':_0x576089(0x268),'LhxvT':_0x576089(0x216),'WdXGx':'baseUrl','hoCAb':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','EbUSy':_0x576089(0x1e8),'HgvRK':function(_0x361895,_0x19d7f9){return _0x361895||_0x19d7f9;},'mThyr':_0x576089(0x203),'cTwQY':'use_suggestion','zfhpq':'Continue\x20anyway','twdsA':'continue','VtSpz':function(_0x314768,_0x5e6c0d){return _0x314768(_0x5e6c0d);},'rmwue':function(_0x39f604,_0xb0bcd0){return _0x39f604===_0xb0bcd0;},'AlnSI':function(_0x32aca6,_0x5e19bc){return _0x32aca6(_0x5e19bc);},'yAiFj':function(_0x561fbc,_0x4d7c38,_0x1f4955){return _0x561fbc(_0x4d7c38,_0x1f4955);},'cdjMW':_0x576089(0x23b),'mIDmO':'\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','UdmVE':'\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','ooWca':'--allow-insecure-localhost','crgjI':function(_0xac8f26,_0x463751){return _0xac8f26>_0x463751;},'fLFQS':function(_0x53babf,_0x379e75){return _0x53babf>_0x379e75;},'ruIFx':function(_0x4ed510,_0x14735e){return _0x4ed510||_0x14735e;},'mrrGs':_0x576089(0x250),'ajuks':_0x576089(0x200),'irWYt':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','ZdeRA':'You\x20can\x20try\x20again\x20with\x20one\x20of:','AUiAg':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','tZUXf':function(_0x249034,_0x2049bc,_0x4d7193){return _0x249034(_0x2049bc,_0x4d7193);},'QMETp':'utf-8','IgEYk':_0x576089(0x201),'RmIxI':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','wfGPs':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','kDGlo':'config_write','EVWAq':_0x576089(0x205),'rwgNA':function(_0x254a62,_0x59f4a3,_0x34552f){return _0x254a62(_0x59f4a3,_0x34552f);},'Qyxbo':function(_0x531163,_0x137f51){return _0x531163(_0x137f51);},'CCNJT':'SIGINT'},_0x468717=_0x1b515d['ci']??![],_0x179249=_0x468717?'ci':'local',_0x5b926e=_0xbc6c54['TewIB'](_0x1b515d['scope'],_0xbc6c54['Vepec'])?_0xbc6c54[_0x576089(0x21a)](getRangerHomeDir):getRangerDir(),_0x1d70f8=_0xbc6c54[_0x576089(0x1dc)](join,_0x5b926e,_0x179249,_0x486961),_0x11bbb3={};if(_0x1b515d['setupHeader'])for(const _0x2a641a of _0x1b515d['setupHeader']){const _0x575f85=_0x2a641a['indexOf'](':');if(_0xbc6c54[_0x576089(0x1f5)](_0x575f85,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2a641a+_0x576089(0x240));const _0x3bef42=_0x2a641a[_0x576089(0x26b)](0x0,_0x575f85)['trim'](),_0x135bd1=_0x2a641a['slice'](_0xbc6c54[_0x576089(0x229)](_0x575f85,0x1))['trim']();_0x11bbb3[_0x3bef42]=_0x135bd1;}const _0x551bb4=_0xbc6c54['lABCR'](join,_0x5b926e,_0x179249);if(_0x1b515d['cdpEndpoint']!==undefined&&_0x1b515d['cdpEndpoint']['trim']()==='')throw new Error(_0xbc6c54['awcBY']);if(_0x1b515d['cdpEndpoint']&&_0x1b515d['url'])throw new Error(_0xbc6c54[_0x576089(0x1fc)]);if(_0x1b515d['cdpEndpoint']&&_0x1b515d['ci'])throw new Error(_0xbc6c54['EhJqw']);const _0xd3da24=_0xbc6c54['pLyOF'](Boolean,_0x1b515d['cdpEndpoint']),_0x4c0092=!_0x1b515d[_0x576089(0x25b)]&&!_0xd3da24,_0x442154=process[_0x576089(0x212)][_0x576089(0x22f)]&&process[_0x576089(0x24c)][_0x576089(0x22f)];if(!_0x442154&&!_0x1b515d[_0x576089(0x232)]&&!_0xd3da24)throw new Error('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');if(!_0x468717&&!_0x1b515d['skipAuth']&&!_0xd3da24&&_0x1b515d['url']){const _0x3848b1=await _0xbc6c54[_0x576089(0x244)](tryAutoRouteCloudProfile,_0x486961,_0x1b515d['url'],_0x1b515d,_0x442154,_0x4d7a36);if(_0x3848b1)return;}const _0x3c42e7=_0xbc6c54['STASY'](findExistingEnv,_0x486961,{'rangerDir':_0x5b926e});let _0x41d81d=null;if(_0x3c42e7){if(!_0x442154)_0x41d81d=_0x3c42e7;else{if(_0xbc6c54['ZOibz'](_0x3c42e7[_0x576089(0x211)],_0x179249)){const {overwrite:_0xf4761e}=await _0x4b7edf['prompt']([{'type':_0xbc6c54['AXNRI'],'name':_0xbc6c54['dbHiz'],'message':'Profile\x20\x22'+_0x486961+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0xf4761e){console['log'](_0xbc6c54[_0x576089(0x26c)]);return;}_0x41d81d=_0x3c42e7;}else{const _0x1aed2b=_0xbc6c54['nEtqF'](_0x3c42e7[_0x576089(0x211)],_0x576089(0x243))?_0xbc6c54[_0x576089(0x255)]:_0x3c42e7[_0x576089(0x211)];console['error'](_0x576089(0x1df)+_0x486961+'\x22\x20already\x20exists\x20in\x20'+_0x1aed2b+':\x20'+_0x3c42e7[_0x576089(0x23c)]),console['error'](_0x576089(0x224)+_0x179249+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x55c3a7}=await _0x4b7edf[_0x576089(0x1e7)]([{'type':_0xbc6c54['AXNRI'],'name':_0xbc6c54['GYlqg'],'message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x179249+'?','default':![]}]);if(!_0x55c3a7){console[_0x576089(0x20b)](_0x576089(0x208));return;}_0x41d81d=_0x3c42e7;}}}_0x4d7a36?.['trackPhaseStart'](_0x576089(0x23d));let _0x3ba633='';if(_0xd3da24)console[_0x576089(0x20b)](_0xbc6c54[_0x576089(0x20d)]),console['log'](_0x576089(0x24f)+_0x1b515d['cdpEndpoint']),console['log'](_0xbc6c54['EZolr']);else{if(_0x1b515d['url']){_0x3ba633=_0x1b515d['url'];const _0x7f72ad=await _0xbc6c54['pLyOF'](checkUrlReachability,_0x3ba633);if(!_0x7f72ad['ok']&&!_0x1b515d['force'])throw new Error('Could\x20not\x20reach\x20'+_0x3ba633+':\x20'+_0x7f72ad[_0x576089(0x239)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x7f72ad['ok']&&_0x1b515d[_0x576089(0x223)]&&console[_0x576089(0x20b)]('โš \x20Could\x20not\x20reach\x20'+_0x3ba633+':\x20'+_0x7f72ad[_0x576089(0x239)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x576089(0x20b)](_0xbc6c54['NhkIt']),console['log'](_0x576089(0x202)),console['log'](_0x576089(0x1f8));let _0x21605f=![];while(!![]){const _0x5eb6c7=await _0x4b7edf[_0x576089(0x1e7)]([{'type':_0xbc6c54['LhxvT'],'name':_0xbc6c54['WdXGx'],'message':_0x21605f?_0xbc6c54['hoCAb']:_0xbc6c54[_0x576089(0x22b)],'default':_0xbc6c54['HgvRK'](_0x3ba633,_0x576089(0x245))}]);_0x3ba633=_0x5eb6c7['baseUrl'];const _0x346718=await _0xbc6c54[_0x576089(0x24d)](checkUrlReachability,_0x3ba633);if(_0x346718['ok'])break;const _0x1de915=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x3ba633),_0x45bb90=_0x346718['isProtocolError']&&!_0x1de915,_0x340d8d=_0x45bb90?_0x576089(0x247)+_0x3ba633:null;_0x21605f=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3ba633+':\x20'+_0x346718['error']);_0x340d8d&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x340d8d+'?');const {action:_0x233b69}=await _0x4b7edf[_0x576089(0x1e7)]([{'type':'list','name':_0x576089(0x262),'message':_0xbc6c54['mThyr'],'choices':[..._0x340d8d?[{'name':_0x576089(0x22e)+_0x340d8d,'value':_0xbc6c54['cTwQY']}]:[],{'name':_0x576089(0x20f),'value':'retry'},{'name':_0xbc6c54['zfhpq'],'value':_0xbc6c54[_0x576089(0x1fd)]}]}]);if(_0x233b69===_0xbc6c54[_0x576089(0x1ec)]&&_0x340d8d){_0x3ba633=_0x340d8d;const _0x252e3b=await _0xbc6c54['VtSpz'](checkUrlReachability,_0x3ba633);if(_0x252e3b['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x3ba633+':\x20'+_0x252e3b['error']);}else{if(_0xbc6c54[_0x576089(0x226)](_0x233b69,'continue'))break;}}}}_0x4d7a36?.['trackPhaseEnd'](_0x576089(0x23d));const _0x1ce3c5={};if(_0x41d81d){const _0x59684a=await _0xbc6c54[_0x576089(0x257)](loadSettings,_0x486961);Object['assign'](_0x1ce3c5,_0x59684a['setupHeaders']);}Object[_0x576089(0x25d)](_0x1ce3c5,_0x11bbb3),await mkdir(_0x551bb4,{'recursive':!![]});try{const _0x49ce44=await readdir(_0x551bb4),_0x33feef=_0x576089(0x228)+_0x486961+'-';for(const _0x395a5e of _0x49ce44){_0x395a5e['startsWith'](_0x33feef)&&await _0xbc6c54['yAiFj'](rm,join(_0x551bb4,_0x395a5e),{'recursive':!![],'force':!![]});}}catch{}const _0xa31594=await mkdtemp(_0xbc6c54[_0x576089(0x267)](join,_0x551bb4,_0x576089(0x228)+_0x486961+'-')),_0x3f1c83=join(_0xa31594,'auth.json'),_0x1abc1e=()=>{_0xbc6c54['qpByT'](rm,_0xa31594,{'recursive':!![],'force':!![]})['catch'](()=>{})['finally'](()=>{process['exit'](0x82);});};process[_0x576089(0x21c)](_0x576089(0x24b),_0x1abc1e);const _0x14c93f=Boolean(_0x3ba633)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x3ba633);try{if(_0x4c0092){_0x4d7a36?.[_0x576089(0x1e0)](_0xbc6c54[_0x576089(0x1e3)]),console[_0x576089(0x20b)](_0x576089(0x1e1)),console['log'](_0xbc6c54[_0x576089(0x204)]),console['log']('\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.');!_0x442154?(console['log']('\x0a\x20\x20\x20โš \x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.'),console[_0x576089(0x20b)](_0xbc6c54[_0x576089(0x1eb)])):console['log']('');await new Promise(_0x338618=>setTimeout(_0x338618,0xbb8));const _0x3301eb=[];_0x1b515d['safeMode']&&_0x3301eb['push']('--disable-features=WebBluetooth');const _0x466a13=_0x1b515d['allowInsecureLocalhost']||_0x14c93f;_0x466a13&&_0x3301eb['push'](_0xbc6c54['ooWca']);const _0x3232ac=await chromium['launch']({'headless':![],..._0xbc6c54[_0x576089(0x263)](_0x3301eb['length'],0x0)?{'args':_0x3301eb}:{}});try{const _0x5be301=_0xbc6c54[_0x576089(0x260)](Object[_0x576089(0x23a)](_0x1ce3c5)[_0x576089(0x22d)],0x0),_0x55da7e={'ignoreHTTPSErrors':!![]};_0x5be301&&(_0x55da7e[_0x576089(0x246)]=_0x1ce3c5);const _0x516726=await _0x3232ac[_0x576089(0x258)](_0x55da7e);await addProfileSetupBanner(_0x516726);const _0xab0eac=await _0x516726[_0x576089(0x248)]();await _0xab0eac['goto'](_0xbc6c54['ruIFx'](_0x3ba633,_0xbc6c54['mrrGs']));let _0x5ee981=![];await new Promise(_0x2be61e=>{const _0x58a2ef=_0x576089;_0xab0eac['on'](_0xbc6c54[_0x58a2ef(0x26f)],async()=>{const _0x923f1d=_0x58a2ef;try{console[_0x923f1d(0x20b)](_0xbc6c54[_0x923f1d(0x225)]),await _0x516726['storageState']({'path':_0x3f1c83}),_0x5ee981=!![];}catch{}_0xbc6c54['uJECX'](_0x2be61e);});});if(!_0x5ee981){console['log'](_0xbc6c54[_0x576089(0x21f)]);!_0x1b515d[_0x576089(0x1dd)]&&(console['log'](_0xbc6c54['irWYt']),console['log'](_0xbc6c54[_0x576089(0x1e2)]),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x486961+_0x576089(0x222)),console[_0x576089(0x20b)]('\x20\x20ranger\x20profile\x20add\x20'+_0x486961+_0x576089(0x242)));throw new Error(_0xbc6c54[_0x576089(0x1f0)]);}}finally{await _0x3232ac[_0x576089(0x1db)]()['catch'](()=>{});}if(_0x468717){const _0x46ed0b=await _0xbc6c54[_0x576089(0x21d)](readFile,_0x3f1c83,_0xbc6c54['QMETp']),_0x550467=await _0xbc6c54['uJECX'](getToken);if(!_0x550467){console[_0x576089(0x239)](_0xbc6c54['IgEYk']),await unlink(_0x3f1c83)[_0x576089(0x265)](()=>{});throw new Error('Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.');}else{const _0x13b1bc=encrypt(_0x46ed0b,_0x550467);await writeFile(_0x3f1c83+_0x576089(0x210),_0x13b1bc),await _0xbc6c54['AlnSI'](unlink,_0x3f1c83),console['log'](_0x576089(0x20c)+_0x3f1c83+_0x576089(0x210)),console['log'](_0xbc6c54[_0x576089(0x26d)]),console[_0x576089(0x20b)](_0xbc6c54['wfGPs']);}}else console['log']('โœ“\x20Auth\x20state\x20saved\x20to:\x20'+_0x3f1c83);_0x4d7a36?.['trackPhaseEnd'](_0xbc6c54[_0x576089(0x1e3)]);}_0x4d7a36?.[_0x576089(0x1e0)](_0xbc6c54[_0x576089(0x236)]);const _0x4151a8={};_0x3ba633&&(_0x4151a8['baseUrl']=_0x3ba633);_0x1b515d[_0x576089(0x253)]&&(_0x4151a8['cdpEndpoint']=_0x1b515d[_0x576089(0x253)],_0x4151a8[_0x576089(0x1e6)]=!![]);(_0x1b515d[_0x576089(0x1fa)]||_0x14c93f)&&(_0x4151a8['allowInsecureLocalhost']=!![]);_0x1b515d[_0x576089(0x1dd)]&&(_0x4151a8['safeMode']=!![]);Object['keys'](_0x1ce3c5)['length']>0x0&&(_0x4151a8['setupHeaders']=_0x1ce3c5);await writeFile(_0xbc6c54['yAiFj'](join,_0xa31594,'settings.json'),JSON['stringify'](_0x4151a8,null,0x2)),console[_0x576089(0x20b)](_0x576089(0x24a)+join(_0x1d70f8,_0xbc6c54[_0x576089(0x25e)]));if(_0x41d81d?.[_0x576089(0x211)]===_0x179249){const _0x3f96f1=_0x41d81d[_0x576089(0x23c)]+'.backup-'+Date['now']();await rename(_0x41d81d['path'],_0x3f96f1);try{await rename(_0xa31594,_0x1d70f8);}catch(_0x274159){await _0xbc6c54['rwgNA'](rename,_0x3f96f1,_0x41d81d[_0x576089(0x23c)]);throw _0x274159;}try{await rm(_0x3f96f1,{'recursive':!![]});}catch{console['log'](_0x576089(0x235)+_0x3f96f1);}}else{await _0xbc6c54[_0x576089(0x21d)](rename,_0xa31594,_0x1d70f8);if(_0x41d81d)try{await rm(_0x41d81d['path'],{'recursive':!![]}),console[_0x576089(0x20b)]('Removed\x20existing\x20profile\x20at\x20'+_0x41d81d['path']);}catch{console[_0x576089(0x20b)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x41d81d[_0x576089(0x23c)]);}}try{await _0xbc6c54['Qyxbo'](writeActiveProfileName,_0x486961),console[_0x576089(0x20b)](_0x576089(0x20a)+_0x486961);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}_0x4d7a36?.[_0x576089(0x209)](_0xbc6c54['kDGlo']),console['log'](_0x576089(0x213)+_0x486961+_0x576089(0x207));}catch(_0x261fe0){await rm(_0xa31594,{'recursive':!![],'force':!![]});throw _0x261fe0;}finally{process[_0x576089(0x1fb)](_0xbc6c54['CCNJT'],_0x1abc1e);}}
1
+ const _0x5a676b=_0x47d9;(function(_0x5336a2,_0x484ff9){const _0xa4276e=_0x47d9,_0x34412a=_0x5336a2();while(!![]){try{const _0xcd500c=parseInt(_0xa4276e(0x14e))/0x1+-parseInt(_0xa4276e(0x134))/0x2+parseInt(_0xa4276e(0x16b))/0x3+-parseInt(_0xa4276e(0x164))/0x4*(-parseInt(_0xa4276e(0x12a))/0x5)+-parseInt(_0xa4276e(0x15f))/0x6+parseInt(_0xa4276e(0x153))/0x7+-parseInt(_0xa4276e(0x144))/0x8*(-parseInt(_0xa4276e(0x10c))/0x9);if(_0xcd500c===_0x484ff9)break;else _0x34412a['push'](_0x34412a['shift']());}catch(_0x484db4){_0x34412a['push'](_0x34412a['shift']());}}}(_0x2c9e,0x43d40));import{readdir,rm}from'fs/promises';function _0x47d9(_0x2a8685,_0x20833d){_0x2a8685=_0x2a8685-0xfe;const _0x2c9eaa=_0x2c9e();let _0x47d9dc=_0x2c9eaa[_0x2a8685];return _0x47d9dc;}import{join}from'path';import{existsSync}from'fs';import _0x49d6cc 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 _0x2c9e(){const _0x28b267=['abort','\x20--skip-auth\x0a','znDae','message','672OYOqme','SBsDi','setupHeader','Enter\x20a\x20different\x20URL','\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','dTfqS','qKNzg','โœ“\x20Profile\x20\x27','eAngm','GRNoo','10129GFUUaJ','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','tyWUC','status','1589063YjqUOh','KNBWF','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','mGfCx','\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','exit','jhGBX','Continue\x20anyway','log','NODE_TLS_REJECT_UNAUTHORIZED','isTTY','WKAks','3064344DOcmXv','\x27\x20created\x20(no\x20session).\x0a','force','vuxxV','Use\x20','4rSacpL','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','vAQmE','FPnnU','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','trim','\x0a\x20\x20A\x20profile\x20named\x20\x22','612588oBUsXU','length','DZdHW','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','MUKAS','stdout','PjoGj','RaOiI','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','Invalid\x20--setup-header\x20format:\x20\x22','SPbMj','profile.add.autoRouted','list','VKZeD','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','domains','environments','setupHeaders','\x27\x20to\x20the\x20cloud?','cbbuC','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','โœ“\x20Cloud\x20profile\x20\x27','env','VCYVk','Found\x20auth\x20environment\x20\x27','kNnHU','skipAuth','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','BFRVf','confirm','62910iTBolH','ekPLk','ekVNk','keys','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','kzVfR','no_auth_config','local','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','hZzXe','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','.tmp-','iKaxS','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','dkLUK','\x0a\x20\x20(domains:\x20','profile.add.autoRouteSkipped','error','join','retry','fetch\x20failed','YctsR','jXGSa','user_declined','use_suggestion','MBJJk','HTTP\x20','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','900330qxHyxl','BNUKh','url','\x27\x20created.\x0a','RmsGS','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yLdQn','KgOLp','capture','840024kDGjkb','\x27\x20matching\x20','yqCbm','CfmaU','baseUrl','IVtGQ','prompt','XoZHB','\x20--url\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','trackPhaseEnd','warn'];_0x2c9e=function(){return _0x28b267;};return _0x2c9e();}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x5a676b(0x109);function warnCloudProfileSharedInOrg(){const _0x5bf8e2=_0x5a676b;if(!process['stdout']['isTTY'])return;console[_0x5bf8e2(0x13f)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2d52a9){const _0x2db2be=_0x5a676b,_0x5409d7={'MUKAS':'manual','ekPLk':function(_0x517d38,_0x52e24f,_0x54899b){return _0x517d38(_0x52e24f,_0x54899b);},'yIvDL':function(_0x378f8a,_0x1df857){return _0x378f8a(_0x1df857);},'yLdQn':function(_0x55be1e,_0x9f1f68){return _0x55be1e<_0x9f1f68;},'YctsR':'Invalid\x20URL','FPnnU':function(_0x42b086,_0x5babf4){return _0x42b086===_0x5babf4;},'sOCWP':'TypeError'};try{const _0x293521=new AbortController(),_0x3694dc=setTimeout(()=>_0x293521[_0x2db2be(0x140)](),0x1388),_0x10d4f5={'method':'HEAD','signal':_0x293521['signal'],'redirect':_0x5409d7[_0x2db2be(0x170)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x2d52a9)&&(process[_0x2db2be(0x103)][_0x2db2be(0x15c)]='0');const _0x14e7ff=await _0x5409d7[_0x2db2be(0x10d)](fetch,_0x2d52a9,_0x10d4f5);delete process[_0x2db2be(0x103)][_0x2db2be(0x15c)],_0x5409d7['yIvDL'](clearTimeout,_0x3694dc);if(_0x5409d7[_0x2db2be(0x131)](_0x14e7ff['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x2db2be(0x128)+_0x14e7ff[_0x2db2be(0x152)]};}catch(_0x38228e){delete process['env'][_0x2db2be(0x15c)];const _0x5f2693=_0x38228e,_0x27ea1a=_0x5f2693['message']||String(_0x38228e),_0x32ca7f=_0x27ea1a['includes'](_0x5409d7[_0x2db2be(0x123)])||_0x5409d7[_0x2db2be(0x167)](_0x5f2693['name'],_0x5409d7['sOCWP'])||_0x27ea1a['includes'](_0x2db2be(0x122));return{'ok':![],'error':_0x27ea1a,'isProtocolError':_0x32ca7f};}}async function sweepOrphanLocalProfile(_0x454327,_0xe80184,_0x39b383){const _0x41d58a=_0x5a676b,_0x2b7dd6={'xoxbT':function(_0x28658f,_0x57cea6,_0x3ef180){return _0x28658f(_0x57cea6,_0x3ef180);}},_0x100162=_0x2b7dd6['xoxbT'](join,_0xe80184,_0x41d58a(0x114)),_0x497ecf=join(_0x100162,_0x454327);existsSync(_0x497ecf)&&(_0x39b383&&await isPathGitTracked(_0x497ecf)?console['log'](_0x41d58a(0x16e)+_0x497ecf+_0x41d58a(0x108)):(await rm(_0x497ecf,{'recursive':!![],'force':!![]}),console[_0x41d58a(0x15b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x497ecf)));if(existsSync(_0x100162)){let _0x112098=[];try{_0x112098=await readdir(_0x100162);}catch{return;}const _0x4ae1e7=_0x41d58a(0x119)+_0x454327+'-';for(const _0x53c77b of _0x112098){if(!_0x53c77b['startsWith'](_0x4ae1e7))continue;const _0x2731a2=join(_0x100162,_0x53c77b);await rm(_0x2731a2,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2731a2);}}}async function sweepOrphansBestEffort(_0x1fa88b){const _0x6637fb=_0x5a676b,_0x424b05={'SBsDi':function(_0x16e70d,_0x264507,_0x18539d,_0x3e3f95){return _0x16e70d(_0x264507,_0x18539d,_0x3e3f95);},'vuxxV':function(_0x4532f7){return _0x4532f7();},'kzVfR':function(_0x5cb6bf,_0x3e4ea4){return _0x5cb6bf!==_0x3e4ea4;},'ekVNk':function(_0x4dcc32,_0x193c65){return _0x4dcc32(_0x193c65);}};try{await _0x424b05[_0x6637fb(0x145)](sweepOrphanLocalProfile,_0x1fa88b,getRangerHomeDir(),![]);const _0x53e97c=_0x424b05[_0x6637fb(0x162)](getRangerDir);_0x424b05[_0x6637fb(0x112)](_0x53e97c,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x1fa88b,_0x53e97c,!![]);}catch(_0x4f73cf){console[_0x6637fb(0x15b)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x4f73cf instanceof Error?_0x4f73cf['message']:_0x424b05[_0x6637fb(0x10e)](String,_0x4f73cf))+').');}}async function markActive(_0x5061ae){const _0x1d9d06=_0x5a676b,_0x370b99={'IVtGQ':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x5061ae),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x5061ae);}catch{console['log'](_0x370b99[_0x1d9d06(0x139)]);}}async function tryAutoRouteCloudProfile(_0x30797f,_0x4868b4,_0x378b55,_0x4869fe,_0x1de939){const _0xf53d9c=_0x5a676b,_0x283525={'qKNzg':function(_0x1458fd,_0x27695f){return _0x1458fd===_0x27695f;},'dkLUK':'profile.add.autoRouteSkipped','JmXDe':function(_0x235d7f,_0x405185){return _0x235d7f instanceof _0x405185;},'DZkcU':'no_auth_config','jhGBX':function(_0x25f69e,_0x5c4b21){return _0x25f69e+_0x5c4b21;},'JJAjo':function(_0x4697b7,_0x2ba945){return _0x4697b7+_0x2ba945;},'bBWQE':_0xf53d9c(0x148),'MDXlF':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Wfwyg':_0xf53d9c(0x116),'RaOiI':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','zhjMO':function(_0x95a7cc,_0x536716,_0x518f5d){return _0x95a7cc(_0x536716,_0x518f5d);},'wXSUf':'confirm','ydCvj':'saveToCloud','mgJmV':function(_0x383894,_0xbf75ce){return _0x383894+_0xbf75ce;},'VCYVk':function(_0x1fdb49,_0x1dd137){return _0x1fdb49(_0x1dd137);},'SPbMj':_0xf53d9c(0x178)};let _0x370398;try{_0x370398=await fetchAuthConfig();}catch(_0x52c30d){return _0x1de939?.['trackPhaseEnd'](_0x283525[_0xf53d9c(0x11c)],{'reason':_0xf53d9c(0x113),'profileName':_0x30797f}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x283525['JmXDe'](_0x52c30d,Error)?_0x52c30d[_0xf53d9c(0x143)]:String(_0x52c30d))),![];}if(!_0x370398||!_0x370398[_0xf53d9c(0x17d)]||Object[_0xf53d9c(0x10f)](_0x370398['environments'])[_0xf53d9c(0x16c)]===0x0){if(_0x4869fe)return await captureEnvLessProfile(_0x30797f,_0x4868b4,_0x378b55,_0x1de939);return _0x1de939?.[_0xf53d9c(0x13e)](_0x283525['dkLUK'],{'reason':_0x283525['DZkcU'],'profileName':_0x30797f}),console[_0xf53d9c(0x11f)](_0x283525[_0xf53d9c(0x159)](_0x283525['jhGBX'](_0x283525[_0xf53d9c(0x159)](_0x283525['JJAjo'](_0x283525['bBWQE']+'\x0a',_0x283525['MDXlF'])+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x30797f+_0xf53d9c(0x13c)+_0x4868b4+_0xf53d9c(0x141)),'\x0a'),_0x283525['Wfwyg']),_0x283525[_0xf53d9c(0x173)])),![];}const _0x3bf9d7=_0x283525['zhjMO'](matchAuthEnvironment,_0x4868b4,_0x370398);if(!_0x3bf9d7)return _0x1de939?.[_0xf53d9c(0x13e)](_0xf53d9c(0x11e),{'reason':'no_match','profileName':_0x30797f}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x4868b4+'.\x20Configured\x20envs:\x20'+Object[_0xf53d9c(0x10f)](_0x370398['environments'])[_0xf53d9c(0x120)](',\x20')+'.'),![];const _0x59ddcf=_0x370398[_0xf53d9c(0x17d)][_0x3bf9d7],_0x3f8cc3=_0x59ddcf?.[_0xf53d9c(0x17c)]??[];if(_0x4869fe&&!_0x378b55['yes']){const {saveToCloud:_0x13957f}=await _0x49d6cc['prompt']([{'type':_0x283525['wXSUf'],'name':_0x283525['ydCvj'],'message':_0xf53d9c(0x105)+_0x3bf9d7+_0xf53d9c(0x135)+_0x4868b4+_0xf53d9c(0x11d)+_0x3f8cc3['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x30797f+_0xf53d9c(0xff),'default':!![]}]);if(!_0x13957f)return _0x1de939?.[_0xf53d9c(0x13e)](_0x283525['dkLUK'],{'reason':_0xf53d9c(0x125),'profileName':_0x30797f}),console[_0xf53d9c(0x11f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x1c6167=_0x3f8cc3['some'](_0x483e1b=>{const _0x2d0f55=_0xf53d9c;try{return _0x283525[_0x2d0f55(0x14a)](new URL(_0x483e1b)['origin'],new URL(_0x4868b4)['origin']);}catch{return![];}}),_0x27426f={};!_0x1c6167&&(_0x27426f['baseUrl']=_0x4868b4);try{await createCloudProfile(_0x30797f,_0x3bf9d7,{'settings':_0x27426f}),warnCloudProfileSharedInOrg();}catch(_0x3f2873){if(_0x3f2873 instanceof ApiError&&_0x283525[_0xf53d9c(0x14a)](_0x3f2873[_0xf53d9c(0x152)],0x199)){console['error'](_0x283525['mgJmV'](_0xf53d9c(0x16a)+_0x30797f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x30797f));throw _0x3f2873;}throw _0x3f2873;}return console[_0xf53d9c(0x15b)](_0x283525[_0xf53d9c(0x159)](_0xf53d9c(0x14b)+_0x30797f+_0xf53d9c(0x12d),_0xf53d9c(0x12f)+_0x30797f)),await _0x283525[_0xf53d9c(0x104)](sweepOrphansBestEffort,_0x30797f),_0x1de939?.['trackPhaseEnd'](_0x283525[_0xf53d9c(0x177)],{'envKey':_0x3bf9d7,'profileName':_0x30797f}),!![];}async function createUnconfiguredCloudProfile(_0x186a1f,_0x3e49bc){const _0x289777=_0x5a676b,_0x4b08f1={'lzgMt':function(_0x2e6153,_0x5d1747){return _0x2e6153===_0x5d1747;}};try{await createCloudProfile(_0x186a1f,undefined,{'settings':_0x3e49bc}),warnCloudProfileSharedInOrg();}catch(_0x12c7c3){_0x12c7c3 instanceof ApiError&&_0x4b08f1['lzgMt'](_0x12c7c3['status'],0x199)&&console[_0x289777(0x11f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x186a1f+_0x289777(0x155)+(_0x289777(0x150)+_0x186a1f));throw _0x12c7c3;}}async function captureEnvLessProfile(_0x3f4796,_0x93e7bb,_0x513a77,_0x493989){const _0x151b93=_0x5a676b,_0x5e00dd={'PPyEL':_0x151b93(0x10b),'Qhuor':_0x151b93(0x165),'GRNoo':'user_declined','cbbuC':function(_0x9199ae,_0x3cc166){return _0x9199ae+_0x3cc166;},'WKAks':function(_0x3e6829,_0x5803dd){return _0x3e6829 instanceof _0x5803dd;},'PjoGj':function(_0xd666c7,_0x1f7413){return _0xd666c7===_0x1f7413;},'yqCbm':function(_0x4a6eb7,_0x59fd68){return _0x4a6eb7>_0x59fd68;},'vAQmE':function(_0xaf5ce8,_0x6fc279){return _0xaf5ce8+_0x6fc279;},'tyWUC':function(_0x3d438b,_0x4a0fab){return _0x3d438b(_0x4a0fab);},'BNUKh':'profile.add.autoRouted'};if(!_0x513a77['yes']){const {capture:_0x51f705}=await _0x49d6cc[_0x151b93(0x13a)]([{'type':_0x5e00dd['PPyEL'],'name':_0x151b93(0x133),'message':_0x5e00dd['Qhuor'],'default':!![]}]);if(!_0x51f705)return _0x493989?.['trackPhaseEnd'](_0x151b93(0x11e),{'reason':_0x5e00dd[_0x151b93(0x14d)],'profileName':_0x3f4796}),console[_0x151b93(0x11f)](_0x151b93(0x16f)+_0x151b93(0x130)),![];}const _0x4452eb={};if(_0x513a77[_0x151b93(0x146)])for(const _0x521ead of _0x513a77[_0x151b93(0x146)]){const _0xf556b=_0x521ead['indexOf'](':');if(_0xf556b===-0x1)continue;_0x4452eb[_0x521ead['slice'](0x0,_0xf556b)['trim']()]=_0x521ead['slice'](_0x5e00dd[_0x151b93(0x100)](_0xf556b,0x1))[_0x151b93(0x169)]();}const _0x25d370={'baseUrl':_0x93e7bb};Object['keys'](_0x4452eb)['length']>0x0&&(_0x25d370['setupHeaders']=_0x4452eb);let _0x183c80;try{_0x183c80=await createCloudProfile(_0x3f4796,undefined,{'settings':_0x25d370}),warnCloudProfileSharedInOrg();}catch(_0x3ff1b6){_0x5e00dd[_0x151b93(0x15e)](_0x3ff1b6,ApiError)&&_0x5e00dd[_0x151b93(0x172)](_0x3ff1b6['status'],0x199)&&console[_0x151b93(0x11f)](_0x151b93(0x16a)+_0x3f4796+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x3f4796));throw _0x3ff1b6;}return await manualBrowserLogin(_0x183c80,{'key':'','domains':[_0x93e7bb],'setupHeaders':_0x5e00dd[_0x151b93(0x136)](Object[_0x151b93(0x10f)](_0x4452eb)['length'],0x0)?_0x4452eb:undefined}),console['log'](_0x5e00dd[_0x151b93(0x166)]('\x0aโœ“\x20Profile\x20\x27'+_0x3f4796+_0x151b93(0x11b),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3f4796)),await _0x5e00dd[_0x151b93(0x151)](sweepOrphansBestEffort,_0x3f4796),_0x493989?.[_0x151b93(0x13e)](_0x5e00dd[_0x151b93(0x12b)],{'envKey':null,'profileName':_0x3f4796}),!![];}export async function addEnv(_0x432259,_0x46ee40={},_0x4bd8e8){const _0x3a1edc=_0x5a676b,_0xd8b84c={'BFRVf':function(_0x25a89d,_0x906f99){return _0x25a89d+_0x906f99;},'eDRGp':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','znDae':_0x3a1edc(0x118),'KgOLp':function(_0x589ec9,_0x502473){return _0x589ec9===_0x502473;},'haURz':function(_0x2f347b,_0x2d1623){return _0x2f347b!==_0x2d1623;},'kNnHU':_0x3a1edc(0x110),'CfmaU':function(_0x1c9d18,_0x53783f,_0x3768a3){return _0x1c9d18(_0x53783f,_0x3768a3);},'mGfCx':function(_0x675050,_0x45f101,_0x3dd10f,_0x2524fe,_0x3410f5){return _0x675050(_0x45f101,_0x3dd10f,_0x2524fe,_0x3410f5);},'tQwYk':function(_0x1d51ad,_0x2a3ea9){return _0x1d51ad(_0x2a3ea9);},'eAngm':function(_0x4c8374,_0x3d63fa){return _0x4c8374(_0x3d63fa);},'ySoIb':function(_0x37c6a5,_0x420ced){return _0x37c6a5>_0x420ced;},'RmsGS':function(_0x24591f,_0xf86745,_0x7a48b6){return _0x24591f(_0xf86745,_0x7a48b6);},'KNBWF':_0x3a1edc(0x129),'VKZeD':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','DZdHW':_0x3a1edc(0x138),'hZzXe':_0x3a1edc(0x168),'hsCEN':_0x3a1edc(0x14f),'dTfqS':'http://localhost:3000','iKaxS':'action','YTfLB':'What\x20would\x20you\x20like\x20to\x20do?','IUwFw':_0x3a1edc(0x126),'MBJJk':'continue','XoZHB':function(_0x5843d7,_0x29ce50,_0x3da870,_0x42020c,_0x52466a,_0x185834){return _0x5843d7(_0x29ce50,_0x3da870,_0x42020c,_0x52466a,_0x185834);},'jXGSa':function(_0x7ffd70,_0x1da629){return _0x7ffd70 instanceof _0x1da629;}};_0x46ee40['ci']&&(console[_0x3a1edc(0x11f)](_0xd8b84c[_0x3a1edc(0x10a)](_0xd8b84c[_0x3a1edc(0x10a)](_0xd8b84c['eDRGp']+_0x3a1edc(0x17b)+'\x0a'+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'+_0x3a1edc(0x111),'\x0a')+_0xd8b84c[_0x3a1edc(0x142)],_0x3a1edc(0x174))),process['exit'](0x1));const _0x10bc80={};if(_0x46ee40[_0x3a1edc(0x146)])for(const _0x47d36b of _0x46ee40['setupHeader']){const _0x80250c=_0x47d36b['indexOf'](':');if(_0xd8b84c[_0x3a1edc(0x132)](_0x80250c,-0x1))throw new Error(_0x3a1edc(0x176)+_0x47d36b+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x477691=_0x47d36b['slice'](0x0,_0x80250c)[_0x3a1edc(0x169)](),_0x3915f9=_0x47d36b['slice'](_0xd8b84c['BFRVf'](_0x80250c,0x1))[_0x3a1edc(0x169)]();_0x10bc80[_0x477691]=_0x3915f9;}if(_0xd8b84c['haURz'](_0x46ee40['cdpEndpoint'],undefined)&&_0xd8b84c[_0x3a1edc(0x132)](_0x46ee40['cdpEndpoint']['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x46ee40['cdpEndpoint']&&_0x46ee40['url'])throw new Error(_0xd8b84c[_0x3a1edc(0x106)]);const _0x5d1045=Boolean(_0x46ee40['cdpEndpoint']),_0x85346d=process['stdin'][_0x3a1edc(0x15d)]&&process[_0x3a1edc(0x171)]['isTTY'];if(!_0x85346d&&!_0x46ee40[_0x3a1edc(0x12c)]&&!_0x5d1045&&!_0x46ee40[_0x3a1edc(0x107)])throw new Error('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');if(_0x5d1045){const _0x2040b5=_0x46ee40['cdpEndpoint'];console['log'](_0x3a1edc(0x157)),console['log'](_0x3a1edc(0x101)+_0x2040b5);const _0x924138={'cdpEndpoint':_0x2040b5,'isElectron':!![]};Object[_0x3a1edc(0x10f)](_0x10bc80)[_0x3a1edc(0x16c)]>0x0&&(_0x924138[_0x3a1edc(0xfe)]=_0x10bc80);await _0xd8b84c[_0x3a1edc(0x137)](createUnconfiguredCloudProfile,_0x432259,_0x924138);try{setProfileOverride(process['cwd'](),_0x432259,'cdpEndpoint',_0x2040b5),_0xd8b84c[_0x3a1edc(0x156)](setProfileOverride,process['cwd'](),_0x432259,'isElectron',!![]);}catch(_0x4e259a){console['error'](_0x3a1edc(0x175)+(_0x4e259a instanceof Error?_0x4e259a[_0x3a1edc(0x143)]:String(_0x4e259a)));}console[_0x3a1edc(0x15b)](_0x3a1edc(0x102)+_0x432259+'\x27\x20created\x20(CDP).'),await _0xd8b84c['tQwYk'](sweepOrphansBestEffort,_0x432259),await _0xd8b84c['eAngm'](markActive,_0x432259);return;}if(_0x46ee40[_0x3a1edc(0x107)]){const _0x4f768e={};_0x46ee40['url']&&(_0x4f768e[_0x3a1edc(0x138)]=_0x46ee40['url']);_0xd8b84c['ySoIb'](Object['keys'](_0x10bc80)['length'],0x0)&&(_0x4f768e['setupHeaders']=_0x10bc80);await _0xd8b84c[_0x3a1edc(0x12e)](createUnconfiguredCloudProfile,_0x432259,_0x4f768e),console[_0x3a1edc(0x15b)]('โœ“\x20Profile\x20\x27'+_0x432259+_0x3a1edc(0x160)+(_0x3a1edc(0x13d)+_0x432259+'`\x20again\x20without\x20--skip-auth.')),await _0xd8b84c[_0x3a1edc(0x14c)](sweepOrphansBestEffort,_0x432259),await _0xd8b84c['eAngm'](markActive,_0x432259);return;}if(_0x46ee40[_0x3a1edc(0x12c)]){const _0x15d837=_0x46ee40['url'],_0x4bb6f1=await checkUrlReachability(_0x15d837);if(!_0x4bb6f1['ok']&&!_0x46ee40[_0x3a1edc(0x161)])throw new Error('Could\x20not\x20reach\x20'+_0x15d837+':\x20'+_0x4bb6f1[_0x3a1edc(0x11f)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x4bb6f1['ok']&&_0x46ee40['force']&&console['log']('โš \x20Could\x20not\x20reach\x20'+_0x15d837+':\x20'+_0x4bb6f1['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x3a1edc(0x15b)](_0xd8b84c[_0x3a1edc(0x154)]),console[_0x3a1edc(0x15b)](_0xd8b84c[_0x3a1edc(0x17a)]),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x4ec969='',_0x536535=![];while(!![]){const _0x3176e0=await _0x49d6cc[_0x3a1edc(0x13a)]([{'type':'input','name':_0xd8b84c[_0x3a1edc(0x16d)],'message':_0x536535?_0xd8b84c[_0x3a1edc(0x117)]:_0xd8b84c['hsCEN'],'default':_0x4ec969||_0xd8b84c[_0x3a1edc(0x149)]}]);_0x4ec969=_0x3176e0['baseUrl'];const _0x301ae9=await checkUrlReachability(_0x4ec969);if(_0x301ae9['ok'])break;const _0x46f884=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x4ec969),_0x3623b5=_0x301ae9['isProtocolError']&&!_0x46f884,_0x3f0ffe=_0x3623b5?'http://'+_0x4ec969:null;_0x536535=!![],console[_0x3a1edc(0x15b)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x4ec969+':\x20'+_0x301ae9['error']);_0x3f0ffe&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3f0ffe+'?');const {action:_0x58ca3e}=await _0x49d6cc['prompt']([{'type':_0x3a1edc(0x179),'name':_0xd8b84c[_0x3a1edc(0x11a)],'message':_0xd8b84c['YTfLB'],'choices':[..._0x3f0ffe?[{'name':_0x3a1edc(0x163)+_0x3f0ffe,'value':_0xd8b84c['IUwFw']}]:[],{'name':_0x3a1edc(0x147),'value':_0x3a1edc(0x121)},{'name':_0x3a1edc(0x15a),'value':_0xd8b84c[_0x3a1edc(0x127)]}]}]);if(_0x58ca3e==='use_suggestion'&&_0x3f0ffe){_0x4ec969=_0x3f0ffe;const _0x4cfb66=await checkUrlReachability(_0x4ec969);if(_0x4cfb66['ok'])break;console['log'](_0x3a1edc(0x115)+_0x4ec969+':\x20'+_0x4cfb66[_0x3a1edc(0x11f)]);}else{if(_0x58ca3e===_0xd8b84c[_0x3a1edc(0x127)])break;}}_0x46ee40={..._0x46ee40,'url':_0x4ec969};}let _0x38875f=![];try{_0x38875f=await _0xd8b84c[_0x3a1edc(0x13b)](tryAutoRouteCloudProfile,_0x432259,_0x46ee40['url'],_0x46ee40,_0x85346d,_0x4bd8e8);}catch(_0x47c374){console[_0x3a1edc(0x11f)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x432259+'\x22:\x20'+(_0xd8b84c[_0x3a1edc(0x124)](_0x47c374,Error)?_0x47c374['message']:_0xd8b84c[_0x3a1edc(0x14c)](String,_0x47c374))),process[_0x3a1edc(0x158)](0x1);}!_0x38875f&&process[_0x3a1edc(0x158)](0x1),await _0xd8b84c['tQwYk'](markActive,_0x432259);}
@@ -1 +1 @@
1
- (function(_0x24afb8,_0x23a363){const _0x2a96e2=_0x2e82,_0x2edadb=_0x24afb8();while(!![]){try{const _0xd385c2=-parseInt(_0x2a96e2(0x16b))/0x1+parseInt(_0x2a96e2(0x172))/0x2+parseInt(_0x2a96e2(0x17f))/0x3*(-parseInt(_0x2a96e2(0x16c))/0x4)+parseInt(_0x2a96e2(0x170))/0x5+parseInt(_0x2a96e2(0x174))/0x6*(-parseInt(_0x2a96e2(0x177))/0x7)+-parseInt(_0x2a96e2(0x178))/0x8+parseInt(_0x2a96e2(0x16d))/0x9*(parseInt(_0x2a96e2(0x176))/0xa);if(_0xd385c2===_0x23a363)break;else _0x2edadb['push'](_0x2edadb['shift']());}catch(_0x1b60a6){_0x2edadb['push'](_0x2edadb['shift']());}}}(_0x353d,0xd14a3));import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x353d(){const _0x5c1611=['\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','Profile\x20\x22','gphsK','.enc','187599NIBTCu','RMpNh','1608020WFvVAy','8cLlRWC','11565CqARLw','utf-8','auth.json','7236670nCLUKS','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','1711676enBOaP','HTGyI','3160662bcHBDo','xMRqb','21410OuClFo','21lNNbAC','7069512aFQFGF','log','No\x20auth.json\x20found\x20at\x20'];_0x353d=function(){return _0x5c1611;};return _0x353d();}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x2e82(_0x2550d4,_0x26ee1e){_0x2550d4=_0x2550d4-0x16a;const _0x353d87=_0x353d();let _0x2e825d=_0x353d87[_0x2550d4];return _0x2e825d;}import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x2b7b3d){const _0x3a835b=_0x2e82,_0x5ea5dc={'HTGyI':function(_0x515fbd,_0x5b7142){return _0x515fbd(_0x5b7142);},'RMpNh':function(_0x3dcaba,_0x33d9cb,_0x2a4a6d){return _0x3dcaba(_0x33d9cb,_0x2a4a6d);},'xMRqb':function(_0x17d50d,_0x3c162a){return _0x17d50d+_0x3c162a;},'aZmFs':_0x3a835b(0x17e),'FFPkb':function(_0x5e0c7c,_0x56dd3c){return _0x5e0c7c(_0x56dd3c);},'gphsK':function(_0x1da8c1){return _0x1da8c1();}},_0x6f8086=_0x5ea5dc[_0x3a835b(0x173)](getEnvDir,_0x2b7b3d),_0x4d80c0=_0x5ea5dc['RMpNh'](join,_0x6f8086,_0x3a835b(0x16f)),_0x2ef9e9=_0x5ea5dc[_0x3a835b(0x175)](_0x4d80c0,_0x5ea5dc['aZmFs']);if(!_0x5ea5dc['FFPkb'](existsSync,_0x6f8086))throw new Error(_0x3a835b(0x17c)+_0x2b7b3d+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2b7b3d);if(!_0x5ea5dc['FFPkb'](existsSync,_0x4d80c0))throw new Error(_0x3a835b(0x17a)+_0x4d80c0+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update');const _0x421d45=await _0x5ea5dc[_0x3a835b(0x17d)](getToken);if(!_0x421d45)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x30a758=await _0x5ea5dc[_0x3a835b(0x16a)](readFile,_0x4d80c0,_0x3a835b(0x16e)),_0x30c4b2=encrypt(_0x30a758,_0x421d45);await writeFile(_0x2ef9e9,_0x30c4b2),console['log']('\x0aโœ“\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x2ef9e9),console[_0x3a835b(0x179)]('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),existsSync(_0x2ef9e9)&&(console[_0x3a835b(0x179)](_0x3a835b(0x17b)),console['log'](_0x3a835b(0x171)));}
1
+ function _0x57d1(_0x234691,_0x1d4428){_0x234691=_0x234691-0x8b;var _0x4c4ed1=_0x4c4e();var _0x57d131=_0x4c4ed1[_0x234691];return _0x57d131;}function _0x4c4e(){var _0x4b64ce=['session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','JuGnZ','moovO','130422TGuYfg','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','76839JFIUBL','856mvOEGT','36ThKmLY','bYdOW','gPiQk','2gOATfC','10MKFVCK','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','748875UeKSoS','XaQzI','error','15985YUkIVP','\x20\x20https://docs.ranger.net/main/concepts/profiles','1294288VLgPkL','762797ojxicV','6598614rLOzXx'];_0x4c4e=function(){return _0x4b64ce;};return _0x4c4e();}(function(_0x8f446a,_0x19cc74){var _0x3277d6=_0x57d1,_0x5a68eb=_0x8f446a();while(!![]){try{var _0x1dae48=parseInt(_0x3277d6(0x91))/0x1+-parseInt(_0x3277d6(0x9d))/0x2*(-parseInt(_0x3277d6(0x8b))/0x3)+parseInt(_0x3277d6(0x99))/0x4*(-parseInt(_0x3277d6(0x8e))/0x5)+parseInt(_0x3277d6(0x96))/0x6+parseInt(_0x3277d6(0x98))/0x7+-parseInt(_0x3277d6(0x90))/0x8*(-parseInt(_0x3277d6(0x9a))/0x9)+parseInt(_0x3277d6(0x9e))/0xa*(-parseInt(_0x3277d6(0x92))/0xb);if(_0x1dae48===_0x19cc74)break;else _0x5a68eb['push'](_0x5a68eb['shift']());}catch(_0x22c4df){_0x5a68eb['push'](_0x5a68eb['shift']());}}}(_0x4c4e,0x63ab8));export async function authEncrypt(_0x1d713c){var _0x34bda7=_0x57d1,_0x5ca0ec={'XaQzI':function(_0x1c56db,_0x2df5ab){return _0x1c56db+_0x2df5ab;},'eMoLz':function(_0x34884c,_0x35f914){return _0x34884c+_0x35f914;},'gPiQk':function(_0x146e34,_0x271eed){return _0x146e34+_0x271eed;},'moovO':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','JuGnZ':_0x34bda7(0x93),'ZENVF':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','isLQE':_0x34bda7(0x9f),'bYdOW':_0x34bda7(0x97)};console[_0x34bda7(0x8d)](_0x5ca0ec[_0x34bda7(0x8c)](_0x5ca0ec['eMoLz'](_0x5ca0ec[_0x34bda7(0x9c)](_0x5ca0ec[_0x34bda7(0x95)],_0x5ca0ec[_0x34bda7(0x94)])+'\x0a',_0x5ca0ec['ZENVF']),_0x5ca0ec['isLQE'])+'\x0a'+_0x5ca0ec[_0x34bda7(0x9b)]+_0x34bda7(0x8f)),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x72e0b6=_0x1d8f;(function(_0x2c41de,_0x3710cd){const _0x94d5b2=_0x1d8f,_0x1ee0fa=_0x2c41de();while(!![]){try{const _0x10276=parseInt(_0x94d5b2(0xda))/0x1+parseInt(_0x94d5b2(0xe2))/0x2*(-parseInt(_0x94d5b2(0xdb))/0x3)+-parseInt(_0x94d5b2(0xcf))/0x4*(-parseInt(_0x94d5b2(0xcd))/0x5)+-parseInt(_0x94d5b2(0xfc))/0x6*(-parseInt(_0x94d5b2(0xce))/0x7)+parseInt(_0x94d5b2(0xfb))/0x8+-parseInt(_0x94d5b2(0xcc))/0x9+-parseInt(_0x94d5b2(0xd4))/0xa;if(_0x10276===_0x3710cd)break;else _0x1ee0fa['push'](_0x1ee0fa['shift']());}catch(_0x2d8380){_0x1ee0fa['push'](_0x1ee0fa['shift']());}}}(_0x1962,0xbbc72));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{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=['ranger',_0x72e0b6(0xee),_0x72e0b6(0xf4),_0x72e0b6(0xd8)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3b75d1){const _0x4cf505=_0x72e0b6,_0x416efb=_0x3b75d1['replace'](/\/\*[\s\S]*?\*\//g,''),_0x38ad0e=_0x416efb['replace'](/^\s*\/\/.*$/gm,''),_0x10c611=_0x38ad0e[_0x4cf505(0x100)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x10c611);}function _0x1d8f(_0x303a0f,_0x1a2a1a){_0x303a0f=_0x303a0f-0xcc;const _0x1962fd=_0x1962();let _0x1d8f03=_0x1962fd[_0x303a0f];return _0x1d8f03;}async function removeOpencodePluginConfig(_0x18791c){const _0x560d49=_0x72e0b6,_0x3c6460={'RFHkh':_0x560d49(0xe3),'jwSOT':function(_0x2bdb11,_0x19bdd8){return _0x2bdb11!==_0x19bdd8;},'axtRl':function(_0x4c0b99,_0x439b57,_0x3fe187){return _0x4c0b99(_0x439b57,_0x3fe187);},'LUiCW':_0x560d49(0xdc),'ntnpg':function(_0x1b9c7a,_0x32f35a){return _0x1b9c7a(_0x32f35a);}};if(!existsSync(_0x18791c))return![];let _0xb329b1;try{const _0x739fc0=await _0x3c6460['axtRl'](readFile,_0x18791c,_0x3c6460[_0x560d49(0xe9)]);_0xb329b1=_0x3c6460[_0x560d49(0xde)](parseJsonc,_0x739fc0);}catch{return![];}const _0x284d91=Array[_0x560d49(0xf9)](_0xb329b1[_0x560d49(0xe7)])?_0xb329b1[_0x560d49(0xe7)]:[];if(_0x284d91[_0x560d49(0xe0)]===0x0)return![];const _0x3b5f9d=_0x284d91[_0x560d49(0xe1)](_0x2926db=>{const _0x56d246=_0x560d49;if(typeof _0x2926db!==_0x3c6460[_0x56d246(0xd3)])return!![];return _0x3c6460[_0x56d246(0xf8)](_0x2926db,opencodePluginName);});if(_0x3b5f9d[_0x560d49(0xe0)]===_0x284d91['length'])return![];return _0x3b5f9d[_0x560d49(0xe0)]===0x0?delete _0xb329b1['plugin']:_0xb329b1['plugin']=_0x3b5f9d,await writeFile(_0x18791c,JSON['stringify'](_0xb329b1,null,0x2)+'\x0a'),!![];}function _0x1962(){const _0x5ddbe5=['ntnpg','user','length','filter','678090KUbbPf','string','Vhtpk','QKprD','IIJBj','plugin','RORfS','LUiCW','pipe','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','Nothing\x20to\x20clean\x20up.\x0a','remove','feature-tracker','close','HncfM','XfrLJ','platform','bxyKF','bug-bash','--scope','โœ“\x20Removed\x20project\x20skill:\x20','LaaeZ','jwSOT','isArray','win32','11850904OQfiJA','12HZAdHM','bBbUQ','zFSaT','ranger@trailhead','replace','jTvoF','3091743gHCWrp','369545TBVRhT','3682987olBvHD','32shbORi','log','KqztI','claude','RFHkh','16099300oMOPZH','PJDCS','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','trupo','e2e-test-recommender','aGPxc','614813cGAfhS','9IUoSBt','utf-8','error'];_0x1962=function(){return _0x5ddbe5;};return _0x1962();}async function uninstallClaudePlugin(_0x5b7da8){const _0x350e93=_0x72e0b6,_0x30aa8f={'BYaht':function(_0x4a8a67,_0x1e40b5,_0x6006ef,_0x356420){return _0x4a8a67(_0x1e40b5,_0x6006ef,_0x356420);},'aGPxc':_0x350e93(0xea),'KqztI':_0x350e93(0xfa)};return new Promise(_0x77a0d9=>{const _0x4b1e01=_0x350e93,_0x4b12e9=[_0x4b1e01(0xe7),'uninstall',_0x4b1e01(0xff)];_0x5b7da8&&_0x4b12e9['push'](_0x4b1e01(0xf5),_0x5b7da8);const _0x5b2914=_0x30aa8f['BYaht'](spawn,_0x4b1e01(0xd2),_0x4b12e9,{'stdio':_0x30aa8f[_0x4b1e01(0xd9)],'shell':process[_0x4b1e01(0xf2)]===_0x30aa8f[_0x4b1e01(0xd1)]});_0x5b2914['on'](_0x4b1e01(0xef),_0x141529=>{_0x77a0d9(_0x141529===0x0);}),_0x5b2914['on']('error',()=>{_0x77a0d9(![]);});});}async function removeMarketplace(){const _0x4cbff4=_0x72e0b6,_0x2361f6={'MqQuW':function(_0x2f42e8,_0x3daaef,_0x1e7164,_0x407121){return _0x2f42e8(_0x3daaef,_0x1e7164,_0x407121);},'WokRy':'plugin','zFSaT':'marketplace','tNzLX':'trailhead','IATOx':'pipe','KvMJY':_0x4cbff4(0xef),'IIJBj':_0x4cbff4(0xdd)};return new Promise(_0x1d1840=>{const _0x24968c=_0x4cbff4,_0x2683f4={'Ookil':function(_0x4c9ba1,_0x255091){return _0x4c9ba1(_0x255091);},'XfrLJ':function(_0x15e3bf,_0x3494db){return _0x15e3bf===_0x3494db;}},_0x164cdb=_0x2361f6['MqQuW'](spawn,_0x24968c(0xd2),[_0x2361f6['WokRy'],_0x2361f6[_0x24968c(0xfe)],_0x24968c(0xed),_0x2361f6['tNzLX']],{'stdio':_0x2361f6['IATOx'],'shell':process['platform']===_0x24968c(0xfa)});_0x164cdb['on'](_0x2361f6['KvMJY'],_0x236fa3=>{const _0x3f2915=_0x24968c;_0x2683f4['Ookil'](_0x1d1840,_0x2683f4[_0x3f2915(0xf1)](_0x236fa3,0x0));}),_0x164cdb['on'](_0x2361f6[_0x24968c(0xe6)],()=>{_0x2683f4['Ookil'](_0x1d1840,![]);});});}export async function clean(){const _0x218672=_0x72e0b6,_0x36632f={'EhFVM':'\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','trupo':'โœ“\x20Removed\x20stored\x20credentials','lvXSF':function(_0x4dc24f){return _0x4dc24f();},'jTvoF':function(_0x21f093){return _0x21f093();},'HncfM':function(_0x3ae8d3,_0x597bb6){return _0x3ae8d3(_0x597bb6);},'ayiFv':function(_0xedbdf5,_0x338e5a,_0x2cbdd2){return _0xedbdf5(_0x338e5a,_0x2cbdd2);},'QKprD':function(_0x23fd77,_0x5e2e0f){return _0x23fd77(_0x5e2e0f);},'Vhtpk':'project','LaaeZ':function(_0x405faa,_0x50e140,_0x46eae9){return _0x405faa(_0x50e140,_0x46eae9);},'bxyKF':_0x218672(0xdf),'PJDCS':function(_0x166a95,_0x4e569a,_0x3a87cb){return _0x166a95(_0x4e569a,_0x3a87cb);},'FIqoZ':function(_0x31a5a9,_0x1d6567){return _0x31a5a9(_0x1d6567);},'bcYBi':'โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','bBbUQ':function(_0x59eccb){return _0x59eccb();},'PIFIE':'\x0aโœ…\x20Cleanup\x20complete!\x0a','RORfS':_0x218672(0xec)};console['log'](_0x36632f['EhFVM']);let _0x2d447b=![];try{await deleteAllCredentials(),console[_0x218672(0xd0)](_0x36632f[_0x218672(0xd7)]),_0x2d447b=!![];}catch{}const _0x1bf4b6=_0x36632f['lvXSF'](getCacheFile);existsSync(_0x1bf4b6)&&(await rm(_0x1bf4b6),_0x2d447b=!![]);const _0x107269=_0x36632f[_0x218672(0x101)](getRangerDir);_0x36632f[_0x218672(0xf0)](existsSync,_0x107269)&&(await rm(_0x107269,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20.ranger/\x20directory'),_0x2d447b=!![]);const _0x3725ca=getProjectSkillsDir();for(const _0x5ac2ce of skillsToRemove){const _0x374ff9=_0x36632f['ayiFv'](join,_0x3725ca,_0x5ac2ce);_0x36632f[_0x218672(0xe5)](existsSync,_0x374ff9)&&(await rm(_0x374ff9,{'recursive':!![]}),console[_0x218672(0xd0)](_0x218672(0xf6)+_0x5ac2ce),_0x2d447b=!![]);}const _0x1500c2=_0x36632f['jTvoF'](getUserSkillsDir);for(const _0x4d86c6 of skillsToRemove){const _0x4ea15c=_0x36632f['ayiFv'](join,_0x1500c2,_0x4d86c6);existsSync(_0x4ea15c)&&(await rm(_0x4ea15c,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20user\x20skill:\x20'+_0x4d86c6),_0x2d447b=!![]);}const _0x564590=getOpencodeSkillsDir(_0x36632f[_0x218672(0xe4)]);for(const _0x581c1a of skillsToRemove){const _0x53f7e2=_0x36632f[_0x218672(0xf7)](join,_0x564590,_0x581c1a);_0x36632f['HncfM'](existsSync,_0x53f7e2)&&(await _0x36632f[_0x218672(0xf7)](rm,_0x53f7e2,{'recursive':!![]}),console[_0x218672(0xd0)]('โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x581c1a),_0x2d447b=!![]);}const _0x3d7d48=getOpencodeSkillsDir(_0x36632f[_0x218672(0xf3)]);for(const _0x1f27bc of skillsToRemove){const _0x2a5c55=join(_0x3d7d48,_0x1f27bc);existsSync(_0x2a5c55)&&(await rm(_0x2a5c55,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x1f27bc),_0x2d447b=!![]);}const _0x34a026=_0x36632f[_0x218672(0xd5)](join,_0x36632f['QKprD'](getOpencodeConfigDir,_0x36632f[_0x218672(0xe4)]),'opencode.json');await _0x36632f['FIqoZ'](removeOpencodePluginConfig,_0x34a026)&&(console['log'](_0x36632f['bcYBi']),_0x2d447b=!![]);const _0x5bf7d6=join(_0x36632f[_0x218672(0xf0)](getOpencodeConfigDir,_0x36632f[_0x218672(0xf3)]),'opencode.json');await removeOpencodePluginConfig(_0x5bf7d6)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x2d447b=!![]);const _0x4adf0d=await _0x36632f[_0x218672(0xfd)](uninstallClaudePlugin);_0x4adf0d&&(console['log'](_0x218672(0xd6)),_0x2d447b=!![]);const _0x328b05=await _0x36632f[_0x218672(0xf0)](uninstallClaudePlugin,_0x36632f[_0x218672(0xe4)]);_0x328b05&&(console[_0x218672(0xd0)](_0x218672(0xeb)),_0x2d447b=!![]);const _0x125301=await _0x36632f[_0x218672(0xfd)](removeMarketplace);_0x125301&&(console[_0x218672(0xd0)]('โœ“\x20Removed\x20trailhead\x20marketplace'),_0x2d447b=!![]),_0x2d447b?console[_0x218672(0xd0)](_0x36632f['PIFIE']):console['log'](_0x36632f[_0x218672(0xe8)]);}
1
+ const _0x545790=_0x37de;(function(_0x4757a8,_0x4a7d05){const _0x811e1a=_0x37de,_0x5de5ef=_0x4757a8();while(!![]){try{const _0x19cb80=-parseInt(_0x811e1a(0x21b))/0x1+-parseInt(_0x811e1a(0x213))/0x2+-parseInt(_0x811e1a(0x220))/0x3+-parseInt(_0x811e1a(0x219))/0x4+-parseInt(_0x811e1a(0x21c))/0x5*(-parseInt(_0x811e1a(0x1ef))/0x6)+parseInt(_0x811e1a(0x20c))/0x7*(parseInt(_0x811e1a(0x20f))/0x8)+-parseInt(_0x811e1a(0x208))/0x9*(-parseInt(_0x811e1a(0x201))/0xa);if(_0x19cb80===_0x4a7d05)break;else _0x5de5ef['push'](_0x5de5ef['shift']());}catch(_0x178d43){_0x5de5ef['push'](_0x5de5ef['shift']());}}}(_0x38bd,0xa78fa));function _0x37de(_0x3b132f,_0x1c9823){_0x3b132f=_0x3b132f-0x1ee;const _0x38bdba=_0x38bd();let _0x37dec5=_0x38bdba[_0x3b132f];return _0x37dec5;}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';function _0x38bd(){const _0x39bca8=['7vGDpbL','ignore','filter','1654312GFnfWA','DRweM','yFmsu','okvNQ','1933826YPKyMq','utf-8','length','trailhead','log','platform','5423156jbrcep','JPBjv','196158LBKSrp','20oHLHXS','error','cSaxn','whLbO','670044RHJHJz','yUPUw','remove','214218WneNhw','isArray','user','VQlJs','RCiGT','โœ“\x20Removed\x20user\x20skill:\x20','win32','kbkRm','dnOwg','plugin','claude','IIYxi','CXmjz','project','โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20','bug-bash','marketplace','cKFTv','3830AGQbNE','Qdfod','โœ“\x20Removed\x20trailhead\x20marketplace','DvQeu','parse','GGOeK','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','72351sLTqsN','ranger','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','close'];_0x38bd=function(){return _0x39bca8;};return _0x38bd();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x545790(0x209),'feature-tracker',_0x545790(0x1fe),'e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3765e1){const _0x2efc38=_0x545790,_0x31f713=_0x3765e1['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2445d7=_0x31f713['replace'](/^\s*\/\/.*$/gm,''),_0x455348=_0x2445d7['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x2efc38(0x205)](_0x455348);}async function removeOpencodePluginConfig(_0x4d41d1){const _0x517d84=_0x545790,_0x4969bf={'UVKav':function(_0x1ec143,_0x4a8817){return _0x1ec143!==_0x4a8817;},'Ujnyf':_0x517d84(0x214),'ASEDd':function(_0x4270c6,_0x4b9f9c){return _0x4270c6===_0x4b9f9c;},'HFcYL':function(_0x33b418,_0x3a09eb,_0x16aadc){return _0x33b418(_0x3a09eb,_0x16aadc);}};if(!existsSync(_0x4d41d1))return![];let _0x18eb6e;try{const _0x12fd50=await readFile(_0x4d41d1,_0x4969bf['Ujnyf']);_0x18eb6e=parseJsonc(_0x12fd50);}catch{return![];}const _0x62b72d=Array[_0x517d84(0x1f0)](_0x18eb6e['plugin'])?_0x18eb6e[_0x517d84(0x1f8)]:[];if(_0x62b72d[_0x517d84(0x215)]===0x0)return![];const _0x3fa391=_0x62b72d[_0x517d84(0x20e)](_0x2b4a18=>{if(_0x4969bf['UVKav'](typeof _0x2b4a18,'string'))return!![];return _0x4969bf['UVKav'](_0x2b4a18,opencodePluginName);});if(_0x4969bf['ASEDd'](_0x3fa391[_0x517d84(0x215)],_0x62b72d[_0x517d84(0x215)]))return![];return _0x3fa391[_0x517d84(0x215)]===0x0?delete _0x18eb6e['plugin']:_0x18eb6e[_0x517d84(0x1f8)]=_0x3fa391,await _0x4969bf['HFcYL'](writeFile,_0x4d41d1,JSON['stringify'](_0x18eb6e,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x328293){const _0x1c67f9=_0x545790,_0x54453c={'hKsXx':function(_0x52ced7,_0x4004ee){return _0x52ced7===_0x4004ee;},'HKqsz':function(_0x569c79,_0x30431a){return _0x569c79(_0x30431a);},'ZjAZR':'plugin','yUPUw':function(_0x54d752,_0x4436dd,_0x1cc7c6,_0x129cd3){return _0x54d752(_0x4436dd,_0x1cc7c6,_0x129cd3);},'DvQeu':'ignore','vcwAM':function(_0x135caf){return _0x135caf();},'VdXnw':_0x1c67f9(0x21d)};return new Promise(_0x4f4789=>{const _0x4dc77d=_0x1c67f9,_0xbd127f=[_0x54453c['ZjAZR'],'uninstall','ranger@trailhead'];_0x328293&&_0xbd127f['push']('--scope',_0x328293);const _0xfa9627=_0x54453c[_0x4dc77d(0x221)](spawn,'claude',_0xbd127f,{'stdio':[_0x54453c[_0x4dc77d(0x204)],_0x54453c[_0x4dc77d(0x204)],_0x54453c['DvQeu']],'cwd':_0x328293?_0x54453c['vcwAM'](getProjectRoot):undefined,'shell':process[_0x4dc77d(0x218)]===_0x4dc77d(0x1f5)});_0xfa9627['on'](_0x4dc77d(0x20b),_0x141b78=>{_0x4f4789(_0x54453c['hKsXx'](_0x141b78,0x0));}),_0xfa9627['on'](_0x54453c['VdXnw'],()=>{_0x54453c['HKqsz'](_0x4f4789,![]);});});}async function removeMarketplace(){const _0x45942f=_0x545790,_0x4ab2ad={'CXmjz':function(_0x4fbe8c,_0x225f63){return _0x4fbe8c(_0x225f63);},'cSaxn':_0x45942f(0x1f9),'Qdfod':_0x45942f(0x20d),'kbkRm':_0x45942f(0x1f5),'sOoQN':_0x45942f(0x21d)};return new Promise(_0x9155f4=>{const _0x52f846=_0x45942f,_0x3a34f2={'lcvUX':function(_0x380e0d,_0x1ae10f){const _0x54e33a=_0x37de;return _0x4ab2ad[_0x54e33a(0x1fb)](_0x380e0d,_0x1ae10f);}},_0x130647=spawn(_0x4ab2ad[_0x52f846(0x21e)],['plugin',_0x52f846(0x1ff),_0x52f846(0x1ee),_0x52f846(0x216)],{'stdio':[_0x4ab2ad[_0x52f846(0x202)],_0x4ab2ad['Qdfod'],_0x52f846(0x20d)],'shell':process['platform']===_0x4ab2ad[_0x52f846(0x1f6)]});_0x130647['on'](_0x52f846(0x20b),_0x358683=>{_0x9155f4(_0x358683===0x0);}),_0x130647['on'](_0x4ab2ad['sOoQN'],()=>{_0x3a34f2['lcvUX'](_0x9155f4,![]);});});}export async function clean(){const _0x46fd82=_0x545790,_0x1ebb5a={'IIYxi':function(_0x39680f){return _0x39680f();},'okvNQ':function(_0x13eee5){return _0x13eee5();},'yFmsu':function(_0x38ce5e,_0xb17200){return _0x38ce5e(_0xb17200);},'cLHvr':function(_0x47ad3e){return _0x47ad3e();},'VQlJs':function(_0x39daf7,_0x45a299,_0x22afff){return _0x39daf7(_0x45a299,_0x22afff);},'JPBjv':_0x46fd82(0x1f1),'dnOwg':function(_0x138f3e,_0x34e795){return _0x138f3e(_0x34e795);},'whLbO':function(_0x589e49,_0x303316,_0x485a66){return _0x589e49(_0x303316,_0x485a66);},'cKFTv':_0x46fd82(0x1fc),'OeuUd':'opencode.json','RCiGT':_0x46fd82(0x20a),'DRweM':function(_0x2724c6){return _0x2724c6();},'GGOeK':_0x46fd82(0x203),'SOCAh':'Nothing\x20to\x20clean\x20up.\x0a'};console['log']('\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x57c61f=![];try{await _0x1ebb5a[_0x46fd82(0x1fa)](deleteAllCredentials),console[_0x46fd82(0x217)]('โœ“\x20Removed\x20stored\x20credentials'),_0x57c61f=!![];}catch{}const _0x2b8a3f=_0x1ebb5a[_0x46fd82(0x212)](getCacheFile);_0x1ebb5a[_0x46fd82(0x211)](existsSync,_0x2b8a3f)&&(await rm(_0x2b8a3f),_0x57c61f=!![]);const _0x22c4de=_0x1ebb5a['cLHvr'](getRangerDir);_0x1ebb5a['yFmsu'](existsSync,_0x22c4de)&&(await _0x1ebb5a[_0x46fd82(0x1f2)](rm,_0x22c4de,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20.ranger/\x20directory'),_0x57c61f=!![]);const _0x5d8aaf=_0x1ebb5a[_0x46fd82(0x212)](getProjectSkillsDir);for(const _0x218b95 of skillsToRemove){const _0x3b79fd=join(_0x5d8aaf,_0x218b95);_0x1ebb5a[_0x46fd82(0x211)](existsSync,_0x3b79fd)&&(await rm(_0x3b79fd,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20project\x20skill:\x20'+_0x218b95),_0x57c61f=!![]);}const _0x4c5aa9=getUserSkillsDir();for(const _0x14c061 of skillsToRemove){const _0x1ea208=join(_0x4c5aa9,_0x14c061);existsSync(_0x1ea208)&&(await rm(_0x1ea208,{'recursive':!![]}),console[_0x46fd82(0x217)](_0x46fd82(0x1f4)+_0x14c061),_0x57c61f=!![]);}const _0x1cfad1=getOpencodeSkillsDir('project');for(const _0x349ee2 of skillsToRemove){const _0x997d2d=_0x1ebb5a[_0x46fd82(0x1f2)](join,_0x1cfad1,_0x349ee2);existsSync(_0x997d2d)&&(await rm(_0x997d2d,{'recursive':!![]}),console['log'](_0x46fd82(0x1fd)+_0x349ee2),_0x57c61f=!![]);}const _0x153572=getOpencodeSkillsDir(_0x1ebb5a[_0x46fd82(0x21a)]);for(const _0x46b5bc of skillsToRemove){const _0x39486c=join(_0x153572,_0x46b5bc);_0x1ebb5a['dnOwg'](existsSync,_0x39486c)&&(await _0x1ebb5a[_0x46fd82(0x21f)](rm,_0x39486c,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x46b5bc),_0x57c61f=!![]);}const _0x555437=join(getOpencodeConfigDir(_0x1ebb5a[_0x46fd82(0x200)]),'opencode.json');await removeOpencodePluginConfig(_0x555437)&&(console[_0x46fd82(0x217)]('โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x57c61f=!![]);const _0x335348=_0x1ebb5a[_0x46fd82(0x21f)](join,getOpencodeConfigDir(_0x1ebb5a[_0x46fd82(0x21a)]),_0x1ebb5a['OeuUd']);await _0x1ebb5a['yFmsu'](removeOpencodePluginConfig,_0x335348)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x57c61f=!![]);const _0x4c56f0=await uninstallClaudePlugin();_0x4c56f0&&(console['log'](_0x46fd82(0x207)),_0x57c61f=!![]);const _0x296f48=await _0x1ebb5a[_0x46fd82(0x1f7)](uninstallClaudePlugin,_0x46fd82(0x1fc));_0x296f48&&(console[_0x46fd82(0x217)](_0x1ebb5a[_0x46fd82(0x1f3)]),_0x57c61f=!![]);const _0x3683db=await _0x1ebb5a[_0x46fd82(0x210)](removeMarketplace);_0x3683db&&(console['log'](_0x1ebb5a[_0x46fd82(0x206)]),_0x57c61f=!![]),_0x57c61f?console['log']('\x0aโœ…\x20Cleanup\x20complete!\x0a'):console[_0x46fd82(0x217)](_0x1ebb5a['SOCAh']);}
@@ -1 +1 @@
1
- const _0x59fecd=_0x43c2;(function(_0x3268d6,_0x176c1a){const _0xcc867c=_0x43c2,_0x405b89=_0x3268d6();while(!![]){try{const _0x39b801=parseInt(_0xcc867c(0x17c))/0x1*(-parseInt(_0xcc867c(0x19d))/0x2)+parseInt(_0xcc867c(0x18d))/0x3*(parseInt(_0xcc867c(0x189))/0x4)+parseInt(_0xcc867c(0x18f))/0x5*(-parseInt(_0xcc867c(0x194))/0x6)+parseInt(_0xcc867c(0x17a))/0x7+parseInt(_0xcc867c(0x1a0))/0x8*(-parseInt(_0xcc867c(0x182))/0x9)+-parseInt(_0xcc867c(0x197))/0xa+-parseInt(_0xcc867c(0x192))/0xb*(-parseInt(_0xcc867c(0x17b))/0xc);if(_0x39b801===_0x176c1a)break;else _0x405b89['push'](_0x405b89['shift']());}catch(_0x52b56a){_0x405b89['push'](_0x405b89['shift']());}}}(_0x311b,0xb343a));function _0x43c2(_0x467eba,_0x493ec4){_0x467eba=_0x467eba-0x16b;const _0x311bfb=_0x311b();let _0x43c282=_0x311bfb[_0x467eba];return _0x43c282;}import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,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=[_0x59fecd(0x183),'allowInsecureLocalhost'];function parseLocalValue(_0x4a854a,_0x183b91){const _0x12d004=_0x59fecd,_0x3e3f92={'phjFm':'true'};if(BOOLEAN_KEYS[_0x12d004(0x186)](_0x4a854a)){if(_0x183b91===_0x3e3f92[_0x12d004(0x193)])return!![];if(_0x183b91==='false')return![];throw new Error(_0x12d004(0x172)+_0x4a854a+_0x12d004(0x170));}return _0x183b91;}function _0x311b(){const _0x591261=['log','parse','3504174MxBNnf','alsoExistsElsewhere','25OGzqBr','test','xUlgl','5500583mwdghC','phjFm','775218xuAzcT','object','CtbFp','6785210XOabnn','vmZZW','startsWith','QldwA','YoYqF','\x20for\x20\x22','102670sCAAdt','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x20\x20Note:\x20\x22','8gecNXA','Removed\x20','YeMIR','GtnEx','syfVF','DTOLO','trim','GUULA','Cleared\x20local\x20overrides\x20for\x20\x22','local','cloud','Set\x20',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','xdZuC','Invalid\x20value\x20for\x20','true','null','keys','cvJBq','endsWith','Key\x20\x22','(not\x20set)','10268734hJMWwe','12Thmmvq','14TDZQXQ','kind','aqAva','NASsw','\x22\x20not\x20found','stringify','3218229VSwMRA','headless','LFich','undefined','includes','isNaN','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','4tDtpqk','\x20=\x20'];_0x311b=function(){return _0x591261;};return _0x311b();}function parseOverrideValue(_0x5e61f0){const _0x4ace18=_0x59fecd,_0x1460f3={'umuHs':function(_0x505922,_0x120726){return _0x505922===_0x120726;},'GUULA':_0x4ace18(0x185)};if(_0x5e61f0===_0x4ace18(0x173))return!![];if(_0x1460f3['umuHs'](_0x5e61f0,'false'))return![];if(_0x1460f3['umuHs'](_0x5e61f0,_0x4ace18(0x174)))return null;if(_0x5e61f0===_0x1460f3[_0x4ace18(0x16b)])return undefined;if(/^-?\d+$/['test'](_0x5e61f0)){const _0x423784=Number(_0x5e61f0);if(Number['isSafeInteger'](_0x423784))return _0x423784;}if(/^-?\d+\.\d+$/[_0x4ace18(0x190)](_0x5e61f0)){const _0x389d68=Number(_0x5e61f0);if(!Number[_0x4ace18(0x187)](_0x389d68))return _0x389d68;}const _0x40e622=_0x5e61f0[_0x4ace18(0x1a6)]();if(_0x40e622[_0x4ace18(0x199)]('{')&&_0x40e622[_0x4ace18(0x177)]('}')||_0x40e622[_0x4ace18(0x199)]('[')&&_0x40e622[_0x4ace18(0x177)](']'))try{return JSON[_0x4ace18(0x18c)](_0x40e622);}catch{}return _0x5e61f0;}async function resolveProfileTarget(_0x273a00){const _0x1a1434=_0x59fecd,_0x1cc261={'syfVF':function(_0x4569e4,_0x4bcaf4){return _0x4569e4(_0x4bcaf4);},'vObzw':function(_0x2e2ecd,_0x516448){return _0x2e2ecd(_0x516448);},'jZWVJ':function(_0x1a71a1,_0x167309){return _0x1a71a1(_0x167309);}},_0x93490d=_0x1cc261[_0x1a1434(0x1a4)](existsSync,getEnvDir(_0x273a00));let _0xf3fad7=![];try{const _0x529baf=await _0x1cc261['vObzw'](fetchCloudProfile,_0x273a00);_0xf3fad7=_0x1cc261['jZWVJ'](Boolean,_0x529baf);}catch{}if(_0xf3fad7)return{'kind':'cloud','alsoExistsElsewhere':_0x93490d};if(_0x93490d)return{'kind':_0x1a1434(0x16d),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x273a00+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x273a00);}function printDualExistsHint(_0x8043be){const _0x38bab3=_0x59fecd;console[_0x38bab3(0x18b)](_0x38bab3(0x19f)+_0x8043be+_0x38bab3(0x188));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x5af29e){const _0x360a4d=_0x59fecd,_0x560efc={'iFRSF':function(_0x2fe962,_0x2521c4){return _0x2fe962(_0x2521c4);},'TKFnK':function(_0x107fc8,_0x2116e0,_0x242738){return _0x107fc8(_0x2116e0,_0x242738);},'QldwA':function(_0x4797d3,_0x352315){return _0x4797d3??_0x352315;}},_0x1260e2=await _0x560efc['iFRSF'](fetchCloudProfile,_0x5af29e),_0x76472b=readProfileOverrides(getProjectPath(),_0x5af29e);return _0x560efc['TKFnK'](mergeCloudProfileSettings,_0x1260e2?.['settings']??{},_0x560efc[_0x360a4d(0x19a)](_0x76472b,undefined));}export async function configSet(_0x110e99,_0x407fee,_0x5a136f){const _0x145e79=_0x59fecd,_0x1fb1a3={'vmZZW':function(_0xbd3c7d,_0x3222c5){return _0xbd3c7d(_0x3222c5);},'GtnEx':function(_0x4031de){return _0x4031de();},'Xxfie':function(_0x3bd81b,_0x25990d,_0x4f2873){return _0x3bd81b(_0x25990d,_0x4f2873);},'BCEUX':function(_0xf41f37,_0x29ba26,_0x3a35c0,_0x118ee0){return _0xf41f37(_0x29ba26,_0x3a35c0,_0x118ee0);},'xdZuC':function(_0x37b0c6,_0xe12ba2,_0x3c156d){return _0x37b0c6(_0xe12ba2,_0x3c156d);}},_0xfef237=await _0x1fb1a3['vmZZW'](resolveProfileTarget,_0x110e99);if(_0xfef237[_0x145e79(0x17d)]==='cloud'){if(_0xfef237[_0x145e79(0x18e)])printDualExistsHint(_0x110e99);const _0x242c5f=_0x1fb1a3['vmZZW'](parseOverrideValue,_0x5a136f);setProfileOverride(_0x1fb1a3[_0x145e79(0x1a3)](getProjectPath),_0x110e99,_0x407fee,_0x242c5f),console[_0x145e79(0x18b)](_0x145e79(0x16f)+_0x407fee+_0x145e79(0x18a)+JSON[_0x145e79(0x181)](_0x242c5f)+_0x145e79(0x19c)+_0x110e99+'\x22');return;}const _0x3d518f=await _0x1fb1a3[_0x145e79(0x198)](loadSettings,_0x110e99),_0x544a96=_0x1fb1a3['Xxfie'](parseLocalValue,_0x407fee,_0x5a136f);_0x1fb1a3['BCEUX'](setNestedValue,_0x3d518f,_0x407fee,_0x544a96),await _0x1fb1a3[_0x145e79(0x171)](saveSettings,_0x110e99,_0x3d518f),console[_0x145e79(0x18b)](_0x145e79(0x16f)+_0x407fee+'\x20=\x20'+_0x544a96+_0x145e79(0x19c)+_0x110e99+'\x22');}export async function configGet(_0x39b507,_0x2950ba){const _0x212103=_0x59fecd,_0x865ac0={'YeMIR':function(_0x4a40b6,_0x437abc){return _0x4a40b6(_0x437abc);},'bRNlu':'cloud','hmMvK':function(_0x1aeb93,_0x4c6213,_0x21ae71){return _0x1aeb93(_0x4c6213,_0x21ae71);},'xUlgl':function(_0x825c3b,_0x48626c){return _0x825c3b===_0x48626c;},'NIKnk':function(_0x488c7c,_0x41660f){return _0x488c7c(_0x41660f);},'LFich':function(_0x113b69,_0x38dacf){return _0x113b69===_0x38dacf;}},_0x27943f=await _0x865ac0[_0x212103(0x1a2)](resolveProfileTarget,_0x39b507);if(_0x27943f['kind']===_0x865ac0['bRNlu']){const _0x5dbdc5=await loadEffectiveCloudSettings(_0x39b507),_0x65caa3=_0x865ac0['hmMvK'](getNestedValue,_0x5dbdc5,_0x2950ba);if(_0x865ac0['xUlgl'](_0x65caa3,undefined))console[_0x212103(0x18b)]('(not\x20set)');else _0x865ac0[_0x212103(0x191)](typeof _0x65caa3,_0x212103(0x195))?console['log'](JSON[_0x212103(0x181)](_0x65caa3,null,0x2)):console[_0x212103(0x18b)](_0x65caa3);return;}const _0x49d37c=await _0x865ac0['NIKnk'](loadSettings,_0x39b507),_0x51af4c=getNestedValue(_0x49d37c,_0x2950ba);if(_0x51af4c===undefined)console[_0x212103(0x18b)](_0x212103(0x179));else _0x865ac0[_0x212103(0x184)](typeof _0x51af4c,'object')?console[_0x212103(0x18b)](JSON['stringify'](_0x51af4c,null,0x2)):console[_0x212103(0x18b)](_0x51af4c);}export async function configList(_0x141e26){const _0x3a88ea=_0x59fecd,_0x5b1f21={'CtbFp':function(_0x2b07a8,_0x2beda6){return _0x2b07a8===_0x2beda6;},'aqAva':'cloud','YoYqF':function(_0x2743c8,_0x4c42fd){return _0x2743c8(_0x4c42fd);}},_0x4afa20=await resolveProfileTarget(_0x141e26);if(_0x5b1f21[_0x3a88ea(0x196)](_0x4afa20['kind'],_0x5b1f21[_0x3a88ea(0x17e)])){const _0x36c057=await loadEffectiveCloudSettings(_0x141e26);if(!_0x36c057||_0x5b1f21[_0x3a88ea(0x196)](Object[_0x3a88ea(0x175)](_0x36c057)['length'],0x0)){console[_0x3a88ea(0x18b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x141e26+'\x22');return;}console['log'](JSON[_0x3a88ea(0x181)](_0x36c057,null,0x2));return;}const _0x5a6070=getSettingsPath(_0x141e26);if(!existsSync(_0x5a6070)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x141e26+'\x22');return;}const _0xdc1222=await _0x5b1f21[_0x3a88ea(0x19b)](loadSettings,_0x141e26),_0x25d906=formatSettings(_0xdc1222);!_0x25d906?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x141e26+'\x22'):console[_0x3a88ea(0x18b)](_0x25d906);}export async function configUnset(_0x5de4e1,_0x13eb66){const _0x3f5875=_0x59fecd,_0x416ab0={'gOBrW':function(_0x58a4c4,_0x53faf9){return _0x58a4c4(_0x53faf9);},'cvJBq':function(_0x5c033d,_0x25469a){return _0x5c033d===_0x25469a;}},_0x51337d=await _0x416ab0['gOBrW'](resolveProfileTarget,_0x5de4e1);if(_0x416ab0[_0x3f5875(0x176)](_0x51337d[_0x3f5875(0x17d)],'cloud')){if(_0x51337d['alsoExistsElsewhere'])printDualExistsHint(_0x5de4e1);const _0x483336=unsetProfileOverride(getProjectPath(),_0x5de4e1,_0x13eb66);_0x483336?console[_0x3f5875(0x18b)]('Removed\x20'+_0x13eb66+_0x3f5875(0x19c)+_0x5de4e1+'\x22'):console[_0x3f5875(0x18b)](_0x3f5875(0x178)+_0x13eb66+_0x3f5875(0x180));return;}const _0x13654d=await loadSettings(_0x5de4e1),_0xbea227=deleteNestedValue(_0x13654d,_0x13eb66);_0xbea227?(await saveSettings(_0x5de4e1,_0x13654d),console['log'](_0x3f5875(0x1a1)+_0x13eb66)):console['log'](_0x3f5875(0x178)+_0x13eb66+_0x3f5875(0x180));}export async function configReset(_0x5c8921){const _0x26a0a6=_0x59fecd,_0x536804={'DTOLO':function(_0x3cbb9a,_0x4feca5){return _0x3cbb9a(_0x4feca5);},'RCRiT':function(_0x5a8d8b,_0x26aeaa){return _0x5a8d8b===_0x26aeaa;},'NASsw':function(_0x1f823b,_0x5e5350,_0x5da2bf){return _0x1f823b(_0x5e5350,_0x5da2bf);}},_0xfc2378=await _0x536804[_0x26a0a6(0x1a5)](resolveProfileTarget,_0x5c8921);if(_0x536804['RCRiT'](_0xfc2378[_0x26a0a6(0x17d)],_0x26a0a6(0x16e))){_0x536804[_0x26a0a6(0x17f)](resetProfileOverrides,getProjectPath(),_0x5c8921),console[_0x26a0a6(0x18b)](_0x26a0a6(0x16c)+_0x5c8921+'\x22');return;}console['log']('\x22'+_0x5c8921+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5c8921+_0x26a0a6(0x19e));}
1
+ const _0x1f894a=_0x4dc1;(function(_0x11f4fe,_0x5c84ea){const _0x367fec=_0x4dc1,_0x43923f=_0x11f4fe();while(!![]){try{const _0x5282fb=-parseInt(_0x367fec(0xec))/0x1+parseInt(_0x367fec(0xee))/0x2+-parseInt(_0x367fec(0xc3))/0x3*(-parseInt(_0x367fec(0xdb))/0x4)+-parseInt(_0x367fec(0xd1))/0x5+-parseInt(_0x367fec(0xde))/0x6+parseInt(_0x367fec(0xc9))/0x7*(parseInt(_0x367fec(0xbf))/0x8)+parseInt(_0x367fec(0xc0))/0x9;if(_0x5282fb===_0x5c84ea)break;else _0x43923f['push'](_0x43923f['shift']());}catch(_0x1fa7c8){_0x43923f['push'](_0x43923f['shift']());}}}(_0x45fa,0x80662));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';function _0x4dc1(_0x2f2520,_0x60777f){_0x2f2520=_0x2f2520-0xbc;const _0x45fa13=_0x45fa();let _0x4dc15f=_0x45fa13[_0x2f2520];return _0x4dc15f;}import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x1f894a(0xd4),_0x1f894a(0xe7)];function parseLocalValue(_0x4fec8f,_0x1895f3){const _0x372289=_0x1f894a,_0x5aed22={'SxWOm':function(_0x4a65a8,_0x312ce6){return _0x4a65a8===_0x312ce6;}};if(BOOLEAN_KEYS['includes'](_0x4fec8f)){if(_0x5aed22[_0x372289(0xbe)](_0x1895f3,_0x372289(0xdd)))return!![];if(_0x1895f3==='false')return![];throw new Error('Invalid\x20value\x20for\x20'+_0x4fec8f+_0x372289(0xd2));}return _0x1895f3;}function parseOverrideValue(_0x3c703d){const _0x1f4eae=_0x1f894a,_0x1104f8={'niSKn':_0x1f4eae(0xdd),'UiseM':function(_0x1240f5,_0x3fb2f8){return _0x1240f5===_0x3fb2f8;},'yFYCH':_0x1f4eae(0xe1),'vjspQ':_0x1f4eae(0xc6),'dUdzC':function(_0x4c3540,_0x126335){return _0x4c3540(_0x126335);}};if(_0x3c703d===_0x1104f8[_0x1f4eae(0xca)])return!![];if(_0x1104f8[_0x1f4eae(0xef)](_0x3c703d,_0x1104f8['yFYCH']))return![];if(_0x3c703d===_0x1104f8['vjspQ'])return null;if(_0x3c703d===_0x1f4eae(0xd9))return undefined;if(/^-?\d+$/['test'](_0x3c703d)){const _0x147579=Number(_0x3c703d);if(Number['isSafeInteger'](_0x147579))return _0x147579;}if(/^-?\d+\.\d+$/['test'](_0x3c703d)){const _0x111ec0=_0x1104f8[_0x1f4eae(0xc7)](Number,_0x3c703d);if(!Number['isNaN'](_0x111ec0))return _0x111ec0;}const _0x1b81df=_0x3c703d[_0x1f4eae(0xd8)]();if(_0x1b81df[_0x1f4eae(0xda)]('{')&&_0x1b81df[_0x1f4eae(0xf2)]('}')||_0x1b81df[_0x1f4eae(0xda)]('[')&&_0x1b81df[_0x1f4eae(0xf2)](']'))try{return JSON['parse'](_0x1b81df);}catch{}return _0x3c703d;}async function resolveProfileTarget(_0x7b0547){const _0x4f650a={'uJMDs':function(_0x46957b,_0x2dd0b6){return _0x46957b(_0x2dd0b6);},'JFTuH':function(_0x4b1eea,_0x26ad87){return _0x4b1eea(_0x26ad87);},'ZlDbR':function(_0x50daed,_0x2bed96){return _0x50daed(_0x2bed96);},'VHuri':'cloud'},_0x4b7e67=_0x4f650a['uJMDs'](existsSync,_0x4f650a['uJMDs'](getEnvDir,_0x7b0547));let _0x233576=![];try{const _0x544697=await _0x4f650a['JFTuH'](fetchCloudProfile,_0x7b0547);_0x233576=_0x4f650a['ZlDbR'](Boolean,_0x544697);}catch{}if(_0x233576)return{'kind':_0x4f650a['VHuri'],'alsoExistsElsewhere':_0x4b7e67};if(_0x4b7e67)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x7b0547+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x7b0547);}function printDualExistsHint(_0x18e1dc){const _0x20a268=_0x1f894a;console[_0x20a268(0xea)]('\x20\x20Note:\x20\x22'+_0x18e1dc+_0x20a268(0xed));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2d6f61){const _0x1c08af=_0x1f894a,_0x4841f4={'zjjRo':function(_0x10bc3f,_0x21088b,_0x2f378f){return _0x10bc3f(_0x21088b,_0x2f378f);},'added':function(_0x173c52){return _0x173c52();},'fTAWr':function(_0x1a0b0f,_0x29bdba,_0x26b14e){return _0x1a0b0f(_0x29bdba,_0x26b14e);},'MhCot':function(_0x2018e9,_0x1bd789){return _0x2018e9??_0x1bd789;}},_0x2886b1=await fetchCloudProfile(_0x2d6f61),_0x54b96b=_0x4841f4['zjjRo'](readProfileOverrides,_0x4841f4['added'](getProjectPath),_0x2d6f61);return _0x4841f4[_0x1c08af(0xe2)](mergeCloudProfileSettings,_0x2886b1?.[_0x1c08af(0xe9)]??{},_0x4841f4[_0x1c08af(0xd7)](_0x54b96b,undefined));}export async function configSet(_0x276268,_0x49e540,_0x1830a7){const _0x1a8f27=_0x1f894a,_0x44fcbd={'KEjJE':function(_0x2737e2,_0x9c1fed){return _0x2737e2(_0x9c1fed);},'TmwAn':function(_0x4520b0,_0x5177c2,_0x2e04b0,_0x280712,_0x14ea13){return _0x4520b0(_0x5177c2,_0x2e04b0,_0x280712,_0x14ea13);},'UCqhs':function(_0x1e14e7,_0x5aafec,_0x1ef9f0){return _0x1e14e7(_0x5aafec,_0x1ef9f0);},'MYKyy':function(_0x5ceb18,_0x8f4f7e,_0x4dff5a,_0x1ce1a8,_0x2e042a){return _0x5ceb18(_0x8f4f7e,_0x4dff5a,_0x1ce1a8,_0x2e042a);}},_0x4ec990=await resolveProfileTarget(_0x276268);if(_0x4ec990[_0x1a8f27(0xd6)]==='cloud'){if(_0x4ec990[_0x1a8f27(0xbc)])_0x44fcbd['KEjJE'](printDualExistsHint,_0x276268);const _0x2f713b=_0x44fcbd[_0x1a8f27(0xe5)](parseOverrideValue,_0x1830a7);_0x44fcbd[_0x1a8f27(0xdf)](setProfileOverride,getProjectPath(),_0x276268,_0x49e540,_0x2f713b),console['log'](_0x1a8f27(0xcf)+_0x49e540+_0x1a8f27(0xcd)+JSON['stringify'](_0x2f713b)+'\x20for\x20\x22'+_0x276268+'\x22');return;}const _0xe39119=_0x44fcbd[_0x1a8f27(0xe8)](parseLocalValue,_0x49e540,_0x1830a7);_0x44fcbd['MYKyy'](setProfileOverride,getProjectPath(),_0x276268,_0x49e540,_0xe39119),console[_0x1a8f27(0xea)](_0x1a8f27(0xcf)+_0x49e540+'\x20=\x20'+_0xe39119+'\x20for\x20\x22'+_0x276268+'\x22');}export async function configGet(_0x58d278,_0x562ad){const _0x289da4=_0x1f894a,_0x5bc3e3={'CVAGZ':function(_0x5bf107,_0x5e1396){return _0x5bf107(_0x5e1396);},'zcMwo':function(_0x3a6bea,_0x37646e,_0x58410b){return _0x3a6bea(_0x37646e,_0x58410b);},'NtWMu':function(_0x33ad7d,_0x17e876){return _0x33ad7d===_0x17e876;},'lSQEy':function(_0x3ed9c0,_0x4de9be){return _0x3ed9c0(_0x4de9be);},'fyEDg':function(_0x15ecda,_0x46a822){return _0x15ecda===_0x46a822;}},_0x2091f1=await resolveProfileTarget(_0x58d278);if(_0x2091f1[_0x289da4(0xd6)]==='cloud'){const _0x38dd58=await _0x5bc3e3[_0x289da4(0xcc)](loadEffectiveCloudSettings,_0x58d278),_0x11e619=_0x5bc3e3[_0x289da4(0xd5)](getNestedValue,_0x38dd58,_0x562ad);if(_0x5bc3e3['NtWMu'](_0x11e619,undefined))console['log'](_0x289da4(0xe3));else _0x5bc3e3['NtWMu'](typeof _0x11e619,'object')?console['log'](JSON['stringify'](_0x11e619,null,0x2)):console['log'](_0x11e619);return;}const _0x2e146f=await _0x5bc3e3[_0x289da4(0xf0)](loadSettings,_0x58d278),_0x24ea84=getNestedValue(_0x2e146f,_0x562ad);if(_0x5bc3e3[_0x289da4(0xce)](_0x24ea84,undefined))console[_0x289da4(0xea)]('(not\x20set)');else _0x5bc3e3['fyEDg'](typeof _0x24ea84,'object')?console[_0x289da4(0xea)](JSON['stringify'](_0x24ea84,null,0x2)):console[_0x289da4(0xea)](_0x24ea84);}export async function configList(_0x10326f){const _0x53bc70=_0x1f894a,_0x3eb118={'RbKxK':function(_0xdcd33f,_0x3088b7){return _0xdcd33f(_0x3088b7);},'VPLPU':_0x53bc70(0xd0),'PyGkE':function(_0x2710e1,_0x3724a7){return _0x2710e1(_0x3724a7);},'PZCDu':function(_0x4cad46,_0x1cea63){return _0x4cad46===_0x1cea63;},'yanaa':function(_0x322491,_0xc3933e){return _0x322491(_0xc3933e);}},_0x86f8f2=await _0x3eb118[_0x53bc70(0xc4)](resolveProfileTarget,_0x10326f);if(_0x86f8f2['kind']===_0x3eb118['VPLPU']){const _0x450656=await _0x3eb118[_0x53bc70(0xc5)](loadEffectiveCloudSettings,_0x10326f);if(!_0x450656||_0x3eb118[_0x53bc70(0xd3)](Object['keys'](_0x450656)[_0x53bc70(0xf1)],0x0)){console[_0x53bc70(0xea)](_0x53bc70(0xeb)+_0x10326f+'\x22');return;}console['log'](JSON['stringify'](_0x450656,null,0x2));return;}const _0x23f051=_0x3eb118['yanaa'](getSettingsPath,_0x10326f);if(!existsSync(_0x23f051)){console['log'](_0x53bc70(0xeb)+_0x10326f+'\x22');return;}const _0x1cfacd=await _0x3eb118['PyGkE'](loadSettings,_0x10326f),_0x368f23=formatSettings(_0x1cfacd);!_0x368f23?console[_0x53bc70(0xea)](_0x53bc70(0xeb)+_0x10326f+'\x22'):console[_0x53bc70(0xea)](_0x368f23);}export async function configUnset(_0x4cae02,_0x315a0a){const _0x21dd89=_0x1f894a,_0x4de278={'YNCJs':function(_0x3aa404,_0xa79a7d){return _0x3aa404(_0xa79a7d);},'yrgmb':function(_0xc4b64a,_0x5d673b){return _0xc4b64a(_0x5d673b);},'UyfZu':function(_0x28cd6b){return _0x28cd6b();},'biToH':function(_0x884486,_0x5055c1,_0x29fcb5,_0xf0565f){return _0x884486(_0x5055c1,_0x29fcb5,_0xf0565f);},'pFtXt':function(_0x47af5d,_0x6e5940,_0x202d27){return _0x47af5d(_0x6e5940,_0x202d27);}},_0x5ca149=await _0x4de278[_0x21dd89(0xcb)](resolveProfileTarget,_0x4cae02);if(_0x5ca149['kind']===_0x21dd89(0xd0)){if(_0x5ca149['alsoExistsElsewhere'])_0x4de278['yrgmb'](printDualExistsHint,_0x4cae02);const _0x5df9d=unsetProfileOverride(_0x4de278[_0x21dd89(0xbd)](getProjectPath),_0x4cae02,_0x315a0a);_0x5df9d?console[_0x21dd89(0xea)](_0x21dd89(0xe6)+_0x315a0a+'\x20for\x20\x22'+_0x4cae02+'\x22'):console['log'](_0x21dd89(0xc8)+_0x315a0a+'\x22\x20not\x20found');return;}const _0x30b767=_0x4de278[_0x21dd89(0xc1)](unsetProfileOverride,getProjectPath(),_0x4cae02,_0x315a0a);if(_0x30b767){console[_0x21dd89(0xea)](_0x21dd89(0xe6)+_0x315a0a);return;}const _0x29d6c8=await loadSettings(_0x4cae02),_0x56af70=_0x4de278[_0x21dd89(0xc2)](deleteNestedValue,_0x29d6c8,_0x315a0a);_0x56af70?console['log'](_0x21dd89(0xc8)+_0x315a0a+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4cae02+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0x21dd89(0xc8)+_0x315a0a+'\x22\x20not\x20found');}function _0x45fa(){const _0x447302=['true','5199948vlLHgK','TmwAn','voBYw','false','fTAWr','(not\x20set)','Cleared\x20local\x20overrides\x20for\x20\x22','KEjJE','Removed\x20','allowInsecureLocalhost','UCqhs','settings','log','No\x20configuration\x20set\x20for\x20\x22','391759tvCMAS','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','1179150mAMsXa','UiseM','lSQEy','length','endsWith','alsoExistsElsewhere','UyfZu','SxWOm','16aCffYo','2520567UWIKni','biToH','pFtXt','532887KZYgiO','RbKxK','PyGkE','null','dUdzC','Key\x20\x22','3582068Itylvk','niSKn','YNCJs','CVAGZ','\x20=\x20','fyEDg','Set\x20','cloud','4984460xtBBNy',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','PZCDu','headless','zcMwo','kind','MhCot','trim','undefined','startsWith','20SuoIGA','UZsok'];_0x45fa=function(){return _0x447302;};return _0x45fa();}export async function configReset(_0x20fc71){const _0x469602=_0x1f894a,_0x4f7688={'UZsok':function(_0x571fc8,_0xf7efcf){return _0x571fc8(_0xf7efcf);},'voBYw':function(_0x57a9fb,_0x1e1c44,_0x512eff){return _0x57a9fb(_0x1e1c44,_0x512eff);}},_0x432c58=await _0x4f7688[_0x469602(0xdc)](resolveProfileTarget,_0x20fc71);if(_0x432c58['kind']==='cloud'){_0x4f7688[_0x469602(0xe0)](resetProfileOverrides,getProjectPath(),_0x20fc71),console['log'](_0x469602(0xe4)+_0x20fc71+'\x22');return;}console[_0x469602(0xea)]('\x22'+_0x20fc71+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x20fc71+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -0,0 +1 @@
1
+ (function(_0x374850,_0x1698f9){const _0x474b0e=_0x3ec3,_0x2a691b=_0x374850();while(!![]){try{const _0x4bc2af=parseInt(_0x474b0e(0x1a7))/0x1+-parseInt(_0x474b0e(0x19e))/0x2*(-parseInt(_0x474b0e(0x199))/0x3)+parseInt(_0x474b0e(0x1a9))/0x4*(parseInt(_0x474b0e(0x19b))/0x5)+parseInt(_0x474b0e(0x1a4))/0x6*(parseInt(_0x474b0e(0x1a6))/0x7)+parseInt(_0x474b0e(0x1a1))/0x8*(parseInt(_0x474b0e(0x198))/0x9)+parseInt(_0x474b0e(0x19d))/0xa+-parseInt(_0x474b0e(0x1a5))/0xb;if(_0x4bc2af===_0x1698f9)break;else _0x2a691b['push'](_0x2a691b['shift']());}catch(_0x5a8da2){_0x2a691b['push'](_0x2a691b['shift']());}}}(_0x4762,0xd23eb));function _0x3ec3(_0x23784d,_0x2dcda6){_0x23784d=_0x23784d-0x196;const _0x476290=_0x4762();let _0x3ec3f2=_0x476290[_0x23784d];return _0x3ec3f2;}import{existsSync}from'fs';function _0x4762(){const _0x2d3f29=['yes','95PKvKyv','UYGFd','14910400wkXqGt','6jsTsGx','pYDcV','Cloud\x20profile\x20\x22','2008younhv','LgfgU','input','4945308SDfger','65515032VGCoBL','14iLdTdR','1173278EuOwDG','prompt','285616EiprDe','Jzoqa','\x22\x20for\x20everyone\x20in\x20your\x20organization.','\x22\x20not\x20found.','13626FHViSi','767631rGEqyF'];_0x4762=function(){return _0x2d3f29;};return _0x4762();}import _0x30a7b3 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{getEnvDir}from'./utils/settings.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x2e904b,_0x2d2cca={}){const _0x36dab9=_0x3ec3,_0x2261ec={'pYDcV':function(_0x381b35,_0x48f808){return _0x381b35(_0x48f808);},'FGEdU':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','Jzoqa':_0x36dab9(0x1a3),'qOaPl':'confirmation','Fabqw':function(_0x34397c,_0xae3693){return _0x34397c!==_0xae3693;},'UYGFd':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','LgfgU':function(_0x49448d,_0x5847b2){return _0x49448d(_0x5847b2);},'OKczA':function(_0x179c0b,_0x45b47f,_0x4faa7a){return _0x179c0b(_0x45b47f,_0x4faa7a);}},_0x6c288c=await _0x2261ec[_0x36dab9(0x19f)](fetchCloudProfile,_0x2e904b);if(!_0x6c288c)throw new Error(_0x36dab9(0x1a0)+_0x2e904b+_0x36dab9(0x197));if(!_0x2d2cca['yes']&&!isInteractive())throw new Error(_0x2261ec['FGEdU']);console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x2e904b+_0x36dab9(0x196));if(!_0x2d2cca[_0x36dab9(0x19a)]){const {confirmation:_0x5282b7}=await _0x30a7b3[_0x36dab9(0x1a8)]([{'type':_0x2261ec[_0x36dab9(0x1aa)],'name':_0x2261ec['qOaPl'],'message':'Type\x20\x22'+_0x2e904b+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2261ec['Fabqw'](_0x5282b7,_0x2e904b))throw new Error(_0x2261ec[_0x36dab9(0x19c)]);}await _0x2261ec['pYDcV'](deleteCloudProfile,_0x2e904b),!existsSync(_0x2261ec[_0x36dab9(0x1a2)](getEnvDir,_0x2e904b))&&(_0x2261ec['OKczA'](resetProfileOverrides,process['cwd'](),_0x2e904b),clearLastProfile(process['cwd'](),_0x2e904b)),console['log']('โœ“\x20Deleted\x20cloud\x20profile\x20\x22'+_0x2e904b+'\x22.');}
@@ -1 +1 @@
1
- const _0x347a3a=_0x23dc;(function(_0x1e3cf4,_0x5b3763){const _0x55148f=_0x23dc,_0x967605=_0x1e3cf4();while(!![]){try{const _0x3b7b6e=parseInt(_0x55148f(0x121))/0x1+-parseInt(_0x55148f(0x132))/0x2*(-parseInt(_0x55148f(0x12a))/0x3)+-parseInt(_0x55148f(0x122))/0x4*(-parseInt(_0x55148f(0x135))/0x5)+-parseInt(_0x55148f(0x144))/0x6+-parseInt(_0x55148f(0x13c))/0x7*(parseInt(_0x55148f(0x134))/0x8)+parseInt(_0x55148f(0x12d))/0x9*(-parseInt(_0x55148f(0x12f))/0xa)+parseInt(_0x55148f(0x142))/0xb;if(_0x3b7b6e===_0x5b3763)break;else _0x967605['push'](_0x967605['shift']());}catch(_0x3f62d0){_0x967605['push'](_0x967605['shift']());}}}(_0xf9e9,0xcfe44));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x23dc(_0x47519b,_0x4118ff){_0x47519b=_0x47519b-0x11d;const _0xf9e9dd=_0xf9e9();let _0x23dc9c=_0xf9e9dd[_0x47519b];return _0x23dc9c;}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x347a3a(0x137),_0x347a3a(0x13a),_0x347a3a(0x12b),'local','ci'];export async function getEnvNames(){const _0x35beba=_0x347a3a,_0x54c8ab={'kxjsf':function(_0x28d3cf){return _0x28d3cf();},'saAZX':'local','xdKVn':function(_0x2a4004,_0x382d4d){return _0x2a4004(_0x382d4d);},'qIdMq':function(_0x4d156b,_0x17ddc3,_0x77bd23){return _0x4d156b(_0x17ddc3,_0x77bd23);},'DVmwQ':_0x35beba(0x13e),'szqXV':'settings.json'},_0x503f9f=getRangerDir();if(!existsSync(_0x503f9f))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0xc881ae=await _0x54c8ab['kxjsf'](readActiveProfileName),_0xcf100=[],_0x4d49b8={},_0xfc78f8=join(_0x503f9f,_0x54c8ab['saAZX']);if(_0x54c8ab['xdKVn'](existsSync,_0xfc78f8)){const _0x4c5edc=await _0x54c8ab[_0x35beba(0x12c)](readdir,_0xfc78f8);for(const _0x3f43af of _0x4c5edc){const _0x4702e8=join(_0xfc78f8,_0x3f43af),_0x285349=await _0x54c8ab[_0x35beba(0x12c)](stat,_0x4702e8);_0x285349['isDirectory']()&&(_0xcf100[_0x35beba(0x13f)](_0x3f43af),_0x4d49b8[_0x3f43af]=_0x35beba(0x12e));}}const _0x10d22b=join(_0x503f9f,'ci');if(_0x54c8ab['xdKVn'](existsSync,_0x10d22b)){const _0x411991=await readdir(_0x10d22b);for(const _0x8af420 of _0x411991){const _0x2e95df=_0x54c8ab['qIdMq'](join,_0x10d22b,_0x8af420),_0x543a83=await _0x54c8ab['xdKVn'](stat,_0x2e95df);_0x543a83['isDirectory']()&&(_0xcf100[_0x35beba(0x13f)](_0x8af420),_0x4d49b8[_0x8af420]='ci');}}const _0x4b71d8=await readdir(_0x503f9f);for(const _0x1dc673 of _0x4b71d8){if(NON_ENV_DIRS[_0x35beba(0x126)](_0x1dc673))continue;if(_0x1dc673[_0x35beba(0x131)]('.'))continue;if(_0x1dc673['endsWith'](_0x54c8ab['DVmwQ']))continue;const _0x548cc2=join(_0x503f9f,_0x1dc673),_0x49c1b2=await _0x54c8ab['xdKVn'](stat,_0x548cc2);_0x49c1b2[_0x35beba(0x120)]()&&_0x54c8ab['xdKVn'](existsSync,join(_0x548cc2,_0x54c8ab['szqXV']))&&(!_0xcf100['includes'](_0x1dc673)&&(_0xcf100['push'](_0x1dc673),_0x4d49b8[_0x1dc673]=_0x35beba(0x136)));}return{'envNames':_0xcf100,'activeEnv':_0xc881ae,'envTypes':_0x4d49b8};}export async function envList(){const _0x340435=_0x347a3a,_0x52a6fa={'VATnf':function(_0x229ccc){return _0x229ccc();},'hUDsm':function(_0x154753,_0x501916){return _0x154753===_0x501916;},'dxKmP':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','OMQXX':'local','PJXTF':function(_0x2faf9e,_0x29d763){return _0x2faf9e===_0x29d763;},'KpDlw':function(_0x4941b0,_0x4e9b02){return _0x4941b0===_0x4e9b02;},'VrBET':'no\x20session'},{envNames:_0x4de96e,activeEnv:_0x164300,envTypes:_0x20a42b}=await _0x52a6fa['VATnf'](getEnvNames);let _0x15958c=[];try{_0x15958c=await listCloudProfiles();}catch{}if(_0x52a6fa['hUDsm'](_0x4de96e[_0x340435(0x128)],0x0)&&_0x15958c['length']===0x0){console[_0x340435(0x143)](_0x340435(0x13b)),console['log'](_0x52a6fa[_0x340435(0x133)]);return;}const _0x1607dd=new Set(_0x15958c[_0x340435(0x123)](_0x30191b=>_0x30191b[_0x340435(0x140)]));if(_0x4de96e['length']>0x0){console['log']('\x0aLocal\x20Profiles:');for(const _0x1b17f3 of _0x4de96e[_0x340435(0x13d)]()){const _0x5102ba=_0x1b17f3===_0x164300&&!_0x1607dd['has'](_0x1b17f3),_0x370348=_0x20a42b[_0x1b17f3]||_0x52a6fa[_0x340435(0x11d)],_0x450ea1=await loadSettings(_0x1b17f3),_0xe03ce=_0x52a6fa[_0x340435(0x125)](_0x370348,'legacy')?'':'\x20['+_0x370348+']';console[_0x340435(0x143)]('\x20\x20'+(_0x5102ba?'*\x20':'\x20\x20')+_0x1b17f3+_0xe03ce),_0x450ea1['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x450ea1[_0x340435(0x141)]),_0x450ea1['environmentDetails']&&console[_0x340435(0x143)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x450ea1['environmentDetails']);}}if(_0x15958c[_0x340435(0x128)]>0x0){console[_0x340435(0x143)]('\x0aCloud\x20Profiles:');for(const _0x88bc7f of _0x15958c['sort']((_0x335e8c,_0x259a4a)=>_0x335e8c['name'][_0x340435(0x138)](_0x259a4a['name']))){const _0x34a184=_0x52a6fa[_0x340435(0x129)](_0x88bc7f['name'],_0x164300),_0x4cc061=_0x88bc7f['environmentKey']?'\x20('+_0x88bc7f[_0x340435(0x124)]+')':'',_0x2659f6=_0x88bc7f['sessionUpdatedAt']?_0x340435(0x11f)+_0x88bc7f[_0x340435(0x130)]+')':_0x52a6fa['VrBET'];console[_0x340435(0x143)]('\x20\x20'+(_0x34a184?'*\x20':'\x20\x20')+_0x88bc7f['name']+_0x340435(0x11e)+_0x4cc061),console[_0x340435(0x143)](_0x340435(0x127)+_0x2659f6);}}_0x164300&&console[_0x340435(0x143)](_0x340435(0x139));}function _0xf9e9(){const _0x19fbd0=['push','name','baseUrl','30893269riFMDy','log','8755440mifFwZ','OMQXX','\x20[cloud]','cached\x20(updated\x20','isDirectory','149420tKjeXH','1048808GaaPsp','map','environmentKey','PJXTF','includes','\x20\x20\x20\x20\x20\x20Session:\x20','length','KpDlw','606273IAIsBO','reports','xdKVn','3339567NbXZrR','local','30NcbnVO','sessionUpdatedAt','startsWith','8stZLbq','dxKmP','302256dNxXMj','5tobYgY','legacy','sessions','localeCompare','\x0a*\x20=\x20active\x20profile','bug-bashes','\x0aNo\x20profiles\x20found.','112iidXtI','sort','.txt'];_0xf9e9=function(){return _0x19fbd0;};return _0xf9e9();}
1
+ const _0x1c898b=_0x10cd;(function(_0x1599ae,_0x451f2b){const _0x6a3550=_0x10cd,_0x2e28e1=_0x1599ae();while(!![]){try{const _0x4e6314=-parseInt(_0x6a3550(0x113))/0x1*(-parseInt(_0x6a3550(0x115))/0x2)+-parseInt(_0x6a3550(0x124))/0x3+parseInt(_0x6a3550(0x125))/0x4*(parseInt(_0x6a3550(0x11a))/0x5)+-parseInt(_0x6a3550(0x111))/0x6+-parseInt(_0x6a3550(0x105))/0x7*(parseInt(_0x6a3550(0x11b))/0x8)+-parseInt(_0x6a3550(0x122))/0x9*(-parseInt(_0x6a3550(0x112))/0xa)+parseInt(_0x6a3550(0x10a))/0xb;if(_0x4e6314===_0x451f2b)break;else _0x2e28e1['push'](_0x2e28e1['shift']());}catch(_0x2c6c1a){_0x2e28e1['push'](_0x2e28e1['shift']());}}}(_0x4548,0xe2556));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x4548(){const _0x372f74=['1RyMOsx','sessionUpdatedAt','915006NJZFFk','\x0aLocal\x20Profiles\x20(legacy):','\x0aCloud\x20Profiles:','oIQBC','oFPZx','5QNswgW','47680qCIqdd','\x0aNo\x20profiles\x20found.','startsWith','sort','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentDetails','log','23022GkSqUg','reports','5546916weCMyH','6548240hBpDll','legacy','wcjLV','yRGMP','qWQJn','LEeqZ','map','name','NeOrK','1694AUyDmF','local','QSbSM','length','isDirectory','14235331fcCXyi','\x0a*\x20=\x20active\x20profile','baseUrl','hPuxm','push','includes','environmentKey','4430304QxbYVF','6130hFBvdD'];_0x4548=function(){return _0x372f74;};return _0x4548();}function _0x10cd(_0x17d25a,_0xff9c53){_0x17d25a=_0x17d25a-0x102;const _0x454849=_0x4548();let _0x10cd80=_0x454849[_0x17d25a];return _0x10cd80;}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x1c898b(0x123),_0x1c898b(0x106),'ci'];export async function getEnvNames(){const _0x216734=_0x1c898b,_0x511269={'oIQBC':function(_0x35f6ca){return _0x35f6ca();},'qWQJn':function(_0x54bb6b,_0x2b7ee3){return _0x54bb6b(_0x2b7ee3);},'oFPZx':function(_0x1226fa,_0x45ae34,_0x41ebfa){return _0x1226fa(_0x45ae34,_0x41ebfa);},'yRGMP':function(_0x175e65,_0x15d6c5,_0x522717){return _0x175e65(_0x15d6c5,_0x522717);},'ARRzp':function(_0x4c442d,_0x1a13ec){return _0x4c442d(_0x1a13ec);},'QSbSM':function(_0x55369d,_0xb52c22){return _0x55369d(_0xb52c22);},'fdmey':function(_0x4d1910,_0x2ca4f2,_0xead034){return _0x4d1910(_0x2ca4f2,_0xead034);},'hPuxm':'settings.json','wcjLV':_0x216734(0x126)},_0x39cdaa=getRangerDir();if(!existsSync(_0x39cdaa))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x5e6c52=await _0x511269[_0x216734(0x118)](readActiveProfileName),_0x6bfab7=[],_0x1a9c6c={},_0x4a5aee=join(_0x39cdaa,_0x216734(0x106));if(existsSync(_0x4a5aee)){const _0x57010a=await _0x511269[_0x216734(0x129)](readdir,_0x4a5aee);for(const _0x55c43a of _0x57010a){const _0x33c683=_0x511269[_0x216734(0x119)](join,_0x4a5aee,_0x55c43a),_0x249c56=await stat(_0x33c683);_0x249c56[_0x216734(0x109)]()&&(_0x6bfab7['push'](_0x55c43a),_0x1a9c6c[_0x55c43a]=_0x216734(0x106));}}const _0x59aa7b=_0x511269[_0x216734(0x128)](join,_0x39cdaa,'ci');if(_0x511269[_0x216734(0x129)](existsSync,_0x59aa7b)){const _0x15a549=await _0x511269['ARRzp'](readdir,_0x59aa7b);for(const _0x18e1c3 of _0x15a549){const _0x222b94=join(_0x59aa7b,_0x18e1c3),_0x22e7d2=await stat(_0x222b94);_0x22e7d2[_0x216734(0x109)]()&&(_0x6bfab7[_0x216734(0x10e)](_0x18e1c3),_0x1a9c6c[_0x18e1c3]='ci');}}const _0xffc742=await _0x511269[_0x216734(0x107)](readdir,_0x39cdaa);for(const _0x53539b of _0xffc742){if(NON_ENV_DIRS[_0x216734(0x10f)](_0x53539b))continue;if(_0x53539b[_0x216734(0x11d)]('.'))continue;if(_0x53539b['endsWith']('.txt'))continue;const _0xf9f0d7=_0x511269['oFPZx'](join,_0x39cdaa,_0x53539b),_0x79e193=await stat(_0xf9f0d7);_0x79e193['isDirectory']()&&_0x511269['qWQJn'](existsSync,_0x511269['fdmey'](join,_0xf9f0d7,_0x511269[_0x216734(0x10d)]))&&(!_0x6bfab7[_0x216734(0x10f)](_0x53539b)&&(_0x6bfab7[_0x216734(0x10e)](_0x53539b),_0x1a9c6c[_0x53539b]=_0x511269[_0x216734(0x127)]));}return{'envNames':_0x6bfab7,'activeEnv':_0x5e6c52,'envTypes':_0x1a9c6c};}export async function envList(){const _0x26f242=_0x1c898b,_0x5b69b6={'CXfKw':function(_0x12c7e1){return _0x12c7e1();},'NeOrK':function(_0x5f4a18,_0x4b430e){return _0x5f4a18===_0x4b430e;},'LEeqZ':_0x26f242(0x116),'GSdLB':_0x26f242(0x106),'lGmDY':_0x26f242(0x126),'hAwIS':function(_0x743253,_0x30c107){return _0x743253===_0x30c107;}},{envNames:_0x4a72b8,activeEnv:_0x1e45ef,envTypes:_0x57f97c}=await getEnvNames();let _0x25d973=[];try{_0x25d973=await _0x5b69b6['CXfKw'](listCloudProfiles);}catch{}if(_0x5b69b6[_0x26f242(0x104)](_0x4a72b8[_0x26f242(0x108)],0x0)&&_0x25d973['length']===0x0){console['log'](_0x26f242(0x11c)),console['log'](_0x26f242(0x11f));return;}const _0x573043=new Set(_0x25d973[_0x26f242(0x102)](_0x345d76=>_0x345d76['name']));if(_0x4a72b8[_0x26f242(0x108)]>0x0){console['log'](_0x5b69b6[_0x26f242(0x12a)]);for(const _0x409df0 of _0x4a72b8[_0x26f242(0x11e)]()){const _0x37b37e=_0x5b69b6['NeOrK'](_0x409df0,_0x1e45ef)&&!_0x573043['has'](_0x409df0),_0x5663a1=_0x57f97c[_0x409df0]||_0x5b69b6['GSdLB'],_0x13fded=await loadSettings(_0x409df0),_0x4d0d2b=_0x5b69b6[_0x26f242(0x104)](_0x5663a1,_0x5b69b6['lGmDY'])?'':'\x20['+_0x5663a1+']';console['log']('\x20\x20'+(_0x37b37e?'*\x20':'\x20\x20')+_0x409df0+_0x4d0d2b),_0x13fded['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x13fded[_0x26f242(0x10c)]),_0x13fded[_0x26f242(0x120)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x13fded[_0x26f242(0x120)]);}}if(_0x25d973['length']>0x0){console['log'](_0x26f242(0x117));for(const _0x13b342 of _0x25d973[_0x26f242(0x11e)]((_0x13a1c6,_0x1ab82c)=>_0x13a1c6[_0x26f242(0x103)]['localeCompare'](_0x1ab82c[_0x26f242(0x103)]))){const _0x2ac089=_0x5b69b6['hAwIS'](_0x13b342['name'],_0x1e45ef),_0x54fe4c=_0x13b342['environmentKey']?'\x20('+_0x13b342[_0x26f242(0x110)]+')':'',_0x2db9ba=_0x13b342['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x13b342[_0x26f242(0x114)]+')':'no\x20session';console['log']('\x20\x20'+(_0x2ac089?'*\x20':'\x20\x20')+_0x13b342[_0x26f242(0x103)]+'\x20[cloud]'+_0x54fe4c),console[_0x26f242(0x121)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x2db9ba);}}_0x1e45ef&&console[_0x26f242(0x121)](_0x26f242(0x10b));}