@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.a5be4ca-60

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 (86) 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 -1
  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 -1
  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/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +15 -9
@@ -1 +1 @@
1
- (function(_0x439cf8,_0xe18756){const _0x672e38=_0x16fe,_0x456c8a=_0x439cf8();while(!![]){try{const _0x49bbc0=parseInt(_0x672e38(0x131))/0x1*(-parseInt(_0x672e38(0x153))/0x2)+-parseInt(_0x672e38(0x18f))/0x3+parseInt(_0x672e38(0x160))/0x4+-parseInt(_0x672e38(0x1b0))/0x5*(parseInt(_0x672e38(0x18b))/0x6)+-parseInt(_0x672e38(0x15a))/0x7*(-parseInt(_0x672e38(0x1a4))/0x8)+parseInt(_0x672e38(0x169))/0x9*(-parseInt(_0x672e38(0x17c))/0xa)+parseInt(_0x672e38(0x14a))/0xb;if(_0x49bbc0===_0xe18756)break;else _0x456c8a['push'](_0x456c8a['shift']());}catch(_0x50759b){_0x456c8a['push'](_0x456c8a['shift']());}}}(_0x1270,0x482a0));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x42e4ef 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';function _0x16fe(_0x3c21fd,_0x5c104f){_0x3c21fd=_0x3c21fd-0x12e;const _0x127016=_0x1270();let _0x16fe60=_0x127016[_0x3c21fd];return _0x16fe60;}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x142cf1=_0x16fe;if(!process[_0x142cf1(0x1a0)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2f587b){const _0x5d109a=_0x16fe,_0x3b34e5={'VKEHL':'HEAD','zgKha':function(_0x579516,_0x4e5cbb){return _0x579516(_0x4e5cbb);},'YHUwa':_0x5d109a(0x15e),'yRqsR':'fetch\x20failed'};try{const _0x23f3ef=new AbortController(),_0x4aea5d=setTimeout(()=>_0x23f3ef[_0x5d109a(0x175)](),0x1388),_0x108589={'method':_0x3b34e5[_0x5d109a(0x17e)],'signal':_0x23f3ef[_0x5d109a(0x147)],'redirect':_0x5d109a(0x15d)};/^https:\/\/localhost(:\d+)?/i[_0x5d109a(0x19b)](_0x2f587b)&&(process[_0x5d109a(0x192)][_0x5d109a(0x168)]='0');const _0x5f3b5b=await fetch(_0x2f587b,_0x108589);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4aea5d);if(_0x5f3b5b[_0x5d109a(0x138)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5f3b5b['status']};}catch(_0x46b05a){delete process[_0x5d109a(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x2bde66=_0x46b05a,_0x2fd408=_0x2bde66['message']||_0x3b34e5['zgKha'](String,_0x46b05a),_0x4014bb=_0x2fd408[_0x5d109a(0x17b)](_0x5d109a(0x1ac))||_0x2bde66['name']===_0x3b34e5[_0x5d109a(0x188)]||_0x2fd408[_0x5d109a(0x17b)](_0x3b34e5['yRqsR']);return{'ok':![],'error':_0x2fd408,'isProtocolError':_0x4014bb};}}async function sweepOrphanLocalProfile(_0x4bc023,_0x4884cd,_0x41c123){const _0x3ec6c9=_0x16fe,_0x1e15d4={'JDEoR':'local','gQncA':function(_0x226587,_0x4c9ac2,_0x3104bf){return _0x226587(_0x4c9ac2,_0x3104bf);},'TsJbh':function(_0x242122,_0x46fb2a){return _0x242122(_0x46fb2a);}},_0x164191=join(_0x4884cd,_0x1e15d4[_0x3ec6c9(0x15c)]),_0x2e14b8=join(_0x164191,_0x4bc023);existsSync(_0x2e14b8)&&(_0x41c123&&await isPathGitTracked(_0x2e14b8)?console[_0x3ec6c9(0x130)](_0x3ec6c9(0x16c)+_0x2e14b8+_0x3ec6c9(0x18a)):(await _0x1e15d4[_0x3ec6c9(0x150)](rm,_0x2e14b8,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2e14b8)));if(_0x1e15d4[_0x3ec6c9(0x15f)](existsSync,_0x164191)){let _0x49d939=[];try{_0x49d939=await readdir(_0x164191);}catch{return;}const _0x2b6463=_0x3ec6c9(0x136)+_0x4bc023+'-';for(const _0x197b99 of _0x49d939){if(!_0x197b99[_0x3ec6c9(0x19f)](_0x2b6463))continue;const _0x19e04f=join(_0x164191,_0x197b99);await rm(_0x19e04f,{'recursive':!![],'force':!![]}),console[_0x3ec6c9(0x130)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x19e04f);}}}async function sweepOrphansBestEffort(_0x1bc2e5){const _0x55e7ad=_0x16fe,_0x218436={'GDfce':function(_0x30d841){return _0x30d841();},'srdNg':function(_0x3e166a){return _0x3e166a();},'ZccML':function(_0x373ff3,_0x3bc932){return _0x373ff3!==_0x3bc932;},'KycqC':function(_0x144af0,_0x4795db){return _0x144af0 instanceof _0x4795db;},'vaaAv':function(_0x382fb5,_0x869e93){return _0x382fb5(_0x869e93);}};try{await sweepOrphanLocalProfile(_0x1bc2e5,_0x218436['GDfce'](getRangerHomeDir),![]);const _0x1cc009=_0x218436[_0x55e7ad(0x182)](getRangerDir);_0x218436['ZccML'](_0x1cc009,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x1bc2e5,_0x1cc009,!![]);}catch(_0x4f9525){console['log'](_0x55e7ad(0x144)+(_0x218436[_0x55e7ad(0x17d)](_0x4f9525,Error)?_0x4f9525[_0x55e7ad(0x193)]:_0x218436['vaaAv'](String,_0x4f9525))+').');}}function _0x1270(){const _0x5bde6a=['6rpcLtO','\x0a✓\x20Profile\x20\x27','\x20Configured\x20envs:\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','748710GfjXQD','VEAqd','authEnv','env','message','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','NvMwb','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','NOIFN','setupHeader','KpQXz','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','test','env_not_found','trackPhaseEnd','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','startsWith','stdout','ciMVc','isProtocolError','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','1934392MTriIw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20--url\x20','environments','cwd','WYtmO','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','KeVoz','Invalid\x20URL','no_match','continue','xsFXB','2380505YFhhmO','LhZYt','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','profile.add.autoRouted','prompt','ThnPv','trim','log','11rSPzLs','slice','\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','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Found\x20auth\x20environment\x20\x27','.tmp-','Use\x20','status','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','dSWOA','kDCqN','JLDlf','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','tPQRV','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','Enter\x20a\x20different\x20URL','QTCUN','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','xzNVQ','MgqvO','signal','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','cdpEndpoint','5402540ctqSkd','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(CDP).','SMITt','setupHeaders','XpwNz','gQncA','baseUrl','use_suggestion','5482vMyLnw','yes','DPwxM','\x0a\x20\x20A\x20profile\x20named\x20\x22','BJPSg','skipAuth','bPboJ','7gIzpLL','\x20\x20https://docs.ranger.net/main/concepts/profiles','JDEoR','manual','TypeError','TsJbh','1508288FxrNoY','profile.add.autoRouteSkipped','lKcXG','\x0a\x20\x20(domains:\x20','Omztm','flOos','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','NODE_TLS_REJECT_UNAUTHORIZED','135AKXtxM','no_auth_config','url','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','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','isElectron','exit','length','list','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','iKFrx','CaTDE','abort','YyiJh','YctTj','http://','error','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','includes','39070NVHBkT','KycqC','VKEHL','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','RraHm','srdNg','DuuNT','CFlpJ','\x22\x20not\x20found.','uexPs','pLMNu','YHUwa','PpZYD','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'];_0x1270=function(){return _0x5bde6a;};return _0x1270();}async function markActive(_0xf8114d){const _0x55c020=_0x16fe,_0x43a74f={'gdXYr':function(_0xf0f94b,_0x98e9b8){return _0xf0f94b(_0x98e9b8);},'xzNVQ':_0x55c020(0x172)};try{await _0x43a74f['gdXYr'](writeActiveProfileName,_0xf8114d),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0xf8114d);}catch{console[_0x55c020(0x130)](_0x43a74f[_0x55c020(0x145)]);}}async function tryAutoRouteCloudProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x79ecd8,_0x3beaf1){const _0x1c18b4=_0x16fe,_0x1c6051={'lKcXG':_0x1c18b4(0x16a),'JLDlf':function(_0xc4f61d,_0x40f066){return _0xc4f61d instanceof _0x40f066;},'NvMwb':_0x1c18b4(0x161),'RraHm':function(_0x2fb0ea,_0x2cb0c8){return _0x2fb0ea+_0x2cb0c8;},'BJPSg':function(_0x95e039,_0x4b72dc){return _0x95e039+_0x4b72dc;},'Omztm':_0x1c18b4(0x133),'NOIFN':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','dSWOA':_0x1c18b4(0x19a),'KpQXz':_0x1c18b4(0x19c),'gKdwg':function(_0x1b6ad3,_0xaae490){return _0x1b6ad3+_0xaae490;},'bPboJ':function(_0x4780d1,_0x291e8c,_0x4edde7){return _0x4780d1(_0x291e8c,_0x4edde7);},'AAwor':'confirm','CFlpJ':function(_0xe32d27,_0x5c73b3,_0x328038,_0x535cc3){return _0xe32d27(_0x5c73b3,_0x328038,_0x535cc3);},'XpwNz':function(_0x3f8671,_0x2de470){return _0x3f8671===_0x2de470;},'QTCUN':function(_0x10b9e7,_0x204528){return _0x10b9e7(_0x204528);}};let _0xe1e9b2;try{_0xe1e9b2=await fetchAuthConfig();}catch(_0x1031e7){return _0x3beaf1?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1c6051[_0x1c18b4(0x162)],'profileName':_0x2e941d}),console['error'](_0x1c18b4(0x167)+(_0x1c6051[_0x1c18b4(0x13c)](_0x1031e7,Error)?_0x1031e7[_0x1c18b4(0x193)]:String(_0x1031e7))),![];}if((!_0xe1e9b2||!_0xe1e9b2['environments']||Object[_0x1c18b4(0x1b3)](_0xe1e9b2[_0x1c18b4(0x1a7)])['length']===0x0)&&!_0x2802c9[_0x1c18b4(0x191)]){if(_0x79ecd8)return await captureEnvLessProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x3beaf1);return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051['lKcXG'],'profileName':_0x2e941d}),console['error'](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x157)](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x164)],'\x0a')+_0x1c6051[_0x1c18b4(0x197)]+(_0x1c18b4(0x194)+_0x2e941d+_0x1c18b4(0x1a6)+_0x51d836+'\x20--skip-auth\x0a'),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a',_0x1c6051[_0x1c18b4(0x13a)])),![];}let _0x4d8abd;if(_0x2802c9['authEnv']){if(!_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x2802c9['authEnv']]){const _0x26f699=Object['keys'](_0xe1e9b2?.[_0x1c18b4(0x1a7)]??{});return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051[_0x1c18b4(0x199)],'profileName':_0x2e941d}),console['error'](_0x1c6051['gKdwg']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x2802c9[_0x1c18b4(0x191)]+_0x1c18b4(0x185),_0x26f699['length']?_0x1c18b4(0x18d)+_0x26f699['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x4d8abd=_0x2802c9['authEnv'];}else _0x4d8abd=_0x1c6051[_0x1c18b4(0x159)](matchAuthEnvironment,_0x51d836,_0xe1e9b2);if(!_0x4d8abd)return _0x3beaf1?.[_0x1c18b4(0x19d)]('profile.add.autoRouteSkipped',{'reason':_0x1c18b4(0x1ad),'profileName':_0x2e941d}),console[_0x1c18b4(0x179)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x51d836+_0x1c18b4(0x1aa)+Object[_0x1c18b4(0x1b3)](_0xe1e9b2?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2bd03c=_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x4d8abd],_0x1dede5=_0x2bd03c?.['domains']??[];if(_0x79ecd8&&!_0x2802c9[_0x1c18b4(0x154)]){const {saveToCloud:_0xede296}=await _0x42e4ef['prompt']([{'type':_0x1c6051['AAwor'],'name':'saveToCloud','message':_0x1c18b4(0x135)+_0x4d8abd+'\x27\x20matching\x20'+_0x51d836+_0x1c18b4(0x163)+_0x1dede5['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2e941d+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xede296)return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':'user_declined','profileName':_0x2e941d}),console['error'](_0x1c18b4(0x134)),![];}const _0x1c4cce=_0x1dede5['some'](_0x1f5f58=>{const _0x5d30d3=_0x1c18b4;try{return new URL(_0x1f5f58)[_0x5d30d3(0x13e)]===new URL(_0x51d836)['origin'];}catch{return![];}}),_0x1c7769={};!_0x1c4cce&&(_0x1c7769['baseUrl']=_0x51d836);try{await _0x1c6051[_0x1c18b4(0x184)](createCloudProfile,_0x2e941d,_0x4d8abd,{'settings':_0x1c7769}),warnCloudProfileSharedInOrg();}catch(_0x4fd48b){if(_0x4fd48b instanceof ApiError&&_0x1c6051[_0x1c18b4(0x14f)](_0x4fd48b[_0x1c18b4(0x138)],0x199)){console[_0x1c18b4(0x179)](_0x1c18b4(0x156)+_0x2e941d+_0x1c18b4(0x13f)+(_0x1c18b4(0x1a3)+_0x2e941d));throw _0x4fd48b;}throw _0x4fd48b;}return console['log'](_0x1c6051[_0x1c18b4(0x181)]('✓\x20Profile\x20\x27'+_0x2e941d+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2e941d)),await _0x1c6051[_0x1c18b4(0x143)](sweepOrphansBestEffort,_0x2e941d),_0x3beaf1?.['trackPhaseEnd'](_0x1c18b4(0x1b4),{'envKey':_0x4d8abd,'profileName':_0x2e941d}),!![];}async function createUnconfiguredCloudProfile(_0xa33e6f,_0x1807de){const _0xf43bac=_0x16fe,_0xd60127={'iKFrx':function(_0xf6dda3,_0x8312e4,_0x544e77,_0x2650ba){return _0xf6dda3(_0x8312e4,_0x544e77,_0x2650ba);},'xHYni':function(_0x26d9ea,_0x135f57){return _0x26d9ea===_0x135f57;}};try{await _0xd60127[_0xf43bac(0x173)](createCloudProfile,_0xa33e6f,undefined,{'settings':_0x1807de}),warnCloudProfileSharedInOrg();}catch(_0x13a887){_0x13a887 instanceof ApiError&&_0xd60127['xHYni'](_0x13a887[_0xf43bac(0x138)],0x199)&&console[_0xf43bac(0x179)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xa33e6f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0xf43bac(0x1a3)+_0xa33e6f));throw _0x13a887;}}async function captureEnvLessProfile(_0x24b365,_0x499a2c,_0x1bd371,_0x14bd4d){const _0xa79aaa=_0x16fe,_0x279fc6={'VEAqd':'confirm','UBDHq':_0xa79aaa(0x14b),'phHhs':_0xa79aaa(0x161),'DPwxM':'user_declined','VNKbp':function(_0x3576a5,_0x55463f){return _0x3576a5===_0x55463f;},'KRCQf':function(_0x182d3e,_0x4127f0){return _0x182d3e+_0x4127f0;},'ThnPv':function(_0x3a088e,_0x116edf){return _0x3a088e>_0x116edf;},'KeVoz':function(_0x2a6c79,_0x535252,_0x2d44c2,_0x5b7db6){return _0x2a6c79(_0x535252,_0x2d44c2,_0x5b7db6);},'flOos':function(_0x3d8e19,_0x4d2d64){return _0x3d8e19 instanceof _0x4d2d64;},'WYtmO':function(_0x28b427,_0x252b81,_0x4257ee){return _0x28b427(_0x252b81,_0x4257ee);},'kwlnJ':function(_0x18b944,_0xf3f3c5){return _0x18b944(_0xf3f3c5);}};if(!_0x1bd371['yes']){const {capture:_0x5a424d}=await _0x42e4ef['prompt']([{'type':_0x279fc6[_0xa79aaa(0x190)],'name':'capture','message':_0x279fc6['UBDHq'],'default':!![]}]);if(!_0x5a424d)return _0x14bd4d?.['trackPhaseEnd'](_0x279fc6['phHhs'],{'reason':_0x279fc6[_0xa79aaa(0x155)],'profileName':_0x24b365}),console['error'](_0xa79aaa(0x148)+_0xa79aaa(0x18e)),![];}const _0x59a0e2={};if(_0x1bd371[_0xa79aaa(0x198)])for(const _0x77c5fd of _0x1bd371['setupHeader']){const _0xdde94c=_0x77c5fd[_0xa79aaa(0x180)](':');if(_0x279fc6['VNKbp'](_0xdde94c,-0x1))continue;_0x59a0e2[_0x77c5fd[_0xa79aaa(0x132)](0x0,_0xdde94c)[_0xa79aaa(0x12f)]()]=_0x77c5fd['slice'](_0x279fc6['KRCQf'](_0xdde94c,0x1))[_0xa79aaa(0x12f)]();}const _0x17d4ff={'baseUrl':_0x499a2c};_0x279fc6[_0xa79aaa(0x12e)](Object['keys'](_0x59a0e2)[_0xa79aaa(0x170)],0x0)&&(_0x17d4ff['setupHeaders']=_0x59a0e2);let _0x5d9c71;try{_0x5d9c71=await _0x279fc6[_0xa79aaa(0x1ab)](createCloudProfile,_0x24b365,undefined,{'settings':_0x17d4ff}),warnCloudProfileSharedInOrg();}catch(_0xd839a7){_0x279fc6[_0xa79aaa(0x165)](_0xd839a7,ApiError)&&_0xd839a7[_0xa79aaa(0x138)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x24b365+_0xa79aaa(0x13f)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x24b365));throw _0xd839a7;}return await _0x279fc6[_0xa79aaa(0x1a9)](manualBrowserLogin,_0x5d9c71,{'key':'','domains':[_0x499a2c],'setupHeaders':Object[_0xa79aaa(0x1b3)](_0x59a0e2)['length']>0x0?_0x59a0e2:undefined}),console['log'](_0xa79aaa(0x18c)+_0x24b365+_0xa79aaa(0x166)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x24b365)),await _0x279fc6['kwlnJ'](sweepOrphansBestEffort,_0x24b365),_0x14bd4d?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x24b365}),!![];}export async function addEnv(_0x1ae65c,_0x458502={},_0x33c474){const _0x2e3f25=_0x16fe,_0x3e0f7f={'tPQRV':function(_0x1a7750,_0x504001){return _0x1a7750+_0x504001;},'HTgmy':function(_0x540c6e,_0x3f11f0){return _0x540c6e+_0x3f11f0;},'NlMAp':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','PpZYD':_0x2e3f25(0x139),'jMXZn':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ciMVc':_0x2e3f25(0x15b),'MgqvO':function(_0x4bb289,_0x1a1c14){return _0x4bb289===_0x1a1c14;},'DuuNT':_0x2e3f25(0x1b2),'KwFBo':function(_0x49c67d){return _0x49c67d();},'XPNSZ':_0x2e3f25(0x17a),'pLMNu':function(_0x3b79fa,_0x250892){return _0x3b79fa>_0x250892;},'LhZYt':function(_0x30d865,_0x5bb1e1){return _0x30d865(_0x5bb1e1);},'YctTj':function(_0x41de38,_0x3115cd){return _0x41de38(_0x3115cd);},'xsFXB':function(_0x4bb3e0,_0x1ee0fc,_0x5aa63d){return _0x4bb3e0(_0x1ee0fc,_0x5aa63d);},'LOTsS':function(_0x33684b,_0x33816b){return _0x33684b(_0x33816b);},'uexPs':_0x2e3f25(0x196),'lQTER':'input','LIBjO':_0x2e3f25(0x13d),'CaTDE':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','SMITt':'What\x20would\x20you\x20like\x20to\x20do?','kDCqN':_0x2e3f25(0x142),'YyiJh':'continue'};_0x458502['ci']&&(console['error'](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f['HTgmy'](_0x3e0f7f['HTgmy'](_0x3e0f7f['NlMAp'],_0x3e0f7f[_0x2e3f25(0x189)]),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x3e0f7f['jMXZn'])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x3e0f7f[_0x2e3f25(0x1a1)])),process['exit'](0x1));const _0x5a25ef={};if(_0x458502[_0x2e3f25(0x198)])for(const _0xac1be of _0x458502['setupHeader']){const _0x211612=_0xac1be[_0x2e3f25(0x180)](':');if(_0x3e0f7f['MgqvO'](_0x211612,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xac1be+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x31113b=_0xac1be[_0x2e3f25(0x132)](0x0,_0x211612)['trim'](),_0x584f11=_0xac1be[_0x2e3f25(0x132)](_0x211612+0x1)[_0x2e3f25(0x12f)]();_0x5a25ef[_0x31113b]=_0x584f11;}if(_0x458502[_0x2e3f25(0x149)]!==undefined&&_0x458502[_0x2e3f25(0x149)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x458502[_0x2e3f25(0x149)]&&_0x458502[_0x2e3f25(0x16b)])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x141));if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['cdpEndpoint'])throw new Error(_0x3e0f7f[_0x2e3f25(0x183)]);const _0x32c05c=Boolean(_0x458502['cdpEndpoint']),_0x46a2d2=_0x3e0f7f['KwFBo'](isInteractive);if(!_0x46a2d2&&!_0x458502[_0x2e3f25(0x16b)]&&!_0x32c05c&&!_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x16d));if(_0x32c05c){const _0x42116d=_0x458502['cdpEndpoint'];console['log'](_0x3e0f7f['XPNSZ']),console['log'](_0x2e3f25(0x19e)+_0x42116d);const _0x41d816={'cdpEndpoint':_0x42116d,'isElectron':!![]};_0x3e0f7f[_0x2e3f25(0x187)](Object[_0x2e3f25(0x1b3)](_0x5a25ef)['length'],0x0)&&(_0x41d816[_0x2e3f25(0x14e)]=_0x5a25ef);await createUnconfiguredCloudProfile(_0x1ae65c,_0x41d816);try{setProfileOverride(process[_0x2e3f25(0x1a8)](),_0x1ae65c,_0x2e3f25(0x149),_0x42116d),setProfileOverride(process['cwd'](),_0x1ae65c,_0x2e3f25(0x16e),!![]);}catch(_0x47ae7a){console['error'](_0x2e3f25(0x17f)+(_0x47ae7a instanceof Error?_0x47ae7a[_0x2e3f25(0x193)]:String(_0x47ae7a)));}console[_0x2e3f25(0x130)]('✓\x20Cloud\x20profile\x20\x27'+_0x1ae65c+_0x2e3f25(0x14c)),await _0x3e0f7f['LhZYt'](sweepOrphansBestEffort,_0x1ae65c),await _0x3e0f7f['YctTj'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x158)]){const _0x4a8323={};_0x458502[_0x2e3f25(0x16b)]&&(_0x4a8323['baseUrl']=_0x458502[_0x2e3f25(0x16b)]);_0x3e0f7f['pLMNu'](Object['keys'](_0x5a25ef)[_0x2e3f25(0x170)],0x0)&&(_0x4a8323[_0x2e3f25(0x14e)]=_0x5a25ef);await _0x3e0f7f[_0x2e3f25(0x1af)](createUnconfiguredCloudProfile,_0x1ae65c,_0x4a8323),console['log']('✓\x20Profile\x20\x27'+_0x1ae65c+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1ae65c+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x1ae65c),await _0x3e0f7f['LOTsS'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x16b)]){const _0x4f20fc=_0x458502['url'],_0x3e7cb4=await checkUrlReachability(_0x4f20fc);if(!_0x3e7cb4['ok']&&!_0x458502['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x3e7cb4['ok']&&_0x458502['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x2e3f25(0x1a5)),console[_0x2e3f25(0x130)](_0x3e0f7f[_0x2e3f25(0x186)]);let _0x58e069='',_0x14af3c=![];while(!![]){const _0x4d7b31=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x3e0f7f['lQTER'],'name':'baseUrl','message':_0x14af3c?_0x3e0f7f['LIBjO']:_0x3e0f7f[_0x2e3f25(0x174)],'default':_0x58e069||'http://localhost:3000'}]);_0x58e069=_0x4d7b31[_0x2e3f25(0x151)];const _0x490fe7=await checkUrlReachability(_0x58e069);if(_0x490fe7['ok'])break;const _0x43a5f2=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x58e069),_0x132704=_0x490fe7[_0x2e3f25(0x1a2)]&&!_0x43a5f2,_0x331e11=_0x132704?_0x2e3f25(0x178)+_0x58e069:null;_0x14af3c=!![],console[_0x2e3f25(0x130)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x490fe7['error']);_0x331e11&&console[_0x2e3f25(0x130)]('\x20\x20Did\x20you\x20mean\x20'+_0x331e11+'?');const {action:_0x273c42}=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x2e3f25(0x171),'name':'action','message':_0x3e0f7f[_0x2e3f25(0x14d)],'choices':[..._0x331e11?[{'name':_0x2e3f25(0x137)+_0x331e11,'value':_0x2e3f25(0x152)}]:[],{'name':_0x3e0f7f[_0x2e3f25(0x13b)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x3e0f7f[_0x2e3f25(0x176)]}]}]);if(_0x3e0f7f[_0x2e3f25(0x146)](_0x273c42,_0x2e3f25(0x152))&&_0x331e11){_0x58e069=_0x331e11;const _0x4b3d9d=await _0x3e0f7f[_0x2e3f25(0x177)](checkUrlReachability,_0x58e069);if(_0x4b3d9d['ok'])break;console[_0x2e3f25(0x130)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x4b3d9d['error']);}else{if(_0x273c42===_0x2e3f25(0x1ae))break;}}_0x458502={..._0x458502,'url':_0x58e069};}let _0x5951e0=![];try{_0x5951e0=await tryAutoRouteCloudProfile(_0x1ae65c,_0x458502[_0x2e3f25(0x16b)],_0x458502,_0x46a2d2,_0x33c474);}catch(_0x1d796a){console[_0x2e3f25(0x179)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1ae65c+'\x22:\x20'+(_0x1d796a instanceof Error?_0x1d796a[_0x2e3f25(0x193)]:_0x3e0f7f['YctTj'](String,_0x1d796a))),process['exit'](0x1);}!_0x5951e0&&process[_0x2e3f25(0x16f)](0x1),await _0x3e0f7f[_0x2e3f25(0x1b1)](markActive,_0x1ae65c);}
1
+ const _0x3ece7a=_0x5a4c;(function(_0x52b8d4,_0x1b2907){const _0x317c4c=_0x5a4c,_0x4aee4f=_0x52b8d4();while(!![]){try{const _0x31fcf7=-parseInt(_0x317c4c(0x256))/0x1+parseInt(_0x317c4c(0x247))/0x2*(-parseInt(_0x317c4c(0x251))/0x3)+-parseInt(_0x317c4c(0x261))/0x4*(-parseInt(_0x317c4c(0x228))/0x5)+-parseInt(_0x317c4c(0x21c))/0x6*(parseInt(_0x317c4c(0x26b))/0x7)+-parseInt(_0x317c4c(0x20c))/0x8+parseInt(_0x317c4c(0x227))/0x9*(parseInt(_0x317c4c(0x21d))/0xa)+-parseInt(_0x317c4c(0x209))/0xb*(-parseInt(_0x317c4c(0x20b))/0xc);if(_0x31fcf7===_0x1b2907)break;else _0x4aee4f['push'](_0x4aee4f['shift']());}catch(_0xfbf38e){_0x4aee4f['push'](_0x4aee4f['shift']());}}}(_0x1ab8,0xab7a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x24b349 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=_0x3ece7a(0x230);function warnCloudProfileSharedInOrg(){const _0x4969b5=_0x3ece7a;if(!process['stdout'][_0x4969b5(0x205)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5d6bb2){const _0x8b68f8=_0x3ece7a,_0x1886d9={'lxkUG':function(_0x343f12,_0x56c90b,_0x1e5bca){return _0x343f12(_0x56c90b,_0x1e5bca);},'GUcUa':function(_0x3e0c3b,_0x189c91){return _0x3e0c3b(_0x189c91);},'Inqiy':function(_0x30017b,_0x508fc7){return _0x30017b<_0x508fc7;},'NiUSU':_0x8b68f8(0x270)};try{const _0x42aa90=new AbortController(),_0x4155d4=setTimeout(()=>_0x42aa90[_0x8b68f8(0x211)](),0x1388),_0x399b37={'method':'HEAD','signal':_0x42aa90['signal'],'redirect':_0x8b68f8(0x210)};/^https:\/\/localhost(:\d+)?/i[_0x8b68f8(0x262)](_0x5d6bb2)&&(process[_0x8b68f8(0x229)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4bd635=await _0x1886d9['lxkUG'](fetch,_0x5d6bb2,_0x399b37);delete process[_0x8b68f8(0x229)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1886d9[_0x8b68f8(0x1f1)](clearTimeout,_0x4155d4);if(_0x1886d9[_0x8b68f8(0x266)](_0x4bd635[_0x8b68f8(0x22c)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x8b68f8(0x1f7)+_0x4bd635['status']};}catch(_0x1e613f){delete process['env'][_0x8b68f8(0x250)];const _0x3a8f0b=_0x1e613f,_0x54ca2a=_0x3a8f0b['message']||String(_0x1e613f),_0x3d5200=_0x54ca2a['includes'](_0x8b68f8(0x225))||_0x3a8f0b['name']===_0x1886d9[_0x8b68f8(0x263)]||_0x54ca2a[_0x8b68f8(0x246)](_0x8b68f8(0x25f));return{'ok':![],'error':_0x54ca2a,'isProtocolError':_0x3d5200};}}function _0x1ab8(){const _0x4be5cb=['27056JMVOmA','test','NiUSU','⚠\x20Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','Inqiy','\x20Configured\x20envs:\x20','roGde','RQQwu','✓\x20Cloud\x20profile\x20\x27','10262PyERNL','wfujh','fvPOB','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','SUfOR','TypeError','\x27\x20created\x20(CDP).','tZXoj','GUcUa','indexOf','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','origin','IzHHt','keys','HTTP\x20','\x27\x20matching\x20','\x22:\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','retry','\x0a🌐\x20Profile\x20Setup\x0a','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','profile.add.autoRouteSkipped','slice','rPIXW','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','url','zQVtm','length','isTTY','\x27\x20to\x20the\x20cloud?','✓\x20Profile\x20\x27','capture','847uNpyAp','\x0a\x20\x20Auth\x20environment\x20\x22','496776hPoLeP','5404360gKSDAo','message','confirm','error','manual','abort','Could\x20not\x20reach\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','mtJIw','DLRou','no_auth_config','\x20--skip-auth\x0a','trackPhaseEnd','Use\x20','env_not_found','setupHeader','4938VaGBZg','15900lCsflx','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Found\x20auth\x20environment\x20\x27','skipAuth','pfvNC','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','ZKewH','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Invalid\x20URL','RRMFE','4572RKENka','190CjvpZj','env','\x27\x20created.\x0a','join','status','\x20(continuing\x20with\x20--force)','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20--url\x20','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','prompt','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20A\x20profile\x20named\x20\x22','cdpEndpoint','wFphM','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','exit','trim','http://localhost:3000','yZAjd','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Bncly','OsVRq','continue','dHUbQ','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','authEnv','includes','3118iPAIDA','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','force','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','jGvZZ','Enter\x20a\x20different\x20URL','cxpEU','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','NODE_TLS_REJECT_UNAUTHORIZED','2379pXKKMC','xhJkh','domains','vZBWs','HRJDn','431671AtYoRP','environments','YhyWg','log','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','GyWcB','TtOKx','\x0a\x20\x20Could\x20not\x20reach\x20','fetch\x20failed','\x0a\x20\x20(domains:\x20'];_0x1ab8=function(){return _0x4be5cb;};return _0x1ab8();}async function sweepOrphanLocalProfile(_0x37ee0f,_0x7e2144,_0x3de50f){const _0x31d918=_0x3ece7a,_0x44adbb={'ggzvj':'local','HIqHU':function(_0x2b54da,_0x3b30bc,_0x194673){return _0x2b54da(_0x3b30bc,_0x194673);},'Rfbvq':function(_0x24fc3d,_0x25b5ff){return _0x24fc3d(_0x25b5ff);},'DLRou':function(_0x55b58b,_0x47824d){return _0x55b58b(_0x47824d);}},_0x382f49=join(_0x7e2144,_0x44adbb['ggzvj']),_0x4d11f3=_0x44adbb['HIqHU'](join,_0x382f49,_0x37ee0f);existsSync(_0x4d11f3)&&(_0x3de50f&&await _0x44adbb['Rfbvq'](isPathGitTracked,_0x4d11f3)?console[_0x31d918(0x259)](_0x31d918(0x224)+_0x4d11f3+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x4d11f3,{'recursive':!![],'force':!![]}),console[_0x31d918(0x259)](_0x31d918(0x22e)+_0x4d11f3)));if(existsSync(_0x382f49)){let _0x3b6bd0=[];try{_0x3b6bd0=await _0x44adbb[_0x31d918(0x215)](readdir,_0x382f49);}catch{return;}const _0x2149c1='.tmp-'+_0x37ee0f+'-';for(const _0x47f44a of _0x3b6bd0){if(!_0x47f44a['startsWith'](_0x2149c1))continue;const _0x11bb59=join(_0x382f49,_0x47f44a);await rm(_0x11bb59,{'recursive':!![],'force':!![]}),console[_0x31d918(0x259)](_0x31d918(0x22e)+_0x11bb59);}}}async function sweepOrphansBestEffort(_0x2bba01){const _0x32d4f2=_0x3ece7a,_0x1fc9cb={'TtOKx':function(_0x2239c6){return _0x2239c6();},'GyWcB':function(_0x5a9d28){return _0x5a9d28();},'tmauq':function(_0x4151fc,_0x3092b8,_0x484ec3,_0x341565){return _0x4151fc(_0x3092b8,_0x484ec3,_0x341565);},'pfvNC':function(_0x14d1bf,_0x46b764){return _0x14d1bf(_0x46b764);}};try{await sweepOrphanLocalProfile(_0x2bba01,_0x1fc9cb[_0x32d4f2(0x25d)](getRangerHomeDir),![]);const _0x37e054=_0x1fc9cb[_0x32d4f2(0x25c)](getRangerDir);_0x37e054!==getRangerHomeDir()&&await _0x1fc9cb['tmauq'](sweepOrphanLocalProfile,_0x2bba01,_0x37e054,!![]);}catch(_0x58429b){console[_0x32d4f2(0x259)](_0x32d4f2(0x24a)+(_0x58429b instanceof Error?_0x58429b['message']:_0x1fc9cb[_0x32d4f2(0x221)](String,_0x58429b))+').');}}async function markActive(_0x35a316){const _0x11922e=_0x3ece7a;try{await writeActiveProfileName(_0x35a316),console[_0x11922e(0x259)]('\x20\x20Set\x20active\x20profile:\x20'+_0x35a316);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x23457c,_0x43d5be,_0x30b096,_0x7e0c1e,_0x4d81a3){const _0xf6d85b=_0x3ece7a,_0x520918={'QWdPv':function(_0x5662a3,_0x2d4bb3){return _0x5662a3===_0x2d4bb3;},'UbDtR':function(_0x3d4d19){return _0x3d4d19();},'vZBWs':_0xf6d85b(0x1fe),'ktVAR':'no_auth_config','KDdOH':function(_0x2998ce,_0x358b7c){return _0x2998ce instanceof _0x358b7c;},'ChsWX':function(_0x20a294,_0x554502){return _0x20a294(_0x554502);},'jGvZZ':function(_0x28af84,_0x22d198){return _0x28af84===_0x22d198;},'tZXoj':function(_0x2264e1,_0x5a2126){return _0x2264e1+_0x5a2126;},'YhyWg':function(_0x4453a0,_0x7f097e){return _0x4453a0+_0x7f097e;},'IzHHt':_0xf6d85b(0x23e),'HYjDY':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','omIKQ':function(_0x5ec320,_0x1145da,_0x4be00f){return _0x5ec320(_0x1145da,_0x4be00f);},'ultZU':'no_match','RRMFE':'saveToCloud','wfujh':'user_declined','nuTxK':function(_0x2845b2,_0x57aca7,_0x252d0d,_0x58c73e){return _0x2845b2(_0x57aca7,_0x252d0d,_0x58c73e);},'wQAdQ':function(_0x10fc10){return _0x10fc10();},'mtJIw':function(_0x45e3cc,_0x18266b){return _0x45e3cc instanceof _0x18266b;},'QvTMy':function(_0x2c8fb2,_0x5caea3){return _0x2c8fb2(_0x5caea3);}};let _0x5a1a1a;try{_0x5a1a1a=await _0x520918['UbDtR'](fetchAuthConfig);}catch(_0x393621){return _0x4d81a3?.['trackPhaseEnd'](_0x520918[_0xf6d85b(0x254)],{'reason':_0x520918['ktVAR'],'profileName':_0x23457c}),console[_0xf6d85b(0x20f)](_0xf6d85b(0x26e)+(_0x520918['KDdOH'](_0x393621,Error)?_0x393621['message']:_0x520918['ChsWX'](String,_0x393621))),![];}if((!_0x5a1a1a||!_0x5a1a1a[_0xf6d85b(0x257)]||_0x520918[_0xf6d85b(0x24b)](Object[_0xf6d85b(0x1f6)](_0x5a1a1a[_0xf6d85b(0x257)])[_0xf6d85b(0x204)],0x0))&&!_0x30b096[_0xf6d85b(0x245)]){if(_0x7e0c1e)return await captureEnvLessProfile(_0x23457c,_0x43d5be,_0x30b096,_0x4d81a3);return _0x4d81a3?.[_0xf6d85b(0x218)](_0xf6d85b(0x1fe),{'reason':_0xf6d85b(0x216),'profileName':_0x23457c}),console[_0xf6d85b(0x20f)](_0x520918[_0xf6d85b(0x1f0)](_0x520918['tZXoj'](_0x520918[_0xf6d85b(0x258)]('\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'+'\x0a'+_0x520918[_0xf6d85b(0x1f5)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x23457c+_0xf6d85b(0x22f)+_0x43d5be+_0xf6d85b(0x217)),'\x0a')+_0x520918['HYjDY'],_0xf6d85b(0x248))),![];}let _0x3bf2b1;if(_0x30b096[_0xf6d85b(0x245)]){if(!_0x5a1a1a?.[_0xf6d85b(0x257)]?.[_0x30b096[_0xf6d85b(0x245)]]){const _0x54b3df=Object['keys'](_0x5a1a1a?.[_0xf6d85b(0x257)]??{});return _0x4d81a3?.[_0xf6d85b(0x218)](_0x520918[_0xf6d85b(0x254)],{'reason':_0xf6d85b(0x21a),'profileName':_0x23457c}),console['error'](_0x520918['tZXoj'](_0xf6d85b(0x20a)+_0x30b096[_0xf6d85b(0x245)]+'\x22\x20not\x20found.',_0x54b3df[_0xf6d85b(0x204)]?_0xf6d85b(0x267)+_0x54b3df[_0xf6d85b(0x22b)](',\x20')+'.':_0xf6d85b(0x231))),![];}_0x3bf2b1=_0x30b096['authEnv'];}else _0x3bf2b1=_0x520918['omIKQ'](matchAuthEnvironment,_0x43d5be,_0x5a1a1a);if(!_0x3bf2b1)return _0x4d81a3?.['trackPhaseEnd'](_0x520918['vZBWs'],{'reason':_0x520918['ultZU'],'profileName':_0x23457c}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x43d5be+_0xf6d85b(0x24e)+Object[_0xf6d85b(0x1f6)](_0x5a1a1a?.[_0xf6d85b(0x257)]??{})['join'](',\x20')+'.'),![];const _0x1a28d6=_0x5a1a1a?.[_0xf6d85b(0x257)]?.[_0x3bf2b1],_0x38e880=_0x1a28d6?.[_0xf6d85b(0x253)]??[];if(_0x7e0c1e&&!_0x30b096[_0xf6d85b(0x25b)]){const {saveToCloud:_0x283c08}=await _0x24b349['prompt']([{'type':'confirm','name':_0x520918[_0xf6d85b(0x226)],'message':_0xf6d85b(0x21f)+_0x3bf2b1+_0xf6d85b(0x1f8)+_0x43d5be+_0xf6d85b(0x260)+_0x38e880['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x23457c+_0xf6d85b(0x206),'default':!![]}]);if(!_0x283c08)return _0x4d81a3?.['trackPhaseEnd'](_0x520918['vZBWs'],{'reason':_0x520918[_0xf6d85b(0x26c)],'profileName':_0x23457c}),console['error'](_0xf6d85b(0x1fa)),![];}const _0x47d911=_0x38e880['some'](_0x25d992=>{const _0x538596=_0xf6d85b;try{return _0x520918['QWdPv'](new URL(_0x25d992)['origin'],new URL(_0x43d5be)[_0x538596(0x1f4)]);}catch{return![];}}),_0xa9b3dd={};!_0x47d911&&(_0xa9b3dd['baseUrl']=_0x43d5be);try{await _0x520918['nuTxK'](createCloudProfile,_0x23457c,_0x3bf2b1,{'settings':_0xa9b3dd}),_0x520918['wQAdQ'](warnCloudProfileSharedInOrg);}catch(_0x3c44a3){if(_0x520918[_0xf6d85b(0x214)](_0x3c44a3,ApiError)&&_0x3c44a3[_0xf6d85b(0x22c)]===0x199){console['error'](_0xf6d85b(0x236)+_0x23457c+_0xf6d85b(0x244)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x23457c));throw _0x3c44a3;}throw _0x3c44a3;}return console[_0xf6d85b(0x259)](_0xf6d85b(0x207)+_0x23457c+_0xf6d85b(0x22a)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x23457c)),await _0x520918['QvTMy'](sweepOrphansBestEffort,_0x23457c),_0x4d81a3?.[_0xf6d85b(0x218)]('profile.add.autoRouted',{'envKey':_0x3bf2b1,'profileName':_0x23457c}),!![];}function _0x5a4c(_0x2d6f3d,_0xe33cb5){_0x2d6f3d=_0x2d6f3d-0x1f0;const _0x1ab811=_0x1ab8();let _0x5a4ce4=_0x1ab811[_0x2d6f3d];return _0x5a4ce4;}async function createUnconfiguredCloudProfile(_0x15e32f,_0x3eb410){const _0xeed991=_0x3ece7a,_0x40c3c0={'rPIXW':function(_0x48ebde,_0x426cad){return _0x48ebde instanceof _0x426cad;},'RQQwu':function(_0x248833,_0x2ba864){return _0x248833===_0x2ba864;},'ZkBec':function(_0x396cc2,_0x1d05c8){return _0x396cc2+_0x1d05c8;}};try{await createCloudProfile(_0x15e32f,undefined,{'settings':_0x3eb410}),warnCloudProfileSharedInOrg();}catch(_0x9b4e59){_0x40c3c0[_0xeed991(0x200)](_0x9b4e59,ApiError)&&_0x40c3c0[_0xeed991(0x269)](_0x9b4e59[_0xeed991(0x22c)],0x199)&&console['error'](_0x40c3c0['ZkBec'](_0xeed991(0x236)+_0x15e32f+_0xeed991(0x244),_0xeed991(0x21e)+_0x15e32f));throw _0x9b4e59;}}async function captureEnvLessProfile(_0x2b725a,_0x4506d9,_0x52a15f,_0x1e9ffd){const _0x33fbf6=_0x3ece7a,_0x19b6d6={'SUfOR':_0x33fbf6(0x20e),'ZKewH':_0x33fbf6(0x235),'roGde':function(_0x58f795,_0x3a1a15,_0x535b1c,_0x5bff5e){return _0x58f795(_0x3a1a15,_0x535b1c,_0x5bff5e);},'dgSuf':function(_0x41acf4,_0x1bbec3){return _0x41acf4 instanceof _0x1bbec3;},'RCSTa':function(_0x46c7b7,_0x2ef3b6){return _0x46c7b7===_0x2ef3b6;},'cxpEU':function(_0x3903b0,_0x18e18c,_0x59ba27){return _0x3903b0(_0x18e18c,_0x59ba27);},'dHUbQ':function(_0x241b2c,_0x2f359e){return _0x241b2c(_0x2f359e);},'yZAjd':'profile.add.autoRouted'};if(!_0x52a15f[_0x33fbf6(0x25b)]){const {capture:_0x4295ad}=await _0x24b349[_0x33fbf6(0x233)]([{'type':_0x19b6d6[_0x33fbf6(0x26f)],'name':_0x33fbf6(0x208),'message':_0x19b6d6[_0x33fbf6(0x223)],'default':!![]}]);if(!_0x4295ad)return _0x1e9ffd?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x2b725a}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x33fbf6(0x25a)),![];}const _0x56834e={};if(_0x52a15f[_0x33fbf6(0x21b)])for(const _0x101bdf of _0x52a15f['setupHeader']){const _0x240954=_0x101bdf['indexOf'](':');if(_0x240954===-0x1)continue;_0x56834e[_0x101bdf['slice'](0x0,_0x240954)['trim']()]=_0x101bdf[_0x33fbf6(0x1ff)](_0x240954+0x1)['trim']();}const _0x295405={'baseUrl':_0x4506d9};Object[_0x33fbf6(0x1f6)](_0x56834e)['length']>0x0&&(_0x295405['setupHeaders']=_0x56834e);let _0x168acd;try{_0x168acd=await _0x19b6d6[_0x33fbf6(0x268)](createCloudProfile,_0x2b725a,undefined,{'settings':_0x295405}),warnCloudProfileSharedInOrg();}catch(_0x381ad4){_0x19b6d6['dgSuf'](_0x381ad4,ApiError)&&_0x19b6d6['RCSTa'](_0x381ad4['status'],0x199)&&console[_0x33fbf6(0x20f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x2b725a+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x33fbf6(0x21e)+_0x2b725a));throw _0x381ad4;}return await _0x19b6d6[_0x33fbf6(0x24d)](manualBrowserLogin,_0x168acd,{'key':'','domains':[_0x4506d9],'setupHeaders':Object['keys'](_0x56834e)['length']>0x0?_0x56834e:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x2b725a+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2b725a)),await _0x19b6d6[_0x33fbf6(0x242)](sweepOrphansBestEffort,_0x2b725a),_0x1e9ffd?.['trackPhaseEnd'](_0x19b6d6[_0x33fbf6(0x23d)],{'envKey':null,'profileName':_0x2b725a}),!![];}export async function addEnv(_0x465e21,_0x3ee680={},_0xc26e05){const _0x5b2af3=_0x3ece7a,_0x4dc8c2={'bvDJi':function(_0x220f1e,_0x4fd16f){return _0x220f1e+_0x4fd16f;},'fvPOB':function(_0x40559a,_0x18a70c){return _0x40559a+_0x18a70c;},'wFphM':function(_0x203217,_0x335ec5){return _0x203217+_0x335ec5;},'DRjio':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','Bncly':_0x5b2af3(0x222),'ggznw':_0x5b2af3(0x239),'mFRbw':function(_0x457fde){return _0x457fde();},'JaKvz':_0x5b2af3(0x1f3),'AOdLy':function(_0x1f051b,_0x442326){return _0x1f051b>_0x442326;},'TSSKs':function(_0x5e0c8,_0x541163,_0x534cec){return _0x5e0c8(_0x541163,_0x534cec);},'BxfDk':'cdpEndpoint','zQVtm':function(_0x20ed82,_0x5a2d8d){return _0x20ed82(_0x5a2d8d);},'zIyBz':_0x5b2af3(0x1fc),'GVziQ':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','OsVRq':_0x5b2af3(0x243),'HRJDn':'use_suggestion','ItiWq':_0x5b2af3(0x24c),'vztRi':_0x5b2af3(0x1fb),'YoeAR':function(_0x58e09e,_0x479967){return _0x58e09e===_0x479967;},'lBfcI':function(_0x1efecb,_0x3d18e7){return _0x1efecb(_0x3d18e7);},'xhJkh':_0x5b2af3(0x241),'NVNDC':function(_0x39b205,_0x2ffaa5,_0x2a2b35,_0x1ed748,_0x2979a6,_0x36fcdc){return _0x39b205(_0x2ffaa5,_0x2a2b35,_0x1ed748,_0x2979a6,_0x36fcdc);}};_0x3ee680['ci']&&(console['error'](_0x4dc8c2['bvDJi'](_0x4dc8c2[_0x5b2af3(0x26d)](_0x4dc8c2[_0x5b2af3(0x238)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a',_0x4dc8c2['DRjio'])+_0x5b2af3(0x232),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x5b2af3(0x23a)](0x1));const _0x4da3dc={};if(_0x3ee680[_0x5b2af3(0x21b)])for(const _0x554447 of _0x3ee680[_0x5b2af3(0x21b)]){const _0x145b3c=_0x554447[_0x5b2af3(0x1f2)](':');if(_0x145b3c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x554447+_0x5b2af3(0x234));const _0x1323c9=_0x554447[_0x5b2af3(0x1ff)](0x0,_0x145b3c)[_0x5b2af3(0x23b)](),_0x3e66dc=_0x554447['slice'](_0x145b3c+0x1)['trim']();_0x4da3dc[_0x1323c9]=_0x3e66dc;}if(_0x3ee680['cdpEndpoint']!==undefined&&_0x3ee680['cdpEndpoint'][_0x5b2af3(0x23b)]()==='')throw new Error(_0x4dc8c2[_0x5b2af3(0x23f)]);if(_0x3ee680['cdpEndpoint']&&_0x3ee680[_0x5b2af3(0x202)])throw new Error(_0x5b2af3(0x1fd));if(_0x3ee680[_0x5b2af3(0x245)]&&_0x3ee680[_0x5b2af3(0x220)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x3ee680['authEnv']&&_0x3ee680['cdpEndpoint'])throw new Error(_0x4dc8c2['ggznw']);const _0x46af0a=Boolean(_0x3ee680['cdpEndpoint']),_0x2cc7cf=_0x4dc8c2['mFRbw'](isInteractive);if(!_0x2cc7cf&&!_0x3ee680['url']&&!_0x46af0a&&!_0x3ee680[_0x5b2af3(0x220)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x46af0a){const _0x4296ac=_0x3ee680[_0x5b2af3(0x237)];console[_0x5b2af3(0x259)](_0x4dc8c2['JaKvz']),console['log'](_0x5b2af3(0x24f)+_0x4296ac);const _0x28875e={'cdpEndpoint':_0x4296ac,'isElectron':!![]};_0x4dc8c2['AOdLy'](Object[_0x5b2af3(0x1f6)](_0x4da3dc)[_0x5b2af3(0x204)],0x0)&&(_0x28875e['setupHeaders']=_0x4da3dc);await _0x4dc8c2['TSSKs'](createUnconfiguredCloudProfile,_0x465e21,_0x28875e);try{setProfileOverride(process['cwd'](),_0x465e21,_0x4dc8c2['BxfDk'],_0x4296ac),setProfileOverride(process['cwd'](),_0x465e21,'isElectron',!![]);}catch(_0x54feed){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x54feed instanceof Error?_0x54feed['message']:_0x4dc8c2[_0x5b2af3(0x203)](String,_0x54feed)));}console[_0x5b2af3(0x259)](_0x5b2af3(0x26a)+_0x465e21+_0x5b2af3(0x271)),await _0x4dc8c2[_0x5b2af3(0x203)](sweepOrphansBestEffort,_0x465e21),await markActive(_0x465e21);return;}if(_0x3ee680[_0x5b2af3(0x220)]){const _0x27f0e9={};_0x3ee680['url']&&(_0x27f0e9['baseUrl']=_0x3ee680[_0x5b2af3(0x202)]);Object[_0x5b2af3(0x1f6)](_0x4da3dc)[_0x5b2af3(0x204)]>0x0&&(_0x27f0e9['setupHeaders']=_0x4da3dc);await createUnconfiguredCloudProfile(_0x465e21,_0x27f0e9),console['log']('✓\x20Profile\x20\x27'+_0x465e21+'\x27\x20created\x20(no\x20session).\x0a'+(_0x5b2af3(0x213)+_0x465e21+'`\x20again\x20without\x20--skip-auth.')),await _0x4dc8c2[_0x5b2af3(0x203)](sweepOrphansBestEffort,_0x465e21),await _0x4dc8c2[_0x5b2af3(0x203)](markActive,_0x465e21);return;}if(_0x3ee680[_0x5b2af3(0x202)]){const _0x53db48=_0x3ee680['url'],_0x306aa8=await _0x4dc8c2[_0x5b2af3(0x203)](checkUrlReachability,_0x53db48);if(!_0x306aa8['ok']&&!_0x3ee680[_0x5b2af3(0x249)])throw new Error(_0x5b2af3(0x212)+_0x53db48+':\x20'+_0x306aa8['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x306aa8['ok']&&_0x3ee680['force']&&console[_0x5b2af3(0x259)](_0x5b2af3(0x264)+_0x53db48+':\x20'+_0x306aa8[_0x5b2af3(0x20f)]+_0x5b2af3(0x22d));}else{console[_0x5b2af3(0x259)](_0x4dc8c2['zIyBz']),console['log'](_0x4dc8c2['GVziQ']),console[_0x5b2af3(0x259)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x4bb42e='',_0x2d6f8e=![];while(!![]){const _0x6f7334=await _0x24b349[_0x5b2af3(0x233)]([{'type':'input','name':'baseUrl','message':_0x2d6f8e?_0x5b2af3(0x265):_0x4dc8c2[_0x5b2af3(0x240)],'default':_0x4bb42e||_0x5b2af3(0x23c)}]);_0x4bb42e=_0x6f7334['baseUrl'];const _0x4e121b=await checkUrlReachability(_0x4bb42e);if(_0x4e121b['ok'])break;const _0x5f46fc=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x4bb42e),_0x338a58=_0x4e121b['isProtocolError']&&!_0x5f46fc,_0x3db199=_0x338a58?'http://'+_0x4bb42e:null;_0x2d6f8e=!![],console['log'](_0x5b2af3(0x25e)+_0x4bb42e+':\x20'+_0x4e121b[_0x5b2af3(0x20f)]);_0x3db199&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3db199+'?');const {action:_0x4e5830}=await _0x24b349[_0x5b2af3(0x233)]([{'type':'list','name':'action','message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x3db199?[{'name':_0x5b2af3(0x219)+_0x3db199,'value':_0x4dc8c2[_0x5b2af3(0x255)]}]:[],{'name':_0x4dc8c2['ItiWq'],'value':_0x4dc8c2['vztRi']},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x4dc8c2['YoeAR'](_0x4e5830,'use_suggestion')&&_0x3db199){_0x4bb42e=_0x3db199;const _0x94a79f=await _0x4dc8c2['lBfcI'](checkUrlReachability,_0x4bb42e);if(_0x94a79f['ok'])break;console[_0x5b2af3(0x259)](_0x5b2af3(0x201)+_0x4bb42e+':\x20'+_0x94a79f[_0x5b2af3(0x20f)]);}else{if(_0x4e5830===_0x4dc8c2[_0x5b2af3(0x252)])break;}}_0x3ee680={..._0x3ee680,'url':_0x4bb42e};}let _0x418c80=![];try{_0x418c80=await _0x4dc8c2['NVNDC'](tryAutoRouteCloudProfile,_0x465e21,_0x3ee680[_0x5b2af3(0x202)],_0x3ee680,_0x2cc7cf,_0xc26e05);}catch(_0x316dbe){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x465e21+_0x5b2af3(0x1f9)+(_0x316dbe instanceof Error?_0x316dbe[_0x5b2af3(0x20d)]:String(_0x316dbe))),process[_0x5b2af3(0x23a)](0x1);}!_0x418c80&&process['exit'](0x1),await _0x4dc8c2[_0x5b2af3(0x203)](markActive,_0x465e21);}
@@ -1 +1 @@
1
- (function(_0x3fddb5,_0x156d9f){var _0x2bd0c4=_0x21b6,_0xdce481=_0x3fddb5();while(!![]){try{var _0x5e5189=-parseInt(_0x2bd0c4(0x123))/0x1+-parseInt(_0x2bd0c4(0x11a))/0x2+parseInt(_0x2bd0c4(0x119))/0x3+-parseInt(_0x2bd0c4(0x11f))/0x4*(parseInt(_0x2bd0c4(0x11c))/0x5)+-parseInt(_0x2bd0c4(0x125))/0x6+-parseInt(_0x2bd0c4(0x118))/0x7+parseInt(_0x2bd0c4(0x11e))/0x8;if(_0x5e5189===_0x156d9f)break;else _0xdce481['push'](_0xdce481['shift']());}catch(_0x23bace){_0xdce481['push'](_0xdce481['shift']());}}}(_0x4ddb,0xc61ea));function _0x4ddb(){var _0x2551a0=['9332ilOvAI','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','exit','1557499cWvXwK','\x20\x20https://docs.ranger.net/main/concepts/profiles','1462446wmbJdl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','7595476ssljZb','2566641pezcWD','2007078pOiiSv','mymwU','155fZyIuc','Rvwhc','31344968szkGDY'];_0x4ddb=function(){return _0x2551a0;};return _0x4ddb();}function _0x21b6(_0x888a46,_0x26874a){_0x888a46=_0x888a46-0x117;var _0x4ddb03=_0x4ddb();var _0x21b6bd=_0x4ddb03[_0x888a46];return _0x21b6bd;}export async function authEncrypt(_0x7ff074){var _0x404969=_0x21b6,_0x3be018={'Rvwhc':function(_0x5506a1,_0x593a0b){return _0x5506a1+_0x593a0b;},'mymwU':_0x404969(0x117),'kCRxZ':_0x404969(0x120)};console['error'](_0x3be018[_0x404969(0x11d)](_0x3be018[_0x404969(0x11d)](_0x3be018['Rvwhc'](_0x3be018[_0x404969(0x11b)],_0x3be018['kCRxZ'])+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x404969(0x121),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x404969(0x124)),process[_0x404969(0x122)](0x1);}
1
+ (function(_0x4e683c,_0x2b8be7){var _0x3b343d=_0x4ea8,_0x5cf063=_0x4e683c();while(!![]){try{var _0x57234d=parseInt(_0x3b343d(0x17b))/0x1*(-parseInt(_0x3b343d(0x178))/0x2)+parseInt(_0x3b343d(0x17a))/0x3+parseInt(_0x3b343d(0x181))/0x4+parseInt(_0x3b343d(0x182))/0x5+-parseInt(_0x3b343d(0x187))/0x6*(-parseInt(_0x3b343d(0x186))/0x7)+-parseInt(_0x3b343d(0x17e))/0x8*(-parseInt(_0x3b343d(0x17c))/0x9)+-parseInt(_0x3b343d(0x188))/0xa*(parseInt(_0x3b343d(0x183))/0xb);if(_0x57234d===_0x2b8be7)break;else _0x5cf063['push'](_0x5cf063['shift']());}catch(_0x4da68a){_0x5cf063['push'](_0x5cf063['shift']());}}}(_0x1a78,0x227fc));function _0x1a78(){var _0x2850cf=['428994VIvrAN','3NjjfeE','9beupLQ','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','818256atfoSL','gYiio','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','223132wbzAnp','1223265bPuZUz','4785704eejgtI','error','XGmHX','1398614LMAsSp','6LVtqTa','10qngPTO','exit','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','112764QAOfqF','SGWBl'];_0x1a78=function(){return _0x2850cf;};return _0x1a78();}function _0x4ea8(_0x535da2,_0x438d6c){_0x535da2=_0x535da2-0x178;var _0x1a781c=_0x1a78();var _0x4ea894=_0x1a781c[_0x535da2];return _0x4ea894;}export async function authEncrypt(_0x5fbc60){var _0x3386be=_0x4ea8,_0x22dc40={'SGWBl':function(_0x1d3707,_0x12bb50){return _0x1d3707+_0x12bb50;},'HCIIZ':_0x3386be(0x180),'XGmHX':_0x3386be(0x17d),'kjnMv':_0x3386be(0x18a),'gYiio':_0x3386be(0x18b)};console[_0x3386be(0x184)](_0x22dc40[_0x3386be(0x179)](_0x22dc40[_0x3386be(0x179)](_0x22dc40['HCIIZ']+_0x22dc40[_0x3386be(0x185)]+'\x0a'+_0x22dc40['kjnMv'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+_0x22dc40[_0x3386be(0x17f)],'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x3386be(0x189)](0x1);}
@@ -1 +1 @@
1
- const _0x16243c=_0x553d;(function(_0x723264,_0x2fae8f){const _0x17ddcb=_0x553d,_0x52babc=_0x723264();while(!![]){try{const _0x4ec83b=-parseInt(_0x17ddcb(0x1f4))/0x1*(parseInt(_0x17ddcb(0x1fb))/0x2)+-parseInt(_0x17ddcb(0x1e4))/0x3*(parseInt(_0x17ddcb(0x208))/0x4)+parseInt(_0x17ddcb(0x20d))/0x5*(parseInt(_0x17ddcb(0x1f7))/0x6)+-parseInt(_0x17ddcb(0x209))/0x7+parseInt(_0x17ddcb(0x205))/0x8+-parseInt(_0x17ddcb(0x1f5))/0x9+parseInt(_0x17ddcb(0x20b))/0xa*(parseInt(_0x17ddcb(0x1ec))/0xb);if(_0x4ec83b===_0x2fae8f)break;else _0x52babc['push'](_0x52babc['shift']());}catch(_0x43aceb){_0x52babc['push'](_0x52babc['shift']());}}}(_0x5acb,0x49ba3));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x553d(_0x1bec0c,_0x26a7fc){_0x1bec0c=_0x1bec0c-0x1e1;const _0x5acb21=_0x5acb();let _0x553d6d=_0x5acb21[_0x1bec0c];return _0x553d6d;}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';function _0x5acb(){const _0x1e5f16=['log','49330rpvPjP','819828meHMKb','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','164046WvuvUP','ehbEf','--scope','PFKee','22Qaqzfs','XEgLK','ranger','xMiwG','Nothing\x20to\x20clean\x20up.\x0a','uninstall','rcuXT','qoUXH','replace','Abfyl','1733800RZSPXt','win32','error','8TTijXs','2245957olMWfy','kzstw','20CUHdZQ','Qfnxi','15ENOmAq','user','length','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOfyJ','GUcYx','UbPZj','nlECJ','close','ignore','mClfx','✓\x20Removed\x20project\x20skill:\x20','plugin','MELgN','fFbsT','816537qglzXo','HYMYf','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WADJn','claude','✓\x20Removed\x20.ranger/\x20directory','OaJSP','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','8261935CdkzZf','push','zJJBL','stringify','IjBvc','KFNUH','EfbEY'];_0x5acb=function(){return _0x1e5f16;};return _0x5acb();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x16243c(0x1fd),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3ab0f3){const _0x5757d0=_0x16243c,_0x51dfdc=_0x3ab0f3[_0x5757d0(0x203)](/\/\*[\s\S]*?\*\//g,''),_0x9864b1=_0x51dfdc['replace'](/^\s*\/\/.*$/gm,''),_0x3373a0=_0x9864b1[_0x5757d0(0x203)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x3373a0);}async function removeOpencodePluginConfig(_0x4aa928){const _0x223218=_0x16243c,_0x562e6c={'kYUlk':function(_0x157cbe,_0xbdceb1){return _0x157cbe!==_0xbdceb1;},'EfbEY':function(_0x429b67,_0x55c236){return _0x429b67(_0x55c236);},'xDrFu':function(_0x4f0c9f,_0x53531b){return _0x4f0c9f===_0x53531b;},'Abfyl':function(_0x24d83b,_0x3d2804,_0x53abc4){return _0x24d83b(_0x3d2804,_0x53abc4);},'IjBvc':function(_0x14b8b2,_0x2b8ff1){return _0x14b8b2+_0x2b8ff1;}};if(!_0x562e6c[_0x223218(0x1f2)](existsSync,_0x4aa928))return![];let _0x26a9c0;try{const _0xf9bb88=await readFile(_0x4aa928,'utf-8');_0x26a9c0=parseJsonc(_0xf9bb88);}catch{return![];}const _0x1c535b=Array['isArray'](_0x26a9c0[_0x223218(0x1e1)])?_0x26a9c0[_0x223218(0x1e1)]:[];if(_0x562e6c['xDrFu'](_0x1c535b[_0x223218(0x20f)],0x0))return![];const _0x5ecdc9=_0x1c535b['filter'](_0x43eb34=>{if(typeof _0x43eb34!=='string')return!![];return _0x562e6c['kYUlk'](_0x43eb34,opencodePluginName);});if(_0x562e6c['xDrFu'](_0x5ecdc9['length'],_0x1c535b['length']))return![];return _0x562e6c['xDrFu'](_0x5ecdc9[_0x223218(0x20f)],0x0)?delete _0x26a9c0['plugin']:_0x26a9c0[_0x223218(0x1e1)]=_0x5ecdc9,await _0x562e6c[_0x223218(0x204)](writeFile,_0x4aa928,_0x562e6c[_0x223218(0x1f0)](JSON[_0x223218(0x1ef)](_0x26a9c0,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3c58b1){const _0x405917=_0x16243c,_0x2e0e66={'GUcYx':'plugin','fFbsT':_0x405917(0x200),'kzstw':'ranger@trailhead','incEC':_0x405917(0x1e8),'ixcFS':_0x405917(0x216),'CFzYQ':function(_0x231655){return _0x231655();},'HYMYf':_0x405917(0x206),'knERL':_0x405917(0x215)};return new Promise(_0x43d0e3=>{const _0x5cd32c=_0x405917,_0x3c0620=[_0x2e0e66[_0x5cd32c(0x212)],_0x2e0e66[_0x5cd32c(0x1e3)],_0x2e0e66[_0x5cd32c(0x20a)]];_0x3c58b1&&_0x3c0620[_0x5cd32c(0x1ed)](_0x5cd32c(0x1f9),_0x3c58b1);const _0x1ea966=spawn(_0x2e0e66['incEC'],_0x3c0620,{'stdio':[_0x2e0e66['ixcFS'],_0x2e0e66['ixcFS'],_0x5cd32c(0x216)],'cwd':_0x3c58b1?_0x2e0e66['CFzYQ'](getProjectRoot):undefined,'shell':process['platform']===_0x2e0e66[_0x5cd32c(0x1e5)]});_0x1ea966['on'](_0x2e0e66['knERL'],_0x3bce51=>{_0x43d0e3(_0x3bce51===0x0);}),_0x1ea966['on'](_0x5cd32c(0x207),()=>{_0x43d0e3(![]);});});}async function removeMarketplace(){const _0x58896a={'OaJSP':function(_0x4dbb1b,_0x50cf6e){return _0x4dbb1b===_0x50cf6e;},'GLLvd':'claude','MELgN':'marketplace','yvbLs':'remove','KFNUH':'trailhead','hpEnt':'ignore','nlECJ':'close'};return new Promise(_0x585dbd=>{const _0x2b95fa=_0x553d,_0x32e271=spawn(_0x58896a['GLLvd'],['plugin',_0x58896a[_0x2b95fa(0x1e2)],_0x58896a['yvbLs'],_0x58896a[_0x2b95fa(0x1f1)]],{'stdio':['ignore',_0x2b95fa(0x216),_0x58896a['hpEnt']],'shell':_0x58896a['OaJSP'](process['platform'],_0x2b95fa(0x206))});_0x32e271['on'](_0x58896a[_0x2b95fa(0x214)],_0x211fd3=>{const _0x3d537b=_0x2b95fa;_0x585dbd(_0x58896a[_0x3d537b(0x1ea)](_0x211fd3,0x0));}),_0x32e271['on'](_0x2b95fa(0x207),()=>{_0x585dbd(![]);});});}export async function clean(){const _0x4c0c56=_0x16243c,_0x1ea0d8={'jUUeI':_0x4c0c56(0x1e6),'zJJBL':function(_0x51ff13){return _0x51ff13();},'Qfnxi':function(_0x1cb9e2){return _0x1cb9e2();},'ehbEf':function(_0xcdcaca,_0x37a0fe){return _0xcdcaca(_0x37a0fe);},'TOfyJ':function(_0x307f57,_0x33fa13,_0x40e84e){return _0x307f57(_0x33fa13,_0x40e84e);},'UbPZj':_0x4c0c56(0x1e9),'WADJn':function(_0x38766a,_0x4317d7,_0x24ad94){return _0x38766a(_0x4317d7,_0x24ad94);},'rcuXT':'project','tbVRC':_0x4c0c56(0x20e),'qoUXH':function(_0x4c4466,_0x600434){return _0x4c4466(_0x600434);},'QoJcD':function(_0x1d36a0,_0x430cfc,_0x44ee12){return _0x1d36a0(_0x430cfc,_0x44ee12);},'XEgLK':function(_0x3241c5,_0x3c15cb){return _0x3241c5(_0x3c15cb);},'PFKee':_0x4c0c56(0x210),'xMiwG':'opencode.json','Srjhu':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','mClfx':_0x4c0c56(0x1f6),'FyXzF':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x4c0c56(0x1f3)](_0x1ea0d8['jUUeI']);let _0x2a963f=![];try{await deleteAllCredentials(),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x2a963f=!![];}catch{}const _0x151139=_0x1ea0d8[_0x4c0c56(0x1ee)](getCacheFile);existsSync(_0x151139)&&(await rm(_0x151139),_0x2a963f=!![]);const _0x1a5b13=_0x1ea0d8[_0x4c0c56(0x20c)](getRangerDir);_0x1ea0d8[_0x4c0c56(0x1f8)](existsSync,_0x1a5b13)&&(await _0x1ea0d8['TOfyJ'](rm,_0x1a5b13,{'recursive':!![]}),console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x213)]),_0x2a963f=!![]);const _0x155707=getProjectSkillsDir();for(const _0x5107f1 of skillsToRemove){const _0x36eb61=join(_0x155707,_0x5107f1);existsSync(_0x36eb61)&&(await _0x1ea0d8[_0x4c0c56(0x1e7)](rm,_0x36eb61,{'recursive':!![]}),console['log'](_0x4c0c56(0x218)+_0x5107f1),_0x2a963f=!![]);}const _0x1a5d3c=_0x1ea0d8[_0x4c0c56(0x1ee)](getUserSkillsDir);for(const _0x5ae4e1 of skillsToRemove){const _0x1385d1=_0x1ea0d8['TOfyJ'](join,_0x1a5d3c,_0x5ae4e1);existsSync(_0x1385d1)&&(await rm(_0x1385d1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5ae4e1),_0x2a963f=!![]);}const _0x1d2d66=getOpencodeSkillsDir(_0x1ea0d8[_0x4c0c56(0x201)]);for(const _0x14ca82 of skillsToRemove){const _0x249432=_0x1ea0d8['TOfyJ'](join,_0x1d2d66,_0x14ca82);existsSync(_0x249432)&&(await rm(_0x249432,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x14ca82),_0x2a963f=!![]);}const _0x334fd0=getOpencodeSkillsDir(_0x1ea0d8['tbVRC']);for(const _0x1134f0 of skillsToRemove){const _0x2e537d=join(_0x334fd0,_0x1134f0);_0x1ea0d8[_0x4c0c56(0x202)](existsSync,_0x2e537d)&&(await _0x1ea0d8['QoJcD'](rm,_0x2e537d,{'recursive':!![]}),console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x1134f0),_0x2a963f=!![]);}const _0x2b2b5f=join(_0x1ea0d8[_0x4c0c56(0x1fc)](getOpencodeConfigDir,_0x1ea0d8['rcuXT']),'opencode.json');await _0x1ea0d8[_0x4c0c56(0x1f8)](removeOpencodePluginConfig,_0x2b2b5f)&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x1fa)]),_0x2a963f=!![]);const _0x597674=_0x1ea0d8[_0x4c0c56(0x211)](join,_0x1ea0d8['XEgLK'](getOpencodeConfigDir,_0x4c0c56(0x20e)),_0x1ea0d8[_0x4c0c56(0x1fe)]);await _0x1ea0d8['ehbEf'](removeOpencodePluginConfig,_0x597674)&&(console['log'](_0x1ea0d8['Srjhu']),_0x2a963f=!![]);const _0x47565b=await uninstallClaudePlugin();_0x47565b&&(console[_0x4c0c56(0x1f3)](_0x4c0c56(0x1eb)),_0x2a963f=!![]);const _0x301614=await uninstallClaudePlugin(_0x1ea0d8['rcuXT']);_0x301614&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x217)]),_0x2a963f=!![]);const _0x1c004c=await _0x1ea0d8['zJJBL'](removeMarketplace);_0x1c004c&&(console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x2a963f=!![]),_0x2a963f?console['log'](_0x1ea0d8['FyXzF']):console['log'](_0x4c0c56(0x1ff));}
1
+ const _0x305f73=_0x3767;(function(_0xbf701f,_0xf1944b){const _0xd749de=_0x3767,_0x327f8f=_0xbf701f();while(!![]){try{const _0x163f67=parseInt(_0xd749de(0xe1))/0x1+-parseInt(_0xd749de(0xc5))/0x2+parseInt(_0xd749de(0xe7))/0x3*(parseInt(_0xd749de(0xdd))/0x4)+-parseInt(_0xd749de(0xdc))/0x5*(-parseInt(_0xd749de(0xe5))/0x6)+parseInt(_0xd749de(0xd8))/0x7+parseInt(_0xd749de(0xde))/0x8*(-parseInt(_0xd749de(0xdb))/0x9)+-parseInt(_0xd749de(0xbd))/0xa;if(_0x163f67===_0xf1944b)break;else _0x327f8f['push'](_0x327f8f['shift']());}catch(_0x2ed8b3){_0x327f8f['push'](_0x327f8f['shift']());}}}(_0x2275,0x5ccd6));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=['ranger',_0x305f73(0xcb),'bug-bash','e2e-test-recommender'],opencodePluginName=_0x305f73(0xd5);function parseJsonc(_0x4e9f2b){const _0x4a61ca=_0x305f73,_0x537b3d=_0x4e9f2b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4e0fdf=_0x537b3d[_0x4a61ca(0xd1)](/^\s*\/\/.*$/gm,''),_0x29a751=_0x4e0fdf[_0x4a61ca(0xd1)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x29a751);}function _0x3767(_0x545367,_0x5f5cbf){_0x545367=_0x545367-0xb7;const _0x22750d=_0x2275();let _0x3767f3=_0x22750d[_0x545367];return _0x3767f3;}async function removeOpencodePluginConfig(_0x3e15a3){const _0x17dd55=_0x305f73,_0x51d36a={'sWaNC':_0x17dd55(0xce),'EZDor':function(_0x45a4b4,_0x14e5be){return _0x45a4b4!==_0x14e5be;},'raIxJ':function(_0x4d68f0,_0x457d94){return _0x4d68f0(_0x457d94);},'ouOll':function(_0x200f6c,_0x154cf0){return _0x200f6c===_0x154cf0;}};if(!existsSync(_0x3e15a3))return![];let _0x5d7d7f;try{const _0x5d5397=await readFile(_0x3e15a3,_0x17dd55(0xc9));_0x5d7d7f=_0x51d36a['raIxJ'](parseJsonc,_0x5d5397);}catch{return![];}const _0x4d6fba=Array['isArray'](_0x5d7d7f[_0x17dd55(0xe6)])?_0x5d7d7f[_0x17dd55(0xe6)]:[];if(_0x4d6fba[_0x17dd55(0xd9)]===0x0)return![];const _0x519620=_0x4d6fba['filter'](_0x2c7598=>{const _0x1cd5e9=_0x17dd55;if(typeof _0x2c7598!==_0x51d36a['sWaNC'])return!![];return _0x51d36a[_0x1cd5e9(0xda)](_0x2c7598,opencodePluginName);});if(_0x51d36a['ouOll'](_0x519620[_0x17dd55(0xd9)],_0x4d6fba[_0x17dd55(0xd9)]))return![];return _0x519620[_0x17dd55(0xd9)]===0x0?delete _0x5d7d7f[_0x17dd55(0xe6)]:_0x5d7d7f['plugin']=_0x519620,await writeFile(_0x3e15a3,JSON['stringify'](_0x5d7d7f,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5d0f27){const _0xc56f93=_0x305f73,_0x1b5ea6={'ykLdA':function(_0x393b42,_0x34517c){return _0x393b42===_0x34517c;},'VfJgR':function(_0x4c9f45,_0x5ec9ab){return _0x4c9f45(_0x5ec9ab);},'DBhJU':_0xc56f93(0xe6),'EHYXM':'uninstall','nqVXi':function(_0x24ec33,_0x134838,_0x341dbf,_0x4ec27a){return _0x24ec33(_0x134838,_0x341dbf,_0x4ec27a);},'WFXpe':'claude','spWfr':'ignore','WuvUE':'win32'};return new Promise(_0x29a951=>{const _0xbd92c0=_0xc56f93,_0x4b9771={'ziuib':function(_0x4284d6,_0x289cc9){const _0x5f175a=_0x3767;return _0x1b5ea6[_0x5f175a(0xbf)](_0x4284d6,_0x289cc9);},'qgiUs':function(_0x294c27,_0x319860){return _0x1b5ea6['VfJgR'](_0x294c27,_0x319860);}},_0x3b07ad=[_0x1b5ea6[_0xbd92c0(0xd3)],_0x1b5ea6['EHYXM'],_0xbd92c0(0xea)];_0x5d0f27&&_0x3b07ad['push']('--scope',_0x5d0f27);const _0x552b75=_0x1b5ea6['nqVXi'](spawn,_0x1b5ea6['WFXpe'],_0x3b07ad,{'stdio':['ignore',_0x1b5ea6[_0xbd92c0(0xdf)],_0xbd92c0(0xc0)],'cwd':_0x5d0f27?getProjectRoot():undefined,'shell':process['platform']===_0x1b5ea6[_0xbd92c0(0xbb)]});_0x552b75['on'](_0xbd92c0(0xe8),_0x1b65a1=>{const _0x12ae01=_0xbd92c0;_0x29a951(_0x4b9771[_0x12ae01(0xd2)](_0x1b65a1,0x0));}),_0x552b75['on']('error',()=>{_0x4b9771['qgiUs'](_0x29a951,![]);});});}function _0x2275(){const _0x12fc5d=['✓\x20Removed\x20trailhead\x20marketplace','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','string','log','opencode.json','replace','ziuib','DBhJU','trailhead','@ranger-testing/opencode-plugin','tmRBP','KLnky','1963143SbXTgd','length','EZDor','171aMGBZS','20RYDfHy','1432388cQqIFI','25448YwaRIT','spWfr','TtFJV','484940iPZvwb','✓\x20Removed\x20.ranger/\x20directory','JrYYk','vZkVM','1123602cTmvSG','plugin','3iPviJL','close','rmZQH','ranger@trailhead','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','GWVdZ','Nothing\x20to\x20clean\x20up.\x0a','remove','qmPIB','WuvUE','\x0a✅\x20Cleanup\x20complete!\x0a','9190190CCcJIs','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ykLdA','ignore','user','marketplace','XblTD','yEwto','1025956ndlslD','JZojn','project','fdkDw','utf-8','LGtDx','feature-tracker'];_0x2275=function(){return _0x12fc5d;};return _0x2275();}async function removeMarketplace(){const _0x42a4c4=_0x305f73,_0x243a07={'GWVdZ':function(_0x5456ea,_0xdf5476,_0x4b7f36,_0x2f9e3b){return _0x5456ea(_0xdf5476,_0x4b7f36,_0x2f9e3b);},'KLnky':_0x42a4c4(0xc2),'LGtDx':_0x42a4c4(0xc0),'cYBBI':function(_0x322f79,_0x252dae){return _0x322f79===_0x252dae;},'JZojn':'close','CZGhp':'error'};return new Promise(_0x4619c5=>{const _0x4c84a0=_0x42a4c4,_0x5531d9=_0x243a07[_0x4c84a0(0xb7)](spawn,'claude',[_0x4c84a0(0xe6),_0x243a07[_0x4c84a0(0xd7)],_0x4c84a0(0xb9),_0x4c84a0(0xd4)],{'stdio':[_0x243a07[_0x4c84a0(0xca)],'ignore',_0x4c84a0(0xc0)],'shell':_0x243a07['cYBBI'](process['platform'],'win32')});_0x5531d9['on'](_0x243a07[_0x4c84a0(0xc6)],_0xbacc5a=>{_0x4619c5(_0xbacc5a===0x0);}),_0x5531d9['on'](_0x243a07['CZGhp'],()=>{_0x4619c5(![]);});});}export async function clean(){const _0x2119e1=_0x305f73,_0x4b4f26={'HZUDw':function(_0x4fc47b){return _0x4fc47b();},'tmRBP':function(_0xbb4a01){return _0xbb4a01();},'XblTD':_0x2119e1(0xe2),'fdkDw':function(_0x24e33c){return _0x24e33c();},'TtFJV':function(_0xfdefd8,_0x56065a,_0x1e0ec8){return _0xfdefd8(_0x56065a,_0x1e0ec8);},'JrYYk':_0x2119e1(0xc7),'vZkVM':function(_0xbfe7e1,_0x3065fd,_0x22e529){return _0xbfe7e1(_0x3065fd,_0x22e529);},'yEwto':function(_0x414453,_0x2f528a){return _0x414453(_0x2f528a);},'qmPIB':_0x2119e1(0xc1),'rmZQH':function(_0x415ee9,_0x4666f8){return _0x415ee9(_0x4666f8);},'GGMiY':function(_0x48d1aa,_0x43c651,_0x96a474){return _0x48d1aa(_0x43c651,_0x96a474);},'FKudW':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','sFlxE':_0x2119e1(0xbc)};console[_0x2119e1(0xcf)](_0x2119e1(0xcd));let _0x50f19c=![];try{await _0x4b4f26['HZUDw'](deleteAllCredentials),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x50f19c=!![];}catch{}const _0x493d4a=getCacheFile();existsSync(_0x493d4a)&&(await rm(_0x493d4a),_0x50f19c=!![]);const _0x5abdc2=_0x4b4f26[_0x2119e1(0xd6)](getRangerDir);existsSync(_0x5abdc2)&&(await rm(_0x5abdc2,{'recursive':!![]}),console[_0x2119e1(0xcf)](_0x4b4f26[_0x2119e1(0xc3)]),_0x50f19c=!![]);const _0x273977=getProjectSkillsDir();for(const _0x4bd3b9 of skillsToRemove){const _0x4e608c=join(_0x273977,_0x4bd3b9);existsSync(_0x4e608c)&&(await rm(_0x4e608c,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x4bd3b9),_0x50f19c=!![]);}const _0x981b19=_0x4b4f26[_0x2119e1(0xc8)](getUserSkillsDir);for(const _0x2e3f7f of skillsToRemove){const _0x54587e=_0x4b4f26[_0x2119e1(0xe0)](join,_0x981b19,_0x2e3f7f);existsSync(_0x54587e)&&(await _0x4b4f26[_0x2119e1(0xe0)](rm,_0x54587e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x2e3f7f),_0x50f19c=!![]);}const _0x4aa6f8=getOpencodeSkillsDir(_0x4b4f26['JrYYk']);for(const _0x13af1f of skillsToRemove){const _0x173d9b=_0x4b4f26[_0x2119e1(0xe4)](join,_0x4aa6f8,_0x13af1f);_0x4b4f26[_0x2119e1(0xc4)](existsSync,_0x173d9b)&&(await rm(_0x173d9b,{'recursive':!![]}),console['log'](_0x2119e1(0xeb)+_0x13af1f),_0x50f19c=!![]);}const _0x5e7872=getOpencodeSkillsDir(_0x4b4f26[_0x2119e1(0xba)]);for(const _0x3c27cc of skillsToRemove){const _0x110e43=join(_0x5e7872,_0x3c27cc);_0x4b4f26[_0x2119e1(0xe9)](existsSync,_0x110e43)&&(await _0x4b4f26[_0x2119e1(0xe4)](rm,_0x110e43,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x3c27cc),_0x50f19c=!![]);}const _0x4600b3=_0x4b4f26['GGMiY'](join,_0x4b4f26[_0x2119e1(0xc4)](getOpencodeConfigDir,_0x4b4f26[_0x2119e1(0xe3)]),_0x2119e1(0xd0));await _0x4b4f26['rmZQH'](removeOpencodePluginConfig,_0x4600b3)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x50f19c=!![]);const _0x108022=join(getOpencodeConfigDir(_0x4b4f26['qmPIB']),_0x2119e1(0xd0));await _0x4b4f26['rmZQH'](removeOpencodePluginConfig,_0x108022)&&(console[_0x2119e1(0xcf)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x50f19c=!![]);const _0x2d411e=await _0x4b4f26['fdkDw'](uninstallClaudePlugin);_0x2d411e&&(console['log'](_0x2119e1(0xbe)),_0x50f19c=!![]);const _0x3b8730=await _0x4b4f26[_0x2119e1(0xc4)](uninstallClaudePlugin,_0x4b4f26['JrYYk']);_0x3b8730&&(console['log'](_0x4b4f26['FKudW']),_0x50f19c=!![]);const _0xd8cc93=await _0x4b4f26[_0x2119e1(0xd6)](removeMarketplace);_0xd8cc93&&(console['log'](_0x2119e1(0xcc)),_0x50f19c=!![]),_0x50f19c?console['log'](_0x4b4f26['sFlxE']):console[_0x2119e1(0xcf)](_0x2119e1(0xb8));}
@@ -1 +1 @@
1
- const _0x453696=_0x2b20;(function(_0x5f00cc,_0x53835e){const _0x55fde6=_0x2b20,_0x16377e=_0x5f00cc();while(!![]){try{const _0x490d57=-parseInt(_0x55fde6(0xf0))/0x1+-parseInt(_0x55fde6(0xf8))/0x2+parseInt(_0x55fde6(0xfe))/0x3+-parseInt(_0x55fde6(0x103))/0x4*(parseInt(_0x55fde6(0xec))/0x5)+parseInt(_0x55fde6(0x101))/0x6*(-parseInt(_0x55fde6(0xee))/0x7)+-parseInt(_0x55fde6(0xf1))/0x8+parseInt(_0x55fde6(0xe0))/0x9;if(_0x490d57===_0x53835e)break;else _0x16377e['push'](_0x16377e['shift']());}catch(_0x1b485c){_0x16377e['push'](_0x16377e['shift']());}}}(_0x547e,0x58faa));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x453696(0x104),'allowInsecureLocalhost',_0x453696(0x109)];function parseLocalValue(_0x1620cb,_0x31d85b){const _0x75e49c=_0x453696,_0x2993df={'pgZTD':function(_0x5df8ab,_0x488c5f){return _0x5df8ab===_0x488c5f;},'xVASb':_0x75e49c(0xdb)};if(BOOLEAN_KEYS[_0x75e49c(0x105)](_0x1620cb)){if(_0x31d85b===_0x75e49c(0x100))return!![];if(_0x2993df['pgZTD'](_0x31d85b,_0x2993df[_0x75e49c(0xf6)]))return![];throw new Error(_0x75e49c(0xe7)+_0x1620cb+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x31d85b;}function parseOverrideValue(_0x50df2a){const _0x28f0e0=_0x453696,_0x526c79={'GWpdU':'true','CQxsa':function(_0x36de15,_0x516f70){return _0x36de15===_0x516f70;},'hZHxO':_0x28f0e0(0xeb),'jRGzM':_0x28f0e0(0xdc),'RcLor':function(_0xf7441f,_0x39b3b5){return _0xf7441f(_0x39b3b5);}};if(_0x50df2a===_0x526c79['GWpdU'])return!![];if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x28f0e0(0xdb)))return![];if(_0x50df2a===_0x526c79['hZHxO'])return null;if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x526c79['jRGzM']))return undefined;if(/^-?\d+$/['test'](_0x50df2a)){const _0x27546e=_0x526c79['RcLor'](Number,_0x50df2a);if(Number[_0x28f0e0(0xe5)](_0x27546e))return _0x27546e;}if(/^-?\d+\.\d+$/[_0x28f0e0(0xef)](_0x50df2a)){const _0x4d5a0e=Number(_0x50df2a);if(!Number[_0x28f0e0(0xf2)](_0x4d5a0e))return _0x4d5a0e;}const _0x187fd7=_0x50df2a['trim']();if(_0x187fd7[_0x28f0e0(0xe2)]('{')&&_0x187fd7[_0x28f0e0(0xdd)]('}')||_0x187fd7[_0x28f0e0(0xe2)]('[')&&_0x187fd7[_0x28f0e0(0xdd)](']'))try{return JSON['parse'](_0x187fd7);}catch{}return _0x50df2a;}function _0x547e(){const _0x5b97ab=['forceLogin','Key\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x20\x20Note:\x20\x22','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','kHwNY','false','undefined','endsWith','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','22267242VDDQlb','cloud','startsWith','keys','kind','isSafeInteger','No\x20configuration\x20set\x20for\x20\x22','Invalid\x20value\x20for\x20','MYrkn','Set\x20','FizTn','null','38435hpaCxw','CQxsa','2168957fodCpg','test','686572uIEARw','1711768LzlKEr','isNaN','Profile\x20\x22','object','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','xVASb','EGvsA','728166vXtnAs','KWOFA','fyayL','tvybt','Removed\x20','local','539064tMpFXh','\x20for\x20\x22','true','6qKjieW','zvtBx','372HNEFyC','headless','includes','oYPRy','log','NwIap'];_0x547e=function(){return _0x5b97ab;};return _0x547e();}function _0x2b20(_0x3d7217,_0x4dba72){_0x3d7217=_0x3d7217-0xd9;const _0x547e58=_0x547e();let _0x2b206f=_0x547e58[_0x3d7217];return _0x2b206f;}async function resolveProfileTarget(_0x54007a){const _0x2e89f9=_0x453696,_0x2637f5={'wvIGr':function(_0x441e27,_0x301e2d){return _0x441e27(_0x301e2d);},'oYPRy':_0x2e89f9(0xe1)},_0x379b6d=_0x2637f5['wvIGr'](existsSync,getEnvDir(_0x54007a));let _0x359d6e=![];try{const _0x2ecc8c=await fetchCloudProfile(_0x54007a);_0x359d6e=Boolean(_0x2ecc8c);}catch{}if(_0x359d6e)return{'kind':_0x2637f5[_0x2e89f9(0x106)],'alsoExistsElsewhere':_0x379b6d};if(_0x379b6d)return{'kind':_0x2e89f9(0xfd),'alsoExistsElsewhere':![]};throw new Error(_0x2e89f9(0xf3)+_0x54007a+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x54007a);}function printDualExistsHint(_0x3c4fdb){const _0x5551a4=_0x453696;console[_0x5551a4(0x107)](_0x5551a4(0x10c)+_0x3c4fdb+_0x5551a4(0x10b));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3137eb){const _0x302b65=_0x453696,_0x2558c4={'NwIap':function(_0x34573e,_0xcbecf1,_0x4547a8){return _0x34573e(_0xcbecf1,_0x4547a8);}},_0x29b9d6=await fetchCloudProfile(_0x3137eb),_0x25f2b8=readProfileOverrides(getProjectPath(),_0x3137eb);return _0x2558c4[_0x302b65(0x108)](mergeCloudProfileSettings,_0x29b9d6?.['settings']??{},_0x25f2b8??undefined);}export async function configSet(_0x179fc2,_0x3b02fa,_0x33fe51){const _0x23b418=_0x453696,_0x16c426={'fyayL':function(_0x55d1b0,_0x8b020d){return _0x55d1b0(_0x8b020d);},'tvybt':function(_0x1d2acf,_0x2a02e6){return _0x1d2acf===_0x2a02e6;},'VKaaQ':'cloud','bdSJc':function(_0x544c0a,_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3){return _0x544c0a(_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3);}},_0x50654e=await _0x16c426[_0x23b418(0xfa)](resolveProfileTarget,_0x179fc2);if(_0x16c426[_0x23b418(0xfb)](_0x50654e['kind'],_0x16c426['VKaaQ'])){if(_0x50654e['alsoExistsElsewhere'])printDualExistsHint(_0x179fc2);const _0x425043=parseOverrideValue(_0x33fe51);setProfileOverride(getProjectPath(),_0x179fc2,_0x3b02fa,_0x425043),console['log']('Set\x20'+_0x3b02fa+'\x20=\x20'+JSON['stringify'](_0x425043)+'\x20for\x20\x22'+_0x179fc2+'\x22');return;}const _0x198115=parseLocalValue(_0x3b02fa,_0x33fe51);_0x16c426['bdSJc'](setProfileOverride,getProjectPath(),_0x179fc2,_0x3b02fa,_0x198115),console[_0x23b418(0x107)](_0x23b418(0xe9)+_0x3b02fa+'\x20=\x20'+_0x198115+_0x23b418(0xff)+_0x179fc2+'\x22');}export async function configGet(_0x34a007,_0x5eba12){const _0x504332=_0x453696,_0x2e0073={'EGvsA':function(_0x5ebc79,_0x5df230){return _0x5ebc79===_0x5df230;},'FizTn':function(_0x3b6c03,_0x2957e0){return _0x3b6c03===_0x2957e0;},'OFtrU':_0x504332(0xf4)},_0x1dac22=await resolveProfileTarget(_0x34a007);if(_0x1dac22['kind']===_0x504332(0xe1)){const _0x2d8f81=await loadEffectiveCloudSettings(_0x34a007),_0x3497e2=getNestedValue(_0x2d8f81,_0x5eba12);if(_0x2e0073[_0x504332(0xf7)](_0x3497e2,undefined))console[_0x504332(0x107)]('(not\x20set)');else typeof _0x3497e2===_0x504332(0xf4)?console[_0x504332(0x107)](JSON[_0x504332(0xde)](_0x3497e2,null,0x2)):console[_0x504332(0x107)](_0x3497e2);return;}const _0x4e9ef1=await loadSettings(_0x34a007),_0x1f51af=getNestedValue(_0x4e9ef1,_0x5eba12);if(_0x1f51af===undefined)console['log']('(not\x20set)');else _0x2e0073[_0x504332(0xea)](typeof _0x1f51af,_0x2e0073['OFtrU'])?console['log'](JSON['stringify'](_0x1f51af,null,0x2)):console[_0x504332(0x107)](_0x1f51af);}export async function configList(_0x4d413c){const _0x24cf8e=_0x453696,_0x2f0f8d={'yXpAz':function(_0x37b1fa,_0x5c176a){return _0x37b1fa(_0x5c176a);},'KWOFA':function(_0x3595cb,_0x4f5e4a){return _0x3595cb===_0x4f5e4a;},'Fnsfb':function(_0x51202f,_0x4d0e08){return _0x51202f(_0x4d0e08);},'zvtBx':function(_0x5a1efd,_0x33f461){return _0x5a1efd(_0x33f461);}},_0x2f7eba=await _0x2f0f8d['yXpAz'](resolveProfileTarget,_0x4d413c);if(_0x2f0f8d[_0x24cf8e(0xf9)](_0x2f7eba[_0x24cf8e(0xe4)],_0x24cf8e(0xe1))){const _0x23acbd=await loadEffectiveCloudSettings(_0x4d413c);if(!_0x23acbd||Object[_0x24cf8e(0xe3)](_0x23acbd)['length']===0x0){console['log'](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}console[_0x24cf8e(0x107)](JSON[_0x24cf8e(0xde)](_0x23acbd,null,0x2));return;}const _0x46902d=_0x2f0f8d['Fnsfb'](getSettingsPath,_0x4d413c);if(!existsSync(_0x46902d)){console[_0x24cf8e(0x107)](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}const _0x193d25=await loadSettings(_0x4d413c),_0x4901c2=_0x2f0f8d[_0x24cf8e(0x102)](formatSettings,_0x193d25);!_0x4901c2?console[_0x24cf8e(0x107)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4d413c+'\x22'):console[_0x24cf8e(0x107)](_0x4901c2);}export async function configUnset(_0x4239b3,_0x196b4b){const _0x248b2d=_0x453696,_0x24cca9={'MYrkn':function(_0x42be8a,_0x1cd2ca){return _0x42be8a(_0x1cd2ca);},'eiLZL':function(_0x3c9c7c,_0xf112e9){return _0x3c9c7c===_0xf112e9;},'TNKJw':function(_0x1458ea,_0x34b0ff,_0x26de4a,_0x365acb){return _0x1458ea(_0x34b0ff,_0x26de4a,_0x365acb);},'BRZLA':function(_0x4e05ec,_0x589a30){return _0x4e05ec(_0x589a30);}},_0x212fc7=await _0x24cca9[_0x248b2d(0xe8)](resolveProfileTarget,_0x4239b3);if(_0x24cca9['eiLZL'](_0x212fc7[_0x248b2d(0xe4)],'cloud')){if(_0x212fc7['alsoExistsElsewhere'])printDualExistsHint(_0x4239b3);const _0x16d35b=unsetProfileOverride(getProjectPath(),_0x4239b3,_0x196b4b);_0x16d35b?console[_0x248b2d(0x107)](_0x248b2d(0xfc)+_0x196b4b+'\x20for\x20\x22'+_0x4239b3+'\x22'):console['log']('Key\x20\x22'+_0x196b4b+'\x22\x20not\x20found');return;}const _0x20a117=_0x24cca9['TNKJw'](unsetProfileOverride,getProjectPath(),_0x4239b3,_0x196b4b);if(_0x20a117){console['log'](_0x248b2d(0xfc)+_0x196b4b);return;}const _0x3590bf=await _0x24cca9['BRZLA'](loadSettings,_0x4239b3),_0x47f945=deleteNestedValue(_0x3590bf,_0x196b4b);_0x47f945?console['log']('Key\x20\x22'+_0x196b4b+_0x248b2d(0xd9)+_0x4239b3+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x248b2d(0x107)](_0x248b2d(0x10a)+_0x196b4b+'\x22\x20not\x20found');}export async function configReset(_0x297138){const _0x588dc3=_0x453696,_0x3b981f={'kHwNY':function(_0x23b70f,_0x71b6bb){return _0x23b70f(_0x71b6bb);},'BEBAU':'cloud'},_0x51785=await _0x3b981f[_0x588dc3(0xda)](resolveProfileTarget,_0x297138);if(_0x51785[_0x588dc3(0xe4)]===_0x3b981f['BEBAU']){resetProfileOverrides(getProjectPath(),_0x297138),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x297138+'\x22');return;}console[_0x588dc3(0x107)]('\x22'+_0x297138+_0x588dc3(0xdf)+_0x297138+_0x588dc3(0xf5));}
1
+ function _0xf1d4(){const _0x482cd5=['25YxlGgA','qDFDa','180678rqKTCX','alsoExistsElsewhere','22680nbGLym','headless','vPqfd','2744667YIHsXr','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','221740JCWsDf','FvdhK','allowInsecureLocalhost','cloud','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Key\x20\x22','IcyOx','dpQuU','44CQYDPs','yYady','GSmEw','isSafeInteger','GneFV','YyEKF','log',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','exrIi','EvAjc','cRLsb','\x22\x20not\x20found','length','bTySL','thkCt','forceLogin','422696eorJfq','rZgWv','startsWith','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','stringify','aNrLe','settings','(not\x20set)','true','YkJQZ','35cMJdOy','kind','\x20=\x20','endsWith','1073170xDewMn','test','3pDkVNk','false','No\x20configuration\x20set\x20for\x20\x22','object','693006jKvicx'];_0xf1d4=function(){return _0x482cd5;};return _0xf1d4();}function _0x105a(_0x33418d,_0x22be9d){_0x33418d=_0x33418d-0xdd;const _0xf1d445=_0xf1d4();let _0x105aa0=_0xf1d445[_0x33418d];return _0x105aa0;}const _0x5bd86c=_0x105a;(function(_0x28a3e4,_0x192670){const _0x2d027e=_0x105a,_0x3b9818=_0x28a3e4();while(!![]){try{const _0x33aeaf=parseInt(_0x2d027e(0x102))/0x1+-parseInt(_0x2d027e(0xfd))/0x2*(-parseInt(_0x2d027e(0xf9))/0x3)+parseInt(_0x2d027e(0x107))/0x4+parseInt(_0x2d027e(0xfe))/0x5*(parseInt(_0x2d027e(0x100))/0x6)+-parseInt(_0x2d027e(0xf3))/0x7*(parseInt(_0x2d027e(0xe9))/0x8)+parseInt(_0x2d027e(0x105))/0x9+-parseInt(_0x2d027e(0xf7))/0xa*(parseInt(_0x2d027e(0x10f))/0xb);if(_0x33aeaf===_0x192670)break;else _0x3b9818['push'](_0x3b9818['shift']());}catch(_0x456d5c){_0x3b9818['push'](_0x3b9818['shift']());}}}(_0xf1d4,0x2d945));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x5bd86c(0x103),_0x5bd86c(0x109),_0x5bd86c(0xe8)];function parseLocalValue(_0x3e9fb1,_0x4dd84e){const _0x3dfa44=_0x5bd86c,_0x4242f5={'rZgWv':function(_0x35b801,_0x3cd027){return _0x35b801===_0x3cd027;},'vpfVD':'false'};if(BOOLEAN_KEYS['includes'](_0x3e9fb1)){if(_0x4242f5[_0x3dfa44(0xea)](_0x4dd84e,'true'))return!![];if(_0x4dd84e===_0x4242f5['vpfVD'])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x3e9fb1+_0x3dfa44(0xe0));}return _0x4dd84e;}function parseOverrideValue(_0x110820){const _0x1b2d08=_0x5bd86c,_0x10f9b7={'dpQuU':function(_0x592bdf,_0x21fc04){return _0x592bdf===_0x21fc04;},'qDFDa':function(_0x5b760b,_0x1129a1){return _0x5b760b(_0x1129a1);}};if(_0x110820===_0x1b2d08(0xf1))return!![];if(_0x10f9b7['dpQuU'](_0x110820,_0x1b2d08(0xfa)))return![];if(_0x110820==='null')return null;if(_0x10f9b7[_0x1b2d08(0x10e)](_0x110820,'undefined'))return undefined;if(/^-?\d+$/[_0x1b2d08(0xf8)](_0x110820)){const _0x532b04=_0x10f9b7[_0x1b2d08(0xff)](Number,_0x110820);if(Number[_0x1b2d08(0x112)](_0x532b04))return _0x532b04;}if(/^-?\d+\.\d+$/[_0x1b2d08(0xf8)](_0x110820)){const _0x1bc376=Number(_0x110820);if(!Number['isNaN'](_0x1bc376))return _0x1bc376;}const _0x1291be=_0x110820['trim']();if(_0x1291be[_0x1b2d08(0xeb)]('{')&&_0x1291be['endsWith']('}')||_0x1291be['startsWith']('[')&&_0x1291be[_0x1b2d08(0xf6)](']'))try{return JSON['parse'](_0x1291be);}catch{}return _0x110820;}async function resolveProfileTarget(_0x1a9f9e){const _0x4bc05c=_0x5bd86c,_0x17f640={'XIcBd':function(_0x3345c6,_0x2ae150){return _0x3345c6(_0x2ae150);},'cRLsb':function(_0x4ebc30,_0x49f24a){return _0x4ebc30(_0x49f24a);},'iWSuD':function(_0x4c834d,_0x18ea0e){return _0x4c834d(_0x18ea0e);}},_0x1ab0c6=existsSync(_0x17f640['XIcBd'](getEnvDir,_0x1a9f9e));let _0x255d7f=![];try{const _0x202c66=await _0x17f640[_0x4bc05c(0xe3)](fetchCloudProfile,_0x1a9f9e);_0x255d7f=_0x17f640['iWSuD'](Boolean,_0x202c66);}catch{}if(_0x255d7f)return{'kind':_0x4bc05c(0x10a),'alsoExistsElsewhere':_0x1ab0c6};if(_0x1ab0c6)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1a9f9e+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1a9f9e);}function printDualExistsHint(_0x4ccf1d){console['log']('\x20\x20Note:\x20\x22'+_0x4ccf1d+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x58581b){const _0x22f985=_0x5bd86c,_0x1dc3b1={'fCfZl':function(_0x192685){return _0x192685();},'bTySL':function(_0x363bff,_0x543b15,_0x3d1fe4){return _0x363bff(_0x543b15,_0x3d1fe4);},'thkCt':function(_0x335d7c,_0x360850){return _0x335d7c??_0x360850;}},_0x36d8f6=await fetchCloudProfile(_0x58581b),_0x1a061b=readProfileOverrides(_0x1dc3b1['fCfZl'](getProjectPath),_0x58581b);return _0x1dc3b1[_0x22f985(0xe6)](mergeCloudProfileSettings,_0x36d8f6?.[_0x22f985(0xef)]??{},_0x1dc3b1[_0x22f985(0xe7)](_0x1a061b,undefined));}export async function configSet(_0x2ac861,_0x4af39d,_0x459d0c){const _0x1f782d=_0x5bd86c,_0x3b5ed5={'zcjJy':function(_0x1ad092,_0x3e4b59){return _0x1ad092===_0x3e4b59;},'FvdhK':_0x1f782d(0x10a),'SCgns':function(_0x3b7261,_0x3431f5){return _0x3b7261(_0x3431f5);},'yYady':function(_0x247299,_0x5a320a){return _0x247299(_0x5a320a);},'YyEKF':function(_0x158aea){return _0x158aea();},'EvAjc':function(_0x369e00,_0xa7596,_0x418340,_0x43df26,_0x1cea82){return _0x369e00(_0xa7596,_0x418340,_0x43df26,_0x1cea82);}},_0x2fae62=await resolveProfileTarget(_0x2ac861);if(_0x3b5ed5['zcjJy'](_0x2fae62[_0x1f782d(0xf4)],_0x3b5ed5[_0x1f782d(0x108)])){if(_0x2fae62[_0x1f782d(0x101)])_0x3b5ed5['SCgns'](printDualExistsHint,_0x2ac861);const _0x3e9877=_0x3b5ed5[_0x1f782d(0x110)](parseOverrideValue,_0x459d0c);setProfileOverride(_0x3b5ed5[_0x1f782d(0xde)](getProjectPath),_0x2ac861,_0x4af39d,_0x3e9877),console[_0x1f782d(0xdf)]('Set\x20'+_0x4af39d+_0x1f782d(0xf5)+JSON[_0x1f782d(0xed)](_0x3e9877)+'\x20for\x20\x22'+_0x2ac861+'\x22');return;}const _0x50d2d9=parseLocalValue(_0x4af39d,_0x459d0c);_0x3b5ed5[_0x1f782d(0xe2)](setProfileOverride,_0x3b5ed5['YyEKF'](getProjectPath),_0x2ac861,_0x4af39d,_0x50d2d9),console['log']('Set\x20'+_0x4af39d+'\x20=\x20'+_0x50d2d9+'\x20for\x20\x22'+_0x2ac861+'\x22');}export async function configGet(_0x415b56,_0x4d2ac0){const _0x485b22=_0x5bd86c,_0x9e4db1={'XzNmr':function(_0x19ef11,_0x544c03){return _0x19ef11===_0x544c03;},'YkJQZ':_0x485b22(0x10a),'triGr':function(_0x28d757,_0x4b5801){return _0x28d757(_0x4b5801);},'IcyOx':function(_0x51ec57,_0x53dcd0,_0x38411d){return _0x51ec57(_0x53dcd0,_0x38411d);},'KkqRf':function(_0x3e30c6,_0x5b66d5,_0x2301e4){return _0x3e30c6(_0x5b66d5,_0x2301e4);},'vPqfd':_0x485b22(0xfc)},_0x1b67e2=await resolveProfileTarget(_0x415b56);if(_0x9e4db1['XzNmr'](_0x1b67e2['kind'],_0x9e4db1[_0x485b22(0xf2)])){const _0x293983=await _0x9e4db1['triGr'](loadEffectiveCloudSettings,_0x415b56),_0x1eed6f=_0x9e4db1[_0x485b22(0x10d)](getNestedValue,_0x293983,_0x4d2ac0);if(_0x9e4db1['XzNmr'](_0x1eed6f,undefined))console[_0x485b22(0xdf)](_0x485b22(0xf0));else _0x9e4db1['XzNmr'](typeof _0x1eed6f,'object')?console['log'](JSON['stringify'](_0x1eed6f,null,0x2)):console[_0x485b22(0xdf)](_0x1eed6f);return;}const _0x4c41cb=await _0x9e4db1['triGr'](loadSettings,_0x415b56),_0x46a6f8=_0x9e4db1['KkqRf'](getNestedValue,_0x4c41cb,_0x4d2ac0);if(_0x46a6f8===undefined)console[_0x485b22(0xdf)]('(not\x20set)');else typeof _0x46a6f8===_0x9e4db1[_0x485b22(0x104)]?console[_0x485b22(0xdf)](JSON['stringify'](_0x46a6f8,null,0x2)):console[_0x485b22(0xdf)](_0x46a6f8);}export async function configList(_0x4bff22){const _0x59e0e9=_0x5bd86c,_0x1cb904={'Hhfls':function(_0x3a2b06,_0x2db6d7){return _0x3a2b06===_0x2db6d7;},'GneFV':function(_0x5f4cb1,_0x4915c6){return _0x5f4cb1(_0x4915c6);}},_0x17a4c3=await resolveProfileTarget(_0x4bff22);if(_0x1cb904['Hhfls'](_0x17a4c3['kind'],_0x59e0e9(0x10a))){const _0x27e3fd=await _0x1cb904[_0x59e0e9(0xdd)](loadEffectiveCloudSettings,_0x4bff22);if(!_0x27e3fd||_0x1cb904['Hhfls'](Object['keys'](_0x27e3fd)[_0x59e0e9(0xe5)],0x0)){console[_0x59e0e9(0xdf)](_0x59e0e9(0xfb)+_0x4bff22+'\x22');return;}console['log'](JSON[_0x59e0e9(0xed)](_0x27e3fd,null,0x2));return;}const _0x27821b=getSettingsPath(_0x4bff22);if(!existsSync(_0x27821b)){console[_0x59e0e9(0xdf)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4bff22+'\x22');return;}const _0x641a01=await _0x1cb904[_0x59e0e9(0xdd)](loadSettings,_0x4bff22),_0x73f61f=_0x1cb904[_0x59e0e9(0xdd)](formatSettings,_0x641a01);!_0x73f61f?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4bff22+'\x22'):console[_0x59e0e9(0xdf)](_0x73f61f);}export async function configUnset(_0x3a6695,_0x475adc){const _0x5f22cb=_0x5bd86c,_0x3cbfd4={'Bsfwj':function(_0x28f2c2,_0x3ba065){return _0x28f2c2(_0x3ba065);},'aNrLe':function(_0x2d0a5a,_0xfc4ffa){return _0x2d0a5a===_0xfc4ffa;},'zJJyJ':'cloud','EGCCs':function(_0x2b6375,_0x12ee3c){return _0x2b6375(_0x12ee3c);},'HZwAS':function(_0x27c46f,_0x6e8d47,_0x2ee818,_0x3f1a4c){return _0x27c46f(_0x6e8d47,_0x2ee818,_0x3f1a4c);},'acWFk':function(_0x276be9,_0x5ee300){return _0x276be9(_0x5ee300);},'ODqrV':function(_0x1073c8,_0x90676f,_0x22e584){return _0x1073c8(_0x90676f,_0x22e584);}},_0x40e757=await _0x3cbfd4['Bsfwj'](resolveProfileTarget,_0x3a6695);if(_0x3cbfd4[_0x5f22cb(0xee)](_0x40e757[_0x5f22cb(0xf4)],_0x3cbfd4['zJJyJ'])){if(_0x40e757[_0x5f22cb(0x101)])_0x3cbfd4['EGCCs'](printDualExistsHint,_0x3a6695);const _0x5cc25c=_0x3cbfd4['HZwAS'](unsetProfileOverride,getProjectPath(),_0x3a6695,_0x475adc);_0x5cc25c?console[_0x5f22cb(0xdf)]('Removed\x20'+_0x475adc+'\x20for\x20\x22'+_0x3a6695+'\x22'):console[_0x5f22cb(0xdf)](_0x5f22cb(0x10c)+_0x475adc+_0x5f22cb(0xe4));return;}const _0x57e361=_0x3cbfd4['HZwAS'](unsetProfileOverride,getProjectPath(),_0x3a6695,_0x475adc);if(_0x57e361){console[_0x5f22cb(0xdf)]('Removed\x20'+_0x475adc);return;}const _0x156f2c=await _0x3cbfd4['acWFk'](loadSettings,_0x3a6695),_0x43911d=_0x3cbfd4['ODqrV'](deleteNestedValue,_0x156f2c,_0x475adc);_0x43911d?console['log']('Key\x20\x22'+_0x475adc+_0x5f22cb(0xec)+_0x3a6695+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x5f22cb(0xdf)](_0x5f22cb(0x10c)+_0x475adc+'\x22\x20not\x20found');}export async function configReset(_0x8084f1){const _0x303cd5=_0x5bd86c,_0x1ca7de={'GSmEw':function(_0x5c68ea,_0x5f3a4c){return _0x5c68ea===_0x5f3a4c;},'OQFSU':function(_0x36e883,_0xd90cae,_0x255f3b){return _0x36e883(_0xd90cae,_0x255f3b);},'exrIi':function(_0x4b0824){return _0x4b0824();}},_0x2de76e=await resolveProfileTarget(_0x8084f1);if(_0x1ca7de[_0x303cd5(0x111)](_0x2de76e['kind'],'cloud')){_0x1ca7de['OQFSU'](resetProfileOverrides,_0x1ca7de[_0x303cd5(0xe1)](getProjectPath),_0x8084f1),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x8084f1+'\x22');return;}console['log']('\x22'+_0x8084f1+_0x303cd5(0x10b)+_0x8084f1+_0x303cd5(0x106));}
@@ -1 +1 @@
1
- function _0x2d83(){const _0xf5e396=['\x22\x20to\x20confirm\x20deletion:','pnzbA','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','6198625hhzkNl','WnXOW','104UMfjcK','500564cCiPKJ','yes','36nIcAFS','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','input','9035298FgFNhP','12140408hSjtcg','188776Nziddv','285909OGXhPi','nIWMH','2233593yjZlNf','prompt','log'];_0x2d83=function(){return _0xf5e396;};return _0x2d83();}(function(_0x4830f2,_0x79c1bf){const _0x1911f0=_0x4842,_0x23d616=_0x4830f2();while(!![]){try{const _0x4bb981=-parseInt(_0x1911f0(0x101))/0x1+parseInt(_0x1911f0(0xfa))/0x2+-parseInt(_0x1911f0(0xef))/0x3*(parseInt(_0x1911f0(0xfc))/0x4)+-parseInt(_0x1911f0(0xf7))/0x5+parseInt(_0x1911f0(0xff))/0x6+-parseInt(_0x1911f0(0x100))/0x7+-parseInt(_0x1911f0(0xf9))/0x8*(-parseInt(_0x1911f0(0xf1))/0x9);if(_0x4bb981===_0x79c1bf)break;else _0x23d616['push'](_0x23d616['shift']());}catch(_0x3fe4af){_0x23d616['push'](_0x23d616['shift']());}}}(_0x2d83,0xead66));import _0x51827f from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x4842(_0x1dceef,_0x4abb40){_0x1dceef=_0x1dceef-0xef;const _0x2d83f8=_0x2d83();let _0x4842d3=_0x2d83f8[_0x1dceef];return _0x4842d3;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x3526be,_0x55525c={}){const _0x44236a=_0x4842,_0x1c24eb={'nIWMH':function(_0x1ef438,_0x55a96f){return _0x1ef438(_0x55a96f);},'gxYyl':_0x44236a(0xfd),'pnzbA':function(_0x16f796,_0x156110){return _0x16f796!==_0x156110;},'WnXOW':function(_0x3f98d0,_0x3c2027,_0x5a2caa){return _0x3f98d0(_0x3c2027,_0x5a2caa);},'dUVTk':function(_0x1a74ec,_0x31d656,_0x3304c9){return _0x1a74ec(_0x31d656,_0x3304c9);}},_0x5bddf=await _0x1c24eb[_0x44236a(0xf0)](fetchCloudProfile,_0x3526be);if(!_0x5bddf)throw new Error('Cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20not\x20found.');if(!_0x55525c[_0x44236a(0xfb)]&&!isInteractive())throw new Error(_0x1c24eb['gxYyl']);console[_0x44236a(0xf3)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x55525c[_0x44236a(0xfb)]){const {confirmation:_0xa0e933}=await _0x51827f[_0x44236a(0xf2)]([{'type':_0x44236a(0xfe),'name':'confirmation','message':'Type\x20\x22'+_0x3526be+_0x44236a(0xf4)}]);if(_0x1c24eb[_0x44236a(0xf5)](_0xa0e933,_0x3526be))throw new Error(_0x44236a(0xf6));}await deleteCloudProfile(_0x3526be),_0x1c24eb[_0x44236a(0xf8)](resetProfileOverrides,process['cwd'](),_0x3526be),_0x1c24eb['dUVTk'](clearLastProfile,process['cwd'](),_0x3526be),console[_0x44236a(0xf3)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3526be+'\x22.');}
1
+ function _0x43a3(){const _0x3aef96=['8765736NHyZlJ','560762FljAkJ','3200302YEUVQe','2873913bFdnRZ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','57LYoNkc','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','wgusP','312440mKupSg','log','yes','prompt','cwd','confirmation','3841245CsFrFF','81rVrUre','✓\x20Deleted\x20cloud\x20profile\x20\x22','1575352IGGnXW','\x22\x20for\x20everyone\x20in\x20your\x20organization.'];_0x43a3=function(){return _0x3aef96;};return _0x43a3();}function _0xdc2e(_0x5f0fa4,_0x19c1a5){_0x5f0fa4=_0x5f0fa4-0x174;const _0x43a330=_0x43a3();let _0xdc2ed3=_0x43a330[_0x5f0fa4];return _0xdc2ed3;}(function(_0x50a012,_0x79ec75){const _0x1084d3=_0xdc2e,_0x30cb9e=_0x50a012();while(!![]){try{const _0x2c2298=-parseInt(_0x1084d3(0x17c))/0x1+-parseInt(_0x1084d3(0x17d))/0x2+parseInt(_0x1084d3(0x180))/0x3*(parseInt(_0x1084d3(0x183))/0x4)+parseInt(_0x1084d3(0x176))/0x5+-parseInt(_0x1084d3(0x17b))/0x6+parseInt(_0x1084d3(0x17e))/0x7+-parseInt(_0x1084d3(0x179))/0x8*(-parseInt(_0x1084d3(0x177))/0x9);if(_0x2c2298===_0x79ec75)break;else _0x30cb9e['push'](_0x30cb9e['shift']());}catch(_0xf65803){_0x30cb9e['push'](_0x30cb9e['shift']());}}}(_0x43a3,0xc68f4));import _0x2c6bba from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x9d0457,_0x5bda63={}){const _0x2cfe04=_0xdc2e,_0x150822={'wgusP':_0x2cfe04(0x17f),'FnuZs':function(_0x30c9c8,_0x18d95a){return _0x30c9c8!==_0x18d95a;},'TBSvg':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','PwhHk':function(_0x580e50,_0x4cec2f,_0x527181){return _0x580e50(_0x4cec2f,_0x527181);}},_0x10de7d=await fetchCloudProfile(_0x9d0457);if(!_0x10de7d)throw new Error('Cloud\x20profile\x20\x22'+_0x9d0457+'\x22\x20not\x20found.');if(!_0x5bda63['yes']&&!isInteractive())throw new Error(_0x150822[_0x2cfe04(0x182)]);console[_0x2cfe04(0x184)](_0x2cfe04(0x181)+_0x9d0457+_0x2cfe04(0x17a));if(!_0x5bda63[_0x2cfe04(0x185)]){const {confirmation:_0x14c77a}=await _0x2c6bba[_0x2cfe04(0x186)]([{'type':'input','name':_0x2cfe04(0x175),'message':'Type\x20\x22'+_0x9d0457+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x150822['FnuZs'](_0x14c77a,_0x9d0457))throw new Error(_0x150822['TBSvg']);}await deleteCloudProfile(_0x9d0457),resetProfileOverrides(process[_0x2cfe04(0x174)](),_0x9d0457),_0x150822['PwhHk'](clearLastProfile,process['cwd'](),_0x9d0457),console['log'](_0x2cfe04(0x178)+_0x9d0457+'\x22.');}
@@ -1 +1 @@
1
- const _0x416b38=_0x5ab7;(function(_0x3f4285,_0x3e8c31){const _0x2c9b46=_0x5ab7,_0x17812e=_0x3f4285();while(!![]){try{const _0x20b27b=parseInt(_0x2c9b46(0xb6))/0x1+parseInt(_0x2c9b46(0xc5))/0x2+-parseInt(_0x2c9b46(0xad))/0x3+parseInt(_0x2c9b46(0xc9))/0x4+-parseInt(_0x2c9b46(0xbf))/0x5*(-parseInt(_0x2c9b46(0xa6))/0x6)+-parseInt(_0x2c9b46(0xbd))/0x7+-parseInt(_0x2c9b46(0xb7))/0x8*(parseInt(_0x2c9b46(0xc4))/0x9);if(_0x20b27b===_0x3e8c31)break;else _0x17812e['push'](_0x17812e['shift']());}catch(_0x5892af){_0x17812e['push'](_0x17812e['shift']());}}}(_0x4e7e,0x4a061));import{readdir,stat}from'fs/promises';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=['sessions','bug-bashes',_0x416b38(0xa4),_0x416b38(0xb1),'ci'];function _0x4e7e(){const _0x3da397=['266226ByzXMf','291304jqYPjk','tBZhR','gfWPo','AjnDN','\x0aNo\x20profiles\x20found.','cached\x20(updated\x20','2555868WnBhON','name','8285XCitYQ','\x20\x20\x20\x20','hgwKm','environmentDetails','.txt','9aSSTVw','928930TWVpkG','get','sessionUpdatedAt','vNAWN','1292940mmKQLB','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','\x0a*\x20=\x20active\x20profile','CEdlT','\x20\x20\x20\x20Session:\x20','has','error','reports','localeCompare','186mLbOSf','profiles','LwsVc','\x0a\x20\x20','sort','odbbD','OfyVr','1201665ePEdND','message','eLItN','push','local','includes','log','gerbS','length'];_0x4e7e=function(){return _0x3da397;};return _0x4e7e();}export function shouldGroupByEnvironment(_0x319bf3){const _0x2e707e=_0x416b38;return _0x319bf3['some'](_0x5dfaaf=>_0x5dfaaf[_0x2e707e(0x9e)]);}export function groupCloudProfilesByEnvironment(_0x573b00){const _0x2cb06c=_0x416b38,_0xd0f009=new Map();for(const _0x123919 of _0x573b00){const _0x4f466e=_0x123919['environmentKey']??null,_0x793d38=_0xd0f009['get'](_0x4f466e);if(_0x793d38)_0x793d38['push'](_0x123919);else _0xd0f009['set'](_0x4f466e,[_0x123919]);}const _0x5f5c5a=[..._0xd0f009['keys']()][_0x2cb06c(0xaa)]((_0x1a68d2,_0x5ebd82)=>{if(_0x1a68d2===null)return 0x1;if(_0x5ebd82===null)return-0x1;return _0x1a68d2['localeCompare'](_0x5ebd82);});return _0x5f5c5a['map'](_0x3e78ae=>({'environmentKey':_0x3e78ae,'profiles':_0xd0f009[_0x2cb06c(0xc6)](_0x3e78ae)['sort']((_0x4b3e56,_0x4c18f6)=>_0x4b3e56['name'][_0x2cb06c(0xa5)](_0x4c18f6[_0x2cb06c(0xbe)]))}));}function _0x5ab7(_0x1a2170,_0x2cf009){_0x1a2170=_0x1a2170-0x9d;const _0x4e7e92=_0x4e7e();let _0x5ab778=_0x4e7e92[_0x1a2170];return _0x5ab778;}export async function getEnvNames(){const _0x364b00=_0x416b38,_0x33af17={'gfWPo':function(_0x10e556,_0x2f07e4){return _0x10e556(_0x2f07e4);},'PeFLZ':function(_0x3dc843){return _0x3dc843();},'odbbD':function(_0x463c8b,_0x563ac3){return _0x463c8b(_0x563ac3);},'CwTsQ':'local','CEdlT':function(_0x5a11e1,_0x652f78,_0x3bd26f){return _0x5a11e1(_0x652f78,_0x3bd26f);},'vNAWN':function(_0x1f61db,_0xe19dd3){return _0x1f61db(_0xe19dd3);},'eLItN':function(_0x1ff143,_0x3cede6,_0x6dc50){return _0x1ff143(_0x3cede6,_0x6dc50);},'LwsVc':_0x364b00(0xc3),'fbjso':'settings.json'},_0x14ccc4=getRangerDir();if(!_0x33af17['gfWPo'](existsSync,_0x14ccc4))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2dca24=await _0x33af17['PeFLZ'](readActiveProfileName),_0x2844a6=[],_0x59bbc5={},_0x49fc81=join(_0x14ccc4,_0x364b00(0xb1));if(existsSync(_0x49fc81)){const _0x524f77=await _0x33af17[_0x364b00(0xab)](readdir,_0x49fc81);for(const _0x49ebf9 of _0x524f77){const _0x381ef3=join(_0x49fc81,_0x49ebf9),_0x5078e3=await _0x33af17[_0x364b00(0xb9)](stat,_0x381ef3);_0x5078e3['isDirectory']()&&(_0x2844a6['push'](_0x49ebf9),_0x59bbc5[_0x49ebf9]=_0x33af17['CwTsQ']);}}const _0x291624=_0x33af17[_0x364b00(0xa0)](join,_0x14ccc4,'ci');if(existsSync(_0x291624)){const _0x4476fc=await _0x33af17[_0x364b00(0xc8)](readdir,_0x291624);for(const _0x2a0b53 of _0x4476fc){const _0x249ed9=_0x33af17[_0x364b00(0xaf)](join,_0x291624,_0x2a0b53),_0x24186c=await stat(_0x249ed9);_0x24186c['isDirectory']()&&(_0x2844a6[_0x364b00(0xb0)](_0x2a0b53),_0x59bbc5[_0x2a0b53]='ci');}}const _0xd777ae=await readdir(_0x14ccc4);for(const _0x50b59b of _0xd777ae){if(NON_ENV_DIRS[_0x364b00(0xb2)](_0x50b59b))continue;if(_0x50b59b['startsWith']('.'))continue;if(_0x50b59b['endsWith'](_0x33af17[_0x364b00(0xa8)]))continue;const _0x3c67bd=_0x33af17[_0x364b00(0xaf)](join,_0x14ccc4,_0x50b59b),_0x12fb87=await _0x33af17['odbbD'](stat,_0x3c67bd);_0x12fb87['isDirectory']()&&existsSync(_0x33af17[_0x364b00(0xa0)](join,_0x3c67bd,_0x33af17['fbjso']))&&(!_0x2844a6[_0x364b00(0xb2)](_0x50b59b)&&(_0x2844a6[_0x364b00(0xb0)](_0x50b59b),_0x59bbc5[_0x50b59b]='legacy'));}return{'envNames':_0x2844a6,'activeEnv':_0x2dca24,'envTypes':_0x59bbc5};}export async function envList(){const _0x56aa22=_0x416b38,_0x20d551={'dMdvg':function(_0x5e135b){return _0x5e135b();},'gerbS':function(_0x59afe0,_0x24f562){return _0x59afe0===_0x24f562;},'hgwKm':function(_0x156ec6,_0x191881){return _0x156ec6===_0x191881;},'AjnDN':_0x56aa22(0x9d),'hXsYD':function(_0x46f994,_0x3671e9){return _0x46f994>_0x3671e9;},'mMtRj':'\x0aLocal\x20Profiles\x20(legacy):','igKqU':_0x56aa22(0xb1),'MNkbi':'legacy','OfyVr':function(_0x4e6348,_0x50a647){return _0x4e6348>_0x50a647;},'IiuaF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','tBZhR':function(_0x2a2fd6,_0x58ba2c,_0x15ebe7){return _0x2a2fd6(_0x58ba2c,_0x15ebe7);},'lrweu':_0x56aa22(0xc0)},{envNames:_0x178e92,activeEnv:_0x49a849,envTypes:_0x4c1420}=await _0x20d551['dMdvg'](getEnvNames);let _0x5db0e1=[];const _0x2f8740=await getToken();if(_0x2f8740)try{_0x5db0e1=await listCloudProfiles();}catch(_0x1f8638){console[_0x56aa22(0xa3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x1f8638 instanceof Error?_0x1f8638[_0x56aa22(0xae)]:String(_0x1f8638)));}if(_0x20d551[_0x56aa22(0xb4)](_0x178e92[_0x56aa22(0xb5)],0x0)&&_0x20d551[_0x56aa22(0xc1)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){console[_0x56aa22(0xb3)](_0x56aa22(0xbb)),console['log'](_0x20d551[_0x56aa22(0xba)]);return;}const _0x1dba54=new Set(_0x5db0e1['map'](_0x2366c1=>_0x2366c1[_0x56aa22(0xbe)]));if(_0x20d551['hXsYD'](_0x178e92['length'],0x0)){console['log'](_0x20d551['mMtRj']);for(const _0x425a4d of _0x178e92['sort']()){const _0x1559c4=_0x425a4d===_0x49a849&&!_0x1dba54[_0x56aa22(0xa2)](_0x425a4d),_0x269188=_0x4c1420[_0x425a4d]||_0x20d551['igKqU'],_0x55bf7b=await loadSettings(_0x425a4d),_0x57ba9e=_0x269188===_0x20d551['MNkbi']?'':'\x20['+_0x269188+']';console[_0x56aa22(0xb3)]('\x20\x20'+(_0x1559c4?'*\x20':'\x20\x20')+_0x425a4d+_0x57ba9e),_0x55bf7b['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x55bf7b['baseUrl']),_0x55bf7b['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55bf7b[_0x56aa22(0xc2)]);}}const _0x4d2384=(_0x542be7,_0x191403)=>{const _0x2c63ab=_0x56aa22,_0x3ca4bc=_0x542be7[_0x2c63ab(0xbe)]===_0x49a849,_0x1961f1=_0x542be7['sessionUpdatedAt']?_0x2c63ab(0xbc)+_0x542be7[_0x2c63ab(0xc7)]+')':'no\x20session';console['log'](''+_0x191403+(_0x3ca4bc?'*\x20':'\x20\x20')+_0x542be7[_0x2c63ab(0xbe)]),console['log'](_0x191403+_0x2c63ab(0xa1)+_0x1961f1);};if(_0x20d551[_0x56aa22(0xac)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){if(shouldGroupByEnvironment(_0x5db0e1)){console[_0x56aa22(0xb3)]('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x563852 of groupCloudProfilesByEnvironment(_0x5db0e1)){const _0x4eab31=_0x563852['environmentKey']??_0x20d551['IiuaF'];console['log'](_0x56aa22(0xa9)+_0x4eab31);for(const _0x106a92 of _0x563852[_0x56aa22(0xa7)]){_0x20d551['tBZhR'](_0x4d2384,_0x106a92,_0x20d551['lrweu']);}}}else{console['log']('\x0aCloud\x20Profiles:');for(const _0x29bf85 of[..._0x5db0e1]['sort']((_0x47310b,_0x5a2554)=>_0x47310b[_0x56aa22(0xbe)]['localeCompare'](_0x5a2554['name']))){_0x20d551[_0x56aa22(0xb8)](_0x4d2384,_0x29bf85,'\x20\x20');}}}_0x49a849&&console['log'](_0x56aa22(0x9f));}
1
+ function _0x1618(){const _0x51484f=['sort','Tmphk','ToiSk','5189685EmLIpn','localeCompare','\x0aCloud\x20Profiles\x20(by\x20environment):','77NWUFYi','sessionUpdatedAt','name','baseUrl','1210FAMzBc','htsUz','15598mcURNl','legacy','2703452vhRzKu','YxNCR','settings.json','iGIIw','qtpWp','local','\x20\x20\x20\x20\x20\x20URL:\x20','MvTuB','qyrEe','IkNIT','isDirectory','push','settings','CctBI','log','message','10278pYLAWs','114dpMpgk','has','length','includes','FFZTP','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','cwd','environmentDetails','360689qGWDct','projectOverrides','cached\x20(updated\x20','bug-bashes','set','\x0aNo\x20profiles\x20found.','JsBKq','pahLH','LFpJQ','sessions','\x20\x20\x20\x20Session:\x20','GcaUT','all','\x0a\x20\x20','MBQxX','\x0a*\x20=\x20active\x20profile','357762RwFLZy','11445888malsSp','startsWith','authConfig','map','environmentKey'];_0x1618=function(){return _0x51484f;};return _0x1618();}const _0x331e37=_0x539c;(function(_0x33d764,_0x411543){const _0x6b4b12=_0x539c,_0x116517=_0x33d764();while(!![]){try{const _0x4b8949=-parseInt(_0x6b4b12(0x14e))/0x1+-parseInt(_0x6b4b12(0x133))/0x2*(-parseInt(_0x6b4b12(0x146))/0x3)+parseInt(_0x6b4b12(0x135))/0x4+parseInt(_0x6b4b12(0x12a))/0x5+parseInt(_0x6b4b12(0x15e))/0x6*(parseInt(_0x6b4b12(0x12d))/0x7)+-parseInt(_0x6b4b12(0x15f))/0x8+-parseInt(_0x6b4b12(0x145))/0x9*(parseInt(_0x6b4b12(0x131))/0xa);if(_0x4b8949===_0x411543)break;else _0x116517['push'](_0x116517['shift']());}catch(_0x36426e){_0x116517['push'](_0x116517['shift']());}}}(_0x1618,0xb3cc4));function _0x539c(_0x192169,_0x12c1e5){_0x192169=_0x192169-0x127;const _0x16181f=_0x1618();let _0x539cb8=_0x16181f[_0x192169];return _0x539cb8;}import{readdir,stat}from'fs/promises';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{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=[_0x331e37(0x157),_0x331e37(0x151),'reports','local','ci'];export function shouldGroupByEnvironment(_0xd843){return _0xd843['some'](_0xac504d=>_0xac504d['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x480525){const _0xfce4c1=_0x331e37,_0x40a94a=new Map();for(const _0x2c6e88 of _0x480525){const _0x54ff2a=_0x2c6e88[_0xfce4c1(0x163)]??null,_0x24952d=_0x40a94a['get'](_0x54ff2a);if(_0x24952d)_0x24952d['push'](_0x2c6e88);else _0x40a94a[_0xfce4c1(0x152)](_0x54ff2a,[_0x2c6e88]);}const _0x2f49b3=[..._0x40a94a['keys']()][_0xfce4c1(0x127)]((_0x5b89a9,_0x404a2d)=>{if(_0x5b89a9===null)return 0x1;if(_0x404a2d===null)return-0x1;return _0x5b89a9['localeCompare'](_0x404a2d);});return _0x2f49b3[_0xfce4c1(0x162)](_0x2e7a0a=>({'environmentKey':_0x2e7a0a,'profiles':_0x40a94a['get'](_0x2e7a0a)['sort']((_0x425f3a,_0x261af6)=>_0x425f3a['name'][_0xfce4c1(0x12b)](_0x261af6['name']))}));}function expandString(_0x8cee1c){const _0x38f93a={'Aoaxc':function(_0x278f12,_0x481899){return _0x278f12(_0x481899);}};if(!_0x8cee1c)return undefined;return _0x38f93a['Aoaxc'](resolveEnvVars,_0x8cee1c);}function expandProfileOverrides(_0x564607){const _0x50aabb={'zduek':function(_0x19f4fc,_0x541434){return _0x19f4fc(_0x541434);}};if(!_0x564607)return null;return{..._0x564607,'baseUrl':expandString(_0x564607['baseUrl']),'startPath':_0x50aabb['zduek'](expandString,_0x564607['startPath'])};}export function resolveCloudProfileListUrl(_0x47a9c6,_0x283ec4={}){const _0x29ec07=_0x331e37,_0x52c8a9={'vJpFb':function(_0x199369,_0x235db2){return _0x199369(_0x235db2);},'oenDJ':function(_0x5d62d5,_0x563a88){return _0x5d62d5(_0x563a88);},'JsBKq':function(_0x1b4f29,_0x5f01a7){return _0x1b4f29(_0x5f01a7);},'YyFLC':function(_0xb9e827,_0x1a7de0){return _0xb9e827(_0x1a7de0);}},_0x2f14d4=_0x47a9c6[_0x29ec07(0x141)]??{},_0x51c523=_0x283ec4['authConfig']?resolveAuthEnvironmentLocally(_0x283ec4[_0x29ec07(0x161)],_0x47a9c6['environmentKey']):null,_0xa67ee8=_0x52c8a9['vJpFb'](resolveProfileUrl,{'projectOverrides':_0x52c8a9['oenDJ'](expandProfileOverrides,_0x283ec4[_0x29ec07(0x14f)]??null),'cloudSettings':{'baseUrl':_0x52c8a9[_0x29ec07(0x154)](expandString,_0x2f14d4['baseUrl']),'startPath':_0x52c8a9['YyFLC'](expandString,_0x2f14d4['startPath'])},'authEnvironmentDomain':_0x51c523?.['domains']?.[0x0]});return{'baseUrl':_0xa67ee8[_0x29ec07(0x130)],'source':_0xa67ee8['baseUrlSource']};}async function loadCloudProfileListUrls(_0x3794d3){const _0x4d4313=_0x331e37,_0x14a10f={'GktvM':function(_0x59bbbe,_0x345656){return _0x59bbbe(_0x345656);},'FXGAA':function(_0x4ae34a,_0x5af460){return _0x4ae34a(_0x5af460);},'IRAAF':function(_0x15988d,_0xa000a6){return _0x15988d===_0xa000a6;},'LFpJQ':function(_0x384eb6){return _0x384eb6();}},_0xa67bd0=new Map();if(_0x14a10f['IRAAF'](_0x3794d3['length'],0x0))return _0xa67bd0;const _0x37d443=await _0x14a10f[_0x4d4313(0x156)](fetchAuthConfig);return await Promise[_0x4d4313(0x15a)](_0x3794d3[_0x4d4313(0x162)](async _0x4e9ad9=>{const _0x46b2eb=_0x4d4313;try{const _0xac5f42=await _0x14a10f['GktvM'](fetchCloudProfile,_0x4e9ad9['name']);if(!_0xac5f42)return;_0xa67bd0['set'](_0x4e9ad9['name'],resolveCloudProfileListUrl(_0xac5f42,{'authConfig':_0x37d443,'projectOverrides':readProfileOverrides(process[_0x46b2eb(0x14c)](),_0x4e9ad9[_0x46b2eb(0x12f)])}));}catch(_0x90b499){console['error'](_0x46b2eb(0x14b)+_0x4e9ad9['name']+'\x22:\x20'+(_0x90b499 instanceof Error?_0x90b499['message']:_0x14a10f['FXGAA'](String,_0x90b499)));}})),_0xa67bd0;}export async function getEnvNames(){const _0x4de884=_0x331e37,_0x3723f9={'pahLH':function(_0x52c36c){return _0x52c36c();},'XaCFj':function(_0x27653e,_0x18ac02){return _0x27653e(_0x18ac02);},'MBQxX':function(_0x2353b3,_0x2a5f6f,_0x465cd3){return _0x2353b3(_0x2a5f6f,_0x465cd3);},'Tmphk':_0x4de884(0x13a),'VdlVP':function(_0x4e3b4d,_0x4aa903){return _0x4e3b4d(_0x4aa903);},'qyrEe':function(_0x11af28,_0x2dc072,_0x34d936){return _0x11af28(_0x2dc072,_0x34d936);},'IkNIT':function(_0x32e8d5,_0x47b1fe,_0x1ee9ae){return _0x32e8d5(_0x47b1fe,_0x1ee9ae);},'FFZTP':function(_0x37b7ff,_0x2d92d0){return _0x37b7ff(_0x2d92d0);},'iGIIw':'.txt','MvTuB':function(_0x14cbce,_0x5f006f,_0x31bee3){return _0x14cbce(_0x5f006f,_0x31bee3);},'CvJMu':function(_0x4ad5dd,_0x20be1f){return _0x4ad5dd(_0x20be1f);}},_0x4cf030=_0x3723f9[_0x4de884(0x155)](getRangerDir);if(!_0x3723f9['XaCFj'](existsSync,_0x4cf030))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4035e3=await _0x3723f9['pahLH'](readActiveProfileName),_0xa5bcf6=[],_0x8c3e6a={},_0x19517e=_0x3723f9[_0x4de884(0x15c)](join,_0x4cf030,_0x3723f9[_0x4de884(0x128)]);if(_0x3723f9['VdlVP'](existsSync,_0x19517e)){const _0xef1012=await readdir(_0x19517e);for(const _0x3a00ec of _0xef1012){const _0x49934b=_0x3723f9[_0x4de884(0x13d)](join,_0x19517e,_0x3a00ec),_0x32a358=await stat(_0x49934b);_0x32a358[_0x4de884(0x13f)]()&&(_0xa5bcf6[_0x4de884(0x140)](_0x3a00ec),_0x8c3e6a[_0x3a00ec]=_0x4de884(0x13a));}}const _0x24df52=_0x3723f9[_0x4de884(0x13e)](join,_0x4cf030,'ci');if(existsSync(_0x24df52)){const _0x2b6110=await readdir(_0x24df52);for(const _0x22e2d2 of _0x2b6110){const _0x1b13f7=join(_0x24df52,_0x22e2d2),_0x3341a6=await _0x3723f9[_0x4de884(0x14a)](stat,_0x1b13f7);_0x3341a6[_0x4de884(0x13f)]()&&(_0xa5bcf6[_0x4de884(0x140)](_0x22e2d2),_0x8c3e6a[_0x22e2d2]='ci');}}const _0x216c9a=await _0x3723f9[_0x4de884(0x14a)](readdir,_0x4cf030);for(const _0x4deae5 of _0x216c9a){if(NON_ENV_DIRS[_0x4de884(0x149)](_0x4deae5))continue;if(_0x4deae5[_0x4de884(0x160)]('.'))continue;if(_0x4deae5['endsWith'](_0x3723f9[_0x4de884(0x138)]))continue;const _0x33fcbf=_0x3723f9[_0x4de884(0x13c)](join,_0x4cf030,_0x4deae5),_0x205e11=await stat(_0x33fcbf);_0x205e11['isDirectory']()&&_0x3723f9['CvJMu'](existsSync,join(_0x33fcbf,_0x4de884(0x137)))&&(!_0xa5bcf6[_0x4de884(0x149)](_0x4deae5)&&(_0xa5bcf6['push'](_0x4deae5),_0x8c3e6a[_0x4deae5]=_0x4de884(0x134)));}return{'envNames':_0xa5bcf6,'activeEnv':_0x4035e3,'envTypes':_0x8c3e6a};}export async function envList(){const _0x2a7b74=_0x331e37,_0x5e016={'ToiSk':'no\x20session','YxNCR':function(_0xb57b41){return _0xb57b41();},'UmmIF':function(_0x9770ec){return _0x9770ec();},'CctBI':function(_0x450a56,_0x1fbdf3){return _0x450a56(_0x1fbdf3);},'qtpWp':function(_0x46a8b4,_0x3b6775){return _0x46a8b4===_0x3b6775;},'YvBic':function(_0x30d575,_0x3bc96f){return _0x30d575===_0x3bc96f;},'atQkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','MQeDG':function(_0x4fa6fc,_0x2f932d){return _0x4fa6fc===_0x2f932d;},'rhvRE':function(_0x25422f,_0x5edb94,_0x2e5b99){return _0x25422f(_0x5edb94,_0x2e5b99);},'GcaUT':function(_0x3f1bc7,_0x550474){return _0x3f1bc7===_0x550474;},'htsUz':function(_0x5368e8,_0x1c53ac){return _0x5368e8(_0x1c53ac);},'AoXWf':'\x20\x20\x20\x20'},{envNames:_0x520e60,activeEnv:_0x185b7c,envTypes:_0x5240f1}=await _0x5e016[_0x2a7b74(0x136)](getEnvNames);let _0x2f1ddb=[],_0x4b4425=new Map();const _0x40132f=await _0x5e016['UmmIF'](getToken);if(_0x40132f)try{_0x2f1ddb=await listCloudProfiles(),_0x4b4425=await _0x5e016[_0x2a7b74(0x142)](loadCloudProfileListUrls,_0x2f1ddb);}catch(_0x22fc23){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x22fc23 instanceof Error?_0x22fc23[_0x2a7b74(0x144)]:_0x5e016['CctBI'](String,_0x22fc23)));}if(_0x5e016[_0x2a7b74(0x139)](_0x520e60[_0x2a7b74(0x148)],0x0)&&_0x5e016['YvBic'](_0x2f1ddb['length'],0x0)){console[_0x2a7b74(0x143)](_0x2a7b74(0x153)),console['log'](_0x5e016['atQkC']);return;}const _0xcf6da7=new Set(_0x2f1ddb['map'](_0xf6d734=>_0xf6d734[_0x2a7b74(0x12f)]));if(_0x520e60['length']>0x0){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x4ddc67 of _0x520e60[_0x2a7b74(0x127)]()){const _0x2b6655=_0x5e016['MQeDG'](_0x4ddc67,_0x185b7c)&&!_0xcf6da7[_0x2a7b74(0x147)](_0x4ddc67),_0x10f24c=_0x5240f1[_0x4ddc67]||'local',_0x48f22d=await _0x5e016[_0x2a7b74(0x142)](loadSettings,_0x4ddc67),_0x44cb36=_0x5e016[_0x2a7b74(0x142)](resolveProfileUrl,{'localSettingsBaseUrl':expandString(_0x48f22d['baseUrl']),'projectOverrides':expandProfileOverrides(_0x5e016['rhvRE'](readProfileOverrides,process[_0x2a7b74(0x14c)](),_0x4ddc67))}),_0x2051ae=_0x5e016[_0x2a7b74(0x159)](_0x10f24c,'legacy')?'':'\x20['+_0x10f24c+']';console[_0x2a7b74(0x143)]('\x20\x20'+(_0x2b6655?'*\x20':'\x20\x20')+_0x4ddc67+_0x2051ae),_0x44cb36[_0x2a7b74(0x130)]&&console['log'](_0x2a7b74(0x13b)+_0x44cb36[_0x2a7b74(0x130)]),_0x48f22d[_0x2a7b74(0x14d)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x48f22d['environmentDetails']);}}const _0x58d1a5=(_0x46f272,_0x54479d)=>{const _0x3e62c7=_0x2a7b74,_0x8b8756=_0x46f272[_0x3e62c7(0x12f)]===_0x185b7c,_0x190ec2=_0x46f272[_0x3e62c7(0x12e)]?_0x3e62c7(0x150)+_0x46f272['sessionUpdatedAt']+')':_0x5e016[_0x3e62c7(0x129)],_0x43a287=_0x4b4425['get'](_0x46f272[_0x3e62c7(0x12f)]);console[_0x3e62c7(0x143)](''+_0x54479d+(_0x8b8756?'*\x20':'\x20\x20')+_0x46f272['name']),_0x43a287?.['baseUrl']&&console[_0x3e62c7(0x143)](_0x54479d+'\x20\x20\x20\x20URL:\x20'+_0x43a287[_0x3e62c7(0x130)]),console['log'](_0x54479d+_0x3e62c7(0x158)+_0x190ec2);};if(_0x2f1ddb['length']>0x0){if(shouldGroupByEnvironment(_0x2f1ddb)){console['log'](_0x2a7b74(0x12c));for(const _0x53b308 of _0x5e016[_0x2a7b74(0x132)](groupCloudProfilesByEnvironment,_0x2f1ddb)){const _0x3f4c18=_0x53b308['environmentKey']??'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)';console[_0x2a7b74(0x143)](_0x2a7b74(0x15b)+_0x3f4c18);for(const _0x5c0d14 of _0x53b308['profiles']){_0x58d1a5(_0x5c0d14,_0x5e016['AoXWf']);}}}else{console[_0x2a7b74(0x143)]('\x0aCloud\x20Profiles:');for(const _0x3299ce of[..._0x2f1ddb]['sort']((_0x287d43,_0x560e71)=>_0x287d43['name']['localeCompare'](_0x560e71[_0x2a7b74(0x12f)]))){_0x58d1a5(_0x3299ce,'\x20\x20');}}}_0x185b7c&&console['log'](_0x2a7b74(0x15d));}