@ranger-testing/ranger-cli 2.5.4-alpha.0e8b82c-9 โ†’ 2.5.4-alpha.1d983c3-19

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 (82) 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/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +24 -8
  80. package/build/skills/ranger/create.md +16 -3
  81. package/build/skills/ranger/verify.md +35 -10
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x1c5759,_0x2080f4){const _0x3868bf=_0x24d9,_0xb2a021=_0x1c5759();while(!![]){try{const _0x2bb567=parseInt(_0x3868bf(0xa5))/0x1*(-parseInt(_0x3868bf(0x101))/0x2)+-parseInt(_0x3868bf(0xb8))/0x3*(-parseInt(_0x3868bf(0xa0))/0x4)+parseInt(_0x3868bf(0xa6))/0x5+parseInt(_0x3868bf(0xd7))/0x6+-parseInt(_0x3868bf(0xbb))/0x7+-parseInt(_0x3868bf(0x114))/0x8*(parseInt(_0x3868bf(0xa2))/0x9)+parseInt(_0x3868bf(0x92))/0xa*(-parseInt(_0x3868bf(0xcf))/0xb);if(_0x2bb567===_0x2080f4)break;else _0xb2a021['push'](_0xb2a021['shift']());}catch(_0x547d13){_0xb2a021['push'](_0xb2a021['shift']());}}}(_0x56cf,0x6626d));import{mkdir,writeFile,readFile,readdir,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x4b1ead 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(_0x510be7){const _0x574399=_0x24d9,_0x557f6e={'xuexM':function(_0x1f5962,_0xba3350,_0x36f3a1){return _0x1f5962(_0xba3350,_0x36f3a1);},'xtlHB':function(_0x230bd4,_0xa3c9c1){return _0x230bd4<_0xa3c9c1;},'HOgZJ':function(_0x17c8e0,_0x196207){return _0x17c8e0(_0x196207);},'WJMmF':function(_0x3932d8,_0x308f15){return _0x3932d8===_0x308f15;}};try{const _0x57166f=new AbortController(),_0x58eede=setTimeout(()=>_0x57166f[_0x574399(0xbf)](),0x1388),_0x65bc66={'method':_0x574399(0x9f),'signal':_0x57166f[_0x574399(0xff)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x510be7)&&(process[_0x574399(0xe8)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x229f20=await _0x557f6e['xuexM'](fetch,_0x510be7,_0x65bc66);delete process[_0x574399(0xe8)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x58eede);if(_0x557f6e[_0x574399(0xba)](_0x229f20['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x574399(0x106)+_0x229f20['status']};}catch(_0x593217){delete process[_0x574399(0xe8)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x34a5d8=_0x593217,_0x1c965a=_0x34a5d8[_0x574399(0x9b)]||_0x557f6e[_0x574399(0x94)](String,_0x593217),_0x3835a3=_0x1c965a[_0x574399(0x9a)]('Invalid\x20URL')||_0x557f6e[_0x574399(0x113)](_0x34a5d8[_0x574399(0x95)],'TypeError')||_0x1c965a[_0x574399(0x9a)](_0x574399(0x90));return{'ok':![],'error':_0x1c965a,'isProtocolError':_0x3835a3};}}async function sweepOrphanLocalProfile(_0x34c266,_0x198d4a,_0x39d15f){const _0x3add1c=_0x24d9,_0x16d548={'qjbyA':function(_0x2051e2,_0x170bb9,_0xf7a76c){return _0x2051e2(_0x170bb9,_0xf7a76c);},'IuENj':'local','ELZwC':function(_0x470f07,_0xbf15ca,_0x37b1dc){return _0x470f07(_0xbf15ca,_0x37b1dc);},'XHbar':function(_0x4fc0f4,_0xb0a931){return _0x4fc0f4(_0xb0a931);},'MZmVD':function(_0x4fc91d,_0x1c247d){return _0x4fc91d(_0x1c247d);},'MAWfu':function(_0x4820a0,_0x173706,_0x418949){return _0x4820a0(_0x173706,_0x418949);}},_0x2ab380=_0x16d548['qjbyA'](join,_0x198d4a,_0x16d548['IuENj']),_0x23d4d6=_0x16d548[_0x3add1c(0x9e)](join,_0x2ab380,_0x34c266);_0x16d548['XHbar'](existsSync,_0x23d4d6)&&(_0x39d15f&&await isPathGitTracked(_0x23d4d6)?console[_0x3add1c(0xf2)](_0x3add1c(0xb9)+_0x23d4d6+'\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x16d548['qjbyA'](rm,_0x23d4d6,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x23d4d6)));if(_0x16d548[_0x3add1c(0x10f)](existsSync,_0x2ab380)){let _0x25c0be=[];try{_0x25c0be=await readdir(_0x2ab380);}catch{return;}const _0x1d4c6d=_0x3add1c(0xbc)+_0x34c266+'-';for(const _0x3256ab of _0x25c0be){if(!_0x3256ab[_0x3add1c(0xa4)](_0x1d4c6d))continue;const _0x3665b2=join(_0x2ab380,_0x3256ab);await _0x16d548['MAWfu'](rm,_0x3665b2,{'recursive':!![],'force':!![]}),console[_0x3add1c(0xf2)](_0x3add1c(0xca)+_0x3665b2);}}}function _0x56cf(){const _0x498842=['HTTP\x20','yes','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','bBGca','VDjdC','root\x20(.ranger/)','Saahg','url_setup','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','MZmVD','--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.','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','fUKGF','WJMmF','7712AKngFQ','gWhxw','overwrite','kuVfe','safeMode','use_suggestion','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','NcDzp','setupHeader','setupHeaders','\x22\x20already\x20exists.\x20Overwrite?','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','status','heCbl','AzHYJ','.backup-','now','fetch\x20failed','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20','115890rvwrUr','continue','HOgZJ','name','error','settings.json','baseUrl','\x0a\x20\x20\x20โš \x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','includes','message','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','hxUkJ','ELZwC','HEAD','13364YNxnek','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','5274ykCqZL','czHLY','startsWith','51958QLKQmH','3525545hwWcgF','test','indexOf','OZLfj','origin','xPVRd','scope','Delete\x20existing\x20and\x20create\x20new\x20in\x20','You\x20can\x20try\x20again\x20with\x20one\x20of:','vVXqW','exit','legacy','retry','WOgxp','TlYxq','stdout','JkaBR','wPULv','471VYKmvf','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','xtlHB','4022984rzVcTi','.tmp-','Removed\x20existing\x20profile\x20at\x20','environments','abort','local','catch','finally','\x20\x20Did\x20you\x20mean\x20','storageState','confirm','No\x20auth\x20env\x20matches\x20this\x20URL.\x20Creating\x20local\x20profile.','trim','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','What\x20would\x20you\x20like\x20to\x20do?','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','VykFS','FATmr','length','fxofC','154aSmEOW','force','allowInsecureLocalhost','tfHdd','ZWAax','\x0a\x20\x20Profile\x20\x22','โœ“\x20Auth\x20state\x20saved\x20to:\x20','\x20\x20\x20Creating\x20it\x20in\x20','3255522lekfpc','Continue\x20anyway','โœ“\x20Created\x20settings:\x20','\x20\x20ranger\x20profile\x20add\x20','DVCZr','SojPv','MKdaI','.enc','saveToCloud','Could\x20not\x20reach\x20','WpsqX','url','qrlMB',')\x0a\x20\x20Save\x20\x27','QOjmT','isTTY','\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','env','\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a','SIGINT','goto','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','user','slice','\x22\x20already\x20exists\x20in\x20','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','auth.json','log','cdpEndpoint','Aborted.','http://','off','\x27\x20created,\x20linked\x20to\x20env\x20\x27','keys',').\x20Falling\x20back\x20to\x20local\x20profile.','trackPhaseEnd','push','ldipx','Saving\x20authentication\x20state...','quzwF','signal','rlQMX','2UneaHV','stdin','location','mPaeP','\x20would\x20shadow\x20the\x20existing\x20profile.'];_0x56cf=function(){return _0x498842;};return _0x56cf();}function _0x24d9(_0x649306,_0x4c3416){_0x649306=_0x649306-0x8a;const _0x56cf98=_0x56cf();let _0x24d916=_0x56cf98[_0x649306];return _0x24d916;}async function tryAutoRouteCloudProfile(_0x4e7d39,_0x5d7f2b,_0x7924ff,_0x1634e2,_0x5ea04c){const _0x37c3ca=_0x24d9,_0x167097={'WpsqX':function(_0x4e4fad){return _0x4e4fad();},'NcDzp':'profile.add.autoRouteSkipped','MKdaI':'no_auth_config','QOjmT':function(_0x5ce7d4,_0x407090){return _0x5ce7d4===_0x407090;},'Twyeb':function(_0x445767,_0x1149b4,_0x2bda99){return _0x445767(_0x1149b4,_0x2bda99);},'mPaeP':_0x37c3ca(0xc6),'SGOEM':function(_0x37c074,_0x13c178){return _0x37c074 instanceof _0x13c178;},'czHLY':function(_0x580ebf,_0x8bd1ce){return _0x580ebf instanceof _0x8bd1ce;},'sUwwg':function(_0x452695,_0x4b7efe){return _0x452695(_0x4b7efe);},'HDVEX':function(_0x8402d3,_0x453e18){return _0x8402d3+_0x453e18;},'JusHN':function(_0x30eaa8,_0x3846c6,_0x196679,_0x540b81){return _0x30eaa8(_0x3846c6,_0x196679,_0x540b81);},'fUKGF':function(_0x5194f0,_0x4f4114){return _0x5194f0 instanceof _0x4f4114;},'HhnPw':function(_0x24bb77,_0x17dbd2){return _0x24bb77(_0x17dbd2);},'CDBvt':'profile.add.autoRouted'};let _0x256c2e;try{_0x256c2e=await _0x167097[_0x37c3ca(0xe1)](fetchAuthConfig);}catch{return _0x5ea04c?.['trackPhaseEnd'](_0x167097[_0x37c3ca(0x11b)],{'reason':_0x167097[_0x37c3ca(0xdd)],'profileName':_0x4e7d39}),![];}if(!_0x256c2e||!_0x256c2e['environments']||_0x167097[_0x37c3ca(0xe5)](Object['keys'](_0x256c2e[_0x37c3ca(0xbe)])[_0x37c3ca(0xcd)],0x0))return _0x5ea04c?.['trackPhaseEnd'](_0x167097['NcDzp'],{'reason':_0x167097[_0x37c3ca(0xdd)],'profileName':_0x4e7d39}),![];const _0x47078e=_0x167097['Twyeb'](matchAuthEnvironment,_0x5d7f2b,_0x256c2e);if(!_0x47078e)return console[_0x37c3ca(0xf2)](_0x167097[_0x37c3ca(0x104)]),_0x5ea04c?.[_0x37c3ca(0xfa)]('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x4e7d39}),![];const _0x57ea24=_0x256c2e['environments'][_0x47078e],_0x5ecc9a=_0x57ea24?.['domains']??[];if(_0x1634e2&&!_0x7924ff[_0x37c3ca(0x107)]){const {saveToCloud:_0x4f296a}=await _0x4b1ead['prompt']([{'type':'confirm','name':_0x37c3ca(0xdf),'message':'Found\x20auth\x20environment\x20\x27'+_0x47078e+'\x27\x20matching\x20'+_0x5d7f2b+'\x0a\x20\x20(domains:\x20'+_0x5ecc9a['join'](',\x20')+_0x37c3ca(0xe4)+_0x4e7d39+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4f296a)return _0x5ea04c?.['trackPhaseEnd'](_0x167097[_0x37c3ca(0x11b)],{'reason':'user_declined','profileName':_0x4e7d39}),![];}const _0x3b8399=_0x5ecc9a['some'](_0x5f0e1c=>{const _0x524d62=_0x37c3ca;try{return new URL(_0x5f0e1c)[_0x524d62(0xaa)]===new URL(_0x5d7f2b)['origin'];}catch{return![];}}),_0x597d41={};!_0x3b8399&&(_0x597d41[_0x37c3ca(0x98)]=_0x5d7f2b);try{await createCloudProfile(_0x4e7d39,_0x47078e,{'settings':_0x597d41});}catch(_0x55d303){if(_0x167097['SGOEM'](_0x55d303,ApiError)&&_0x55d303[_0x37c3ca(0x8b)]===0x199){console['error'](_0x37c3ca(0x108)+_0x4e7d39+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x55d303;}return console['log']('\x20\x20Could\x20not\x20reach\x20Ranger\x20API\x20to\x20create\x20a\x20cloud\x20profile\x20('+(_0x167097[_0x37c3ca(0xa3)](_0x55d303,Error)?_0x55d303[_0x37c3ca(0x9b)]:_0x167097['sUwwg'](String,_0x55d303))+_0x37c3ca(0xf9)),_0x5ea04c?.['trackPhaseEnd'](_0x167097['NcDzp'],{'reason':_0x167097['MKdaI'],'profileName':_0x4e7d39}),![];}console[_0x37c3ca(0xf2)](_0x167097['HDVEX']('โœ“\x20Cloud\x20profile\x20\x27'+_0x4e7d39+_0x37c3ca(0xf7)+_0x47078e+'\x27.\x0a','\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x4e7d39));try{await sweepOrphanLocalProfile(_0x4e7d39,getRangerHomeDir(),![]);const _0x45cecc=getRangerDir();_0x45cecc!==getRangerHomeDir()&&await _0x167097['JusHN'](sweepOrphanLocalProfile,_0x4e7d39,_0x45cecc,!![]);}catch(_0x33bffa){console[_0x37c3ca(0xf2)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x167097[_0x37c3ca(0x112)](_0x33bffa,Error)?_0x33bffa[_0x37c3ca(0x9b)]:_0x167097['HhnPw'](String,_0x33bffa))+').');}return _0x5ea04c?.['trackPhaseEnd'](_0x167097['CDBvt'],{'envKey':_0x47078e,'profileName':_0x4e7d39}),!![];}export async function addEnv(_0x1085bd,_0x5a0d29={},_0x55a47f){const _0xf1fabd=_0x24d9,_0x20fdae={'fxofC':_0xf1fabd(0xfd),'vwFMW':function(_0x293e2d){return _0x293e2d();},'FATmr':function(_0x277e7f,_0x7638c1,_0x29db33,_0x353546){return _0x277e7f(_0x7638c1,_0x29db33,_0x353546);},'SojPv':function(_0x4c179e,_0x536796){return _0x4c179e===_0x536796;},'ARoTM':function(_0x383fd3,_0x1050b){return _0x383fd3+_0x1050b;},'cLwmM':'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','Saahg':function(_0x1a4a7b,_0x2d3a63,_0x3e056e,_0x2c7eca,_0x597ed6,_0x5276ee){return _0x1a4a7b(_0x2d3a63,_0x3e056e,_0x2c7eca,_0x597ed6,_0x5276ee);},'WOgxp':function(_0x45e51d,_0x36b608,_0x2ba5d2){return _0x45e51d(_0x36b608,_0x2ba5d2);},'OJnRt':function(_0x6d259a,_0x1ab749){return _0x6d259a===_0x1ab749;},'bBGca':_0xf1fabd(0x116),'vVXqW':_0xf1fabd(0xb1),'qrlMB':_0xf1fabd(0x10b),'pXGoR':'shouldReplace','heCbl':_0xf1fabd(0xf4),'ZWAax':function(_0x16f4dc,_0x8b537a){return _0x16f4dc(_0x8b537a);},'hxUkJ':_0xf1fabd(0xec),'QkmKq':'input','TlYxq':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','VykFS':function(_0x387811,_0xceba9b){return _0x387811||_0xceba9b;},'qqhXU':function(_0x5ad8e8,_0x2ccc78){return _0x5ad8e8(_0x2ccc78);},'CoNwq':'list','xPVRd':'use_suggestion','NVdmi':'Enter\x20a\x20different\x20URL','quzwF':_0xf1fabd(0xb2),'yYKum':_0xf1fabd(0xd8),'DVCZr':_0xf1fabd(0x93),'XOwiQ':_0xf1fabd(0xf1),'jgYSc':'\x0a๐Ÿ“‹\x20Authentication\x20Setup','kuVfe':_0xf1fabd(0xe7),'VbGsx':'\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','OZLfj':'--disable-features=WebBluetooth','WkPGw':'--allow-insecure-localhost','gWhxw':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','MaxJY':_0xf1fabd(0xae),'dZBYL':_0xf1fabd(0x8a),'JkaBR':function(_0x43194e,_0x71415d){return _0x43194e(_0x71415d);},'rlQMX':function(_0x566bb0,_0x5024c0){return _0x566bb0+_0x5024c0;},'VDjdC':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','wPULv':_0xf1fabd(0xf0),'AzHYJ':'config_write','cwqbM':function(_0xe62d74,_0x2bc4d5){return _0xe62d74>_0x2bc4d5;},'ldipx':'settings.json','eWkiP':_0xf1fabd(0x10e),'CZOfr':function(_0x2c1178,_0x19109c,_0x4bd35d){return _0x2c1178(_0x19109c,_0x4bd35d);},'tfHdd':_0xf1fabd(0xea)},_0x2eab1c=_0x5a0d29['ci']??![],_0x624588=_0x2eab1c?'ci':_0xf1fabd(0xc0),_0x92db54=_0x5a0d29[_0xf1fabd(0xac)]===_0xf1fabd(0xed)?getRangerHomeDir():getRangerDir(),_0x286c0d=_0x20fdae[_0xf1fabd(0xcc)](join,_0x92db54,_0x624588,_0x1085bd),_0x3b4faa={};if(_0x5a0d29[_0xf1fabd(0x11c)])for(const _0x3fbc74 of _0x5a0d29[_0xf1fabd(0x11c)]){const _0x26cd0f=_0x3fbc74[_0xf1fabd(0xa8)](':');if(_0x20fdae[_0xf1fabd(0xdc)](_0x26cd0f,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x3fbc74+_0xf1fabd(0x9c));const _0xea89c5=_0x3fbc74['slice'](0x0,_0x26cd0f)[_0xf1fabd(0xc7)](),_0x2ce3b6=_0x3fbc74[_0xf1fabd(0xee)](_0x20fdae['ARoTM'](_0x26cd0f,0x1))[_0xf1fabd(0xc7)]();_0x3b4faa[_0xea89c5]=_0x2ce3b6;}const _0x54768a=join(_0x92db54,_0x624588);if(_0x5a0d29['cdpEndpoint']!==undefined&&_0x5a0d29[_0xf1fabd(0xf3)][_0xf1fabd(0xc7)]()==='')throw new Error(_0xf1fabd(0x111));if(_0x5a0d29['cdpEndpoint']&&_0x5a0d29[_0xf1fabd(0xe2)])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x5a0d29['cdpEndpoint']&&_0x5a0d29['ci'])throw new Error(_0xf1fabd(0x110));const _0x47ab91=Boolean(_0x5a0d29['cdpEndpoint']),_0x13a0df=!_0x5a0d29['skipAuth']&&!_0x47ab91,_0x4e3639=process[_0xf1fabd(0x102)][_0xf1fabd(0xe6)]&&process[_0xf1fabd(0xb5)]['isTTY'];if(!_0x4e3639&&!_0x5a0d29[_0xf1fabd(0xe2)]&&!_0x47ab91)throw new Error(_0x20fdae['cLwmM']);if(!_0x2eab1c&&!_0x5a0d29['skipAuth']&&!_0x47ab91&&_0x5a0d29[_0xf1fabd(0xe2)]){const _0x525c49=await _0x20fdae[_0xf1fabd(0x10c)](tryAutoRouteCloudProfile,_0x1085bd,_0x5a0d29[_0xf1fabd(0xe2)],_0x5a0d29,_0x4e3639,_0x55a47f);if(_0x525c49)return;}const _0x410f59=_0x20fdae[_0xf1fabd(0xb3)](findExistingEnv,_0x1085bd,{'rangerDir':_0x92db54});let _0x89727a=null;if(_0x410f59){if(!_0x4e3639)_0x89727a=_0x410f59;else{if(_0x20fdae['OJnRt'](_0x410f59['location'],_0x624588)){const {overwrite:_0xa353e6}=await _0x4b1ead['prompt']([{'type':'confirm','name':_0x20fdae[_0xf1fabd(0x109)],'message':'Profile\x20\x22'+_0x1085bd+_0xf1fabd(0x11e),'default':![]}]);if(!_0xa353e6){console['log']('Aborted.');return;}_0x89727a=_0x410f59;}else{const _0x49aa43=_0x20fdae['OJnRt'](_0x410f59[_0xf1fabd(0x103)],_0x20fdae[_0xf1fabd(0xaf)])?_0x20fdae[_0xf1fabd(0xe3)]:_0x410f59['location'];console['error']('\x0aโš ๏ธ\x20\x20Profile\x20\x22'+_0x1085bd+_0xf1fabd(0xef)+_0x49aa43+':\x20'+_0x410f59['path']),console[_0xf1fabd(0x96)](_0xf1fabd(0xd6)+_0x624588+_0xf1fabd(0x105));const {shouldReplace:_0x1e6871}=await _0x4b1ead['prompt']([{'type':_0xf1fabd(0xc5),'name':_0x20fdae['pXGoR'],'message':_0xf1fabd(0xad)+_0x624588+'?','default':![]}]);if(!_0x1e6871){console[_0xf1fabd(0xf2)](_0x20fdae[_0xf1fabd(0x8c)]);return;}_0x89727a=_0x410f59;}}}_0x55a47f?.['trackPhaseStart'](_0xf1fabd(0x10d));let _0x3cff70='';if(_0x47ab91)console['log']('\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a'),console[_0xf1fabd(0xf2)](_0xf1fabd(0xc8)+_0x5a0d29[_0xf1fabd(0xf3)]),console[_0xf1fabd(0xf2)]('\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a');else{if(_0x5a0d29['url']){_0x3cff70=_0x5a0d29[_0xf1fabd(0xe2)];const _0x5a7277=await _0x20fdae[_0xf1fabd(0xd3)](checkUrlReachability,_0x3cff70);if(!_0x5a7277['ok']&&!_0x5a0d29[_0xf1fabd(0xd0)])throw new Error(_0xf1fabd(0xe0)+_0x3cff70+':\x20'+_0x5a7277[_0xf1fabd(0x96)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x5a7277['ok']&&_0x5a0d29[_0xf1fabd(0xd0)]&&console['log']('โš \x20Could\x20not\x20reach\x20'+_0x3cff70+':\x20'+_0x5a7277['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a๐ŸŒ\x20Profile\x20Setup\x0a'),console[_0xf1fabd(0xf2)](_0x20fdae[_0xf1fabd(0x9d)]),console[_0xf1fabd(0xf2)]('\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a');let _0x5eb5a3=![];while(!![]){const _0x182d96=await _0x4b1ead['prompt']([{'type':_0x20fdae['QkmKq'],'name':'baseUrl','message':_0x5eb5a3?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x20fdae[_0xf1fabd(0xb4)],'default':_0x20fdae[_0xf1fabd(0xcb)](_0x3cff70,'http://localhost:3000')}]);_0x3cff70=_0x182d96['baseUrl'];const _0x4bdf37=await _0x20fdae['qqhXU'](checkUrlReachability,_0x3cff70);if(_0x4bdf37['ok'])break;const _0x31d959=/^[a-zA-Z][\w+.-]*:\/\//[_0xf1fabd(0xa7)](_0x3cff70),_0x9bcb2b=_0x4bdf37['isProtocolError']&&!_0x31d959,_0x5148b2=_0x9bcb2b?_0xf1fabd(0xf5)+_0x3cff70:null;_0x5eb5a3=!![],console[_0xf1fabd(0xf2)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3cff70+':\x20'+_0x4bdf37['error']);_0x5148b2&&console[_0xf1fabd(0xf2)](_0xf1fabd(0xc3)+_0x5148b2+'?');const {action:_0x546d55}=await _0x4b1ead['prompt']([{'type':_0x20fdae['CoNwq'],'name':'action','message':_0xf1fabd(0xc9),'choices':[..._0x5148b2?[{'name':'Use\x20'+_0x5148b2,'value':_0x20fdae[_0xf1fabd(0xab)]}]:[],{'name':_0x20fdae['NVdmi'],'value':_0x20fdae[_0xf1fabd(0xfe)]},{'name':_0x20fdae['yYKum'],'value':_0x20fdae[_0xf1fabd(0xdb)]}]}]);if(_0x546d55===_0xf1fabd(0x119)&&_0x5148b2){_0x3cff70=_0x5148b2;const _0x4d0c04=await _0x20fdae['qqhXU'](checkUrlReachability,_0x3cff70);if(_0x4d0c04['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x3cff70+':\x20'+_0x4d0c04[_0xf1fabd(0x96)]);}else{if(_0x20fdae['OJnRt'](_0x546d55,_0xf1fabd(0x93)))break;}}}}_0x55a47f?.[_0xf1fabd(0xfa)]('url_setup');const _0x454211={};if(_0x89727a){const _0x58a398=await loadSettings(_0x1085bd);Object['assign'](_0x454211,_0x58a398['setupHeaders']);}Object['assign'](_0x454211,_0x3b4faa),await _0x20fdae['WOgxp'](mkdir,_0x54768a,{'recursive':!![]});try{const _0x418051=await readdir(_0x54768a),_0x38a9a4='.tmp-'+_0x1085bd+'-';for(const _0x2e84a8 of _0x418051){_0x2e84a8[_0xf1fabd(0xa4)](_0x38a9a4)&&await rm(join(_0x54768a,_0x2e84a8),{'recursive':!![],'force':!![]});}}catch{}const _0x5be861=await _0x20fdae[_0xf1fabd(0xd3)](mkdtemp,_0x20fdae['WOgxp'](join,_0x54768a,_0xf1fabd(0xbc)+_0x1085bd+'-')),_0x1ea235=join(_0x5be861,_0x20fdae['XOwiQ']),_0x23f8f7=()=>{const _0x3e15d7=_0xf1fabd;rm(_0x5be861,{'recursive':!![],'force':!![]})[_0x3e15d7(0xc1)](()=>{})[_0x3e15d7(0xc2)](()=>{const _0x32e63c=_0x3e15d7;process[_0x32e63c(0xb0)](0x82);});};process['once']('SIGINT',_0x23f8f7);const _0x3a74c2=Boolean(_0x3cff70)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x3cff70);try{if(_0x13a0df){_0x55a47f?.['trackPhaseStart']('browser_auth'),console['log'](_0x20fdae['jgYSc']),console[_0xf1fabd(0xf2)]('\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.'),console['log'](_0x20fdae[_0xf1fabd(0x117)]);!_0x4e3639?(console[_0xf1fabd(0xf2)](_0xf1fabd(0x99)),console[_0xf1fabd(0xf2)](_0x20fdae['VbGsx'])):console['log']('');await new Promise(_0x3694ed=>setTimeout(_0x3694ed,0xbb8));const _0x34e854=[];_0x5a0d29[_0xf1fabd(0x118)]&&_0x34e854[_0xf1fabd(0xfb)](_0x20fdae[_0xf1fabd(0xa9)]);const _0x5438b9=_0x5a0d29['allowInsecureLocalhost']||_0x3a74c2;_0x5438b9&&_0x34e854[_0xf1fabd(0xfb)](_0x20fdae['WkPGw']);const _0x7a1b6e=await chromium['launch']({'headless':![],..._0x34e854[_0xf1fabd(0xcd)]>0x0?{'args':_0x34e854}:{}});try{const _0x33414c=Object['keys'](_0x454211)[_0xf1fabd(0xcd)]>0x0,_0x475084={'ignoreHTTPSErrors':!![]};_0x33414c&&(_0x475084['extraHTTPHeaders']=_0x454211);const _0x3f739f=await _0x7a1b6e['newContext'](_0x475084);await addProfileSetupBanner(_0x3f739f);const _0x6e68af=await _0x3f739f['newPage']();await _0x6e68af[_0xf1fabd(0xeb)](_0x20fdae['VykFS'](_0x3cff70,'about:blank'));let _0x43111b=![];await new Promise(_0x5f266a=>{_0x6e68af['on']('close',async()=>{const _0x506ff2=_0x24d9;try{console[_0x506ff2(0xf2)](_0x20fdae[_0x506ff2(0xce)]),await _0x3f739f[_0x506ff2(0xc4)]({'path':_0x1ea235}),_0x43111b=!![];}catch{}_0x20fdae['vwFMW'](_0x5f266a);});});if(!_0x43111b){console[_0xf1fabd(0xf2)](_0x20fdae[_0xf1fabd(0x115)]);!_0x5a0d29[_0xf1fabd(0x118)]&&(console[_0xf1fabd(0xf2)](_0xf1fabd(0x11a)),console['log'](_0x20fdae['MaxJY']),console['log'](_0xf1fabd(0xda)+_0x1085bd+'\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)'),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x1085bd+_0xf1fabd(0xe9)));throw new Error(_0xf1fabd(0xa1));}}finally{await _0x7a1b6e['close']()['catch'](()=>{});}if(_0x2eab1c){const _0x23211e=await readFile(_0x1ea235,'utf-8'),_0x1e630e=await _0x20fdae['vwFMW'](getToken);if(!_0x1e630e){console[_0xf1fabd(0x96)](_0x20fdae['dZBYL']),await _0x20fdae[_0xf1fabd(0xb6)](unlink,_0x1ea235)['catch'](()=>{});throw new Error('Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.');}else{const _0x3eccef=encrypt(_0x23211e,_0x1e630e);await writeFile(_0x20fdae[_0xf1fabd(0x100)](_0x1ea235,'.enc'),_0x3eccef),await unlink(_0x1ea235),console[_0xf1fabd(0xf2)]('โœ“\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x1ea235+_0xf1fabd(0xde)),console[_0xf1fabd(0xf2)](_0x20fdae[_0xf1fabd(0x10a)]),console['log'](_0x20fdae[_0xf1fabd(0xb7)]);}}else console[_0xf1fabd(0xf2)](_0xf1fabd(0xd5)+_0x1ea235);_0x55a47f?.[_0xf1fabd(0xfa)]('browser_auth');}_0x55a47f?.['trackPhaseStart'](_0x20fdae[_0xf1fabd(0x8d)]);const _0x2ba283={};_0x3cff70&&(_0x2ba283[_0xf1fabd(0x98)]=_0x3cff70);_0x5a0d29[_0xf1fabd(0xf3)]&&(_0x2ba283['cdpEndpoint']=_0x5a0d29[_0xf1fabd(0xf3)],_0x2ba283['isElectron']=!![]);(_0x5a0d29[_0xf1fabd(0xd1)]||_0x3a74c2)&&(_0x2ba283[_0xf1fabd(0xd1)]=!![]);_0x5a0d29[_0xf1fabd(0x118)]&&(_0x2ba283[_0xf1fabd(0x118)]=!![]);_0x20fdae['cwqbM'](Object[_0xf1fabd(0xf8)](_0x454211)[_0xf1fabd(0xcd)],0x0)&&(_0x2ba283[_0xf1fabd(0x11d)]=_0x454211);await writeFile(join(_0x5be861,_0x20fdae[_0xf1fabd(0xfc)]),JSON['stringify'](_0x2ba283,null,0x2)),console['log'](_0xf1fabd(0xd9)+join(_0x286c0d,_0xf1fabd(0x97)));if(_0x89727a?.[_0xf1fabd(0x103)]===_0x624588){const _0x2b5dee=_0x89727a['path']+_0xf1fabd(0x8e)+Date[_0xf1fabd(0x8f)]();await _0x20fdae[_0xf1fabd(0xb3)](rename,_0x89727a['path'],_0x2b5dee);try{await rename(_0x5be861,_0x286c0d);}catch(_0x2c3f25){await rename(_0x2b5dee,_0x89727a['path']);throw _0x2c3f25;}try{await rm(_0x2b5dee,{'recursive':!![]});}catch{console[_0xf1fabd(0xf2)](_0xf1fabd(0x91)+_0x2b5dee);}}else{await _0x20fdae['WOgxp'](rename,_0x5be861,_0x286c0d);if(_0x89727a)try{await _0x20fdae['WOgxp'](rm,_0x89727a['path'],{'recursive':!![]}),console[_0xf1fabd(0xf2)](_0xf1fabd(0xbd)+_0x89727a['path']);}catch{console['log']('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x89727a['path']);}}try{await writeActiveProfileName(_0x1085bd),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x1085bd);}catch{console[_0xf1fabd(0xf2)](_0x20fdae['eWkiP']);}_0x55a47f?.['trackPhaseEnd'](_0x20fdae[_0xf1fabd(0x8d)]),console['log'](_0xf1fabd(0xd4)+_0x1085bd+'\x22\x20configured');}catch(_0x47eef8){await _0x20fdae['CZOfr'](rm,_0x5be861,{'recursive':!![],'force':!![]});throw _0x47eef8;}finally{process[_0xf1fabd(0xf6)](_0x20fdae[_0xf1fabd(0xd2)],_0x23f8f7);}}
1
+ function _0x48ca(_0x15546d,_0x416072){_0x15546d=_0x15546d-0x1f1;const _0x260a87=_0x260a();let _0x48cab7=_0x260a87[_0x15546d];return _0x48cab7;}(function(_0x31866b,_0x1c534f){const _0x464a8c=_0x48ca,_0x1bb601=_0x31866b();while(!![]){try{const _0x3a5eb5=-parseInt(_0x464a8c(0x251))/0x1+parseInt(_0x464a8c(0x229))/0x2+parseInt(_0x464a8c(0x209))/0x3*(parseInt(_0x464a8c(0x239))/0x4)+-parseInt(_0x464a8c(0x220))/0x5+-parseInt(_0x464a8c(0x20e))/0x6+-parseInt(_0x464a8c(0x217))/0x7*(-parseInt(_0x464a8c(0x1ff))/0x8)+parseInt(_0x464a8c(0x206))/0x9;if(_0x3a5eb5===_0x1c534f)break;else _0x1bb601['push'](_0x1bb601['shift']());}catch(_0x3b5f2e){_0x1bb601['push'](_0x1bb601['shift']());}}}(_0x260a,0x63714));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x72d912 from'inquirer';function _0x260a(){const _0x2ced13=['756760SsGnaA','indexOf','What\x20would\x20you\x20like\x20to\x20do?','trackPhaseEnd','zbPQw','ZXQru','url','4031748qWmChR','QJENR','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','3pHsmLz','Use\x20','cASfG','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','trim','3282150eOucTP','env','environments','wPAhk','lIGLa','name','log','setupHeaders','Found\x20auth\x20environment\x20\x27','35kjiAha','\x20--url\x20','GUukE','manual','XUAvz','cdpEndpoint','jxToh','prompt','baseUrl','1252380EsNWxc','\x20\x20https://docs.ranger.net/main/concepts/profiles','ewiiB','Hzpba','profile.add.autoRouteSkipped','confirm','sOyWx','RfViH','`\x20again\x20without\x20--skip-auth.','901096OoqUGE','message','lpPYi','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x20\x20Did\x20you\x20mean\x20','hiEEe','profile.add.autoRouted','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','\x0aโœ“\x20Profile\x20\x27','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','\x22:\x20','http://','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','NODE_TLS_REJECT_UNAUTHORIZED','24212nmAzRc','iYIxR','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','VQnJc','JExYi','.tmp-','jUVIn','http://localhost:3000','origin','xFUJl','TFtTE','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','test','UajKT','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','EJoUh','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','stdout','continue','zhvkH','jxALd','\x27\x20to\x20the\x20cloud?','โœ“\x20Profile\x20\x27','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','172731uBYxXi','slice','use_suggestion','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','skipAuth','Mvynb','sBpIB','GCnWN','domains','exit','force','KBLOt','setupHeader','gtkBH','keys','join','signal','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','local','LhOHa','wItDV','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','dqMAZ','isProtocolError','error','status','Ussdo','isTTY','length','user_declined','abort','PyRGA','gCqSk','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x0a\x20\x20Could\x20not\x20reach\x20'];_0x260a=function(){return _0x2ced13;};return _0x260a();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x259c84){const _0x21fea1=_0x48ca,_0x1dfe0f={'RfViH':'HEAD','ewiiB':_0x21fea1(0x21a),'VKUnq':function(_0xd4f652,_0x1f4d5d,_0x4cdeda){return _0xd4f652(_0x1f4d5d,_0x4cdeda);},'nvkkK':function(_0x11df8f,_0x1a7135){return _0x11df8f(_0x1a7135);},'ghbnh':function(_0x31f050,_0x15b8c6){return _0x31f050<_0x15b8c6;},'JExYi':'Invalid\x20URL','lkQSo':'fetch\x20failed'};try{const _0x438d7d=new AbortController(),_0x4c68b6=setTimeout(()=>_0x438d7d[_0x21fea1(0x1fa)](),0x1388),_0x56a418={'method':_0x1dfe0f[_0x21fea1(0x227)],'signal':_0x438d7d[_0x21fea1(0x262)],'redirect':_0x1dfe0f[_0x21fea1(0x222)]};/^https:\/\/localhost(:\d+)?/i[_0x21fea1(0x245)](_0x259c84)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x1dd188=await _0x1dfe0f['VKUnq'](fetch,_0x259c84,_0x56a418);delete process[_0x21fea1(0x20f)][_0x21fea1(0x238)],_0x1dfe0f['nvkkK'](clearTimeout,_0x4c68b6);if(_0x1dfe0f['ghbnh'](_0x1dd188[_0x21fea1(0x1f5)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x1dd188['status']};}catch(_0x18d711){delete process[_0x21fea1(0x20f)][_0x21fea1(0x238)];const _0x37082f=_0x18d711,_0x2fcd40=_0x37082f['message']||String(_0x18d711),_0x2754ac=_0x2fcd40['includes'](_0x1dfe0f[_0x21fea1(0x23d)])||_0x37082f[_0x21fea1(0x213)]==='TypeError'||_0x2fcd40['includes'](_0x1dfe0f['lkQSo']);return{'ok':![],'error':_0x2fcd40,'isProtocolError':_0x2754ac};}}async function sweepOrphanLocalProfile(_0x1da532,_0x38702f,_0xf1887e){const _0x451cb7=_0x48ca,_0x5387c4={'gtkBH':_0x451cb7(0x266),'rsONk':function(_0x16c66d,_0xe9479f,_0x4e6284){return _0x16c66d(_0xe9479f,_0x4e6284);},'dqMAZ':function(_0x11a5c7,_0x52509c){return _0x11a5c7(_0x52509c);},'sBpIB':function(_0xcad340,_0x5b98b9,_0x471262){return _0xcad340(_0x5b98b9,_0x471262);},'PyRGA':function(_0x6c5e79,_0x2dadef){return _0x6c5e79(_0x2dadef);}},_0x5381e9=join(_0x38702f,_0x5387c4[_0x451cb7(0x25f)]),_0xb60c82=_0x5387c4['rsONk'](join,_0x5381e9,_0x1da532);_0x5387c4[_0x451cb7(0x1f2)](existsSync,_0xb60c82)&&(_0xf1887e&&await isPathGitTracked(_0xb60c82)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xb60c82+'\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x5387c4[_0x451cb7(0x258)](rm,_0xb60c82,{'recursive':!![],'force':!![]}),console[_0x451cb7(0x214)](_0x451cb7(0x244)+_0xb60c82)));if(_0x5387c4[_0x451cb7(0x1fb)](existsSync,_0x5381e9)){let _0x1d33bc=[];try{_0x1d33bc=await _0x5387c4[_0x451cb7(0x1f2)](readdir,_0x5381e9);}catch{return;}const _0x227998=_0x451cb7(0x23e)+_0x1da532+'-';for(const _0x5bfa55 of _0x1d33bc){if(!_0x5bfa55['startsWith'](_0x227998))continue;const _0x57dabe=join(_0x5381e9,_0x5bfa55);await rm(_0x57dabe,{'recursive':!![],'force':!![]}),console['log'](_0x451cb7(0x244)+_0x57dabe);}}}async function sweepOrphansBestEffort(_0x13e90d){const _0x5549af=_0x48ca,_0x42049b={'XNCdq':function(_0x5c6ac0){return _0x5c6ac0();},'wPAhk':function(_0x4fb46e){return _0x4fb46e();},'lIGLa':function(_0x5f4f23,_0x5114a5){return _0x5f4f23(_0x5114a5);}};try{await sweepOrphanLocalProfile(_0x13e90d,_0x42049b['XNCdq'](getRangerHomeDir),![]);const _0x4976d7=_0x42049b[_0x5549af(0x211)](getRangerDir);_0x4976d7!==_0x42049b[_0x5549af(0x211)](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x13e90d,_0x4976d7,!![]);}catch(_0x3e3799){console[_0x5549af(0x214)](_0x5549af(0x232)+(_0x3e3799 instanceof Error?_0x3e3799[_0x5549af(0x22a)]:_0x42049b[_0x5549af(0x212)](String,_0x3e3799))+').');}}async function markActive(_0x49f289){const _0x300e64=_0x48ca;try{await writeActiveProfileName(_0x49f289),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x49f289);}catch{console[_0x300e64(0x214)](_0x300e64(0x22c));}}async function tryAutoRouteCloudProfile(_0xcbfd6d,_0x6c84c3,_0x35c16c,_0x209960,_0x48df52){const _0x44b2c3=_0x48ca,_0x5f837a={'RSdGf':function(_0x14870e){return _0x14870e();},'GCnWN':'no_auth_config','Hzpba':function(_0xd6bb48,_0x4461e9){return _0xd6bb48===_0x4461e9;},'LhOHa':'profile.add.autoRouteSkipped','XUAvz':function(_0x417c0b,_0x5e84aa){return _0x417c0b+_0x5e84aa;},'dzavu':function(_0xc5bdd8,_0xf0d819){return _0xc5bdd8+_0xf0d819;},'xFUJl':'\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','hiEEe':_0x44b2c3(0x208),'lpPYi':'saveToCloud','jxToh':_0x44b2c3(0x1fd),'zbPQw':function(_0x53c1b5,_0x51c594,_0x51eb4d,_0x5f389f){return _0x53c1b5(_0x51c594,_0x51eb4d,_0x5f389f);},'YpwMf':function(_0x460f5d,_0x4321d7){return _0x460f5d(_0x4321d7);}};let _0x5b4036;try{_0x5b4036=await _0x5f837a['RSdGf'](fetchAuthConfig);}catch(_0x73ed33){return _0x48df52?.[_0x44b2c3(0x202)]('profile.add.autoRouteSkipped',{'reason':_0x5f837a[_0x44b2c3(0x259)],'profileName':_0xcbfd6d}),console[_0x44b2c3(0x1f4)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x73ed33 instanceof Error?_0x73ed33['message']:String(_0x73ed33))),![];}if(!_0x5b4036||!_0x5b4036['environments']||_0x5f837a[_0x44b2c3(0x223)](Object['keys'](_0x5b4036[_0x44b2c3(0x210)])[_0x44b2c3(0x1f8)],0x0)){if(_0x209960)return await captureEnvLessProfile(_0xcbfd6d,_0x6c84c3,_0x35c16c,_0x48df52);return _0x48df52?.['trackPhaseEnd'](_0x5f837a[_0x44b2c3(0x267)],{'reason':'no_auth_config','profileName':_0xcbfd6d}),console['error'](_0x5f837a[_0x44b2c3(0x21b)](_0x5f837a['dzavu'](_0x5f837a['dzavu'](_0x5f837a[_0x44b2c3(0x242)]+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0xcbfd6d+_0x44b2c3(0x218)+_0x6c84c3+'\x20--skip-auth\x0a'),'\x0a'),_0x5f837a[_0x44b2c3(0x230)])+_0x44b2c3(0x23b)),![];}const _0x170190=matchAuthEnvironment(_0x6c84c3,_0x5b4036);if(!_0x170190)return _0x48df52?.['trackPhaseEnd'](_0x44b2c3(0x224),{'reason':'no_match','profileName':_0xcbfd6d}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x6c84c3+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x5b4036[_0x44b2c3(0x210)])[_0x44b2c3(0x261)](',\x20')+'.'),![];const _0x3b2431=_0x5b4036[_0x44b2c3(0x210)][_0x170190],_0x1b6445=_0x3b2431?.[_0x44b2c3(0x25a)]??[];if(_0x209960&&!_0x35c16c['yes']){const {saveToCloud:_0x2e5fb9}=await _0x72d912[_0x44b2c3(0x21e)]([{'type':_0x44b2c3(0x225),'name':_0x5f837a[_0x44b2c3(0x22b)],'message':_0x44b2c3(0x216)+_0x170190+'\x27\x20matching\x20'+_0x6c84c3+'\x0a\x20\x20(domains:\x20'+_0x1b6445[_0x44b2c3(0x261)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xcbfd6d+_0x44b2c3(0x24e),'default':!![]}]);if(!_0x2e5fb9)return _0x48df52?.['trackPhaseEnd'](_0x5f837a[_0x44b2c3(0x267)],{'reason':_0x44b2c3(0x1f9),'profileName':_0xcbfd6d}),console[_0x44b2c3(0x1f4)](_0x5f837a[_0x44b2c3(0x21d)]),![];}const _0x1b3714=_0x1b6445['some'](_0x1320f6=>{const _0x363f5a=_0x44b2c3;try{return new URL(_0x1320f6)[_0x363f5a(0x241)]===new URL(_0x6c84c3)[_0x363f5a(0x241)];}catch{return![];}}),_0x16a831={};!_0x1b3714&&(_0x16a831[_0x44b2c3(0x21f)]=_0x6c84c3);try{await _0x5f837a[_0x44b2c3(0x203)](createCloudProfile,_0xcbfd6d,_0x170190,{'settings':_0x16a831});}catch(_0x406c4d){if(_0x406c4d instanceof ApiError&&_0x406c4d[_0x44b2c3(0x1f5)]===0x199){console[_0x44b2c3(0x1f4)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0xcbfd6d+_0x44b2c3(0x234));throw _0x406c4d;}throw _0x406c4d;}return console[_0x44b2c3(0x214)](_0x44b2c3(0x24f)+_0xcbfd6d+'\x27\x20created.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0xcbfd6d)),await _0x5f837a['YpwMf'](sweepOrphansBestEffort,_0xcbfd6d),_0x48df52?.['trackPhaseEnd'](_0x44b2c3(0x231),{'envKey':_0x170190,'profileName':_0xcbfd6d}),!![];}async function createUnconfiguredCloudProfile(_0x3df749,_0x4237d0){const _0x446c36=_0x48ca,_0x4b0628={'sOyWx':function(_0x4e861b,_0x1ccab2){return _0x4e861b===_0x1ccab2;}};try{await createCloudProfile(_0x3df749,undefined,{'settings':_0x4237d0});}catch(_0x4979b5){_0x4979b5 instanceof ApiError&&_0x4b0628[_0x446c36(0x226)](_0x4979b5[_0x446c36(0x1f5)],0x199)&&console['error'](_0x446c36(0x255)+_0x3df749+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x4979b5;}}async function captureEnvLessProfile(_0x19fe41,_0x58bb18,_0x11303b,_0x45c52a){const _0x3596bd=_0x48ca,_0x31990e={'luCSF':'capture','oePBX':'user_declined','eMFUf':function(_0x4b49d4,_0x1a0216){return _0x4b49d4+_0x1a0216;},'plQCG':function(_0x513a54,_0x163037){return _0x513a54===_0x163037;},'PYajg':function(_0x25a8bf,_0x541309){return _0x25a8bf>_0x541309;},'flWmJ':function(_0x32cfb8,_0x3cd880,_0x50a5f5,_0x28c259){return _0x32cfb8(_0x3cd880,_0x50a5f5,_0x28c259);},'UGfGd':function(_0x33dae2,_0x1698c1,_0x19bc53){return _0x33dae2(_0x1698c1,_0x19bc53);},'GUukE':function(_0x398bcf,_0x301641){return _0x398bcf>_0x301641;}};if(!_0x11303b['yes']){const {capture:_0x36dee2}=await _0x72d912[_0x3596bd(0x21e)]([{'type':_0x3596bd(0x225),'name':_0x31990e['luCSF'],'message':_0x3596bd(0x254),'default':!![]}]);if(!_0x36dee2)return _0x45c52a?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x31990e['oePBX'],'profileName':_0x19fe41}),console['error'](_0x31990e['eMFUf'](_0x3596bd(0x264),_0x3596bd(0x1f1))),![];}const _0x15c818={};if(_0x11303b[_0x3596bd(0x25e)])for(const _0x1c3d4a of _0x11303b[_0x3596bd(0x25e)]){const _0x1f48a5=_0x1c3d4a[_0x3596bd(0x200)](':');if(_0x31990e['plQCG'](_0x1f48a5,-0x1))continue;_0x15c818[_0x1c3d4a['slice'](0x0,_0x1f48a5)['trim']()]=_0x1c3d4a[_0x3596bd(0x252)](_0x1f48a5+0x1)[_0x3596bd(0x20d)]();}const _0x525463={'baseUrl':_0x58bb18};_0x31990e['PYajg'](Object[_0x3596bd(0x260)](_0x15c818)[_0x3596bd(0x1f8)],0x0)&&(_0x525463['setupHeaders']=_0x15c818);let _0x311f47;try{_0x311f47=await _0x31990e['flWmJ'](createCloudProfile,_0x19fe41,undefined,{'settings':_0x525463});}catch(_0x470f15){_0x470f15 instanceof ApiError&&_0x31990e['plQCG'](_0x470f15[_0x3596bd(0x1f5)],0x199)&&console['error'](_0x3596bd(0x255)+_0x19fe41+_0x3596bd(0x234));throw _0x470f15;}return await _0x31990e['UGfGd'](manualBrowserLogin,_0x311f47,{'key':'','domains':[_0x58bb18],'setupHeaders':_0x31990e[_0x3596bd(0x219)](Object['keys'](_0x15c818)[_0x3596bd(0x1f8)],0x0)?_0x15c818:undefined}),console[_0x3596bd(0x214)](_0x3596bd(0x233)+_0x19fe41+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x19fe41)),await sweepOrphansBestEffort(_0x19fe41),_0x45c52a?.['trackPhaseEnd'](_0x3596bd(0x231),{'envKey':null,'profileName':_0x19fe41}),!![];}export async function addEnv(_0x300fba,_0x1607e4={},_0x2fb957){const _0x31ba3b=_0x48ca,_0x5eafc4={'iYIxR':function(_0x5866fc,_0x3b1616){return _0x5866fc+_0x3b1616;},'CznuZ':function(_0x1de358,_0x3cd2b6){return _0x1de358+_0x3cd2b6;},'zhvkH':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','lUiKy':_0x31ba3b(0x20c),'QJENR':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','bVxBX':'\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','JnHDJ':function(_0x343967,_0x15c90e){return _0x343967>_0x15c90e;},'UajKT':function(_0x4e0bdd,_0xd72de5,_0x4cc781){return _0x4e0bdd(_0xd72de5,_0x4cc781);},'ZXQru':function(_0x17b89a,_0x1a1672,_0x5e995f,_0x35f43a,_0x410a61){return _0x17b89a(_0x1a1672,_0x5e995f,_0x35f43a,_0x410a61);},'jUVIn':function(_0x28ea4c,_0x2568e0){return _0x28ea4c instanceof _0x2568e0;},'wItDV':function(_0xea34f4,_0x400c42){return _0xea34f4(_0x400c42);},'jxALd':function(_0x57b3b2,_0x4dcc75){return _0x57b3b2+_0x4dcc75;},'InDWV':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','OJWeW':_0x31ba3b(0x249),'bamFi':'input','dtaAd':_0x31ba3b(0x250),'VQnJc':function(_0xc0c12f,_0x4b6d63){return _0xc0c12f||_0x4b6d63;},'TFtTE':function(_0x4e68c2,_0x24a923){return _0x4e68c2(_0x24a923);},'EJoUh':'list','cASfG':_0x31ba3b(0x253),'Mvynb':'Enter\x20a\x20different\x20URL','Ussdo':_0x31ba3b(0x24b),'KBLOt':function(_0x42db08,_0x382990){return _0x42db08===_0x382990;},'gCqSk':function(_0x1403cc,_0x22f71d){return _0x1403cc(_0x22f71d);}};_0x1607e4['ci']&&(console['error'](_0x5eafc4['iYIxR'](_0x5eafc4['iYIxR'](_0x5eafc4[_0x31ba3b(0x23a)](_0x5eafc4[_0x31ba3b(0x23a)](_0x5eafc4['CznuZ'](_0x5eafc4[_0x31ba3b(0x24c)],_0x5eafc4['lUiKy'])+'\x0a',_0x31ba3b(0x265)),_0x5eafc4[_0x31ba3b(0x207)]),'\x0a'),_0x31ba3b(0x22d))+_0x31ba3b(0x221)),process[_0x31ba3b(0x25b)](0x1));const _0x3c48dd={};if(_0x1607e4['setupHeader'])for(const _0x2379d0 of _0x1607e4['setupHeader']){const _0x2c1790=_0x2379d0[_0x31ba3b(0x200)](':');if(_0x2c1790===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2379d0+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x526f61=_0x2379d0[_0x31ba3b(0x252)](0x0,_0x2c1790)['trim'](),_0x4c9ad6=_0x2379d0['slice'](_0x2c1790+0x1)['trim']();_0x3c48dd[_0x526f61]=_0x4c9ad6;}if(_0x1607e4[_0x31ba3b(0x21c)]!==undefined&&_0x1607e4[_0x31ba3b(0x21c)]['trim']()==='')throw new Error(_0x31ba3b(0x22e));if(_0x1607e4[_0x31ba3b(0x21c)]&&_0x1607e4['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x22c229=Boolean(_0x1607e4['cdpEndpoint']),_0xa6d41f=process['stdin'][_0x31ba3b(0x1f7)]&&process[_0x31ba3b(0x24a)][_0x31ba3b(0x1f7)];if(!_0xa6d41f&&!_0x1607e4[_0x31ba3b(0x205)]&&!_0x22c229&&!_0x1607e4[_0x31ba3b(0x256)])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(_0x22c229){const _0x45b9c5=_0x1607e4['cdpEndpoint'];console[_0x31ba3b(0x214)](_0x5eafc4['bVxBX']),console[_0x31ba3b(0x214)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x45b9c5);const _0x2f8f7e={'cdpEndpoint':_0x45b9c5,'isElectron':!![]};_0x5eafc4['JnHDJ'](Object[_0x31ba3b(0x260)](_0x3c48dd)['length'],0x0)&&(_0x2f8f7e[_0x31ba3b(0x215)]=_0x3c48dd);await _0x5eafc4[_0x31ba3b(0x246)](createUnconfiguredCloudProfile,_0x300fba,_0x2f8f7e);try{_0x5eafc4[_0x31ba3b(0x204)](setProfileOverride,process['cwd'](),_0x300fba,_0x31ba3b(0x21c),_0x45b9c5),_0x5eafc4[_0x31ba3b(0x204)](setProfileOverride,process['cwd'](),_0x300fba,'isElectron',!![]);}catch(_0x79a79a){console[_0x31ba3b(0x1f4)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x5eafc4[_0x31ba3b(0x23f)](_0x79a79a,Error)?_0x79a79a[_0x31ba3b(0x22a)]:String(_0x79a79a)));}console['log']('โœ“\x20Cloud\x20profile\x20\x27'+_0x300fba+'\x27\x20created\x20(CDP).'),await _0x5eafc4['wItDV'](sweepOrphansBestEffort,_0x300fba),await _0x5eafc4[_0x31ba3b(0x268)](markActive,_0x300fba);return;}if(_0x1607e4['skipAuth']){const _0x219046={};_0x1607e4[_0x31ba3b(0x205)]&&(_0x219046[_0x31ba3b(0x21f)]=_0x1607e4['url']);Object[_0x31ba3b(0x260)](_0x3c48dd)['length']>0x0&&(_0x219046[_0x31ba3b(0x215)]=_0x3c48dd);await createUnconfiguredCloudProfile(_0x300fba,_0x219046),console['log'](_0x5eafc4[_0x31ba3b(0x24d)](_0x31ba3b(0x24f)+_0x300fba+'\x27\x20created\x20(no\x20session).\x0a',_0x31ba3b(0x263)+_0x300fba+_0x31ba3b(0x228))),await sweepOrphansBestEffort(_0x300fba),await markActive(_0x300fba);return;}if(_0x1607e4[_0x31ba3b(0x205)]){const _0x32ffcd=_0x1607e4[_0x31ba3b(0x205)],_0x38b3fc=await _0x5eafc4['wItDV'](checkUrlReachability,_0x32ffcd);if(!_0x38b3fc['ok']&&!_0x1607e4['force'])throw new Error('Could\x20not\x20reach\x20'+_0x32ffcd+':\x20'+_0x38b3fc['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x38b3fc['ok']&&_0x1607e4[_0x31ba3b(0x25c)]&&console['log']('โš \x20Could\x20not\x20reach\x20'+_0x32ffcd+':\x20'+_0x38b3fc['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x31ba3b(0x214)]('\x0a๐ŸŒ\x20Profile\x20Setup\x0a'),console[_0x31ba3b(0x214)](_0x5eafc4['InDWV']),console['log'](_0x5eafc4['OJWeW']);let _0xc1ef00='',_0x22aa3b=![];while(!![]){const _0x11ed8d=await _0x72d912['prompt']([{'type':_0x5eafc4['bamFi'],'name':'baseUrl','message':_0x22aa3b?_0x5eafc4['dtaAd']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x5eafc4[_0x31ba3b(0x23c)](_0xc1ef00,_0x31ba3b(0x240))}]);_0xc1ef00=_0x11ed8d[_0x31ba3b(0x21f)];const _0x5a4048=await _0x5eafc4['TFtTE'](checkUrlReachability,_0xc1ef00);if(_0x5a4048['ok'])break;const _0x2674bb=/^[a-zA-Z][\w+.-]*:\/\//[_0x31ba3b(0x245)](_0xc1ef00),_0x1f791e=_0x5a4048[_0x31ba3b(0x1f3)]&&!_0x2674bb,_0x3da0bc=_0x1f791e?_0x31ba3b(0x236)+_0xc1ef00:null;_0x22aa3b=!![],console['log'](_0x31ba3b(0x1fe)+_0xc1ef00+':\x20'+_0x5a4048['error']);_0x3da0bc&&console[_0x31ba3b(0x214)](_0x31ba3b(0x22f)+_0x3da0bc+'?');const {action:_0x230062}=await _0x72d912[_0x31ba3b(0x21e)]([{'type':_0x5eafc4[_0x31ba3b(0x248)],'name':'action','message':_0x31ba3b(0x201),'choices':[..._0x3da0bc?[{'name':_0x31ba3b(0x20a)+_0x3da0bc,'value':_0x5eafc4[_0x31ba3b(0x20b)]}]:[],{'name':_0x5eafc4[_0x31ba3b(0x257)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x5eafc4[_0x31ba3b(0x1f6)]}]}]);if(_0x230062===_0x31ba3b(0x253)&&_0x3da0bc){_0xc1ef00=_0x3da0bc;const _0x4dba1c=await checkUrlReachability(_0xc1ef00);if(_0x4dba1c['ok'])break;console[_0x31ba3b(0x214)](_0x31ba3b(0x237)+_0xc1ef00+':\x20'+_0x4dba1c['error']);}else{if(_0x5eafc4[_0x31ba3b(0x25d)](_0x230062,'continue'))break;}}_0x1607e4={..._0x1607e4,'url':_0xc1ef00};}let _0xcef6d8=![];try{_0xcef6d8=await tryAutoRouteCloudProfile(_0x300fba,_0x1607e4['url'],_0x1607e4,_0xa6d41f,_0x2fb957);}catch(_0x252ddf){console['error'](_0x31ba3b(0x247)+_0x300fba+_0x31ba3b(0x235)+(_0x5eafc4[_0x31ba3b(0x23f)](_0x252ddf,Error)?_0x252ddf[_0x31ba3b(0x22a)]:_0x5eafc4[_0x31ba3b(0x1fc)](String,_0x252ddf))),process['exit'](0x1);}!_0xcef6d8&&process[_0x31ba3b(0x25b)](0x1),await _0x5eafc4[_0x31ba3b(0x243)](markActive,_0x300fba);}
@@ -1 +1 @@
1
- (function(_0x1fdf33,_0x1a4ba4){const _0x1d882c=_0xe03f,_0xde88a6=_0x1fdf33();while(!![]){try{const _0x11f2f3=-parseInt(_0x1d882c(0x186))/0x1+-parseInt(_0x1d882c(0x181))/0x2+-parseInt(_0x1d882c(0x190))/0x3*(-parseInt(_0x1d882c(0x18b))/0x4)+parseInt(_0x1d882c(0x183))/0x5*(-parseInt(_0x1d882c(0x18a))/0x6)+-parseInt(_0x1d882c(0x182))/0x7+-parseInt(_0x1d882c(0x184))/0x8*(parseInt(_0x1d882c(0x18c))/0x9)+parseInt(_0x1d882c(0x194))/0xa*(parseInt(_0x1d882c(0x18d))/0xb);if(_0x11f2f3===_0x1a4ba4)break;else _0xde88a6['push'](_0xde88a6['shift']());}catch(_0x1df977){_0xde88a6['push'](_0xde88a6['shift']());}}}(_0x298b,0xa6f46));function _0x298b(){const _0x38251e=['461791sTnhUC','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','3bOYPyO','log','utf-8','\x0aโœ“\x20Encrypted\x20auth\x20saved\x20to:\x20','820kWWdvT','No\x20auth.json\x20found\x20at\x20','ttgJt','400200rwyEWp','1588608omhgdh','55670VnhUBx','8MQDwcG','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','810693VAcGaq','\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','auth.json','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','714DbTcLM','1998532kJZOpj','6259914NWawYI'];_0x298b=function(){return _0x38251e;};return _0x298b();}function _0xe03f(_0x85a53c,_0x467a48){_0x85a53c=_0x85a53c-0x181;const _0x298bca=_0x298b();let _0xe03f57=_0x298bca[_0x85a53c];return _0xe03f57;}import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x43b1a8){const _0xade174=_0xe03f,_0x3cc2d7={'ttgJt':_0xade174(0x188),'AjYuC':'.enc','aonEJ':function(_0x5a5b72,_0x56c6ea){return _0x5a5b72(_0x56c6ea);},'rhNvY':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','pvqWF':function(_0x339663,_0x33086f,_0x4d5358){return _0x339663(_0x33086f,_0x4d5358);},'EKCDp':_0xade174(0x192),'JkzDo':function(_0x4f1f09,_0x590cc4,_0x4d8929){return _0x4f1f09(_0x590cc4,_0x4d8929);},'UmDaA':_0xade174(0x185)},_0x1c4bd8=getEnvDir(_0x43b1a8),_0x27a4a1=join(_0x1c4bd8,_0x3cc2d7[_0xade174(0x196)]),_0x23034b=_0x27a4a1+_0x3cc2d7['AjYuC'];if(!existsSync(_0x1c4bd8))throw new Error('Profile\x20\x22'+_0x43b1a8+_0xade174(0x18f)+_0x43b1a8);if(!_0x3cc2d7['aonEJ'](existsSync,_0x27a4a1))throw new Error(_0xade174(0x195)+_0x27a4a1+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update');const _0x394c04=await getToken();if(!_0x394c04)throw new Error(_0x3cc2d7['rhNvY']);const _0x1fb50c=await _0x3cc2d7['pvqWF'](readFile,_0x27a4a1,_0x3cc2d7['EKCDp']),_0x4e23aa=_0x3cc2d7['JkzDo'](encrypt,_0x1fb50c,_0x394c04);await _0x3cc2d7['JkzDo'](writeFile,_0x23034b,_0x4e23aa),console['log'](_0xade174(0x193)+_0x23034b),console['log'](_0xade174(0x189)),console[_0xade174(0x191)](_0x3cc2d7['UmDaA']),existsSync(_0x23034b)&&(console['log'](_0xade174(0x187)),console[_0xade174(0x191)](_0xade174(0x18e)));}
1
+ function _0x3c9d(){var _0x534b57=['4093590LSdBTe','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','5966982ElSXcA','\x20\x20https://docs.ranger.net/main/concepts/profiles','ITBiH','10195uolVoR','990SNNIPf','51196dieIAz','KqCNx','51mHtPSk','1729360LWidhz','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','2HDTjrg','2535030lqDHXB','46210mHMKix'];_0x3c9d=function(){return _0x534b57;};return _0x3c9d();}function _0x3156(_0x2e0697,_0x3ea30f){_0x2e0697=_0x2e0697-0x1e3;var _0x3c9d11=_0x3c9d();var _0x31563a=_0x3c9d11[_0x2e0697];return _0x31563a;}(function(_0x32b7d7,_0x1c0932){var _0x94e014=_0x3156,_0x444ebc=_0x32b7d7();while(!![]){try{var _0xbf1ff2=-parseInt(_0x94e014(0x1e3))/0x1*(parseInt(_0x94e014(0x1e5))/0x2)+-parseInt(_0x94e014(0x1f0))/0x3*(-parseInt(_0x94e014(0x1ee))/0x4)+-parseInt(_0x94e014(0x1ec))/0x5*(-parseInt(_0x94e014(0x1ed))/0x6)+parseInt(_0x94e014(0x1e9))/0x7+-parseInt(_0x94e014(0x1f1))/0x8+-parseInt(_0x94e014(0x1e4))/0x9+-parseInt(_0x94e014(0x1e6))/0xa;if(_0xbf1ff2===_0x1c0932)break;else _0x444ebc['push'](_0x444ebc['shift']());}catch(_0x3884a9){_0x444ebc['push'](_0x444ebc['shift']());}}}(_0x3c9d,0x6e9ab));export async function authEncrypt(_0xe2f21){var _0x5369d0=_0x3156,_0x5e91f6={'Niijl':function(_0x2c65fe,_0x3b6eed){return _0x2c65fe+_0x3b6eed;},'ITBiH':function(_0x1de21b,_0x272c46){return _0x1de21b+_0x272c46;},'KqCNx':_0x5369d0(0x1e7),'WIFxA':_0x5369d0(0x1f2),'UwDuF':_0x5369d0(0x1e8),'HDHoe':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console['error'](_0x5e91f6['Niijl'](_0x5e91f6[_0x5369d0(0x1eb)](_0x5e91f6[_0x5369d0(0x1ef)],_0x5e91f6['WIFxA'])+'\x0a'+_0x5e91f6['UwDuF']+_0x5e91f6['HDHoe']+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x5369d0(0x1ea))),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x1fd529=_0x55fa;function _0x55fa(_0x65c860,_0x3da436){_0x65c860=_0x65c860-0x19c;const _0xf07ccf=_0xf07c();let _0x55facb=_0xf07ccf[_0x65c860];return _0x55facb;}(function(_0x3ec892,_0x289fdf){const _0x8ad10b=_0x55fa,_0x28af0a=_0x3ec892();while(!![]){try{const _0xb04d8a=-parseInt(_0x8ad10b(0x1bc))/0x1*(parseInt(_0x8ad10b(0x1bb))/0x2)+-parseInt(_0x8ad10b(0x1c6))/0x3*(parseInt(_0x8ad10b(0x1ac))/0x4)+-parseInt(_0x8ad10b(0x1c2))/0x5*(-parseInt(_0x8ad10b(0x19d))/0x6)+-parseInt(_0x8ad10b(0x1a2))/0x7*(parseInt(_0x8ad10b(0x1b3))/0x8)+-parseInt(_0x8ad10b(0x1cb))/0x9+parseInt(_0x8ad10b(0x1a1))/0xa+parseInt(_0x8ad10b(0x1a6))/0xb*(parseInt(_0x8ad10b(0x1c3))/0xc);if(_0xb04d8a===_0x289fdf)break;else _0x28af0a['push'](_0x28af0a['shift']());}catch(_0x308531){_0x28af0a['push'](_0x28af0a['shift']());}}}(_0xf07c,0x1ba95));function _0xf07c(){const _0x17b4e5=['feature-tracker','e2e-test-recommender','YKPta','82926feqvis','@ranger-testing/opencode-plugin','platform','\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PQidy','stringify','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','\x0aโœ…\x20Cleanup\x20complete!\x0a','lJwpm','GtiKA','MdmrX','โœ“\x20Removed\x20stored\x20credentials','30nWjhHP','user','pipe','HhrPd','79810kxOWqi','91FJLCYh','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','budRR','--scope','7447uLNkRl','claude','Nothing\x20to\x20clean\x20up.\x0a','VvITW','replace','length','4RHeaJw','project','yxZni','log','LVJvD','โœ“\x20Removed\x20trailhead\x20marketplace','trailhead','73960eiuDuS','uninstall','โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','plugin','JENWG','โœ“\x20Removed\x20.ranger/\x20directory','ranger@trailhead','voWMu','70fLNkAq','3719pJxEgl','nGKaV','OgGFd','โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20','zqfll','xciwd','171245KYIQQf','5736bCutFf','qTvxv','CoTxd','389901wbHRIn','BVUQa'];_0xf07c=function(){return _0x17b4e5;};return _0xf07c();}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',_0x1fd529(0x1c8),'bug-bash',_0x1fd529(0x1c9)],opencodePluginName=_0x1fd529(0x1cc);function parseJsonc(_0x1046cc){const _0xa289b2=_0x1fd529,_0x4d48e1=_0x1046cc[_0xa289b2(0x1aa)](/\/\*[\s\S]*?\*\//g,''),_0x4d092d=_0x4d48e1[_0xa289b2(0x1aa)](/^\s*\/\/.*$/gm,''),_0x48d920=_0x4d092d['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x48d920);}async function removeOpencodePluginConfig(_0x40ce73){const _0x3e12a7=_0x1fd529,_0x12f4d8={'JENWG':function(_0x280647,_0xafc453){return _0x280647(_0xafc453);},'YKPta':function(_0x4b017b,_0x320d77,_0x3ca83d){return _0x4b017b(_0x320d77,_0x3ca83d);},'kwhHb':'utf-8','VvITW':function(_0x4e5a09,_0x279980){return _0x4e5a09===_0x279980;},'TCOZv':function(_0x5ac9ae,_0x4a08bc){return _0x5ac9ae+_0x4a08bc;}};if(!_0x12f4d8[_0x3e12a7(0x1b7)](existsSync,_0x40ce73))return![];let _0x132806;try{const _0x383018=await _0x12f4d8[_0x3e12a7(0x1ca)](readFile,_0x40ce73,_0x12f4d8['kwhHb']);_0x132806=parseJsonc(_0x383018);}catch{return![];}const _0x1fb49b=Array['isArray'](_0x132806[_0x3e12a7(0x1b6)])?_0x132806['plugin']:[];if(_0x1fb49b[_0x3e12a7(0x1ab)]===0x0)return![];const _0x13f975=_0x1fb49b['filter'](_0x43439e=>{if(typeof _0x43439e!=='string')return!![];return _0x43439e!==opencodePluginName;});if(_0x12f4d8['VvITW'](_0x13f975['length'],_0x1fb49b['length']))return![];return _0x12f4d8[_0x3e12a7(0x1a9)](_0x13f975[_0x3e12a7(0x1ab)],0x0)?delete _0x132806[_0x3e12a7(0x1b6)]:_0x132806[_0x3e12a7(0x1b6)]=_0x13f975,await _0x12f4d8['YKPta'](writeFile,_0x40ce73,_0x12f4d8['TCOZv'](JSON[_0x3e12a7(0x1d0)](_0x132806,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x27ca7a){const _0x24ef45=_0x1fd529,_0x56fd41={'zqfll':function(_0x3a071f,_0x427c5b){return _0x3a071f(_0x427c5b);},'YoSiH':function(_0x47c347,_0xa3a2ea){return _0x47c347===_0xa3a2ea;},'GBMBn':_0x24ef45(0x1b9),'xciwd':_0x24ef45(0x1a7),'CoTxd':_0x24ef45(0x19f),'BeXpf':function(_0x56cd00,_0x48e4ba){return _0x56cd00===_0x48e4ba;},'Dtump':'win32'};return new Promise(_0x3a3852=>{const _0x5bc66b=_0x24ef45,_0x22726a=[_0x5bc66b(0x1b6),_0x5bc66b(0x1b4),_0x56fd41['GBMBn']];_0x27ca7a&&_0x22726a['push'](_0x5bc66b(0x1a5),_0x27ca7a);const _0x17efe1=spawn(_0x56fd41[_0x5bc66b(0x1c1)],_0x22726a,{'stdio':_0x56fd41[_0x5bc66b(0x1c5)],'shell':_0x56fd41['BeXpf'](process['platform'],_0x56fd41['Dtump'])});_0x17efe1['on']('close',_0x40f6c8=>{const _0x5147ea=_0x5bc66b;_0x56fd41[_0x5147ea(0x1c0)](_0x3a3852,_0x56fd41['YoSiH'](_0x40f6c8,0x0));}),_0x17efe1['on']('error',()=>{_0x3a3852(![]);});});}async function removeMarketplace(){const _0x467b7d=_0x1fd529,_0x2129f2={'JcbdY':function(_0x2e7f9c,_0x3bb03f){return _0x2e7f9c===_0x3bb03f;},'MdmrX':'claude','nGKaV':'remove','GtiKA':_0x467b7d(0x1b2),'qTvxv':'win32','Uvvrf':'close'};return new Promise(_0x1f16e3=>{const _0x2b4e33=_0x467b7d,_0x4130e3=spawn(_0x2129f2[_0x2b4e33(0x1d5)],['plugin','marketplace',_0x2129f2[_0x2b4e33(0x1bd)],_0x2129f2[_0x2b4e33(0x1d4)]],{'stdio':_0x2b4e33(0x19f),'shell':process[_0x2b4e33(0x1cd)]===_0x2129f2[_0x2b4e33(0x1c4)]});_0x4130e3['on'](_0x2129f2['Uvvrf'],_0x50ae0f=>{_0x1f16e3(_0x2129f2['JcbdY'](_0x50ae0f,0x0));}),_0x4130e3['on']('error',()=>{_0x1f16e3(![]);});});}export async function clean(){const _0x19c689=_0x1fd529,_0xbfac01={'gfAMM':_0x19c689(0x1ce),'hJIhr':function(_0x5ef6de){return _0x5ef6de();},'lJwpm':function(_0x490795,_0x5ba6ec){return _0x490795(_0x5ba6ec);},'fIRFg':function(_0x18b05f,_0x36e559){return _0x18b05f(_0x36e559);},'VHpCo':function(_0x322371,_0x20243d,_0x12f968){return _0x322371(_0x20243d,_0x12f968);},'budRR':function(_0x4692a0,_0x54e9de,_0x5d91b5){return _0x4692a0(_0x54e9de,_0x5d91b5);},'OgGFd':function(_0x3e1247,_0xb90626){return _0x3e1247(_0xb90626);},'yxZni':function(_0xb8e31f,_0x3a3570,_0x1e70f4){return _0xb8e31f(_0x3a3570,_0x1e70f4);},'Pmzpm':function(_0x23aebf,_0x41132e,_0x3c23cd){return _0x23aebf(_0x41132e,_0x3c23cd);},'vkQKf':function(_0x4f2d8c,_0x297ed9,_0x779a2d){return _0x4f2d8c(_0x297ed9,_0x779a2d);},'HhrPd':_0x19c689(0x1ad),'BVUQa':'opencode.json','voWMu':function(_0x33fe36,_0x1f0871,_0x45e8e7){return _0x33fe36(_0x1f0871,_0x45e8e7);},'LVJvD':'user','PQidy':_0x19c689(0x1b5),'tUtqU':_0x19c689(0x1d1),'TSDMx':_0x19c689(0x1d2),'OraBn':_0x19c689(0x1a8)};console['log'](_0xbfac01['gfAMM']);let _0x37c51f=![];try{await deleteAllCredentials(),console['log'](_0x19c689(0x19c)),_0x37c51f=!![];}catch{}const _0x48043a=_0xbfac01['hJIhr'](getCacheFile);existsSync(_0x48043a)&&(await rm(_0x48043a),_0x37c51f=!![]);const _0x5aa078=_0xbfac01['hJIhr'](getRangerDir);_0xbfac01['lJwpm'](existsSync,_0x5aa078)&&(await rm(_0x5aa078,{'recursive':!![]}),console[_0x19c689(0x1af)](_0x19c689(0x1b8)),_0x37c51f=!![]);const _0x35faa0=_0xbfac01['hJIhr'](getProjectSkillsDir);for(const _0x2b5626 of skillsToRemove){const _0x47cea1=join(_0x35faa0,_0x2b5626);_0xbfac01['fIRFg'](existsSync,_0x47cea1)&&(await _0xbfac01['VHpCo'](rm,_0x47cea1,{'recursive':!![]}),console[_0x19c689(0x1af)]('โœ“\x20Removed\x20project\x20skill:\x20'+_0x2b5626),_0x37c51f=!![]);}const _0x13028f=getUserSkillsDir();for(const _0x33254b of skillsToRemove){const _0x1a8b25=_0xbfac01[_0x19c689(0x1a4)](join,_0x13028f,_0x33254b);_0xbfac01['lJwpm'](existsSync,_0x1a8b25)&&(await rm(_0x1a8b25,{'recursive':!![]}),console[_0x19c689(0x1af)]('โœ“\x20Removed\x20user\x20skill:\x20'+_0x33254b),_0x37c51f=!![]);}const _0x478cd2=getOpencodeSkillsDir('project');for(const _0x5dddef of skillsToRemove){const _0x58fa7f=_0xbfac01['budRR'](join,_0x478cd2,_0x5dddef);_0xbfac01[_0x19c689(0x1be)](existsSync,_0x58fa7f)&&(await _0xbfac01[_0x19c689(0x1ae)](rm,_0x58fa7f,{'recursive':!![]}),console[_0x19c689(0x1af)]('โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5dddef),_0x37c51f=!![]);}const _0x121cd9=_0xbfac01[_0x19c689(0x1d3)](getOpencodeSkillsDir,_0x19c689(0x19e));for(const _0x14afd9 of skillsToRemove){const _0xdda388=_0xbfac01['Pmzpm'](join,_0x121cd9,_0x14afd9);existsSync(_0xdda388)&&(await _0xbfac01['vkQKf'](rm,_0xdda388,{'recursive':!![]}),console['log'](_0x19c689(0x1bf)+_0x14afd9),_0x37c51f=!![]);}const _0x13b4a8=join(_0xbfac01['fIRFg'](getOpencodeConfigDir,_0xbfac01[_0x19c689(0x1a0)]),_0xbfac01[_0x19c689(0x1c7)]);await _0xbfac01[_0x19c689(0x1d3)](removeOpencodePluginConfig,_0x13b4a8)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x37c51f=!![]);const _0xefae3b=_0xbfac01[_0x19c689(0x1ba)](join,getOpencodeConfigDir(_0xbfac01[_0x19c689(0x1b0)]),'opencode.json');await removeOpencodePluginConfig(_0xefae3b)&&(console[_0x19c689(0x1af)](_0xbfac01[_0x19c689(0x1cf)]),_0x37c51f=!![]);const _0x531dda=await uninstallClaudePlugin();_0x531dda&&(console['log'](_0x19c689(0x1a3)),_0x37c51f=!![]);const _0xdbdcec=await uninstallClaudePlugin(_0xbfac01[_0x19c689(0x1a0)]);_0xdbdcec&&(console[_0x19c689(0x1af)](_0xbfac01['tUtqU']),_0x37c51f=!![]);const _0x3a44fd=await removeMarketplace();_0x3a44fd&&(console['log'](_0x19c689(0x1b1)),_0x37c51f=!![]),_0x37c51f?console['log'](_0xbfac01['TSDMx']):console[_0x19c689(0x1af)](_0xbfac01['OraBn']);}
1
+ const _0x3ac242=_0x129a;(function(_0x55979e,_0x4478fd){const _0x12c0c1=_0x129a,_0x1569f4=_0x55979e();while(!![]){try{const _0x49e743=-parseInt(_0x12c0c1(0xfe))/0x1*(-parseInt(_0x12c0c1(0x108))/0x2)+parseInt(_0x12c0c1(0xd4))/0x3*(-parseInt(_0x12c0c1(0xe6))/0x4)+parseInt(_0x12c0c1(0xd1))/0x5*(-parseInt(_0x12c0c1(0xf6))/0x6)+parseInt(_0x12c0c1(0xec))/0x7*(-parseInt(_0x12c0c1(0xfb))/0x8)+-parseInt(_0x12c0c1(0xdd))/0x9+-parseInt(_0x12c0c1(0xf0))/0xa*(parseInt(_0x12c0c1(0xe0))/0xb)+parseInt(_0x12c0c1(0x105))/0xc;if(_0x49e743===_0x4478fd)break;else _0x1569f4['push'](_0x1569f4['shift']());}catch(_0x344e3c){_0x1569f4['push'](_0x1569f4['shift']());}}}(_0x2541,0xa21c1));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2541(){const _0x1211a1=['opencode.json','bNbUV','DlOTV','504364wOiLxf','JXyTk','LDKma','win32','659930hYaCov','Nothing\x20to\x20clean\x20up.\x0a','Jacbq','โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20','odPFe','cDGHy','606MwlRpy','FOVrc','close','MAzut','claude','24RBEaTX','isArray','replace','148853RdZCsP','error','kvPsT','parse','skcWu','stringify','\x0aโœ…\x20Cleanup\x20complete!\x0a','27554100ggiEQt','ZjYGi','ranger@trailhead','4splDmB','meuDb','SmSBx','FAxpj','length','3975XrkPjT','trailhead','โœ“\x20Removed\x20.ranger/\x20directory','2834661mQprBg','โœ“\x20Removed\x20project\x20skill:\x20','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','SZdbL','e2e-test-recommender','plugin','ignore','project','GEHPk','3227193aVOpFC','log','feature-tracker','55keAWwX','gFqFg','rqOZl','push','filter','EUukF','4ihQoMI','โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','mPLkD'];_0x2541=function(){return _0x1211a1;};return _0x2541();}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x3ac242(0xdf),'bug-bash',_0x3ac242(0xd8)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x56d75b){const _0xd19d05=_0x3ac242,_0x4e04a0=_0x56d75b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x52d06b=_0x4e04a0[_0xd19d05(0xfd)](/^\s*\/\/.*$/gm,''),_0x2bc6c7=_0x52d06b[_0xd19d05(0xfd)](/,\s*([}\]])/g,'$1');return JSON[_0xd19d05(0x101)](_0x2bc6c7);}function _0x129a(_0x323d68,_0xfb3246){_0x323d68=_0x323d68-0xce;const _0x25418d=_0x2541();let _0x129a0e=_0x25418d[_0x323d68];return _0x129a0e;}async function removeOpencodePluginConfig(_0x2938ee){const _0x36831e=_0x3ac242,_0x5a1bae={'skcWu':function(_0x1a56af,_0x3b7f6b,_0x58018c){return _0x1a56af(_0x3b7f6b,_0x58018c);},'GDSiE':function(_0x510966,_0x352ea0){return _0x510966(_0x352ea0);},'zVGMP':function(_0x4406fa,_0x5a9238){return _0x4406fa===_0x5a9238;}};if(!existsSync(_0x2938ee))return![];let _0x279ce6;try{const _0x320929=await _0x5a1bae['skcWu'](readFile,_0x2938ee,'utf-8');_0x279ce6=_0x5a1bae['GDSiE'](parseJsonc,_0x320929);}catch{return![];}const _0x137d12=Array[_0x36831e(0xfc)](_0x279ce6['plugin'])?_0x279ce6[_0x36831e(0xd9)]:[];if(_0x5a1bae['zVGMP'](_0x137d12[_0x36831e(0xd0)],0x0))return![];const _0x1c6304=_0x137d12[_0x36831e(0xe4)](_0x3ae52d=>{if(typeof _0x3ae52d!=='string')return!![];return _0x3ae52d!==opencodePluginName;});if(_0x1c6304['length']===_0x137d12['length'])return![];return _0x1c6304[_0x36831e(0xd0)]===0x0?delete _0x279ce6[_0x36831e(0xd9)]:_0x279ce6[_0x36831e(0xd9)]=_0x1c6304,await _0x5a1bae[_0x36831e(0x102)](writeFile,_0x2938ee,JSON[_0x36831e(0x103)](_0x279ce6,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x40081e){const _0x3fe533={'IDBEf':'--scope','DlOTV':'claude','FAxpj':function(_0x473013){return _0x473013();},'mPLkD':function(_0x507928,_0x173def){return _0x507928===_0x173def;},'bJgpp':'error'};return new Promise(_0x3d9724=>{const _0x115382=_0x129a,_0x44c409=[_0x115382(0xd9),'uninstall',_0x115382(0x107)];_0x40081e&&_0x44c409[_0x115382(0xe3)](_0x3fe533['IDBEf'],_0x40081e);const _0x44804d=spawn(_0x3fe533[_0x115382(0xeb)],_0x44c409,{'stdio':['ignore',_0x115382(0xda),'ignore'],'cwd':_0x40081e?_0x3fe533[_0x115382(0xcf)](getProjectRoot):undefined,'shell':_0x3fe533[_0x115382(0xe8)](process['platform'],'win32')});_0x44804d['on'](_0x115382(0xf8),_0x3348bf=>{_0x3d9724(_0x3348bf===0x0);}),_0x44804d['on'](_0x3fe533['bJgpp'],()=>{_0x3d9724(![]);});});}async function removeMarketplace(){const _0x48e884=_0x3ac242,_0x53cf89={'wcitZ':function(_0x2f1fea,_0x998712){return _0x2f1fea===_0x998712;},'PUAEA':_0x48e884(0xfa),'ZjYGi':_0x48e884(0xda),'EUukF':'close','GEHPk':_0x48e884(0xff)};return new Promise(_0x1fba45=>{const _0x135c2c=_0x48e884,_0x5d3b23={'meuDb':function(_0x227ae4,_0x5c70c7){return _0x227ae4(_0x5c70c7);},'rqOZl':function(_0x42b09e,_0x585702){return _0x53cf89['wcitZ'](_0x42b09e,_0x585702);}},_0x28c5a9=spawn(_0x53cf89['PUAEA'],[_0x135c2c(0xd9),'marketplace','remove',_0x135c2c(0xd2)],{'stdio':[_0x135c2c(0xda),_0x53cf89[_0x135c2c(0x106)],_0x53cf89['ZjYGi']],'shell':process['platform']===_0x135c2c(0xef)});_0x28c5a9['on'](_0x53cf89[_0x135c2c(0xe5)],_0x59c00d=>{const _0x59b07f=_0x135c2c;_0x5d3b23['meuDb'](_0x1fba45,_0x5d3b23[_0x59b07f(0xe2)](_0x59c00d,0x0));}),_0x28c5a9['on'](_0x53cf89[_0x135c2c(0xdc)],()=>{const _0x11c2f2=_0x135c2c;_0x5d3b23[_0x11c2f2(0x109)](_0x1fba45,![]);});});}export async function clean(){const _0x353aa2=_0x3ac242,_0x1a0b0={'lyBHn':'\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','odPFe':function(_0xad2a4b){return _0xad2a4b();},'kvPsT':function(_0x16a990,_0x5d95be){return _0x16a990(_0x5d95be);},'Jacbq':function(_0x5d99d0){return _0x5d99d0();},'cDGHy':function(_0x2385e6,_0x341a3b,_0x5ec0c9){return _0x2385e6(_0x341a3b,_0x5ec0c9);},'SZdbL':function(_0x28a93c,_0x689d7e,_0x5b9b57){return _0x28a93c(_0x689d7e,_0x5b9b57);},'SmSBx':'project','FOVrc':function(_0x4cd205,_0x5bfa38){return _0x4cd205(_0x5bfa38);},'Ftwwq':'user','LDKma':function(_0x4e506b,_0x41f3b5,_0x2912d1){return _0x4e506b(_0x41f3b5,_0x2912d1);},'JXyTk':function(_0x569b5f,_0x16129e){return _0x569b5f(_0x16129e);},'ABhqk':function(_0x1dbe4e,_0x53d28d,_0x53c0ec){return _0x1dbe4e(_0x53d28d,_0x53c0ec);},'PuNaR':function(_0x3850aa,_0x26f202){return _0x3850aa(_0x26f202);},'SwvOb':function(_0xe04775){return _0xe04775();},'MAzut':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','gFqFg':_0x353aa2(0xd6),'bNbUV':'โœ“\x20Removed\x20trailhead\x20marketplace'};console[_0x353aa2(0xde)](_0x1a0b0['lyBHn']);let _0x16bf66=![];try{await deleteAllCredentials(),console[_0x353aa2(0xde)]('โœ“\x20Removed\x20stored\x20credentials'),_0x16bf66=!![];}catch{}const _0x2d6096=_0x1a0b0[_0x353aa2(0xf4)](getCacheFile);_0x1a0b0[_0x353aa2(0x100)](existsSync,_0x2d6096)&&(await rm(_0x2d6096),_0x16bf66=!![]);const _0xfdfb7d=_0x1a0b0['Jacbq'](getRangerDir);existsSync(_0xfdfb7d)&&(await _0x1a0b0[_0x353aa2(0xf5)](rm,_0xfdfb7d,{'recursive':!![]}),console[_0x353aa2(0xde)](_0x353aa2(0xd3)),_0x16bf66=!![]);const _0x473053=_0x1a0b0[_0x353aa2(0xf2)](getProjectSkillsDir);for(const _0x296b5b of skillsToRemove){const _0x2b6017=join(_0x473053,_0x296b5b);existsSync(_0x2b6017)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x2b6017,{'recursive':!![]}),console['log'](_0x353aa2(0xd5)+_0x296b5b),_0x16bf66=!![]);}const _0x3a4ad1=_0x1a0b0[_0x353aa2(0xf4)](getUserSkillsDir);for(const _0x57f5ae of skillsToRemove){const _0x4be9ac=_0x1a0b0[_0x353aa2(0xd7)](join,_0x3a4ad1,_0x57f5ae);existsSync(_0x4be9ac)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x4be9ac,{'recursive':!![]}),console[_0x353aa2(0xde)]('โœ“\x20Removed\x20user\x20skill:\x20'+_0x57f5ae),_0x16bf66=!![]);}const _0x12dfe0=_0x1a0b0[_0x353aa2(0x100)](getOpencodeSkillsDir,_0x1a0b0[_0x353aa2(0xce)]);for(const _0x453ebc of skillsToRemove){const _0x156496=join(_0x12dfe0,_0x453ebc);existsSync(_0x156496)&&(await _0x1a0b0[_0x353aa2(0xf5)](rm,_0x156496,{'recursive':!![]}),console[_0x353aa2(0xde)]('โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x453ebc),_0x16bf66=!![]);}const _0x2ad6df=_0x1a0b0[_0x353aa2(0xf7)](getOpencodeSkillsDir,_0x1a0b0['Ftwwq']);for(const _0x314252 of skillsToRemove){const _0x44687b=join(_0x2ad6df,_0x314252);existsSync(_0x44687b)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x44687b,{'recursive':!![]}),console['log'](_0x353aa2(0xf3)+_0x314252),_0x16bf66=!![]);}const _0x38fcfe=_0x1a0b0[_0x353aa2(0xee)](join,_0x1a0b0['JXyTk'](getOpencodeConfigDir,_0x1a0b0[_0x353aa2(0xce)]),'opencode.json');await _0x1a0b0[_0x353aa2(0xed)](removeOpencodePluginConfig,_0x38fcfe)&&(console[_0x353aa2(0xde)](_0x353aa2(0xe7)),_0x16bf66=!![]);const _0x5187ff=_0x1a0b0['ABhqk'](join,getOpencodeConfigDir(_0x1a0b0['Ftwwq']),_0x353aa2(0xe9));await _0x1a0b0['PuNaR'](removeOpencodePluginConfig,_0x5187ff)&&(console['log']('โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x16bf66=!![]);const _0x30a01d=await _0x1a0b0['SwvOb'](uninstallClaudePlugin);_0x30a01d&&(console['log'](_0x1a0b0[_0x353aa2(0xf9)]),_0x16bf66=!![]);const _0x5acdba=await uninstallClaudePlugin(_0x353aa2(0xdb));_0x5acdba&&(console[_0x353aa2(0xde)](_0x1a0b0[_0x353aa2(0xe1)]),_0x16bf66=!![]);const _0x591287=await _0x1a0b0[_0x353aa2(0xf2)](removeMarketplace);_0x591287&&(console[_0x353aa2(0xde)](_0x1a0b0[_0x353aa2(0xea)]),_0x16bf66=!![]),_0x16bf66?console['log'](_0x353aa2(0x104)):console['log'](_0x353aa2(0xf1));}
@@ -1 +1 @@
1
- const _0x537e63=_0x2ea2;(function(_0x2db7b3,_0x58da3f){const _0x477931=_0x2ea2,_0x4fa68b=_0x2db7b3();while(!![]){try{const _0x3d1c15=parseInt(_0x477931(0xae))/0x1+-parseInt(_0x477931(0xac))/0x2*(parseInt(_0x477931(0xc2))/0x3)+-parseInt(_0x477931(0x9f))/0x4*(-parseInt(_0x477931(0x96))/0x5)+-parseInt(_0x477931(0x8f))/0x6*(-parseInt(_0x477931(0xb8))/0x7)+parseInt(_0x477931(0x93))/0x8+parseInt(_0x477931(0xc1))/0x9+-parseInt(_0x477931(0x8e))/0xa;if(_0x3d1c15===_0x58da3f)break;else _0x4fa68b['push'](_0x4fa68b['shift']());}catch(_0x25c61a){_0x4fa68b['push'](_0x4fa68b['shift']());}}}(_0x48b4,0x2d494));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=[_0x537e63(0xba),_0x537e63(0x9c)];function _0x2ea2(_0x2eaa28,_0x33b3b3){_0x2eaa28=_0x2eaa28-0x8d;const _0x48b40a=_0x48b4();let _0x2ea2c7=_0x48b40a[_0x2eaa28];return _0x2ea2c7;}function parseLocalValue(_0x56f5be,_0x2b7d82){const _0x43d495=_0x537e63,_0x110cf5={'aqnlb':function(_0x14f5d9,_0x4b6642){return _0x14f5d9===_0x4b6642;}};if(BOOLEAN_KEYS[_0x43d495(0x90)](_0x56f5be)){if(_0x110cf5['aqnlb'](_0x2b7d82,'true'))return!![];if(_0x2b7d82===_0x43d495(0xb9))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x56f5be+_0x43d495(0xa5));}return _0x2b7d82;}function parseOverrideValue(_0xad351d){const _0x58b08b=_0x537e63,_0x2ae324={'yCXyD':'true','tmSzw':_0x58b08b(0xb9),'YVniv':_0x58b08b(0xa0),'SZRvD':function(_0x2c5e9d,_0xf90a30){return _0x2c5e9d===_0xf90a30;},'rgjvq':_0x58b08b(0xa1),'MWwFf':function(_0x15cd2d,_0x2fe385){return _0x15cd2d(_0x2fe385);},'kJIvH':function(_0x19677f,_0x10408c){return _0x19677f(_0x10408c);}};if(_0xad351d===_0x2ae324[_0x58b08b(0xbe)])return!![];if(_0xad351d===_0x2ae324['tmSzw'])return![];if(_0xad351d===_0x2ae324[_0x58b08b(0xc3)])return null;if(_0x2ae324[_0x58b08b(0xad)](_0xad351d,_0x2ae324['rgjvq']))return undefined;if(/^-?\d+$/['test'](_0xad351d)){const _0x53b157=_0x2ae324['MWwFf'](Number,_0xad351d);if(Number[_0x58b08b(0x95)](_0x53b157))return _0x53b157;}if(/^-?\d+\.\d+$/[_0x58b08b(0x97)](_0xad351d)){const _0x45e155=_0x2ae324['kJIvH'](Number,_0xad351d);if(!Number['isNaN'](_0x45e155))return _0x45e155;}const _0x744c3a=_0xad351d['trim']();if(_0x744c3a[_0x58b08b(0xa9)]('{')&&_0x744c3a[_0x58b08b(0xa3)]('}')||_0x744c3a['startsWith']('[')&&_0x744c3a['endsWith'](']'))try{return JSON[_0x58b08b(0xb3)](_0x744c3a);}catch{}return _0xad351d;}async function resolveProfileTarget(_0x11131d){const _0x854930=_0x537e63,_0x4f6fe0={'znByE':function(_0x187547,_0x4243b0){return _0x187547(_0x4243b0);},'iapqH':_0x854930(0x91)},_0x4e5745=existsSync(_0x4f6fe0['znByE'](getEnvDir,_0x11131d));let _0x28bcd3=![];try{const _0x25c041=await _0x4f6fe0[_0x854930(0xb5)](fetchCloudProfile,_0x11131d);_0x28bcd3=Boolean(_0x25c041);}catch{}if(_0x28bcd3)return{'kind':_0x854930(0xb6),'alsoExistsElsewhere':_0x4e5745};if(_0x4e5745)return{'kind':_0x4f6fe0['iapqH'],'alsoExistsElsewhere':![]};throw new Error(_0x854930(0xab)+_0x11131d+_0x854930(0xa8)+_0x11131d);}function printDualExistsHint(_0xf7c622){const _0x280fd2=_0x537e63;console['log']('\x20\x20Note:\x20\x22'+_0xf7c622+_0x280fd2(0xb2));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3753fa){const _0x1abf9f=_0x537e63,_0x3f7c7a=await fetchCloudProfile(_0x3753fa),_0x347113=readProfileOverrides(getProjectPath(),_0x3753fa);return mergeCloudProfileSettings(_0x3f7c7a?.[_0x1abf9f(0xb4)]??{},_0x347113??undefined);}export async function configSet(_0x5d672e,_0x4cf499,_0x18fb39){const _0x36e6a0=_0x537e63,_0x577484={'XjtdK':function(_0x216eb6,_0x232ec9){return _0x216eb6(_0x232ec9);},'piCCi':function(_0x5561b9,_0x5e6555){return _0x5561b9(_0x5e6555);},'mtHRa':function(_0x522bb1,_0x3857f7){return _0x522bb1(_0x3857f7);},'ScUiy':function(_0x45f813,_0x3e37ee,_0x3b2440){return _0x45f813(_0x3e37ee,_0x3b2440);},'zLZpu':function(_0x4d0c4c,_0x317d7b,_0x302e5c,_0x23a510){return _0x4d0c4c(_0x317d7b,_0x302e5c,_0x23a510);}},_0x2c524f=await _0x577484['XjtdK'](resolveProfileTarget,_0x5d672e);if(_0x2c524f['kind']==='cloud'){if(_0x2c524f['alsoExistsElsewhere'])printDualExistsHint(_0x5d672e);const _0x525276=_0x577484[_0x36e6a0(0x9e)](parseOverrideValue,_0x18fb39);setProfileOverride(getProjectPath(),_0x5d672e,_0x4cf499,_0x525276),console['log']('Set\x20'+_0x4cf499+'\x20=\x20'+JSON[_0x36e6a0(0x99)](_0x525276)+'\x20for\x20\x22'+_0x5d672e+'\x22');return;}const _0x44bc85=await _0x577484['mtHRa'](loadSettings,_0x5d672e),_0x2138a0=_0x577484['ScUiy'](parseLocalValue,_0x4cf499,_0x18fb39);_0x577484['zLZpu'](setNestedValue,_0x44bc85,_0x4cf499,_0x2138a0),await _0x577484[_0x36e6a0(0xb1)](saveSettings,_0x5d672e,_0x44bc85),console[_0x36e6a0(0xbc)]('Set\x20'+_0x4cf499+_0x36e6a0(0xa6)+_0x2138a0+_0x36e6a0(0x9b)+_0x5d672e+'\x22');}export async function configGet(_0x1dce39,_0xafa20c){const _0x2acd0c=_0x537e63,_0x23e19a={'cjfqj':function(_0x46a020,_0x53f8fd){return _0x46a020(_0x53f8fd);},'dyqfk':function(_0x7e474b,_0x5001a6){return _0x7e474b===_0x5001a6;},'RtmBd':function(_0x1d79b2,_0x2c7073){return _0x1d79b2===_0x2c7073;},'lrPvm':'object','VbtFy':function(_0x164b0e,_0x4117bf){return _0x164b0e===_0x4117bf;}},_0x4f6ed8=await _0x23e19a['cjfqj'](resolveProfileTarget,_0x1dce39);if(_0x23e19a[_0x2acd0c(0xc0)](_0x4f6ed8['kind'],'cloud')){const _0x1d80db=await loadEffectiveCloudSettings(_0x1dce39),_0x33f67a=getNestedValue(_0x1d80db,_0xafa20c);if(_0x23e19a['dyqfk'](_0x33f67a,undefined))console[_0x2acd0c(0xbc)]('(not\x20set)');else _0x23e19a[_0x2acd0c(0xbd)](typeof _0x33f67a,_0x23e19a[_0x2acd0c(0xb0)])?console[_0x2acd0c(0xbc)](JSON[_0x2acd0c(0x99)](_0x33f67a,null,0x2)):console[_0x2acd0c(0xbc)](_0x33f67a);return;}const _0x4af466=await _0x23e19a[_0x2acd0c(0x92)](loadSettings,_0x1dce39),_0x4d06ec=getNestedValue(_0x4af466,_0xafa20c);if(_0x4d06ec===undefined)console[_0x2acd0c(0xbc)]('(not\x20set)');else _0x23e19a[_0x2acd0c(0xa2)](typeof _0x4d06ec,_0x2acd0c(0xc5))?console[_0x2acd0c(0xbc)](JSON['stringify'](_0x4d06ec,null,0x2)):console['log'](_0x4d06ec);}export async function configList(_0x43ffc1){const _0x323680=_0x537e63,_0x357adf={'RmBMT':function(_0x25741b,_0x33665e){return _0x25741b(_0x33665e);},'JTvfE':function(_0x64a0ad,_0x45ec9b){return _0x64a0ad(_0x45ec9b);}},_0x280c18=await _0x357adf['RmBMT'](resolveProfileTarget,_0x43ffc1);if(_0x280c18['kind']===_0x323680(0xb6)){const _0x20f1fe=await _0x357adf['RmBMT'](loadEffectiveCloudSettings,_0x43ffc1);if(!_0x20f1fe||Object[_0x323680(0xbb)](_0x20f1fe)[_0x323680(0x8d)]===0x0){console[_0x323680(0xbc)]('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22');return;}console['log'](JSON[_0x323680(0x99)](_0x20f1fe,null,0x2));return;}const _0x5911c2=_0x357adf[_0x323680(0xaf)](getSettingsPath,_0x43ffc1);if(!existsSync(_0x5911c2)){console[_0x323680(0xbc)]('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22');return;}const _0x5ac074=await loadSettings(_0x43ffc1),_0x126a5b=_0x357adf['RmBMT'](formatSettings,_0x5ac074);!_0x126a5b?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22'):console[_0x323680(0xbc)](_0x126a5b);}export async function configUnset(_0x16f69f,_0x5c94db){const _0x1e3fe2=_0x537e63,_0x408669={'UNfTF':function(_0x12c03c,_0x44defd){return _0x12c03c(_0x44defd);},'jWqOZ':function(_0x5d370c,_0x432734){return _0x5d370c===_0x432734;},'IKTUN':'cloud','YXMuP':function(_0x2b41be,_0x43fcbb,_0x54bf53){return _0x2b41be(_0x43fcbb,_0x54bf53);}},_0x4aab2f=await _0x408669[_0x1e3fe2(0x98)](resolveProfileTarget,_0x16f69f);if(_0x408669[_0x1e3fe2(0xb7)](_0x4aab2f[_0x1e3fe2(0xc4)],_0x408669[_0x1e3fe2(0x9d)])){if(_0x4aab2f[_0x1e3fe2(0xa4)])printDualExistsHint(_0x16f69f);const _0x2f40ca=unsetProfileOverride(getProjectPath(),_0x16f69f,_0x5c94db);_0x2f40ca?console['log']('Removed\x20'+_0x5c94db+_0x1e3fe2(0x9b)+_0x16f69f+'\x22'):console['log'](_0x1e3fe2(0xc6)+_0x5c94db+'\x22\x20not\x20found');return;}const _0x34d8cb=await loadSettings(_0x16f69f),_0x199ed8=_0x408669['YXMuP'](deleteNestedValue,_0x34d8cb,_0x5c94db);_0x199ed8?(await _0x408669[_0x1e3fe2(0x9a)](saveSettings,_0x16f69f,_0x34d8cb),console['log']('Removed\x20'+_0x5c94db)):console['log'](_0x1e3fe2(0xc6)+_0x5c94db+'\x22\x20not\x20found');}export async function configReset(_0xb4bff8){const _0x562388=_0x537e63,_0x37550d={'VAxUm':'cloud','xquRl':function(_0x4e7c86,_0x23f674,_0x4e0d34){return _0x4e7c86(_0x23f674,_0x4e0d34);}},_0x8b933b=await resolveProfileTarget(_0xb4bff8);if(_0x8b933b[_0x562388(0xc4)]===_0x37550d[_0x562388(0xbf)]){_0x37550d['xquRl'](resetProfileOverrides,getProjectPath(),_0xb4bff8),console[_0x562388(0xbc)](_0x562388(0xaa)+_0xb4bff8+'\x22');return;}console['log']('\x22'+_0xb4bff8+_0x562388(0x94)+_0xb4bff8+_0x562388(0xa7));}function _0x48b4(){const _0x512637=['Profile\x20\x22','10OdSbBS','SZRvD','292851HzKzfJ','JTvfE','lrPvm','ScUiy','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','parse','settings','znByE','cloud','jWqOZ','1337KtIKMs','false','headless','keys','log','RtmBd','yCXyD','VAxUm','dyqfk','557847ylUvnT','202509QICxWi','YVniv','kind','object','Key\x20\x22','length','3436670wGAEpC','6570XydffM','includes','local','cjfqj','726336aUfrIt','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','isSafeInteger','145xSlUZc','test','UNfTF','stringify','YXMuP','\x20for\x20\x22','allowInsecureLocalhost','IKTUN','piCCi','29228nERLlA','null','undefined','VbtFy','endsWith','alsoExistsElsewhere',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','startsWith','Cleared\x20local\x20overrides\x20for\x20\x22'];_0x48b4=function(){return _0x512637;};return _0x48b4();}
1
+ const _0x1bed82=_0x439f;(function(_0x4952f1,_0x1aeab2){const _0x52afe8=_0x439f,_0x52c270=_0x4952f1();while(!![]){try{const _0xbd8fca=parseInt(_0x52afe8(0xcc))/0x1+parseInt(_0x52afe8(0xbd))/0x2*(parseInt(_0x52afe8(0xe6))/0x3)+-parseInt(_0x52afe8(0xc1))/0x4*(-parseInt(_0x52afe8(0xdd))/0x5)+-parseInt(_0x52afe8(0xdf))/0x6+parseInt(_0x52afe8(0xb7))/0x7+parseInt(_0x52afe8(0xec))/0x8+parseInt(_0x52afe8(0xea))/0x9*(-parseInt(_0x52afe8(0xe9))/0xa);if(_0xbd8fca===_0x1aeab2)break;else _0x52c270['push'](_0x52c270['shift']());}catch(_0x23cee5){_0x52c270['push'](_0x52c270['shift']());}}}(_0x258f,0x46ad7));import{existsSync}from'fs';function _0x439f(_0x40fb30,_0x25bbf8){_0x40fb30=_0x40fb30-0xb7;const _0x258f3e=_0x258f();let _0x439f05=_0x258f3e[_0x40fb30];return _0x439f05;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';function _0x258f(){const _0x556f20=['OpwFX','endsWith','\x20for\x20\x22','trim','allowInsecureLocalhost','isNaN','test','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','Key\x20\x22','cloud','108539LJAuyA','feSYi','RVEYH','cwd','\x20=\x20','keys','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Removed\x20','includes','object','log','Invalid\x20value\x20for\x20','Cleared\x20local\x20overrides\x20for\x20\x22','xmmuH','sfHzM','PljrD',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','5XRkTTM','YSrOW','2215440ZiGEvZ','alsoExistsElsewhere','JyNeR','OQFLt','Uxsib','false','juPqF','3cOCNIz','xvCGO','frLOb','520rLJELJ','116451fGeBpU','WDDLJ','3306768wPhDZO','vkHUE','FOKlA','1581748DySPes','settings','Profile\x20\x22','kind','NKBmj','startsWith','245284rgxMcZ','length','No\x20configuration\x20set\x20for\x20\x22','stringify','1844288GPUnHh'];_0x258f=function(){return _0x556f20;};return _0x258f();}import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x1bed82(0xc6)];function parseLocalValue(_0x161628,_0x4ce83f){const _0x473e3c=_0x1bed82,_0x4ef77e={'vkHUE':'true'};if(BOOLEAN_KEYS[_0x473e3c(0xd4)](_0x161628)){if(_0x4ce83f===_0x4ef77e[_0x473e3c(0xed)])return!![];if(_0x4ce83f==='false')return![];throw new Error(_0x473e3c(0xd7)+_0x161628+_0x473e3c(0xdc));}return _0x4ce83f;}function parseOverrideValue(_0x198050){const _0x28d62f=_0x1bed82,_0x268889={'bOFIr':function(_0x59d000,_0x381b4e){return _0x59d000===_0x381b4e;},'quBcD':_0x28d62f(0xe4),'sMlVH':function(_0x2d72e4,_0x4e0f5b){return _0x2d72e4===_0x4e0f5b;},'WDDLJ':function(_0x280e97,_0x1f3825){return _0x280e97===_0x1f3825;},'frLOb':function(_0x49e4ef,_0x41cabd){return _0x49e4ef(_0x41cabd);}};if(_0x198050==='true')return!![];if(_0x268889['bOFIr'](_0x198050,_0x268889['quBcD']))return![];if(_0x268889['sMlVH'](_0x198050,'null'))return null;if(_0x268889[_0x28d62f(0xeb)](_0x198050,'undefined'))return undefined;if(/^-?\d+$/[_0x28d62f(0xc8)](_0x198050)){const _0x2004de=_0x268889[_0x28d62f(0xe8)](Number,_0x198050);if(Number['isSafeInteger'](_0x2004de))return _0x2004de;}if(/^-?\d+\.\d+$/[_0x28d62f(0xc8)](_0x198050)){const _0x111184=_0x268889['frLOb'](Number,_0x198050);if(!Number[_0x28d62f(0xc7)](_0x111184))return _0x111184;}const _0x364f37=_0x198050[_0x28d62f(0xc5)]();if(_0x364f37[_0x28d62f(0xbc)]('{')&&_0x364f37['endsWith']('}')||_0x364f37[_0x28d62f(0xbc)]('[')&&_0x364f37[_0x28d62f(0xc3)](']'))try{return JSON['parse'](_0x364f37);}catch{}return _0x198050;}async function resolveProfileTarget(_0x2a5310){const _0x3ea602=_0x1bed82,_0x2db5c2={'fpjli':function(_0x1a6ced,_0x282b6e){return _0x1a6ced(_0x282b6e);},'juPqF':function(_0x5be69a,_0x2abd03){return _0x5be69a(_0x2abd03);},'PljrD':'local'},_0x1a3678=_0x2db5c2['fpjli'](existsSync,_0x2db5c2['juPqF'](getEnvDir,_0x2a5310));let _0x4964e6=![];try{const _0x43237b=await _0x2db5c2[_0x3ea602(0xe5)](fetchCloudProfile,_0x2a5310);_0x4964e6=_0x2db5c2['fpjli'](Boolean,_0x43237b);}catch{}if(_0x4964e6)return{'kind':_0x3ea602(0xcb),'alsoExistsElsewhere':_0x1a3678};if(_0x1a3678)return{'kind':_0x2db5c2[_0x3ea602(0xdb)],'alsoExistsElsewhere':![]};throw new Error(_0x3ea602(0xb9)+_0x2a5310+_0x3ea602(0xc9)+_0x2a5310);}function printDualExistsHint(_0x5eca70){console['log']('\x20\x20Note:\x20\x22'+_0x5eca70+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0xc9479c=_0x1bed82;return process[_0xc9479c(0xcf)]();}async function loadEffectiveCloudSettings(_0x19a978){const _0x2f533b=_0x1bed82,_0x49c168={'FOKlA':function(_0x35c782,_0x496214,_0x3d24e4){return _0x35c782(_0x496214,_0x3d24e4);},'YSrOW':function(_0x21e08d,_0x232332){return _0x21e08d??_0x232332;}},_0x211ab3=await fetchCloudProfile(_0x19a978),_0x27740a=readProfileOverrides(getProjectPath(),_0x19a978);return _0x49c168[_0x2f533b(0xee)](mergeCloudProfileSettings,_0x211ab3?.[_0x2f533b(0xb8)]??{},_0x49c168[_0x2f533b(0xde)](_0x27740a,undefined));}export async function configSet(_0x403a5a,_0x1e3871,_0x31fc48){const _0x58c98b=_0x1bed82,_0x4f0abb={'OpwFX':function(_0x232c92,_0x54e249,_0x44c6ea){return _0x232c92(_0x54e249,_0x44c6ea);},'fuTwH':function(_0x541110,_0x2441ec,_0x2e1107,_0x231129,_0x224dad){return _0x541110(_0x2441ec,_0x2e1107,_0x231129,_0x224dad);}},_0x567cea=await resolveProfileTarget(_0x403a5a);if(_0x567cea['kind']==='cloud'){if(_0x567cea[_0x58c98b(0xe0)])printDualExistsHint(_0x403a5a);const _0x3809ce=parseOverrideValue(_0x31fc48);setProfileOverride(getProjectPath(),_0x403a5a,_0x1e3871,_0x3809ce),console['log']('Set\x20'+_0x1e3871+_0x58c98b(0xd0)+JSON['stringify'](_0x3809ce)+_0x58c98b(0xc4)+_0x403a5a+'\x22');return;}const _0x311563=_0x4f0abb[_0x58c98b(0xc2)](parseLocalValue,_0x1e3871,_0x31fc48);_0x4f0abb['fuTwH'](setProfileOverride,getProjectPath(),_0x403a5a,_0x1e3871,_0x311563),console['log']('Set\x20'+_0x1e3871+'\x20=\x20'+_0x311563+'\x20for\x20\x22'+_0x403a5a+'\x22');}export async function configGet(_0x14b0c3,_0x3ea765){const _0x131359=_0x1bed82,_0xae2565={'nTHLx':function(_0x45daf1,_0x2209d2){return _0x45daf1(_0x2209d2);},'xvCGO':function(_0x184870,_0x39750c){return _0x184870(_0x39750c);},'RVEYH':function(_0x21fd44,_0x292593){return _0x21fd44===_0x292593;},'NKBmj':function(_0x238dc3,_0x8d08e3){return _0x238dc3===_0x8d08e3;},'xmmuH':_0x131359(0xd5),'WcvfJ':function(_0x2ce44c,_0x12c9ad,_0x1340c3){return _0x2ce44c(_0x12c9ad,_0x1340c3);}},_0x282a46=await _0xae2565['nTHLx'](resolveProfileTarget,_0x14b0c3);if(_0x282a46['kind']===_0x131359(0xcb)){const _0x54c71a=await _0xae2565[_0x131359(0xe7)](loadEffectiveCloudSettings,_0x14b0c3),_0x12ee74=getNestedValue(_0x54c71a,_0x3ea765);if(_0xae2565[_0x131359(0xce)](_0x12ee74,undefined))console[_0x131359(0xd6)]('(not\x20set)');else _0xae2565[_0x131359(0xbb)](typeof _0x12ee74,_0xae2565[_0x131359(0xd9)])?console['log'](JSON[_0x131359(0xc0)](_0x12ee74,null,0x2)):console['log'](_0x12ee74);return;}const _0x23ef3c=await loadSettings(_0x14b0c3),_0x52de1a=_0xae2565['WcvfJ'](getNestedValue,_0x23ef3c,_0x3ea765);if(_0xae2565[_0x131359(0xce)](_0x52de1a,undefined))console[_0x131359(0xd6)]('(not\x20set)');else typeof _0x52de1a===_0xae2565[_0x131359(0xd9)]?console['log'](JSON['stringify'](_0x52de1a,null,0x2)):console[_0x131359(0xd6)](_0x52de1a);}export async function configList(_0x329500){const _0x10b72a=_0x1bed82,_0x23cce4={'feSYi':function(_0x1b693c,_0x18f70f){return _0x1b693c===_0x18f70f;},'OQFLt':_0x10b72a(0xcb),'Uxsib':function(_0x28cad9,_0x505251){return _0x28cad9(_0x505251);},'JyNeR':function(_0x33ad4f,_0xab8cda){return _0x33ad4f(_0xab8cda);}},_0x44fa36=await resolveProfileTarget(_0x329500);if(_0x23cce4[_0x10b72a(0xcd)](_0x44fa36['kind'],_0x23cce4[_0x10b72a(0xe2)])){const _0x55a3e8=await _0x23cce4['Uxsib'](loadEffectiveCloudSettings,_0x329500);if(!_0x55a3e8||Object[_0x10b72a(0xd1)](_0x55a3e8)[_0x10b72a(0xbe)]===0x0){console['log'](_0x10b72a(0xbf)+_0x329500+'\x22');return;}console[_0x10b72a(0xd6)](JSON[_0x10b72a(0xc0)](_0x55a3e8,null,0x2));return;}const _0x38793a=_0x23cce4[_0x10b72a(0xe3)](getSettingsPath,_0x329500);if(!existsSync(_0x38793a)){console[_0x10b72a(0xd6)](_0x10b72a(0xbf)+_0x329500+'\x22');return;}const _0x496582=await _0x23cce4[_0x10b72a(0xe3)](loadSettings,_0x329500),_0x3672d0=_0x23cce4[_0x10b72a(0xe1)](formatSettings,_0x496582);!_0x3672d0?console[_0x10b72a(0xd6)]('No\x20configuration\x20set\x20for\x20\x22'+_0x329500+'\x22'):console['log'](_0x3672d0);}export async function configUnset(_0x4685fd,_0x39b3c1){const _0x436a10=_0x1bed82,_0x46fed9={'MWIdx':function(_0x5d460b,_0x362faa){return _0x5d460b(_0x362faa);},'nUliu':'cloud','RNIMO':function(_0x4c44fa,_0x1d3411,_0x37d865,_0x2d408c){return _0x4c44fa(_0x1d3411,_0x37d865,_0x2d408c);}},_0x1d6cd1=await _0x46fed9['MWIdx'](resolveProfileTarget,_0x4685fd);if(_0x1d6cd1[_0x436a10(0xba)]===_0x46fed9['nUliu']){if(_0x1d6cd1['alsoExistsElsewhere'])printDualExistsHint(_0x4685fd);const _0xc32c41=_0x46fed9['RNIMO'](unsetProfileOverride,getProjectPath(),_0x4685fd,_0x39b3c1);_0xc32c41?console[_0x436a10(0xd6)](_0x436a10(0xd3)+_0x39b3c1+_0x436a10(0xc4)+_0x4685fd+'\x22'):console['log'](_0x436a10(0xca)+_0x39b3c1+'\x22\x20not\x20found');return;}const _0x17a72f=unsetProfileOverride(getProjectPath(),_0x4685fd,_0x39b3c1);if(_0x17a72f){console['log']('Removed\x20'+_0x39b3c1);return;}const _0x1d4d65=await loadSettings(_0x4685fd),_0x53ebe2=deleteNestedValue(_0x1d4d65,_0x39b3c1);_0x53ebe2?console[_0x436a10(0xd6)]('Key\x20\x22'+_0x39b3c1+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4685fd+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x436a10(0xd6)](_0x436a10(0xca)+_0x39b3c1+'\x22\x20not\x20found');}export async function configReset(_0x33da97){const _0x509146=_0x1bed82,_0x4a9ec9={'RZcWb':'cloud','sfHzM':function(_0x2fbab4,_0x17baf6,_0xa3994a){return _0x2fbab4(_0x17baf6,_0xa3994a);}},_0x58e616=await resolveProfileTarget(_0x33da97);if(_0x58e616['kind']===_0x4a9ec9['RZcWb']){_0x4a9ec9[_0x509146(0xda)](resetProfileOverrides,getProjectPath(),_0x33da97),console['log'](_0x509146(0xd8)+_0x33da97+'\x22');return;}console[_0x509146(0xd6)]('\x22'+_0x33da97+_0x509146(0xd2)+_0x33da97+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- const _0x2955e1=_0x5df6;(function(_0xcc3313,_0x1fb8fe){const _0x52839f=_0x5df6,_0x4385c4=_0xcc3313();while(!![]){try{const _0xdf6591=-parseInt(_0x52839f(0x1ee))/0x1+-parseInt(_0x52839f(0x1d9))/0x2*(-parseInt(_0x52839f(0x1f7))/0x3)+-parseInt(_0x52839f(0x1f0))/0x4*(parseInt(_0x52839f(0x1db))/0x5)+parseInt(_0x52839f(0x1ec))/0x6+parseInt(_0x52839f(0x1f1))/0x7*(parseInt(_0x52839f(0x1dd))/0x8)+-parseInt(_0x52839f(0x1ef))/0x9+-parseInt(_0x52839f(0x1e8))/0xa*(parseInt(_0x52839f(0x1e1))/0xb);if(_0xdf6591===_0x1fb8fe)break;else _0x4385c4['push'](_0x4385c4['shift']());}catch(_0x5d3da7){_0x4385c4['push'](_0x4385c4['shift']());}}}(_0x3063,0xd4f96));import{readdir,stat}from'fs/promises';function _0x3063(){const _0x3c2eb8=['25712kHmCAu','Jvanf','Jcgmt','includes','11QSvvqq','environmentKey','length','UTdYs','bug-bashes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','UwbdM','1215790xFWLjK','rYXho','\x20\x20\x20\x20\x20\x20Session:\x20','name','2126148suPtpN','\x20[cloud]','745144CCfloh','1991187oUjxMG','1156132QaCUQN','2198QcQlWl','\x0a*\x20=\x20active\x20profile','localeCompare','yxbCF','endsWith','push','379623ccwqKW','no\x20session','\x0aCloud\x20Profiles:','local','jNvLz','iyyta','legacy','log','isDirectory','environmentDetails','\x20\x20\x20\x20\x20\x20Details:\x20','reports','XlZHZ','sessionUpdatedAt','14wgfbkK','nuIhm','5uSOaae','startsWith'];_0x3063=function(){return _0x3c2eb8;};return _0x3063();}import{join}from'path';function _0x5df6(_0x573fae,_0x4887d9){_0x573fae=_0x573fae-0x1cd;const _0x3063b4=_0x3063();let _0x5df6aa=_0x3063b4[_0x573fae];return _0x5df6aa;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x2955e1(0x1e5),_0x2955e1(0x1d6),_0x2955e1(0x1ce),'ci'];export async function getEnvNames(){const _0x33b83b=_0x2955e1,_0x2210b8={'Jvanf':function(_0x5a0a84){return _0x5a0a84();},'rYXho':function(_0x1385ce,_0x47c874){return _0x1385ce(_0x47c874);},'UwbdM':function(_0x268213,_0x39ccba,_0x1c1e01){return _0x268213(_0x39ccba,_0x1c1e01);},'nuIhm':_0x33b83b(0x1ce),'UTdYs':function(_0x22acfb,_0x54db76,_0x24c990){return _0x22acfb(_0x54db76,_0x24c990);},'jNvLz':function(_0x5aa59c,_0x22dff0){return _0x5aa59c(_0x22dff0);},'dfDqt':function(_0x308a1b,_0x287fc4){return _0x308a1b(_0x287fc4);},'NMDDf':'.txt','iyyta':function(_0x316a38,_0x34b2c1,_0x43ffd7){return _0x316a38(_0x34b2c1,_0x43ffd7);},'MbxvL':'settings.json','MbsmH':_0x33b83b(0x1d1)},_0x12db8d=_0x2210b8['Jvanf'](getRangerDir);if(!_0x2210b8['rYXho'](existsSync,_0x12db8d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x37c55a=await _0x2210b8[_0x33b83b(0x1de)](readActiveProfileName),_0x191128=[],_0x105367={},_0x39daf7=_0x2210b8['UwbdM'](join,_0x12db8d,_0x2210b8[_0x33b83b(0x1da)]);if(existsSync(_0x39daf7)){const _0x1c3fba=await readdir(_0x39daf7);for(const _0x1463e0 of _0x1c3fba){const _0x37aecd=_0x2210b8[_0x33b83b(0x1e4)](join,_0x39daf7,_0x1463e0),_0x4ecb9b=await stat(_0x37aecd);_0x4ecb9b['isDirectory']()&&(_0x191128['push'](_0x1463e0),_0x105367[_0x1463e0]=_0x2210b8['nuIhm']);}}const _0x51c6c1=join(_0x12db8d,'ci');if(_0x2210b8[_0x33b83b(0x1cf)](existsSync,_0x51c6c1)){const _0x563ec9=await readdir(_0x51c6c1);for(const _0x570582 of _0x563ec9){const _0x375414=_0x2210b8[_0x33b83b(0x1e7)](join,_0x51c6c1,_0x570582),_0x2ad7a5=await _0x2210b8[_0x33b83b(0x1cf)](stat,_0x375414);_0x2ad7a5['isDirectory']()&&(_0x191128['push'](_0x570582),_0x105367[_0x570582]='ci');}}const _0x104c29=await _0x2210b8['dfDqt'](readdir,_0x12db8d);for(const _0x36c3d8 of _0x104c29){if(NON_ENV_DIRS[_0x33b83b(0x1e0)](_0x36c3d8))continue;if(_0x36c3d8[_0x33b83b(0x1dc)]('.'))continue;if(_0x36c3d8[_0x33b83b(0x1f5)](_0x2210b8['NMDDf']))continue;const _0x4e80d6=join(_0x12db8d,_0x36c3d8),_0x482773=await _0x2210b8['jNvLz'](stat,_0x4e80d6);_0x482773[_0x33b83b(0x1d3)]()&&_0x2210b8[_0x33b83b(0x1e9)](existsSync,_0x2210b8[_0x33b83b(0x1d0)](join,_0x4e80d6,_0x2210b8['MbxvL']))&&(!_0x191128[_0x33b83b(0x1e0)](_0x36c3d8)&&(_0x191128[_0x33b83b(0x1f6)](_0x36c3d8),_0x105367[_0x36c3d8]=_0x2210b8['MbsmH']));}return{'envNames':_0x191128,'activeEnv':_0x37c55a,'envTypes':_0x105367};}export async function envList(){const _0x4158b9=_0x2955e1,_0x405dbe={'XlZHZ':function(_0xfe8b3c){return _0xfe8b3c();},'yxbCF':function(_0x4d6495,_0xbb8366){return _0x4d6495===_0xbb8366;},'Jcgmt':'\x0aNo\x20profiles\x20found.','ccQbg':function(_0x3c2635,_0x2f6251){return _0x3c2635>_0x2f6251;},'EbvAy':'legacy','WhRtu':function(_0x30bf72,_0x43e53e){return _0x30bf72>_0x43e53e;}},{envNames:_0x1314f6,activeEnv:_0x3ca3a5,envTypes:_0x7708b}=await _0x405dbe[_0x4158b9(0x1d7)](getEnvNames);let _0x495a03=[];try{_0x495a03=await listCloudProfiles();}catch{}if(_0x1314f6[_0x4158b9(0x1e3)]===0x0&&_0x405dbe[_0x4158b9(0x1f4)](_0x495a03[_0x4158b9(0x1e3)],0x0)){console['log'](_0x405dbe[_0x4158b9(0x1df)]),console['log'](_0x4158b9(0x1e6));return;}const _0x2d74d0=new Set(_0x495a03['map'](_0x48bca1=>_0x48bca1['name']));if(_0x405dbe['ccQbg'](_0x1314f6[_0x4158b9(0x1e3)],0x0)){console[_0x4158b9(0x1d2)]('\x0aLocal\x20Profiles:');for(const _0x4e60ab of _0x1314f6['sort']()){const _0x348b01=_0x405dbe[_0x4158b9(0x1f4)](_0x4e60ab,_0x3ca3a5)&&!_0x2d74d0['has'](_0x4e60ab),_0x4d5c18=_0x7708b[_0x4e60ab]||_0x4158b9(0x1ce),_0x10fb57=await loadSettings(_0x4e60ab),_0x1609de=_0x4d5c18===_0x405dbe['EbvAy']?'':'\x20['+_0x4d5c18+']';console[_0x4158b9(0x1d2)]('\x20\x20'+(_0x348b01?'*\x20':'\x20\x20')+_0x4e60ab+_0x1609de),_0x10fb57['baseUrl']&&console[_0x4158b9(0x1d2)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x10fb57['baseUrl']),_0x10fb57[_0x4158b9(0x1d4)]&&console['log'](_0x4158b9(0x1d5)+_0x10fb57['environmentDetails']);}}if(_0x405dbe['WhRtu'](_0x495a03['length'],0x0)){console['log'](_0x4158b9(0x1cd));for(const _0x26acb6 of _0x495a03['sort']((_0x1380fe,_0x21c4dc)=>_0x1380fe[_0x4158b9(0x1eb)][_0x4158b9(0x1f3)](_0x21c4dc['name']))){const _0x42db21=_0x405dbe[_0x4158b9(0x1f4)](_0x26acb6['name'],_0x3ca3a5),_0x30d15a=_0x26acb6[_0x4158b9(0x1e2)]?'\x20('+_0x26acb6['environmentKey']+')':'',_0x9ce9f6=_0x26acb6[_0x4158b9(0x1d8)]?'cached\x20(updated\x20'+_0x26acb6[_0x4158b9(0x1d8)]+')':_0x4158b9(0x1f8);console['log']('\x20\x20'+(_0x42db21?'*\x20':'\x20\x20')+_0x26acb6[_0x4158b9(0x1eb)]+_0x4158b9(0x1ed)+_0x30d15a),console['log'](_0x4158b9(0x1ea)+_0x9ce9f6);}}_0x3ca3a5&&console['log'](_0x4158b9(0x1f2));}
1
+ const _0x1deba8=_0x26ba;(function(_0x3737bd,_0x2fc0dc){const _0x3ff17a=_0x26ba,_0x347cf8=_0x3737bd();while(!![]){try{const _0x8f0596=parseInt(_0x3ff17a(0x12c))/0x1+parseInt(_0x3ff17a(0x114))/0x2*(parseInt(_0x3ff17a(0x112))/0x3)+-parseInt(_0x3ff17a(0x11e))/0x4*(-parseInt(_0x3ff17a(0x11a))/0x5)+-parseInt(_0x3ff17a(0x120))/0x6+parseInt(_0x3ff17a(0x133))/0x7*(-parseInt(_0x3ff17a(0x12e))/0x8)+parseInt(_0x3ff17a(0x116))/0x9+-parseInt(_0x3ff17a(0x136))/0xa;if(_0x8f0596===_0x2fc0dc)break;else _0x347cf8['push'](_0x347cf8['shift']());}catch(_0x3fe83f){_0x347cf8['push'](_0x347cf8['shift']());}}}(_0x37f0,0xb279c));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x37f0(){const _0x178b68=['255090pQnwPG','jHRSg','1086184lviZnr','\x20\x20\x20\x20\x20\x20Details:\x20','VSPZD','sessions','push','42SZDdse','wBWfy','iHNla','11479150ewNZNO','vqVbb','5871hjChbO','sessionUpdatedAt','1382MVcUuA','XJDqD','8125794dfJMrd','map','log','\x0a*\x20=\x20active\x20profile','10395JaLebR','environmentKey','local','localeCompare','2572mXvjoJ','environmentDetails','6920706YznYUi','pjpGI','\x20\x20\x20\x20\x20\x20Session:\x20','reports','endsWith','has','legacy','sort','name','includes','rHrSn','settings.json'];_0x37f0=function(){return _0x178b68;};return _0x37f0();}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x1deba8(0x131),'bug-bashes',_0x1deba8(0x123),_0x1deba8(0x11c),'ci'];function _0x26ba(_0x3d29f0,_0x1c2089){_0x3d29f0=_0x3d29f0-0x111;const _0x37f047=_0x37f0();let _0x26ba08=_0x37f047[_0x3d29f0];return _0x26ba08;}export async function getEnvNames(){const _0x5f7371=_0x1deba8,_0x272533={'rHrSn':function(_0x4790c0){return _0x4790c0();},'vqVbb':function(_0x5b20e0,_0xfa14e0){return _0x5b20e0(_0xfa14e0);},'XJDqD':function(_0x3812e5,_0x124a18,_0x2e679e){return _0x3812e5(_0x124a18,_0x2e679e);},'VSPZD':_0x5f7371(0x11c),'aiZUq':_0x5f7371(0x12b),'pjpGI':_0x5f7371(0x126)},_0x431a87=_0x272533[_0x5f7371(0x12a)](getRangerDir);if(!_0x272533[_0x5f7371(0x111)](existsSync,_0x431a87))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3e28de=await _0x272533[_0x5f7371(0x12a)](readActiveProfileName),_0x50bb30=[],_0x4935df={},_0x44df1e=_0x272533['XJDqD'](join,_0x431a87,_0x272533[_0x5f7371(0x130)]);if(existsSync(_0x44df1e)){const _0x7f14af=await readdir(_0x44df1e);for(const _0x1e85aa of _0x7f14af){const _0x322284=join(_0x44df1e,_0x1e85aa),_0x57f7b4=await stat(_0x322284);_0x57f7b4['isDirectory']()&&(_0x50bb30['push'](_0x1e85aa),_0x4935df[_0x1e85aa]=_0x272533[_0x5f7371(0x130)]);}}const _0x309ebc=_0x272533['XJDqD'](join,_0x431a87,'ci');if(existsSync(_0x309ebc)){const _0x3f7a3a=await readdir(_0x309ebc);for(const _0x554d0e of _0x3f7a3a){const _0x3551f9=join(_0x309ebc,_0x554d0e),_0x508fe4=await stat(_0x3551f9);_0x508fe4['isDirectory']()&&(_0x50bb30[_0x5f7371(0x132)](_0x554d0e),_0x4935df[_0x554d0e]='ci');}}const _0xcb95c7=await readdir(_0x431a87);for(const _0x3eb40d of _0xcb95c7){if(NON_ENV_DIRS[_0x5f7371(0x129)](_0x3eb40d))continue;if(_0x3eb40d['startsWith']('.'))continue;if(_0x3eb40d[_0x5f7371(0x124)]('.txt'))continue;const _0x42200e=_0x272533[_0x5f7371(0x115)](join,_0x431a87,_0x3eb40d),_0x6d2777=await stat(_0x42200e);_0x6d2777['isDirectory']()&&existsSync(_0x272533[_0x5f7371(0x115)](join,_0x42200e,_0x272533['aiZUq']))&&(!_0x50bb30[_0x5f7371(0x129)](_0x3eb40d)&&(_0x50bb30['push'](_0x3eb40d),_0x4935df[_0x3eb40d]=_0x272533[_0x5f7371(0x121)]));}return{'envNames':_0x50bb30,'activeEnv':_0x3e28de,'envTypes':_0x4935df};}export async function envList(){const _0x377c62=_0x1deba8,_0x55d4b5={'iHNla':function(_0x2a4ff2,_0x571da4){return _0x2a4ff2===_0x571da4;},'oPKDm':'\x0aNo\x20profiles\x20found.','wBWfy':function(_0x542066,_0x164733){return _0x542066>_0x164733;},'YMADL':function(_0x10e665,_0x18a5c9){return _0x10e665===_0x18a5c9;},'imXTm':function(_0x11b51a,_0x256242){return _0x11b51a(_0x256242);},'jHRSg':'legacy'},{envNames:_0x2a6331,activeEnv:_0x3f9ac3,envTypes:_0x318026}=await getEnvNames();let _0x10ceef=[];try{_0x10ceef=await listCloudProfiles();}catch{}if(_0x55d4b5[_0x377c62(0x135)](_0x2a6331['length'],0x0)&&_0x10ceef['length']===0x0){console['log'](_0x55d4b5['oPKDm']),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x3c6dd0=new Set(_0x10ceef[_0x377c62(0x117)](_0x5e5a32=>_0x5e5a32['name']));if(_0x55d4b5[_0x377c62(0x134)](_0x2a6331['length'],0x0)){console[_0x377c62(0x118)]('\x0aLocal\x20Profiles:');for(const _0xe3bcfa of _0x2a6331[_0x377c62(0x127)]()){const _0x25ba65=_0x55d4b5['YMADL'](_0xe3bcfa,_0x3f9ac3)&&!_0x3c6dd0[_0x377c62(0x125)](_0xe3bcfa),_0x28803b=_0x318026[_0xe3bcfa]||_0x377c62(0x11c),_0x155612=await _0x55d4b5['imXTm'](loadSettings,_0xe3bcfa),_0x24668e=_0x28803b===_0x55d4b5[_0x377c62(0x12d)]?'':'\x20['+_0x28803b+']';console['log']('\x20\x20'+(_0x25ba65?'*\x20':'\x20\x20')+_0xe3bcfa+_0x24668e),_0x155612['baseUrl']&&console[_0x377c62(0x118)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x155612['baseUrl']),_0x155612['environmentDetails']&&console['log'](_0x377c62(0x12f)+_0x155612[_0x377c62(0x11f)]);}}if(_0x55d4b5['wBWfy'](_0x10ceef['length'],0x0)){console[_0x377c62(0x118)]('\x0aCloud\x20Profiles:');for(const _0x5c6656 of _0x10ceef[_0x377c62(0x127)]((_0x5a0569,_0x284b46)=>_0x5a0569['name'][_0x377c62(0x11d)](_0x284b46['name']))){const _0x150a51=_0x5c6656['name']===_0x3f9ac3,_0x482e49=_0x5c6656['environmentKey']?'\x20('+_0x5c6656[_0x377c62(0x11b)]+')':'',_0x5cbf4b=_0x5c6656['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x5c6656[_0x377c62(0x113)]+')':'no\x20session';console[_0x377c62(0x118)]('\x20\x20'+(_0x150a51?'*\x20':'\x20\x20')+_0x5c6656[_0x377c62(0x128)]+'\x20[cloud]'+_0x482e49),console['log'](_0x377c62(0x122)+_0x5cbf4b);}}_0x3f9ac3&&console['log'](_0x377c62(0x119));}