@ranger-testing/ranger-cli 3.0.1-alpha.55b593b-29 → 3.0.1-alpha.bb18058-34

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 (84) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.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 -1
  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/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -0
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/userApi.js +1 -1
  79. package/build/commands/utils/version.js +1 -1
  80. package/build/commands/verifyFeature.js +1 -1
  81. package/build/commands/verifyFeatureCli.js +1 -1
  82. package/build/commands/verifyFeatureNovaCli.js +1 -1
  83. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  84. package/package.json +2 -1
@@ -1 +1 @@
1
- const _0x2c48bc=_0x50c6;(function(_0x29be0a,_0x4634e1){const _0x9dc9cf=_0x50c6,_0x4eb88f=_0x29be0a();while(!![]){try{const _0x52faaa=parseInt(_0x9dc9cf(0x1b5))/0x1*(parseInt(_0x9dc9cf(0x185))/0x2)+-parseInt(_0x9dc9cf(0x1b8))/0x3+parseInt(_0x9dc9cf(0x15d))/0x4*(-parseInt(_0x9dc9cf(0x176))/0x5)+parseInt(_0x9dc9cf(0x164))/0x6*(-parseInt(_0x9dc9cf(0x156))/0x7)+parseInt(_0x9dc9cf(0x1a0))/0x8+-parseInt(_0x9dc9cf(0x1a8))/0x9+parseInt(_0x9dc9cf(0x14f))/0xa;if(_0x52faaa===_0x4634e1)break;else _0x4eb88f['push'](_0x4eb88f['shift']());}catch(_0x3c31dd){_0x4eb88f['push'](_0x4eb88f['shift']());}}}(_0x103c,0x33a23));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x50c6(_0x4e8e2f,_0x500f5a){_0x4e8e2f=_0x4e8e2f-0x148;const _0x103c6f=_0x103c();let _0x50c640=_0x103c6f[_0x4e8e2f];return _0x50c640;}import{existsSync}from'fs';import _0x3a8ca4 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x2c48bc(0x1bf);function warnCloudProfileSharedInOrg(){const _0x126352=_0x2c48bc;if(!process[_0x126352(0x1b6)][_0x126352(0x1aa)])return;console[_0x126352(0x1c2)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5d1323){const _0x40908b=_0x2c48bc,_0x17b90a={'SaxBu':function(_0xa19661,_0x5c1182,_0x139062){return _0xa19661(_0x5c1182,_0x139062);},'fjndh':'HEAD','QcNjD':'TypeError','nBQIO':'fetch\x20failed'};try{const _0x3e7030=new AbortController(),_0x2456d9=_0x17b90a['SaxBu'](setTimeout,()=>_0x3e7030[_0x40908b(0x19c)](),0x1388),_0x19104a={'method':_0x17b90a[_0x40908b(0x14a)],'signal':_0x3e7030[_0x40908b(0x160)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x40908b(0x1b4)](_0x5d1323)&&(process[_0x40908b(0x192)][_0x40908b(0x182)]='0');const _0x12aa86=await fetch(_0x5d1323,_0x19104a);delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x2456d9);if(_0x12aa86[_0x40908b(0x193)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x12aa86['status']};}catch(_0x56630e){delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x48a6cd=_0x56630e,_0x3fba42=_0x48a6cd[_0x40908b(0x195)]||String(_0x56630e),_0x3ed541=_0x3fba42[_0x40908b(0x19b)]('Invalid\x20URL')||_0x48a6cd['name']===_0x17b90a[_0x40908b(0x17d)]||_0x3fba42['includes'](_0x17b90a['nBQIO']);return{'ok':![],'error':_0x3fba42,'isProtocolError':_0x3ed541};}}function _0x103c(){const _0x28e298=['kBOrO','KlKoU','dnJlT','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','no_match','exit','prompt','3388977PAjyas','Continue\x20anyway','isTTY','nFuzv','length','lFUIt','OKpyZ','setupHeader','startsWith','What\x20would\x20you\x20like\x20to\x20do?',')\x0a\x20\x20Save\x20\x27','force','test','187102knleFY','stdout','✓\x20Cloud\x20profile\x20\x27','694692erbnbH','\x0a✓\x20Profile\x20\x27','environments','zQCDl','slice','\x27\x20matching\x20','jGCaR','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','✓\x20Profile\x20\x27','vPuvt','warn','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','some','trim','zonCP','fjndh','\x20\x20Did\x20you\x20mean\x20','lobTd','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','PYMXr','10626140CouAqn','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','OLgFt','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','⚠\x20Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','139741yOURhF','continue','user_declined','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','trackPhaseEnd','AYmjf','iRCoE','16broIok','origin','join','signal','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','VsSrn','fEVxy','78fBVTTQ','SEOZe','\x0a\x20\x20A\x20profile\x20named\x20\x22','capture','rKdnU','use_suggestion','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x0a\x20\x20(domains:\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','oVFUA','yHEYq','UTRaR','profile.add.autoRouteSkipped','url','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','local','399505rYnZQv','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','profile.add.autoRouted','Enter\x20a\x20different\x20URL','indexOf','\x20--skip-auth\x0a','QcNjD','.\x20Configured\x20envs:\x20','nSKuH','no_auth_config','isProtocolError','NODE_TLS_REJECT_UNAUTHORIZED','input','domains','2XZdtrn','skipAuth','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','Could\x20not\x20reach\x20','keys','confirm','cdpEndpoint','mzvxL','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','rouUn','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','list','env','status','cwd','message','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sUAwj','error','log','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','includes','abort','aqmBy','\x0a🌐\x20Profile\x20Setup\x0a','ycGmj','1192120tEmWkJ'];_0x103c=function(){return _0x28e298;};return _0x103c();}async function sweepOrphanLocalProfile(_0x131fd3,_0x506c6f,_0x4af4cc){const _0x2fc69c=_0x2c48bc,_0x2526e1={'OLgFt':function(_0x2c2b3f,_0xc49000){return _0x2c2b3f(_0xc49000);},'SSfNh':function(_0xdca2f9,_0x5d5ed2){return _0xdca2f9(_0x5d5ed2);},'OFXzm':function(_0x2c9993,_0x5941e7,_0x301473){return _0x2c9993(_0x5941e7,_0x301473);}},_0x2245b6=join(_0x506c6f,_0x2fc69c(0x175)),_0x41254c=join(_0x2245b6,_0x131fd3);_0x2526e1['OLgFt'](existsSync,_0x41254c)&&(_0x4af4cc&&await isPathGitTracked(_0x41254c)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x41254c+_0x2fc69c(0x1c3)):(await rm(_0x41254c,{'recursive':!![],'force':!![]}),console[_0x2fc69c(0x199)](_0x2fc69c(0x16a)+_0x41254c)));if(_0x2526e1[_0x2fc69c(0x151)](existsSync,_0x2245b6)){let _0x3981b0=[];try{_0x3981b0=await _0x2526e1['SSfNh'](readdir,_0x2245b6);}catch{return;}const _0x37811d='.tmp-'+_0x131fd3+'-';for(const _0x57beb1 of _0x3981b0){if(!_0x57beb1[_0x2fc69c(0x1b0)](_0x37811d))continue;const _0x107c80=join(_0x2245b6,_0x57beb1);await _0x2526e1['OFXzm'](rm,_0x107c80,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x107c80);}}}async function sweepOrphansBestEffort(_0x149228){const _0x2e698d=_0x2c48bc,_0x3ebeb3={'OKpyZ':function(_0x14158a,_0x44e9f3,_0x449e97,_0x3bb8ea){return _0x14158a(_0x44e9f3,_0x449e97,_0x3bb8ea);},'NZmFF':function(_0x737c87){return _0x737c87();},'VtrEN':function(_0x45fc66){return _0x45fc66();}};try{await _0x3ebeb3[_0x2e698d(0x1ae)](sweepOrphanLocalProfile,_0x149228,_0x3ebeb3['NZmFF'](getRangerHomeDir),![]);const _0x5d6da8=getRangerDir();_0x5d6da8!==_0x3ebeb3['VtrEN'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x149228,_0x5d6da8,!![]);}catch(_0x38f4a8){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x38f4a8 instanceof Error?_0x38f4a8[_0x2e698d(0x195)]:String(_0x38f4a8))+').');}}async function markActive(_0x1c5756){const _0xd30e25=_0x2c48bc,_0x42c61e={'eYBAj':function(_0x4f84b9,_0x1d2e0b){return _0x4f84b9(_0x1d2e0b);}};try{await _0x42c61e['eYBAj'](writeActiveProfileName,_0x1c5756),console[_0xd30e25(0x199)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1c5756);}catch{console[_0xd30e25(0x199)](_0xd30e25(0x159));}}async function tryAutoRouteCloudProfile(_0x1e570e,_0x25ca73,_0x479955,_0x230d10,_0x558394){const _0x226970=_0x2c48bc,_0x1523d3={'XkzMG':function(_0x19c235,_0x2295bf){return _0x19c235===_0x2295bf;},'sSBBx':function(_0x5f4e07){return _0x5f4e07();},'vPuvt':function(_0x1716ce,_0xc7783d){return _0x1716ce instanceof _0xc7783d;},'PYMXr':'profile.add.autoRouteSkipped','sUAwj':function(_0x582537,_0x52bf35){return _0x582537+_0x52bf35;},'xyABB':function(_0x18b29c,_0x461638){return _0x18b29c+_0x461638;},'WNpFA':function(_0x3fb860,_0x14732b){return _0x3fb860+_0x14732b;},'kBOrO':_0x226970(0x14d),'mGQaF':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','RHXHS':_0x226970(0x1a5),'eElTp':_0x226970(0x18a),'nSKuH':'saveToCloud','PIBZU':function(_0x297ace,_0x719245){return _0x297ace+_0x719245;},'KvmAW':function(_0x5144e0,_0x4c087b){return _0x5144e0+_0x4c087b;},'sGRKt':function(_0x79c28b,_0xc9d41e){return _0x79c28b(_0xc9d41e);}};let _0x256a1a;try{_0x256a1a=await _0x1523d3['sSBBx'](fetchAuthConfig);}catch(_0x4f0afb){return _0x558394?.['trackPhaseEnd'](_0x226970(0x171),{'reason':'no_auth_config','profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x150)+(_0x1523d3['vPuvt'](_0x4f0afb,Error)?_0x4f0afb['message']:String(_0x4f0afb))),![];}if(!_0x256a1a||!_0x256a1a['environments']||Object[_0x226970(0x189)](_0x256a1a[_0x226970(0x1ba)])['length']===0x0){if(_0x230d10)return await captureEnvLessProfile(_0x1e570e,_0x25ca73,_0x479955,_0x558394);return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x180),'profileName':_0x1e570e}),console['error'](_0x1523d3[_0x226970(0x197)](_0x1523d3['xyABB'](_0x1523d3['WNpFA'](_0x1523d3['sUAwj'](_0x1523d3[_0x226970(0x1a1)]+'\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1e570e+'\x20--url\x20'+_0x25ca73+_0x226970(0x17c))+'\x0a',_0x1523d3['mGQaF']),_0x226970(0x16d))),![];}const _0x59eca3=matchAuthEnvironment(_0x25ca73,_0x256a1a);if(!_0x59eca3)return _0x558394?.[_0x226970(0x15a)](_0x1523d3[_0x226970(0x14e)],{'reason':_0x1523d3['RHXHS'],'profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x1a4)+_0x25ca73+_0x226970(0x17e)+Object['keys'](_0x256a1a[_0x226970(0x1ba)])['join'](',\x20')+'.'),![];const _0x3ab8ef=_0x256a1a[_0x226970(0x1ba)][_0x59eca3],_0x1bc60b=_0x3ab8ef?.[_0x226970(0x184)]??[];if(_0x230d10&&!_0x479955['yes']){const {saveToCloud:_0x2c3d82}=await _0x3a8ca4['prompt']([{'type':_0x1523d3['eElTp'],'name':_0x1523d3[_0x226970(0x17f)],'message':'Found\x20auth\x20environment\x20\x27'+_0x59eca3+_0x226970(0x1bd)+_0x25ca73+_0x226970(0x16c)+_0x1bc60b[_0x226970(0x15f)](',\x20')+_0x226970(0x1b2)+_0x1e570e+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2c3d82)return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x158),'profileName':_0x1e570e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x168796=_0x1bc60b[_0x226970(0x1c5)](_0x5cc318=>{const _0x536970=_0x226970;try{return _0x1523d3['XkzMG'](new URL(_0x5cc318)[_0x536970(0x15e)],new URL(_0x25ca73)[_0x536970(0x15e)]);}catch{return![];}}),_0x21408d={};!_0x168796&&(_0x21408d['baseUrl']=_0x25ca73);try{await createCloudProfile(_0x1e570e,_0x59eca3,{'settings':_0x21408d}),_0x1523d3['sSBBx'](warnCloudProfileSharedInOrg);}catch(_0x4f7b54){if(_0x1523d3[_0x226970(0x1c1)](_0x4f7b54,ApiError)&&_0x4f7b54[_0x226970(0x193)]===0x199){console[_0x226970(0x198)](_0x1523d3['PIBZU'](_0x226970(0x166)+_0x1e570e+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1e570e));throw _0x4f7b54;}throw _0x4f7b54;}return console['log'](_0x1523d3['KvmAW']('✓\x20Profile\x20\x27'+_0x1e570e+'\x27\x20created.\x0a',_0x226970(0x173)+_0x1e570e)),await _0x1523d3['sGRKt'](sweepOrphansBestEffort,_0x1e570e),_0x558394?.['trackPhaseEnd'](_0x226970(0x179),{'envKey':_0x59eca3,'profileName':_0x1e570e}),!![];}async function createUnconfiguredCloudProfile(_0x5a7f5d,_0x4aa1b6){const _0xce5043=_0x2c48bc,_0x34c027={'AYmjf':function(_0x13c307,_0x43d90b,_0x5b4d8a,_0x293024){return _0x13c307(_0x43d90b,_0x5b4d8a,_0x293024);},'AUcKy':function(_0xab6ce4,_0x4b9489){return _0xab6ce4 instanceof _0x4b9489;}};try{await _0x34c027[_0xce5043(0x15b)](createCloudProfile,_0x5a7f5d,undefined,{'settings':_0x4aa1b6}),warnCloudProfileSharedInOrg();}catch(_0xc0c1d3){_0x34c027['AUcKy'](_0xc0c1d3,ApiError)&&_0xc0c1d3[_0xce5043(0x193)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5a7f5d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5a7f5d));throw _0xc0c1d3;}}async function captureEnvLessProfile(_0x3cc89f,_0x43d9e2,_0xd7b11e,_0x16715c){const _0x17032e=_0x2c48bc,_0x448c28={'LtDqu':'confirm','yUeDH':'profile.add.autoRouteSkipped','lmhXo':'user_declined','zonCP':function(_0x51d5b7,_0x2575c1){return _0x51d5b7===_0x2575c1;},'KlKoU':function(_0x175f8c,_0x5d1604){return _0x175f8c+_0x5d1604;},'lobTd':function(_0x317b4c,_0x94926c){return _0x317b4c>_0x94926c;},'NpjHX':function(_0x13acfb,_0x403763){return _0x13acfb instanceof _0x403763;},'ycGmj':function(_0x19bc32,_0x36c364){return _0x19bc32+_0x36c364;},'iRCoE':function(_0xc059c9,_0x5e5748,_0x220e06){return _0xc059c9(_0x5e5748,_0x220e06);},'oVFUA':function(_0x2b9306,_0x36e7e6){return _0x2b9306+_0x36e7e6;}};if(!_0xd7b11e['yes']){const {capture:_0x5126db}=await _0x3a8ca4[_0x17032e(0x1a7)]([{'type':_0x448c28['LtDqu'],'name':_0x17032e(0x167),'message':_0x17032e(0x196),'default':!![]}]);if(!_0x5126db)return _0x16715c?.[_0x17032e(0x15a)](_0x448c28['yUeDH'],{'reason':_0x448c28['lmhXo'],'profileName':_0x3cc89f}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x8d5419={};if(_0xd7b11e['setupHeader'])for(const _0x2cfe4d of _0xd7b11e[_0x17032e(0x1af)]){const _0x59bfd7=_0x2cfe4d['indexOf'](':');if(_0x448c28[_0x17032e(0x149)](_0x59bfd7,-0x1))continue;_0x8d5419[_0x2cfe4d['slice'](0x0,_0x59bfd7)['trim']()]=_0x2cfe4d[_0x17032e(0x1bc)](_0x448c28[_0x17032e(0x1a2)](_0x59bfd7,0x1))[_0x17032e(0x148)]();}const _0x435f80={'baseUrl':_0x43d9e2};_0x448c28['lobTd'](Object[_0x17032e(0x189)](_0x8d5419)[_0x17032e(0x1ac)],0x0)&&(_0x435f80['setupHeaders']=_0x8d5419);let _0x4c2e7a;try{_0x4c2e7a=await createCloudProfile(_0x3cc89f,undefined,{'settings':_0x435f80}),warnCloudProfileSharedInOrg();}catch(_0x334c75){_0x448c28['NpjHX'](_0x334c75,ApiError)&&_0x448c28[_0x17032e(0x149)](_0x334c75[_0x17032e(0x193)],0x199)&&console[_0x17032e(0x198)](_0x448c28[_0x17032e(0x19f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3cc89f+_0x17032e(0x161),_0x17032e(0x1c4)+_0x3cc89f));throw _0x334c75;}return await _0x448c28[_0x17032e(0x15c)](manualBrowserLogin,_0x4c2e7a,{'key':'','domains':[_0x43d9e2],'setupHeaders':_0x448c28[_0x17032e(0x14c)](Object['keys'](_0x8d5419)[_0x17032e(0x1ac)],0x0)?_0x8d5419:undefined}),console['log'](_0x448c28[_0x17032e(0x16e)](_0x17032e(0x1b9)+_0x3cc89f+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3cc89f)),await sweepOrphansBestEffort(_0x3cc89f),_0x16715c?.['trackPhaseEnd'](_0x17032e(0x179),{'envKey':null,'profileName':_0x3cc89f}),!![];}export async function addEnv(_0x3e91dc,_0x53f2a0={},_0x24a5f6){const _0x18665b=_0x2c48bc,_0x1441aa={'dnJlT':function(_0x5160f6,_0x41476c){return _0x5160f6+_0x41476c;},'aqmBy':function(_0x36e6c1,_0x3be76d){return _0x36e6c1+_0x3be76d;},'rKdnU':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','lFUIt':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','mzvxL':_0x18665b(0x178),'jGCaR':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ordUk':function(_0xb2ffe5,_0x4e44cf){return _0xb2ffe5===_0x4e44cf;},'VsSrn':function(_0x382e95,_0x95db8){return _0x382e95+_0x95db8;},'gUpMd':_0x18665b(0x18d),'rouUn':function(_0x10c489,_0x2aefc3){return _0x10c489(_0x2aefc3);},'hdIkx':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','Zrrvg':function(_0x84abff,_0x1cdeb0){return _0x84abff>_0x1cdeb0;},'Oaeor':_0x18665b(0x19e),'yHEYq':_0x18665b(0x177),'fEVxy':_0x18665b(0x183),'SEOZe':'baseUrl','zEaFL':_0x18665b(0x154),'nFuzv':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zQCDl':function(_0x39a5e5,_0x5c9e03){return _0x39a5e5||_0x5c9e03;},'UTRaR':'http://localhost:3000','DmwDJ':_0x18665b(0x1a9),'eUmsN':function(_0x2a241c,_0x4de17b){return _0x2a241c(_0x4de17b);},'eKDjv':_0x18665b(0x157),'wSPMK':function(_0x489d49,_0x4d8a89){return _0x489d49(_0x4d8a89);}};_0x53f2a0['ci']&&(console['error'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa[_0x18665b(0x19d)](_0x1441aa[_0x18665b(0x1a3)](_0x1441aa[_0x18665b(0x168)],_0x1441aa[_0x18665b(0x1ad)]),'\x0a'),_0x1441aa[_0x18665b(0x18c)])+_0x1441aa[_0x18665b(0x1be)],'\x0a'),_0x18665b(0x190))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x248737={};if(_0x53f2a0['setupHeader'])for(const _0x684dc0 of _0x53f2a0[_0x18665b(0x1af)]){const _0x158f94=_0x684dc0[_0x18665b(0x17b)](':');if(_0x1441aa['ordUk'](_0x158f94,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x684dc0+_0x18665b(0x18e));const _0x5ec60f=_0x684dc0[_0x18665b(0x1bc)](0x0,_0x158f94)[_0x18665b(0x148)](),_0x4827ca=_0x684dc0[_0x18665b(0x1bc)](_0x1441aa[_0x18665b(0x162)](_0x158f94,0x1))['trim']();_0x248737[_0x5ec60f]=_0x4827ca;}if(_0x53f2a0['cdpEndpoint']!==undefined&&_0x53f2a0[_0x18665b(0x18b)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x53f2a0[_0x18665b(0x18b)]&&_0x53f2a0[_0x18665b(0x172)])throw new Error(_0x1441aa['gUpMd']);const _0x48a449=_0x1441aa['rouUn'](Boolean,_0x53f2a0['cdpEndpoint']),_0x166cb4=isInteractive();if(!_0x166cb4&&!_0x53f2a0[_0x18665b(0x172)]&&!_0x48a449&&!_0x53f2a0[_0x18665b(0x186)])throw new Error(_0x18665b(0x187));if(_0x48a449){const _0x1350fc=_0x53f2a0[_0x18665b(0x18b)];console[_0x18665b(0x199)](_0x1441aa['hdIkx']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1350fc);const _0x3cb31a={'cdpEndpoint':_0x1350fc,'isElectron':!![]};Object[_0x18665b(0x189)](_0x248737)['length']>0x0&&(_0x3cb31a['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x3cb31a);try{setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,_0x18665b(0x18b),_0x1350fc),setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,'isElectron',!![]);}catch(_0x2efef2){console[_0x18665b(0x198)](_0x18665b(0x19a)+(_0x2efef2 instanceof Error?_0x2efef2['message']:String(_0x2efef2)));}console[_0x18665b(0x199)](_0x18665b(0x1b7)+_0x3e91dc+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0[_0x18665b(0x186)]){const _0x1937dd={};_0x53f2a0[_0x18665b(0x172)]&&(_0x1937dd[_0x18665b(0x174)]=_0x53f2a0[_0x18665b(0x172)]);_0x1441aa['Zrrvg'](Object['keys'](_0x248737)[_0x18665b(0x1ac)],0x0)&&(_0x1937dd['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x1937dd),console[_0x18665b(0x199)](_0x1441aa['VsSrn'](_0x18665b(0x1c0)+_0x3e91dc+'\x27\x20created\x20(no\x20session).\x0a',_0x18665b(0x16b)+_0x3e91dc+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0['url']){const _0x2346f6=_0x53f2a0[_0x18665b(0x172)],_0x30a93c=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2346f6);if(!_0x30a93c['ok']&&!_0x53f2a0[_0x18665b(0x1b3)])throw new Error(_0x18665b(0x188)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x30a93c['ok']&&_0x53f2a0['force']&&console['log'](_0x18665b(0x153)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x18665b(0x199)](_0x1441aa['Oaeor']),console['log'](_0x1441aa[_0x18665b(0x16f)]),console[_0x18665b(0x199)](_0x18665b(0x152));let _0x2f9767='',_0x57ae39=![];while(!![]){const _0x577f46=await _0x3a8ca4[_0x18665b(0x1a7)]([{'type':_0x1441aa[_0x18665b(0x163)],'name':_0x1441aa[_0x18665b(0x165)],'message':_0x57ae39?_0x1441aa['zEaFL']:_0x1441aa[_0x18665b(0x1ab)],'default':_0x1441aa[_0x18665b(0x1bb)](_0x2f9767,_0x1441aa[_0x18665b(0x170)])}]);_0x2f9767=_0x577f46[_0x18665b(0x174)];const _0xb09ac6=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2f9767);if(_0xb09ac6['ok'])break;const _0xb098ea=/^[a-zA-Z][\w+.-]*:\/\//[_0x18665b(0x1b4)](_0x2f9767),_0x3d719c=_0xb09ac6[_0x18665b(0x181)]&&!_0xb098ea,_0x163435=_0x3d719c?'http://'+_0x2f9767:null;_0x57ae39=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0xb09ac6[_0x18665b(0x198)]);_0x163435&&console['log'](_0x18665b(0x14b)+_0x163435+'?');const {action:_0x26bfad}=await _0x3a8ca4['prompt']([{'type':_0x18665b(0x191),'name':'action','message':_0x18665b(0x1b1),'choices':[..._0x163435?[{'name':'Use\x20'+_0x163435,'value':_0x18665b(0x169)}]:[],{'name':_0x18665b(0x17a),'value':'retry'},{'name':_0x1441aa['DmwDJ'],'value':'continue'}]}]);if(_0x26bfad===_0x18665b(0x169)&&_0x163435){_0x2f9767=_0x163435;const _0x5eafe4=await _0x1441aa['eUmsN'](checkUrlReachability,_0x2f9767);if(_0x5eafe4['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0x5eafe4[_0x18665b(0x198)]);}else{if(_0x26bfad===_0x1441aa['eKDjv'])break;}}_0x53f2a0={..._0x53f2a0,'url':_0x2f9767};}let _0x49091a=![];try{_0x49091a=await tryAutoRouteCloudProfile(_0x3e91dc,_0x53f2a0[_0x18665b(0x172)],_0x53f2a0,_0x166cb4,_0x24a5f6);}catch(_0x25894e){console[_0x18665b(0x198)](_0x18665b(0x155)+_0x3e91dc+'\x22:\x20'+(_0x25894e instanceof Error?_0x25894e['message']:String(_0x25894e))),process[_0x18665b(0x1a6)](0x1);}!_0x49091a&&process['exit'](0x1),await _0x1441aa['wSPMK'](markActive,_0x3e91dc);}
1
+ (function(_0x5dd7c7,_0x235ddb){const _0x2058e3=_0x1add,_0xfdc4f9=_0x5dd7c7();while(!![]){try{const _0x57c654=parseInt(_0x2058e3(0x147))/0x1*(parseInt(_0x2058e3(0x14f))/0x2)+-parseInt(_0x2058e3(0xf8))/0x3*(parseInt(_0x2058e3(0xdd))/0x4)+parseInt(_0x2058e3(0x100))/0x5+-parseInt(_0x2058e3(0x131))/0x6*(-parseInt(_0x2058e3(0x125))/0x7)+parseInt(_0x2058e3(0x138))/0x8*(-parseInt(_0x2058e3(0x113))/0x9)+-parseInt(_0x2058e3(0xeb))/0xa*(parseInt(_0x2058e3(0x12b))/0xb)+parseInt(_0x2058e3(0xee))/0xc;if(_0x57c654===_0x235ddb)break;else _0xfdc4f9['push'](_0xfdc4f9['shift']());}catch(_0x2ad9a2){_0xfdc4f9['push'](_0xfdc4f9['shift']());}}}(_0x4e1d,0x5785e));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x3663c5 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function _0x4e1d(){const _0x47b3cf=['Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','input','ziWFm','62VxyaFu','\x0a\x20\x20(domains:\x20','NuRiT','user_declined','message','cwd','use_suggestion','origin','YgfNr','exit','Invalid\x20--setup-header\x20format:\x20\x22','no_auth_config',')\x0a\x20\x20Save\x20\x27','SlPDM','NODE_TLS_REJECT_UNAUTHORIZED','\x0a🌐\x20Profile\x20Setup\x0a','.\x20Configured\x20envs:\x20','isElectron','WhIAA','some','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','.tmp-','1727512KyWzhh','Invalid\x20URL','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','KhaWx','DeurV','\x0a\x20\x20Could\x20not\x20reach\x20','setupHeader','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','nlxcy','Use\x20','join','confirm','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','profile.add.autoRouted','10fpAPfl','indexOf','error','8245956bzUZMF','XwXlO','ocYmC','ktKWe','log','local','continue','length','\x0a✓\x20Profile\x20\x27','jbGqv','3VWZOLB','CSyqZ','algKc','manual','prompt','dmRyL','keys','GhoWv','2117945vcCxIf','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','CuRKJ','\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','force','setupHeaders','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','MpqJt','fetch\x20failed','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','http://','Continue\x20anyway','yKCoH','environments','trim','VdkDj','\x20(continuing\x20with\x20--force)','yes','test','101043NxMxRF','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20\x20Did\x20you\x20mean\x20','✓\x20Cloud\x20profile\x20\x27','pNblT','QnPqb','baseUrl','\x0a\x20\x20A\x20profile\x20named\x20\x22','cdpEndpoint','RYEiB','trackPhaseEnd','XoKeb','RtAPm','domains','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','\x20--skip-auth\x0a','profile.add.autoRouteSkipped','uDvLJ','7HTtRGe','slice','Enter\x20a\x20different\x20URL','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','5669719BkanOD','\x20--url\x20','retry','oWtQu','✓\x20Profile\x20\x27','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','3454296cyWKyg','AXInr','\x20\x20https://docs.ranger.net/main/concepts/profiles','env','pKQOg','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','376UDdrYq','BRTmi','\x27\x20created.\x0a','status','\x22:\x20','DZgsV','http://localhost:3000','gHRQM','frETj','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','WJxAz','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','AfPAd','rxZxN','4742pdGjnl','vokFF','HEAD','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','url'];_0x4e1d=function(){return _0x47b3cf;};return _0x4e1d();}function warnCloudProfileSharedInOrg(){if(!process['stdout']['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}function _0x1add(_0x4c18bc,_0x4fdd79){_0x4c18bc=_0x4c18bc-0xd6;const _0x4e1d1b=_0x4e1d();let _0x1add5f=_0x4e1d1b[_0x4c18bc];return _0x1add5f;}async function checkUrlReachability(_0x5652f5){const _0x11c0af=_0x1add,_0x4e0aea={'SlPDM':function(_0x31cd9b,_0x49c842,_0x153fe0){return _0x31cd9b(_0x49c842,_0x153fe0);},'nlxcy':_0x11c0af(0x149),'algKc':function(_0x476f1f,_0x57278e){return _0x476f1f<_0x57278e;},'PXcCu':_0x11c0af(0x108)};try{const _0x2c207b=new AbortController(),_0xce6d42=_0x4e0aea[_0x11c0af(0x15c)](setTimeout,()=>_0x2c207b['abort'](),0x1388),_0x2eda22={'method':_0x4e0aea[_0x11c0af(0xe5)],'signal':_0x2c207b['signal'],'redirect':_0x11c0af(0xfb)};/^https:\/\/localhost(:\d+)?/i[_0x11c0af(0x112)](_0x5652f5)&&(process['env'][_0x11c0af(0x15d)]='0');const _0x111ee8=await fetch(_0x5652f5,_0x2eda22);delete process['env'][_0x11c0af(0x15d)],clearTimeout(_0xce6d42);if(_0x4e0aea[_0x11c0af(0xfa)](_0x111ee8['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x111ee8[_0x11c0af(0x13b)]};}catch(_0x2a34ef){delete process[_0x11c0af(0x134)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x289c71=_0x2a34ef,_0xf70646=_0x289c71['message']||String(_0x2a34ef),_0x2e251a=_0xf70646['includes'](_0x11c0af(0xde))||_0x289c71['name']==='TypeError'||_0xf70646['includes'](_0x4e0aea['PXcCu']);return{'ok':![],'error':_0xf70646,'isProtocolError':_0x2e251a};}}async function sweepOrphanLocalProfile(_0x233ad8,_0x42d5d4,_0x4b7d6f){const _0x356ad1=_0x1add,_0x377c0e={'Mdyqk':function(_0x2531bf,_0x150df1,_0x13fdf4){return _0x2531bf(_0x150df1,_0x13fdf4);},'MpqJt':function(_0x18b79d,_0x1fd78b,_0x321085){return _0x18b79d(_0x1fd78b,_0x321085);}},_0x3c9bd8=_0x377c0e['Mdyqk'](join,_0x42d5d4,_0x356ad1(0xf3)),_0x44d18a=join(_0x3c9bd8,_0x233ad8);existsSync(_0x44d18a)&&(_0x4b7d6f&&await isPathGitTracked(_0x44d18a)?console[_0x356ad1(0xf2)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x44d18a+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x44d18a,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x44d18a)));if(existsSync(_0x3c9bd8)){let _0x2e3cb5=[];try{_0x2e3cb5=await readdir(_0x3c9bd8);}catch{return;}const _0x26f307=_0x356ad1(0xdc)+_0x233ad8+'-';for(const _0x2d6383 of _0x2e3cb5){if(!_0x2d6383['startsWith'](_0x26f307))continue;const _0x49a4db=join(_0x3c9bd8,_0x2d6383);await _0x377c0e[_0x356ad1(0x107)](rm,_0x49a4db,{'recursive':!![],'force':!![]}),console['log'](_0x356ad1(0x143)+_0x49a4db);}}}async function sweepOrphansBestEffort(_0x48b17d){const _0x45a9c1=_0x1add,_0x1bd88d={'pKQOg':function(_0xd402d9){return _0xd402d9();},'dmRyL':function(_0x3eedcb,_0x1442ba){return _0x3eedcb!==_0x1442ba;},'iMGTW':function(_0x690149){return _0x690149();},'vfGoP':function(_0x236050,_0x27df1a){return _0x236050 instanceof _0x27df1a;}};try{await sweepOrphanLocalProfile(_0x48b17d,getRangerHomeDir(),![]);const _0xcbae50=_0x1bd88d[_0x45a9c1(0x135)](getRangerDir);_0x1bd88d[_0x45a9c1(0xfd)](_0xcbae50,_0x1bd88d['iMGTW'](getRangerHomeDir))&&await sweepOrphanLocalProfile(_0x48b17d,_0xcbae50,!![]);}catch(_0x3ae0ce){console[_0x45a9c1(0xf2)](_0x45a9c1(0x12a)+(_0x1bd88d['vfGoP'](_0x3ae0ce,Error)?_0x3ae0ce[_0x45a9c1(0x153)]:String(_0x3ae0ce))+').');}}async function markActive(_0x4f9fd8){const _0xb305dc=_0x1add,_0x323b79={'mqwhr':function(_0x46a11d,_0xb8b62c){return _0x46a11d(_0xb8b62c);},'Hzoqv':_0xb305dc(0x130)};try{await _0x323b79['mqwhr'](writeActiveProfileName,_0x4f9fd8),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x4f9fd8);}catch{console['log'](_0x323b79['Hzoqv']);}}async function tryAutoRouteCloudProfile(_0x44d1fa,_0x35dc53,_0x3d9b6c,_0x274c86,_0x217ca0){const _0x5e6c12=_0x1add,_0x753fd1={'ovsWP':function(_0x3ea09d,_0x3e6c3c){return _0x3ea09d===_0x3e6c3c;},'tFtdS':function(_0x247189,_0x57a05e){return _0x247189 instanceof _0x57a05e;},'pNblT':_0x5e6c12(0x123),'KhaWx':_0x5e6c12(0x15a),'rOMHz':function(_0x51e902,_0x20fd2c){return _0x51e902+_0x20fd2c;},'RtAPm':function(_0x17615c,_0x143857){return _0x17615c+_0x143857;},'eCVMt':_0x5e6c12(0x103),'ktKWe':_0x5e6c12(0xe4),'vokFF':'no_match','dMMrD':_0x5e6c12(0x152),'ChFKl':_0x5e6c12(0xdb),'GhoWv':function(_0x37676e,_0x449fd3,_0x26dd71,_0x2191a4){return _0x37676e(_0x449fd3,_0x26dd71,_0x2191a4);},'WJxAz':function(_0x2cc43e,_0x3d0c75){return _0x2cc43e instanceof _0x3d0c75;}};let _0x45d2a3;try{_0x45d2a3=await fetchAuthConfig();}catch(_0x493f45){return _0x217ca0?.[_0x5e6c12(0x11d)]('profile.add.autoRouteSkipped',{'reason':_0x5e6c12(0x15a),'profileName':_0x44d1fa}),console[_0x5e6c12(0xed)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x753fd1['tFtdS'](_0x493f45,Error)?_0x493f45[_0x5e6c12(0x153)]:String(_0x493f45))),![];}if(!_0x45d2a3||!_0x45d2a3['environments']||Object['keys'](_0x45d2a3[_0x5e6c12(0x10d)])['length']===0x0){if(_0x274c86)return await captureEnvLessProfile(_0x44d1fa,_0x35dc53,_0x3d9b6c,_0x217ca0);return _0x217ca0?.['trackPhaseEnd'](_0x753fd1[_0x5e6c12(0x117)],{'reason':_0x753fd1[_0x5e6c12(0xe0)],'profileName':_0x44d1fa}),console[_0x5e6c12(0xed)](_0x753fd1['rOMHz'](_0x753fd1[_0x5e6c12(0x11f)](_0x753fd1['eCVMt']+'\x0a'+_0x753fd1[_0x5e6c12(0xf1)]+(_0x5e6c12(0x121)+_0x44d1fa+_0x5e6c12(0x12c)+_0x35dc53+_0x5e6c12(0x122)),'\x0a'),'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a')+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x2bef31=matchAuthEnvironment(_0x35dc53,_0x45d2a3);if(!_0x2bef31)return _0x217ca0?.[_0x5e6c12(0x11d)]('profile.add.autoRouteSkipped',{'reason':_0x753fd1[_0x5e6c12(0x148)],'profileName':_0x44d1fa}),console['error'](_0x5e6c12(0x136)+_0x35dc53+_0x5e6c12(0xd7)+Object['keys'](_0x45d2a3['environments'])['join'](',\x20')+'.'),![];const _0x2dabd1=_0x45d2a3[_0x5e6c12(0x10d)][_0x2bef31],_0x1727e9=_0x2dabd1?.[_0x5e6c12(0x120)]??[];if(_0x274c86&&!_0x3d9b6c[_0x5e6c12(0x111)]){const {saveToCloud:_0x4e030d}=await _0x3663c5['prompt']([{'type':_0x5e6c12(0xe8),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x2bef31+'\x27\x20matching\x20'+_0x35dc53+_0x5e6c12(0x150)+_0x1727e9[_0x5e6c12(0xe7)](',\x20')+_0x5e6c12(0x15b)+_0x44d1fa+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4e030d)return _0x217ca0?.[_0x5e6c12(0x11d)](_0x753fd1['pNblT'],{'reason':_0x753fd1['dMMrD'],'profileName':_0x44d1fa}),console['error'](_0x753fd1['ChFKl']),![];}const _0x3cb2a1=_0x1727e9[_0x5e6c12(0xda)](_0xb266fb=>{const _0x31b020=_0x5e6c12;try{return _0x753fd1['ovsWP'](new URL(_0xb266fb)[_0x31b020(0x156)],new URL(_0x35dc53)['origin']);}catch{return![];}}),_0x824245={};!_0x3cb2a1&&(_0x824245['baseUrl']=_0x35dc53);try{await _0x753fd1[_0x5e6c12(0xff)](createCloudProfile,_0x44d1fa,_0x2bef31,{'settings':_0x824245}),warnCloudProfileSharedInOrg();}catch(_0x2b7f68){if(_0x753fd1[_0x5e6c12(0x142)](_0x2b7f68,ApiError)&&_0x2b7f68[_0x5e6c12(0x13b)]===0x199){console[_0x5e6c12(0xed)](_0x5e6c12(0x11a)+_0x44d1fa+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x44d1fa));throw _0x2b7f68;}throw _0x2b7f68;}return console['log'](_0x5e6c12(0x12f)+_0x44d1fa+_0x5e6c12(0x13a)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x44d1fa)),await sweepOrphansBestEffort(_0x44d1fa),_0x217ca0?.[_0x5e6c12(0x11d)](_0x5e6c12(0xea),{'envKey':_0x2bef31,'profileName':_0x44d1fa}),!![];}async function createUnconfiguredCloudProfile(_0x30588d,_0x24e1ba){const _0x278da0=_0x1add,_0x224e1b={'ziWFm':function(_0x2aa462){return _0x2aa462();},'CnVLo':function(_0x3e09fc,_0x1dfc72){return _0x3e09fc instanceof _0x1dfc72;},'QnPqb':function(_0x53fa94,_0x478c46){return _0x53fa94===_0x478c46;},'CLhnK':function(_0x10661f,_0x2ea5db){return _0x10661f+_0x2ea5db;}};try{await createCloudProfile(_0x30588d,undefined,{'settings':_0x24e1ba}),_0x224e1b[_0x278da0(0x14e)](warnCloudProfileSharedInOrg);}catch(_0x410139){_0x224e1b['CnVLo'](_0x410139,ApiError)&&_0x224e1b[_0x278da0(0x118)](_0x410139['status'],0x199)&&console['error'](_0x224e1b['CLhnK'](_0x278da0(0x11a)+_0x30588d+_0x278da0(0x141),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x30588d));throw _0x410139;}}async function captureEnvLessProfile(_0x52f0c2,_0x35777e,_0x2cb417,_0x260ea5){const _0x957e46=_0x1add,_0x286f2d={'XoKeb':_0x957e46(0xe8),'ZlLHo':_0x957e46(0x14c),'oWtQu':'user_declined','CSyqZ':function(_0x3b26d8,_0xaf9da2){return _0x3b26d8+_0xaf9da2;},'rxZxN':function(_0x44bf42,_0x1b6067){return _0x44bf42===_0x1b6067;},'DQRGP':function(_0x52b1b8,_0x3fbbfb){return _0x52b1b8>_0x3fbbfb;},'icTlb':function(_0x1e1166,_0x1a3e62){return _0x1e1166 instanceof _0x1a3e62;},'AXInr':function(_0x2b0e14,_0x21029e){return _0x2b0e14+_0x21029e;},'GAcQa':function(_0x1ca9d9,_0x1bb38a,_0xa98557){return _0x1ca9d9(_0x1bb38a,_0xa98557);},'AvCuz':function(_0x1633fd,_0x5a309c){return _0x1633fd(_0x5a309c);},'WhIAA':_0x957e46(0xea)};if(!_0x2cb417[_0x957e46(0x111)]){const {capture:_0x2483a4}=await _0x3663c5[_0x957e46(0xfc)]([{'type':_0x286f2d[_0x957e46(0x11e)],'name':'capture','message':_0x286f2d['ZlLHo'],'default':!![]}]);if(!_0x2483a4)return _0x260ea5?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x286f2d[_0x957e46(0x12e)],'profileName':_0x52f0c2}),console['error'](_0x286f2d[_0x957e46(0xf9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x957e46(0x14a))),![];}const _0x51f33d={};if(_0x2cb417['setupHeader'])for(const _0x310f3d of _0x2cb417[_0x957e46(0xe3)]){const _0xf791b9=_0x310f3d[_0x957e46(0xec)](':');if(_0x286f2d[_0x957e46(0x146)](_0xf791b9,-0x1))continue;_0x51f33d[_0x310f3d['slice'](0x0,_0xf791b9)['trim']()]=_0x310f3d['slice'](_0xf791b9+0x1)[_0x957e46(0x10e)]();}const _0x2d47cb={'baseUrl':_0x35777e};_0x286f2d['DQRGP'](Object['keys'](_0x51f33d)['length'],0x0)&&(_0x2d47cb['setupHeaders']=_0x51f33d);let _0x44a875;try{_0x44a875=await createCloudProfile(_0x52f0c2,undefined,{'settings':_0x2d47cb}),warnCloudProfileSharedInOrg();}catch(_0x3911ff){_0x286f2d['icTlb'](_0x3911ff,ApiError)&&_0x286f2d['rxZxN'](_0x3911ff[_0x957e46(0x13b)],0x199)&&console[_0x957e46(0xed)](_0x286f2d[_0x957e46(0x132)](_0x957e46(0x11a)+_0x52f0c2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x52f0c2));throw _0x3911ff;}return await _0x286f2d['GAcQa'](manualBrowserLogin,_0x44a875,{'key':'','domains':[_0x35777e],'setupHeaders':Object[_0x957e46(0xfe)](_0x51f33d)['length']>0x0?_0x51f33d:undefined}),console[_0x957e46(0xf2)](_0x286f2d[_0x957e46(0xf9)](_0x957e46(0xf6)+_0x52f0c2+_0x957e46(0x144),_0x957e46(0xe9)+_0x52f0c2)),await _0x286f2d['AvCuz'](sweepOrphansBestEffort,_0x52f0c2),_0x260ea5?.[_0x957e46(0x11d)](_0x286f2d[_0x957e46(0xd9)],{'envKey':null,'profileName':_0x52f0c2}),!![];}export async function addEnv(_0x48f9d3,_0x478c20={},_0x441f39){const _0x287e4f=_0x1add,_0x12eca1={'JLYZI':function(_0x536ee6,_0x3a41e1){return _0x536ee6+_0x3a41e1;},'VdkDj':function(_0x3020a4,_0x31c2a7){return _0x3020a4+_0x31c2a7;},'fsvIh':function(_0x90476d,_0x33c6ed){return _0x90476d+_0x33c6ed;},'BRTmi':_0x287e4f(0x101),'NuRiT':_0x287e4f(0x129),'YgfNr':_0x287e4f(0x133),'IJZqd':function(_0x192764,_0x5ade35){return _0x192764+_0x5ade35;},'eKaKa':function(_0x1b1db6,_0x219768){return _0x1b1db6===_0x219768;},'uDvLJ':function(_0x368a90){return _0x368a90();},'yKCoH':'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','LDYap':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','frETj':_0x287e4f(0xd8),'CuRKJ':function(_0x4c0532,_0x2bf42d){return _0x4c0532 instanceof _0x2bf42d;},'XwXlO':function(_0x417c70,_0x4651ea){return _0x417c70(_0x4651ea);},'AfPAd':function(_0x7111a7,_0x2f0af5,_0x5d54b6){return _0x7111a7(_0x2f0af5,_0x5d54b6);},'gaAzx':function(_0x4719ea,_0x55a657){return _0x4719ea(_0x55a657);},'gHRQM':function(_0x87755f,_0x362264){return _0x87755f(_0x362264);},'NxfZJ':_0x287e4f(0x137),'NwQOS':_0x287e4f(0x14d),'GLFhz':function(_0x5a0750,_0x13919a){return _0x5a0750||_0x13919a;},'DZgsV':_0x287e4f(0x13e),'jbGqv':'list','DeurV':'action','CvqhM':'What\x20would\x20you\x20like\x20to\x20do?','ocYmC':_0x287e4f(0x12d),'RYEiB':_0x287e4f(0x10b),'pJMQm':_0x287e4f(0x155),'VFNWS':_0x287e4f(0xf4),'cMiiW':function(_0x550f3c,_0x33b9c9,_0x59c306,_0x29db7f,_0x5a4e2c,_0x190779){return _0x550f3c(_0x33b9c9,_0x59c306,_0x29db7f,_0x5a4e2c,_0x190779);}};_0x478c20['ci']&&(console['error'](_0x12eca1['JLYZI'](_0x12eca1[_0x287e4f(0x10f)](_0x12eca1['VdkDj'](_0x12eca1['fsvIh'](_0x12eca1[_0x287e4f(0x139)],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a')+_0x287e4f(0xdf)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x12eca1[_0x287e4f(0x151)]),_0x12eca1[_0x287e4f(0x157)])),process[_0x287e4f(0x158)](0x1));const _0x51c825={};if(_0x478c20[_0x287e4f(0xe3)])for(const _0x291da0 of _0x478c20[_0x287e4f(0xe3)]){const _0x1a9fa1=_0x291da0[_0x287e4f(0xec)](':');if(_0x1a9fa1===-0x1)throw new Error(_0x287e4f(0x159)+_0x291da0+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x14fa95=_0x291da0[_0x287e4f(0x126)](0x0,_0x1a9fa1)[_0x287e4f(0x10e)](),_0x374a53=_0x291da0['slice'](_0x12eca1['IJZqd'](_0x1a9fa1,0x1))['trim']();_0x51c825[_0x14fa95]=_0x374a53;}if(_0x478c20['cdpEndpoint']!==undefined&&_0x12eca1['eKaKa'](_0x478c20['cdpEndpoint']['trim'](),''))throw new Error(_0x287e4f(0x109));if(_0x478c20[_0x287e4f(0x11b)]&&_0x478c20[_0x287e4f(0x14b)])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 _0x432d43=Boolean(_0x478c20[_0x287e4f(0x11b)]),_0x37dbea=_0x12eca1[_0x287e4f(0x124)](isInteractive);if(!_0x37dbea&&!_0x478c20[_0x287e4f(0x14b)]&&!_0x432d43&&!_0x478c20['skipAuth'])throw new Error(_0x12eca1[_0x287e4f(0x10c)]);if(_0x432d43){const _0x151734=_0x478c20['cdpEndpoint'];console[_0x287e4f(0xf2)](_0x12eca1['LDYap']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x151734);const _0x3e77bb={'cdpEndpoint':_0x151734,'isElectron':!![]};Object['keys'](_0x51c825)[_0x287e4f(0xf5)]>0x0&&(_0x3e77bb[_0x287e4f(0x105)]=_0x51c825);await createUnconfiguredCloudProfile(_0x48f9d3,_0x3e77bb);try{setProfileOverride(process['cwd'](),_0x48f9d3,'cdpEndpoint',_0x151734),setProfileOverride(process[_0x287e4f(0x154)](),_0x48f9d3,_0x12eca1[_0x287e4f(0x140)],!![]);}catch(_0x51e729){console[_0x287e4f(0xed)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x12eca1[_0x287e4f(0x102)](_0x51e729,Error)?_0x51e729['message']:String(_0x51e729)));}console[_0x287e4f(0xf2)](_0x287e4f(0x116)+_0x48f9d3+'\x27\x20created\x20(CDP).'),await _0x12eca1['XwXlO'](sweepOrphansBestEffort,_0x48f9d3),await _0x12eca1[_0x287e4f(0xef)](markActive,_0x48f9d3);return;}if(_0x478c20['skipAuth']){const _0x305f4a={};_0x478c20['url']&&(_0x305f4a['baseUrl']=_0x478c20[_0x287e4f(0x14b)]);Object[_0x287e4f(0xfe)](_0x51c825)['length']>0x0&&(_0x305f4a['setupHeaders']=_0x51c825);await _0x12eca1[_0x287e4f(0x145)](createUnconfiguredCloudProfile,_0x48f9d3,_0x305f4a),console[_0x287e4f(0xf2)](_0x287e4f(0x12f)+_0x48f9d3+'\x27\x20created\x20(no\x20session).\x0a'+(_0x287e4f(0x114)+_0x48f9d3+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x48f9d3),await _0x12eca1['gaAzx'](markActive,_0x48f9d3);return;}if(_0x478c20['url']){const _0x54964a=_0x478c20['url'],_0x298db6=await _0x12eca1[_0x287e4f(0x13f)](checkUrlReachability,_0x54964a);if(!_0x298db6['ok']&&!_0x478c20['force'])throw new Error('Could\x20not\x20reach\x20'+_0x54964a+':\x20'+_0x298db6[_0x287e4f(0xed)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x298db6['ok']&&_0x478c20[_0x287e4f(0x104)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x54964a+':\x20'+_0x298db6[_0x287e4f(0xed)]+_0x287e4f(0x110));}else{console['log'](_0x287e4f(0xd6)),console['log'](_0x287e4f(0x106)),console[_0x287e4f(0xf2)](_0x12eca1['NxfZJ']);let _0x565174='',_0x494245=![];while(!![]){const _0x2e0119=await _0x3663c5[_0x287e4f(0xfc)]([{'type':_0x12eca1['NwQOS'],'name':_0x287e4f(0x119),'message':_0x494245?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x12eca1['GLFhz'](_0x565174,_0x12eca1[_0x287e4f(0x13d)])}]);_0x565174=_0x2e0119[_0x287e4f(0x119)];const _0x5d3be3=await checkUrlReachability(_0x565174);if(_0x5d3be3['ok'])break;const _0x571e4e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x565174),_0x110dff=_0x5d3be3['isProtocolError']&&!_0x571e4e,_0x4f999b=_0x110dff?_0x287e4f(0x10a)+_0x565174:null;_0x494245=!![],console['log'](_0x287e4f(0xe2)+_0x565174+':\x20'+_0x5d3be3[_0x287e4f(0xed)]);_0x4f999b&&console['log'](_0x287e4f(0x115)+_0x4f999b+'?');const {action:_0x25a010}=await _0x3663c5[_0x287e4f(0xfc)]([{'type':_0x12eca1[_0x287e4f(0xf7)],'name':_0x12eca1[_0x287e4f(0xe1)],'message':_0x12eca1['CvqhM'],'choices':[..._0x4f999b?[{'name':_0x287e4f(0xe6)+_0x4f999b,'value':_0x287e4f(0x155)}]:[],{'name':_0x287e4f(0x127),'value':_0x12eca1[_0x287e4f(0xf0)]},{'name':_0x12eca1[_0x287e4f(0x11c)],'value':_0x287e4f(0xf4)}]}]);if(_0x12eca1['eKaKa'](_0x25a010,_0x12eca1['pJMQm'])&&_0x4f999b){_0x565174=_0x4f999b;const _0x2a36ed=await checkUrlReachability(_0x565174);if(_0x2a36ed['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x565174+':\x20'+_0x2a36ed['error']);}else{if(_0x25a010===_0x12eca1['VFNWS'])break;}}_0x478c20={..._0x478c20,'url':_0x565174};}let _0x5befbe=![];try{_0x5befbe=await _0x12eca1['cMiiW'](tryAutoRouteCloudProfile,_0x48f9d3,_0x478c20[_0x287e4f(0x14b)],_0x478c20,_0x37dbea,_0x441f39);}catch(_0x17fd6b){console['error'](_0x287e4f(0x128)+_0x48f9d3+_0x287e4f(0x13c)+(_0x17fd6b instanceof Error?_0x17fd6b['message']:String(_0x17fd6b))),process['exit'](0x1);}!_0x5befbe&&process[_0x287e4f(0x158)](0x1),await markActive(_0x48f9d3);}
@@ -1 +1 @@
1
- (function(_0x820639,_0x58f3c2){var _0x3d6c6b=_0x8287,_0x19cf62=_0x820639();while(!![]){try{var _0x58b4d4=-parseInt(_0x3d6c6b(0x13c))/0x1+parseInt(_0x3d6c6b(0x130))/0x2*(parseInt(_0x3d6c6b(0x134))/0x3)+parseInt(_0x3d6c6b(0x131))/0x4+-parseInt(_0x3d6c6b(0x132))/0x5*(-parseInt(_0x3d6c6b(0x13b))/0x6)+-parseInt(_0x3d6c6b(0x137))/0x7*(parseInt(_0x3d6c6b(0x133))/0x8)+parseInt(_0x3d6c6b(0x138))/0x9+-parseInt(_0x3d6c6b(0x136))/0xa;if(_0x58b4d4===_0x58f3c2)break;else _0x19cf62['push'](_0x19cf62['shift']());}catch(_0xa3b6d4){_0x19cf62['push'](_0x19cf62['shift']());}}}(_0x4810,0xeaf8d));function _0x8287(_0x1e9164,_0x5f4554){_0x1e9164=_0x1e9164-0x130;var _0x48100a=_0x4810();var _0x8287d=_0x48100a[_0x1e9164];return _0x8287d;}export async function authEncrypt(_0x11e659){var _0x3f1253=_0x8287,_0x36cece={'jnsKg':function(_0x301257,_0x3d253c){return _0x301257+_0x3d253c;},'qWtsc':function(_0x4e79e2,_0x5d488d){return _0x4e79e2+_0x5d488d;},'MUHQq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'};console['error'](_0x36cece[_0x3f1253(0x135)](_0x36cece['qWtsc'](_0x36cece['qWtsc'](_0x36cece['jnsKg'](_0x3f1253(0x139)+_0x36cece['MUHQq'],'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x3f1253(0x13a)](0x1);}function _0x4810(){var _0x72eec5=['6193359qZhaYv','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','exit','5290440PzHdeC','834996LeBzMs','2pMVpIp','3086032nnWoqG','5QRfWIa','16pQyQvq','2942619FZRQPt','jnsKg','3117770uIRBvh','4245689ieQOQP'];_0x4810=function(){return _0x72eec5;};return _0x4810();}
1
+ (function(_0x23795c,_0x3cbeb3){var _0x52ae33=_0x2cf2,_0x5c6c48=_0x23795c();while(!![]){try{var _0x3afbe3=-parseInt(_0x52ae33(0x8b))/0x1*(parseInt(_0x52ae33(0x8a))/0x2)+-parseInt(_0x52ae33(0x84))/0x3+parseInt(_0x52ae33(0x91))/0x4*(-parseInt(_0x52ae33(0x85))/0x5)+parseInt(_0x52ae33(0x80))/0x6*(parseInt(_0x52ae33(0x86))/0x7)+-parseInt(_0x52ae33(0x90))/0x8+parseInt(_0x52ae33(0x87))/0x9*(parseInt(_0x52ae33(0x8f))/0xa)+-parseInt(_0x52ae33(0x8d))/0xb*(-parseInt(_0x52ae33(0x8e))/0xc);if(_0x3afbe3===_0x3cbeb3)break;else _0x5c6c48['push'](_0x5c6c48['shift']());}catch(_0x584597){_0x5c6c48['push'](_0x5c6c48['shift']());}}}(_0x3a82,0xc2651));export async function authEncrypt(_0x4ac325){var _0x49fd5e=_0x2cf2,_0x25e53d={'PMaMD':function(_0x4fc0d9,_0x4534c5){return _0x4fc0d9+_0x4534c5;},'ylJRV':_0x49fd5e(0x88),'eWmHD':_0x49fd5e(0x82)};console['error'](_0x25e53d[_0x49fd5e(0x81)](_0x25e53d['PMaMD']('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a'+_0x49fd5e(0x8c)+'\x0a',_0x49fd5e(0x83))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+_0x25e53d['ylJRV'],_0x25e53d[_0x49fd5e(0x92)])),process[_0x49fd5e(0x89)](0x1);}function _0x2cf2(_0x58bf7c,_0x41d4f4){_0x58bf7c=_0x58bf7c-0x80;var _0x3a826b=_0x3a82();var _0x2cf21b=_0x3a826b[_0x58bf7c];return _0x2cf21b;}function _0x3a82(){var _0x1ee158=['\x20\x20https://docs.ranger.net/main/concepts/profiles','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','1765725VZZFXV','5uQeOxN','21OeqZbD','401553CQafvU','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','exit','2pVZzrC','1495609NJHpdk','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','132lhKoij','3131532GXXUnL','90pZgMcr','4826736qMpqmk','2312428MDgVRa','eWmHD','1057578wTAIuN','PMaMD'];_0x3a82=function(){return _0x1ee158;};return _0x3a82();}
@@ -1 +1 @@
1
- const _0x3d4d1b=_0x3025;(function(_0x4647aa,_0x35e91f){const _0x2bb8ee=_0x3025,_0xd100be=_0x4647aa();while(!![]){try{const _0x577723=-parseInt(_0x2bb8ee(0x8f))/0x1+-parseInt(_0x2bb8ee(0x90))/0x2+-parseInt(_0x2bb8ee(0x86))/0x3*(-parseInt(_0x2bb8ee(0x9b))/0x4)+-parseInt(_0x2bb8ee(0x72))/0x5+-parseInt(_0x2bb8ee(0x83))/0x6*(parseInt(_0x2bb8ee(0x93))/0x7)+parseInt(_0x2bb8ee(0x87))/0x8+-parseInt(_0x2bb8ee(0x8e))/0x9*(-parseInt(_0x2bb8ee(0xa1))/0xa);if(_0x577723===_0x35e91f)break;else _0xd100be['push'](_0xd100be['shift']());}catch(_0x12673f){_0xd100be['push'](_0xd100be['shift']());}}}(_0x276a,0x464bd));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x3d4d1b(0x91),_0x3d4d1b(0x8a),_0x3d4d1b(0x88),_0x3d4d1b(0x85)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x9a96a4){const _0x37294a=_0x3d4d1b,_0x3b939e=_0x9a96a4['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4220c5=_0x3b939e[_0x37294a(0xa3)](/^\s*\/\/.*$/gm,''),_0x47fcd6=_0x4220c5['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x47fcd6);}async function removeOpencodePluginConfig(_0x24a807){const _0x5e9502=_0x3d4d1b,_0x3a8cf6={'RVAad':function(_0x429322,_0x4462a0,_0xaee1a2){return _0x429322(_0x4462a0,_0xaee1a2);},'Bvpfj':function(_0x5889fa,_0x2ce996){return _0x5889fa===_0x2ce996;},'cnkbH':function(_0x5e7ed1,_0x1e61ac){return _0x5e7ed1===_0x1e61ac;},'vijfk':function(_0x33ae50,_0x224128,_0x572ddd){return _0x33ae50(_0x224128,_0x572ddd);},'jaOHs':function(_0x5567f9,_0x315d7a){return _0x5567f9+_0x315d7a;}};if(!existsSync(_0x24a807))return![];let _0x5f96e5;try{const _0x4ab55e=await _0x3a8cf6['RVAad'](readFile,_0x24a807,_0x5e9502(0x9a));_0x5f96e5=parseJsonc(_0x4ab55e);}catch{return![];}const _0x339d59=Array['isArray'](_0x5f96e5[_0x5e9502(0xa6)])?_0x5f96e5['plugin']:[];if(_0x3a8cf6['Bvpfj'](_0x339d59[_0x5e9502(0x73)],0x0))return![];const _0xfc97eb=_0x339d59['filter'](_0x5b9acb=>{const _0x3518ff=_0x5e9502;if(typeof _0x5b9acb!==_0x3518ff(0xa5))return!![];return _0x5b9acb!==opencodePluginName;});if(_0x3a8cf6[_0x5e9502(0x89)](_0xfc97eb['length'],_0x339d59[_0x5e9502(0x73)]))return![];return _0x3a8cf6[_0x5e9502(0x7a)](_0xfc97eb[_0x5e9502(0x73)],0x0)?delete _0x5f96e5['plugin']:_0x5f96e5[_0x5e9502(0xa6)]=_0xfc97eb,await _0x3a8cf6[_0x5e9502(0x7f)](writeFile,_0x24a807,_0x3a8cf6['jaOHs'](JSON['stringify'](_0x5f96e5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x2f8550){const _0x548e0f=_0x3d4d1b,_0x199586={'hRavu':_0x548e0f(0x8c),'IVPDR':_0x548e0f(0x7c),'aJBML':function(_0xb54b70){return _0xb54b70();},'EIrkM':function(_0x1208e6,_0x40491f){return _0x1208e6===_0x40491f;},'FeoIU':_0x548e0f(0x98)};return new Promise(_0x1008d9=>{const _0x109da0=_0x548e0f,_0x3cf18b=['plugin',_0x109da0(0x7b),'ranger@trailhead'];_0x2f8550&&_0x3cf18b['push'](_0x199586['hRavu'],_0x2f8550);const _0x4ba81b=spawn(_0x109da0(0xa4),_0x3cf18b,{'stdio':[_0x109da0(0x7c),_0x199586['IVPDR'],_0x199586[_0x109da0(0x74)]],'cwd':_0x2f8550?_0x199586['aJBML'](getProjectRoot):undefined,'shell':_0x199586[_0x109da0(0x99)](process['platform'],_0x199586[_0x109da0(0x96)])});_0x4ba81b['on']('close',_0x3a92f6=>{_0x1008d9(_0x3a92f6===0x0);}),_0x4ba81b['on']('error',()=>{_0x1008d9(![]);});});}function _0x276a(){const _0x17ba29=['6JZDKCt','jcReo','e2e-test-recommender','49089OUgXjs','1438384xXzdkM','bug-bash','Bvpfj','feature-tracker','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','--scope','flIyY','36027oKiPwq','387158pclpQY','584388BPoFmM','ranger','✓\x20Removed\x20user\x20skill:\x20','3717091ELxgnX','HUCJs','blJPM','FeoIU','remove','win32','EIrkM','utf-8','56gvdISS','BSMyO','KCUrE','oeBSK','user','MxZfF','3470qInEXF','Nothing\x20to\x20clean\x20up.\x0a','replace','claude','string','plugin','yeaPu','opencode.json','1498115NbCkBO','length','IVPDR','project','✓\x20Removed\x20stored\x20credentials','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','BfDPp','cnkbH','uninstall','ignore','platform','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','vijfk','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','hAkxu','log'];_0x276a=function(){return _0x17ba29;};return _0x276a();}function _0x3025(_0x185c2b,_0x5d794a){_0x185c2b=_0x185c2b-0x71;const _0x276a91=_0x276a();let _0x30250a=_0x276a91[_0x185c2b];return _0x30250a;}async function removeMarketplace(){const _0x18461b=_0x3d4d1b,_0xf72ec4={'oeBSK':function(_0xc36d16,_0x2ddd2a){return _0xc36d16(_0x2ddd2a);},'ZhUAB':function(_0x4e966c,_0x710c43,_0x3a3571,_0x28e4b7){return _0x4e966c(_0x710c43,_0x3a3571,_0x28e4b7);},'BnEMy':'marketplace','fmpao':_0x18461b(0x97),'KCUrE':'trailhead','Eyfuq':'ignore','BfDPp':_0x18461b(0x98)};return new Promise(_0xd878c4=>{const _0x35f514=_0x18461b,_0x485599=_0xf72ec4['ZhUAB'](spawn,'claude',[_0x35f514(0xa6),_0xf72ec4['BnEMy'],_0xf72ec4['fmpao'],_0xf72ec4[_0x35f514(0x9d)]],{'stdio':[_0x35f514(0x7c),_0xf72ec4['Eyfuq'],_0x35f514(0x7c)],'shell':process[_0x35f514(0x7d)]===_0xf72ec4[_0x35f514(0x79)]});_0x485599['on'](_0x35f514(0x77),_0x4fb4d3=>{const _0x533603=_0x35f514;_0xf72ec4[_0x533603(0x9e)](_0xd878c4,_0x4fb4d3===0x0);}),_0x485599['on']('error',()=>{_0xd878c4(![]);});});}export async function clean(){const _0xbd5a60=_0x3d4d1b,_0x4979a7={'blJPM':_0xbd5a60(0x8b),'dSZvr':_0xbd5a60(0x76),'BSMyO':function(_0xc15088,_0x5c08f4){return _0xc15088(_0x5c08f4);},'jcReo':function(_0x35c71){return _0x35c71();},'pBHkg':function(_0x30b543,_0x488cfd,_0x3411f0){return _0x30b543(_0x488cfd,_0x3411f0);},'yeaPu':function(_0x137b5a,_0x125a7c,_0x34352c){return _0x137b5a(_0x125a7c,_0x34352c);},'HUCJs':function(_0x4ed363,_0x28b19e){return _0x4ed363(_0x28b19e);},'flIyY':'project','TKBca':function(_0xcae822,_0x297832,_0x35468b){return _0xcae822(_0x297832,_0x35468b);},'olwFq':function(_0x1b5d8d,_0xa28033,_0x194fa7){return _0x1b5d8d(_0xa28033,_0x194fa7);},'vvSBd':_0xbd5a60(0x80),'hAkxu':'user','MxZfF':function(_0x27ddba){return _0x27ddba();},'UBUKh':function(_0x418f5b,_0xab23c8){return _0x418f5b(_0xab23c8);},'GkUNa':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0xbd5a60(0x82)](_0x4979a7[_0xbd5a60(0x95)]);let _0x4787d1=![];try{await deleteAllCredentials(),console['log'](_0x4979a7['dSZvr']),_0x4787d1=!![];}catch{}const _0x4ee4d6=getCacheFile();existsSync(_0x4ee4d6)&&(await _0x4979a7[_0xbd5a60(0x9c)](rm,_0x4ee4d6),_0x4787d1=!![]);const _0x1452a4=getRangerDir();existsSync(_0x1452a4)&&(await rm(_0x1452a4,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20.ranger/\x20directory'),_0x4787d1=!![]);const _0x4ea148=_0x4979a7[_0xbd5a60(0x84)](getProjectSkillsDir);for(const _0x36036f of skillsToRemove){const _0x169a48=join(_0x4ea148,_0x36036f);existsSync(_0x169a48)&&(await rm(_0x169a48,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x36036f),_0x4787d1=!![]);}const _0x44d44a=_0x4979a7['jcReo'](getUserSkillsDir);for(const _0x30930f of skillsToRemove){const _0x21faf0=_0x4979a7['pBHkg'](join,_0x44d44a,_0x30930f);existsSync(_0x21faf0)&&(await _0x4979a7['yeaPu'](rm,_0x21faf0,{'recursive':!![]}),console['log'](_0xbd5a60(0x92)+_0x30930f),_0x4787d1=!![]);}const _0x3203f6=_0x4979a7['HUCJs'](getOpencodeSkillsDir,_0x4979a7[_0xbd5a60(0x8d)]);for(const _0x5b9eaf of skillsToRemove){const _0x3d0745=_0x4979a7['TKBca'](join,_0x3203f6,_0x5b9eaf);_0x4979a7[_0xbd5a60(0x94)](existsSync,_0x3d0745)&&(await rm(_0x3d0745,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5b9eaf),_0x4787d1=!![]);}const _0x327cac=getOpencodeSkillsDir(_0xbd5a60(0x9f));for(const _0x3b30e1 of skillsToRemove){const _0x4eee33=_0x4979a7[_0xbd5a60(0xa7)](join,_0x327cac,_0x3b30e1);_0x4979a7['BSMyO'](existsSync,_0x4eee33)&&(await rm(_0x4eee33,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x3b30e1),_0x4787d1=!![]);}const _0x258b71=_0x4979a7['olwFq'](join,getOpencodeConfigDir(_0xbd5a60(0x75)),'opencode.json');await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0x258b71)&&(console['log'](_0x4979a7['vvSBd']),_0x4787d1=!![]);const _0xcbd5b1=join(getOpencodeConfigDir(_0x4979a7[_0xbd5a60(0x81)]),_0xbd5a60(0x71));await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0xcbd5b1)&&(console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x4787d1=!![]);const _0x5c8292=await _0x4979a7[_0xbd5a60(0xa0)](uninstallClaudePlugin);_0x5c8292&&(console[_0xbd5a60(0x82)](_0xbd5a60(0x7e)),_0x4787d1=!![]);const _0x3d7ce9=await _0x4979a7['UBUKh'](uninstallClaudePlugin,'project');_0x3d7ce9&&(console['log'](_0xbd5a60(0x78)),_0x4787d1=!![]);const _0x207bd3=await removeMarketplace();_0x207bd3&&(console['log'](_0x4979a7['GkUNa']),_0x4787d1=!![]),_0x4787d1?console['log']('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0xbd5a60(0x82)](_0xbd5a60(0xa2));}
1
+ function _0x3137(_0x1bc46a,_0x4f0409){_0x1bc46a=_0x1bc46a-0x15f;const _0x323c9d=_0x323c();let _0x3137ea=_0x323c9d[_0x1bc46a];return _0x3137ea;}const _0x31edde=_0x3137;(function(_0x2f1cdc,_0x200645){const _0x32d8e7=_0x3137,_0x3fc53c=_0x2f1cdc();while(!![]){try{const _0x2af653=parseInt(_0x32d8e7(0x194))/0x1+-parseInt(_0x32d8e7(0x192))/0x2*(-parseInt(_0x32d8e7(0x169))/0x3)+-parseInt(_0x32d8e7(0x164))/0x4*(parseInt(_0x32d8e7(0x198))/0x5)+parseInt(_0x32d8e7(0x175))/0x6*(parseInt(_0x32d8e7(0x168))/0x7)+parseInt(_0x32d8e7(0x16b))/0x8*(-parseInt(_0x32d8e7(0x16c))/0x9)+-parseInt(_0x32d8e7(0x16a))/0xa*(parseInt(_0x32d8e7(0x197))/0xb)+parseInt(_0x32d8e7(0x19a))/0xc*(parseInt(_0x32d8e7(0x162))/0xd);if(_0x2af653===_0x200645)break;else _0x3fc53c['push'](_0x3fc53c['shift']());}catch(_0x1db2d8){_0x3fc53c['push'](_0x3fc53c['shift']());}}}(_0x323c,0xb583c));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x31edde(0x16f),'feature-tracker',_0x31edde(0x17a),'e2e-test-recommender'],opencodePluginName=_0x31edde(0x179);function parseJsonc(_0xb74690){const _0x1f288d=_0x31edde,_0x5aed1a=_0xb74690['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4275e4=_0x5aed1a['replace'](/^\s*\/\/.*$/gm,''),_0x5bb850=_0x4275e4[_0x1f288d(0x163)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x5bb850);}async function removeOpencodePluginConfig(_0x36e79d){const _0x3b81bb=_0x31edde,_0x311a51={'rrOON':function(_0x421212,_0x30e19a){return _0x421212!==_0x30e19a;},'nUgft':_0x3b81bb(0x186),'MusiB':_0x3b81bb(0x17b),'HpUTO':function(_0x372a6d,_0x392315){return _0x372a6d===_0x392315;},'lnaKa':function(_0x413be4,_0x59f173){return _0x413be4+_0x59f173;}};if(!existsSync(_0x36e79d))return![];let _0x39bd8c;try{const _0x51a77c=await readFile(_0x36e79d,_0x311a51['MusiB']);_0x39bd8c=parseJsonc(_0x51a77c);}catch{return![];}const _0xc652b=Array[_0x3b81bb(0x18f)](_0x39bd8c['plugin'])?_0x39bd8c['plugin']:[];if(_0xc652b['length']===0x0)return![];const _0x4f3dfb=_0xc652b[_0x3b81bb(0x189)](_0x183265=>{const _0xbd3c5b=_0x3b81bb;if(_0x311a51[_0xbd3c5b(0x183)](typeof _0x183265,_0x311a51['nUgft']))return!![];return _0x183265!==opencodePluginName;});if(_0x311a51['HpUTO'](_0x4f3dfb[_0x3b81bb(0x18b)],_0xc652b[_0x3b81bb(0x18b)]))return![];return _0x4f3dfb[_0x3b81bb(0x18b)]===0x0?delete _0x39bd8c[_0x3b81bb(0x185)]:_0x39bd8c[_0x3b81bb(0x185)]=_0x4f3dfb,await writeFile(_0x36e79d,_0x311a51['lnaKa'](JSON[_0x3b81bb(0x18d)](_0x39bd8c,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x123e6f){const _0x4fbee0=_0x31edde,_0xc105d7={'rUsXE':function(_0x2476bb,_0x1401f9){return _0x2476bb(_0x1401f9);},'NoWKL':function(_0x39ccfc,_0x313916){return _0x39ccfc===_0x313916;},'VyvhM':_0x4fbee0(0x18e),'nVUWe':function(_0x71736a){return _0x71736a();},'CiVkO':function(_0x53bb05,_0x5e88ae){return _0x53bb05===_0x5e88ae;},'HGrPb':_0x4fbee0(0x173),'NTDlh':_0x4fbee0(0x187)};return new Promise(_0x588b5a=>{const _0x235e55=_0x4fbee0,_0xbce679=[_0x235e55(0x185),'uninstall',_0x235e55(0x180)];_0x123e6f&&_0xbce679[_0x235e55(0x165)]('--scope',_0x123e6f);const _0x4892ff=spawn('claude',_0xbce679,{'stdio':[_0xc105d7['VyvhM'],_0xc105d7['VyvhM'],_0xc105d7['VyvhM']],'cwd':_0x123e6f?_0xc105d7['nVUWe'](getProjectRoot):undefined,'shell':_0xc105d7[_0x235e55(0x196)](process['platform'],_0xc105d7[_0x235e55(0x16e)])});_0x4892ff['on'](_0xc105d7[_0x235e55(0x177)],_0x3cbd33=>{const _0x2a8484=_0x235e55;_0xc105d7[_0x2a8484(0x17e)](_0x588b5a,_0xc105d7[_0x2a8484(0x190)](_0x3cbd33,0x0));}),_0x4892ff['on']('error',()=>{_0x588b5a(![]);});});}function _0x323c(){const _0x5ea634=['stringify','ignore','isArray','NoWKL','✓\x20Removed\x20stored\x20credentials','2RpdKhn','mNzlU','804769xFyNmI','trailhead','CiVkO','5816129tlsLVX','25IuEvEJ','✓\x20Removed\x20user\x20skill:\x20','24srTHaH','claude','FpiEV','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','user','3611894aGNjMS','replace','231004bvLDxm','push','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','log','2807gcGgqE','1077213gnKvuh','10UfwWXn','1308520sjdXBw','54aKGyBK','platform','HGrPb','ranger','cpvJV','marketplace','xCXgR','win32','QMMiV','12312fQbMzU','DvLSy','NTDlh','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','@ranger-testing/opencode-plugin','bug-bash','utf-8','kHjnM','opencode.json','rUsXE','UKlnW','ranger@trailhead','YuYet','xwdvO','rrOON','project','plugin','string','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','filter','hCpHQ','length','Nothing\x20to\x20clean\x20up.\x0a'];_0x323c=function(){return _0x5ea634;};return _0x323c();}async function removeMarketplace(){const _0x2a2167=_0x31edde,_0xb47f03={'hCpHQ':function(_0x183e1f,_0x3065a1){return _0x183e1f(_0x3065a1);},'eQVYO':function(_0x5c7163,_0x377bd1,_0xda03b4,_0x5d8f75){return _0x5c7163(_0x377bd1,_0xda03b4,_0x5d8f75);},'jggEF':_0x2a2167(0x171),'tXcba':_0x2a2167(0x18e),'BPVdx':_0x2a2167(0x173),'gKOQe':_0x2a2167(0x187)};return new Promise(_0x10f8c0=>{const _0x176b37=_0x2a2167,_0x26e2f3=_0xb47f03['eQVYO'](spawn,_0x176b37(0x19b),['plugin',_0xb47f03['jggEF'],'remove',_0x176b37(0x195)],{'stdio':[_0x176b37(0x18e),_0x176b37(0x18e),_0xb47f03['tXcba']],'shell':process[_0x176b37(0x16d)]===_0xb47f03['BPVdx']});_0x26e2f3['on'](_0xb47f03['gKOQe'],_0x30477b=>{_0x10f8c0(_0x30477b===0x0);}),_0x26e2f3['on']('error',()=>{const _0xb84dc8=_0x176b37;_0xb47f03[_0xb84dc8(0x18a)](_0x10f8c0,![]);});});}export async function clean(){const _0x165ff7=_0x31edde,_0x190281={'QMMiV':_0x165ff7(0x166),'yDRoc':function(_0x52ce61){return _0x52ce61();},'mNzlU':function(_0x551e5b,_0x3b1bd8){return _0x551e5b(_0x3b1bd8);},'kHjnM':function(_0x3e7096,_0x39a877,_0x3dcee9){return _0x3e7096(_0x39a877,_0x3dcee9);},'xwdvO':function(_0x1ee607,_0x3e2934){return _0x1ee607(_0x3e2934);},'DvLSy':function(_0x499bca,_0x5e32a8,_0xb17f4c){return _0x499bca(_0x5e32a8,_0xb17f4c);},'UKlnW':'project','sIjrd':function(_0x52df19,_0x14b16b){return _0x52df19(_0x14b16b);},'FpiEV':function(_0x49e77f,_0x146ba3){return _0x49e77f(_0x146ba3);},'YuYet':_0x165ff7(0x161),'gZJVk':function(_0xbd58c9,_0x103848,_0x2daab3){return _0xbd58c9(_0x103848,_0x2daab3);},'QBHFQ':function(_0x3cd201,_0x7a448d,_0x5fe71a){return _0x3cd201(_0x7a448d,_0x5fe71a);},'xCXgR':function(_0x128692,_0x20569e,_0x471eee){return _0x128692(_0x20569e,_0x471eee);},'cDETy':function(_0x318528,_0x4d347b){return _0x318528(_0x4d347b);},'LGAmi':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','cpvJV':_0x165ff7(0x178)};console['log'](_0x190281[_0x165ff7(0x174)]);let _0x90b263=![];try{await _0x190281['yDRoc'](deleteAllCredentials),console[_0x165ff7(0x167)](_0x165ff7(0x191)),_0x90b263=!![];}catch{}const _0x58cfcb=getCacheFile();_0x190281[_0x165ff7(0x193)](existsSync,_0x58cfcb)&&(await _0x190281['mNzlU'](rm,_0x58cfcb),_0x90b263=!![]);const _0x3f013b=getRangerDir();_0x190281['mNzlU'](existsSync,_0x3f013b)&&(await rm(_0x3f013b,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x90b263=!![]);const _0x357679=getProjectSkillsDir();for(const _0x39695c of skillsToRemove){const _0x5699c2=_0x190281[_0x165ff7(0x17c)](join,_0x357679,_0x39695c);_0x190281[_0x165ff7(0x182)](existsSync,_0x5699c2)&&(await rm(_0x5699c2,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x39695c),_0x90b263=!![]);}const _0x4b382b=_0x190281['yDRoc'](getUserSkillsDir);for(const _0x377060 of skillsToRemove){const _0x5dfc12=join(_0x4b382b,_0x377060);existsSync(_0x5dfc12)&&(await _0x190281[_0x165ff7(0x176)](rm,_0x5dfc12,{'recursive':!![]}),console[_0x165ff7(0x167)](_0x165ff7(0x199)+_0x377060),_0x90b263=!![]);}const _0x23fa77=_0x190281[_0x165ff7(0x193)](getOpencodeSkillsDir,_0x190281['UKlnW']);for(const _0x1e2fe4 of skillsToRemove){const _0x5a9983=join(_0x23fa77,_0x1e2fe4);_0x190281['sIjrd'](existsSync,_0x5a9983)&&(await rm(_0x5a9983,{'recursive':!![]}),console[_0x165ff7(0x167)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1e2fe4),_0x90b263=!![]);}const _0x2323df=_0x190281[_0x165ff7(0x15f)](getOpencodeSkillsDir,_0x190281['YuYet']);for(const _0x557aab of skillsToRemove){const _0x218657=_0x190281['gZJVk'](join,_0x2323df,_0x557aab);existsSync(_0x218657)&&(await _0x190281['QBHFQ'](rm,_0x218657,{'recursive':!![]}),console['log'](_0x165ff7(0x160)+_0x557aab),_0x90b263=!![]);}const _0x317403=_0x190281[_0x165ff7(0x172)](join,_0x190281['cDETy'](getOpencodeConfigDir,_0x165ff7(0x184)),_0x165ff7(0x17d));await _0x190281['sIjrd'](removeOpencodePluginConfig,_0x317403)&&(console[_0x165ff7(0x167)](_0x190281['LGAmi']),_0x90b263=!![]);const _0x1d4e41=join(getOpencodeConfigDir(_0x190281[_0x165ff7(0x181)]),'opencode.json');await _0x190281[_0x165ff7(0x193)](removeOpencodePluginConfig,_0x1d4e41)&&(console[_0x165ff7(0x167)](_0x190281[_0x165ff7(0x170)]),_0x90b263=!![]);const _0x38e0ce=await uninstallClaudePlugin();_0x38e0ce&&(console[_0x165ff7(0x167)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x90b263=!![]);const _0x209699=await uninstallClaudePlugin(_0x190281[_0x165ff7(0x17f)]);_0x209699&&(console[_0x165ff7(0x167)](_0x165ff7(0x188)),_0x90b263=!![]);const _0x50f7e9=await removeMarketplace();_0x50f7e9&&(console['log']('✓\x20Removed\x20trailhead\x20marketplace'),_0x90b263=!![]),_0x90b263?console[_0x165ff7(0x167)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0x165ff7(0x167)](_0x165ff7(0x18c));}
@@ -1 +1 @@
1
- const _0x3d0a5f=_0x4bcf;(function(_0x123a68,_0x3081fb){const _0x2d108a=_0x4bcf,_0x47a688=_0x123a68();while(!![]){try{const _0xa8b2b3=parseInt(_0x2d108a(0x125))/0x1+-parseInt(_0x2d108a(0xf8))/0x2*(-parseInt(_0x2d108a(0x100))/0x3)+-parseInt(_0x2d108a(0xef))/0x4*(parseInt(_0x2d108a(0x10f))/0x5)+-parseInt(_0x2d108a(0xf4))/0x6+parseInt(_0x2d108a(0xf3))/0x7*(parseInt(_0x2d108a(0xfc))/0x8)+-parseInt(_0x2d108a(0x127))/0x9+parseInt(_0x2d108a(0xf6))/0xa*(-parseInt(_0x2d108a(0x10d))/0xb);if(_0xa8b2b3===_0x3081fb)break;else _0x47a688['push'](_0x47a688['shift']());}catch(_0x3ab09a){_0x47a688['push'](_0x47a688['shift']());}}}(_0x58ce,0x1c85a));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x58ce(){const _0x24bba8=['nmCcu','\x20\x20Note:\x20\x22','(not\x20set)','134360mIGYpx','isSafeInteger','atzyZ','DgAum','647571MowBnD','VuCvD','DplXC','yOnAu','\x22\x20not\x20found','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','QUuXo','CWAmP','endsWith','UelEc','trim','Removed\x20','NVZVl','12914hbtUtn','Qbdun','177565cntnJc','dQpxt','local','HbhKJ','kind','alsoExistsElsewhere','uashe','aZmqy','Key\x20\x22','UyvIF','isNaN','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','oRGof','lPOER','cloud','GWJBZ','sWWiF','log','undefined','headless','test','226035dMvcOl','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','957609JNsQaH','allowInsecureLocalhost','true','LxCxl',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','12BuCrZu','Profile\x20\x22','startsWith','NbZdG','7xSSVHR','322710yxpUyH','NmwJp','640bIbvQN','keys','2FfdRRt'];_0x58ce=function(){return _0x24bba8;};return _0x58ce();}const BOOLEAN_KEYS=[_0x3d0a5f(0x123),_0x3d0a5f(0x128)];function parseLocalValue(_0x492acb,_0x43b473){const _0x451c57=_0x3d0a5f,_0x4b608b={'jMbjs':function(_0xb4acba,_0x3da5ad){return _0xb4acba===_0x3da5ad;},'DgAum':'false'};if(BOOLEAN_KEYS['includes'](_0x492acb)){if(_0x43b473==='true')return!![];if(_0x4b608b['jMbjs'](_0x43b473,_0x4b608b[_0x451c57(0xff)]))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x492acb+_0x451c57(0xed));}return _0x43b473;}function _0x4bcf(_0x3f43ef,_0x2b619b){_0x3f43ef=_0x3f43ef-0xeb;const _0x58ce60=_0x58ce();let _0x4bcfeb=_0x58ce60[_0x3f43ef];return _0x4bcfeb;}function parseOverrideValue(_0x17aac2){const _0x4b08c7=_0x3d0a5f,_0x11b46c={'uashe':'false'};if(_0x17aac2===_0x4b08c7(0xeb))return!![];if(_0x17aac2===_0x11b46c[_0x4b08c7(0x115)])return![];if(_0x17aac2==='null')return null;if(_0x17aac2===_0x4b08c7(0x122))return undefined;if(/^-?\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x4fb012=Number(_0x17aac2);if(Number[_0x4b08c7(0xfd)](_0x4fb012))return _0x4fb012;}if(/^-?\d+\.\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x2d7349=Number(_0x17aac2);if(!Number[_0x4b08c7(0x119)](_0x2d7349))return _0x2d7349;}const _0xa3f34f=_0x17aac2[_0x4b08c7(0x10a)]();if(_0xa3f34f[_0x4b08c7(0xf1)]('{')&&_0xa3f34f[_0x4b08c7(0x108)]('}')||_0xa3f34f['startsWith']('[')&&_0xa3f34f['endsWith'](']'))try{return JSON['parse'](_0xa3f34f);}catch{}return _0x17aac2;}async function resolveProfileTarget(_0x3e1e42){const _0x4220c8=_0x3d0a5f,_0x495a61={'Qbdun':function(_0x324aa2,_0x1e7c14){return _0x324aa2(_0x1e7c14);},'sWWiF':_0x4220c8(0x111)},_0x2f8300=_0x495a61[_0x4220c8(0x10e)](existsSync,getEnvDir(_0x3e1e42));let _0xb6fee5=![];try{const _0x4f3f22=await _0x495a61[_0x4220c8(0x10e)](fetchCloudProfile,_0x3e1e42);_0xb6fee5=Boolean(_0x4f3f22);}catch{}if(_0xb6fee5)return{'kind':_0x4220c8(0x11e),'alsoExistsElsewhere':_0x2f8300};if(_0x2f8300)return{'kind':_0x495a61[_0x4220c8(0x120)],'alsoExistsElsewhere':![]};throw new Error(_0x4220c8(0xf0)+_0x3e1e42+_0x4220c8(0x105)+_0x3e1e42);}function printDualExistsHint(_0x895bc1){const _0x40e005=_0x3d0a5f;console[_0x40e005(0x121)](_0x40e005(0xfa)+_0x895bc1+_0x40e005(0xee));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x29b6b9){const _0xe268c2=_0x3d0a5f,_0x2fed67={'qAzuS':function(_0x35556d,_0x48253e){return _0x35556d(_0x48253e);},'atzyZ':function(_0x4d19eb,_0x515de0,_0x31861a){return _0x4d19eb(_0x515de0,_0x31861a);},'VuCvD':function(_0x5c88a2){return _0x5c88a2();}},_0x49c13f=await _0x2fed67['qAzuS'](fetchCloudProfile,_0x29b6b9),_0x5e7e07=_0x2fed67[_0xe268c2(0xfe)](readProfileOverrides,_0x2fed67[_0xe268c2(0x101)](getProjectPath),_0x29b6b9);return mergeCloudProfileSettings(_0x49c13f?.['settings']??{},_0x5e7e07??undefined);}export async function configSet(_0x169ee3,_0x3f53bd,_0x4833e1){const _0x8e615f=_0x3d0a5f,_0x1275d7={'DCcZZ':function(_0x5e10e0,_0x394329){return _0x5e10e0(_0x394329);},'oRGof':function(_0x19f6d6,_0x1e0919){return _0x19f6d6===_0x1e0919;},'NVZVl':function(_0x328515,_0x3e790c){return _0x328515(_0x3e790c);},'Wcazj':function(_0x2ca454,_0x591a9e,_0x233598,_0x194af6,_0x11864b){return _0x2ca454(_0x591a9e,_0x233598,_0x194af6,_0x11864b);},'EnDbB':function(_0x2ee6ea){return _0x2ee6ea();},'mqLva':function(_0x549039,_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad){return _0x549039(_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad);}},_0x17ed42=await _0x1275d7['DCcZZ'](resolveProfileTarget,_0x169ee3);if(_0x1275d7[_0x8e615f(0x11c)](_0x17ed42['kind'],'cloud')){if(_0x17ed42[_0x8e615f(0x114)])_0x1275d7[_0x8e615f(0x10c)](printDualExistsHint,_0x169ee3);const _0x1567a6=_0x1275d7[_0x8e615f(0x10c)](parseOverrideValue,_0x4833e1);_0x1275d7['Wcazj'](setProfileOverride,_0x1275d7['EnDbB'](getProjectPath),_0x169ee3,_0x3f53bd,_0x1567a6),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+JSON[_0x8e615f(0x11a)](_0x1567a6)+'\x20for\x20\x22'+_0x169ee3+'\x22');return;}const _0x5de0b9=parseLocalValue(_0x3f53bd,_0x4833e1);_0x1275d7['mqLva'](setProfileOverride,getProjectPath(),_0x169ee3,_0x3f53bd,_0x5de0b9),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+_0x5de0b9+'\x20for\x20\x22'+_0x169ee3+'\x22');}export async function configGet(_0x2b9ca1,_0x420375){const _0x484890=_0x3d0a5f,_0x34f63a={'aUfQd':'cloud','DplXC':function(_0x4b89cc,_0x31d882){return _0x4b89cc(_0x31d882);},'fVOCk':function(_0x3f1617,_0x2b0f3a){return _0x3f1617===_0x2b0f3a;},'QUuXo':function(_0x235699,_0x339457){return _0x235699(_0x339457);},'Flxiy':function(_0x11aaf2,_0x123e6d,_0x1dce84){return _0x11aaf2(_0x123e6d,_0x1dce84);}},_0x227ea3=await resolveProfileTarget(_0x2b9ca1);if(_0x227ea3[_0x484890(0x113)]===_0x34f63a['aUfQd']){const _0xf8546=await _0x34f63a[_0x484890(0x102)](loadEffectiveCloudSettings,_0x2b9ca1),_0x4f99ee=getNestedValue(_0xf8546,_0x420375);if(_0x34f63a['fVOCk'](_0x4f99ee,undefined))console[_0x484890(0x121)](_0x484890(0xfb));else typeof _0x4f99ee==='object'?console['log'](JSON['stringify'](_0x4f99ee,null,0x2)):console['log'](_0x4f99ee);return;}const _0x5170a9=await _0x34f63a[_0x484890(0x106)](loadSettings,_0x2b9ca1),_0x2b4065=_0x34f63a['Flxiy'](getNestedValue,_0x5170a9,_0x420375);if(_0x2b4065===undefined)console['log']('(not\x20set)');else typeof _0x2b4065==='object'?console[_0x484890(0x121)](JSON[_0x484890(0x11a)](_0x2b4065,null,0x2)):console[_0x484890(0x121)](_0x2b4065);}export async function configList(_0x2d2a6c){const _0x6f5960=_0x3d0a5f,_0x4b1bed={'NmwJp':function(_0x4eed9e,_0x154d0f){return _0x4eed9e(_0x154d0f);},'UyvIF':'cloud','UelEc':function(_0x3d52c3,_0x1da2bd){return _0x3d52c3===_0x1da2bd;},'dQpxt':function(_0x22958d,_0xbe366b){return _0x22958d(_0xbe366b);},'lPOER':function(_0x368203,_0x1dff3e){return _0x368203(_0x1dff3e);},'GWJBZ':function(_0x36a92c,_0x5b6cb0){return _0x36a92c(_0x5b6cb0);}},_0x136915=await _0x4b1bed['NmwJp'](resolveProfileTarget,_0x2d2a6c);if(_0x136915[_0x6f5960(0x113)]===_0x4b1bed[_0x6f5960(0x118)]){const _0x73d315=await _0x4b1bed[_0x6f5960(0xf5)](loadEffectiveCloudSettings,_0x2d2a6c);if(!_0x73d315||_0x4b1bed[_0x6f5960(0x109)](Object[_0x6f5960(0xf7)](_0x73d315)['length'],0x0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}console['log'](JSON['stringify'](_0x73d315,null,0x2));return;}const _0x13256c=_0x4b1bed[_0x6f5960(0x110)](getSettingsPath,_0x2d2a6c);if(!_0x4b1bed[_0x6f5960(0x11d)](existsSync,_0x13256c)){console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}const _0x279bff=await loadSettings(_0x2d2a6c),_0x2301c6=_0x4b1bed[_0x6f5960(0x11f)](formatSettings,_0x279bff);!_0x2301c6?console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22'):console[_0x6f5960(0x121)](_0x2301c6);}export async function configUnset(_0x27b3bb,_0x6aaff9){const _0x260543=_0x3d0a5f,_0x8aeb8c={'HbhKJ':function(_0x806039,_0x3f58ab){return _0x806039(_0x3f58ab);},'nmCcu':function(_0x212635,_0x2c725a){return _0x212635===_0x2c725a;},'yOnAu':function(_0x19c1a8,_0x50c6a8,_0x4c7a2a,_0x1c02bd){return _0x19c1a8(_0x50c6a8,_0x4c7a2a,_0x1c02bd);},'LxCxl':function(_0x167960,_0x3191be,_0x3542c9,_0x356631){return _0x167960(_0x3191be,_0x3542c9,_0x356631);},'NbZdG':function(_0x32b221){return _0x32b221();},'YiJaZ':function(_0xe7366b,_0x1f8d88,_0x3b376a){return _0xe7366b(_0x1f8d88,_0x3b376a);}},_0x2373ac=await _0x8aeb8c[_0x260543(0x112)](resolveProfileTarget,_0x27b3bb);if(_0x8aeb8c[_0x260543(0xf9)](_0x2373ac['kind'],_0x260543(0x11e))){if(_0x2373ac['alsoExistsElsewhere'])printDualExistsHint(_0x27b3bb);const _0x4eeb7d=_0x8aeb8c[_0x260543(0x103)](unsetProfileOverride,getProjectPath(),_0x27b3bb,_0x6aaff9);_0x4eeb7d?console['log'](_0x260543(0x10b)+_0x6aaff9+'\x20for\x20\x22'+_0x27b3bb+'\x22'):console['log'](_0x260543(0x117)+_0x6aaff9+_0x260543(0x104));return;}const _0x65e891=_0x8aeb8c[_0x260543(0xec)](unsetProfileOverride,_0x8aeb8c[_0x260543(0xf2)](getProjectPath),_0x27b3bb,_0x6aaff9);if(_0x65e891){console[_0x260543(0x121)]('Removed\x20'+_0x6aaff9);return;}const _0x17861e=await loadSettings(_0x27b3bb),_0x3b5d59=_0x8aeb8c['YiJaZ'](deleteNestedValue,_0x17861e,_0x6aaff9);_0x3b5d59?console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x126)+_0x27b3bb+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x104));}export async function configReset(_0x12c474){const _0x53f085=_0x3d0a5f,_0x5f7693={'CWAmP':_0x53f085(0x11e),'aZmqy':function(_0x4ae52e){return _0x4ae52e();}},_0x3139e1=await resolveProfileTarget(_0x12c474);if(_0x3139e1['kind']===_0x5f7693[_0x53f085(0x107)]){resetProfileOverrides(_0x5f7693[_0x53f085(0x116)](getProjectPath),_0x12c474),console[_0x53f085(0x121)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x12c474+'\x22');return;}console[_0x53f085(0x121)]('\x22'+_0x12c474+_0x53f085(0x11b)+_0x12c474+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ (function(_0xb969e4,_0x1b3fad){const _0x35b887=_0x29f0,_0x3fb292=_0xb969e4();while(!![]){try{const _0x496839=-parseInt(_0x35b887(0x13a))/0x1*(parseInt(_0x35b887(0x12c))/0x2)+parseInt(_0x35b887(0x147))/0x3*(parseInt(_0x35b887(0x138))/0x4)+-parseInt(_0x35b887(0x118))/0x5*(-parseInt(_0x35b887(0x130))/0x6)+-parseInt(_0x35b887(0x136))/0x7+parseInt(_0x35b887(0x142))/0x8+parseInt(_0x35b887(0x132))/0x9*(parseInt(_0x35b887(0x11d))/0xa)+parseInt(_0x35b887(0x128))/0xb;if(_0x496839===_0x1b3fad)break;else _0x3fb292['push'](_0x3fb292['shift']());}catch(_0x44d9b2){_0x3fb292['push'](_0x3fb292['shift']());}}}(_0x5319,0x2ed0c));import{existsSync}from'fs';function _0x29f0(_0x3f2836,_0x5059a7){_0x3f2836=_0x3f2836-0x116;const _0x5319ca=_0x5319();let _0x29f03e=_0x5319ca[_0x3f2836];return _0x29f03e;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0xa6a511,_0x46367f){const _0x11a0a5=_0x29f0,_0x443a66={'JvPHU':function(_0x312a31,_0x51fb4d){return _0x312a31===_0x51fb4d;},'TMFir':function(_0xa7f475,_0x2688ec){return _0xa7f475===_0x2688ec;}};if(BOOLEAN_KEYS[_0x11a0a5(0x13b)](_0xa6a511)){if(_0x443a66['JvPHU'](_0x46367f,'true'))return!![];if(_0x443a66[_0x11a0a5(0x14d)](_0x46367f,_0x11a0a5(0x14b)))return![];throw new Error(_0x11a0a5(0x149)+_0xa6a511+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x46367f;}function parseOverrideValue(_0x4c241f){const _0x2a674c=_0x29f0,_0x15747a={'IwRVt':function(_0x41220d,_0x2e8e67){return _0x41220d===_0x2e8e67;},'ZgNMU':_0x2a674c(0x133),'HBixm':function(_0x19bddc,_0x23b665){return _0x19bddc(_0x23b665);}};if(_0x15747a['IwRVt'](_0x4c241f,'true'))return!![];if(_0x15747a[_0x2a674c(0x145)](_0x4c241f,_0x2a674c(0x14b)))return![];if(_0x4c241f===_0x15747a[_0x2a674c(0x139)])return null;if(_0x4c241f===_0x2a674c(0x13d))return undefined;if(/^-?\d+$/[_0x2a674c(0x134)](_0x4c241f)){const _0xd39a53=_0x15747a['HBixm'](Number,_0x4c241f);if(Number['isSafeInteger'](_0xd39a53))return _0xd39a53;}if(/^-?\d+\.\d+$/['test'](_0x4c241f)){const _0x46c212=Number(_0x4c241f);if(!Number[_0x2a674c(0x146)](_0x46c212))return _0x46c212;}const _0x421a86=_0x4c241f['trim']();if(_0x421a86[_0x2a674c(0x124)]('{')&&_0x421a86[_0x2a674c(0x11f)]('}')||_0x421a86[_0x2a674c(0x124)]('[')&&_0x421a86[_0x2a674c(0x11f)](']'))try{return JSON['parse'](_0x421a86);}catch{}return _0x4c241f;}async function resolveProfileTarget(_0x27ad82){const _0x48ebc7=_0x29f0,_0x136c27={'MrHQC':function(_0x58d2f9,_0x375f0f){return _0x58d2f9(_0x375f0f);},'KuwTE':_0x48ebc7(0x135),'gbrui':_0x48ebc7(0x11e)},_0x2a0f58=_0x136c27['MrHQC'](existsSync,getEnvDir(_0x27ad82));let _0x3eae5a=![];try{const _0x5df513=await _0x136c27['MrHQC'](fetchCloudProfile,_0x27ad82);_0x3eae5a=_0x136c27[_0x48ebc7(0x12d)](Boolean,_0x5df513);}catch{}if(_0x3eae5a)return{'kind':_0x136c27['KuwTE'],'alsoExistsElsewhere':_0x2a0f58};if(_0x2a0f58)return{'kind':_0x136c27['gbrui'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x27ad82+_0x48ebc7(0x12b)+_0x27ad82);}function printDualExistsHint(_0x5540d4){const _0x52612c=_0x29f0;console[_0x52612c(0x137)](_0x52612c(0x12f)+_0x5540d4+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x494cec=_0x29f0;return process[_0x494cec(0x131)]();}async function loadEffectiveCloudSettings(_0x2809fd){const _0x38e9be=_0x29f0,_0x161dab={'lwOzA':function(_0x4dda21,_0x335b69){return _0x4dda21(_0x335b69);},'awwDM':function(_0xec064f,_0x51b1a3,_0x3a8bb7){return _0xec064f(_0x51b1a3,_0x3a8bb7);},'KCSNH':function(_0x2b004d,_0x17f13f,_0x5896be){return _0x2b004d(_0x17f13f,_0x5896be);}},_0x43dcd3=await _0x161dab['lwOzA'](fetchCloudProfile,_0x2809fd),_0x16b9d6=_0x161dab[_0x38e9be(0x148)](readProfileOverrides,getProjectPath(),_0x2809fd);return _0x161dab[_0x38e9be(0x141)](mergeCloudProfileSettings,_0x43dcd3?.[_0x38e9be(0x123)]??{},_0x16b9d6??undefined);}export async function configSet(_0x2047e5,_0x1a4a15,_0x5cbbf8){const _0x5b5ce9=_0x29f0,_0x10d0c4={'eFyZe':'cloud','DkCow':function(_0x30e77f,_0x5143db,_0x2c49f6,_0x1baec1,_0xeadbf6){return _0x30e77f(_0x5143db,_0x2c49f6,_0x1baec1,_0xeadbf6);},'hsGvt':function(_0x5ce4bc){return _0x5ce4bc();}},_0x8a3e2a=await resolveProfileTarget(_0x2047e5);if(_0x8a3e2a['kind']===_0x10d0c4['eFyZe']){if(_0x8a3e2a[_0x5b5ce9(0x127)])printDualExistsHint(_0x2047e5);const _0x2fe33c=parseOverrideValue(_0x5cbbf8);_0x10d0c4[_0x5b5ce9(0x11b)](setProfileOverride,_0x10d0c4['hsGvt'](getProjectPath),_0x2047e5,_0x1a4a15,_0x2fe33c),console[_0x5b5ce9(0x137)](_0x5b5ce9(0x122)+_0x1a4a15+_0x5b5ce9(0x143)+JSON[_0x5b5ce9(0x144)](_0x2fe33c)+_0x5b5ce9(0x116)+_0x2047e5+'\x22');return;}const _0x531a83=parseLocalValue(_0x1a4a15,_0x5cbbf8);_0x10d0c4[_0x5b5ce9(0x11b)](setProfileOverride,getProjectPath(),_0x2047e5,_0x1a4a15,_0x531a83),console['log']('Set\x20'+_0x1a4a15+'\x20=\x20'+_0x531a83+_0x5b5ce9(0x116)+_0x2047e5+'\x22');}export async function configGet(_0x468de3,_0x5ca046){const _0x144267=_0x29f0,_0x53f78a={'uLUCm':function(_0x2b5c7c,_0x49d1db){return _0x2b5c7c(_0x49d1db);},'QhUMW':function(_0x258acf,_0x2d1802){return _0x258acf===_0x2d1802;},'WeMup':function(_0x3f1d1f,_0x36c4f9,_0x56ec6b){return _0x3f1d1f(_0x36c4f9,_0x56ec6b);},'keOab':'object','ulrvY':function(_0x1181a3,_0x4639d8){return _0x1181a3===_0x4639d8;}},_0x459c83=await _0x53f78a[_0x144267(0x12e)](resolveProfileTarget,_0x468de3);if(_0x53f78a['QhUMW'](_0x459c83[_0x144267(0x129)],'cloud')){const _0x53114d=await loadEffectiveCloudSettings(_0x468de3),_0x3fb685=_0x53f78a['WeMup'](getNestedValue,_0x53114d,_0x5ca046);if(_0x53f78a['QhUMW'](_0x3fb685,undefined))console[_0x144267(0x137)]('(not\x20set)');else typeof _0x3fb685===_0x53f78a['keOab']?console[_0x144267(0x137)](JSON['stringify'](_0x3fb685,null,0x2)):console['log'](_0x3fb685);return;}const _0x30d1da=await loadSettings(_0x468de3),_0x21727b=getNestedValue(_0x30d1da,_0x5ca046);if(_0x53f78a[_0x144267(0x14e)](_0x21727b,undefined))console['log']('(not\x20set)');else _0x53f78a['ulrvY'](typeof _0x21727b,_0x53f78a[_0x144267(0x13f)])?console[_0x144267(0x137)](JSON[_0x144267(0x144)](_0x21727b,null,0x2)):console['log'](_0x21727b);}export async function configList(_0x48ffde){const _0x592652=_0x29f0,_0x972ffb={'fgUyA':function(_0x20d764,_0x5a86e6){return _0x20d764===_0x5a86e6;},'nNEDn':function(_0x39572d,_0x22d17c){return _0x39572d(_0x22d17c);},'dGFtp':function(_0x3d3f13,_0x498456){return _0x3d3f13(_0x498456);}},_0x43e2bc=await resolveProfileTarget(_0x48ffde);if(_0x972ffb[_0x592652(0x14c)](_0x43e2bc[_0x592652(0x129)],_0x592652(0x135))){const _0x53b87f=await _0x972ffb['nNEDn'](loadEffectiveCloudSettings,_0x48ffde);if(!_0x53b87f||Object[_0x592652(0x117)](_0x53b87f)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x48ffde+'\x22');return;}console[_0x592652(0x137)](JSON['stringify'](_0x53b87f,null,0x2));return;}const _0x4a3d0c=_0x972ffb['dGFtp'](getSettingsPath,_0x48ffde);if(!_0x972ffb[_0x592652(0x11a)](existsSync,_0x4a3d0c)){console[_0x592652(0x137)](_0x592652(0x120)+_0x48ffde+'\x22');return;}const _0x3a3893=await loadSettings(_0x48ffde),_0x2a623b=formatSettings(_0x3a3893);!_0x2a623b?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x48ffde+'\x22'):console[_0x592652(0x137)](_0x2a623b);}export async function configUnset(_0x271626,_0x189f3e){const _0x8d783a=_0x29f0,_0x568242={'lrZzS':function(_0x126503,_0xc3da5d){return _0x126503(_0xc3da5d);},'CuRUm':function(_0xd17c6d,_0x40709c,_0x344c99,_0xe02be9){return _0xd17c6d(_0x40709c,_0x344c99,_0xe02be9);},'xhoSv':function(_0x500822){return _0x500822();},'pkqJa':function(_0x4ce7d0,_0x5d0769,_0x6042e1){return _0x4ce7d0(_0x5d0769,_0x6042e1);}},_0x2e098c=await resolveProfileTarget(_0x271626);if(_0x2e098c[_0x8d783a(0x129)]===_0x8d783a(0x135)){if(_0x2e098c[_0x8d783a(0x127)])_0x568242[_0x8d783a(0x119)](printDualExistsHint,_0x271626);const _0x502c41=_0x568242['CuRUm'](unsetProfileOverride,_0x568242[_0x8d783a(0x14a)](getProjectPath),_0x271626,_0x189f3e);_0x502c41?console['log'](_0x8d783a(0x126)+_0x189f3e+_0x8d783a(0x116)+_0x271626+'\x22'):console['log']('Key\x20\x22'+_0x189f3e+'\x22\x20not\x20found');return;}const _0x193403=unsetProfileOverride(_0x568242['xhoSv'](getProjectPath),_0x271626,_0x189f3e);if(_0x193403){console['log']('Removed\x20'+_0x189f3e);return;}const _0x326fd2=await _0x568242['lrZzS'](loadSettings,_0x271626),_0x111cfc=_0x568242['pkqJa'](deleteNestedValue,_0x326fd2,_0x189f3e);_0x111cfc?console['log']('Key\x20\x22'+_0x189f3e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x271626+_0x8d783a(0x13e)):console['log'](_0x8d783a(0x11c)+_0x189f3e+_0x8d783a(0x140));}export async function configReset(_0x54277d){const _0x206342=_0x29f0,_0x5c3a49={'bxgnO':function(_0x434fe1,_0x43782e){return _0x434fe1(_0x43782e);},'WVxSq':'cloud','jsOKd':function(_0x192add,_0x2de81a,_0x339e07){return _0x192add(_0x2de81a,_0x339e07);}},_0x21f6d4=await _0x5c3a49['bxgnO'](resolveProfileTarget,_0x54277d);if(_0x21f6d4[_0x206342(0x129)]===_0x5c3a49[_0x206342(0x125)]){_0x5c3a49[_0x206342(0x121)](resetProfileOverrides,getProjectPath(),_0x54277d),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x54277d+'\x22');return;}console[_0x206342(0x137)]('\x22'+_0x54277d+_0x206342(0x13c)+_0x54277d+_0x206342(0x12a));}function _0x5319(){const _0x4e707d=['DkCow','Key\x20\x22','119530BSJZnR','local','endsWith','No\x20configuration\x20set\x20for\x20\x22','jsOKd','Set\x20','settings','startsWith','WVxSq','Removed\x20','alsoExistsElsewhere','554950bBJqSO','kind','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','4GJEotZ','MrHQC','uLUCm','\x20\x20Note:\x20\x22','5358GSFlPy','cwd','189pRaaUq','null','test','cloud','2419277EBDYtz','log','1316hhPbWK','ZgNMU','116860vGrdqN','includes','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','undefined','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','keOab','\x22\x20not\x20found','KCSNH','1212224qFxeMo','\x20=\x20','stringify','IwRVt','isNaN','2127lMQdEe','awwDM','Invalid\x20value\x20for\x20','xhoSv','false','fgUyA','TMFir','QhUMW','\x20for\x20\x22','keys','475ntxstZ','lrZzS','dGFtp'];_0x5319=function(){return _0x4e707d;};return _0x5319();}
@@ -1 +1 @@
1
- (function(_0x55bf30,_0x3d027d){const _0x2c28ab=_0x3927,_0x25b0ab=_0x55bf30();while(!![]){try{const _0x2c5a18=parseInt(_0x2c28ab(0x1d2))/0x1*(-parseInt(_0x2c28ab(0x1d5))/0x2)+parseInt(_0x2c28ab(0x1e5))/0x3+parseInt(_0x2c28ab(0x1d1))/0x4*(-parseInt(_0x2c28ab(0x1e4))/0x5)+-parseInt(_0x2c28ab(0x1d4))/0x6*(parseInt(_0x2c28ab(0x1db))/0x7)+parseInt(_0x2c28ab(0x1da))/0x8+-parseInt(_0x2c28ab(0x1d7))/0x9+parseInt(_0x2c28ab(0x1d9))/0xa;if(_0x2c5a18===_0x3d027d)break;else _0x25b0ab['push'](_0x25b0ab['shift']());}catch(_0x396274){_0x25b0ab['push'](_0x25b0ab['shift']());}}}(_0x41c2,0xea76d));import _0x5e1d5c from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x41c2(){const _0x1bd83c=['12027104lAxfum','686agywmQ','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x22\x20not\x20found.','cwd','WqKLy','yes','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','QTUZO','379565YeLOln','3877917SCeJsb','Type\x20\x22','12JsjaLz','102117aajJEI','input','28266mbokyU','24rycAIE','cQFNJ','3941055XimmdW','\x22\x20for\x20everyone\x20in\x20your\x20organization.','5170540SUHSbp'];_0x41c2=function(){return _0x1bd83c;};return _0x41c2();}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x3927(_0x3c9aa9,_0x22415f){_0x3c9aa9=_0x3c9aa9-0x1d0;const _0x41c2b0=_0x41c2();let _0x3927d2=_0x41c2b0[_0x3c9aa9];return _0x3927d2;}export async function deleteProfile(_0x11f510,_0x4e19b5={}){const _0x419161=_0x3927,_0x3a0078={'cQFNJ':function(_0x2b6794,_0x543aa9){return _0x2b6794(_0x543aa9);},'WqKLy':function(_0x18e7d2){return _0x18e7d2();},'QTUZO':_0x419161(0x1d3),'wVpaS':function(_0x55968e,_0x6420c6,_0x2a65ba){return _0x55968e(_0x6420c6,_0x2a65ba);}},_0x3b53f7=await _0x3a0078[_0x419161(0x1d6)](fetchCloudProfile,_0x11f510);if(!_0x3b53f7)throw new Error('Cloud\x20profile\x20\x22'+_0x11f510+_0x419161(0x1de));if(!_0x4e19b5[_0x419161(0x1e1)]&&!_0x3a0078[_0x419161(0x1e0)](isInteractive))throw new Error(_0x419161(0x1e2));console['log'](_0x419161(0x1dc)+_0x11f510+_0x419161(0x1d8));if(!_0x4e19b5[_0x419161(0x1e1)]){const {confirmation:_0x2cbe65}=await _0x5e1d5c['prompt']([{'type':_0x3a0078[_0x419161(0x1e3)],'name':'confirmation','message':_0x419161(0x1d0)+_0x11f510+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2cbe65!==_0x11f510)throw new Error(_0x419161(0x1dd));}await deleteCloudProfile(_0x11f510),_0x3a0078['wVpaS'](resetProfileOverrides,process[_0x419161(0x1df)](),_0x11f510),clearLastProfile(process['cwd'](),_0x11f510),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x11f510+'\x22.');}
1
+ (function(_0xae8faf,_0xff3abe){const _0x52cd37=_0x49ff,_0x2490a2=_0xae8faf();while(!![]){try{const _0x3e13c6=-parseInt(_0x52cd37(0x13b))/0x1*(-parseInt(_0x52cd37(0x13d))/0x2)+-parseInt(_0x52cd37(0x13f))/0x3+parseInt(_0x52cd37(0x146))/0x4+-parseInt(_0x52cd37(0x147))/0x5+parseInt(_0x52cd37(0x143))/0x6+-parseInt(_0x52cd37(0x142))/0x7+parseInt(_0x52cd37(0x145))/0x8*(-parseInt(_0x52cd37(0x144))/0x9);if(_0x3e13c6===_0xff3abe)break;else _0x2490a2['push'](_0x2490a2['shift']());}catch(_0x31328a){_0x2490a2['push'](_0x2490a2['shift']());}}}(_0x548a,0x4034e));import _0x3d8e7a from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x49ff(_0x4c1bef,_0x5a4736){_0x4c1bef=_0x4c1bef-0x138;const _0x548ae9=_0x548a();let _0x49ff19=_0x548ae9[_0x4c1bef];return _0x49ff19;}function _0x548a(){const _0x10151c=['88ZgBZHT','1781256ouBebY','1435890dtknMF','\x22\x20to\x20confirm\x20deletion:','log','Cloud\x20profile\x20\x22','cwd','GAJBL','3HbLRbS','input','304406kDAWLn','yes','819831WQtdLH','Type\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.','162806DtLNzT','1371414NGuWAk','232191jfFsAy'];_0x548a=function(){return _0x10151c;};return _0x548a();}export async function deleteProfile(_0x3c360a,_0x3dc330={}){const _0x3cf545=_0x49ff,_0x30b370={'DWQoX':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','DavDZ':function(_0x3c10e0,_0x9a827a){return _0x3c10e0(_0x9a827a);},'GAJBL':function(_0x211203,_0x39fe28,_0x9771eb){return _0x211203(_0x39fe28,_0x9771eb);}},_0x2c94ad=await fetchCloudProfile(_0x3c360a);if(!_0x2c94ad)throw new Error(_0x3cf545(0x138)+_0x3c360a+'\x22\x20not\x20found.');if(!_0x3dc330[_0x3cf545(0x13e)]&&!isInteractive())throw new Error(_0x30b370['DWQoX']);console[_0x3cf545(0x149)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3c360a+_0x3cf545(0x141));if(!_0x3dc330[_0x3cf545(0x13e)]){const {confirmation:_0x1f5d6c}=await _0x3d8e7a['prompt']([{'type':_0x3cf545(0x13c),'name':'confirmation','message':_0x3cf545(0x140)+_0x3c360a+_0x3cf545(0x148)}]);if(_0x1f5d6c!==_0x3c360a)throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await _0x30b370['DavDZ'](deleteCloudProfile,_0x3c360a),_0x30b370['GAJBL'](resetProfileOverrides,process[_0x3cf545(0x139)](),_0x3c360a),_0x30b370[_0x3cf545(0x13a)](clearLastProfile,process[_0x3cf545(0x139)](),_0x3c360a),console[_0x3cf545(0x149)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3c360a+'\x22.');}
@@ -1 +1 @@
1
- const _0x24a807=_0x16ba;(function(_0x5684c1,_0x3a553b){const _0x3becbb=_0x16ba,_0x3dea15=_0x5684c1();while(!![]){try{const _0x3670cc=-parseInt(_0x3becbb(0xd3))/0x1+parseInt(_0x3becbb(0xe1))/0x2+-parseInt(_0x3becbb(0xd0))/0x3+-parseInt(_0x3becbb(0xd5))/0x4*(parseInt(_0x3becbb(0xd7))/0x5)+parseInt(_0x3becbb(0xe4))/0x6*(-parseInt(_0x3becbb(0xd8))/0x7)+parseInt(_0x3becbb(0xce))/0x8*(parseInt(_0x3becbb(0xe6))/0x9)+parseInt(_0x3becbb(0xdb))/0xa;if(_0x3670cc===_0x3a553b)break;else _0x3dea15['push'](_0x3dea15['shift']());}catch(_0x23aa84){_0x3dea15['push'](_0x3dea15['shift']());}}}(_0x28f0,0x25bba));import{readdir,stat}from'fs/promises';function _0x28f0(){const _0x5dd1fc=['push','cached\x20(updated\x20','sort','isDirectory','environmentKey','local','message','environmentDetails','map','LKAxc','414944wtfdAt','endsWith','539157PNvWqe','IJRoK','includes','207023HFsvyd','dOeIk','4VwUluH','name','323630hbxTsw','35MkGmfr','\x0aLocal\x20Profiles\x20(legacy):','\x20\x20\x20\x20\x20\x20Details:\x20','3897380WgHwoe','PQDso','log','\x20\x20\x20\x20\x20\x20Session:\x20','settings.json','sessions','254786dgqauD','\x0a*\x20=\x20active\x20profile','RwUTo','17814ijYaJv','no\x20session','18uQBumD'];_0x28f0=function(){return _0x5dd1fc;};return _0x28f0();}function _0x16ba(_0x30c290,_0x6a532a){_0x30c290=_0x30c290-0xcb;const _0x28f0a2=_0x28f0();let _0x16bab4=_0x28f0a2[_0x30c290];return _0x16bab4;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24a807(0xe0),'bug-bashes','reports',_0x24a807(0xec),'ci'];export async function getEnvNames(){const _0x574d37=_0x24a807,_0x3ab58d={'dOeIk':function(_0x3dc176){return _0x3dc176();},'fOtDE':function(_0x505cd9,_0x2b0b99){return _0x505cd9(_0x2b0b99);},'RwUTo':function(_0x95d8b,_0x553208){return _0x95d8b(_0x553208);},'rsDGd':'local','LKAxc':function(_0x1132f4,_0x303539,_0x520e89){return _0x1132f4(_0x303539,_0x520e89);},'rsXtP':function(_0x54aaf7,_0x25f45b,_0x142f9e){return _0x54aaf7(_0x25f45b,_0x142f9e);},'IJRoK':'.txt','fCUSh':_0x574d37(0xdf)},_0x3fdc5e=_0x3ab58d[_0x574d37(0xd4)](getRangerDir);if(!existsSync(_0x3fdc5e))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3871fd=await readActiveProfileName(),_0x5efc1f=[],_0x228292={},_0x41753a=join(_0x3fdc5e,'local');if(_0x3ab58d['fOtDE'](existsSync,_0x41753a)){const _0x4a83fa=await _0x3ab58d[_0x574d37(0xe3)](readdir,_0x41753a);for(const _0x5bb4c9 of _0x4a83fa){const _0x18a90f=join(_0x41753a,_0x5bb4c9),_0x5201bf=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x18a90f);_0x5201bf[_0x574d37(0xea)]()&&(_0x5efc1f['push'](_0x5bb4c9),_0x228292[_0x5bb4c9]=_0x3ab58d['rsDGd']);}}const _0x26a68b=_0x3ab58d[_0x574d37(0xcd)](join,_0x3fdc5e,'ci');if(existsSync(_0x26a68b)){const _0x11395a=await _0x3ab58d['fOtDE'](readdir,_0x26a68b);for(const _0x3a002b of _0x11395a){const _0x17b46e=_0x3ab58d['rsXtP'](join,_0x26a68b,_0x3a002b),_0x4395f3=await stat(_0x17b46e);_0x4395f3[_0x574d37(0xea)]()&&(_0x5efc1f[_0x574d37(0xe7)](_0x3a002b),_0x228292[_0x3a002b]='ci');}}const _0x3266bc=await readdir(_0x3fdc5e);for(const _0xa880e of _0x3266bc){if(NON_ENV_DIRS[_0x574d37(0xd2)](_0xa880e))continue;if(_0xa880e['startsWith']('.'))continue;if(_0xa880e[_0x574d37(0xcf)](_0x3ab58d[_0x574d37(0xd1)]))continue;const _0x2035a5=join(_0x3fdc5e,_0xa880e),_0x2faae=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x2035a5);_0x2faae[_0x574d37(0xea)]()&&existsSync(_0x3ab58d['rsXtP'](join,_0x2035a5,_0x3ab58d['fCUSh']))&&(!_0x5efc1f['includes'](_0xa880e)&&(_0x5efc1f['push'](_0xa880e),_0x228292[_0xa880e]='legacy'));}return{'envNames':_0x5efc1f,'activeEnv':_0x3871fd,'envTypes':_0x228292};}export async function envList(){const _0x1c7cd8=_0x24a807,_0x6728a1={'PQDso':function(_0x57e173){return _0x57e173();},'suyhP':function(_0xa803be,_0xe11903){return _0xa803be(_0xe11903);},'rlGyi':_0x1c7cd8(0xd9),'DDYRU':function(_0x553f9e,_0x180022){return _0x553f9e===_0x180022;},'KwokL':'legacy','lWAfU':function(_0x254a81,_0x52a48e){return _0x254a81>_0x52a48e;}},{envNames:_0x3c7b33,activeEnv:_0x1a4019,envTypes:_0x11c55a}=await _0x6728a1[_0x1c7cd8(0xdc)](getEnvNames);let _0x2c0d19=[];const _0x236f4f=await _0x6728a1[_0x1c7cd8(0xdc)](getToken);if(_0x236f4f)try{_0x2c0d19=await _0x6728a1['PQDso'](listCloudProfiles);}catch(_0x57fc73){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x57fc73 instanceof Error?_0x57fc73[_0x1c7cd8(0xed)]:_0x6728a1['suyhP'](String,_0x57fc73)));}if(_0x3c7b33['length']===0x0&&_0x2c0d19['length']===0x0){console['log']('\x0aNo\x20profiles\x20found.'),console[_0x1c7cd8(0xdd)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x1dff71=new Set(_0x2c0d19[_0x1c7cd8(0xcc)](_0x49b928=>_0x49b928['name']));if(_0x3c7b33['length']>0x0){console['log'](_0x6728a1['rlGyi']);for(const _0x54b7fe of _0x3c7b33[_0x1c7cd8(0xe9)]()){const _0x177c87=_0x6728a1['DDYRU'](_0x54b7fe,_0x1a4019)&&!_0x1dff71['has'](_0x54b7fe),_0x55019c=_0x11c55a[_0x54b7fe]||'local',_0x1fb08a=await loadSettings(_0x54b7fe),_0x4fb732=_0x55019c===_0x6728a1['KwokL']?'':'\x20['+_0x55019c+']';console['log']('\x20\x20'+(_0x177c87?'*\x20':'\x20\x20')+_0x54b7fe+_0x4fb732),_0x1fb08a['baseUrl']&&console[_0x1c7cd8(0xdd)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1fb08a['baseUrl']),_0x1fb08a[_0x1c7cd8(0xcb)]&&console[_0x1c7cd8(0xdd)](_0x1c7cd8(0xda)+_0x1fb08a['environmentDetails']);}}if(_0x6728a1['lWAfU'](_0x2c0d19['length'],0x0)){console[_0x1c7cd8(0xdd)]('\x0aCloud\x20Profiles:');for(const _0x593611 of _0x2c0d19[_0x1c7cd8(0xe9)]((_0x14b054,_0x1a3fce)=>_0x14b054['name']['localeCompare'](_0x1a3fce[_0x1c7cd8(0xd6)]))){const _0x5df93f=_0x593611[_0x1c7cd8(0xd6)]===_0x1a4019,_0x1561d9=_0x593611[_0x1c7cd8(0xeb)]?'\x20('+_0x593611['environmentKey']+')':'',_0x4f75fd=_0x593611['sessionUpdatedAt']?_0x1c7cd8(0xe8)+_0x593611['sessionUpdatedAt']+')':_0x1c7cd8(0xe5);console['log']('\x20\x20'+(_0x5df93f?'*\x20':'\x20\x20')+_0x593611[_0x1c7cd8(0xd6)]+'\x20[cloud]'+_0x1561d9),console['log'](_0x1c7cd8(0xde)+_0x4f75fd);}}_0x1a4019&&console['log'](_0x1c7cd8(0xe2));}
1
+ const _0x49e249=_0x1a08;(function(_0x1c3555,_0x5e6ed1){const _0x38f584=_0x1a08,_0x314fe8=_0x1c3555();while(!![]){try{const _0x206ff2=parseInt(_0x38f584(0x1cd))/0x1+parseInt(_0x38f584(0x1e8))/0x2*(parseInt(_0x38f584(0x1cf))/0x3)+parseInt(_0x38f584(0x1e2))/0x4*(-parseInt(_0x38f584(0x1d5))/0x5)+-parseInt(_0x38f584(0x1d0))/0x6+parseInt(_0x38f584(0x1e1))/0x7+-parseInt(_0x38f584(0x1db))/0x8*(-parseInt(_0x38f584(0x1ed))/0x9)+parseInt(_0x38f584(0x1ea))/0xa*(-parseInt(_0x38f584(0x1f2))/0xb);if(_0x206ff2===_0x5e6ed1)break;else _0x314fe8['push'](_0x314fe8['shift']());}catch(_0x510041){_0x314fe8['push'](_0x314fe8['shift']());}}}(_0xad07,0xc74b6));import{readdir,stat}from'fs/promises';import{join}from'path';function _0xad07(){const _0x7df645=['has','1034usNZZm','\x0aLocal\x20Profiles\x20(legacy):','kMCcV','reports','rbJIb','VEGRy','environmentKey','565130JZZdZf','eLivn','3ZifTPQ','7409574LwTGXD','baseUrl','KyQGP','startsWith','sessionUpdatedAt','3290SkZfNR','seRBK','length','sort','includes','xgrfy','8pNYbWn','isDirectory','log','legacy','push','error','10171392IflWNF','4504buKNUb','aYMKQ','\x20\x20\x20\x20\x20\x20URL:\x20','settings.json','local','\x20[cloud]','971186kQaGWa','sessions','137570sjrVSF','\x0a*\x20=\x20active\x20profile','cached\x20(updated\x20','14233734STEImp','bug-bashes','REoHS','name'];_0xad07=function(){return _0x7df645;};return _0xad07();}function _0x1a08(_0x500314,_0x138299){_0x500314=_0x500314-0x1ca;const _0xad0797=_0xad07();let _0x1a0882=_0xad0797[_0x500314];return _0x1a0882;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x49e249(0x1e9),_0x49e249(0x1ee),_0x49e249(0x1f5),'local','ci'];export async function getEnvNames(){const _0x9fa998=_0x49e249,_0x48b059={'xgrfy':function(_0x59fbe2){return _0x59fbe2();},'seRBK':function(_0x3585ad,_0xc68948){return _0x3585ad(_0xc68948);},'kwojS':function(_0x45612d){return _0x45612d();},'KyQGP':function(_0x50af1c,_0x196051){return _0x50af1c(_0x196051);},'REoHS':function(_0x52442a,_0x456dbb){return _0x52442a(_0x456dbb);},'VEGRy':function(_0x35e0b6,_0x11a342,_0x1238dc){return _0x35e0b6(_0x11a342,_0x1238dc);},'eLivn':'.txt'},_0x4b46a9=_0x48b059[_0x9fa998(0x1da)](getRangerDir);if(!_0x48b059[_0x9fa998(0x1d6)](existsSync,_0x4b46a9))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4fae7a=await _0x48b059['kwojS'](readActiveProfileName),_0x2eda1c=[],_0x4820e5={},_0x5837f0=join(_0x4b46a9,_0x9fa998(0x1e6));if(_0x48b059[_0x9fa998(0x1d2)](existsSync,_0x5837f0)){const _0x2e58db=await _0x48b059['seRBK'](readdir,_0x5837f0);for(const _0x12ae7b of _0x2e58db){const _0x35e0d7=join(_0x5837f0,_0x12ae7b),_0x3e0cbf=await _0x48b059[_0x9fa998(0x1ef)](stat,_0x35e0d7);_0x3e0cbf['isDirectory']()&&(_0x2eda1c[_0x9fa998(0x1df)](_0x12ae7b),_0x4820e5[_0x12ae7b]=_0x9fa998(0x1e6));}}const _0x2e2c31=join(_0x4b46a9,'ci');if(_0x48b059[_0x9fa998(0x1d6)](existsSync,_0x2e2c31)){const _0x1bed06=await readdir(_0x2e2c31);for(const _0x1f0daa of _0x1bed06){const _0x3f9e6f=_0x48b059['VEGRy'](join,_0x2e2c31,_0x1f0daa),_0x107ba0=await _0x48b059['KyQGP'](stat,_0x3f9e6f);_0x107ba0[_0x9fa998(0x1dc)]()&&(_0x2eda1c['push'](_0x1f0daa),_0x4820e5[_0x1f0daa]='ci');}}const _0xacb009=await readdir(_0x4b46a9);for(const _0xd0fd98 of _0xacb009){if(NON_ENV_DIRS[_0x9fa998(0x1d9)](_0xd0fd98))continue;if(_0xd0fd98[_0x9fa998(0x1d3)]('.'))continue;if(_0xd0fd98['endsWith'](_0x48b059[_0x9fa998(0x1ce)]))continue;const _0x5eccc0=_0x48b059['VEGRy'](join,_0x4b46a9,_0xd0fd98),_0x24bd92=await _0x48b059['seRBK'](stat,_0x5eccc0);_0x24bd92[_0x9fa998(0x1dc)]()&&existsSync(_0x48b059[_0x9fa998(0x1cb)](join,_0x5eccc0,_0x9fa998(0x1e5)))&&(!_0x2eda1c[_0x9fa998(0x1d9)](_0xd0fd98)&&(_0x2eda1c['push'](_0xd0fd98),_0x4820e5[_0xd0fd98]=_0x9fa998(0x1de)));}return{'envNames':_0x2eda1c,'activeEnv':_0x4fae7a,'envTypes':_0x4820e5};}export async function envList(){const _0x4e91a3=_0x49e249,_0x32f74e={'sHIgA':function(_0x10ef0){return _0x10ef0();},'YFHBn':function(_0xf5157a,_0x21738b){return _0xf5157a instanceof _0x21738b;},'rbJIb':function(_0x214da8,_0x4af89){return _0x214da8===_0x4af89;},'kMCcV':'\x0aNo\x20profiles\x20found.','oJdYv':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','aYMKQ':_0x4e91a3(0x1f3),'yYFUJ':function(_0x2d1acd,_0x2b5d13){return _0x2d1acd(_0x2b5d13);},'BycIK':'\x0aCloud\x20Profiles:'},{envNames:_0x3eea5f,activeEnv:_0x1a27e1,envTypes:_0x33627a}=await _0x32f74e['sHIgA'](getEnvNames);let _0x822273=[];const _0x44a544=await _0x32f74e['sHIgA'](getToken);if(_0x44a544)try{_0x822273=await listCloudProfiles();}catch(_0x42fb4f){console[_0x4e91a3(0x1e0)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x32f74e['YFHBn'](_0x42fb4f,Error)?_0x42fb4f['message']:String(_0x42fb4f)));}if(_0x32f74e[_0x4e91a3(0x1ca)](_0x3eea5f['length'],0x0)&&_0x822273[_0x4e91a3(0x1d7)]===0x0){console[_0x4e91a3(0x1dd)](_0x32f74e[_0x4e91a3(0x1f4)]),console['log'](_0x32f74e['oJdYv']);return;}const _0x5c0b04=new Set(_0x822273['map'](_0x5a6853=>_0x5a6853['name']));if(_0x3eea5f[_0x4e91a3(0x1d7)]>0x0){console[_0x4e91a3(0x1dd)](_0x32f74e[_0x4e91a3(0x1e3)]);for(const _0x512c2b of _0x3eea5f[_0x4e91a3(0x1d8)]()){const _0x46608a=_0x32f74e['rbJIb'](_0x512c2b,_0x1a27e1)&&!_0x5c0b04[_0x4e91a3(0x1f1)](_0x512c2b),_0x3197f8=_0x33627a[_0x512c2b]||_0x4e91a3(0x1e6),_0x258a2b=await _0x32f74e['yYFUJ'](loadSettings,_0x512c2b),_0x1dd320=_0x3197f8==='legacy'?'':'\x20['+_0x3197f8+']';console['log']('\x20\x20'+(_0x46608a?'*\x20':'\x20\x20')+_0x512c2b+_0x1dd320),_0x258a2b['baseUrl']&&console[_0x4e91a3(0x1dd)](_0x4e91a3(0x1e4)+_0x258a2b[_0x4e91a3(0x1d1)]),_0x258a2b['environmentDetails']&&console[_0x4e91a3(0x1dd)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x258a2b['environmentDetails']);}}if(_0x822273[_0x4e91a3(0x1d7)]>0x0){console[_0x4e91a3(0x1dd)](_0x32f74e['BycIK']);for(const _0x48b5c0 of _0x822273['sort']((_0x476d08,_0x6187a4)=>_0x476d08['name']['localeCompare'](_0x6187a4[_0x4e91a3(0x1f0)]))){const _0x452ff7=_0x48b5c0[_0x4e91a3(0x1f0)]===_0x1a27e1,_0x5e675a=_0x48b5c0[_0x4e91a3(0x1cc)]?'\x20('+_0x48b5c0[_0x4e91a3(0x1cc)]+')':'',_0x1cc67c=_0x48b5c0[_0x4e91a3(0x1d4)]?_0x4e91a3(0x1ec)+_0x48b5c0[_0x4e91a3(0x1d4)]+')':'no\x20session';console['log']('\x20\x20'+(_0x452ff7?'*\x20':'\x20\x20')+_0x48b5c0[_0x4e91a3(0x1f0)]+_0x4e91a3(0x1e7)+_0x5e675a),console[_0x4e91a3(0x1dd)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x1cc67c);}}_0x1a27e1&&console[_0x4e91a3(0x1dd)](_0x4e91a3(0x1eb));}