@ranger-testing/ranger-cli 3.1.6-alpha.4de822b-51 → 3.1.6-alpha.aca5f9c-53

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 (87) 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/build/skills/ranger/SKILL.md +1 -0
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- function _0xfe3b(_0x5eefa9,_0x1be87e){_0x5eefa9=_0x5eefa9-0xa7;const _0x54305e=_0x5430();let _0xfe3b09=_0x54305e[_0x5eefa9];return _0xfe3b09;}const _0x44fd4d=_0xfe3b;(function(_0x28de94,_0x43538c){const _0x146390=_0xfe3b,_0xa74839=_0x28de94();while(!![]){try{const _0x568b2d=parseInt(_0x146390(0xcc))/0x1+parseInt(_0x146390(0xdc))/0x2*(-parseInt(_0x146390(0xf8))/0x3)+parseInt(_0x146390(0x100))/0x4+-parseInt(_0x146390(0xb0))/0x5*(-parseInt(_0x146390(0xfe))/0x6)+parseInt(_0x146390(0xc1))/0x7*(-parseInt(_0x146390(0xf5))/0x8)+parseInt(_0x146390(0xc2))/0x9*(-parseInt(_0x146390(0x119))/0xa)+-parseInt(_0x146390(0xfd))/0xb*(-parseInt(_0x146390(0xbb))/0xc);if(_0x568b2d===_0x43538c)break;else _0xa74839['push'](_0xa74839['shift']());}catch(_0x45ab86){_0xa74839['push'](_0xa74839['shift']());}}}(_0x5430,0xd94ca));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x31a510 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';function _0x5430(){const _0x58ddb3=['syjza','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','authEnv','capture','⚠\x20Could\x20not\x20reach\x20','VSJWT','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','isTTY','length','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','error','wNIjN','Invalid\x20URL','kYcRm','trackPhaseEnd','use_suggestion','profile.add.autoRouteSkipped','rxEoC','\x20\x20Did\x20you\x20mean\x20','setupHeaders','kdTKP','5360210CfgRIf','force','setupHeader','environments','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','includes','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','Could\x20not\x20reach\x20','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','profile.add.autoRouted','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x0a✓\x20Profile\x20\x27','no_auth_config','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Enter\x20a\x20different\x20URL','XcbJq','\x27\x20created\x20(CDP).','tMnsK','HzZhy','KxgXp','exit','isElectron','fckpr','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','cwd','DRWQB','AAfkX','\x27\x20created.\x0a','PRlqY','yes','1354550ZWmpZE','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','gjkRO','isProtocolError','vMFQn','message','\x27\x20to\x20the\x20cloud?','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','abort','ysFNR','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','12kpQoAO','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','saveToCloud','some','knVPW','manual','91DxHTEQ','27VndZoi','continue','tiBrM','EcGSP','http://localhost:3000','AgOTk','hVTSa','join','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','signal','1441500Oqzmvv','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','clXeS','\x27\x20created\x20(no\x20session).\x0a','aTwiY','Invalid\x20--setup-header\x20format:\x20\x22','prompt','TypeError','✓\x20Profile\x20\x27','env','slice','\x0a\x20\x20A\x20profile\x20named\x20\x22','DxkBv',')\x0a\x20\x20Save\x20\x27','\x0a🌐\x20Profile\x20Setup\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','2UvdIjv','OSgEL','cdpEndpoint','mlotr','status','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','origin','url','dRjvW','XsubD','fzGtc','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','HEAD','Continue\x20anyway','log','keys','HTTP\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x20\x20https://docs.ranger.net/main/concepts/profiles','skipAuth','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','vfUrL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','baseUrl','VMLSP','166336BFSauq','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','bTrBA','1409217EwtJwu','warn','vWloS','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','local','14763903hVaOoN','6IogHSZ','trim','734292oaSUzJ','user_declined','taSQm'];_0x5430=function(){return _0x58ddb3;};return _0x5430();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x44fd4d(0xa9);function warnCloudProfileSharedInOrg(){const _0x5c5dd0=_0x44fd4d;if(!process['stdout'][_0x5c5dd0(0x10b)])return;console[_0x5c5dd0(0xf9)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x346853){const _0x5644c2=_0x44fd4d,_0x3aeaa4={'tiBrM':function(_0x4d7464,_0x8c6d80,_0x2e8a66){return _0x4d7464(_0x8c6d80,_0x2e8a66);},'gjkRO':_0x5644c2(0xe8),'JDggJ':_0x5644c2(0xc0),'DxkBv':function(_0x6fed86,_0x5051bb,_0x3daef5){return _0x6fed86(_0x5051bb,_0x3daef5);},'DRWQB':function(_0x5223c5,_0x337bfb){return _0x5223c5<_0x337bfb;},'syjza':function(_0x5b3d91,_0x917aee){return _0x5b3d91(_0x917aee);},'VQKvc':_0x5644c2(0xd3)};try{const _0x20fdd9=new AbortController(),_0x4ba2fd=_0x3aeaa4[_0x5644c2(0xc4)](setTimeout,()=>_0x20fdd9[_0x5644c2(0xb8)](),0x1388),_0x1d41db={'method':_0x3aeaa4[_0x5644c2(0xb2)],'signal':_0x20fdd9[_0x5644c2(0xcb)],'redirect':_0x3aeaa4['JDggJ']};/^https:\/\/localhost(:\d+)?/i['test'](_0x346853)&&(process[_0x5644c2(0xd5)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4016d8=await _0x3aeaa4[_0x5644c2(0xd8)](fetch,_0x346853,_0x1d41db);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4ba2fd);if(_0x3aeaa4[_0x5644c2(0xab)](_0x4016d8[_0x5644c2(0xe0)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x5644c2(0xec)+_0x4016d8[_0x5644c2(0xe0)]};}catch(_0x55192b){delete process[_0x5644c2(0xd5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4102c4=_0x55192b,_0x52754a=_0x4102c4['message']||_0x3aeaa4[_0x5644c2(0x103)](String,_0x55192b),_0x13068a=_0x52754a[_0x5644c2(0x11e)](_0x5644c2(0x110))||_0x4102c4['name']===_0x3aeaa4['VQKvc']||_0x52754a[_0x5644c2(0x11e)]('fetch\x20failed');return{'ok':![],'error':_0x52754a,'isProtocolError':_0x13068a};}}async function sweepOrphanLocalProfile(_0x504e42,_0x541fac,_0x3a2a5a){const _0x2a16a7=_0x44fd4d,_0x5003ff={'RnrXl':_0x2a16a7(0xfc),'USsrM':function(_0x1096dc,_0x44e42b){return _0x1096dc(_0x44e42b);}},_0x39341b=join(_0x541fac,_0x5003ff['RnrXl']),_0x3ad916=join(_0x39341b,_0x504e42);existsSync(_0x3ad916)&&(_0x3a2a5a&&await isPathGitTracked(_0x3ad916)?console['log'](_0x2a16a7(0xcd)+_0x3ad916+_0x2a16a7(0xbc)):(await rm(_0x3ad916,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3ad916)));if(_0x5003ff['USsrM'](existsSync,_0x39341b)){let _0x4900a2=[];try{_0x4900a2=await readdir(_0x39341b);}catch{return;}const _0x24ab10='.tmp-'+_0x504e42+'-';for(const _0x382bfa of _0x4900a2){if(!_0x382bfa['startsWith'](_0x24ab10))continue;const _0x596d07=join(_0x39341b,_0x382bfa);await rm(_0x596d07,{'recursive':!![],'force':!![]}),console['log'](_0x2a16a7(0x11f)+_0x596d07);}}}async function sweepOrphansBestEffort(_0x6ca856){const _0xa2aeef=_0x44fd4d,_0x15dbb1={'taSQm':function(_0xd03256,_0x507f8a,_0x2bfaef,_0x5776d0){return _0xd03256(_0x507f8a,_0x2bfaef,_0x5776d0);},'OZlLv':function(_0x477a6c){return _0x477a6c();},'niBOM':function(_0x485128,_0x51dc26){return _0x485128!==_0x51dc26;},'RUvuA':function(_0x2ac72a){return _0x2ac72a();},'IRSnK':function(_0x5cc333,_0x200277){return _0x5cc333(_0x200277);}};try{await _0x15dbb1[_0xa2aeef(0x102)](sweepOrphanLocalProfile,_0x6ca856,_0x15dbb1['OZlLv'](getRangerHomeDir),![]);const _0x45688d=getRangerDir();_0x15dbb1['niBOM'](_0x45688d,_0x15dbb1['RUvuA'](getRangerHomeDir))&&await sweepOrphanLocalProfile(_0x6ca856,_0x45688d,!![]);}catch(_0x1834f7){console['log'](_0xa2aeef(0x11d)+(_0x1834f7 instanceof Error?_0x1834f7[_0xa2aeef(0xb5)]:_0x15dbb1['IRSnK'](String,_0x1834f7))+').');}}async function markActive(_0x1b403b){const _0x58ccca=_0x44fd4d;try{await writeActiveProfileName(_0x1b403b),console[_0x58ccca(0xea)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1b403b);}catch{console[_0x58ccca(0xea)]('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x14d237,_0x26feb7,_0x138915,_0x483892,_0xe24359){const _0x5a0b19=_0x44fd4d,_0x3e2e0d={'GvvZG':function(_0x32b36a,_0x5825df){return _0x32b36a===_0x5825df;},'knVPW':function(_0x246200){return _0x246200();},'ysFNR':'profile.add.autoRouteSkipped','mlotr':function(_0x45bf49,_0x1720a4){return _0x45bf49 instanceof _0x1720a4;},'WJdNB':function(_0x428e43,_0x333dcf,_0x2536e0,_0x375b4f,_0x3688b7){return _0x428e43(_0x333dcf,_0x2536e0,_0x375b4f,_0x3688b7);},'VaLZu':function(_0x1b729d,_0x3991b2){return _0x1b729d+_0x3991b2;},'Kpnzo':function(_0x1e7882,_0x2de9b6){return _0x1e7882+_0x2de9b6;},'kibJv':_0x5a0b19(0x127),'bTrBA':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','tMnsK':'env_not_found','clXeS':function(_0x231e91,_0x24b284){return _0x231e91+_0x24b284;},'GsOvK':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','eApGs':'no_match','VkSjA':_0x5a0b19(0xbd),'OSgEL':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','kYcRm':function(_0x453245,_0x964cf9){return _0x453245(_0x964cf9);},'JwiTs':_0x5a0b19(0x123)};let _0x24d3c8;try{_0x24d3c8=await _0x3e2e0d[_0x5a0b19(0xbf)](fetchAuthConfig);}catch(_0x527e47){return _0xe24359?.['trackPhaseEnd'](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x126),'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x5a0b19(0x10a)+(_0x3e2e0d['mlotr'](_0x527e47,Error)?_0x527e47['message']:String(_0x527e47))),![];}if((!_0x24d3c8||!_0x24d3c8['environments']||Object['keys'](_0x24d3c8['environments'])[_0x5a0b19(0x10c)]===0x0)&&!_0x138915[_0x5a0b19(0x106)]){if(_0x483892)return await _0x3e2e0d['WJdNB'](captureEnvLessProfile,_0x14d237,_0x26feb7,_0x138915,_0xe24359);return _0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x126),'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x3e2e0d['VaLZu'](_0x3e2e0d['Kpnzo']('\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')+_0x3e2e0d['kibJv']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x14d237+'\x20--url\x20'+_0x26feb7+'\x20--skip-auth\x0a')+'\x0a',_0x5a0b19(0xf0))+_0x3e2e0d[_0x5a0b19(0xf7)]),![];}let _0x19bfc7;if(_0x138915[_0x5a0b19(0x106)]){if(!_0x24d3c8?.['environments']?.[_0x138915[_0x5a0b19(0x106)]]){const _0xf8b888=Object['keys'](_0x24d3c8?.[_0x5a0b19(0x11c)]??{});return _0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d['ysFNR'],{'reason':_0x3e2e0d[_0x5a0b19(0x12b)],'profileName':_0x14d237}),console['error'](_0x3e2e0d[_0x5a0b19(0xce)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x138915['authEnv']+'\x22\x20not\x20found.',_0xf8b888['length']?'\x20Configured\x20envs:\x20'+_0xf8b888[_0x5a0b19(0xc9)](',\x20')+'.':_0x3e2e0d['GsOvK'])),![];}_0x19bfc7=_0x138915['authEnv'];}else _0x19bfc7=matchAuthEnvironment(_0x26feb7,_0x24d3c8);if(!_0x19bfc7)return _0xe24359?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x3e2e0d['eApGs'],'profileName':_0x14d237}),console[_0x5a0b19(0x10e)](_0x5a0b19(0xe7)+_0x26feb7+_0x5a0b19(0xba)+Object['keys'](_0x24d3c8?.[_0x5a0b19(0x11c)]??{})[_0x5a0b19(0xc9)](',\x20')+'.'),![];const _0x2fde74=_0x24d3c8?.['environments']?.[_0x19bfc7],_0x243fa0=_0x2fde74?.['domains']??[];if(_0x483892&&!_0x138915['yes']){const {saveToCloud:_0x503455}=await _0x31a510[_0x5a0b19(0xd2)]([{'type':'confirm','name':_0x3e2e0d['VkSjA'],'message':'Found\x20auth\x20environment\x20\x27'+_0x19bfc7+'\x27\x20matching\x20'+_0x26feb7+'\x0a\x20\x20(domains:\x20'+_0x243fa0[_0x5a0b19(0xc9)](',\x20')+_0x5a0b19(0xd9)+_0x14d237+_0x5a0b19(0xb6),'default':!![]}]);if(!_0x503455)return _0xe24359?.['trackPhaseEnd'](_0x3e2e0d[_0x5a0b19(0xb9)],{'reason':_0x5a0b19(0x101),'profileName':_0x14d237}),console['error'](_0x3e2e0d[_0x5a0b19(0xdd)]),![];}const _0x197cda=_0x243fa0[_0x5a0b19(0xbe)](_0x5ecbc8=>{const _0x2cf98d=_0x5a0b19;try{return _0x3e2e0d['GvvZG'](new URL(_0x5ecbc8)['origin'],new URL(_0x26feb7)[_0x2cf98d(0xe2)]);}catch{return![];}}),_0x2ee321={};!_0x197cda&&(_0x2ee321[_0x5a0b19(0xf3)]=_0x26feb7);try{await createCloudProfile(_0x14d237,_0x19bfc7,{'settings':_0x2ee321}),_0x3e2e0d[_0x5a0b19(0xbf)](warnCloudProfileSharedInOrg);}catch(_0x394ffd){if(_0x3e2e0d[_0x5a0b19(0xdf)](_0x394ffd,ApiError)&&_0x394ffd['status']===0x199){console[_0x5a0b19(0x10e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x14d237+_0x5a0b19(0xca)+(_0x5a0b19(0xf2)+_0x14d237));throw _0x394ffd;}throw _0x394ffd;}return console[_0x5a0b19(0xea)](_0x5a0b19(0xd4)+_0x14d237+_0x5a0b19(0xad)+(_0x5a0b19(0xb7)+_0x14d237)),await _0x3e2e0d[_0x5a0b19(0x111)](sweepOrphansBestEffort,_0x14d237),_0xe24359?.[_0x5a0b19(0x112)](_0x3e2e0d['JwiTs'],{'envKey':_0x19bfc7,'profileName':_0x14d237}),!![];}async function createUnconfiguredCloudProfile(_0x49f3ad,_0x1de777){const _0x29516d=_0x44fd4d;try{await createCloudProfile(_0x49f3ad,undefined,{'settings':_0x1de777}),warnCloudProfileSharedInOrg();}catch(_0xa643d9){_0xa643d9 instanceof ApiError&&_0xa643d9[_0x29516d(0xe0)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x49f3ad+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x49f3ad));throw _0xa643d9;}}async function captureEnvLessProfile(_0x4c143c,_0x5f43b3,_0x2ead48,_0x7d43cd){const _0x3df234=_0x44fd4d,_0x316008={'vfUrL':'confirm','xuZRr':_0x3df234(0xe1),'fckpr':function(_0x439d04,_0x355110){return _0x439d04+_0x355110;},'AAfkX':function(_0x47c116,_0x533b8d){return _0x47c116>_0x533b8d;},'GsYYB':function(_0xa83ec7,_0x73b8d5){return _0xa83ec7 instanceof _0x73b8d5;},'EcGSP':function(_0x142748,_0x537512,_0x2b8585){return _0x142748(_0x537512,_0x2b8585);},'Fygta':function(_0x2cb8ee,_0x5ba61f){return _0x2cb8ee>_0x5ba61f;},'HzZhy':function(_0x5d03ff,_0x213a4b){return _0x5d03ff(_0x213a4b);},'EkCKJ':'profile.add.autoRouted'};if(!_0x2ead48[_0x3df234(0xaf)]){const {capture:_0x26fef8}=await _0x31a510['prompt']([{'type':_0x316008[_0x3df234(0xf1)],'name':_0x3df234(0x107),'message':_0x316008['xuZRr'],'default':!![]}]);if(!_0x26fef8)return _0x7d43cd?.[_0x3df234(0x112)](_0x3df234(0x114),{'reason':_0x3df234(0x101),'profileName':_0x4c143c}),console['error'](_0x3df234(0xfb)+_0x3df234(0x124)),![];}const _0x7e0cac={};if(_0x2ead48['setupHeader'])for(const _0x5a0aca of _0x2ead48[_0x3df234(0x11b)]){const _0x825fb7=_0x5a0aca['indexOf'](':');if(_0x825fb7===-0x1)continue;_0x7e0cac[_0x5a0aca[_0x3df234(0xd6)](0x0,_0x825fb7)['trim']()]=_0x5a0aca[_0x3df234(0xd6)](_0x316008[_0x3df234(0xa8)](_0x825fb7,0x1))['trim']();}const _0x465575={'baseUrl':_0x5f43b3};_0x316008[_0x3df234(0xac)](Object[_0x3df234(0xeb)](_0x7e0cac)[_0x3df234(0x10c)],0x0)&&(_0x465575['setupHeaders']=_0x7e0cac);let _0x51973a;try{_0x51973a=await createCloudProfile(_0x4c143c,undefined,{'settings':_0x465575}),warnCloudProfileSharedInOrg();}catch(_0x44ff30){_0x316008['GsYYB'](_0x44ff30,ApiError)&&_0x44ff30['status']===0x199&&console['error'](_0x3df234(0xd7)+_0x4c143c+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4c143c));throw _0x44ff30;}return await _0x316008[_0x3df234(0xc5)](manualBrowserLogin,_0x51973a,{'key':'','domains':[_0x5f43b3],'setupHeaders':_0x316008['Fygta'](Object['keys'](_0x7e0cac)['length'],0x0)?_0x7e0cac:undefined}),console[_0x3df234(0xea)](_0x3df234(0x125)+_0x4c143c+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x4c143c)),await _0x316008[_0x3df234(0x12c)](sweepOrphansBestEffort,_0x4c143c),_0x7d43cd?.['trackPhaseEnd'](_0x316008['EkCKJ'],{'envKey':null,'profileName':_0x4c143c}),!![];}export async function addEnv(_0x40a4e1,_0xd3e0b7={},_0x5c601e){const _0x259c0d=_0x44fd4d,_0x56ed91={'vWloS':function(_0x1448a9,_0x497f1a){return _0x1448a9+_0x497f1a;},'hraNx':function(_0x595837,_0x123503){return _0x595837+_0x123503;},'aTwiY':_0x259c0d(0x105),'oGGOx':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','ARyAk':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','NcKps':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','LCDzF':_0x259c0d(0x121),'AgOTk':function(_0x567777,_0x159215){return _0x567777===_0x159215;},'HckAE':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','hVTSa':_0x259c0d(0xb1),'QcBlT':function(_0x2307b2){return _0x2307b2();},'rxEoC':'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','lALKT':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','kdTKP':function(_0x43f6d7,_0x54ef33){return _0x43f6d7>_0x54ef33;},'XsubD':function(_0x21518e,_0x514f52,_0x8c32c8){return _0x21518e(_0x514f52,_0x8c32c8);},'cpTnj':'cdpEndpoint','fzGtc':function(_0x106133,_0x55ef15,_0x5a5577,_0x473994,_0x594223){return _0x106133(_0x55ef15,_0x5a5577,_0x473994,_0x594223);},'eOCTZ':function(_0x35f958,_0x59e329){return _0x35f958 instanceof _0x59e329;},'VMLSP':function(_0x56695b,_0x43b35f){return _0x56695b(_0x43b35f);},'BmFXZ':function(_0x1cf04d,_0x21901d){return _0x1cf04d(_0x21901d);},'wNIjN':'input','KxgXp':_0x259c0d(0xf3),'VSJWT':_0x259c0d(0xed),'ZczSh':function(_0xe47c05,_0x15a01b){return _0xe47c05||_0x15a01b;},'XcbJq':'action','dRjvW':'use_suggestion','eJbTY':'retry','PRlqY':_0x259c0d(0xc3),'vMFQn':function(_0x2a106b,_0x27070b){return _0x2a106b===_0x27070b;}};_0xd3e0b7['ci']&&(console['error'](_0x56ed91['vWloS'](_0x56ed91[_0x259c0d(0xfa)](_0x56ed91['hraNx'](_0x56ed91[_0x259c0d(0xd0)]+_0x56ed91['oGGOx'],'\x0a')+_0x56ed91['ARyAk'],_0x56ed91['NcKps'])+'\x0a'+_0x56ed91['LCDzF'],_0x259c0d(0xee))),process['exit'](0x1));const _0x151bb7={};if(_0xd3e0b7[_0x259c0d(0x11b)])for(const _0x386008 of _0xd3e0b7['setupHeader']){const _0xbf5992=_0x386008['indexOf'](':');if(_0x56ed91[_0x259c0d(0xc7)](_0xbf5992,-0x1))throw new Error(_0x259c0d(0xd1)+_0x386008+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0xb4fd7c=_0x386008['slice'](0x0,_0xbf5992)[_0x259c0d(0xff)](),_0x2f1206=_0x386008['slice'](_0xbf5992+0x1)[_0x259c0d(0xff)]();_0x151bb7[_0xb4fd7c]=_0x2f1206;}if(_0xd3e0b7['cdpEndpoint']!==undefined&&_0xd3e0b7[_0x259c0d(0xde)][_0x259c0d(0xff)]()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0xd3e0b7[_0x259c0d(0xde)]&&_0xd3e0b7[_0x259c0d(0xe3)])throw new Error(_0x56ed91['HckAE']);if(_0xd3e0b7['authEnv']&&_0xd3e0b7[_0x259c0d(0xef)])throw new Error(_0x56ed91[_0x259c0d(0xc8)]);if(_0xd3e0b7['authEnv']&&_0xd3e0b7[_0x259c0d(0xde)])throw new Error(_0x259c0d(0x122));const _0x299b89=Boolean(_0xd3e0b7[_0x259c0d(0xde)]),_0xd9351b=_0x56ed91['QcBlT'](isInteractive);if(!_0xd9351b&&!_0xd3e0b7['url']&&!_0x299b89&&!_0xd3e0b7[_0x259c0d(0xef)])throw new Error(_0x56ed91[_0x259c0d(0x115)]);if(_0x299b89){const _0x32f2eb=_0xd3e0b7[_0x259c0d(0xde)];console['log'](_0x56ed91['lALKT']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x32f2eb);const _0x18bd3b={'cdpEndpoint':_0x32f2eb,'isElectron':!![]};_0x56ed91[_0x259c0d(0x118)](Object['keys'](_0x151bb7)[_0x259c0d(0x10c)],0x0)&&(_0x18bd3b[_0x259c0d(0x117)]=_0x151bb7);await _0x56ed91[_0x259c0d(0xe5)](createUnconfiguredCloudProfile,_0x40a4e1,_0x18bd3b);try{setProfileOverride(process[_0x259c0d(0xaa)](),_0x40a4e1,_0x56ed91['cpTnj'],_0x32f2eb),_0x56ed91[_0x259c0d(0xe6)](setProfileOverride,process['cwd'](),_0x40a4e1,_0x259c0d(0xa7),!![]);}catch(_0x51a81f){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x56ed91['eOCTZ'](_0x51a81f,Error)?_0x51a81f['message']:_0x56ed91[_0x259c0d(0xf4)](String,_0x51a81f)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x40a4e1+_0x259c0d(0x12a)),await sweepOrphansBestEffort(_0x40a4e1),await _0x56ed91['BmFXZ'](markActive,_0x40a4e1);return;}if(_0xd3e0b7['skipAuth']){const _0x64138f={};_0xd3e0b7['url']&&(_0x64138f['baseUrl']=_0xd3e0b7[_0x259c0d(0xe3)]);_0x56ed91['kdTKP'](Object['keys'](_0x151bb7)[_0x259c0d(0x10c)],0x0)&&(_0x64138f[_0x259c0d(0x117)]=_0x151bb7);await createUnconfiguredCloudProfile(_0x40a4e1,_0x64138f),console['log']('✓\x20Profile\x20\x27'+_0x40a4e1+_0x259c0d(0xcf)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x40a4e1+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x40a4e1),await markActive(_0x40a4e1);return;}if(_0xd3e0b7['url']){const _0x47ce8e=_0xd3e0b7[_0x259c0d(0xe3)],_0x11d5c6=await checkUrlReachability(_0x47ce8e);if(!_0x11d5c6['ok']&&!_0xd3e0b7['force'])throw new Error(_0x259c0d(0x120)+_0x47ce8e+':\x20'+_0x11d5c6['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x11d5c6['ok']&&_0xd3e0b7[_0x259c0d(0x11a)]&&console['log'](_0x259c0d(0x108)+_0x47ce8e+':\x20'+_0x11d5c6['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x259c0d(0xea)](_0x259c0d(0xda)),console['log'](_0x259c0d(0x104)),console[_0x259c0d(0xea)](_0x259c0d(0x10d));let _0x3ee2b2='',_0x5b8f5a=![];while(!![]){const _0xfdb7f8=await _0x31a510[_0x259c0d(0xd2)]([{'type':_0x56ed91[_0x259c0d(0x10f)],'name':_0x56ed91[_0x259c0d(0x12d)],'message':_0x5b8f5a?_0x56ed91[_0x259c0d(0x109)]:_0x259c0d(0xf6),'default':_0x56ed91['ZczSh'](_0x3ee2b2,_0x259c0d(0xc6))}]);_0x3ee2b2=_0xfdb7f8[_0x259c0d(0xf3)];const _0x34dff9=await checkUrlReachability(_0x3ee2b2);if(_0x34dff9['ok'])break;const _0x15b31f=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x3ee2b2),_0x2f5d8e=_0x34dff9[_0x259c0d(0xb3)]&&!_0x15b31f,_0x54a547=_0x2f5d8e?'http://'+_0x3ee2b2:null;_0x5b8f5a=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3ee2b2+':\x20'+_0x34dff9['error']);_0x54a547&&console[_0x259c0d(0xea)](_0x259c0d(0x116)+_0x54a547+'?');const {action:_0x5acbcb}=await _0x31a510[_0x259c0d(0xd2)]([{'type':'list','name':_0x56ed91[_0x259c0d(0x129)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x54a547?[{'name':'Use\x20'+_0x54a547,'value':_0x56ed91[_0x259c0d(0xe4)]}]:[],{'name':_0x259c0d(0x128),'value':_0x56ed91['eJbTY']},{'name':_0x259c0d(0xe9),'value':_0x56ed91[_0x259c0d(0xae)]}]}]);if(_0x56ed91[_0x259c0d(0xc7)](_0x5acbcb,_0x259c0d(0x113))&&_0x54a547){_0x3ee2b2=_0x54a547;const _0x4c7d1d=await checkUrlReachability(_0x3ee2b2);if(_0x4c7d1d['ok'])break;console['log'](_0x259c0d(0xdb)+_0x3ee2b2+':\x20'+_0x4c7d1d['error']);}else{if(_0x56ed91[_0x259c0d(0xb4)](_0x5acbcb,'continue'))break;}}_0xd3e0b7={..._0xd3e0b7,'url':_0x3ee2b2};}let _0x10b921=![];try{_0x10b921=await tryAutoRouteCloudProfile(_0x40a4e1,_0xd3e0b7['url'],_0xd3e0b7,_0xd9351b,_0x5c601e);}catch(_0x4c58d2){console[_0x259c0d(0x10e)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x40a4e1+'\x22:\x20'+(_0x4c58d2 instanceof Error?_0x4c58d2['message']:String(_0x4c58d2))),process[_0x259c0d(0x12e)](0x1);}!_0x10b921&&process['exit'](0x1),await markActive(_0x40a4e1);}
1
+ (function(_0xe4ce29,_0x3d7cf3){const _0xa3da43=_0x2836,_0x475f0a=_0xe4ce29();while(!![]){try{const _0x144c88=parseInt(_0xa3da43(0x1c3))/0x1*(parseInt(_0xa3da43(0x212))/0x2)+parseInt(_0xa3da43(0x1e9))/0x3+parseInt(_0xa3da43(0x1fe))/0x4+parseInt(_0xa3da43(0x1d6))/0x5+parseInt(_0xa3da43(0x22a))/0x6*(-parseInt(_0xa3da43(0x21f))/0x7)+-parseInt(_0xa3da43(0x1bb))/0x8+-parseInt(_0xa3da43(0x235))/0x9;if(_0x144c88===_0x3d7cf3)break;else _0x475f0a['push'](_0x475f0a['shift']());}catch(_0x12359d){_0x475f0a['push'](_0x475f0a['shift']());}}}(_0x1a7b,0xf1c22));import{readdir,rm}from'fs/promises';function _0x2836(_0x35f9fc,_0x5a6160){_0x35f9fc=_0x35f9fc-0x1ac;const _0x1a7bc2=_0x1a7b();let _0x2836ea=_0x1a7bc2[_0x35f9fc];return _0x2836ea;}import{join}from'path';import{existsSync}from'fs';import _0x2b71a3 from'inquirer';function _0x1a7b(){const _0x4413df=['AFaIS','list','retry','TrHlR','log','DlRZh','yTxyZ','HEAD','name','6054388VVbbXu','xqbUp','profile.add.autoRouted','input','DeVfr','\x20\x20Did\x20you\x20mean\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','prompt','trackPhaseEnd','\x0a✓\x20Profile\x20\x27','ERkpX','error','✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lajQo','some','Found\x20auth\x20environment\x20\x27','isTTY','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YIxyV','50822SArXNS','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','profile.add.autoRouteSkipped','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','url','TypeError','SSGEk','cdpEndpoint','startsWith','http://','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','pwfCf','42fBGeXF','ZmMvG','test','\x20--url\x20','QTdrF','JFivS','khMGp','\x0a\x20\x20Auth\x20environment\x20\x22','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','TzoMP','exit','911622GQikwB','ixoPh','VJYlH','RAnEi','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Use\x20','XRmUP','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20Configured\x20envs:\x20','14320134njbmsn','XSNhz','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','\x27\x20to\x20the\x20cloud?','\x27\x20matching\x20','isElectron','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','message','\x22:\x20','boTnm','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x27\x20created\x20(no\x20session).\x0a','egKqa','no_auth_config','\x20--skip-auth\x0a','skipAuth','indexOf','\x27\x20created.\x0a','7055544MDwAJd','status','beREe','hUeCB','trim','BKmsG','xDRBN','zTsai','69WQZgGY','\x0a🌐\x20Profile\x20Setup\x0a','stdout','kEilj','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','DZarU','isProtocolError','✓\x20Cloud\x20profile\x20\x27','KWEAc','gDhkw','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','cwd','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','no_match','\x20\x20Set\x20active\x20profile:\x20','2917980urbejO','Continue\x20anyway','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','env_not_found','Ryljw','setupHeader','length','authEnv','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','environments','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20https://docs.ranger.net/main/concepts/profiles','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','fetch\x20failed','YAZOo','rbjYD','1573143qIkxBo','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','includes','saveToCloud','setupHeaders','EZePF','origin','action','force','What\x20would\x20you\x20like\x20to\x20do?','join','http://localhost:3000'];_0x1a7b=function(){return _0x4413df;};return _0x1a7b();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x299297=_0x2836;if(!process[_0x299297(0x1c5)][_0x299297(0x20f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x529afd){const _0x12a9a1=_0x2836,_0x5585ef={'tQwDO':function(_0xd0565c,_0x41a45d){return _0xd0565c<_0x41a45d;},'TrHlR':function(_0x441b57,_0xcfbb12){return _0x441b57===_0xcfbb12;},'KWEAc':_0x12a9a1(0x218),'qgxmu':_0x12a9a1(0x1e6)};try{const _0xe5a2c8=new AbortController(),_0x59bfa5=setTimeout(()=>_0xe5a2c8['abort'](),0x1388),_0x5592bc={'method':_0x12a9a1(0x1fc),'signal':_0xe5a2c8['signal'],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x529afd)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3b918a=await fetch(_0x529afd,_0x5592bc);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x59bfa5);if(_0x5585ef['tQwDO'](_0x3b918a[_0x12a9a1(0x1bc)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x3b918a[_0x12a9a1(0x1bc)]};}catch(_0x198b15){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4e8a04=_0x198b15,_0xabd8b4=_0x4e8a04['message']||String(_0x198b15),_0x1d0e36=_0xabd8b4['includes']('Invalid\x20URL')||_0x5585ef[_0x12a9a1(0x1f8)](_0x4e8a04[_0x12a9a1(0x1fd)],_0x5585ef[_0x12a9a1(0x1cd)])||_0xabd8b4[_0x12a9a1(0x1eb)](_0x5585ef['qgxmu']);return{'ok':![],'error':_0xabd8b4,'isProtocolError':_0x1d0e36};}}async function sweepOrphanLocalProfile(_0x17939c,_0x1c4f04,_0x34d8ae){const _0x13bad1=_0x2836,_0x288f01={'AYehI':function(_0xf57b5a,_0x53f042){return _0xf57b5a(_0x53f042);},'boTnm':function(_0x985d73,_0x3c4d8a,_0x1ed60f){return _0x985d73(_0x3c4d8a,_0x1ed60f);}},_0x9fcfd0=join(_0x1c4f04,'local'),_0x311a1d=join(_0x9fcfd0,_0x17939c);existsSync(_0x311a1d)&&(_0x34d8ae&&await isPathGitTracked(_0x311a1d)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x311a1d+_0x13bad1(0x21d)):(await rm(_0x311a1d,{'recursive':!![],'force':!![]}),console[_0x13bad1(0x1f9)](_0x13bad1(0x1e3)+_0x311a1d)));if(existsSync(_0x9fcfd0)){let _0x7eea84=[];try{_0x7eea84=await _0x288f01['AYehI'](readdir,_0x9fcfd0);}catch{return;}const _0xe059c0='.tmp-'+_0x17939c+'-';for(const _0x454ad9 of _0x7eea84){if(!_0x454ad9[_0x13bad1(0x21b)](_0xe059c0))continue;const _0x82f2e0=join(_0x9fcfd0,_0x454ad9);await _0x288f01[_0x13bad1(0x1b2)](rm,_0x82f2e0,{'recursive':!![],'force':!![]}),console['log'](_0x13bad1(0x1e3)+_0x82f2e0);}}}async function sweepOrphansBestEffort(_0x45bf32){const _0x36ee55=_0x2836,_0xa8178={'DVtKr':function(_0x3c8c29,_0x4c4a4e,_0x526e86,_0x407195){return _0x3c8c29(_0x4c4a4e,_0x526e86,_0x407195);},'UBRke':function(_0x3fa05f){return _0x3fa05f();},'GlMqZ':function(_0x2f64f0){return _0x2f64f0();},'JFivS':function(_0x3e962d,_0x498bf8,_0x1faaeb,_0x31ced9){return _0x3e962d(_0x498bf8,_0x1faaeb,_0x31ced9);},'kEilj':function(_0x502815,_0x1a0d8a){return _0x502815 instanceof _0x1a0d8a;}};try{await _0xa8178['DVtKr'](sweepOrphanLocalProfile,_0x45bf32,_0xa8178['UBRke'](getRangerHomeDir),![]);const _0x25c294=_0xa8178['GlMqZ'](getRangerDir);_0x25c294!==getRangerHomeDir()&&await _0xa8178[_0x36ee55(0x224)](sweepOrphanLocalProfile,_0x45bf32,_0x25c294,!![]);}catch(_0x36d6ef){console[_0x36ee55(0x1f9)](_0x36ee55(0x230)+(_0xa8178[_0x36ee55(0x1c6)](_0x36d6ef,Error)?_0x36d6ef[_0x36ee55(0x1b0)]:String(_0x36d6ef))+').');}}async function markActive(_0xf73eed){const _0x37c922=_0x2836;try{await writeActiveProfileName(_0xf73eed),console[_0x37c922(0x1f9)](_0x37c922(0x1d5)+_0xf73eed);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x5365c3,_0x405dd7){const _0x153200=_0x2836,_0x29344f={'bxrFR':function(_0x12b55c,_0x3f9679){return _0x12b55c instanceof _0x3f9679;},'gDhkw':function(_0x425aad,_0x1ec39c){return _0x425aad===_0x1ec39c;},'nUOqi':_0x153200(0x215),'PSRIU':_0x153200(0x1b6),'DZarU':function(_0x30f99,_0x508235){return _0x30f99+_0x508235;},'YAZOo':_0x153200(0x204),'ZmMvG':_0x153200(0x1da),'ixoPh':_0x153200(0x1d4),'egKqa':'confirm','pwfCf':_0x153200(0x227),'RtslG':function(_0x4825fc,_0x2d232c,_0x2efe85,_0x5daf0e){return _0x4825fc(_0x2d232c,_0x2efe85,_0x5daf0e);},'owyDT':_0x153200(0x200)};let _0x20ce71;try{_0x20ce71=await fetchAuthConfig();}catch(_0x58a94c){return _0x405dd7?.[_0x153200(0x206)](_0x153200(0x215),{'reason':_0x153200(0x1b6),'profileName':_0xd3209e}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x29344f['bxrFR'](_0x58a94c,Error)?_0x58a94c['message']:String(_0x58a94c))),![];}if((!_0x20ce71||!_0x20ce71['environments']||_0x29344f[_0x153200(0x1ce)](Object['keys'](_0x20ce71[_0x153200(0x1e1)])[_0x153200(0x1dd)],0x0))&&!_0x317fba[_0x153200(0x1de)]){if(_0x5365c3)return await captureEnvLessProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x405dd7);return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f['PSRIU'],'profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x1ca)](_0x29344f['DZarU'](_0x29344f[_0x153200(0x1ca)](_0x29344f[_0x153200(0x1ca)]('\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\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+(_0x153200(0x216)+_0xd3209e+_0x153200(0x222)+_0x55afb4+_0x153200(0x1b7)),'\x0a'),_0x29344f[_0x153200(0x1e7)]),_0x153200(0x210))),![];}let _0x5d79a4;if(_0x317fba[_0x153200(0x1de)]){if(!_0x20ce71?.['environments']?.[_0x317fba['authEnv']]){const _0x59d5ef=Object['keys'](_0x20ce71?.[_0x153200(0x1e1)]??{});return _0x405dd7?.[_0x153200(0x206)](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x220)],'profileName':_0xd3209e}),console[_0x153200(0x209)](_0x153200(0x226)+_0x317fba[_0x153200(0x1de)]+'\x22\x20not\x20found.'+(_0x59d5ef['length']?_0x153200(0x234)+_0x59d5ef[_0x153200(0x1f3)](',\x20')+'.':_0x153200(0x1ae))),![];}_0x5d79a4=_0x317fba['authEnv'];}else _0x5d79a4=matchAuthEnvironment(_0x55afb4,_0x20ce71);if(!_0x5d79a4)return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x22b)],'profileName':_0xd3209e}),console['error'](_0x153200(0x1e2)+_0x55afb4+_0x153200(0x1b3)+Object[_0x153200(0x1d9)](_0x20ce71?.[_0x153200(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x286eba=_0x20ce71?.[_0x153200(0x1e1)]?.[_0x5d79a4],_0x1d56ca=_0x286eba?.['domains']??[];if(_0x5365c3&&!_0x317fba[_0x153200(0x22f)]){const {saveToCloud:_0x42de8b}=await _0x2b71a3[_0x153200(0x205)]([{'type':_0x29344f[_0x153200(0x1b5)],'name':_0x153200(0x1ec),'message':_0x153200(0x20e)+_0x5d79a4+_0x153200(0x1ac)+_0x55afb4+'\x0a\x20\x20(domains:\x20'+_0x1d56ca['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xd3209e+_0x153200(0x239),'default':!![]}]);if(!_0x42de8b)return _0x405dd7?.['trackPhaseEnd'](_0x153200(0x215),{'reason':'user_declined','profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x21e)]),![];}const _0x30cea3=_0x1d56ca[_0x153200(0x20d)](_0x1ded45=>{const _0x586f32=_0x153200;try{return new URL(_0x1ded45)[_0x586f32(0x1ef)]===new URL(_0x55afb4)['origin'];}catch{return![];}}),_0x491d50={};!_0x30cea3&&(_0x491d50[_0x153200(0x238)]=_0x55afb4);try{await _0x29344f['RtslG'](createCloudProfile,_0xd3209e,_0x5d79a4,{'settings':_0x491d50}),warnCloudProfileSharedInOrg();}catch(_0x31ec3e){if(_0x31ec3e instanceof ApiError&&_0x31ec3e[_0x153200(0x1bc)]===0x199){console[_0x153200(0x209)](_0x29344f['DZarU']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xd3209e+_0x153200(0x20b),_0x153200(0x1af)+_0xd3209e));throw _0x31ec3e;}throw _0x31ec3e;}return console[_0x153200(0x1f9)](_0x29344f[_0x153200(0x1ca)]('✓\x20Profile\x20\x27'+_0xd3209e+_0x153200(0x1ba),_0x153200(0x237)+_0xd3209e)),await sweepOrphansBestEffort(_0xd3209e),_0x405dd7?.['trackPhaseEnd'](_0x29344f['owyDT'],{'envKey':_0x5d79a4,'profileName':_0xd3209e}),!![];}async function createUnconfiguredCloudProfile(_0x368974,_0xb6a6c1){const _0x18b54a=_0x2836,_0x46f4c7={'qmNxE':function(_0x2480d5,_0x136566){return _0x2480d5 instanceof _0x136566;},'HYwCU':function(_0x25058e,_0x92fd3e){return _0x25058e===_0x92fd3e;},'rbjYD':function(_0x286ce5,_0x2d5112){return _0x286ce5+_0x2d5112;}};try{await createCloudProfile(_0x368974,undefined,{'settings':_0xb6a6c1}),warnCloudProfileSharedInOrg();}catch(_0x978fa){_0x46f4c7['qmNxE'](_0x978fa,ApiError)&&_0x46f4c7['HYwCU'](_0x978fa[_0x18b54a(0x1bc)],0x199)&&console['error'](_0x46f4c7[_0x18b54a(0x1e8)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x368974+_0x18b54a(0x20b),_0x18b54a(0x1af)+_0x368974));throw _0x978fa;}}async function captureEnvLessProfile(_0x270470,_0x40f13a,_0x51ce11,_0x103469){const _0x209869=_0x2836,_0x5b44cd={'KyBhX':'confirm','mGoou':'capture','XRmUP':'user_declined','XSNhz':function(_0x885a17,_0x207f68){return _0x885a17+_0x207f68;},'VUcXA':function(_0x5e8f9a,_0x58544b){return _0x5e8f9a>_0x58544b;},'DlRZh':function(_0x28c002,_0x47342a,_0x4ae56f){return _0x28c002(_0x47342a,_0x4ae56f);},'iUSJQ':function(_0x58c237,_0x179595){return _0x58c237>_0x179595;},'YIxyV':function(_0x454241,_0x2b3360){return _0x454241(_0x2b3360);}};if(!_0x51ce11[_0x209869(0x22f)]){const {capture:_0x101764}=await _0x2b71a3['prompt']([{'type':_0x5b44cd['KyBhX'],'name':_0x5b44cd['mGoou'],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x101764)return _0x103469?.[_0x209869(0x206)](_0x209869(0x215),{'reason':_0x5b44cd[_0x209869(0x232)],'profileName':_0x270470}),console[_0x209869(0x209)](_0x5b44cd[_0x209869(0x236)](_0x209869(0x1cf),_0x209869(0x22e))),![];}const _0xd19664={};if(_0x51ce11['setupHeader'])for(const _0x8a2089 of _0x51ce11['setupHeader']){const _0x298e3c=_0x8a2089[_0x209869(0x1b9)](':');if(_0x298e3c===-0x1)continue;_0xd19664[_0x8a2089['slice'](0x0,_0x298e3c)['trim']()]=_0x8a2089['slice'](_0x298e3c+0x1)[_0x209869(0x1bf)]();}const _0x491abf={'baseUrl':_0x40f13a};_0x5b44cd['VUcXA'](Object[_0x209869(0x1d9)](_0xd19664)[_0x209869(0x1dd)],0x0)&&(_0x491abf[_0x209869(0x1ed)]=_0xd19664);let _0x20d192;try{_0x20d192=await createCloudProfile(_0x270470,undefined,{'settings':_0x491abf}),warnCloudProfileSharedInOrg();}catch(_0x10a886){_0x10a886 instanceof ApiError&&_0x10a886[_0x209869(0x1bc)]===0x199&&console['error'](_0x5b44cd[_0x209869(0x236)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x270470+_0x209869(0x20b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x270470));throw _0x10a886;}return await _0x5b44cd[_0x209869(0x1fa)](manualBrowserLogin,_0x20d192,{'key':'','domains':[_0x40f13a],'setupHeaders':_0x5b44cd['iUSJQ'](Object[_0x209869(0x1d9)](_0xd19664)['length'],0x0)?_0xd19664:undefined}),console['log'](_0x209869(0x207)+_0x270470+_0x209869(0x213)+(_0x209869(0x237)+_0x270470)),await _0x5b44cd[_0x209869(0x211)](sweepOrphansBestEffort,_0x270470),_0x103469?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x270470}),!![];}export async function addEnv(_0x3783a6,_0x556e73={},_0x3c7251){const _0x4b8bf5=_0x2836,_0x24b971={'lajQo':function(_0xe26bbb,_0x4326b3){return _0xe26bbb+_0x4326b3;},'EZePF':function(_0x469158,_0x452501){return _0x469158+_0x452501;},'KgcgA':function(_0x3c59c1,_0x204c52){return _0x3c59c1+_0x204c52;},'RAnEi':_0x4b8bf5(0x1c9),'cyhvG':_0x4b8bf5(0x1e4),'TzoMP':function(_0x575170,_0x165614){return _0x575170===_0x165614;},'TEAMD':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','beREe':_0x4b8bf5(0x1ea),'MsFIY':function(_0x348b61){return _0x348b61();},'VJYlH':_0x4b8bf5(0x1e5),'Ryljw':function(_0xebb997,_0x294895,_0x307a17,_0x26a95b,_0x32dbe3){return _0xebb997(_0x294895,_0x307a17,_0x26a95b,_0x32dbe3);},'yfpLs':_0x4b8bf5(0x21a),'AFaIS':_0x4b8bf5(0x1ad),'SSGEk':function(_0x29c1e8,_0x56697c){return _0x29c1e8 instanceof _0x56697c;},'QTdrF':function(_0x191f7f,_0xaea797){return _0x191f7f(_0xaea797);},'KXpYW':function(_0x210667,_0x33a49d){return _0x210667>_0x33a49d;},'yTxyZ':function(_0x4d8d55,_0x5c39d5,_0x20292a){return _0x4d8d55(_0x5c39d5,_0x20292a);},'DeVfr':function(_0x3e308f,_0x4965d2){return _0x3e308f+_0x4965d2;},'BKmsG':_0x4b8bf5(0x1c4),'ppwMI':_0x4b8bf5(0x1c8),'mRnvQ':_0x4b8bf5(0x201),'xqbUp':_0x4b8bf5(0x214),'khMGp':_0x4b8bf5(0x1f6),'ryQBB':_0x4b8bf5(0x1f2),'hUeCB':_0x4b8bf5(0x1d7),'zTsai':'continue','xDRBN':'use_suggestion','IpngU':function(_0x5a0f40,_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8){return _0x5a0f40(_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8);},'ERkpX':function(_0x41910d,_0x151860){return _0x41910d(_0x151860);}};_0x556e73['ci']&&(console['error'](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x1ee)](_0x24b971['KgcgA'](_0x24b971[_0x4b8bf5(0x1ee)]('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'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x24b971[_0x4b8bf5(0x22d)]),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x24b971['cyhvG'])),process[_0x4b8bf5(0x229)](0x1));const _0x1d908b={};if(_0x556e73[_0x4b8bf5(0x1dc)])for(const _0x223f83 of _0x556e73['setupHeader']){const _0x4d5d89=_0x223f83['indexOf'](':');if(_0x4d5d89===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x223f83+_0x4b8bf5(0x1d3));const _0x51b33a=_0x223f83['slice'](0x0,_0x4d5d89)['trim'](),_0x1ba71b=_0x223f83['slice'](_0x4d5d89+0x1)[_0x4b8bf5(0x1bf)]();_0x1d908b[_0x51b33a]=_0x1ba71b;}if(_0x556e73[_0x4b8bf5(0x21a)]!==undefined&&_0x24b971[_0x4b8bf5(0x228)](_0x556e73[_0x4b8bf5(0x21a)][_0x4b8bf5(0x1bf)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x556e73['cdpEndpoint']&&_0x556e73['url'])throw new Error(_0x24b971['TEAMD']);if(_0x556e73[_0x4b8bf5(0x1de)]&&_0x556e73['skipAuth'])throw new Error(_0x24b971[_0x4b8bf5(0x1bd)]);if(_0x556e73['authEnv']&&_0x556e73[_0x4b8bf5(0x21a)])throw new Error(_0x4b8bf5(0x1d8));const _0x46347d=Boolean(_0x556e73[_0x4b8bf5(0x21a)]),_0x307f93=_0x24b971['MsFIY'](isInteractive);if(!_0x307f93&&!_0x556e73[_0x4b8bf5(0x217)]&&!_0x46347d&&!_0x556e73[_0x4b8bf5(0x1b8)])throw new Error(_0x24b971[_0x4b8bf5(0x22c)]);if(_0x46347d){const _0x1a6bfa=_0x556e73[_0x4b8bf5(0x21a)];console[_0x4b8bf5(0x1f9)](_0x4b8bf5(0x1df)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1a6bfa);const _0x3cda6e={'cdpEndpoint':_0x1a6bfa,'isElectron':!![]};Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length']>0x0&&(_0x3cda6e[_0x4b8bf5(0x1ed)]=_0x1d908b);await createUnconfiguredCloudProfile(_0x3783a6,_0x3cda6e);try{_0x24b971[_0x4b8bf5(0x1db)](setProfileOverride,process['cwd'](),_0x3783a6,_0x24b971['yfpLs'],_0x1a6bfa),setProfileOverride(process[_0x4b8bf5(0x1d1)](),_0x3783a6,_0x24b971[_0x4b8bf5(0x1f5)],!![]);}catch(_0x422ecc){console[_0x4b8bf5(0x209)](_0x4b8bf5(0x1c7)+(_0x24b971[_0x4b8bf5(0x219)](_0x422ecc,Error)?_0x422ecc[_0x4b8bf5(0x1b0)]:String(_0x422ecc)));}console['log'](_0x4b8bf5(0x1cc)+_0x3783a6+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['skipAuth']){const _0x490f01={};_0x556e73[_0x4b8bf5(0x217)]&&(_0x490f01['baseUrl']=_0x556e73[_0x4b8bf5(0x217)]);_0x24b971['KXpYW'](Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length'],0x0)&&(_0x490f01['setupHeaders']=_0x1d908b);await _0x24b971[_0x4b8bf5(0x1fb)](createUnconfiguredCloudProfile,_0x3783a6,_0x490f01),console[_0x4b8bf5(0x1f9)](_0x24b971[_0x4b8bf5(0x202)](_0x4b8bf5(0x20a)+_0x3783a6+_0x4b8bf5(0x1b4),_0x4b8bf5(0x233)+_0x3783a6+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['url']){const _0x841424=_0x556e73[_0x4b8bf5(0x217)],_0x3caff3=await _0x24b971['QTdrF'](checkUrlReachability,_0x841424);if(!_0x3caff3['ok']&&!_0x556e73[_0x4b8bf5(0x1f1)])throw new Error('Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3['error']+_0x4b8bf5(0x1d2));!_0x3caff3['ok']&&_0x556e73[_0x4b8bf5(0x1f1)]&&console[_0x4b8bf5(0x1f9)]('⚠\x20Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3[_0x4b8bf5(0x209)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x24b971[_0x4b8bf5(0x1c0)]),console[_0x4b8bf5(0x1f9)](_0x24b971['ppwMI']),console['log'](_0x4b8bf5(0x1e0));let _0xe55f16='',_0x5fd7a7=![];while(!![]){const _0x164608=await _0x2b71a3[_0x4b8bf5(0x205)]([{'type':_0x24b971['mRnvQ'],'name':'baseUrl','message':_0x5fd7a7?_0x24b971[_0x4b8bf5(0x1ff)]:_0x4b8bf5(0x1d0),'default':_0xe55f16||_0x4b8bf5(0x1f4)}]);_0xe55f16=_0x164608[_0x4b8bf5(0x238)];const _0x2e85c7=await checkUrlReachability(_0xe55f16);if(_0x2e85c7['ok'])break;const _0x1c3162=/^[a-zA-Z][\w+.-]*:\/\//[_0x4b8bf5(0x221)](_0xe55f16),_0x261ff9=_0x2e85c7[_0x4b8bf5(0x1cb)]&&!_0x1c3162,_0x567573=_0x261ff9?_0x4b8bf5(0x21c)+_0xe55f16:null;_0x5fd7a7=!![],console[_0x4b8bf5(0x1f9)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x2e85c7[_0x4b8bf5(0x209)]);_0x567573&&console['log'](_0x4b8bf5(0x203)+_0x567573+'?');const {action:_0x589e10}=await _0x2b71a3['prompt']([{'type':_0x24b971[_0x4b8bf5(0x225)],'name':_0x4b8bf5(0x1f0),'message':_0x24b971['ryQBB'],'choices':[..._0x567573?[{'name':_0x4b8bf5(0x231)+_0x567573,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x4b8bf5(0x1f7)},{'name':_0x24b971[_0x4b8bf5(0x1be)],'value':_0x24b971[_0x4b8bf5(0x1c2)]}]}]);if(_0x589e10===_0x24b971[_0x4b8bf5(0x1c1)]&&_0x567573){_0xe55f16=_0x567573;const _0x476e7b=await _0x24b971[_0x4b8bf5(0x223)](checkUrlReachability,_0xe55f16);if(_0x476e7b['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x476e7b[_0x4b8bf5(0x209)]);}else{if(_0x24b971['TzoMP'](_0x589e10,_0x24b971['zTsai']))break;}}_0x556e73={..._0x556e73,'url':_0xe55f16};}let _0x1bb654=![];try{_0x1bb654=await _0x24b971['IpngU'](tryAutoRouteCloudProfile,_0x3783a6,_0x556e73[_0x4b8bf5(0x217)],_0x556e73,_0x307f93,_0x3c7251);}catch(_0x5b7569){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x3783a6+_0x4b8bf5(0x1b1)+(_0x5b7569 instanceof Error?_0x5b7569['message']:String(_0x5b7569))),process['exit'](0x1);}!_0x1bb654&&process[_0x4b8bf5(0x229)](0x1),await _0x24b971[_0x4b8bf5(0x208)](markActive,_0x3783a6);}
@@ -1 +1 @@
1
- function _0x4a24(_0x387c7b,_0x2f38c1){_0x387c7b=_0x387c7b-0x1de;var _0x413cfa=_0x413c();var _0x4a2466=_0x413cfa[_0x387c7b];return _0x4a2466;}(function(_0x13b805,_0x40ceca){var _0x47be13=_0x4a24,_0x2438e6=_0x13b805();while(!![]){try{var _0x30d60a=-parseInt(_0x47be13(0x1e8))/0x1*(-parseInt(_0x47be13(0x1de))/0x2)+parseInt(_0x47be13(0x1e6))/0x3*(-parseInt(_0x47be13(0x1e7))/0x4)+-parseInt(_0x47be13(0x1df))/0x5+-parseInt(_0x47be13(0x1e0))/0x6+parseInt(_0x47be13(0x1e1))/0x7*(parseInt(_0x47be13(0x1e9))/0x8)+-parseInt(_0x47be13(0x1ea))/0x9+-parseInt(_0x47be13(0x1eb))/0xa*(-parseInt(_0x47be13(0x1e5))/0xb);if(_0x30d60a===_0x40ceca)break;else _0x2438e6['push'](_0x2438e6['shift']());}catch(_0x55e9d7){_0x2438e6['push'](_0x2438e6['shift']());}}}(_0x413c,0x41195));export async function authEncrypt(_0x4e804a){var _0x23ca3f=_0x4a24,_0x45405d={'nPlIQ':function(_0x254296,_0x37294a){return _0x254296+_0x37294a;},'RQvuA':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','uAMAQ':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x45405d[_0x23ca3f(0x1e3)](_0x45405d['nPlIQ'](_0x45405d[_0x23ca3f(0x1e3)](_0x45405d['RQvuA']+'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x23ca3f(0x1e4)+_0x45405d[_0x23ca3f(0x1e2)]),process['exit'](0x1);}function _0x413c(){var _0x181533=['90GlMJrZ','44078Cgmmcd','881570lRZURp','2550372ATYTgv','108507XGEwhx','uAMAQ','nPlIQ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','800602FnPpKI','912147WieDEY','4uZclyX','21EbhsSE','136LNCBgI','1883736wXuRik'];_0x413c=function(){return _0x181533;};return _0x413c();}
1
+ function _0x386b(){var _0x5ee645=['5110260DBHeuA','8745219zNXLDU','493788xEbdxd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EzvIg','13294CKvlGK','exit','318UsZTBg','40QZNNxx','418732upHyBg','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','zsBcy','\x20\x20https://docs.ranger.net/main/concepts/profiles','989244VUpUkI','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5186237EeYAMW','8BavNrV','CSkRm','qBxuj'];_0x386b=function(){return _0x5ee645;};return _0x386b();}function _0x8cb0(_0x4e7c1d,_0x588548){_0x4e7c1d=_0x4e7c1d-0xc8;var _0x386b18=_0x386b();var _0x8cb01e=_0x386b18[_0x4e7c1d];return _0x8cb01e;}(function(_0x596e2f,_0x4d90bc){var _0x11589c=_0x8cb0,_0x16d8d6=_0x596e2f();while(!![]){try{var _0xc1ed2f=parseInt(_0x11589c(0xd8))/0x1+-parseInt(_0x11589c(0xd4))/0x2*(-parseInt(_0x11589c(0xd6))/0x3)+-parseInt(_0x11589c(0xd1))/0x4*(parseInt(_0x11589c(0xd7))/0x5)+parseInt(_0x11589c(0xc9))/0x6+-parseInt(_0x11589c(0xcb))/0x7*(-parseInt(_0x11589c(0xcc))/0x8)+-parseInt(_0x11589c(0xd0))/0x9+parseInt(_0x11589c(0xcf))/0xa;if(_0xc1ed2f===_0x4d90bc)break;else _0x16d8d6['push'](_0x16d8d6['shift']());}catch(_0x1784e6){_0x16d8d6['push'](_0x16d8d6['shift']());}}}(_0x386b,0x8dce6));export async function authEncrypt(_0x436b7f){var _0x132da8=_0x8cb0,_0x8d7e63={'CSkRm':function(_0x3e01cc,_0x5c685c){return _0x3e01cc+_0x5c685c;},'qBxuj':function(_0x248c2c,_0x3ad4b4){return _0x248c2c+_0x3ad4b4;},'EzvIg':_0x132da8(0xd2),'BfHin':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','zsBcy':_0x132da8(0xc8)};console['error'](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63['qBxuj'](_0x8d7e63[_0x132da8(0xce)](_0x8d7e63[_0x132da8(0xce)](_0x132da8(0xca)+_0x132da8(0xd9),'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x8d7e63[_0x132da8(0xd3)]),'\x0a'),_0x8d7e63['BfHin']),_0x8d7e63[_0x132da8(0xda)])),process[_0x132da8(0xd5)](0x1);}
@@ -1 +1 @@
1
- const _0x21421c=_0x3c6e;function _0x3c6e(_0x383a94,_0x2d3609){_0x383a94=_0x383a94-0x87;const _0x2e1841=_0x2e18();let _0x3c6e16=_0x2e1841[_0x383a94];return _0x3c6e16;}function _0x2e18(){const _0x2ec911=['NyZoa','stringify','--scope','ignore','hfnRP','push','603FJUeLY','LRcMo','nfPoU','6726635TWUogT','usvsT','HWxjs','ranger','gKwbu','SucSJ','FGCFY','log','GCtiv','e2e-test-recommender','IjDKc','opencode.json','uRfWv','8xTccBN','6221105TWoeFI','project','vJZsl','utf-8','claude','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20trailhead\x20marketplace','pmpLC','7cBLoBj','length','618465RtugIR','marketplace','platform','mIQOX','5518242YfDTAZ','ranger@trailhead','HYnLO','replace','LCliO','2776662FTISry','plugin','cQsJi','LUDSR','qQOOi','remove','zFHXz','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','3544LrRkMY','50KHxpNP','3042968qEAWUb','JuJZv','parse','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','UAWtP'];_0x2e18=function(){return _0x2ec911;};return _0x2e18();}(function(_0x2ada5a,_0x4c1fe4){const _0x541dee=_0x3c6e,_0x1d61f5=_0x2ada5a();while(!![]){try{const _0x48746e=parseInt(_0x541dee(0x90))/0x1*(-parseInt(_0x541dee(0xbc))/0x2)+parseInt(_0x541dee(0xab))/0x3+-parseInt(_0x541dee(0xbe))/0x4+-parseInt(_0x541dee(0x93))/0x5+parseInt(_0x541dee(0xb4))/0x6*(parseInt(_0x541dee(0xa9))/0x7)+-parseInt(_0x541dee(0xa0))/0x8*(-parseInt(_0x541dee(0xaf))/0x9)+parseInt(_0x541dee(0xbd))/0xa*(parseInt(_0x541dee(0xa1))/0xb);if(_0x48746e===_0x4c1fe4)break;else _0x1d61f5['push'](_0x1d61f5['shift']());}catch(_0xee55a){_0x1d61f5['push'](_0x1d61f5['shift']());}}}(_0x2e18,0xe455c));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=[_0x21421c(0x96),'feature-tracker','bug-bash',_0x21421c(0x9c)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1dc6f9){const _0x423388=_0x21421c,_0x53a865=_0x1dc6f9[_0x423388(0xb2)](/\/\*[\s\S]*?\*\//g,''),_0x4f93e9=_0x53a865['replace'](/^\s*\/\/.*$/gm,''),_0x2f4f66=_0x4f93e9['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x423388(0x87)](_0x2f4f66);}async function removeOpencodePluginConfig(_0x13a969){const _0x48a8bc=_0x21421c,_0x23f37b={'hfnRP':function(_0x3677c5,_0x3379f6){return _0x3677c5(_0x3379f6);},'HWxjs':function(_0xe51fd2,_0x546b56,_0x1e762c){return _0xe51fd2(_0x546b56,_0x1e762c);},'zFHXz':function(_0x1769f3,_0x1328a3){return _0x1769f3===_0x1328a3;}};if(!_0x23f37b[_0x48a8bc(0x8e)](existsSync,_0x13a969))return![];let _0x3b76af;try{const _0x36f8e6=await _0x23f37b[_0x48a8bc(0x95)](readFile,_0x13a969,_0x48a8bc(0xa4));_0x3b76af=parseJsonc(_0x36f8e6);}catch{return![];}const _0x481315=Array['isArray'](_0x3b76af['plugin'])?_0x3b76af['plugin']:[];if(_0x23f37b[_0x48a8bc(0xba)](_0x481315[_0x48a8bc(0xaa)],0x0))return![];const _0xdb85e0=_0x481315['filter'](_0x36d3ae=>{if(typeof _0x36d3ae!=='string')return!![];return _0x36d3ae!==opencodePluginName;});if(_0xdb85e0['length']===_0x481315['length'])return![];return _0xdb85e0['length']===0x0?delete _0x3b76af['plugin']:_0x3b76af['plugin']=_0xdb85e0,await _0x23f37b['HWxjs'](writeFile,_0x13a969,JSON[_0x48a8bc(0x8b)](_0x3b76af,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x12db58){const _0x22a7bf=_0x21421c,_0x2e8f8a={'wxNUS':function(_0x2e145e,_0x1676e0){return _0x2e145e(_0x1676e0);},'HYnLO':function(_0x3fd693,_0x43c561){return _0x3fd693===_0x43c561;},'mIQOX':'uninstall','YcBKE':_0x22a7bf(0xb0),'SucSJ':function(_0x3c2ceb,_0x2239df,_0x137e10,_0x33ea9b){return _0x3c2ceb(_0x2239df,_0x137e10,_0x33ea9b);},'eBfza':_0x22a7bf(0xa5),'LUDSR':'ignore','UAWtP':function(_0x49841b){return _0x49841b();},'QfMIj':'win32'};return new Promise(_0x4a6c70=>{const _0x2d67c8=_0x22a7bf,_0x1f5ed5=['plugin',_0x2e8f8a[_0x2d67c8(0xae)],_0x2e8f8a['YcBKE']];_0x12db58&&_0x1f5ed5[_0x2d67c8(0x8f)](_0x2d67c8(0x8c),_0x12db58);const _0x3c1a31=_0x2e8f8a[_0x2d67c8(0x98)](spawn,_0x2e8f8a['eBfza'],_0x1f5ed5,{'stdio':['ignore',_0x2e8f8a[_0x2d67c8(0xb7)],'ignore'],'cwd':_0x12db58?_0x2e8f8a[_0x2d67c8(0x89)](getProjectRoot):undefined,'shell':_0x2e8f8a[_0x2d67c8(0xb1)](process[_0x2d67c8(0xad)],_0x2e8f8a['QfMIj'])});_0x3c1a31['on']('close',_0x300868=>{_0x2e8f8a['wxNUS'](_0x4a6c70,_0x2e8f8a['HYnLO'](_0x300868,0x0));}),_0x3c1a31['on']('error',()=>{_0x4a6c70(![]);});});}async function removeMarketplace(){const _0x448339=_0x21421c,_0x39c0d2={'HJMmZ':function(_0x6f63eb,_0x280212,_0x1c666f,_0x22e3df){return _0x6f63eb(_0x280212,_0x1c666f,_0x22e3df);},'kcayw':_0x448339(0xa5),'qQOOi':'trailhead','GCtiv':_0x448339(0x8d),'gKwbu':function(_0x277445,_0x590891){return _0x277445===_0x590891;},'LCliO':'close','LvaMU':'error'};return new Promise(_0x3cbdb3=>{const _0x33106e=_0x448339,_0x379b44={'teGdc':function(_0x532be4,_0x5b1d60){return _0x532be4(_0x5b1d60);}},_0x41b502=_0x39c0d2['HJMmZ'](spawn,_0x39c0d2['kcayw'],[_0x33106e(0xb5),_0x33106e(0xac),_0x33106e(0xb9),_0x39c0d2[_0x33106e(0xb8)]],{'stdio':[_0x39c0d2[_0x33106e(0x9b)],_0x39c0d2['GCtiv'],_0x39c0d2[_0x33106e(0x9b)]],'shell':_0x39c0d2[_0x33106e(0x97)](process[_0x33106e(0xad)],'win32')});_0x41b502['on'](_0x39c0d2[_0x33106e(0xb3)],_0x546e37=>{_0x3cbdb3(_0x546e37===0x0);}),_0x41b502['on'](_0x39c0d2['LvaMU'],()=>{_0x379b44['teGdc'](_0x3cbdb3,![]);});});}export async function clean(){const _0x8c0ac4=_0x21421c,_0x34525c={'uRfWv':function(_0x8c91ef){return _0x8c91ef();},'IjDKc':function(_0x331c7a,_0x16593d){return _0x331c7a(_0x16593d);},'tQGMp':function(_0x20486e,_0x4fb523,_0x19bc3c){return _0x20486e(_0x4fb523,_0x19bc3c);},'LRcMo':function(_0x2e5767,_0x248f0d){return _0x2e5767(_0x248f0d);},'FGCFY':function(_0x18b4f8,_0x1e328f,_0xb1ce20){return _0x18b4f8(_0x1e328f,_0xb1ce20);},'cQsJi':'user','DlCUS':function(_0x53b458,_0x5a6265,_0x3643f2){return _0x53b458(_0x5a6265,_0x3643f2);},'pmpLC':function(_0x4b17c2,_0x2ae667){return _0x4b17c2(_0x2ae667);},'KLsvo':function(_0x59e3d4,_0x51fff2){return _0x59e3d4(_0x51fff2);},'nfPoU':'opencode.json','NyZoa':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','vJZsl':function(_0x276b2a,_0x44ecf6){return _0x276b2a(_0x44ecf6);},'JuJZv':'\x0a✅\x20Cleanup\x20complete!\x0a','usvsT':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x8c0ac4(0x9a)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x564a60=![];try{await _0x34525c[_0x8c0ac4(0x9f)](deleteAllCredentials),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20stored\x20credentials'),_0x564a60=!![];}catch{}const _0x5f49fd=_0x34525c[_0x8c0ac4(0x9f)](getCacheFile);_0x34525c[_0x8c0ac4(0x9d)](existsSync,_0x5f49fd)&&(await rm(_0x5f49fd),_0x564a60=!![]);const _0x5833f9=_0x34525c[_0x8c0ac4(0x9f)](getRangerDir);existsSync(_0x5833f9)&&(await rm(_0x5833f9,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20.ranger/\x20directory'),_0x564a60=!![]);const _0x16dd04=_0x34525c['uRfWv'](getProjectSkillsDir);for(const _0x48aa75 of skillsToRemove){const _0x46e757=join(_0x16dd04,_0x48aa75);existsSync(_0x46e757)&&(await _0x34525c['tQGMp'](rm,_0x46e757,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x48aa75),_0x564a60=!![]);}const _0x56f2f8=_0x34525c[_0x8c0ac4(0x9f)](getUserSkillsDir);for(const _0x5151f0 of skillsToRemove){const _0x2c5549=join(_0x56f2f8,_0x5151f0);_0x34525c[_0x8c0ac4(0x91)](existsSync,_0x2c5549)&&(await rm(_0x2c5549,{'recursive':!![]}),console['log'](_0x8c0ac4(0xa6)+_0x5151f0),_0x564a60=!![]);}const _0x14ae64=_0x34525c[_0x8c0ac4(0x91)](getOpencodeSkillsDir,_0x8c0ac4(0xa2));for(const _0x586d22 of skillsToRemove){const _0x294a36=_0x34525c[_0x8c0ac4(0x99)](join,_0x14ae64,_0x586d22);_0x34525c['LRcMo'](existsSync,_0x294a36)&&(await rm(_0x294a36,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x586d22),_0x564a60=!![]);}const _0x3044ad=getOpencodeSkillsDir(_0x34525c[_0x8c0ac4(0xb6)]);for(const _0x675e6e of skillsToRemove){const _0x2b90de=join(_0x3044ad,_0x675e6e);_0x34525c['LRcMo'](existsSync,_0x2b90de)&&(await rm(_0x2b90de,{'recursive':!![]}),console[_0x8c0ac4(0x9a)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x675e6e),_0x564a60=!![]);}const _0x1220c2=_0x34525c['DlCUS'](join,_0x34525c[_0x8c0ac4(0xa8)](getOpencodeConfigDir,_0x8c0ac4(0xa2)),_0x8c0ac4(0x9e));await _0x34525c['KLsvo'](removeOpencodePluginConfig,_0x1220c2)&&(console[_0x8c0ac4(0x9a)](_0x8c0ac4(0xbb)),_0x564a60=!![]);const _0x4c04cf=_0x34525c[_0x8c0ac4(0x99)](join,getOpencodeConfigDir(_0x34525c[_0x8c0ac4(0xb6)]),_0x34525c[_0x8c0ac4(0x92)]);await removeOpencodePluginConfig(_0x4c04cf)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x564a60=!![]);const _0x32ca8f=await uninstallClaudePlugin();_0x32ca8f&&(console['log'](_0x34525c[_0x8c0ac4(0x8a)]),_0x564a60=!![]);const _0x757a8d=await _0x34525c[_0x8c0ac4(0xa3)](uninstallClaudePlugin,_0x8c0ac4(0xa2));_0x757a8d&&(console['log'](_0x8c0ac4(0x88)),_0x564a60=!![]);const _0x3533fc=await _0x34525c[_0x8c0ac4(0x9f)](removeMarketplace);_0x3533fc&&(console['log'](_0x8c0ac4(0xa7)),_0x564a60=!![]),_0x564a60?console[_0x8c0ac4(0x9a)](_0x34525c[_0x8c0ac4(0xbf)]):console[_0x8c0ac4(0x9a)](_0x34525c[_0x8c0ac4(0x94)]);}
1
+ const _0x1ca61e=_0x2880;(function(_0x570da4,_0x20ce8d){const _0x30fc59=_0x2880,_0x586888=_0x570da4();while(!![]){try{const _0x333134=parseInt(_0x30fc59(0xbd))/0x1*(parseInt(_0x30fc59(0xe0))/0x2)+parseInt(_0x30fc59(0xc0))/0x3*(-parseInt(_0x30fc59(0xd1))/0x4)+parseInt(_0x30fc59(0xeb))/0x5*(-parseInt(_0x30fc59(0xc2))/0x6)+parseInt(_0x30fc59(0xcc))/0x7+-parseInt(_0x30fc59(0xc8))/0x8+parseInt(_0x30fc59(0xb9))/0x9+parseInt(_0x30fc59(0xc4))/0xa;if(_0x333134===_0x20ce8d)break;else _0x586888['push'](_0x586888['shift']());}catch(_0x3ee311){_0x586888['push'](_0x586888['shift']());}}}(_0x24d8,0x3dd33));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2880(_0x55102f,_0x158dd3){_0x55102f=_0x55102f-0xb2;const _0x24d866=_0x24d8();let _0x2880fb=_0x24d866[_0x55102f];return _0x2880fb;}function _0x24d8(){const _0x4ba79c=['fJTrP','YmNvs','KihPK','848208ytIocR','jPWSv','lDxKg','\x0a✅\x20Cleanup\x20complete!\x0a','38003Cpftej','LWEby','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','trailhead','push','4SdlZyc','plugin','DuGLP','--scope','close','XUSZT','TKLgh','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','StYzs','log','fncPT','UziTI','SvcYE','parse','cCkQk','115042yqxrrM','yPNnS','@ranger-testing/opencode-plugin','YAcOe','IAQfQ','user','claude','sHXwZ','feature-tracker','TOjtW','platform','10TRuzMd','ignore','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','e2e-test-recommender','CAHZE','stringify','OgxSH','replace','864099tFjJYm','AWBdw','uninstall','length','1tJgEOK','filter','OCQDl','1387329UgYfkh','project','880662AiAUCm','Hbpch','9562970XYtrEd'];_0x24d8=function(){return _0x4ba79c;};return _0x24d8();}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',_0x1ca61e(0xe8),'bug-bash',_0x1ca61e(0xb4)],opencodePluginName=_0x1ca61e(0xe2);function parseJsonc(_0x3deff6){const _0x2c16e4=_0x1ca61e,_0x27cfd1=_0x3deff6['replace'](/\/\*[\s\S]*?\*\//g,''),_0x117f4e=_0x27cfd1[_0x2c16e4(0xb8)](/^\s*\/\/.*$/gm,''),_0x96777e=_0x117f4e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x2c16e4(0xde)](_0x96777e);}async function removeOpencodePluginConfig(_0x73bc1f){const _0x69efa8=_0x1ca61e,_0x2cadaa={'fJTrP':'string','GieIY':function(_0x56cc5c,_0x2e7a9c){return _0x56cc5c!==_0x2e7a9c;},'yPNnS':function(_0x2d1b99,_0x1d928c){return _0x2d1b99(_0x1d928c);},'fncPT':'utf-8','ACIgx':function(_0x55c258,_0x5bbb05){return _0x55c258(_0x5bbb05);},'yzLwG':function(_0x475550,_0x3f0da1){return _0x475550===_0x3f0da1;},'lvqWO':function(_0x500fd7,_0x25733d){return _0x500fd7===_0x25733d;},'DuGLP':function(_0x31b013,_0x259697){return _0x31b013===_0x259697;},'OgxSH':function(_0xa1d224,_0x377ea9){return _0xa1d224+_0x377ea9;}};if(!_0x2cadaa[_0x69efa8(0xe1)](existsSync,_0x73bc1f))return![];let _0xf44527;try{const _0x49be5c=await readFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xdb)]);_0xf44527=_0x2cadaa['ACIgx'](parseJsonc,_0x49be5c);}catch{return![];}const _0x2a85ab=Array['isArray'](_0xf44527[_0x69efa8(0xd2)])?_0xf44527['plugin']:[];if(_0x2cadaa['yzLwG'](_0x2a85ab['length'],0x0))return![];const _0x487f61=_0x2a85ab[_0x69efa8(0xbe)](_0x1d4660=>{const _0x237f63=_0x69efa8;if(typeof _0x1d4660!==_0x2cadaa[_0x237f63(0xc5)])return!![];return _0x2cadaa['GieIY'](_0x1d4660,opencodePluginName);});if(_0x2cadaa['lvqWO'](_0x487f61['length'],_0x2a85ab[_0x69efa8(0xbc)]))return![];return _0x2cadaa[_0x69efa8(0xd3)](_0x487f61[_0x69efa8(0xbc)],0x0)?delete _0xf44527['plugin']:_0xf44527['plugin']=_0x487f61,await writeFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xb7)](JSON[_0x69efa8(0xb6)](_0xf44527,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3a3f99){const _0x312a23=_0x1ca61e,_0x17b221={'OCQDl':function(_0x3da2b4,_0x4254f2){return _0x3da2b4===_0x4254f2;},'StYzs':function(_0x12b41c,_0x3a2cdd){return _0x12b41c(_0x3a2cdd);},'huKkn':_0x312a23(0xbb),'QAYyi':'ranger@trailhead','Watlu':function(_0x31127b){return _0x31127b();},'NHFcT':'win32','SvcYE':_0x312a23(0xd5),'MlvLV':'error'};return new Promise(_0x20d97f=>{const _0x25860a=_0x312a23,_0xd20f47={'mqfjX':function(_0xd86227,_0x4ad886){const _0xac0c35=_0x2880;return _0x17b221[_0xac0c35(0xbf)](_0xd86227,_0x4ad886);},'CAHZE':function(_0x4206c7,_0x8447ab){const _0x55dbe0=_0x2880;return _0x17b221[_0x55dbe0(0xd9)](_0x4206c7,_0x8447ab);}},_0x45c84f=['plugin',_0x17b221['huKkn'],_0x17b221['QAYyi']];_0x3a3f99&&_0x45c84f[_0x25860a(0xd0)](_0x25860a(0xd4),_0x3a3f99);const _0x596da2=spawn(_0x25860a(0xe6),_0x45c84f,{'stdio':['ignore','ignore','ignore'],'cwd':_0x3a3f99?_0x17b221['Watlu'](getProjectRoot):undefined,'shell':process[_0x25860a(0xea)]===_0x17b221['NHFcT']});_0x596da2['on'](_0x17b221[_0x25860a(0xdd)],_0x27cd2e=>{_0x20d97f(_0xd20f47['mqfjX'](_0x27cd2e,0x0));}),_0x596da2['on'](_0x17b221['MlvLV'],()=>{const _0x2e2e79=_0x25860a;_0xd20f47[_0x2e2e79(0xb5)](_0x20d97f,![]);});});}async function removeMarketplace(){const _0x15bea4=_0x1ca61e,_0x17079d={'AWBdw':_0x15bea4(0xe6),'YAcOe':'marketplace','JlGmP':'remove','UziTI':_0x15bea4(0xb2),'YmNvs':'win32'};return new Promise(_0x480d5d=>{const _0x3b4994=_0x15bea4,_0x4a44a2=spawn(_0x17079d[_0x3b4994(0xba)],['plugin',_0x17079d[_0x3b4994(0xe3)],_0x17079d['JlGmP'],_0x3b4994(0xcf)],{'stdio':[_0x17079d['UziTI'],_0x17079d['UziTI'],_0x17079d[_0x3b4994(0xdc)]],'shell':process['platform']===_0x17079d[_0x3b4994(0xc6)]});_0x4a44a2['on']('close',_0x1af020=>{_0x480d5d(_0x1af020===0x0);}),_0x4a44a2['on']('error',()=>{_0x480d5d(![]);});});}export async function clean(){const _0x155224=_0x1ca61e,_0x49880d={'vkVML':_0x155224(0xce),'cCkQk':'✓\x20Removed\x20stored\x20credentials','jPWSv':function(_0x13fe8d){return _0x13fe8d();},'hgBjs':function(_0x4f6f1a,_0x6492b8){return _0x4f6f1a(_0x6492b8);},'OGKeI':function(_0x3918b2,_0x52d05d,_0x26dc7b){return _0x3918b2(_0x52d05d,_0x26dc7b);},'XUSZT':function(_0x219675,_0xe70210,_0x5f0fa2){return _0x219675(_0xe70210,_0x5f0fa2);},'kYUoP':function(_0x3e138d,_0x1ac38a){return _0x3e138d(_0x1ac38a);},'wPEvI':function(_0x17c562,_0x6e5478,_0x4d9e8a){return _0x17c562(_0x6e5478,_0x4d9e8a);},'LWEby':'user','OKdkS':function(_0x524dd1,_0x5a5ef0,_0x1958fe){return _0x524dd1(_0x5a5ef0,_0x1958fe);},'TKLgh':function(_0x453a4d,_0xa2ca00,_0x32f40b){return _0x453a4d(_0xa2ca00,_0x32f40b);},'sHXwZ':function(_0x194936,_0x12040b){return _0x194936(_0x12040b);},'KihPK':'project','IAQfQ':'opencode.json','lDxKg':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOjtW':function(_0x16a205,_0x5648d7){return _0x16a205(_0x5648d7);},'Hbpch':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'};console['log'](_0x49880d['vkVML']);let _0x180f65=![];try{await deleteAllCredentials(),console[_0x155224(0xda)](_0x49880d[_0x155224(0xdf)]),_0x180f65=!![];}catch{}const _0x51376b=_0x49880d[_0x155224(0xc9)](getCacheFile);existsSync(_0x51376b)&&(await _0x49880d['hgBjs'](rm,_0x51376b),_0x180f65=!![]);const _0x2e6c4a=_0x49880d['jPWSv'](getRangerDir);existsSync(_0x2e6c4a)&&(await _0x49880d['OGKeI'](rm,_0x2e6c4a,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x180f65=!![]);const _0x1bcc22=getProjectSkillsDir();for(const _0x152caf of skillsToRemove){const _0x107e64=join(_0x1bcc22,_0x152caf);existsSync(_0x107e64)&&(await rm(_0x107e64,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20project\x20skill:\x20'+_0x152caf),_0x180f65=!![]);}const _0x28e706=getUserSkillsDir();for(const _0x274cfb of skillsToRemove){const _0x394655=join(_0x28e706,_0x274cfb);existsSync(_0x394655)&&(await _0x49880d[_0x155224(0xd6)](rm,_0x394655,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20user\x20skill:\x20'+_0x274cfb),_0x180f65=!![]);}const _0x443ce4=_0x49880d['kYUoP'](getOpencodeSkillsDir,'project');for(const _0x2ede15 of skillsToRemove){const _0x57d776=join(_0x443ce4,_0x2ede15);existsSync(_0x57d776)&&(await _0x49880d['wPEvI'](rm,_0x57d776,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2ede15),_0x180f65=!![]);}const _0xf1a09f=getOpencodeSkillsDir(_0x49880d[_0x155224(0xcd)]);for(const _0x4b1ece of skillsToRemove){const _0x3a2bbc=join(_0xf1a09f,_0x4b1ece);existsSync(_0x3a2bbc)&&(await _0x49880d['OKdkS'](rm,_0x3a2bbc,{'recursive':!![]}),console['log'](_0x155224(0xb3)+_0x4b1ece),_0x180f65=!![]);}const _0x2b90ce=_0x49880d[_0x155224(0xd7)](join,_0x49880d[_0x155224(0xe7)](getOpencodeConfigDir,_0x49880d[_0x155224(0xc7)]),_0x49880d[_0x155224(0xe4)]);await removeOpencodePluginConfig(_0x2b90ce)&&(console['log'](_0x49880d[_0x155224(0xca)]),_0x180f65=!![]);const _0x4998c5=join(_0x49880d[_0x155224(0xe9)](getOpencodeConfigDir,_0x155224(0xe5)),_0x49880d['IAQfQ']);await _0x49880d[_0x155224(0xe7)](removeOpencodePluginConfig,_0x4998c5)&&(console[_0x155224(0xda)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x180f65=!![]);const _0x166228=await uninstallClaudePlugin();_0x166228&&(console[_0x155224(0xda)](_0x49880d[_0x155224(0xc3)]),_0x180f65=!![]);const _0x177345=await _0x49880d['hgBjs'](uninstallClaudePlugin,_0x155224(0xc1));_0x177345&&(console['log'](_0x155224(0xd8)),_0x180f65=!![]);const _0x271907=await removeMarketplace();_0x271907&&(console[_0x155224(0xda)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x180f65=!![]),_0x180f65?console['log'](_0x155224(0xcb)):console[_0x155224(0xda)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- const _0x5da504=_0x593a;(function(_0x50e23e,_0x31074e){const _0x5b3602=_0x593a,_0x5c48ef=_0x50e23e();while(!![]){try{const _0x1480ba=parseInt(_0x5b3602(0x151))/0x1*(parseInt(_0x5b3602(0x15c))/0x2)+-parseInt(_0x5b3602(0x152))/0x3+-parseInt(_0x5b3602(0x160))/0x4+-parseInt(_0x5b3602(0x16a))/0x5*(parseInt(_0x5b3602(0x162))/0x6)+parseInt(_0x5b3602(0x16e))/0x7*(-parseInt(_0x5b3602(0x139))/0x8)+-parseInt(_0x5b3602(0x16b))/0x9*(parseInt(_0x5b3602(0x161))/0xa)+parseInt(_0x5b3602(0x14a))/0xb*(parseInt(_0x5b3602(0x16d))/0xc);if(_0x1480ba===_0x31074e)break;else _0x5c48ef['push'](_0x5c48ef['shift']());}catch(_0x5aa52b){_0x5c48ef['push'](_0x5c48ef['shift']());}}}(_0x501f,0x4759d));function _0x501f(){const _0x32b0c0=['85430ojKATZ','6660uXJCrw','TQLZc','448140bBlSCF','3374uZDGsA','cqePg','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','\x20for\x20\x22','stringify','7528cTcUUy','local','tDgUs','log','false','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','headless','Vewsn','alsoExistsElsewhere','isNaN','LuhdZ','keys','endsWith','zgbNW','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','DLxLn','\x20=\x20','517kYuqlJ','kind','cwd','\x22\x20not\x20found','(not\x20set)','WMUGZ','forceLogin','270918mLFSke','1337556CMrarE','No\x20configuration\x20set\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','vkawJ','iCGGZ','test',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','rsCDt','xGFtz','RKDXM','2QBYMzs','startsWith','true','trim','2190496DyuIcR','2260AOiztr','42pRoHeu','includes','cloud','object','Key\x20\x22','knsSu','null','kDrLq'];_0x501f=function(){return _0x32b0c0;};return _0x501f();}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=[_0x5da504(0x13f),'allowInsecureLocalhost',_0x5da504(0x150)];function parseLocalValue(_0xe99d7e,_0x75f30d){const _0x209997=_0x5da504,_0x5186fc={'yLAwT':function(_0x135105,_0x500f22){return _0x135105===_0x500f22;},'Vewsn':function(_0x1e3dca,_0x49e9fa){return _0x1e3dca===_0x49e9fa;},'fkWOw':'false'};if(BOOLEAN_KEYS[_0x209997(0x163)](_0xe99d7e)){if(_0x5186fc['yLAwT'](_0x75f30d,_0x209997(0x15e)))return!![];if(_0x5186fc[_0x209997(0x140)](_0x75f30d,_0x5186fc['fkWOw']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0xe99d7e+_0x209997(0x158));}return _0x75f30d;}function _0x593a(_0x19035a,_0x304bf1){_0x19035a=_0x19035a-0x136;const _0x501f3e=_0x501f();let _0x593acd=_0x501f3e[_0x19035a];return _0x593acd;}function parseOverrideValue(_0x2a2492){const _0x4bd763=_0x5da504,_0x51486b={'QVPgc':'true','LuhdZ':function(_0x24fe8a,_0x28b50e){return _0x24fe8a===_0x28b50e;},'fXZHg':_0x4bd763(0x13d),'dCZEr':function(_0x33d61,_0x3cdb12){return _0x33d61===_0x3cdb12;},'zgbNW':'undefined'};if(_0x2a2492===_0x51486b['QVPgc'])return!![];if(_0x51486b[_0x4bd763(0x143)](_0x2a2492,_0x51486b['fXZHg']))return![];if(_0x51486b[_0x4bd763(0x143)](_0x2a2492,_0x4bd763(0x168)))return null;if(_0x51486b['dCZEr'](_0x2a2492,_0x51486b[_0x4bd763(0x146)]))return undefined;if(/^-?\d+$/[_0x4bd763(0x157)](_0x2a2492)){const _0xb82aef=Number(_0x2a2492);if(Number['isSafeInteger'](_0xb82aef))return _0xb82aef;}if(/^-?\d+\.\d+$/[_0x4bd763(0x157)](_0x2a2492)){const _0x141b6d=Number(_0x2a2492);if(!Number[_0x4bd763(0x142)](_0x141b6d))return _0x141b6d;}const _0x23d8e6=_0x2a2492[_0x4bd763(0x15f)]();if(_0x23d8e6['startsWith']('{')&&_0x23d8e6[_0x4bd763(0x145)]('}')||_0x23d8e6[_0x4bd763(0x15d)]('[')&&_0x23d8e6['endsWith'](']'))try{return JSON['parse'](_0x23d8e6);}catch{}return _0x2a2492;}async function resolveProfileTarget(_0x293b8e){const _0x342980=_0x5da504,_0x573521={'iCGGZ':function(_0x1a717b,_0xe34ab8){return _0x1a717b(_0xe34ab8);}},_0x46db04=_0x573521['iCGGZ'](existsSync,_0x573521[_0x342980(0x156)](getEnvDir,_0x293b8e));let _0xd36107=![];try{const _0xd5c31=await fetchCloudProfile(_0x293b8e);_0xd36107=Boolean(_0xd5c31);}catch{}if(_0xd36107)return{'kind':_0x342980(0x164),'alsoExistsElsewhere':_0x46db04};if(_0x46db04)return{'kind':_0x342980(0x13a),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x293b8e+_0x342980(0x13e)+_0x293b8e);}function printDualExistsHint(_0x2f59b9){const _0x474198=_0x5da504;console['log']('\x20\x20Note:\x20\x22'+_0x2f59b9+_0x474198(0x147));}function getProjectPath(){const _0x488262=_0x5da504;return process[_0x488262(0x14c)]();}async function loadEffectiveCloudSettings(_0x78b0ba){const _0x1728ff=_0x5da504,_0x11b5fa={'WMUGZ':function(_0x1bd6b9,_0x41e7fa,_0x257e31){return _0x1bd6b9(_0x41e7fa,_0x257e31);},'rsCDt':function(_0x1cf8b8,_0x59aef5,_0x2ff381){return _0x1cf8b8(_0x59aef5,_0x2ff381);},'tDgUs':function(_0x1e39cd,_0x25a184){return _0x1e39cd??_0x25a184;}},_0x46a0eb=await fetchCloudProfile(_0x78b0ba),_0x48f7b1=_0x11b5fa[_0x1728ff(0x14f)](readProfileOverrides,getProjectPath(),_0x78b0ba);return _0x11b5fa[_0x1728ff(0x159)](mergeCloudProfileSettings,_0x46a0eb?.['settings']??{},_0x11b5fa[_0x1728ff(0x13b)](_0x48f7b1,undefined));}export async function configSet(_0x1b597a,_0x40b002,_0x10d917){const _0x21e78c=_0x5da504,_0x48b76b={'HIihX':function(_0x24a905){return _0x24a905();},'MtrPt':function(_0x18c2d0,_0x5a3d58,_0x32e499){return _0x18c2d0(_0x5a3d58,_0x32e499);}},_0x5730cf=await resolveProfileTarget(_0x1b597a);if(_0x5730cf['kind']==='cloud'){if(_0x5730cf[_0x21e78c(0x141)])printDualExistsHint(_0x1b597a);const _0xad8c1a=parseOverrideValue(_0x10d917);setProfileOverride(_0x48b76b['HIihX'](getProjectPath),_0x1b597a,_0x40b002,_0xad8c1a),console['log']('Set\x20'+_0x40b002+_0x21e78c(0x149)+JSON['stringify'](_0xad8c1a)+_0x21e78c(0x137)+_0x1b597a+'\x22');return;}const _0x1a8da1=_0x48b76b['MtrPt'](parseLocalValue,_0x40b002,_0x10d917);setProfileOverride(getProjectPath(),_0x1b597a,_0x40b002,_0x1a8da1),console[_0x21e78c(0x13c)]('Set\x20'+_0x40b002+_0x21e78c(0x149)+_0x1a8da1+'\x20for\x20\x22'+_0x1b597a+'\x22');}export async function configGet(_0xb2c5fb,_0x2a1eaa){const _0x3614e0=_0x5da504,_0x1fe93a={'TQLZc':function(_0x2b01a4,_0x2eb433){return _0x2b01a4(_0x2eb433);},'vkawJ':function(_0x214303,_0x2d3f0e){return _0x214303===_0x2d3f0e;},'knsSu':_0x3614e0(0x165),'kaVrY':function(_0x4ad4c4,_0x505c35){return _0x4ad4c4(_0x505c35);},'LUpKk':function(_0x2d3562,_0xfd1003,_0x198b2f){return _0x2d3562(_0xfd1003,_0x198b2f);}},_0x185d8d=await _0x1fe93a[_0x3614e0(0x16c)](resolveProfileTarget,_0xb2c5fb);if(_0x185d8d['kind']==='cloud'){const _0x596368=await loadEffectiveCloudSettings(_0xb2c5fb),_0x3c5700=getNestedValue(_0x596368,_0x2a1eaa);if(_0x1fe93a[_0x3614e0(0x155)](_0x3c5700,undefined))console[_0x3614e0(0x13c)](_0x3614e0(0x14e));else _0x1fe93a['vkawJ'](typeof _0x3c5700,_0x1fe93a[_0x3614e0(0x167)])?console[_0x3614e0(0x13c)](JSON[_0x3614e0(0x138)](_0x3c5700,null,0x2)):console['log'](_0x3c5700);return;}const _0xa9bfb8=await _0x1fe93a['kaVrY'](loadSettings,_0xb2c5fb),_0x4a040d=_0x1fe93a['LUpKk'](getNestedValue,_0xa9bfb8,_0x2a1eaa);if(_0x1fe93a['vkawJ'](_0x4a040d,undefined))console['log']('(not\x20set)');else typeof _0x4a040d==='object'?console[_0x3614e0(0x13c)](JSON['stringify'](_0x4a040d,null,0x2)):console['log'](_0x4a040d);}export async function configList(_0x487d95){const _0x483897=_0x5da504,_0xa9d45e={'lIiKc':function(_0x51c71f,_0x2d3c83){return _0x51c71f===_0x2d3c83;},'hgmSK':'cloud','RKDXM':function(_0x594bbd,_0x4c5fcf){return _0x594bbd(_0x4c5fcf);}},_0x612ce2=await resolveProfileTarget(_0x487d95);if(_0xa9d45e['lIiKc'](_0x612ce2[_0x483897(0x14b)],_0xa9d45e['hgmSK'])){const _0x178911=await _0xa9d45e['RKDXM'](loadEffectiveCloudSettings,_0x487d95);if(!_0x178911||_0xa9d45e['lIiKc'](Object[_0x483897(0x144)](_0x178911)['length'],0x0)){console[_0x483897(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x487d95+'\x22');return;}console['log'](JSON[_0x483897(0x138)](_0x178911,null,0x2));return;}const _0x1bc9f2=getSettingsPath(_0x487d95);if(!existsSync(_0x1bc9f2)){console[_0x483897(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x487d95+'\x22');return;}const _0x5726f5=await loadSettings(_0x487d95),_0x2af822=_0xa9d45e[_0x483897(0x15b)](formatSettings,_0x5726f5);!_0x2af822?console[_0x483897(0x13c)](_0x483897(0x153)+_0x487d95+'\x22'):console['log'](_0x2af822);}export async function configUnset(_0x28537a,_0x5f3a3e){const _0xb3839f=_0x5da504,_0x5e93d9={'OpGfp':'cloud','xGFtz':function(_0x3325ed,_0x26b80b,_0x1f0c76,_0xe12f67){return _0x3325ed(_0x26b80b,_0x1f0c76,_0xe12f67);},'lOfRG':function(_0x392ae6){return _0x392ae6();},'pmNrN':function(_0x3ec850,_0x56e48e,_0x3be1f0,_0x478c60){return _0x3ec850(_0x56e48e,_0x3be1f0,_0x478c60);},'cqePg':function(_0x51eb49,_0x38ea04){return _0x51eb49(_0x38ea04);},'kDrLq':function(_0x31362f,_0x2e0c8f,_0x399493){return _0x31362f(_0x2e0c8f,_0x399493);}},_0x3238fd=await resolveProfileTarget(_0x28537a);if(_0x3238fd['kind']===_0x5e93d9['OpGfp']){if(_0x3238fd['alsoExistsElsewhere'])printDualExistsHint(_0x28537a);const _0x10ff65=_0x5e93d9[_0xb3839f(0x15a)](unsetProfileOverride,_0x5e93d9['lOfRG'](getProjectPath),_0x28537a,_0x5f3a3e);_0x10ff65?console[_0xb3839f(0x13c)]('Removed\x20'+_0x5f3a3e+_0xb3839f(0x137)+_0x28537a+'\x22'):console[_0xb3839f(0x13c)]('Key\x20\x22'+_0x5f3a3e+'\x22\x20not\x20found');return;}const _0x2965b2=_0x5e93d9['pmNrN'](unsetProfileOverride,getProjectPath(),_0x28537a,_0x5f3a3e);if(_0x2965b2){console['log']('Removed\x20'+_0x5f3a3e);return;}const _0x26a352=await _0x5e93d9[_0xb3839f(0x16f)](loadSettings,_0x28537a),_0x280fc4=_0x5e93d9[_0xb3839f(0x169)](deleteNestedValue,_0x26a352,_0x5f3a3e);_0x280fc4?console[_0xb3839f(0x13c)](_0xb3839f(0x166)+_0x5f3a3e+_0xb3839f(0x136)+_0x28537a+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0xb3839f(0x166)+_0x5f3a3e+_0xb3839f(0x14d));}export async function configReset(_0x323d13){const _0xe2bdad=_0x5da504,_0x42e12e={'ziKfk':function(_0x2d328a,_0x1616c7){return _0x2d328a(_0x1616c7);},'gPwQT':function(_0x34a0e3,_0x3d4e26){return _0x34a0e3===_0x3d4e26;},'flUGI':_0xe2bdad(0x164),'DLxLn':function(_0x29a0f0,_0x178506,_0x20885d){return _0x29a0f0(_0x178506,_0x20885d);}},_0x22ae51=await _0x42e12e['ziKfk'](resolveProfileTarget,_0x323d13);if(_0x42e12e['gPwQT'](_0x22ae51[_0xe2bdad(0x14b)],_0x42e12e['flUGI'])){_0x42e12e[_0xe2bdad(0x148)](resetProfileOverrides,getProjectPath(),_0x323d13),console[_0xe2bdad(0x13c)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x323d13+'\x22');return;}console['log']('\x22'+_0x323d13+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x323d13+_0xe2bdad(0x154));}
1
+ const _0x576a7e=_0x444d;(function(_0x52d19e,_0x2e0fd2){const _0x5c396c=_0x444d,_0x4b7cad=_0x52d19e();while(!![]){try{const _0x944ba4=-parseInt(_0x5c396c(0x1f3))/0x1*(-parseInt(_0x5c396c(0x208))/0x2)+parseInt(_0x5c396c(0x1f1))/0x3+parseInt(_0x5c396c(0x1fc))/0x4+-parseInt(_0x5c396c(0x20b))/0x5+-parseInt(_0x5c396c(0x20e))/0x6*(parseInt(_0x5c396c(0x1f7))/0x7)+parseInt(_0x5c396c(0x217))/0x8+parseInt(_0x5c396c(0x213))/0x9*(-parseInt(_0x5c396c(0x1ee))/0xa);if(_0x944ba4===_0x2e0fd2)break;else _0x4b7cad['push'](_0x4b7cad['shift']());}catch(_0xb3e289){_0x4b7cad['push'](_0x4b7cad['shift']());}}}(_0x2f6a,0xaf8b5));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=[_0x576a7e(0x200),_0x576a7e(0x209),_0x576a7e(0x1ff)];function parseLocalValue(_0x2bc58a,_0x2cc529){const _0x1cbb7b=_0x576a7e,_0x5be45a={'tFmNb':function(_0xf9d30f,_0x315eea){return _0xf9d30f===_0x315eea;},'FJTqo':'false'};if(BOOLEAN_KEYS[_0x1cbb7b(0x1ef)](_0x2bc58a)){if(_0x2cc529==='true')return!![];if(_0x5be45a[_0x1cbb7b(0x210)](_0x2cc529,_0x5be45a['FJTqo']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2bc58a+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2cc529;}function parseOverrideValue(_0x11dc7f){const _0x1c25e6=_0x576a7e,_0x435818={'NwLgO':function(_0x43661f,_0x5a8b40){return _0x43661f===_0x5a8b40;},'APhKd':_0x1c25e6(0x215),'OpxIL':'undefined','BrZHO':function(_0x264d77,_0x2884ca){return _0x264d77(_0x2884ca);}};if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818['APhKd']))return!![];if(_0x11dc7f===_0x1c25e6(0x216))return![];if(_0x11dc7f===_0x1c25e6(0x204))return null;if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818[_0x1c25e6(0x211)]))return undefined;if(/^-?\d+$/['test'](_0x11dc7f)){const _0xf2411b=_0x435818[_0x1c25e6(0x1f8)](Number,_0x11dc7f);if(Number['isSafeInteger'](_0xf2411b))return _0xf2411b;}if(/^-?\d+\.\d+$/['test'](_0x11dc7f)){const _0x46ef15=_0x435818['BrZHO'](Number,_0x11dc7f);if(!Number['isNaN'](_0x46ef15))return _0x46ef15;}const _0xaf7eb3=_0x11dc7f[_0x1c25e6(0x21d)]();if(_0xaf7eb3[_0x1c25e6(0x1fd)]('{')&&_0xaf7eb3['endsWith']('}')||_0xaf7eb3['startsWith']('[')&&_0xaf7eb3['endsWith'](']'))try{return JSON['parse'](_0xaf7eb3);}catch{}return _0x11dc7f;}async function resolveProfileTarget(_0x1fce55){const _0x899b32=_0x576a7e,_0x111085={'WHEmn':function(_0x3343cb,_0x5a79f9){return _0x3343cb(_0x5a79f9);},'onQNs':function(_0xd457d0,_0x4c0b1b){return _0xd457d0(_0x4c0b1b);},'YMRdZ':'local'},_0xd5c76e=existsSync(_0x111085['WHEmn'](getEnvDir,_0x1fce55));let _0x2afba2=![];try{const _0x54b784=await _0x111085['onQNs'](fetchCloudProfile,_0x1fce55);_0x2afba2=Boolean(_0x54b784);}catch{}if(_0x2afba2)return{'kind':'cloud','alsoExistsElsewhere':_0xd5c76e};if(_0xd5c76e)return{'kind':_0x111085[_0x899b32(0x1f5)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1fce55+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1fce55);}function _0x444d(_0x5aa33b,_0x418bd9){_0x5aa33b=_0x5aa33b-0x1ee;const _0x2f6a0e=_0x2f6a();let _0x444d48=_0x2f6a0e[_0x5aa33b];return _0x444d48;}function printDualExistsHint(_0x1e7f92){const _0x11be7a=_0x576a7e;console['log'](_0x11be7a(0x207)+_0x1e7f92+_0x11be7a(0x21e));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2376d7){const _0x39304b={'WlZtk':function(_0x37a189,_0x14bb39){return _0x37a189(_0x14bb39);}},_0x1fe291=await _0x39304b['WlZtk'](fetchCloudProfile,_0x2376d7),_0x2eae20=readProfileOverrides(getProjectPath(),_0x2376d7);return mergeCloudProfileSettings(_0x1fe291?.['settings']??{},_0x2eae20??undefined);}function _0x2f6a(){const _0x151f44=['BrZHO','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','kind','3825776JXIrkG','startsWith','NwLgO','forceLogin','headless','Key\x20\x22','object','(not\x20set)','null','No\x20configuration\x20set\x20for\x20\x22','piVAo','\x20\x20Note:\x20\x22','2zjuUAE','allowInsecureLocalhost','KjflE','6902080lDOcJN','rsHsU','Removed\x20','18wcAnqV','Dffiy','tFmNb','OpxIL','cloud','3132306HlEnTy','yUXBp','true','false','3190984RVHrWw','\x20for\x20\x22','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','WYOue','psmOp','Set\x20','trim','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','20ikumvj','includes','log','3860340vFWwon','\x20=\x20','419201neXVox','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','YMRdZ','stringify','620165AbvFTA'];_0x2f6a=function(){return _0x151f44;};return _0x2f6a();}export async function configSet(_0x309910,_0x3b9d00,_0x5c3b0f){const _0x56f87b=_0x576a7e,_0x3b844c={'HAGDr':function(_0x4444f2,_0x423791){return _0x4444f2(_0x423791);},'rsHsU':function(_0x277adf,_0x4626c6){return _0x277adf===_0x4626c6;},'CRUIu':_0x56f87b(0x212),'faojP':function(_0x1e2898,_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee){return _0x1e2898(_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee);},'YRPuL':function(_0x4dd68e,_0x394ef9,_0x417eca){return _0x4dd68e(_0x394ef9,_0x417eca);},'piVAo':function(_0xf4e50d){return _0xf4e50d();}},_0x4114b5=await _0x3b844c['HAGDr'](resolveProfileTarget,_0x309910);if(_0x3b844c[_0x56f87b(0x20c)](_0x4114b5['kind'],_0x3b844c['CRUIu'])){if(_0x4114b5['alsoExistsElsewhere'])printDualExistsHint(_0x309910);const _0x2cc762=parseOverrideValue(_0x5c3b0f);_0x3b844c['faojP'](setProfileOverride,getProjectPath(),_0x309910,_0x3b9d00,_0x2cc762),console['log'](_0x56f87b(0x21c)+_0x3b9d00+_0x56f87b(0x1f2)+JSON[_0x56f87b(0x1f6)](_0x2cc762)+_0x56f87b(0x218)+_0x309910+'\x22');return;}const _0xe96074=_0x3b844c['YRPuL'](parseLocalValue,_0x3b9d00,_0x5c3b0f);setProfileOverride(_0x3b844c[_0x56f87b(0x206)](getProjectPath),_0x309910,_0x3b9d00,_0xe96074),console['log'](_0x56f87b(0x21c)+_0x3b9d00+'\x20=\x20'+_0xe96074+_0x56f87b(0x218)+_0x309910+'\x22');}export async function configGet(_0x3aa5c1,_0x4273a0){const _0x178c66=_0x576a7e,_0xccd180={'WYOue':function(_0x26d79f,_0x3d8c95){return _0x26d79f(_0x3d8c95);},'gAyaq':function(_0x2215d2,_0x105fa2){return _0x2215d2===_0x105fa2;},'htIRz':'cloud','yUXBp':function(_0x697c58,_0x14d82e,_0x528099){return _0x697c58(_0x14d82e,_0x528099);}},_0x2e35c5=await _0xccd180['WYOue'](resolveProfileTarget,_0x3aa5c1);if(_0xccd180['gAyaq'](_0x2e35c5[_0x178c66(0x1fb)],_0xccd180['htIRz'])){const _0x142971=await _0xccd180[_0x178c66(0x21a)](loadEffectiveCloudSettings,_0x3aa5c1),_0x48342c=_0xccd180[_0x178c66(0x214)](getNestedValue,_0x142971,_0x4273a0);if(_0x48342c===undefined)console[_0x178c66(0x1f0)]('(not\x20set)');else typeof _0x48342c==='object'?console['log'](JSON['stringify'](_0x48342c,null,0x2)):console['log'](_0x48342c);return;}const _0xc40574=await loadSettings(_0x3aa5c1),_0x2084fc=getNestedValue(_0xc40574,_0x4273a0);if(_0x2084fc===undefined)console[_0x178c66(0x1f0)](_0x178c66(0x203));else typeof _0x2084fc===_0x178c66(0x202)?console['log'](JSON[_0x178c66(0x1f6)](_0x2084fc,null,0x2)):console['log'](_0x2084fc);}export async function configList(_0x114c0e){const _0x19aebc=_0x576a7e,_0x5e5e40={'psmOp':function(_0xe29cea,_0x399b2a){return _0xe29cea===_0x399b2a;},'hYRGa':function(_0x3e9cc1,_0x24e659){return _0x3e9cc1(_0x24e659);},'KjflE':function(_0x82741f,_0x261229){return _0x82741f===_0x261229;}},_0x1a600f=await resolveProfileTarget(_0x114c0e);if(_0x5e5e40[_0x19aebc(0x21b)](_0x1a600f[_0x19aebc(0x1fb)],'cloud')){const _0x2ce7d9=await _0x5e5e40['hYRGa'](loadEffectiveCloudSettings,_0x114c0e);if(!_0x2ce7d9||_0x5e5e40[_0x19aebc(0x20a)](Object['keys'](_0x2ce7d9)[_0x19aebc(0x1fa)],0x0)){console[_0x19aebc(0x1f0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x114c0e+'\x22');return;}console['log'](JSON['stringify'](_0x2ce7d9,null,0x2));return;}const _0x63a802=getSettingsPath(_0x114c0e);if(!existsSync(_0x63a802)){console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22');return;}const _0x2f65bf=await loadSettings(_0x114c0e),_0x4794fc=_0x5e5e40['hYRGa'](formatSettings,_0x2f65bf);!_0x4794fc?console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22'):console[_0x19aebc(0x1f0)](_0x4794fc);}export async function configUnset(_0x47a13b,_0x51a1dd){const _0x346346=_0x576a7e,_0x3c9cf5={'Dffiy':function(_0x771758,_0x29b4b9){return _0x771758(_0x29b4b9);},'zXMuZ':function(_0x2e0dc6,_0x41e65e){return _0x2e0dc6===_0x41e65e;}},_0x2b6589=await _0x3c9cf5['Dffiy'](resolveProfileTarget,_0x47a13b);if(_0x3c9cf5['zXMuZ'](_0x2b6589['kind'],_0x346346(0x212))){if(_0x2b6589['alsoExistsElsewhere'])_0x3c9cf5['Dffiy'](printDualExistsHint,_0x47a13b);const _0x211df2=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);_0x211df2?console[_0x346346(0x1f0)]('Removed\x20'+_0x51a1dd+_0x346346(0x218)+_0x47a13b+'\x22'):console[_0x346346(0x1f0)](_0x346346(0x201)+_0x51a1dd+'\x22\x20not\x20found');return;}const _0x1718c8=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);if(_0x1718c8){console[_0x346346(0x1f0)](_0x346346(0x20d)+_0x51a1dd);return;}const _0x261da9=await _0x3c9cf5[_0x346346(0x20f)](loadSettings,_0x47a13b),_0x38f405=deleteNestedValue(_0x261da9,_0x51a1dd);_0x38f405?console['log']('Key\x20\x22'+_0x51a1dd+_0x346346(0x1f4)+_0x47a13b+_0x346346(0x219)):console[_0x346346(0x1f0)]('Key\x20\x22'+_0x51a1dd+'\x22\x20not\x20found');}export async function configReset(_0x2b3519){const _0x469edf=_0x576a7e,_0x304a1f={'grnyI':function(_0x3db1e1,_0x1071e3){return _0x3db1e1===_0x1071e3;},'pmMjn':function(_0x4c31fd){return _0x4c31fd();}},_0x6993dc=await resolveProfileTarget(_0x2b3519);if(_0x304a1f['grnyI'](_0x6993dc[_0x469edf(0x1fb)],'cloud')){resetProfileOverrides(_0x304a1f['pmMjn'](getProjectPath),_0x2b3519),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x2b3519+'\x22');return;}console[_0x469edf(0x1f0)]('\x22'+_0x2b3519+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x2b3519+_0x469edf(0x1f9));}
@@ -1 +1 @@
1
- (function(_0x4e83da,_0x402f10){const _0x1b286b=_0x2f92,_0x3dc5af=_0x4e83da();while(!![]){try{const _0x52f418=parseInt(_0x1b286b(0x197))/0x1*(-parseInt(_0x1b286b(0x19e))/0x2)+-parseInt(_0x1b286b(0x1a8))/0x3+-parseInt(_0x1b286b(0x194))/0x4+parseInt(_0x1b286b(0x199))/0x5+-parseInt(_0x1b286b(0x1a0))/0x6+parseInt(_0x1b286b(0x19b))/0x7+parseInt(_0x1b286b(0x1a1))/0x8*(parseInt(_0x1b286b(0x19c))/0x9);if(_0x52f418===_0x402f10)break;else _0x3dc5af['push'](_0x3dc5af['shift']());}catch(_0x1d6a42){_0x3dc5af['push'](_0x3dc5af['shift']());}}}(_0x5650,0xbefdf));import _0x2a77f4 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x5650(){const _0x554ceb=['\x22\x20to\x20confirm\x20deletion:','174942YbtSMF','\x22\x20not\x20found.','1085772InJYIn','6266888EBkiJb','input','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','confirmation','log','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','XPzeH','3605154mchicg','4168404nzUyKL','Cloud\x20profile\x20\x22','yes','11OZGUJt','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','6408920oyCuSs','prompt','9245313GBHdFw','18bupNcQ'];_0x5650=function(){return _0x554ceb;};return _0x5650();}import{isInteractive}from'./utils/cloudProfileSession.js';function _0x2f92(_0x4e4b9b,_0x1e1732){_0x4e4b9b=_0x4e4b9b-0x194;const _0x56507c=_0x5650();let _0x2f92ff=_0x56507c[_0x4e4b9b];return _0x2f92ff;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x4d6937,_0x3eafd9={}){const _0x4edf13=_0x2f92,_0x4b1430={'pxlvf':function(_0x4b476b,_0x4e0c2c){return _0x4b476b(_0x4e0c2c);},'XPzeH':function(_0x47ebbc){return _0x47ebbc();},'BnEeS':_0x4edf13(0x1a2),'OBIvf':_0x4edf13(0x1a6)},_0x5a3ad0=await _0x4b1430['pxlvf'](fetchCloudProfile,_0x4d6937);if(!_0x5a3ad0)throw new Error(_0x4edf13(0x195)+_0x4d6937+_0x4edf13(0x19f));if(!_0x3eafd9[_0x4edf13(0x196)]&&!_0x4b1430[_0x4edf13(0x1a7)](isInteractive))throw new Error(_0x4edf13(0x1a3));console[_0x4edf13(0x1a5)](_0x4edf13(0x198)+_0x4d6937+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x3eafd9[_0x4edf13(0x196)]){const {confirmation:_0x199858}=await _0x2a77f4[_0x4edf13(0x19a)]([{'type':_0x4b1430['BnEeS'],'name':_0x4edf13(0x1a4),'message':'Type\x20\x22'+_0x4d6937+_0x4edf13(0x19d)}]);if(_0x199858!==_0x4d6937)throw new Error(_0x4b1430['OBIvf']);}await _0x4b1430['pxlvf'](deleteCloudProfile,_0x4d6937),resetProfileOverrides(process['cwd'](),_0x4d6937),clearLastProfile(process['cwd'](),_0x4d6937),console[_0x4edf13(0x1a5)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x4d6937+'\x22.');}
1
+ (function(_0xd856b9,_0x134a3c){const _0x4fe3a4=_0x2794,_0xa4c366=_0xd856b9();while(!![]){try{const _0x43b581=-parseInt(_0x4fe3a4(0x14a))/0x1*(parseInt(_0x4fe3a4(0x154))/0x2)+parseInt(_0x4fe3a4(0x153))/0x3+-parseInt(_0x4fe3a4(0x15a))/0x4*(-parseInt(_0x4fe3a4(0x15b))/0x5)+parseInt(_0x4fe3a4(0x14b))/0x6+-parseInt(_0x4fe3a4(0x14d))/0x7+-parseInt(_0x4fe3a4(0x152))/0x8*(-parseInt(_0x4fe3a4(0x14e))/0x9)+-parseInt(_0x4fe3a4(0x151))/0xa;if(_0x43b581===_0x134a3c)break;else _0xa4c366['push'](_0xa4c366['shift']());}catch(_0x248345){_0xa4c366['push'](_0xa4c366['shift']());}}}(_0x4ef2,0xa66ff));function _0x4ef2(){const _0xa64608=['cwd','959668AQeWQt','20STJdEJ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','427vmVHXK','5402694rRmfqB','Cloud\x20profile\x20\x22','2979802GcEbpN','9ruBhqn','RUSYF','\x22\x20for\x20everyone\x20in\x20your\x20organization.','12859390SUAkip','5054344JrskaL','1637355EzKWVw','3018xBOjqZ','CIDvW','jYKEs','prompt','✓\x20Deleted\x20cloud\x20profile\x20\x22'];_0x4ef2=function(){return _0xa64608;};return _0x4ef2();}import _0x2f0b3c from'inquirer';function _0x2794(_0x3e9c0c,_0x56b659){_0x3e9c0c=_0x3e9c0c-0x14a;const _0x4ef252=_0x4ef2();let _0x2794dd=_0x4ef252[_0x3e9c0c];return _0x2794dd;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x29e73a,_0x551500={}){const _0x306ce5=_0x2794,_0x5f3bdd={'CIDvW':function(_0x2926f1,_0xd727c3){return _0x2926f1(_0xd727c3);},'RUSYF':function(_0x4fe050){return _0x4fe050();},'jrrFb':function(_0x553734,_0xe219ff){return _0x553734!==_0xe219ff;},'oLFds':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','jYKEs':function(_0x27f7a4,_0x20ebdc,_0x194646){return _0x27f7a4(_0x20ebdc,_0x194646);}},_0x31aedd=await _0x5f3bdd[_0x306ce5(0x155)](fetchCloudProfile,_0x29e73a);if(!_0x31aedd)throw new Error(_0x306ce5(0x14c)+_0x29e73a+'\x22\x20not\x20found.');if(!_0x551500['yes']&&!_0x5f3bdd[_0x306ce5(0x14f)](isInteractive))throw new Error(_0x306ce5(0x15c));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x29e73a+_0x306ce5(0x150));if(!_0x551500['yes']){const {confirmation:_0x432622}=await _0x2f0b3c[_0x306ce5(0x157)]([{'type':'input','name':'confirmation','message':'Type\x20\x22'+_0x29e73a+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x5f3bdd['jrrFb'](_0x432622,_0x29e73a))throw new Error(_0x5f3bdd['oLFds']);}await deleteCloudProfile(_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](resetProfileOverrides,process[_0x306ce5(0x159)](),_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](clearLastProfile,process['cwd'](),_0x29e73a),console['log'](_0x306ce5(0x158)+_0x29e73a+'\x22.');}
@@ -1 +1 @@
1
- function _0x5c12(){const _0x863e17=['316zqKbmy','sessionUpdatedAt','local','7DduJWx','no\x20session','FJEyf','DunFm','5083014ptDUpr','ABCIQ','length','xrtNd','error','legacy','KKkYK','includes','FBbBe','push','Fihac','endsWith','OnEnI','3VqLkYY','\x20\x20\x20\x20\x20\x20Details:\x20','sort','zBAKY','3632VHYZKY','6407532MzeoCA','baseUrl','bug-bashes','\x20\x20\x20\x20Session:\x20','11zdFZmy','isDirectory','get','Ywxms','KBngx','fIfBa','name','profiles','environmentDetails','2591702DJSqHP','fOEAC','bkZcK','30945oPQgdN','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','357904QGJmVR','log','\x0aLocal\x20Profiles\x20(legacy):','6561MpKaqv','\x0a\x20\x20','localeCompare','12519980DVswQo'];_0x5c12=function(){return _0x863e17;};return _0x5c12();}function _0x5b4c(_0x3b258d,_0x331fde){_0x3b258d=_0x3b258d-0x1f2;const _0x5c12aa=_0x5c12();let _0x5b4c6b=_0x5c12aa[_0x3b258d];return _0x5b4c6b;}const _0x2c7be3=_0x5b4c;(function(_0x3c0236,_0x4b5be4){const _0x2e1ac3=_0x5b4c,_0x5b3ad7=_0x3c0236();while(!![]){try{const _0x481858=-parseInt(_0x2e1ac3(0x213))/0x1+parseInt(_0x2e1ac3(0x20e))/0x2*(parseInt(_0x2e1ac3(0x1fc))/0x3)+-parseInt(_0x2e1ac3(0x21a))/0x4*(parseInt(_0x2e1ac3(0x211))/0x5)+-parseInt(_0x2e1ac3(0x221))/0x6*(parseInt(_0x2e1ac3(0x21d))/0x7)+parseInt(_0x2e1ac3(0x200))/0x8*(parseInt(_0x2e1ac3(0x216))/0x9)+parseInt(_0x2e1ac3(0x219))/0xa+parseInt(_0x2e1ac3(0x205))/0xb*(-parseInt(_0x2e1ac3(0x201))/0xc);if(_0x481858===_0x4b5be4)break;else _0x5b3ad7['push'](_0x5b3ad7['shift']());}catch(_0x44d767){_0x5b3ad7['push'](_0x5b3ad7['shift']());}}}(_0x5c12,0x9ee62));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',_0x2c7be3(0x203),'reports',_0x2c7be3(0x21c),'ci'];export function shouldGroupByEnvironment(_0x3b43bc){return _0x3b43bc['some'](_0x538d53=>_0x538d53['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x403805){const _0x1a3dec=_0x2c7be3,_0x759895={'RjhUl':function(_0xe9f89d,_0x529d3e){return _0xe9f89d===_0x529d3e;}},_0x3373a5=new Map();for(const _0x1856e5 of _0x403805){const _0x49e209=_0x1856e5['environmentKey']??null,_0x328d18=_0x3373a5['get'](_0x49e209);if(_0x328d18)_0x328d18['push'](_0x1856e5);else _0x3373a5['set'](_0x49e209,[_0x1856e5]);}const _0x3799b3=[..._0x3373a5['keys']()][_0x1a3dec(0x1fe)]((_0x2ccb1d,_0x3b1363)=>{const _0x553639=_0x1a3dec;if(_0x759895['RjhUl'](_0x2ccb1d,null))return 0x1;if(_0x3b1363===null)return-0x1;return _0x2ccb1d[_0x553639(0x218)](_0x3b1363);});return _0x3799b3['map'](_0x133b1c=>({'environmentKey':_0x133b1c,'profiles':_0x3373a5[_0x1a3dec(0x207)](_0x133b1c)['sort']((_0x147aa3,_0x331989)=>_0x147aa3['name'][_0x1a3dec(0x218)](_0x331989[_0x1a3dec(0x20b)]))}));}export async function getEnvNames(){const _0x3e2db3=_0x2c7be3,_0x301e02={'uQljH':function(_0x1c8aab){return _0x1c8aab();},'sGrdy':function(_0x4841c4,_0x23fc77,_0xd09063){return _0x4841c4(_0x23fc77,_0xd09063);},'KIeuP':function(_0x32c285,_0x5a2cf3){return _0x32c285(_0x5a2cf3);},'YXVDP':'local','ABCIQ':function(_0xaecc87,_0x221213){return _0xaecc87(_0x221213);},'DunFm':function(_0x1b30d9,_0x339646,_0x7abc53){return _0x1b30d9(_0x339646,_0x7abc53);},'FBbBe':function(_0x590188,_0x2b5451){return _0x590188(_0x2b5451);},'Fihac':'.txt','WUzPP':_0x3e2db3(0x1f4)},_0x58f528=_0x301e02['uQljH'](getRangerDir);if(!existsSync(_0x58f528))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x174d09=await readActiveProfileName(),_0x339bac=[],_0x45b1db={},_0x4f5742=_0x301e02['sGrdy'](join,_0x58f528,_0x3e2db3(0x21c));if(existsSync(_0x4f5742)){const _0x334c2d=await readdir(_0x4f5742);for(const _0x3d97c7 of _0x334c2d){const _0x56a184=join(_0x4f5742,_0x3d97c7),_0x5f5361=await _0x301e02['KIeuP'](stat,_0x56a184);_0x5f5361['isDirectory']()&&(_0x339bac[_0x3e2db3(0x1f8)](_0x3d97c7),_0x45b1db[_0x3d97c7]=_0x301e02['YXVDP']);}}const _0x135196=join(_0x58f528,'ci');if(_0x301e02['ABCIQ'](existsSync,_0x135196)){const _0x238c30=await _0x301e02['ABCIQ'](readdir,_0x135196);for(const _0x37c6e0 of _0x238c30){const _0x2413ea=_0x301e02['DunFm'](join,_0x135196,_0x37c6e0),_0x2451b7=await stat(_0x2413ea);_0x2451b7['isDirectory']()&&(_0x339bac[_0x3e2db3(0x1f8)](_0x37c6e0),_0x45b1db[_0x37c6e0]='ci');}}const _0x553ff2=await _0x301e02[_0x3e2db3(0x1f7)](readdir,_0x58f528);for(const _0x5062a5 of _0x553ff2){if(NON_ENV_DIRS[_0x3e2db3(0x1f6)](_0x5062a5))continue;if(_0x5062a5['startsWith']('.'))continue;if(_0x5062a5[_0x3e2db3(0x1fa)](_0x301e02[_0x3e2db3(0x1f9)]))continue;const _0x13432c=_0x301e02[_0x3e2db3(0x220)](join,_0x58f528,_0x5062a5),_0x59dac2=await _0x301e02[_0x3e2db3(0x222)](stat,_0x13432c);_0x59dac2[_0x3e2db3(0x206)]()&&existsSync(join(_0x13432c,'settings.json'))&&(!_0x339bac[_0x3e2db3(0x1f6)](_0x5062a5)&&(_0x339bac[_0x3e2db3(0x1f8)](_0x5062a5),_0x45b1db[_0x5062a5]=_0x301e02['WUzPP']));}return{'envNames':_0x339bac,'activeEnv':_0x174d09,'envTypes':_0x45b1db};}export async function envList(){const _0x4d553f=_0x2c7be3,_0x48dbd9={'fIfBa':_0x4d553f(0x21e),'OnEnI':function(_0x8f4731,_0x4cbfdf){return _0x8f4731(_0x4cbfdf);},'Ywxms':function(_0x215daa,_0x6f73b0){return _0x215daa===_0x6f73b0;},'fOEAC':'\x0aNo\x20profiles\x20found.','bkZcK':function(_0x4a6343,_0x42baa5){return _0x4a6343===_0x42baa5;},'pyjqg':'local','zBAKY':'legacy','KBngx':'\x0aCloud\x20Profiles\x20(by\x20environment):','FJEyf':'\x20\x20\x20\x20','xrtNd':'\x0aCloud\x20Profiles:','KKkYK':function(_0x440357,_0x1046a2,_0x2575a6){return _0x440357(_0x1046a2,_0x2575a6);}},{envNames:_0x30acb7,activeEnv:_0x2e6f81,envTypes:_0x96ca7b}=await getEnvNames();let _0x1e0b42=[];const _0x1c80cc=await getToken();if(_0x1c80cc)try{_0x1e0b42=await listCloudProfiles();}catch(_0x5db2ca){console[_0x4d553f(0x1f3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x5db2ca instanceof Error?_0x5db2ca['message']:_0x48dbd9[_0x4d553f(0x1fb)](String,_0x5db2ca)));}if(_0x48dbd9[_0x4d553f(0x208)](_0x30acb7['length'],0x0)&&_0x48dbd9[_0x4d553f(0x208)](_0x1e0b42['length'],0x0)){console['log'](_0x48dbd9[_0x4d553f(0x20f)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x148c28=new Set(_0x1e0b42['map'](_0x464983=>_0x464983[_0x4d553f(0x20b)]));if(_0x30acb7['length']>0x0){console[_0x4d553f(0x214)](_0x4d553f(0x215));for(const _0x1e6620 of _0x30acb7[_0x4d553f(0x1fe)]()){const _0x17fef1=_0x48dbd9[_0x4d553f(0x210)](_0x1e6620,_0x2e6f81)&&!_0x148c28['has'](_0x1e6620),_0x3ad29e=_0x96ca7b[_0x1e6620]||_0x48dbd9['pyjqg'],_0xd622c1=await _0x48dbd9[_0x4d553f(0x1fb)](loadSettings,_0x1e6620),_0x19ead3=_0x3ad29e===_0x48dbd9[_0x4d553f(0x1ff)]?'':'\x20['+_0x3ad29e+']';console['log']('\x20\x20'+(_0x17fef1?'*\x20':'\x20\x20')+_0x1e6620+_0x19ead3),_0xd622c1[_0x4d553f(0x202)]&&console[_0x4d553f(0x214)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xd622c1['baseUrl']),_0xd622c1[_0x4d553f(0x20d)]&&console['log'](_0x4d553f(0x1fd)+_0xd622c1[_0x4d553f(0x20d)]);}}const _0x57ea1b=(_0x6c2b7e,_0x3fab86)=>{const _0x1a3e02=_0x4d553f,_0x226be2=_0x6c2b7e[_0x1a3e02(0x20b)]===_0x2e6f81,_0xb18b37=_0x6c2b7e[_0x1a3e02(0x21b)]?'cached\x20(updated\x20'+_0x6c2b7e['sessionUpdatedAt']+')':_0x48dbd9[_0x1a3e02(0x20a)];console[_0x1a3e02(0x214)](''+_0x3fab86+(_0x226be2?'*\x20':'\x20\x20')+_0x6c2b7e[_0x1a3e02(0x20b)]),console[_0x1a3e02(0x214)](_0x3fab86+_0x1a3e02(0x204)+_0xb18b37);};if(_0x1e0b42[_0x4d553f(0x223)]>0x0){if(shouldGroupByEnvironment(_0x1e0b42)){console[_0x4d553f(0x214)](_0x48dbd9[_0x4d553f(0x209)]);for(const _0x483356 of groupCloudProfilesByEnvironment(_0x1e0b42)){const _0x1ce0ad=_0x483356['environmentKey']??_0x4d553f(0x212);console[_0x4d553f(0x214)](_0x4d553f(0x217)+_0x1ce0ad);for(const _0x3e2f9d of _0x483356[_0x4d553f(0x20c)]){_0x57ea1b(_0x3e2f9d,_0x48dbd9[_0x4d553f(0x21f)]);}}}else{console[_0x4d553f(0x214)](_0x48dbd9[_0x4d553f(0x1f2)]);for(const _0x4e5cd9 of[..._0x1e0b42][_0x4d553f(0x1fe)]((_0xbdc34c,_0x537359)=>_0xbdc34c['name']['localeCompare'](_0x537359['name']))){_0x48dbd9[_0x4d553f(0x1f5)](_0x57ea1b,_0x4e5cd9,'\x20\x20');}}}_0x2e6f81&&console[_0x4d553f(0x214)]('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x3ca113=_0x21b7;(function(_0x5adefb,_0x464b40){const _0x968cc7=_0x21b7,_0x62a4cd=_0x5adefb();while(!![]){try{const _0x5f01ec=-parseInt(_0x968cc7(0x156))/0x1*(parseInt(_0x968cc7(0x157))/0x2)+-parseInt(_0x968cc7(0x14a))/0x3*(-parseInt(_0x968cc7(0x15a))/0x4)+parseInt(_0x968cc7(0x168))/0x5+parseInt(_0x968cc7(0x170))/0x6*(parseInt(_0x968cc7(0x14f))/0x7)+-parseInt(_0x968cc7(0x175))/0x8*(parseInt(_0x968cc7(0x174))/0x9)+-parseInt(_0x968cc7(0x14b))/0xa*(parseInt(_0x968cc7(0x177))/0xb)+parseInt(_0x968cc7(0x14c))/0xc*(parseInt(_0x968cc7(0x15b))/0xd);if(_0x5f01ec===_0x464b40)break;else _0x62a4cd['push'](_0x62a4cd['shift']());}catch(_0x4539fb){_0x62a4cd['push'](_0x62a4cd['shift']());}}}(_0x356e,0x3e951));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';function _0x21b7(_0x5da836,_0x5e1eb9){_0x5da836=_0x5da836-0x14a;const _0x356ec7=_0x356e();let _0x21b7a2=_0x356ec7[_0x5da836];return _0x21b7a2;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x3ca113(0x15d),_0x3ca113(0x14e),'ci'];export function shouldGroupByEnvironment(_0x4b9631){const _0x5a8d28=_0x3ca113;return _0x4b9631[_0x5a8d28(0x15e)](_0x5791b4=>_0x5791b4['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xc26da9){const _0x38ce66=_0x3ca113,_0x2e0fb4={'BpqQf':function(_0x5a4a53,_0x77ea79){return _0x5a4a53===_0x77ea79;}},_0x5e5122=new Map();for(const _0x1f1bbe of _0xc26da9){const _0x418601=_0x1f1bbe['environmentKey']??null,_0x3da45e=_0x5e5122[_0x38ce66(0x17c)](_0x418601);if(_0x3da45e)_0x3da45e[_0x38ce66(0x154)](_0x1f1bbe);else _0x5e5122[_0x38ce66(0x163)](_0x418601,[_0x1f1bbe]);}const _0x39412d=[..._0x5e5122['keys']()]['sort']((_0x5c7890,_0x143ab9)=>{const _0x3bd147=_0x38ce66;if(_0x2e0fb4[_0x3bd147(0x17d)](_0x5c7890,null))return 0x1;if(_0x143ab9===null)return-0x1;return _0x5c7890[_0x3bd147(0x161)](_0x143ab9);});return _0x39412d[_0x38ce66(0x178)](_0x416b5c=>({'environmentKey':_0x416b5c,'profiles':_0x5e5122['get'](_0x416b5c)['sort']((_0x56e245,_0x3d930e)=>_0x56e245['name'][_0x38ce66(0x161)](_0x3d930e[_0x38ce66(0x158)]))}));}export async function getEnvNames(){const _0x57d82d=_0x3ca113,_0x3eff40={'syhDv':function(_0x330f89,_0x4f44f6){return _0x330f89(_0x4f44f6);},'REubT':_0x57d82d(0x14e),'kfrHi':function(_0x63b7eb,_0x3a063d){return _0x63b7eb(_0x3a063d);},'dkGWM':function(_0x20d893,_0x37e76f,_0x4995c4){return _0x20d893(_0x37e76f,_0x4995c4);},'qEYuk':_0x57d82d(0x159)},_0x42af62=getRangerDir();if(!_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x42af62))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3bc10e=await readActiveProfileName(),_0x1049ac=[],_0x216cfc={},_0xed4260=join(_0x42af62,_0x3eff40[_0x57d82d(0x16c)]);if(_0x3eff40['kfrHi'](existsSync,_0xed4260)){const _0x4a9cc0=await readdir(_0xed4260);for(const _0x11db27 of _0x4a9cc0){const _0x5b0ba2=join(_0xed4260,_0x11db27),_0x123a95=await stat(_0x5b0ba2);_0x123a95[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0x11db27),_0x216cfc[_0x11db27]=_0x3eff40[_0x57d82d(0x16c)]);}}const _0x1f66ac=join(_0x42af62,'ci');if(_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x1f66ac)){const _0x4f0c95=await readdir(_0x1f66ac);for(const _0xa9fa48 of _0x4f0c95){const _0x4c507b=_0x3eff40['dkGWM'](join,_0x1f66ac,_0xa9fa48),_0x579893=await _0x3eff40['syhDv'](stat,_0x4c507b);_0x579893[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0xa9fa48),_0x216cfc[_0xa9fa48]='ci');}}const _0x3f5de0=await readdir(_0x42af62);for(const _0x276067 of _0x3f5de0){if(NON_ENV_DIRS['includes'](_0x276067))continue;if(_0x276067[_0x57d82d(0x16f)]('.'))continue;if(_0x276067[_0x57d82d(0x17e)]('.txt'))continue;const _0x4dc4a5=join(_0x42af62,_0x276067),_0x43f9af=await stat(_0x4dc4a5);_0x43f9af[_0x57d82d(0x15c)]()&&existsSync(join(_0x4dc4a5,_0x57d82d(0x176)))&&(!_0x1049ac[_0x57d82d(0x153)](_0x276067)&&(_0x1049ac['push'](_0x276067),_0x216cfc[_0x276067]=_0x3eff40[_0x57d82d(0x155)]));}return{'envNames':_0x1049ac,'activeEnv':_0x3bc10e,'envTypes':_0x216cfc};}function _0x356e(){const _0x29e970=['get','BpqQf','endsWith','3rSvjUR','50XDbxKO','110076XURZhQ','sort','local','1665342dpbyai','profiles','\x0a*\x20=\x20active\x20profile','LeGOO','includes','push','qEYuk','357ONrZQq','2378GxEiYu','name','legacy','190612qzzyct','494AHJCMA','isDirectory','reports','some','\x20\x20\x20\x20Session:\x20','length','localeCompare','log','set','\x20\x20\x20\x20','environmentDetails','\x0aCloud\x20Profiles:','AcsdH','1844280KzOmKN','PWUkC','syhDv','\x20\x20\x20\x20\x20\x20URL:\x20','REubT','error','\x0aNo\x20profiles\x20found.','startsWith','6FrhSHI','TBPJv','LqfMt','NEIJe','5364CtirYZ','952rMbuil','settings.json','552761ZmaWKi','map','cached\x20(updated\x20','baseUrl','has'];_0x356e=function(){return _0x29e970;};return _0x356e();}export async function envList(){const _0x521d5e=_0x3ca113,_0xf17600={'NEIJe':function(_0xdf76e8,_0x4c7854){return _0xdf76e8===_0x4c7854;},'TBPJv':'no\x20session','kdEwu':function(_0x4bf186){return _0x4bf186();},'loNIy':function(_0x220661){return _0x220661();},'AcsdH':function(_0x45cc4e,_0x288753){return _0x45cc4e instanceof _0x288753;},'PWUkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LeGOO':'\x0aLocal\x20Profiles\x20(legacy):','fHriV':'legacy','LqfMt':'\x0aCloud\x20Profiles\x20(by\x20environment):','EOygO':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','dpNLE':_0x521d5e(0x166),'HMvRF':function(_0x37e06f,_0x5abc80,_0x41cab6){return _0x37e06f(_0x5abc80,_0x41cab6);}},{envNames:_0x1fd3a2,activeEnv:_0x452e75,envTypes:_0x52a3eb}=await _0xf17600['kdEwu'](getEnvNames);let _0x36ecbb=[];const _0x1da7fb=await getToken();if(_0x1da7fb)try{_0x36ecbb=await _0xf17600['loNIy'](listCloudProfiles);}catch(_0xb6247f){console[_0x521d5e(0x16d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0xf17600[_0x521d5e(0x167)](_0xb6247f,Error)?_0xb6247f['message']:String(_0xb6247f)));}if(_0x1fd3a2[_0x521d5e(0x160)]===0x0&&_0xf17600[_0x521d5e(0x173)](_0x36ecbb['length'],0x0)){console[_0x521d5e(0x162)](_0x521d5e(0x16e)),console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x169)]);return;}const _0x2d3e9d=new Set(_0x36ecbb['map'](_0x161f90=>_0x161f90['name']));if(_0x1fd3a2[_0x521d5e(0x160)]>0x0){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x152)]);for(const _0x5e62ec of _0x1fd3a2['sort']()){const _0x9c2aa1=_0x5e62ec===_0x452e75&&!_0x2d3e9d[_0x521d5e(0x17b)](_0x5e62ec),_0x2c80aa=_0x52a3eb[_0x5e62ec]||'local',_0x55dad2=await loadSettings(_0x5e62ec),_0x1f742b=_0x2c80aa===_0xf17600['fHriV']?'':'\x20['+_0x2c80aa+']';console['log']('\x20\x20'+(_0x9c2aa1?'*\x20':'\x20\x20')+_0x5e62ec+_0x1f742b),_0x55dad2['baseUrl']&&console['log'](_0x521d5e(0x16b)+_0x55dad2[_0x521d5e(0x17a)]),_0x55dad2['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55dad2[_0x521d5e(0x165)]);}}const _0x564cc7=(_0x162b05,_0x460fa9)=>{const _0x4d2e27=_0x521d5e,_0x317806=_0xf17600[_0x4d2e27(0x173)](_0x162b05[_0x4d2e27(0x158)],_0x452e75),_0x42c7b5=_0x162b05['sessionUpdatedAt']?_0x4d2e27(0x179)+_0x162b05['sessionUpdatedAt']+')':_0xf17600[_0x4d2e27(0x171)];console['log'](''+_0x460fa9+(_0x317806?'*\x20':'\x20\x20')+_0x162b05[_0x4d2e27(0x158)]),console[_0x4d2e27(0x162)](_0x460fa9+_0x4d2e27(0x15f)+_0x42c7b5);};if(_0x36ecbb['length']>0x0){if(shouldGroupByEnvironment(_0x36ecbb)){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x172)]);for(const _0x1e1d58 of groupCloudProfilesByEnvironment(_0x36ecbb)){const _0xbececc=_0x1e1d58['environmentKey']??_0xf17600['EOygO'];console['log']('\x0a\x20\x20'+_0xbececc);for(const _0x388e97 of _0x1e1d58[_0x521d5e(0x150)]){_0x564cc7(_0x388e97,_0x521d5e(0x164));}}}else{console[_0x521d5e(0x162)](_0xf17600['dpNLE']);for(const _0x193f39 of[..._0x36ecbb][_0x521d5e(0x14d)]((_0x4af2b0,_0x26b819)=>_0x4af2b0[_0x521d5e(0x158)]['localeCompare'](_0x26b819['name']))){_0xf17600['HMvRF'](_0x564cc7,_0x193f39,'\x20\x20');}}}_0x452e75&&console[_0x521d5e(0x162)](_0x521d5e(0x151));}