@ranger-testing/ranger-cli 3.1.7-alpha.9dea9f8-61 → 3.1.7-alpha.9f8e190-62

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/actors.js +1 -0
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -1
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -1
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/organizationEnvApi.js +1 -1
  61. package/build/commands/utils/playwrightCli.js +1 -1
  62. package/build/commands/utils/profileMessages.js +1 -1
  63. package/build/commands/utils/profileSetupBanner.js +1 -1
  64. package/build/commands/utils/projectsConfig.js +1 -1
  65. package/build/commands/utils/rangerConfig.js +1 -1
  66. package/build/commands/utils/rangerRoot.js +1 -1
  67. package/build/commands/utils/rangerwrightCli.js +1 -1
  68. package/build/commands/utils/resolveProfileContext.js +1 -1
  69. package/build/commands/utils/resolveProfileUrl.js +1 -1
  70. package/build/commands/utils/retry.js +1 -1
  71. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  72. package/build/commands/utils/sessionCache.js +1 -1
  73. package/build/commands/utils/settings.js +1 -1
  74. package/build/commands/utils/skillContent.js +1 -1
  75. package/build/commands/utils/skills.js +1 -1
  76. package/build/commands/utils/stitchWebmFiles.js +1 -1
  77. package/build/commands/utils/telemetry.js +1 -1
  78. package/build/commands/utils/tokenRefresh.js +1 -1
  79. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  80. package/build/commands/utils/tunnelClient.js +1 -1
  81. package/build/commands/utils/userApi.js +1 -1
  82. package/build/commands/utils/version.js +1 -1
  83. package/build/commands/verifyFeature.js +1 -1
  84. package/build/commands/verifyFeatureCli.js +1 -1
  85. package/build/commands/verifyFeatureNovaCli.js +1 -1
  86. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- const _0x3e0415=_0x7663;(function(_0x24169d,_0x115e63){const _0x5f1346=_0x7663,_0x191d9d=_0x24169d();while(!![]){try{const _0x234e38=-parseInt(_0x5f1346(0x12e))/0x1*(parseInt(_0x5f1346(0x15b))/0x2)+parseInt(_0x5f1346(0x116))/0x3+parseInt(_0x5f1346(0x172))/0x4+-parseInt(_0x5f1346(0x11e))/0x5+-parseInt(_0x5f1346(0x11c))/0x6+parseInt(_0x5f1346(0xf9))/0x7*(parseInt(_0x5f1346(0x136))/0x8)+-parseInt(_0x5f1346(0x16f))/0x9*(-parseInt(_0x5f1346(0x148))/0xa);if(_0x234e38===_0x115e63)break;else _0x191d9d['push'](_0x191d9d['shift']());}catch(_0x193147){_0x191d9d['push'](_0x191d9d['shift']());}}}(_0x9ac9,0xce98c));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5db0d0 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x3e0415(0x107);function warnCloudProfileSharedInOrg(){const _0x4db9ab=_0x3e0415;if(!process[_0x4db9ab(0x16d)][_0x4db9ab(0x118)])return;console[_0x4db9ab(0x11a)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4c15be){const _0x78ec40=_0x3e0415,_0x444b6b={'EfJvZ':function(_0x4738ed,_0x330338,_0x1f441f){return _0x4738ed(_0x330338,_0x1f441f);},'gruwK':function(_0x5c8d57,_0x58361c){return _0x5c8d57(_0x58361c);},'yGoGh':_0x78ec40(0x114),'dcxzd':function(_0x1e212e,_0x319ff0){return _0x1e212e===_0x319ff0;},'vIWEj':_0x78ec40(0x131)};try{const _0x2ec9fd=new AbortController(),_0x3b82d2=setTimeout(()=>_0x2ec9fd['abort'](),0x1388),_0x14ba70={'method':'HEAD','signal':_0x2ec9fd['signal'],'redirect':_0x78ec40(0xef)};/^https:\/\/localhost(:\d+)?/i[_0x78ec40(0x127)](_0x4c15be)&&(process[_0x78ec40(0x104)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x194d86=await _0x444b6b[_0x78ec40(0xf2)](fetch,_0x4c15be,_0x14ba70);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x3b82d2);if(_0x194d86[_0x78ec40(0x120)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x78ec40(0x16e)+_0x194d86[_0x78ec40(0x120)]};}catch(_0x494112){delete process[_0x78ec40(0x104)][_0x78ec40(0x168)];const _0x5d55a6=_0x494112,_0x2c3530=_0x5d55a6['message']||_0x444b6b[_0x78ec40(0x128)](String,_0x494112),_0x3ef5dc=_0x2c3530[_0x78ec40(0xfa)](_0x444b6b[_0x78ec40(0x174)])||_0x444b6b['dcxzd'](_0x5d55a6['name'],_0x444b6b[_0x78ec40(0xfc)])||_0x2c3530[_0x78ec40(0xfa)](_0x78ec40(0x119));return{'ok':![],'error':_0x2c3530,'isProtocolError':_0x3ef5dc};}}async function sweepOrphanLocalProfile(_0x2b7a5e,_0x8fe636,_0x2ec7eb){const _0x208379=_0x3e0415,_0x1e4580={'yQVAC':function(_0x4f04ed,_0x247873){return _0x4f04ed(_0x247873);},'VOyHM':function(_0x5702c0,_0x1fc024,_0x1a5d53){return _0x5702c0(_0x1fc024,_0x1a5d53);}},_0x1168d7=join(_0x8fe636,'local'),_0x4c8f08=join(_0x1168d7,_0x2b7a5e);_0x1e4580['yQVAC'](existsSync,_0x4c8f08)&&(_0x2ec7eb&&await isPathGitTracked(_0x4c8f08)?console[_0x208379(0xf3)](_0x208379(0x151)+_0x4c8f08+_0x208379(0x164)):(await _0x1e4580[_0x208379(0x13c)](rm,_0x4c8f08,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4c8f08)));if(existsSync(_0x1168d7)){let _0x1c4c4e=[];try{_0x1c4c4e=await _0x1e4580['yQVAC'](readdir,_0x1168d7);}catch{return;}const _0x9cf2a=_0x208379(0x10f)+_0x2b7a5e+'-';for(const _0x3fc5a3 of _0x1c4c4e){if(!_0x3fc5a3['startsWith'](_0x9cf2a))continue;const _0x2cee10=_0x1e4580['VOyHM'](join,_0x1168d7,_0x3fc5a3);await rm(_0x2cee10,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2cee10);}}}async function sweepOrphansBestEffort(_0x5f0302){const _0x512a37=_0x3e0415,_0x26f14b={'jyxQV':function(_0x5ab3c4){return _0x5ab3c4();},'EBjdJ':function(_0x22a00d){return _0x22a00d();},'NLhTS':function(_0x1979f3,_0x36090a){return _0x1979f3!==_0x36090a;},'QhkbN':function(_0x1b4272,_0x1a9924){return _0x1b4272 instanceof _0x1a9924;},'CSAnX':function(_0x6a8747,_0x595d2a){return _0x6a8747(_0x595d2a);}};try{await sweepOrphanLocalProfile(_0x5f0302,_0x26f14b['jyxQV'](getRangerHomeDir),![]);const _0x2f4f6b=_0x26f14b[_0x512a37(0x101)](getRangerDir);_0x26f14b['NLhTS'](_0x2f4f6b,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x5f0302,_0x2f4f6b,!![]);}catch(_0x141d44){console['log'](_0x512a37(0x123)+(_0x26f14b['QhkbN'](_0x141d44,Error)?_0x141d44['message']:_0x26f14b[_0x512a37(0x122)](String,_0x141d44))+').');}}function _0x7663(_0x462783,_0x4ee5d6){_0x462783=_0x462783-0xec;const _0x9ac93f=_0x9ac9();let _0x7663c5=_0x9ac93f[_0x462783];return _0x7663c5;}function _0x9ac9(){const _0x731011=['\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','test','gruwK',')\x0a\x20\x20Save\x20\x27','trim','rayQM','\x20\x20Set\x20active\x20profile:\x20','isElectron','801796uDircV','LOXfH','trackPhaseEnd','TypeError','EfPCj','authEnv','cDAxF','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','424JHCqXx','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x20(continuing\x20with\x20--force)','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Gvtjt','url','VOyHM','opmoV','profile.add.autoRouteSkipped','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','yBwGP','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(no\x20session).\x0a','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','TdySr','HWojZ','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x27\x20to\x20the\x20cloud?','170270Uiiowx','user_declined','✓\x20Profile\x20\x27','fjwjA','\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','ZBPXB','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','domains','retry','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','setupHeaders','jStpT','\x27\x20created\x20(CDP).','cwd','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','vpRCr','join','environments','eqIHZ','4wQoRtf','list','use_suggestion','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x0a\x20\x20(domains:\x20','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','message','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','PxRta','\x0a\x20\x20A\x20profile\x20named\x20\x22','skipAuth','NODE_TLS_REJECT_UNAUTHORIZED','input','\x20--skip-auth\x0a','yes','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','stdout','HTTP\x20','1260fmttlR','error','Continue\x20anyway','5092924gOmpYy','vixSN','yGoGh','cdpEndpoint','slice','XuHmx','no_match','manual','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','profile.add.autoRouted','EfJvZ','log','CEyUq','zDkxw','no_auth_config','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','79219JfgxAw','includes','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','vIWEj','xMECC','DHGYG','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','fORrt','EBjdJ','Use\x20','Found\x20auth\x20environment\x20\x27','env','prompt','\x20Configured\x20envs:\x20','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','exit','origin','\x0a\x20\x20Auth\x20environment\x20\x22','keys','FfZLY','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','rcDiZ','.tmp-','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','force','RMrEl','setupHeader','Invalid\x20URL','What\x20would\x20you\x20like\x20to\x20do?','1095903vtbyVd','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isTTY','fetch\x20failed','warn','IUmpd','8112618gVRUSm','indexOf','4100990dMuNyg','length','status','saveToCloud','CSAnX'];_0x9ac9=function(){return _0x731011;};return _0x9ac9();}async function markActive(_0x26ea80){const _0x5b0752=_0x3e0415,_0x449d0b={'LOXfH':function(_0x36a8b5,_0x3262d2){return _0x36a8b5(_0x3262d2);},'IUmpd':_0x5b0752(0x126)};try{await _0x449d0b[_0x5b0752(0x12f)](writeActiveProfileName,_0x26ea80),console['log'](_0x5b0752(0x12c)+_0x26ea80);}catch{console['log'](_0x449d0b[_0x5b0752(0x11b)]);}}async function tryAutoRouteCloudProfile(_0x290e60,_0x33ae39,_0x3e3f86,_0x22d055,_0x2b1609){const _0x14dde2=_0x3e0415,_0x466e79={'zDkxw':'profile.add.autoRouteSkipped','AIOFo':function(_0x5add89,_0x17c731){return _0x5add89 instanceof _0x17c731;},'GQeEd':function(_0x10cc85,_0x56a7b6){return _0x10cc85(_0x56a7b6);},'cDAxF':function(_0x236ff7,_0x4228b4){return _0x236ff7===_0x4228b4;},'oTaZi':'no_auth_config','vixSN':function(_0x1beea4,_0x5b3ab9){return _0x1beea4+_0x5b3ab9;},'PxRta':_0x14dde2(0x163),'rayQM':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','fORrt':'env_not_found','EfPCj':function(_0x57c234,_0x13e85a){return _0x57c234+_0x13e85a;},'aOkvK':_0x14dde2(0x121),'DHGYG':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Eestm':function(_0xadf284,_0x47c160,_0x33d68d,_0xaf81b5){return _0xadf284(_0x47c160,_0x33d68d,_0xaf81b5);},'SKwUr':function(_0x2b0cbb){return _0x2b0cbb();},'PZtBt':function(_0x57ab7e,_0x4f3a93){return _0x57ab7e===_0x4f3a93;}};let _0x5ab913;try{_0x5ab913=await fetchAuthConfig();}catch(_0x16e507){return _0x2b1609?.['trackPhaseEnd'](_0x466e79['zDkxw'],{'reason':_0x14dde2(0xf6),'profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x14dde2(0x16c)+(_0x466e79['AIOFo'](_0x16e507,Error)?_0x16e507[_0x14dde2(0x161)]:_0x466e79['GQeEd'](String,_0x16e507))),![];}if((!_0x5ab913||!_0x5ab913[_0x14dde2(0x159)]||_0x466e79[_0x14dde2(0x134)](Object['keys'](_0x5ab913[_0x14dde2(0x159)])[_0x14dde2(0x11f)],0x0))&&!_0x3e3f86[_0x14dde2(0x133)]){if(_0x22d055)return await captureEnvLessProfile(_0x290e60,_0x33ae39,_0x3e3f86,_0x2b1609);return _0x2b1609?.[_0x14dde2(0x130)](_0x466e79[_0x14dde2(0xf5)],{'reason':_0x466e79['oTaZi'],'profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x466e79['vixSN'](_0x466e79['vixSN'](_0x466e79['vixSN'](_0x14dde2(0x14c),'\x0a')+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x290e60+'\x20--url\x20'+_0x33ae39+_0x14dde2(0x16a))+'\x0a',_0x466e79[_0x14dde2(0x165)]),_0x466e79[_0x14dde2(0x12b)])),![];}let _0x29cb32;if(_0x3e3f86['authEnv']){if(!_0x5ab913?.['environments']?.[_0x3e3f86['authEnv']]){const _0xf5d3bd=Object[_0x14dde2(0x10b)](_0x5ab913?.['environments']??{});return _0x2b1609?.['trackPhaseEnd'](_0x14dde2(0x13e),{'reason':_0x466e79[_0x14dde2(0x100)],'profileName':_0x290e60}),console['error'](_0x466e79[_0x14dde2(0x132)](_0x14dde2(0x10a)+_0x3e3f86['authEnv']+'\x22\x20not\x20found.',_0xf5d3bd[_0x14dde2(0x11f)]?_0x14dde2(0x106)+_0xf5d3bd['join'](',\x20')+'.':_0x14dde2(0x135))),![];}_0x29cb32=_0x3e3f86['authEnv'];}else _0x29cb32=matchAuthEnvironment(_0x33ae39,_0x5ab913);if(!_0x29cb32)return _0x2b1609?.['trackPhaseEnd'](_0x14dde2(0x13e),{'reason':_0x14dde2(0xee),'profileName':_0x290e60}),console[_0x14dde2(0x170)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x33ae39+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x14dde2(0x10b)](_0x5ab913?.[_0x14dde2(0x159)]??{})[_0x14dde2(0x158)](',\x20')+'.'),![];const _0x17eac0=_0x5ab913?.[_0x14dde2(0x159)]?.[_0x29cb32],_0x272af4=_0x17eac0?.[_0x14dde2(0x14f)]??[];if(_0x22d055&&!_0x3e3f86[_0x14dde2(0x16b)]){const {saveToCloud:_0x57621d}=await _0x5db0d0['prompt']([{'type':_0x14dde2(0x125),'name':_0x466e79['aOkvK'],'message':_0x14dde2(0x103)+_0x29cb32+'\x27\x20matching\x20'+_0x33ae39+_0x14dde2(0x15f)+_0x272af4['join'](',\x20')+_0x14dde2(0x129)+_0x290e60+_0x14dde2(0x147),'default':!![]}]);if(!_0x57621d)return _0x2b1609?.[_0x14dde2(0x130)]('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x290e60}),console[_0x14dde2(0x170)](_0x466e79[_0x14dde2(0xfe)]),![];}const _0x57730d=_0x272af4['some'](_0x2982f7=>{const _0x6b9fb9=_0x14dde2;try{return new URL(_0x2982f7)[_0x6b9fb9(0x109)]===new URL(_0x33ae39)['origin'];}catch{return![];}}),_0xcdc149={};!_0x57730d&&(_0xcdc149['baseUrl']=_0x33ae39);try{await _0x466e79['Eestm'](createCloudProfile,_0x290e60,_0x29cb32,{'settings':_0xcdc149}),_0x466e79['SKwUr'](warnCloudProfileSharedInOrg);}catch(_0x54bbd1){if(_0x54bbd1 instanceof ApiError&&_0x466e79['PZtBt'](_0x54bbd1[_0x14dde2(0x120)],0x199)){console[_0x14dde2(0x170)](_0x14dde2(0x166)+_0x290e60+_0x14dde2(0x160)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x290e60));throw _0x54bbd1;}throw _0x54bbd1;}return console[_0x14dde2(0xf3)](_0x466e79[_0x14dde2(0x173)](_0x14dde2(0x14a)+_0x290e60+'\x27\x20created.\x0a',_0x14dde2(0xf7)+_0x290e60)),await _0x466e79['GQeEd'](sweepOrphansBestEffort,_0x290e60),_0x2b1609?.[_0x14dde2(0x130)]('profile.add.autoRouted',{'envKey':_0x29cb32,'profileName':_0x290e60}),!![];}async function createUnconfiguredCloudProfile(_0x16bc6b,_0x48306f){const _0x758c76=_0x3e0415,_0x23259f={'HHbOg':function(_0x3ea8b2,_0x48a4f0,_0x1d12c6,_0x497dec){return _0x3ea8b2(_0x48a4f0,_0x1d12c6,_0x497dec);},'vpRCr':function(_0x208fb8){return _0x208fb8();},'Lbajy':function(_0xf4f2ab,_0x3a4e0c){return _0xf4f2ab===_0x3a4e0c;}};try{await _0x23259f['HHbOg'](createCloudProfile,_0x16bc6b,undefined,{'settings':_0x48306f}),_0x23259f[_0x758c76(0x157)](warnCloudProfileSharedInOrg);}catch(_0x5db41b){_0x5db41b instanceof ApiError&&_0x23259f['Lbajy'](_0x5db41b[_0x758c76(0x120)],0x199)&&console[_0x758c76(0x170)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x16bc6b+_0x758c76(0x160)+(_0x758c76(0x139)+_0x16bc6b));throw _0x5db41b;}}async function captureEnvLessProfile(_0x3e1eaa,_0x471643,_0x4f5dcc,_0x21dbf4){const _0x572d93=_0x3e0415,_0x427e61={'Hmjue':_0x572d93(0x141),'ZBPXB':function(_0x3f8c9b,_0x45d5df){return _0x3f8c9b+_0x45d5df;},'fjwjA':function(_0xe6a3fb,_0x140f17){return _0xe6a3fb===_0x140f17;},'yBwGP':function(_0x40c6b7){return _0x40c6b7();},'HEscM':function(_0x4b660b,_0x1f37ea){return _0x4b660b+_0x1f37ea;},'XuHmx':function(_0x12b6dc,_0x9b3a7f){return _0x12b6dc>_0x9b3a7f;},'ZvpCw':function(_0x390c2d,_0x33821e){return _0x390c2d(_0x33821e);},'LqRis':_0x572d93(0xf1)};if(!_0x4f5dcc['yes']){const {capture:_0x2a442f}=await _0x5db0d0['prompt']([{'type':_0x572d93(0x125),'name':'capture','message':_0x427e61['Hmjue'],'default':!![]}]);if(!_0x2a442f)return _0x21dbf4?.[_0x572d93(0x130)](_0x572d93(0x13e),{'reason':_0x572d93(0x149),'profileName':_0x3e1eaa}),console['error'](_0x427e61['ZBPXB'](_0x572d93(0xf0),_0x572d93(0x137))),![];}const _0x461d99={};if(_0x4f5dcc['setupHeader'])for(const _0x5810c4 of _0x4f5dcc[_0x572d93(0x113)]){const _0x188b2b=_0x5810c4['indexOf'](':');if(_0x427e61[_0x572d93(0x14b)](_0x188b2b,-0x1))continue;_0x461d99[_0x5810c4[_0x572d93(0xec)](0x0,_0x188b2b)[_0x572d93(0x12a)]()]=_0x5810c4['slice'](_0x427e61[_0x572d93(0x14d)](_0x188b2b,0x1))[_0x572d93(0x12a)]();}const _0xe05587={'baseUrl':_0x471643};Object['keys'](_0x461d99)[_0x572d93(0x11f)]>0x0&&(_0xe05587[_0x572d93(0x152)]=_0x461d99);let _0x4e3942;try{_0x4e3942=await createCloudProfile(_0x3e1eaa,undefined,{'settings':_0xe05587}),_0x427e61[_0x572d93(0x140)](warnCloudProfileSharedInOrg);}catch(_0x150dde){_0x150dde instanceof ApiError&&_0x427e61['fjwjA'](_0x150dde[_0x572d93(0x120)],0x199)&&console['error'](_0x427e61['HEscM']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3e1eaa+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x3e1eaa));throw _0x150dde;}return await manualBrowserLogin(_0x4e3942,{'key':'','domains':[_0x471643],'setupHeaders':_0x427e61[_0x572d93(0xed)](Object[_0x572d93(0x10b)](_0x461d99)[_0x572d93(0x11f)],0x0)?_0x461d99:undefined}),console[_0x572d93(0xf3)](_0x427e61[_0x572d93(0x14d)]('\x0a✓\x20Profile\x20\x27'+_0x3e1eaa+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x572d93(0xf7)+_0x3e1eaa)),await _0x427e61['ZvpCw'](sweepOrphansBestEffort,_0x3e1eaa),_0x21dbf4?.['trackPhaseEnd'](_0x427e61['LqRis'],{'envKey':null,'profileName':_0x3e1eaa}),!![];}export async function addEnv(_0x13cfbf,_0x1995f4={},_0x73a70a){const _0x235c26=_0x3e0415,_0x264c26={'SRJEj':function(_0x649eb,_0x3b413f){return _0x649eb+_0x3b413f;},'RMrEl':_0x235c26(0x162),'WrUaA':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','qSATj':_0x235c26(0x110),'eqIHZ':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','zgNhQ':_0x235c26(0x143),'pSkoK':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','JJPiU':function(_0x7bdea3,_0x52e367){return _0x7bdea3(_0x52e367);},'Gvtjt':'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','HWojZ':_0x235c26(0x146),'PRBvL':function(_0x518a9f,_0x1b353d){return _0x518a9f>_0x1b353d;},'YNYFk':function(_0x39a074,_0xe8f7a9,_0xf30088){return _0x39a074(_0xe8f7a9,_0xf30088);},'yHzwg':function(_0xcd0c84,_0x6adbd,_0x2b9b5a,_0x39ea1f,_0x30d056){return _0xcd0c84(_0x6adbd,_0x2b9b5a,_0x39ea1f,_0x30d056);},'TdySr':function(_0x3dc26b,_0x63e945){return _0x3dc26b instanceof _0x63e945;},'rcDiZ':function(_0x5456b6,_0x4f3b14){return _0x5456b6(_0x4f3b14);},'opmoV':function(_0x418ccb,_0x482625){return _0x418ccb(_0x482625);},'OahHb':'\x0a🌐\x20Profile\x20Setup\x0a','cVKAN':_0x235c26(0x15e),'YXEXz':'baseUrl','cpymm':_0x235c26(0x10d),'jStpT':'action','xMECC':_0x235c26(0x15d),'CEyUq':'Enter\x20a\x20different\x20URL','gPWKc':_0x235c26(0x150),'FfZLY':_0x235c26(0x171),'OnkAd':'continue','mcJyM':function(_0x377d90,_0x49393c,_0x577eba,_0x48a76f,_0x43c3c3,_0x334e3c){return _0x377d90(_0x49393c,_0x577eba,_0x48a76f,_0x43c3c3,_0x334e3c);}};_0x1995f4['ci']&&(console['error'](_0x264c26['SRJEj'](_0x264c26['SRJEj'](_0x235c26(0x117)+_0x235c26(0xff)+'\x0a'+_0x235c26(0xf8),_0x264c26[_0x235c26(0x112)])+'\x0a',_0x264c26['WrUaA'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x235c26(0x108)](0x1));const _0x56aa2a={};if(_0x1995f4['setupHeader'])for(const _0x103976 of _0x1995f4['setupHeader']){const _0x1fe8aa=_0x103976[_0x235c26(0x11d)](':');if(_0x1fe8aa===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x103976+_0x235c26(0x156));const _0x4d478f=_0x103976[_0x235c26(0xec)](0x0,_0x1fe8aa)['trim'](),_0x328380=_0x103976['slice'](_0x1fe8aa+0x1)['trim']();_0x56aa2a[_0x4d478f]=_0x328380;}if(_0x1995f4[_0x235c26(0x175)]!==undefined&&_0x1995f4[_0x235c26(0x175)][_0x235c26(0x12a)]()==='')throw new Error(_0x264c26['qSATj']);if(_0x1995f4[_0x235c26(0x175)]&&_0x1995f4[_0x235c26(0x13b)])throw new Error(_0x264c26[_0x235c26(0x15a)]);if(_0x1995f4[_0x235c26(0x133)]&&_0x1995f4[_0x235c26(0x167)])throw new Error(_0x264c26['zgNhQ']);if(_0x1995f4['authEnv']&&_0x1995f4[_0x235c26(0x175)])throw new Error(_0x264c26['pSkoK']);const _0x28e73a=_0x264c26['JJPiU'](Boolean,_0x1995f4[_0x235c26(0x175)]),_0x44f524=isInteractive();if(!_0x44f524&&!_0x1995f4[_0x235c26(0x13b)]&&!_0x28e73a&&!_0x1995f4['skipAuth'])throw new Error(_0x264c26[_0x235c26(0x13a)]);if(_0x28e73a){const _0x54926e=_0x1995f4['cdpEndpoint'];console['log'](_0x264c26[_0x235c26(0x145)]),console[_0x235c26(0xf3)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x54926e);const _0x59faa3={'cdpEndpoint':_0x54926e,'isElectron':!![]};_0x264c26['PRBvL'](Object['keys'](_0x56aa2a)[_0x235c26(0x11f)],0x0)&&(_0x59faa3['setupHeaders']=_0x56aa2a);await _0x264c26['YNYFk'](createUnconfiguredCloudProfile,_0x13cfbf,_0x59faa3);try{_0x264c26['yHzwg'](setProfileOverride,process['cwd'](),_0x13cfbf,'cdpEndpoint',_0x54926e),setProfileOverride(process[_0x235c26(0x155)](),_0x13cfbf,_0x235c26(0x12d),!![]);}catch(_0x3023ba){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x264c26[_0x235c26(0x144)](_0x3023ba,Error)?_0x3023ba['message']:String(_0x3023ba)));}console[_0x235c26(0xf3)]('✓\x20Cloud\x20profile\x20\x27'+_0x13cfbf+_0x235c26(0x154)),await sweepOrphansBestEffort(_0x13cfbf),await markActive(_0x13cfbf);return;}if(_0x1995f4[_0x235c26(0x167)]){const _0x87e752={};_0x1995f4[_0x235c26(0x13b)]&&(_0x87e752['baseUrl']=_0x1995f4[_0x235c26(0x13b)]);Object['keys'](_0x56aa2a)[_0x235c26(0x11f)]>0x0&&(_0x87e752[_0x235c26(0x152)]=_0x56aa2a);await _0x264c26['YNYFk'](createUnconfiguredCloudProfile,_0x13cfbf,_0x87e752),console['log']('✓\x20Profile\x20\x27'+_0x13cfbf+_0x235c26(0x142)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x13cfbf+'`\x20again\x20without\x20--skip-auth.')),await _0x264c26[_0x235c26(0x10e)](sweepOrphansBestEffort,_0x13cfbf),await _0x264c26[_0x235c26(0x13d)](markActive,_0x13cfbf);return;}if(_0x1995f4[_0x235c26(0x13b)]){const _0x567afe=_0x1995f4['url'],_0x379cbb=await _0x264c26[_0x235c26(0x13d)](checkUrlReachability,_0x567afe);if(!_0x379cbb['ok']&&!_0x1995f4[_0x235c26(0x111)])throw new Error('Could\x20not\x20reach\x20'+_0x567afe+':\x20'+_0x379cbb['error']+_0x235c26(0x13f));!_0x379cbb['ok']&&_0x1995f4['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x567afe+':\x20'+_0x379cbb['error']+_0x235c26(0x138));}else{console['log'](_0x264c26['OahHb']),console[_0x235c26(0xf3)](_0x264c26['cVKAN']),console[_0x235c26(0xf3)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x38eaee='',_0x29a9ab=![];while(!![]){const _0x16d563=await _0x5db0d0[_0x235c26(0x105)]([{'type':_0x235c26(0x169),'name':_0x264c26['YXEXz'],'message':_0x29a9ab?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x264c26['cpymm'],'default':_0x38eaee||'http://localhost:3000'}]);_0x38eaee=_0x16d563['baseUrl'];const _0x2ee82b=await _0x264c26[_0x235c26(0x10e)](checkUrlReachability,_0x38eaee);if(_0x2ee82b['ok'])break;const _0x30d15b=/^[a-zA-Z][\w+.-]*:\/\//[_0x235c26(0x127)](_0x38eaee),_0xe8b03e=_0x2ee82b['isProtocolError']&&!_0x30d15b,_0x1c7e86=_0xe8b03e?'http://'+_0x38eaee:null;_0x29a9ab=!![],console['log'](_0x235c26(0x124)+_0x38eaee+':\x20'+_0x2ee82b[_0x235c26(0x170)]);_0x1c7e86&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x1c7e86+'?');const {action:_0x1ac2f1}=await _0x5db0d0[_0x235c26(0x105)]([{'type':_0x235c26(0x15c),'name':_0x264c26[_0x235c26(0x153)],'message':_0x235c26(0x115),'choices':[..._0x1c7e86?[{'name':_0x235c26(0x102)+_0x1c7e86,'value':_0x264c26['xMECC']}]:[],{'name':_0x264c26[_0x235c26(0xf4)],'value':_0x264c26['gPWKc']},{'name':_0x264c26[_0x235c26(0x10c)],'value':_0x264c26['OnkAd']}]}]);if(_0x1ac2f1===_0x264c26[_0x235c26(0xfd)]&&_0x1c7e86){_0x38eaee=_0x1c7e86;const _0x4a7615=await checkUrlReachability(_0x38eaee);if(_0x4a7615['ok'])break;console['log'](_0x235c26(0xfb)+_0x38eaee+':\x20'+_0x4a7615[_0x235c26(0x170)]);}else{if(_0x1ac2f1===_0x264c26['OnkAd'])break;}}_0x1995f4={..._0x1995f4,'url':_0x38eaee};}let _0x427cf7=![];try{_0x427cf7=await _0x264c26['mcJyM'](tryAutoRouteCloudProfile,_0x13cfbf,_0x1995f4['url'],_0x1995f4,_0x44f524,_0x73a70a);}catch(_0x4dae94){console['error'](_0x235c26(0x14e)+_0x13cfbf+'\x22:\x20'+(_0x264c26[_0x235c26(0x144)](_0x4dae94,Error)?_0x4dae94[_0x235c26(0x161)]:_0x264c26['JJPiU'](String,_0x4dae94))),process[_0x235c26(0x108)](0x1);}!_0x427cf7&&process[_0x235c26(0x108)](0x1),await _0x264c26[_0x235c26(0x13d)](markActive,_0x13cfbf);}
1
+ (function(_0x20f7d7,_0x2be8db){const _0x20de62=_0x3aa3,_0x496ba8=_0x20f7d7();while(!![]){try{const _0x5c9200=parseInt(_0x20de62(0x1b3))/0x1*(-parseInt(_0x20de62(0x1a3))/0x2)+parseInt(_0x20de62(0x1cd))/0x3+parseInt(_0x20de62(0x206))/0x4*(parseInt(_0x20de62(0x1de))/0x5)+parseInt(_0x20de62(0x1ef))/0x6+parseInt(_0x20de62(0x1ac))/0x7+-parseInt(_0x20de62(0x1aa))/0x8*(parseInt(_0x20de62(0x18e))/0x9)+-parseInt(_0x20de62(0x1e4))/0xa*(parseInt(_0x20de62(0x1ca))/0xb);if(_0x5c9200===_0x2be8db)break;else _0x496ba8['push'](_0x496ba8['shift']());}catch(_0x4815fb){_0x496ba8['push'](_0x496ba8['shift']());}}}(_0x2d18,0xae39f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1b2fad from'inquirer';function _0x3aa3(_0x4c6e81,_0x3e6089){_0x4c6e81=_0x4c6e81-0x186;const _0x2d180a=_0x2d18();let _0x3aa3f3=_0x2d180a[_0x4c6e81];return _0x3aa3f3;}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';function _0x2d18(){const _0x19c14f=['saveToCloud','profile.add.autoRouted','length','1818ozwPhh','no_match','✓\x20Profile\x20\x27','lJMmT','JRtwf','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','.tmp-','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','retry','HEAD','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','name','join','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','rGAUf','\x0a\x20\x20Could\x20not\x20reach\x20','nGAJm','tfxKQ','error','signal','1606282otbVzB','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','isProtocolError','use_suggestion','JLgHw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','confirm','31352gkJmLq','profile.add.autoRouteSkipped','6693078oihXzs','keys','abort','list','\x22\x20not\x20found.','ZJBLb','origin','1WuGelp','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','manual','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','bOJkt','trackPhaseEnd','trim','baseUrl','RiIoL','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isTTY','\x27\x20created.\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','TgmKR','setupHeader','skipAuth','zJRut','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','url','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','\x27\x20created\x20(CDP).','GxvVF','904585PHMsPf','Enter\x20a\x20different\x20URL','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','3535245ENYxaH','Invalid\x20--setup-header\x20format:\x20\x22','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','WVxCZ','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x0a\x20\x20A\x20profile\x20named\x20\x22','HZGqi','KpsJa','startsWith','nRvjC','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','log','\x27\x20matching\x20','env','bESKF','pqTWY','stdout','10QjQGGT','RUPCs','indexOf','environments','nkVMc','kbrLw','120vnCzzn','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','pqqbW','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x27\x20created\x20(no\x20session).\x0a','yes','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','message','\x22:\x20','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','1949154IkwHzz','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x20\x20Did\x20you\x20mean\x20','LQbjY','lBNZD','cdpEndpoint','slice','RhJDV','LGTpF','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','authEnv','prompt','eSfka','YQusU','JiJRz','\x20--skip-auth\x0a','action','xetVF','gZgtK','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','status','rHEWb','1671604DLSbJa','eBFbH','YsJMJ','exit','user_declined','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','LvWsp','yyWjO','RARcT','lzqUp'];_0x2d18=function(){return _0x19c14f;};return _0x2d18();}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x131e09=_0x3aa3;if(!process[_0x131e09(0x1dd)][_0x131e09(0x1bd)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x3201f3){const _0xfffc33=_0x3aa3,_0x51f9bb={'bpyQC':_0xfffc33(0x1b5),'lFWrY':function(_0x7d5061,_0x3a43cd){return _0x7d5061(_0x3a43cd);},'GxvVF':function(_0x1c1317,_0x3c44cc){return _0x1c1317<_0x3c44cc;}};try{const _0x5450c9=new AbortController(),_0x1815d1=setTimeout(()=>_0x5450c9[_0xfffc33(0x1ae)](),0x1388),_0xb767aa={'method':_0xfffc33(0x198),'signal':_0x5450c9[_0xfffc33(0x1a2)],'redirect':_0x51f9bb['bpyQC']};/^https:\/\/localhost(:\d+)?/i['test'](_0x3201f3)&&(process[_0xfffc33(0x1da)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4395eb=await fetch(_0x3201f3,_0xb767aa);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x51f9bb['lFWrY'](clearTimeout,_0x1815d1);if(_0x51f9bb[_0xfffc33(0x1c9)](_0x4395eb['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x4395eb['status']};}catch(_0x284d5f){delete process[_0xfffc33(0x1da)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x34559a=_0x284d5f,_0x3b5126=_0x34559a['message']||_0x51f9bb['lFWrY'](String,_0x284d5f),_0x265964=_0x3b5126['includes']('Invalid\x20URL')||_0x34559a[_0xfffc33(0x19a)]==='TypeError'||_0x3b5126['includes']('fetch\x20failed');return{'ok':![],'error':_0x3b5126,'isProtocolError':_0x265964};}}async function sweepOrphanLocalProfile(_0x54c685,_0xf9a2ad,_0x12f9d1){const _0x204279=_0x3aa3,_0x23561b={'pqqbW':function(_0x238c26,_0xd42f15,_0x36da72){return _0x238c26(_0xd42f15,_0x36da72);},'LvWsp':'local','cBjLd':function(_0x224c32,_0x5995b9){return _0x224c32(_0x5995b9);}},_0x386ad9=_0x23561b[_0x204279(0x1e6)](join,_0xf9a2ad,_0x23561b[_0x204279(0x187)]),_0x2fe7c4=_0x23561b[_0x204279(0x1e6)](join,_0x386ad9,_0x54c685);existsSync(_0x2fe7c4)&&(_0x12f9d1&&await isPathGitTracked(_0x2fe7c4)?console['log'](_0x204279(0x1d7)+_0x2fe7c4+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x2fe7c4,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2fe7c4)));if(_0x23561b['cBjLd'](existsSync,_0x386ad9)){let _0x12eacb=[];try{_0x12eacb=await readdir(_0x386ad9);}catch{return;}const _0x4e69a2=_0x204279(0x194)+_0x54c685+'-';for(const _0x559f4b of _0x12eacb){if(!_0x559f4b[_0x204279(0x1d5)](_0x4e69a2))continue;const _0x588004=_0x23561b[_0x204279(0x1e6)](join,_0x386ad9,_0x559f4b);await _0x23561b[_0x204279(0x1e6)](rm,_0x588004,{'recursive':!![],'force':!![]}),console[_0x204279(0x1d8)](_0x204279(0x1e7)+_0x588004);}}}async function sweepOrphansBestEffort(_0x3d9ae9){const _0x712e12=_0x3aa3,_0x275d13={'lzqUp':function(_0x5a95be,_0x15dc53){return _0x5a95be!==_0x15dc53;},'LUIGg':function(_0x127906,_0x538cee,_0x57f954,_0x366efd){return _0x127906(_0x538cee,_0x57f954,_0x366efd);},'uLiCs':function(_0x53d887,_0x3a86ae){return _0x53d887(_0x3a86ae);}};try{await sweepOrphanLocalProfile(_0x3d9ae9,getRangerHomeDir(),![]);const _0x3a2b20=getRangerDir();_0x275d13[_0x712e12(0x18a)](_0x3a2b20,getRangerHomeDir())&&await _0x275d13['LUIGg'](sweepOrphanLocalProfile,_0x3d9ae9,_0x3a2b20,!![]);}catch(_0x240969){console[_0x712e12(0x1d8)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x240969 instanceof Error?_0x240969[_0x712e12(0x1ec)]:_0x275d13['uLiCs'](String,_0x240969))+').');}}async function markActive(_0x2ba40c){const _0x2fde6f=_0x3aa3,_0x49dff1={'eXCln':function(_0x2299ff,_0x102268){return _0x2299ff(_0x102268);},'zRRzq':_0x2fde6f(0x1bf)};try{await _0x49dff1['eXCln'](writeActiveProfileName,_0x2ba40c),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x2ba40c);}catch{console['log'](_0x49dff1['zRRzq']);}}async function tryAutoRouteCloudProfile(_0x1a08fd,_0x3977fa,_0x1dfacf,_0x274cff,_0x359bab){const _0x4e334b=_0x3aa3,_0x1dc62d={'rGAUf':'no_auth_config','ncBwA':function(_0x4f98c7,_0x4fea7d){return _0x4f98c7 instanceof _0x4fea7d;},'lBNZD':function(_0x174744,_0x3587ad){return _0x174744(_0x3587ad);},'ZJBLb':function(_0x5eaaad,_0x3b717b){return _0x5eaaad===_0x3b717b;},'nRvjC':'profile.add.autoRouteSkipped','eBFbH':function(_0x4e0e89,_0x406484){return _0x4e0e89+_0x406484;},'NLlwp':function(_0x3db472,_0x327153){return _0x3db472+_0x327153;},'VNUPI':'\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','qdhjW':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','jAcaN':_0x4e334b(0x1cc),'nkVMc':function(_0x49334e,_0x4bcb37,_0x4bb035){return _0x49334e(_0x4bcb37,_0x4bb035);},'yyWjO':'confirm','JyVwb':_0x4e334b(0x18b),'pEvBv':_0x4e334b(0x1e8),'JLgHw':function(_0x14d54c,_0x577fa9,_0x5051ba,_0x6881f6){return _0x14d54c(_0x577fa9,_0x5051ba,_0x6881f6);},'gZgtK':function(_0xa2ff7c){return _0xa2ff7c();},'bOJkt':function(_0x772f24,_0xcd4a0c){return _0x772f24===_0xcd4a0c;},'ZAKJs':function(_0x11e8cc,_0x208dcd){return _0x11e8cc+_0x208dcd;}};let _0x25f818;try{_0x25f818=await fetchAuthConfig();}catch(_0x236918){return _0x359bab?.['trackPhaseEnd'](_0x4e334b(0x1ab),{'reason':_0x1dc62d[_0x4e334b(0x19d)],'profileName':_0x1a08fd}),console[_0x4e334b(0x1a1)](_0x4e334b(0x199)+(_0x1dc62d['ncBwA'](_0x236918,Error)?_0x236918[_0x4e334b(0x1ec)]:_0x1dc62d[_0x4e334b(0x1f3)](String,_0x236918))),![];}if((!_0x25f818||!_0x25f818['environments']||_0x1dc62d[_0x4e334b(0x1b1)](Object[_0x4e334b(0x1ad)](_0x25f818[_0x4e334b(0x1e1)])[_0x4e334b(0x18d)],0x0))&&!_0x1dfacf['authEnv']){if(_0x274cff)return await captureEnvLessProfile(_0x1a08fd,_0x3977fa,_0x1dfacf,_0x359bab);return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d['nRvjC'],{'reason':_0x1dc62d[_0x4e334b(0x19d)],'profileName':_0x1a08fd}),console['error'](_0x1dc62d[_0x4e334b(0x207)](_0x1dc62d['NLlwp'](_0x1dc62d['VNUPI'],'\x0a')+_0x1dc62d['qdhjW'],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1a08fd+'\x20--url\x20'+_0x3977fa+_0x4e334b(0x1fe))+'\x0a'+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'+_0x1dc62d['jAcaN']),![];}let _0x287c3e;if(_0x1dfacf['authEnv']){if(!_0x25f818?.[_0x4e334b(0x1e1)]?.[_0x1dfacf['authEnv']]){const _0x13b908=Object[_0x4e334b(0x1ad)](_0x25f818?.['environments']??{});return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d[_0x4e334b(0x1d6)],{'reason':'env_not_found','profileName':_0x1a08fd}),console[_0x4e334b(0x1a1)](_0x1dc62d['NLlwp']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x1dfacf[_0x4e334b(0x1f9)]+_0x4e334b(0x1b0),_0x13b908['length']?'\x20Configured\x20envs:\x20'+_0x13b908[_0x4e334b(0x19b)](',\x20')+'.':_0x4e334b(0x1f8))),![];}_0x287c3e=_0x1dfacf[_0x4e334b(0x1f9)];}else _0x287c3e=_0x1dc62d[_0x4e334b(0x1e2)](matchAuthEnvironment,_0x3977fa,_0x25f818);if(!_0x287c3e)return _0x359bab?.[_0x4e334b(0x1b8)](_0x4e334b(0x1ab),{'reason':_0x4e334b(0x18f),'profileName':_0x1a08fd}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x3977fa+_0x4e334b(0x193)+Object[_0x4e334b(0x1ad)](_0x25f818?.[_0x4e334b(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x892aa0=_0x25f818?.['environments']?.[_0x287c3e],_0x46a1dd=_0x892aa0?.['domains']??[];if(_0x274cff&&!_0x1dfacf[_0x4e334b(0x1ea)]){const {saveToCloud:_0x4f9b5a}=await _0x1b2fad[_0x4e334b(0x1fa)]([{'type':_0x1dc62d[_0x4e334b(0x188)],'name':_0x1dc62d['JyVwb'],'message':'Found\x20auth\x20environment\x20\x27'+_0x287c3e+_0x4e334b(0x1d9)+_0x3977fa+'\x0a\x20\x20(domains:\x20'+_0x46a1dd[_0x4e334b(0x19b)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1a08fd+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4f9b5a)return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d[_0x4e334b(0x1d6)],{'reason':'user_declined','profileName':_0x1a08fd}),console['error'](_0x1dc62d['pEvBv']),![];}const _0x24253c=_0x46a1dd['some'](_0x7a50d8=>{const _0x7de898=_0x4e334b;try{return new URL(_0x7a50d8)[_0x7de898(0x1b2)]===new URL(_0x3977fa)['origin'];}catch{return![];}}),_0x51f88c={};!_0x24253c&&(_0x51f88c['baseUrl']=_0x3977fa);try{await _0x1dc62d[_0x4e334b(0x1a7)](createCloudProfile,_0x1a08fd,_0x287c3e,{'settings':_0x51f88c}),_0x1dc62d[_0x4e334b(0x201)](warnCloudProfileSharedInOrg);}catch(_0xada6c5){if(_0xada6c5 instanceof ApiError&&_0x1dc62d[_0x4e334b(0x1b7)](_0xada6c5['status'],0x199)){console['error'](_0x1dc62d['ZAKJs'](_0x4e334b(0x1d2)+_0x1a08fd+_0x4e334b(0x1a4),_0x4e334b(0x186)+_0x1a08fd));throw _0xada6c5;}throw _0xada6c5;}return console[_0x4e334b(0x1d8)](_0x1dc62d['NLlwp']('✓\x20Profile\x20\x27'+_0x1a08fd+_0x4e334b(0x1be),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x1a08fd)),await sweepOrphansBestEffort(_0x1a08fd),_0x359bab?.[_0x4e334b(0x1b8)](_0x4e334b(0x18c),{'envKey':_0x287c3e,'profileName':_0x1a08fd}),!![];}async function createUnconfiguredCloudProfile(_0x5cdcef,_0xb6a7ee){const _0x3f0dc2=_0x3aa3,_0x3008c8={'RUPCs':function(_0x27c835,_0x2e0aaa,_0x2415ac,_0xf644d2){return _0x27c835(_0x2e0aaa,_0x2415ac,_0xf644d2);},'fGtuz':function(_0x45ca3f){return _0x45ca3f();},'bQBFV':function(_0x64c190,_0x29aded){return _0x64c190 instanceof _0x29aded;},'bESKF':function(_0x31d806,_0x37e3f1){return _0x31d806+_0x37e3f1;}};try{await _0x3008c8[_0x3f0dc2(0x1df)](createCloudProfile,_0x5cdcef,undefined,{'settings':_0xb6a7ee}),_0x3008c8['fGtuz'](warnCloudProfileSharedInOrg);}catch(_0xe4186){_0x3008c8['bQBFV'](_0xe4186,ApiError)&&_0xe4186[_0x3f0dc2(0x204)]===0x199&&console[_0x3f0dc2(0x1a1)](_0x3008c8[_0x3f0dc2(0x1db)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5cdcef+_0x3f0dc2(0x1a4),_0x3f0dc2(0x186)+_0x5cdcef));throw _0xe4186;}}async function captureEnvLessProfile(_0x523f13,_0x12d8a4,_0xd0f4b2,_0x436957){const _0x685db6=_0x3aa3,_0x14be16={'LGTpF':'capture','HZGqi':_0x685db6(0x19c),'eSfka':_0x685db6(0x20a),'TgmKR':function(_0x51b447,_0x45f569){return _0x51b447+_0x45f569;},'ZoOIU':function(_0x4907a8,_0x303087){return _0x4907a8===_0x303087;},'aVaur':function(_0x5c6dac,_0x1de19f,_0x774787,_0x448cb5){return _0x5c6dac(_0x1de19f,_0x774787,_0x448cb5);},'LQbjY':function(_0x567a36,_0x19ce1a){return _0x567a36 instanceof _0x19ce1a;},'GXduX':function(_0x4409da,_0x151ced){return _0x4409da+_0x151ced;},'iJBDL':_0x685db6(0x18c)};if(!_0xd0f4b2['yes']){const {capture:_0xa431a6}=await _0x1b2fad['prompt']([{'type':_0x685db6(0x1a9),'name':_0x14be16[_0x685db6(0x1f7)],'message':_0x14be16[_0x685db6(0x1d3)],'default':!![]}]);if(!_0xa431a6)return _0x436957?.[_0x685db6(0x1b8)](_0x685db6(0x1ab),{'reason':_0x14be16[_0x685db6(0x1fb)],'profileName':_0x523f13}),console['error'](_0x14be16[_0x685db6(0x1c1)](_0x685db6(0x1e5),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0xf09a3b={};if(_0xd0f4b2[_0x685db6(0x1c2)])for(const _0xe6df4f of _0xd0f4b2[_0x685db6(0x1c2)]){const _0x2b70d1=_0xe6df4f[_0x685db6(0x1e0)](':');if(_0x14be16['ZoOIU'](_0x2b70d1,-0x1))continue;_0xf09a3b[_0xe6df4f[_0x685db6(0x1f5)](0x0,_0x2b70d1)[_0x685db6(0x1b9)]()]=_0xe6df4f[_0x685db6(0x1f5)](_0x2b70d1+0x1)[_0x685db6(0x1b9)]();}const _0x345f8c={'baseUrl':_0x12d8a4};Object[_0x685db6(0x1ad)](_0xf09a3b)['length']>0x0&&(_0x345f8c['setupHeaders']=_0xf09a3b);let _0x1721e0;try{_0x1721e0=await _0x14be16['aVaur'](createCloudProfile,_0x523f13,undefined,{'settings':_0x345f8c}),warnCloudProfileSharedInOrg();}catch(_0x408dbd){_0x14be16[_0x685db6(0x1f2)](_0x408dbd,ApiError)&&_0x408dbd[_0x685db6(0x204)]===0x199&&console['error'](_0x685db6(0x1d2)+_0x523f13+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x685db6(0x186)+_0x523f13));throw _0x408dbd;}return await manualBrowserLogin(_0x1721e0,{'key':'','domains':[_0x12d8a4],'setupHeaders':Object[_0x685db6(0x1ad)](_0xf09a3b)[_0x685db6(0x18d)]>0x0?_0xf09a3b:undefined}),console['log'](_0x14be16['GXduX']('\x0a✓\x20Profile\x20\x27'+_0x523f13+_0x685db6(0x1eb),_0x685db6(0x1cf)+_0x523f13)),await sweepOrphansBestEffort(_0x523f13),_0x436957?.['trackPhaseEnd'](_0x14be16['iJBDL'],{'envKey':null,'profileName':_0x523f13}),!![];}export async function addEnv(_0x47ff45,_0x50b235={},_0x36b3cc){const _0x2131db=_0x3aa3,_0x5985e5={'tfxKQ':function(_0x5ab758,_0x57a5c9){return _0x5ab758+_0x57a5c9;},'CjxnA':function(_0xc7d83,_0x1b3004){return _0xc7d83+_0x1b3004;},'ZiyRB':function(_0x58b6ef,_0x4bac01){return _0x58b6ef+_0x4bac01;},'JiJRz':function(_0x152d92,_0x1034f2){return _0x152d92+_0x1034f2;},'RhJDV':_0x2131db(0x1bc),'wUuba':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','vgxbd':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','xetVF':_0x2131db(0x1b6),'RiIoL':function(_0x4d8635){return _0x4d8635();},'kbrLw':function(_0xf410df,_0x2eda15){return _0xf410df>_0x2eda15;},'XMMnv':function(_0x20843e,_0x15bebe,_0x1131ce){return _0x20843e(_0x15bebe,_0x1131ce);},'YsJMJ':function(_0x1f4948,_0x40401c,_0x2f10e0,_0x4eb797,_0x579a5b){return _0x1f4948(_0x40401c,_0x2f10e0,_0x4eb797,_0x579a5b);},'qAEIh':'isElectron','pqTWY':function(_0x443ca9,_0x1809f8){return _0x443ca9 instanceof _0x1809f8;},'fMYCf':function(_0x58c34c,_0x4a94a0){return _0x58c34c(_0x4a94a0);},'RARcT':function(_0x3ce53b,_0xea022d){return _0x3ce53b(_0xea022d);},'lJMmT':function(_0x35768b,_0x3973b9){return _0x35768b(_0x3973b9);},'nGAJm':function(_0xe8fef3,_0x33c3e1){return _0xe8fef3(_0x33c3e1);},'JRtwf':_0x2131db(0x1a8),'LCpMC':_0x2131db(0x1c0),'hMRLQ':_0x2131db(0x1ba),'zJRut':_0x2131db(0x1c5),'wMsJI':_0x2131db(0x1af),'kUrgm':_0x2131db(0x1ff),'rHEWb':'What\x20would\x20you\x20like\x20to\x20do?','WVxCZ':'continue','KpsJa':_0x2131db(0x1a6),'YQusU':function(_0xad59a5,_0x54874d,_0x1d6dcd,_0x5bf600,_0x285476,_0x11978e){return _0xad59a5(_0x54874d,_0x1d6dcd,_0x5bf600,_0x285476,_0x11978e);}};_0x50b235['ci']&&(console[_0x2131db(0x1a1)](_0x5985e5['tfxKQ'](_0x5985e5['CjxnA'](_0x5985e5['ZiyRB'](_0x5985e5[_0x2131db(0x1a0)](_0x5985e5[_0x2131db(0x1fd)](_0x5985e5[_0x2131db(0x1f6)],_0x5985e5['wUuba']),'\x0a')+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'+_0x5985e5['vgxbd'],'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1));const _0x5e3bac={};if(_0x50b235['setupHeader'])for(const _0x344cb5 of _0x50b235[_0x2131db(0x1c2)]){const _0x47ceb4=_0x344cb5[_0x2131db(0x1e0)](':');if(_0x47ceb4===-0x1)throw new Error(_0x2131db(0x1ce)+_0x344cb5+_0x2131db(0x202));const _0x5cc6db=_0x344cb5[_0x2131db(0x1f5)](0x0,_0x47ceb4)['trim'](),_0x1e052b=_0x344cb5[_0x2131db(0x1f5)](_0x5985e5[_0x2131db(0x1fd)](_0x47ceb4,0x1))[_0x2131db(0x1b9)]();_0x5e3bac[_0x5cc6db]=_0x1e052b;}if(_0x50b235[_0x2131db(0x1f4)]!==undefined&&_0x50b235[_0x2131db(0x1f4)][_0x2131db(0x1b9)]()==='')throw new Error(_0x2131db(0x1d1));if(_0x50b235['cdpEndpoint']&&_0x50b235['url'])throw new Error(_0x2131db(0x1f0));if(_0x50b235[_0x2131db(0x1f9)]&&_0x50b235['skipAuth'])throw new Error(_0x2131db(0x1b4));if(_0x50b235[_0x2131db(0x1f9)]&&_0x50b235[_0x2131db(0x1f4)])throw new Error(_0x5985e5[_0x2131db(0x200)]);const _0x51418f=Boolean(_0x50b235[_0x2131db(0x1f4)]),_0x43e494=_0x5985e5[_0x2131db(0x1bb)](isInteractive);if(!_0x43e494&&!_0x50b235[_0x2131db(0x1c6)]&&!_0x51418f&&!_0x50b235[_0x2131db(0x1c3)])throw new Error(_0x2131db(0x1c7));if(_0x51418f){const _0x6f9fa6=_0x50b235[_0x2131db(0x1f4)];console['log'](_0x2131db(0x1ee)),console[_0x2131db(0x1d8)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x6f9fa6);const _0x3f3d63={'cdpEndpoint':_0x6f9fa6,'isElectron':!![]};_0x5985e5[_0x2131db(0x1e3)](Object['keys'](_0x5e3bac)['length'],0x0)&&(_0x3f3d63['setupHeaders']=_0x5e3bac);await _0x5985e5['XMMnv'](createUnconfiguredCloudProfile,_0x47ff45,_0x3f3d63);try{_0x5985e5[_0x2131db(0x208)](setProfileOverride,process['cwd'](),_0x47ff45,'cdpEndpoint',_0x6f9fa6),setProfileOverride(process['cwd'](),_0x47ff45,_0x5985e5['qAEIh'],!![]);}catch(_0x358e43){console[_0x2131db(0x1a1)](_0x2131db(0x203)+(_0x5985e5[_0x2131db(0x1dc)](_0x358e43,Error)?_0x358e43[_0x2131db(0x1ec)]:_0x5985e5['fMYCf'](String,_0x358e43)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x47ff45+_0x2131db(0x1c8)),await _0x5985e5[_0x2131db(0x189)](sweepOrphansBestEffort,_0x47ff45),await _0x5985e5['RARcT'](markActive,_0x47ff45);return;}if(_0x50b235[_0x2131db(0x1c3)]){const _0x47f165={};_0x50b235[_0x2131db(0x1c6)]&&(_0x47f165[_0x2131db(0x1ba)]=_0x50b235['url']);_0x5985e5['kbrLw'](Object[_0x2131db(0x1ad)](_0x5e3bac)['length'],0x0)&&(_0x47f165['setupHeaders']=_0x5e3bac);await createUnconfiguredCloudProfile(_0x47ff45,_0x47f165),console[_0x2131db(0x1d8)](_0x2131db(0x190)+_0x47ff45+_0x2131db(0x1e9)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x47ff45+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x47ff45),await _0x5985e5[_0x2131db(0x191)](markActive,_0x47ff45);return;}if(_0x50b235['url']){const _0x44ede0=_0x50b235[_0x2131db(0x1c6)],_0x59e6ac=await _0x5985e5[_0x2131db(0x19f)](checkUrlReachability,_0x44ede0);if(!_0x59e6ac['ok']&&!_0x50b235['force'])throw new Error('Could\x20not\x20reach\x20'+_0x44ede0+':\x20'+_0x59e6ac['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x59e6ac['ok']&&_0x50b235['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x44ede0+':\x20'+_0x59e6ac['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console[_0x2131db(0x1d8)](_0x5985e5[_0x2131db(0x192)]),console['log'](_0x5985e5['LCpMC']);let _0x50165a='',_0x4a8e87=![];while(!![]){const _0x445480=await _0x1b2fad['prompt']([{'type':'input','name':_0x5985e5['hMRLQ'],'message':_0x4a8e87?_0x5985e5[_0x2131db(0x1c4)]:_0x2131db(0x195),'default':_0x50165a||'http://localhost:3000'}]);_0x50165a=_0x445480['baseUrl'];const _0x20204c=await checkUrlReachability(_0x50165a);if(_0x20204c['ok'])break;const _0x3a4b29=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x50165a),_0x1f4c66=_0x20204c[_0x2131db(0x1a5)]&&!_0x3a4b29,_0x52fa28=_0x1f4c66?'http://'+_0x50165a:null;_0x4a8e87=!![],console[_0x2131db(0x1d8)](_0x2131db(0x19e)+_0x50165a+':\x20'+_0x20204c[_0x2131db(0x1a1)]);_0x52fa28&&console['log'](_0x2131db(0x1f1)+_0x52fa28+'?');const {action:_0x54e0d7}=await _0x1b2fad[_0x2131db(0x1fa)]([{'type':_0x5985e5['wMsJI'],'name':_0x5985e5['kUrgm'],'message':_0x5985e5[_0x2131db(0x205)],'choices':[..._0x52fa28?[{'name':'Use\x20'+_0x52fa28,'value':'use_suggestion'}]:[],{'name':_0x2131db(0x1cb),'value':_0x2131db(0x197)},{'name':'Continue\x20anyway','value':_0x5985e5['WVxCZ']}]}]);if(_0x54e0d7===_0x5985e5[_0x2131db(0x1d4)]&&_0x52fa28){_0x50165a=_0x52fa28;const _0x3296c9=await checkUrlReachability(_0x50165a);if(_0x3296c9['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x50165a+':\x20'+_0x3296c9[_0x2131db(0x1a1)]);}else{if(_0x54e0d7===_0x5985e5[_0x2131db(0x1d0)])break;}}_0x50b235={..._0x50b235,'url':_0x50165a};}let _0x1875c4=![];try{_0x1875c4=await _0x5985e5[_0x2131db(0x1fc)](tryAutoRouteCloudProfile,_0x47ff45,_0x50b235[_0x2131db(0x1c6)],_0x50b235,_0x43e494,_0x36b3cc);}catch(_0x1312ab){console['error'](_0x2131db(0x196)+_0x47ff45+_0x2131db(0x1ed)+(_0x1312ab instanceof Error?_0x1312ab['message']:_0x5985e5[_0x2131db(0x191)](String,_0x1312ab))),process[_0x2131db(0x209)](0x1);}!_0x1875c4&&process['exit'](0x1),await _0x5985e5['RARcT'](markActive,_0x47ff45);}
@@ -1 +1 @@
1
- function _0x459f(){var _0x3a1bd8=['30tmBNOI','riZHN','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','58956sskElX','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','145146nDEUlC','1311540BoFpPe','18yqsJqB','617842uQKbSZ','30414sLviEb','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','4687697oTLouD','BTENC','4217936uVnWze'];_0x459f=function(){return _0x3a1bd8;};return _0x459f();}function _0x3304(_0xf1470b,_0x206c90){_0xf1470b=_0xf1470b-0xa3;var _0x459fae=_0x459f();var _0x330450=_0x459fae[_0xf1470b];return _0x330450;}(function(_0x351899,_0x449a6b){var _0x50d7eb=_0x3304,_0xe5bf2=_0x351899();while(!![]){try{var _0x2a61e6=parseInt(_0x50d7eb(0xac))/0x1+-parseInt(_0x50d7eb(0xad))/0x2+parseInt(_0x50d7eb(0xaa))/0x3+-parseInt(_0x50d7eb(0xa7))/0x4+-parseInt(_0x50d7eb(0xa4))/0x5*(parseInt(_0x50d7eb(0xa9))/0x6)+parseInt(_0x50d7eb(0xaf))/0x7+parseInt(_0x50d7eb(0xa3))/0x8*(-parseInt(_0x50d7eb(0xab))/0x9);if(_0x2a61e6===_0x449a6b)break;else _0xe5bf2['push'](_0xe5bf2['shift']());}catch(_0x279f0a){_0xe5bf2['push'](_0xe5bf2['shift']());}}}(_0x459f,0x78e0d));export async function authEncrypt(_0x184f09){var _0x3f151c=_0x3304,_0x2ce17e={'BTENC':function(_0xedb513,_0x1e5c27){return _0xedb513+_0x1e5c27;},'riZHN':_0x3f151c(0xa8),'JnSBo':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x2ce17e['BTENC'](_0x2ce17e['BTENC'](_0x2ce17e['BTENC'](_0x2ce17e[_0x3f151c(0xb0)](_0x3f151c(0xae),'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'),'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0x3f151c(0xa6))+'\x0a'+_0x2ce17e[_0x3f151c(0xa5)]+_0x2ce17e['JnSBo']),process['exit'](0x1);}
1
+ function _0x5c18(_0x3ba274,_0x3ee209){_0x3ba274=_0x3ba274-0x154;var _0x1b0c50=_0x1b0c();var _0x5c18e0=_0x1b0c50[_0x3ba274];return _0x5c18e0;}(function(_0x3661fa,_0x9df942){var _0x33849b=_0x5c18,_0x1a35bb=_0x3661fa();while(!![]){try{var _0x1a3a36=-parseInt(_0x33849b(0x15f))/0x1+parseInt(_0x33849b(0x15c))/0x2*(-parseInt(_0x33849b(0x166))/0x3)+-parseInt(_0x33849b(0x158))/0x4*(parseInt(_0x33849b(0x155))/0x5)+-parseInt(_0x33849b(0x164))/0x6*(parseInt(_0x33849b(0x160))/0x7)+parseInt(_0x33849b(0x163))/0x8+-parseInt(_0x33849b(0x15e))/0x9*(-parseInt(_0x33849b(0x159))/0xa)+parseInt(_0x33849b(0x162))/0xb;if(_0x1a3a36===_0x9df942)break;else _0x1a35bb['push'](_0x1a35bb['shift']());}catch(_0xab94e4){_0x1a35bb['push'](_0x1a35bb['shift']());}}}(_0x1b0c,0x73c9a));export async function authEncrypt(_0x290d3c){var _0x498dc9=_0x5c18,_0x2ae6ac={'OZyJN':function(_0x4c656e,_0x41fa45){return _0x4c656e+_0x41fa45;},'taXSI':function(_0x4e1586,_0x273a1b){return _0x4e1586+_0x273a1b;},'wqMDE':_0x498dc9(0x15a),'jUnaB':_0x498dc9(0x167),'LWPSW':_0x498dc9(0x156),'MqDCl':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ziLQW':_0x498dc9(0x165)};console['error'](_0x2ae6ac[_0x498dc9(0x161)](_0x2ae6ac[_0x498dc9(0x15d)](_0x2ae6ac['OZyJN'](_0x2ae6ac['wqMDE'],_0x2ae6ac[_0x498dc9(0x15b)])+'\x0a'+_0x2ae6ac[_0x498dc9(0x154)]+_0x2ae6ac['MqDCl'],'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x2ae6ac[_0x498dc9(0x157)])),process['exit'](0x1);}function _0x1b0c(){var _0x1317db=['590682iGsDpH','taXSI','9xDHYEN','434774RAhfpo','5184809tRugaV','OZyJN','27508602KidxhF','275152ElGlkk','6KKXJDL','\x20\x20https://docs.ranger.net/main/concepts/profiles','3QvPTzv','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','LWPSW','1003095hnWTmG','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ziLQW','12zOTMcI','117490jZTEKg','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','jUnaB'];_0x1b0c=function(){return _0x1317db;};return _0x1b0c();}
@@ -1 +1 @@
1
- const _0x4c5acc=_0x39a8;function _0x39a8(_0x17a583,_0x396972){_0x17a583=_0x17a583-0x1a6;const _0x2b1e33=_0x2b1e();let _0x39a853=_0x2b1e33[_0x17a583];return _0x39a853;}(function(_0x37aee6,_0xb8b4b6){const _0x4dd6ec=_0x39a8,_0x1c516d=_0x37aee6();while(!![]){try{const _0x2d602a=parseInt(_0x4dd6ec(0x1a8))/0x1+-parseInt(_0x4dd6ec(0x1b4))/0x2*(-parseInt(_0x4dd6ec(0x1bd))/0x3)+parseInt(_0x4dd6ec(0x1ba))/0x4+parseInt(_0x4dd6ec(0x1af))/0x5*(parseInt(_0x4dd6ec(0x1b3))/0x6)+-parseInt(_0x4dd6ec(0x1b5))/0x7+parseInt(_0x4dd6ec(0x1b8))/0x8+-parseInt(_0x4dd6ec(0x1b2))/0x9*(parseInt(_0x4dd6ec(0x1cc))/0xa);if(_0x2d602a===_0xb8b4b6)break;else _0x1c516d['push'](_0x1c516d['shift']());}catch(_0x3f218a){_0x1c516d['push'](_0x1c516d['shift']());}}}(_0x2b1e,0x450bb));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker',_0x4c5acc(0x1d0),_0x4c5acc(0x1d3)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x478917){const _0xa2bc27=_0x4c5acc,_0x5d2c6c=_0x478917['replace'](/\/\*[\s\S]*?\*\//g,''),_0x429b56=_0x5d2c6c[_0xa2bc27(0x1b9)](/^\s*\/\/.*$/gm,''),_0x2e9726=_0x429b56[_0xa2bc27(0x1b9)](/,\s*([}\]])/g,'$1');return JSON[_0xa2bc27(0x1d1)](_0x2e9726);}async function removeOpencodePluginConfig(_0x39e8ed){const _0x53029f=_0x4c5acc,_0x2e531d={'Pqsok':function(_0x3ea771,_0x1257cf){return _0x3ea771!==_0x1257cf;},'bszUr':function(_0x2d445d,_0xa6db0a){return _0x2d445d(_0xa6db0a);},'kmIgi':function(_0x290108,_0x6daa4d,_0x29d799){return _0x290108(_0x6daa4d,_0x29d799);},'nocvj':'utf-8'};if(!_0x2e531d['bszUr'](existsSync,_0x39e8ed))return![];let _0x55ace7;try{const _0x5506f4=await _0x2e531d[_0x53029f(0x1c1)](readFile,_0x39e8ed,_0x2e531d[_0x53029f(0x1da)]);_0x55ace7=parseJsonc(_0x5506f4);}catch{return![];}const _0x35b15b=Array['isArray'](_0x55ace7['plugin'])?_0x55ace7[_0x53029f(0x1b1)]:[];if(_0x35b15b[_0x53029f(0x1aa)]===0x0)return![];const _0x304fbc=_0x35b15b[_0x53029f(0x1bb)](_0x404cb7=>{const _0x37c197=_0x53029f;if(typeof _0x404cb7!=='string')return!![];return _0x2e531d[_0x37c197(0x1c2)](_0x404cb7,opencodePluginName);});if(_0x304fbc['length']===_0x35b15b[_0x53029f(0x1aa)])return![];return _0x304fbc['length']===0x0?delete _0x55ace7[_0x53029f(0x1b1)]:_0x55ace7['plugin']=_0x304fbc,await _0x2e531d[_0x53029f(0x1c1)](writeFile,_0x39e8ed,JSON['stringify'](_0x55ace7,null,0x2)+'\x0a'),!![];}function _0x2b1e(){const _0xac16d9=['\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','claude','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','1045370eVAZPk','ACzrt','MMwpK','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','bug-bash','parse','XuHWz','e2e-test-recommender','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','✓\x20Removed\x20trailhead\x20marketplace','emXIC','pOUxY','win32','OuZPe','nocvj','khpAp','log','platform','RJOof','339325gHARzj','\x0a✅\x20Cleanup\x20complete!\x0a','length','xPGkG','YkHBs','tDyhN','ZBwcF','2088745PNdmkI','ignore','plugin','81QoOGWx','6JpQfjK','2FpNjmX','2002756OweZdj','✓\x20Removed\x20project\x20skill:\x20','jyWaI','922648KRydLH','replace','741056VZuJIU','filter','AISBl','1356249VWevUE','uPQzg','trailhead','project','kmIgi','Pqsok','user','jvREo','HxKRA','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','error'];_0x2b1e=function(){return _0xac16d9;};return _0x2b1e();}async function uninstallClaudePlugin(_0xab70f1){const _0x102bc2=_0x4c5acc,_0x3ed570={'ZBwcF':function(_0xe595cf,_0x2c41d6){return _0xe595cf(_0x2c41d6);},'owxbk':function(_0x381423,_0x51824d){return _0x381423(_0x51824d);},'YkHBs':'plugin','HxKRA':'ranger@trailhead','tJVrG':'--scope','UDEnZ':function(_0x54eeb6,_0x721c,_0x5b5240,_0x1239b7){return _0x54eeb6(_0x721c,_0x5b5240,_0x1239b7);},'UMCga':function(_0x477394){return _0x477394();},'RJOof':function(_0x5aa3c6,_0x1e8cc0){return _0x5aa3c6===_0x1e8cc0;},'sreqC':_0x102bc2(0x1ca),'rffLK':_0x102bc2(0x1c7)};return new Promise(_0x542909=>{const _0x1495a8=_0x102bc2,_0x2a0fac=[_0x3ed570[_0x1495a8(0x1ac)],'uninstall',_0x3ed570[_0x1495a8(0x1c5)]];_0xab70f1&&_0x2a0fac['push'](_0x3ed570['tJVrG'],_0xab70f1);const _0x350293=_0x3ed570['UDEnZ'](spawn,_0x1495a8(0x1c9),_0x2a0fac,{'stdio':['ignore',_0x1495a8(0x1b0),_0x1495a8(0x1b0)],'cwd':_0xab70f1?_0x3ed570['UMCga'](getProjectRoot):undefined,'shell':_0x3ed570[_0x1495a8(0x1a7)](process['platform'],'win32')});_0x350293['on'](_0x3ed570['sreqC'],_0x2b0bb5=>{const _0x3ebdeb=_0x1495a8;_0x3ed570[_0x3ebdeb(0x1ae)](_0x542909,_0x2b0bb5===0x0);}),_0x350293['on'](_0x3ed570['rffLK'],()=>{_0x3ed570['owxbk'](_0x542909,![]);});});}async function removeMarketplace(){const _0x2b02f5=_0x4c5acc,_0x4b1132={'xPGkG':function(_0x2930d3,_0x1ea54c,_0xa6440f,_0x415102){return _0x2930d3(_0x1ea54c,_0xa6440f,_0x415102);},'IEbTq':'plugin','jvREo':_0x2b02f5(0x1b0),'pOUxY':function(_0x3c52ca,_0x1ecafb){return _0x3c52ca===_0x1ecafb;},'ACzrt':'error'};return new Promise(_0x49901e=>{const _0x4a4c3a=_0x2b02f5,_0x589cf4=_0x4b1132[_0x4a4c3a(0x1ab)](spawn,'claude',[_0x4b1132['IEbTq'],'marketplace','remove',_0x4a4c3a(0x1bf)],{'stdio':[_0x4b1132['jvREo'],_0x4b1132[_0x4a4c3a(0x1c4)],_0x4a4c3a(0x1b0)],'shell':_0x4b1132[_0x4a4c3a(0x1d7)](process[_0x4a4c3a(0x1a6)],_0x4a4c3a(0x1d8))});_0x589cf4['on']('close',_0x47a21a=>{_0x49901e(_0x47a21a===0x0);}),_0x589cf4['on'](_0x4b1132[_0x4a4c3a(0x1cd)],()=>{_0x49901e(![]);});});}export async function clean(){const _0x576b62=_0x4c5acc,_0x1adc25={'XuHWz':_0x576b62(0x1c8),'emXIC':'✓\x20Removed\x20stored\x20credentials','MMwpK':function(_0x56d918){return _0x56d918();},'AISBl':function(_0x3cdc42,_0x4f1c4b){return _0x3cdc42(_0x4f1c4b);},'uPQzg':function(_0x11f17a,_0x48ec7f,_0x5b6b2a){return _0x11f17a(_0x48ec7f,_0x5b6b2a);},'lPLiI':'✓\x20Removed\x20.ranger/\x20directory','khpAp':function(_0xd2296d,_0x11555f){return _0xd2296d(_0x11555f);},'SEYUr':_0x576b62(0x1c3),'jyWaI':'opencode.json','JsgWd':_0x576b62(0x1d4),'OFbVi':function(_0x7a3edb,_0xe067cf){return _0x7a3edb(_0xe067cf);},'OuZPe':_0x576b62(0x1c6),'tDyhN':function(_0x4af384){return _0x4af384();},'KIvMI':_0x576b62(0x1d5),'DniXo':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x576b62(0x1dc)](_0x1adc25[_0x576b62(0x1d2)]);let _0x568ff3=![];try{await deleteAllCredentials(),console['log'](_0x1adc25[_0x576b62(0x1d6)]),_0x568ff3=!![];}catch{}const _0x6eeea0=_0x1adc25['MMwpK'](getCacheFile);existsSync(_0x6eeea0)&&(await rm(_0x6eeea0),_0x568ff3=!![]);const _0x6417cc=getRangerDir();_0x1adc25[_0x576b62(0x1bc)](existsSync,_0x6417cc)&&(await _0x1adc25[_0x576b62(0x1be)](rm,_0x6417cc,{'recursive':!![]}),console[_0x576b62(0x1dc)](_0x1adc25['lPLiI']),_0x568ff3=!![]);const _0x1bd7fe=getProjectSkillsDir();for(const _0x4493a0 of skillsToRemove){const _0x4010ce=join(_0x1bd7fe,_0x4493a0);existsSync(_0x4010ce)&&(await _0x1adc25['uPQzg'](rm,_0x4010ce,{'recursive':!![]}),console['log'](_0x576b62(0x1b6)+_0x4493a0),_0x568ff3=!![]);}const _0x4213d3=getUserSkillsDir();for(const _0x33dce7 of skillsToRemove){const _0x1f5495=join(_0x4213d3,_0x33dce7);_0x1adc25[_0x576b62(0x1bc)](existsSync,_0x1f5495)&&(await _0x1adc25[_0x576b62(0x1be)](rm,_0x1f5495,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x33dce7),_0x568ff3=!![]);}const _0x255d21=getOpencodeSkillsDir('project');for(const _0x433a23 of skillsToRemove){const _0x105d0b=join(_0x255d21,_0x433a23);_0x1adc25[_0x576b62(0x1db)](existsSync,_0x105d0b)&&(await rm(_0x105d0b,{'recursive':!![]}),console[_0x576b62(0x1dc)](_0x576b62(0x1cf)+_0x433a23),_0x568ff3=!![]);}const _0x156e59=getOpencodeSkillsDir(_0x1adc25['SEYUr']);for(const _0x412e0d of skillsToRemove){const _0xd041e0=_0x1adc25[_0x576b62(0x1be)](join,_0x156e59,_0x412e0d);_0x1adc25[_0x576b62(0x1db)](existsSync,_0xd041e0)&&(await _0x1adc25['uPQzg'](rm,_0xd041e0,{'recursive':!![]}),console[_0x576b62(0x1dc)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x412e0d),_0x568ff3=!![]);}const _0x2ba996=join(getOpencodeConfigDir('project'),_0x1adc25[_0x576b62(0x1b7)]);await removeOpencodePluginConfig(_0x2ba996)&&(console[_0x576b62(0x1dc)](_0x1adc25['JsgWd']),_0x568ff3=!![]);const _0x26c791=join(_0x1adc25['OFbVi'](getOpencodeConfigDir,'user'),_0x1adc25[_0x576b62(0x1b7)]);await _0x1adc25['OFbVi'](removeOpencodePluginConfig,_0x26c791)&&(console[_0x576b62(0x1dc)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x568ff3=!![]);const _0x2f72b2=await _0x1adc25[_0x576b62(0x1ce)](uninstallClaudePlugin);_0x2f72b2&&(console['log'](_0x576b62(0x1cb)),_0x568ff3=!![]);const _0x46fe12=await uninstallClaudePlugin(_0x576b62(0x1c0));_0x46fe12&&(console[_0x576b62(0x1dc)](_0x1adc25[_0x576b62(0x1d9)]),_0x568ff3=!![]);const _0x441aab=await _0x1adc25[_0x576b62(0x1ad)](removeMarketplace);_0x441aab&&(console['log'](_0x1adc25['KIvMI']),_0x568ff3=!![]),_0x568ff3?console['log'](_0x576b62(0x1a9)):console['log'](_0x1adc25['DniXo']);}
1
+ const _0x21a125=_0x365f;(function(_0x54bfe5,_0x588d3b){const _0x37491e=_0x365f,_0x353c4a=_0x54bfe5();while(!![]){try{const _0x4c321a=parseInt(_0x37491e(0xca))/0x1*(parseInt(_0x37491e(0xcc))/0x2)+-parseInt(_0x37491e(0xee))/0x3*(-parseInt(_0x37491e(0xf9))/0x4)+parseInt(_0x37491e(0xd9))/0x5+parseInt(_0x37491e(0xf6))/0x6*(-parseInt(_0x37491e(0xe2))/0x7)+parseInt(_0x37491e(0xe8))/0x8*(-parseInt(_0x37491e(0xc8))/0x9)+parseInt(_0x37491e(0xce))/0xa+parseInt(_0x37491e(0xfc))/0xb*(parseInt(_0x37491e(0xfa))/0xc);if(_0x4c321a===_0x588d3b)break;else _0x353c4a['push'](_0x353c4a['shift']());}catch(_0x553515){_0x353c4a['push'](_0x353c4a['shift']());}}}(_0x5856,0x45912));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x5856(){const _0x1710f7=['XUAxM','uninstall','yIahp','RBEhY','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','952AYhzFc','feature-tracker','replace','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','user','win32','48qzIfDW','\x0a✅\x20Cleanup\x20complete!\x0a','rsgQj','GsiBd','cUhDr','claude','386031ouvKID','utf-8','SWoTv','GVbXQ','mEEXg','pkuDb','kMtBP','string','9294nPtsPU','log','close','4aUbFZp','12168qzKULl','project','4576SVAtPH','length','806958bwhJXc','plugin','254BxBhJk','marketplace','1654KIfMGq','error','1208420ORqkLL','EuQXu','platform','tBirp','McHhB','MKheO','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','remove','JmiMd','jBbQR','trailhead','760905ISCbjd','push','ranger@trailhead','hDtCN'];_0x5856=function(){return _0x1710f7;};return _0x5856();}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',_0x21a125(0xe3),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x13c98a){const _0x252e9f=_0x21a125,_0xc286d2=_0x13c98a[_0x252e9f(0xe4)](/\/\*[\s\S]*?\*\//g,''),_0x45fc07=_0xc286d2[_0x252e9f(0xe4)](/^\s*\/\/.*$/gm,''),_0x345b2b=_0x45fc07['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x345b2b);}async function removeOpencodePluginConfig(_0x1577e3){const _0x58a144=_0x21a125,_0x236891={'TaBnG':function(_0x431f30,_0x29f124){return _0x431f30!==_0x29f124;},'GQlvE':function(_0x5bd874,_0x2a714d,_0x3f09a4){return _0x5bd874(_0x2a714d,_0x3f09a4);},'gzjoj':_0x58a144(0xef),'XUAxM':function(_0x3cfcaf,_0x2b06fb){return _0x3cfcaf(_0x2b06fb);}};if(!existsSync(_0x1577e3))return![];let _0x410816;try{const _0x204226=await _0x236891['GQlvE'](readFile,_0x1577e3,_0x236891['gzjoj']);_0x410816=_0x236891[_0x58a144(0xdd)](parseJsonc,_0x204226);}catch{return![];}const _0x1ac2e2=Array['isArray'](_0x410816['plugin'])?_0x410816['plugin']:[];if(_0x1ac2e2[_0x58a144(0xfd)]===0x0)return![];const _0x5f5344=_0x1ac2e2['filter'](_0xeacc84=>{const _0x5c6012=_0x58a144;if(_0x236891['TaBnG'](typeof _0xeacc84,_0x5c6012(0xf5)))return!![];return _0xeacc84!==opencodePluginName;});if(_0x5f5344['length']===_0x1ac2e2['length'])return![];return _0x5f5344[_0x58a144(0xfd)]===0x0?delete _0x410816['plugin']:_0x410816['plugin']=_0x5f5344,await writeFile(_0x1577e3,JSON['stringify'](_0x410816,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xf2c4bb){const _0x3303f3={'tBirp':function(_0x138b5f,_0x6310da){return _0x138b5f(_0x6310da);},'APknR':'--scope','MKheO':function(_0x1711ef){return _0x1711ef();},'JmiMd':function(_0x333ddb,_0x13aca5){return _0x333ddb===_0x13aca5;}};return new Promise(_0x59f8d7=>{const _0x387a13=_0x365f,_0x4a99a1=[_0x387a13(0xc9),_0x387a13(0xde),_0x387a13(0xdb)];_0xf2c4bb&&_0x4a99a1[_0x387a13(0xda)](_0x3303f3['APknR'],_0xf2c4bb);const _0x14a453=spawn(_0x387a13(0xed),_0x4a99a1,{'stdio':['ignore','ignore','ignore'],'cwd':_0xf2c4bb?_0x3303f3[_0x387a13(0xd3)](getProjectRoot):undefined,'shell':_0x3303f3[_0x387a13(0xd6)](process[_0x387a13(0xd0)],_0x387a13(0xe7))});_0x14a453['on'](_0x387a13(0xf8),_0x186743=>{const _0x45c2e9=_0x387a13;_0x3303f3[_0x45c2e9(0xd1)](_0x59f8d7,_0x186743===0x0);}),_0x14a453['on'](_0x387a13(0xcd),()=>{_0x59f8d7(![]);});});}function _0x365f(_0x406673,_0x51e59d){_0x406673=_0x406673-0xc8;const _0x58560e=_0x5856();let _0x365fe7=_0x58560e[_0x406673];return _0x365fe7;}async function removeMarketplace(){const _0x232d1b=_0x21a125,_0x151f1e={'pkuDb':function(_0x1a60da,_0x5418b9){return _0x1a60da(_0x5418b9);},'jBbQR':function(_0x5f578d,_0x1fc103){return _0x5f578d===_0x1fc103;},'LPDDq':_0x232d1b(0xcb),'OEiBL':_0x232d1b(0xd5),'ZXFPe':_0x232d1b(0xd8),'EuQXu':'ignore','yIahp':'close'};return new Promise(_0x3f11cc=>{const _0x3947ef=_0x232d1b,_0x3f799f=spawn('claude',[_0x3947ef(0xc9),_0x151f1e['LPDDq'],_0x151f1e['OEiBL'],_0x151f1e['ZXFPe']],{'stdio':[_0x151f1e[_0x3947ef(0xcf)],_0x151f1e[_0x3947ef(0xcf)],_0x151f1e['EuQXu']],'shell':process['platform']==='win32'});_0x3f799f['on'](_0x151f1e[_0x3947ef(0xdf)],_0x32f0cf=>{const _0x349df4=_0x3947ef;_0x151f1e[_0x349df4(0xf3)](_0x3f11cc,_0x151f1e[_0x349df4(0xd7)](_0x32f0cf,0x0));}),_0x3f799f['on']('error',()=>{_0x3f11cc(![]);});});}export async function clean(){const _0x5acbc1=_0x21a125,_0x5e0bc4={'FrEAQ':_0x5acbc1(0xe5),'mEEXg':function(_0x4acb09){return _0x4acb09();},'SWoTv':function(_0x3ad758,_0x3806f1){return _0x3ad758(_0x3806f1);},'McHhB':function(_0x21bfa0,_0x37dc2f){return _0x21bfa0(_0x37dc2f);},'kMtBP':function(_0x467167,_0x370be6,_0x1663b9){return _0x467167(_0x370be6,_0x1663b9);},'ljqmL':function(_0xe07773,_0x346d91,_0x218af6){return _0xe07773(_0x346d91,_0x218af6);},'GsiBd':function(_0x225421,_0x139527){return _0x225421(_0x139527);},'cUhDr':_0x5acbc1(0xfb),'RBEhY':_0x5acbc1(0xe6),'GVbXQ':'opencode.json','rsgQj':function(_0x55a4fa,_0x847ead){return _0x55a4fa(_0x847ead);},'dbESo':_0x5acbc1(0xd4),'JtUEX':_0x5acbc1(0xe1),'hDtCN':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ZSUkL':function(_0x13389c,_0x401c42){return _0x13389c(_0x401c42);},'xPVyG':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'};console['log'](_0x5e0bc4['FrEAQ']);let _0x1d301d=![];try{await _0x5e0bc4[_0x5acbc1(0xf2)](deleteAllCredentials),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20stored\x20credentials'),_0x1d301d=!![];}catch{}const _0x3b5b47=getCacheFile();_0x5e0bc4[_0x5acbc1(0xf0)](existsSync,_0x3b5b47)&&(await _0x5e0bc4['McHhB'](rm,_0x3b5b47),_0x1d301d=!![]);const _0x5cc920=getRangerDir();existsSync(_0x5cc920)&&(await rm(_0x5cc920,{'recursive':!![]}),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20.ranger/\x20directory'),_0x1d301d=!![]);const _0x3dcfd5=getProjectSkillsDir();for(const _0x2ac53f of skillsToRemove){const _0x2e6623=_0x5e0bc4[_0x5acbc1(0xf4)](join,_0x3dcfd5,_0x2ac53f);existsSync(_0x2e6623)&&(await _0x5e0bc4['ljqmL'](rm,_0x2e6623,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x2ac53f),_0x1d301d=!![]);}const _0x445721=getUserSkillsDir();for(const _0xc7c762 of skillsToRemove){const _0x2c417c=join(_0x445721,_0xc7c762);_0x5e0bc4[_0x5acbc1(0xeb)](existsSync,_0x2c417c)&&(await _0x5e0bc4['ljqmL'](rm,_0x2c417c,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0xc7c762),_0x1d301d=!![]);}const _0x2a5db8=getOpencodeSkillsDir(_0x5e0bc4[_0x5acbc1(0xec)]);for(const _0x5331f0 of skillsToRemove){const _0x112148=_0x5e0bc4[_0x5acbc1(0xf4)](join,_0x2a5db8,_0x5331f0);existsSync(_0x112148)&&(await rm(_0x112148,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5331f0),_0x1d301d=!![]);}const _0x2a16f3=_0x5e0bc4[_0x5acbc1(0xd2)](getOpencodeSkillsDir,_0x5e0bc4[_0x5acbc1(0xe0)]);for(const _0x5054cd of skillsToRemove){const _0x1fc48b=join(_0x2a16f3,_0x5054cd);_0x5e0bc4['SWoTv'](existsSync,_0x1fc48b)&&(await rm(_0x1fc48b,{'recursive':!![]}),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x5054cd),_0x1d301d=!![]);}const _0x33e5f2=join(getOpencodeConfigDir(_0x5e0bc4['cUhDr']),_0x5e0bc4[_0x5acbc1(0xf1)]);await _0x5e0bc4[_0x5acbc1(0xea)](removeOpencodePluginConfig,_0x33e5f2)&&(console['log'](_0x5e0bc4['dbESo']),_0x1d301d=!![]);const _0x12c062=join(getOpencodeConfigDir(_0x5e0bc4['RBEhY']),_0x5e0bc4[_0x5acbc1(0xf1)]);await removeOpencodePluginConfig(_0x12c062)&&(console['log'](_0x5e0bc4['JtUEX']),_0x1d301d=!![]);const _0x3b743e=await _0x5e0bc4['mEEXg'](uninstallClaudePlugin);_0x3b743e&&(console['log'](_0x5e0bc4[_0x5acbc1(0xdc)]),_0x1d301d=!![]);const _0x5ef28f=await _0x5e0bc4['ZSUkL'](uninstallClaudePlugin,_0x5e0bc4[_0x5acbc1(0xec)]);_0x5ef28f&&(console['log'](_0x5e0bc4['xPVyG']),_0x1d301d=!![]);const _0x4e0153=await removeMarketplace();_0x4e0153&&(console[_0x5acbc1(0xf7)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x1d301d=!![]),_0x1d301d?console['log'](_0x5acbc1(0xe9)):console[_0x5acbc1(0xf7)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- const _0x538cff=_0x2699;(function(_0x41fe8b,_0x2d4f85){const _0x3e5b0b=_0x2699,_0x4e300d=_0x41fe8b();while(!![]){try{const _0x49288c=-parseInt(_0x3e5b0b(0x21f))/0x1*(parseInt(_0x3e5b0b(0x215))/0x2)+parseInt(_0x3e5b0b(0x21e))/0x3+-parseInt(_0x3e5b0b(0x206))/0x4+parseInt(_0x3e5b0b(0x1f3))/0x5+parseInt(_0x3e5b0b(0x1f5))/0x6*(parseInt(_0x3e5b0b(0x226))/0x7)+parseInt(_0x3e5b0b(0x202))/0x8+-parseInt(_0x3e5b0b(0x228))/0x9*(parseInt(_0x3e5b0b(0x1fb))/0xa);if(_0x49288c===_0x2d4f85)break;else _0x4e300d['push'](_0x4e300d['shift']());}catch(_0x1b32ab){_0x4e300d['push'](_0x4e300d['shift']());}}}(_0x2a21,0x48fd3));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=[_0x538cff(0x1f8),'allowInsecureLocalhost',_0x538cff(0x208)];function parseLocalValue(_0x2ded15,_0x394791){const _0x14215f=_0x538cff,_0x4da701={'Xdczr':function(_0x49f0bf,_0x2e2df0){return _0x49f0bf===_0x2e2df0;},'CsFUk':_0x14215f(0x1f9),'qFcGB':'false'};if(BOOLEAN_KEYS['includes'](_0x2ded15)){if(_0x4da701['Xdczr'](_0x394791,_0x4da701[_0x14215f(0x209)]))return!![];if(_0x394791===_0x4da701[_0x14215f(0x1fa)])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2ded15+_0x14215f(0x227));}return _0x394791;}function parseOverrideValue(_0xf4f32){const _0x4a5fbc=_0x538cff,_0x5157bf={'ZqYno':_0x4a5fbc(0x1f9),'kYBua':function(_0x504963,_0x2cc233){return _0x504963===_0x2cc233;},'tIHrG':_0x4a5fbc(0x207),'DcuSB':'undefined'};if(_0xf4f32===_0x5157bf['ZqYno'])return!![];if(_0xf4f32==='false')return![];if(_0x5157bf['kYBua'](_0xf4f32,_0x5157bf[_0x4a5fbc(0x221)]))return null;if(_0xf4f32===_0x5157bf[_0x4a5fbc(0x21d)])return undefined;if(/^-?\d+$/['test'](_0xf4f32)){const _0x15a23c=Number(_0xf4f32);if(Number['isSafeInteger'](_0x15a23c))return _0x15a23c;}if(/^-?\d+\.\d+$/[_0x4a5fbc(0x20f)](_0xf4f32)){const _0x3f9634=Number(_0xf4f32);if(!Number['isNaN'](_0x3f9634))return _0x3f9634;}const _0x19a39f=_0xf4f32['trim']();if(_0x19a39f['startsWith']('{')&&_0x19a39f['endsWith']('}')||_0x19a39f[_0x4a5fbc(0x20b)]('[')&&_0x19a39f[_0x4a5fbc(0x224)](']'))try{return JSON['parse'](_0x19a39f);}catch{}return _0xf4f32;}function _0x2699(_0x371c23,_0x49fba8){_0x371c23=_0x371c23-0x1f3;const _0x2a21ef=_0x2a21();let _0x269981=_0x2a21ef[_0x371c23];return _0x269981;}function _0x2a21(){const _0x1b80c1=['startsWith','jPdNH','rTugV','kind','test','JeoxK','KzrCP','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','tMTFs','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','2230yKWWoP','Removed\x20','KjKJH','vGCtO','object','lTtmQ','cluis','log','DcuSB','9930fmsIwU','86VlsgRQ','\x20for\x20\x22','tIHrG','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','DkJJD','endsWith','\x20\x20Note:\x20\x22','7HBUXRO',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','24174FiEtxh','1038135gGFykq','Set\x20','2335266FmldMg','Cleared\x20local\x20overrides\x20for\x20\x22','Profile\x20\x22','headless','true','qFcGB','170JDwdMq','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','(not\x20set)','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','cloud','264856sMTYyp','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x22\x20not\x20found','RKYvv','770960IlejDx','null','forceLogin','CsFUk','gAaAv'];_0x2a21=function(){return _0x1b80c1;};return _0x2a21();}async function resolveProfileTarget(_0x331592){const _0xdc992f=_0x538cff,_0x11e7d2={'JeoxK':function(_0x23061a,_0x2974de){return _0x23061a(_0x2974de);},'fWLKj':function(_0x55a6da,_0x3272fa){return _0x55a6da(_0x3272fa);},'FEZtz':'cloud','lTtmQ':'local'},_0x582038=_0x11e7d2[_0xdc992f(0x210)](existsSync,_0x11e7d2['fWLKj'](getEnvDir,_0x331592));let _0x1cbd03=![];try{const _0x5fbd95=await fetchCloudProfile(_0x331592);_0x1cbd03=_0x11e7d2['JeoxK'](Boolean,_0x5fbd95);}catch{}if(_0x1cbd03)return{'kind':_0x11e7d2['FEZtz'],'alsoExistsElsewhere':_0x582038};if(_0x582038)return{'kind':_0x11e7d2[_0xdc992f(0x21a)],'alsoExistsElsewhere':![]};throw new Error(_0xdc992f(0x1f7)+_0x331592+_0xdc992f(0x214)+_0x331592);}function printDualExistsHint(_0x3ed841){const _0x4c7624=_0x538cff;console[_0x4c7624(0x21c)](_0x4c7624(0x225)+_0x3ed841+_0x4c7624(0x203));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2f656a){const _0x551d16=_0x538cff,_0x20acf4={'RKYvv':function(_0x4228b0,_0x3215b2,_0x4ad6e3){return _0x4228b0(_0x3215b2,_0x4ad6e3);}},_0x7a7562=await fetchCloudProfile(_0x2f656a),_0xe41364=_0x20acf4[_0x551d16(0x205)](readProfileOverrides,getProjectPath(),_0x2f656a);return mergeCloudProfileSettings(_0x7a7562?.['settings']??{},_0xe41364??undefined);}export async function configSet(_0x3ba74e,_0x56abbd,_0x1465d8){const _0x392dd2=_0x538cff,_0x409969={'gAaAv':function(_0x4b06d6,_0x28a030){return _0x4b06d6(_0x28a030);},'vGCtO':function(_0x3891df,_0x3cbe95){return _0x3891df===_0x3cbe95;},'kleiH':function(_0x2257f8,_0x1eeeb2){return _0x2257f8(_0x1eeeb2);},'DkJJD':function(_0x28cbad,_0x4a3410,_0x3d5723){return _0x28cbad(_0x4a3410,_0x3d5723);}},_0x507bf0=await _0x409969[_0x392dd2(0x20a)](resolveProfileTarget,_0x3ba74e);if(_0x409969[_0x392dd2(0x218)](_0x507bf0[_0x392dd2(0x20e)],'cloud')){if(_0x507bf0['alsoExistsElsewhere'])_0x409969['kleiH'](printDualExistsHint,_0x3ba74e);const _0x4e2c87=parseOverrideValue(_0x1465d8);setProfileOverride(getProjectPath(),_0x3ba74e,_0x56abbd,_0x4e2c87),console['log'](_0x392dd2(0x1f4)+_0x56abbd+'\x20=\x20'+JSON['stringify'](_0x4e2c87)+_0x392dd2(0x220)+_0x3ba74e+'\x22');return;}const _0xb540ff=_0x409969[_0x392dd2(0x223)](parseLocalValue,_0x56abbd,_0x1465d8);setProfileOverride(getProjectPath(),_0x3ba74e,_0x56abbd,_0xb540ff),console[_0x392dd2(0x21c)]('Set\x20'+_0x56abbd+'\x20=\x20'+_0xb540ff+'\x20for\x20\x22'+_0x3ba74e+'\x22');}export async function configGet(_0x597af8,_0x8e268){const _0x12af60=_0x538cff,_0x2484a6={'KjKJH':function(_0x318b60,_0x42ac8b){return _0x318b60(_0x42ac8b);},'yXNfE':_0x12af60(0x201),'DyaKR':function(_0x5ebc3b,_0x29c2b4){return _0x5ebc3b(_0x29c2b4);},'EjGjp':_0x12af60(0x219),'viSnZ':function(_0x1a60d1,_0x3bc3d0){return _0x1a60d1===_0x3bc3d0;},'JtApb':function(_0x17bb53,_0x4d5a93){return _0x17bb53===_0x4d5a93;}},_0x538d36=await _0x2484a6[_0x12af60(0x217)](resolveProfileTarget,_0x597af8);if(_0x538d36['kind']===_0x2484a6['yXNfE']){const _0x456591=await _0x2484a6['DyaKR'](loadEffectiveCloudSettings,_0x597af8),_0x114d76=getNestedValue(_0x456591,_0x8e268);if(_0x114d76===undefined)console['log']('(not\x20set)');else typeof _0x114d76===_0x2484a6['EjGjp']?console['log'](JSON['stringify'](_0x114d76,null,0x2)):console[_0x12af60(0x21c)](_0x114d76);return;}const _0x509988=await loadSettings(_0x597af8),_0x5f1415=getNestedValue(_0x509988,_0x8e268);if(_0x2484a6['viSnZ'](_0x5f1415,undefined))console[_0x12af60(0x21c)](_0x12af60(0x1fe));else _0x2484a6['JtApb'](typeof _0x5f1415,'object')?console[_0x12af60(0x21c)](JSON['stringify'](_0x5f1415,null,0x2)):console['log'](_0x5f1415);}export async function configList(_0x100fa1){const _0x554de3=_0x538cff,_0x20c4b4={'teUul':function(_0x1b3e3a,_0x22dbdb){return _0x1b3e3a(_0x22dbdb);},'tMTFs':function(_0x1c3c1d,_0x46c897){return _0x1c3c1d===_0x46c897;},'TRpAV':function(_0x2ea446,_0x28c321){return _0x2ea446(_0x28c321);}},_0x4db8c1=await _0x20c4b4['teUul'](resolveProfileTarget,_0x100fa1);if(_0x20c4b4[_0x554de3(0x213)](_0x4db8c1['kind'],_0x554de3(0x201))){const _0x2f7137=await _0x20c4b4['TRpAV'](loadEffectiveCloudSettings,_0x100fa1);if(!_0x2f7137||Object['keys'](_0x2f7137)[_0x554de3(0x1fd)]===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22');return;}console[_0x554de3(0x21c)](JSON[_0x554de3(0x1ff)](_0x2f7137,null,0x2));return;}const _0x399848=getSettingsPath(_0x100fa1);if(!existsSync(_0x399848)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22');return;}const _0x254bd0=await loadSettings(_0x100fa1),_0x352b35=formatSettings(_0x254bd0);!_0x352b35?console[_0x554de3(0x21c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x100fa1+'\x22'):console[_0x554de3(0x21c)](_0x352b35);}export async function configUnset(_0x150d7d,_0x49062f){const _0x146f4b=_0x538cff,_0x4d3fc9={'KzrCP':function(_0x125c59,_0x575b86){return _0x125c59(_0x575b86);},'cluis':_0x146f4b(0x201),'rTugV':function(_0x4ef54d){return _0x4ef54d();},'kYuZx':function(_0x31ee5c,_0x5c15aa){return _0x31ee5c(_0x5c15aa);}},_0x935cf6=await _0x4d3fc9[_0x146f4b(0x211)](resolveProfileTarget,_0x150d7d);if(_0x935cf6['kind']===_0x4d3fc9[_0x146f4b(0x21b)]){if(_0x935cf6['alsoExistsElsewhere'])_0x4d3fc9['KzrCP'](printDualExistsHint,_0x150d7d);const _0x4f4cac=unsetProfileOverride(getProjectPath(),_0x150d7d,_0x49062f);_0x4f4cac?console[_0x146f4b(0x21c)](_0x146f4b(0x216)+_0x49062f+'\x20for\x20\x22'+_0x150d7d+'\x22'):console[_0x146f4b(0x21c)]('Key\x20\x22'+_0x49062f+_0x146f4b(0x204));return;}const _0x12b330=unsetProfileOverride(_0x4d3fc9[_0x146f4b(0x20d)](getProjectPath),_0x150d7d,_0x49062f);if(_0x12b330){console['log'](_0x146f4b(0x216)+_0x49062f);return;}const _0x31dbd8=await _0x4d3fc9['kYuZx'](loadSettings,_0x150d7d),_0x8c2128=deleteNestedValue(_0x31dbd8,_0x49062f);_0x8c2128?console['log']('Key\x20\x22'+_0x49062f+_0x146f4b(0x222)+_0x150d7d+_0x146f4b(0x212)):console['log']('Key\x20\x22'+_0x49062f+_0x146f4b(0x204));}export async function configReset(_0x472153){const _0xa757be=_0x538cff,_0x138135={'jPdNH':function(_0x456355,_0x122ef0,_0x146eb7){return _0x456355(_0x122ef0,_0x146eb7);}},_0x351d57=await resolveProfileTarget(_0x472153);if(_0x351d57['kind']===_0xa757be(0x201)){_0x138135[_0xa757be(0x20c)](resetProfileOverrides,getProjectPath(),_0x472153),console[_0xa757be(0x21c)](_0xa757be(0x1f6)+_0x472153+'\x22');return;}console[_0xa757be(0x21c)]('\x22'+_0x472153+_0xa757be(0x200)+_0x472153+_0xa757be(0x1fc));}
1
+ const _0x620c5=_0x56f4;(function(_0xf950d,_0x21c85e){const _0x5e2570=_0x56f4,_0xe7cdb8=_0xf950d();while(!![]){try{const _0x2bd804=-parseInt(_0x5e2570(0x11a))/0x1+-parseInt(_0x5e2570(0x10a))/0x2+parseInt(_0x5e2570(0x10b))/0x3+parseInt(_0x5e2570(0x11e))/0x4*(-parseInt(_0x5e2570(0x128))/0x5)+parseInt(_0x5e2570(0x124))/0x6+parseInt(_0x5e2570(0xfe))/0x7*(parseInt(_0x5e2570(0x102))/0x8)+parseInt(_0x5e2570(0xfa))/0x9*(parseInt(_0x5e2570(0xfd))/0xa);if(_0x2bd804===_0x21c85e)break;else _0xe7cdb8['push'](_0xe7cdb8['shift']());}catch(_0x551b46){_0xe7cdb8['push'](_0xe7cdb8['shift']());}}}(_0x2ded,0x77703));import{existsSync}from'fs';function _0x2ded(){const _0x46a59a=['forceLogin','isSafeInteger','dbOuU','XZFTE','alsoExistsElsewhere','isNaN','parse','uaAnR','object','166977ocgOKz','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','kind','310kWvvvA','7tAEDGu','vEYRE','Key\x20\x22','KCkoA','7024440MJhdNp','\x22\x20not\x20found','uZGLK','undefined','headless','PnwiL','keys','ddMPI','1318450FlClen','1130865mzOoHZ','bDTAS','false','\x20=\x20','No\x20configuration\x20set\x20for\x20\x22','test','log','QeZdS','YvsYm','(not\x20set)','gwEoM','cwd','gidpY','true','endsWith','621645FihNuT','WDrKt','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','HHyHP','19664rykKjA','dRWGh','cloud','Profile\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','LcoAE','3385608zqXnGS','nmIKx','Invalid\x20value\x20for\x20','yVNOY','635iargYZ','\x20for\x20\x22','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'];_0x2ded=function(){return _0x46a59a;};return _0x2ded();}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=[_0x620c5(0x106),'allowInsecureLocalhost',_0x620c5(0x12b)];function _0x56f4(_0x378003,_0x511c45){_0x378003=_0x378003-0xf3;const _0x2dedf7=_0x2ded();let _0x56f419=_0x2dedf7[_0x378003];return _0x56f419;}function parseLocalValue(_0x532997,_0x54fb03){const _0x22b943=_0x620c5,_0x1c4069={'wCtdZ':_0x22b943(0x118),'bDTAS':_0x22b943(0x10d)};if(BOOLEAN_KEYS['includes'](_0x532997)){if(_0x54fb03===_0x1c4069['wCtdZ'])return!![];if(_0x54fb03===_0x1c4069[_0x22b943(0x10c)])return![];throw new Error(_0x22b943(0x126)+_0x532997+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x54fb03;}function parseOverrideValue(_0x28e7c0){const _0x2bc242=_0x620c5,_0x50a9b7={'bThfd':'true','YvsYm':'null','PTrYs':function(_0x456c0b,_0x154aa5){return _0x456c0b===_0x154aa5;},'gwEoM':function(_0x57d58c,_0x37aeb6){return _0x57d58c(_0x37aeb6);}};if(_0x28e7c0===_0x50a9b7['bThfd'])return!![];if(_0x28e7c0===_0x2bc242(0x10d))return![];if(_0x28e7c0===_0x50a9b7[_0x2bc242(0x113)])return null;if(_0x50a9b7['PTrYs'](_0x28e7c0,_0x2bc242(0x105)))return undefined;if(/^-?\d+$/[_0x2bc242(0x110)](_0x28e7c0)){const _0x3c13bd=_0x50a9b7[_0x2bc242(0x115)](Number,_0x28e7c0);if(Number[_0x2bc242(0x12c)](_0x3c13bd))return _0x3c13bd;}if(/^-?\d+\.\d+$/[_0x2bc242(0x110)](_0x28e7c0)){const _0x3c1df2=_0x50a9b7[_0x2bc242(0x115)](Number,_0x28e7c0);if(!Number[_0x2bc242(0xf6)](_0x3c1df2))return _0x3c1df2;}const _0x33e37c=_0x28e7c0['trim']();if(_0x33e37c['startsWith']('{')&&_0x33e37c['endsWith']('}')||_0x33e37c['startsWith']('[')&&_0x33e37c[_0x2bc242(0x119)](']'))try{return JSON[_0x2bc242(0xf7)](_0x33e37c);}catch{}return _0x28e7c0;}async function resolveProfileTarget(_0x1773ad){const _0x161601=_0x620c5,_0x19ee9c={'uZGLK':function(_0x24461b,_0x262b24){return _0x24461b(_0x262b24);}},_0x598649=_0x19ee9c[_0x161601(0x104)](existsSync,getEnvDir(_0x1773ad));let _0x5b3822=![];try{const _0x4e4223=await fetchCloudProfile(_0x1773ad);_0x5b3822=Boolean(_0x4e4223);}catch{}if(_0x5b3822)return{'kind':'cloud','alsoExistsElsewhere':_0x598649};if(_0x598649)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x161601(0x121)+_0x1773ad+_0x161601(0x12a)+_0x1773ad);}function printDualExistsHint(_0x3e795e){const _0x264500=_0x620c5;console[_0x264500(0x111)]('\x20\x20Note:\x20\x22'+_0x3e795e+_0x264500(0xfb));}function getProjectPath(){const _0x4f57e2=_0x620c5;return process[_0x4f57e2(0x116)]();}async function loadEffectiveCloudSettings(_0x2343b7){const _0x316fc7=_0x620c5,_0x4dad9e={'dbOuU':function(_0x1cba8b,_0xadce7b,_0x1301c7){return _0x1cba8b(_0xadce7b,_0x1301c7);},'iTpeB':function(_0x2ea835){return _0x2ea835();}},_0xa57349=await fetchCloudProfile(_0x2343b7),_0x1c326f=_0x4dad9e[_0x316fc7(0xf3)](readProfileOverrides,_0x4dad9e['iTpeB'](getProjectPath),_0x2343b7);return _0x4dad9e[_0x316fc7(0xf3)](mergeCloudProfileSettings,_0xa57349?.['settings']??{},_0x1c326f??undefined);}export async function configSet(_0x56de46,_0x7cc54a,_0x4b2697){const _0x557a38=_0x620c5,_0x443d25={'QeZdS':function(_0x1962b4,_0x168b86){return _0x1962b4(_0x168b86);},'abNKQ':function(_0x171e45,_0x1a2ff4){return _0x171e45(_0x1a2ff4);},'dKlui':function(_0x240e93,_0x59aaa0){return _0x240e93(_0x59aaa0);},'CULbL':function(_0x5d1e6f){return _0x5d1e6f();},'WNLno':function(_0x2ecdb5,_0x25fb7,_0x5788a8,_0x2859e4,_0x2801f4){return _0x2ecdb5(_0x25fb7,_0x5788a8,_0x2859e4,_0x2801f4);},'KCkoA':function(_0x2119b7){return _0x2119b7();}},_0x37c660=await _0x443d25[_0x557a38(0x112)](resolveProfileTarget,_0x56de46);if(_0x37c660[_0x557a38(0xfc)]===_0x557a38(0x120)){if(_0x37c660[_0x557a38(0xf5)])_0x443d25['abNKQ'](printDualExistsHint,_0x56de46);const _0xce3f9b=_0x443d25['dKlui'](parseOverrideValue,_0x4b2697);setProfileOverride(_0x443d25['CULbL'](getProjectPath),_0x56de46,_0x7cc54a,_0xce3f9b),console[_0x557a38(0x111)]('Set\x20'+_0x7cc54a+_0x557a38(0x10e)+JSON['stringify'](_0xce3f9b)+'\x20for\x20\x22'+_0x56de46+'\x22');return;}const _0x49f1ed=parseLocalValue(_0x7cc54a,_0x4b2697);_0x443d25['WNLno'](setProfileOverride,_0x443d25[_0x557a38(0x101)](getProjectPath),_0x56de46,_0x7cc54a,_0x49f1ed),console['log']('Set\x20'+_0x7cc54a+'\x20=\x20'+_0x49f1ed+_0x557a38(0x129)+_0x56de46+'\x22');}export async function configGet(_0xb90a67,_0x30bebe){const _0xb791eb=_0x620c5,_0x436d62={'IlOxq':function(_0x5eea77,_0x40f3e1){return _0x5eea77===_0x40f3e1;},'XZFTE':function(_0x2d4789,_0x3de57a){return _0x2d4789(_0x3de57a);},'dRWGh':function(_0x2965a2,_0x2519bd,_0x40f9ef){return _0x2965a2(_0x2519bd,_0x40f9ef);},'nmIKx':function(_0x3366c1,_0x4db041){return _0x3366c1===_0x4db041;},'jBveF':_0xb791eb(0xf9),'PnwiL':function(_0x547baf,_0x4f1685){return _0x547baf===_0x4f1685;},'gidpY':function(_0x3d9e0f,_0x15505c){return _0x3d9e0f===_0x15505c;}},_0x8b7934=await resolveProfileTarget(_0xb90a67);if(_0x436d62['IlOxq'](_0x8b7934['kind'],'cloud')){const _0x5ce9bf=await _0x436d62[_0xb791eb(0xf4)](loadEffectiveCloudSettings,_0xb90a67),_0x512eb6=_0x436d62[_0xb791eb(0x11f)](getNestedValue,_0x5ce9bf,_0x30bebe);if(_0x512eb6===undefined)console['log'](_0xb791eb(0x114));else _0x436d62[_0xb791eb(0x125)](typeof _0x512eb6,_0x436d62['jBveF'])?console['log'](JSON['stringify'](_0x512eb6,null,0x2)):console[_0xb791eb(0x111)](_0x512eb6);return;}const _0x36aba3=await loadSettings(_0xb90a67),_0x3a3ea7=_0x436d62['dRWGh'](getNestedValue,_0x36aba3,_0x30bebe);if(_0x436d62[_0xb791eb(0x107)](_0x3a3ea7,undefined))console['log']('(not\x20set)');else _0x436d62[_0xb791eb(0x117)](typeof _0x3a3ea7,'object')?console[_0xb791eb(0x111)](JSON['stringify'](_0x3a3ea7,null,0x2)):console[_0xb791eb(0x111)](_0x3a3ea7);}export async function configList(_0x549386){const _0x4abeca=_0x620c5,_0x8e7813={'ddMPI':function(_0x5aafcc,_0x3d4fcf){return _0x5aafcc(_0x3d4fcf);},'WDrKt':function(_0x175d83,_0x105953){return _0x175d83(_0x105953);},'HHyHP':function(_0xc6dac9,_0x841488){return _0xc6dac9(_0x841488);}},_0x85beef=await resolveProfileTarget(_0x549386);if(_0x85beef['kind']==='cloud'){const _0x28df39=await _0x8e7813[_0x4abeca(0x109)](loadEffectiveCloudSettings,_0x549386);if(!_0x28df39||Object[_0x4abeca(0x108)](_0x28df39)['length']===0x0){console['log'](_0x4abeca(0x10f)+_0x549386+'\x22');return;}console['log'](JSON['stringify'](_0x28df39,null,0x2));return;}const _0x528550=_0x8e7813[_0x4abeca(0x11b)](getSettingsPath,_0x549386);if(!_0x8e7813['WDrKt'](existsSync,_0x528550)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x549386+'\x22');return;}const _0x1337db=await _0x8e7813[_0x4abeca(0x11d)](loadSettings,_0x549386),_0x55f86f=formatSettings(_0x1337db);!_0x55f86f?console[_0x4abeca(0x111)](_0x4abeca(0x10f)+_0x549386+'\x22'):console[_0x4abeca(0x111)](_0x55f86f);}export async function configUnset(_0xbe02a4,_0x45801b){const _0x29c499=_0x620c5,_0x1c5f5c={'LcoAE':'cloud','tYfdY':function(_0x1e3675,_0x175076){return _0x1e3675(_0x175076);},'uaAnR':function(_0x1fd39f,_0x372806,_0xff52ba,_0x235ab8){return _0x1fd39f(_0x372806,_0xff52ba,_0x235ab8);},'akHGi':function(_0x52b782){return _0x52b782();},'dFUhV':function(_0x386221,_0x26b9c3,_0x336a98,_0x26ad89){return _0x386221(_0x26b9c3,_0x336a98,_0x26ad89);},'vEYRE':function(_0x3eea51,_0x24282f){return _0x3eea51(_0x24282f);}},_0x1c5732=await resolveProfileTarget(_0xbe02a4);if(_0x1c5732['kind']===_0x1c5f5c[_0x29c499(0x123)]){if(_0x1c5732['alsoExistsElsewhere'])_0x1c5f5c['tYfdY'](printDualExistsHint,_0xbe02a4);const _0x4b7f6a=_0x1c5f5c[_0x29c499(0xf8)](unsetProfileOverride,_0x1c5f5c['akHGi'](getProjectPath),_0xbe02a4,_0x45801b);_0x4b7f6a?console[_0x29c499(0x111)]('Removed\x20'+_0x45801b+'\x20for\x20\x22'+_0xbe02a4+'\x22'):console['log']('Key\x20\x22'+_0x45801b+_0x29c499(0x103));return;}const _0x208edd=_0x1c5f5c['dFUhV'](unsetProfileOverride,getProjectPath(),_0xbe02a4,_0x45801b);if(_0x208edd){console[_0x29c499(0x111)]('Removed\x20'+_0x45801b);return;}const _0x265f07=await _0x1c5f5c[_0x29c499(0xff)](loadSettings,_0xbe02a4),_0x4a185d=deleteNestedValue(_0x265f07,_0x45801b);_0x4a185d?console['log'](_0x29c499(0x100)+_0x45801b+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0xbe02a4+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x29c499(0x111)]('Key\x20\x22'+_0x45801b+'\x22\x20not\x20found');}export async function configReset(_0x59519a){const _0x3c1e=_0x620c5,_0x40b99f={'fUZld':function(_0x3471fc,_0x2b919d){return _0x3471fc(_0x2b919d);},'yVNOY':function(_0x284f6f,_0x416a1c){return _0x284f6f===_0x416a1c;}},_0x4d8c88=await _0x40b99f['fUZld'](resolveProfileTarget,_0x59519a);if(_0x40b99f[_0x3c1e(0x127)](_0x4d8c88['kind'],'cloud')){resetProfileOverrides(getProjectPath(),_0x59519a),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x59519a+'\x22');return;}console[_0x3c1e(0x111)]('\x22'+_0x59519a+_0x3c1e(0x11c)+_0x59519a+_0x3c1e(0x122));}
@@ -1 +1 @@
1
- (function(_0x203d4f,_0xb9b0f9){const _0x1ab393=_0x39a9,_0x52f87d=_0x203d4f();while(!![]){try{const _0x23a641=-parseInt(_0x1ab393(0x170))/0x1+parseInt(_0x1ab393(0x15f))/0x2*(parseInt(_0x1ab393(0x165))/0x3)+-parseInt(_0x1ab393(0x15e))/0x4*(parseInt(_0x1ab393(0x16e))/0x5)+parseInt(_0x1ab393(0x160))/0x6*(parseInt(_0x1ab393(0x161))/0x7)+-parseInt(_0x1ab393(0x171))/0x8*(parseInt(_0x1ab393(0x172))/0x9)+-parseInt(_0x1ab393(0x15c))/0xa*(parseInt(_0x1ab393(0x164))/0xb)+parseInt(_0x1ab393(0x15b))/0xc;if(_0x23a641===_0xb9b0f9)break;else _0x52f87d['push'](_0x52f87d['shift']());}catch(_0x17158c){_0x52f87d['push'](_0x52f87d['shift']());}}}(_0x57f7,0x924be));function _0x57f7(){const _0x55d4c4=['539572LuyfLY','17868yitgIJ','✓\x20Deleted\x20cloud\x20profile\x20\x22','Type\x20\x22','Cloud\x20profile\x20\x22','log','input','cwd','XOImR','\x22\x20not\x20found.','25YmVkTz','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','736542empsiW','5724632qklUXi','9epsdNO','dcbde','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','23962668kWIpsl','140pTojeB','BaUmr','535452WkRYsg','360tDqiPm','81222DWGJkD','175jTCGIH','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','confirmation'];_0x57f7=function(){return _0x55d4c4;};return _0x57f7();}import _0x462b85 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x39a9(_0x225ff5,_0x529f62){_0x225ff5=_0x225ff5-0x159;const _0x57f73c=_0x57f7();let _0x39a9a0=_0x57f73c[_0x225ff5];return _0x39a9a0;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x21d844,_0xff6274={}){const _0x20e173=_0x39a9,_0x56e061={'kVfeI':function(_0xcb55e5,_0x53a1f9){return _0xcb55e5(_0x53a1f9);},'XOImR':_0x20e173(0x15a),'dcbde':_0x20e173(0x16a),'BaUmr':function(_0x48f7e4,_0x2b4a29,_0x33fee7){return _0x48f7e4(_0x2b4a29,_0x33fee7);}},_0x2c5e0b=await _0x56e061['kVfeI'](fetchCloudProfile,_0x21d844);if(!_0x2c5e0b)throw new Error(_0x20e173(0x168)+_0x21d844+_0x20e173(0x16d));if(!_0xff6274['yes']&&!isInteractive())throw new Error(_0x56e061[_0x20e173(0x16c)]);console['log'](_0x20e173(0x162)+_0x21d844+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0xff6274['yes']){const {confirmation:_0x45d1df}=await _0x462b85['prompt']([{'type':_0x56e061[_0x20e173(0x159)],'name':_0x20e173(0x163),'message':_0x20e173(0x167)+_0x21d844+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x45d1df!==_0x21d844)throw new Error(_0x20e173(0x16f));}await _0x56e061['kVfeI'](deleteCloudProfile,_0x21d844),_0x56e061[_0x20e173(0x15d)](resetProfileOverrides,process[_0x20e173(0x16b)](),_0x21d844),clearLastProfile(process['cwd'](),_0x21d844),console[_0x20e173(0x169)](_0x20e173(0x166)+_0x21d844+'\x22.');}
1
+ (function(_0xe89603,_0x13c85f){const _0x571c41=_0x4122,_0x4d1f46=_0xe89603();while(!![]){try{const _0xf48ca4=-parseInt(_0x571c41(0x18f))/0x1+parseInt(_0x571c41(0x19e))/0x2*(-parseInt(_0x571c41(0x191))/0x3)+parseInt(_0x571c41(0x1a3))/0x4*(-parseInt(_0x571c41(0x19c))/0x5)+parseInt(_0x571c41(0x19a))/0x6+-parseInt(_0x571c41(0x196))/0x7*(-parseInt(_0x571c41(0x193))/0x8)+parseInt(_0x571c41(0x197))/0x9+parseInt(_0x571c41(0x19b))/0xa*(parseInt(_0x571c41(0x1a5))/0xb);if(_0xf48ca4===_0x13c85f)break;else _0x4d1f46['push'](_0x4d1f46['shift']());}catch(_0x5e3bc5){_0x4d1f46['push'](_0x4d1f46['shift']());}}}(_0x32bc,0x7778d));import _0x410736 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x32bc(){const _0x63a267=['259osPhLT','4540950eOSAUq','SXVcK','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','2608998gBBgUe','4873270nyxIkL','1629965QwHjDR','yes','2jILdRJ','\x22\x20for\x20everyone\x20in\x20your\x20organization.','Type\x20\x22','confirmation','Cloud\x20profile\x20\x22','4kvhIID','vMzQK','11eEmanR','187312Fhcgsc','\x22\x20not\x20found.','1334637JMvEuD','log','4504FXLmFn','cwd','prompt'];_0x32bc=function(){return _0x63a267;};return _0x32bc();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x4122(_0x45577e,_0x192dd4){_0x45577e=_0x45577e-0x18f;const _0x32bc78=_0x32bc();let _0x412224=_0x32bc78[_0x45577e];return _0x412224;}export async function deleteProfile(_0x371ae2,_0x5b081a={}){const _0x4de0bc=_0x4122,_0x57f20e={'XylkQ':function(_0x4f9888){return _0x4f9888();},'vMzQK':'input','SXVcK':function(_0x2db5cc,_0x1ab25e){return _0x2db5cc!==_0x1ab25e;},'TphSs':function(_0x23d47a,_0x3c8134,_0x3e8ebf){return _0x23d47a(_0x3c8134,_0x3e8ebf);}},_0x398c58=await fetchCloudProfile(_0x371ae2);if(!_0x398c58)throw new Error(_0x4de0bc(0x1a2)+_0x371ae2+_0x4de0bc(0x190));if(!_0x5b081a[_0x4de0bc(0x19d)]&&!_0x57f20e['XylkQ'](isInteractive))throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x371ae2+_0x4de0bc(0x19f));if(!_0x5b081a[_0x4de0bc(0x19d)]){const {confirmation:_0x5be819}=await _0x410736[_0x4de0bc(0x195)]([{'type':_0x57f20e[_0x4de0bc(0x1a4)],'name':_0x4de0bc(0x1a1),'message':_0x4de0bc(0x1a0)+_0x371ae2+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x57f20e[_0x4de0bc(0x198)](_0x5be819,_0x371ae2))throw new Error(_0x4de0bc(0x199));}await deleteCloudProfile(_0x371ae2),_0x57f20e['TphSs'](resetProfileOverrides,process['cwd'](),_0x371ae2),_0x57f20e['TphSs'](clearLastProfile,process[_0x4de0bc(0x194)](),_0x371ae2),console[_0x4de0bc(0x192)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x371ae2+'\x22.');}
@@ -1 +1 @@
1
- function _0x39cc(_0x162618,_0x15225a){_0x162618=_0x162618-0x10f;const _0x2295aa=_0x2295();let _0x39ccf6=_0x2295aa[_0x162618];return _0x39ccf6;}const _0x3b176e=_0x39cc;(function(_0x57ee4c,_0x474bab){const _0x13c5eb=_0x39cc,_0x21c2ec=_0x57ee4c();while(!![]){try{const _0x5576a7=parseInt(_0x13c5eb(0x147))/0x1*(-parseInt(_0x13c5eb(0x12f))/0x2)+parseInt(_0x13c5eb(0x13a))/0x3+-parseInt(_0x13c5eb(0x11e))/0x4*(parseInt(_0x13c5eb(0x135))/0x5)+parseInt(_0x13c5eb(0x13c))/0x6+parseInt(_0x13c5eb(0x116))/0x7+parseInt(_0x13c5eb(0x13b))/0x8*(parseInt(_0x13c5eb(0x126))/0x9)+-parseInt(_0x13c5eb(0x146))/0xa;if(_0x5576a7===_0x474bab)break;else _0x21c2ec['push'](_0x21c2ec['shift']());}catch(_0x2e419d){_0x21c2ec['push'](_0x21c2ec['shift']());}}}(_0x2295,0xcd3b7));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';function _0x2295(){const _0x24726a=['profiles','OlDLn','8726fnglbd','\x0a\x20\x20','GDfOc','keys','cached\x20(updated\x20','environmentKey','2629135SHJXYx','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','CBMyO','endsWith','sort','3652260NPMBxY','251192YXhKrP','5125512udMSYC','Run:\x20ranger\x20profile\x20add\x20<profile-name>','get','length','environmentDetails','includes','localeCompare','QudvO','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20URL:\x20','14699040qIUGSy','29zUQvpj','hSBnI','ZqOhW','map','qQqeL','has','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','DbtgT','baseUrlSource','all','name','gyyWM','GJyJw','isDirectory','\x0aCloud\x20Profiles:','WVBVN','HJMpy','legacy','4040589gDnUhp','log','.txt','set','authConfig','sessionUpdatedAt','\x22:\x20','message','4vebVQr','some','\x20\x20\x20\x20\x20\x20Details:\x20','cwd','ZhZmf','qVyso','baseUrl','local','90pxTcYR','PhzWi','jqTxW','bTsvl','push','lqezj','startsWith'];_0x2295=function(){return _0x24726a;};return _0x2295();}import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports',_0x3b176e(0x125),'ci'];export function shouldGroupByEnvironment(_0xd3a36f){const _0x10f939=_0x3b176e;return _0xd3a36f[_0x10f939(0x11f)](_0x1ce768=>_0x1ce768['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xa9050c){const _0x1581ce=_0x3b176e,_0x385e80={'aUGyH':function(_0x123d6b,_0x1b6065){return _0x123d6b===_0x1b6065;}},_0x1f75f4=new Map();for(const _0xe5aee8 of _0xa9050c){const _0x363fa7=_0xe5aee8[_0x1581ce(0x134)]??null,_0x438287=_0x1f75f4[_0x1581ce(0x13e)](_0x363fa7);if(_0x438287)_0x438287[_0x1581ce(0x12a)](_0xe5aee8);else _0x1f75f4['set'](_0x363fa7,[_0xe5aee8]);}const _0x434a6f=[..._0x1f75f4[_0x1581ce(0x132)]()][_0x1581ce(0x139)]((_0x5e124a,_0x4f99d3)=>{const _0x504034=_0x1581ce;if(_0x385e80['aUGyH'](_0x5e124a,null))return 0x1;if(_0x4f99d3===null)return-0x1;return _0x5e124a[_0x504034(0x142)](_0x4f99d3);});return _0x434a6f[_0x1581ce(0x14a)](_0x11dfa=>({'environmentKey':_0x11dfa,'profiles':_0x1f75f4[_0x1581ce(0x13e)](_0x11dfa)['sort']((_0x251e32,_0x307316)=>_0x251e32['name'][_0x1581ce(0x142)](_0x307316['name']))}));}function expandString(_0x45cb8d){const _0x26215f=_0x3b176e,_0x124bbd={'GDfOc':function(_0x36b79b,_0x11455d){return _0x36b79b(_0x11455d);}};if(!_0x45cb8d)return undefined;return _0x124bbd[_0x26215f(0x131)](resolveEnvVars,_0x45cb8d);}function expandProfileOverrides(_0x111bf3){const _0x1fc80e=_0x3b176e,_0x200c27={'QudvO':function(_0x22b3be,_0x1cb648){return _0x22b3be(_0x1cb648);}};if(!_0x111bf3)return null;return{..._0x111bf3,'baseUrl':expandString(_0x111bf3[_0x1fc80e(0x124)]),'startPath':_0x200c27[_0x1fc80e(0x143)](expandString,_0x111bf3['startPath'])};}export function resolveCloudProfileListUrl(_0x2dbe43,_0x1c6516={}){const _0x58e25b=_0x3b176e,_0x4ee4f9={'bTyFu':function(_0x3233a1,_0xa2b63e){return _0x3233a1(_0xa2b63e);},'ttpwo':function(_0x1b520d,_0x291d57){return _0x1b520d(_0x291d57);},'ujZEK':function(_0xd77fd8,_0x519077){return _0xd77fd8(_0x519077);}},_0x418fd5=_0x2dbe43['settings']??{},_0x105c44=_0x1c6516[_0x58e25b(0x11a)]?resolveAuthEnvironmentLocally(_0x1c6516['authConfig'],_0x2dbe43['environmentKey']):null,_0x500fd0=_0x4ee4f9['bTyFu'](resolveProfileUrl,{'projectOverrides':_0x4ee4f9['ttpwo'](expandProfileOverrides,_0x1c6516['projectOverrides']??null),'cloudSettings':{'baseUrl':_0x4ee4f9['ujZEK'](expandString,_0x418fd5[_0x58e25b(0x124)]),'startPath':expandString(_0x418fd5['startPath'])},'authEnvironmentDomain':_0x105c44?.['domains']?.[0x0]});return{'baseUrl':_0x500fd0[_0x58e25b(0x124)],'source':_0x500fd0[_0x58e25b(0x14f)]};}async function loadCloudProfileListUrls(_0x1ffaa6){const _0x418dca=_0x3b176e,_0x3fd970={'OlDLn':function(_0x44a323,_0x4a9bc4){return _0x44a323(_0x4a9bc4);},'lqezj':function(_0x3f5492,_0x259721,_0xc5f5e4){return _0x3f5492(_0x259721,_0xc5f5e4);},'LbDok':function(_0x2f0be5,_0xdf6b76,_0x498250){return _0x2f0be5(_0xdf6b76,_0x498250);},'PhzWi':function(_0x298e55,_0x33aa8b){return _0x298e55===_0x33aa8b;}},_0x2285cc=new Map();if(_0x3fd970[_0x418dca(0x127)](_0x1ffaa6['length'],0x0))return _0x2285cc;const _0x45a400=await fetchAuthConfig();return await Promise[_0x418dca(0x150)](_0x1ffaa6['map'](async _0x1479d0=>{const _0x405951=_0x418dca;try{const _0x528349=await _0x3fd970[_0x405951(0x12e)](fetchCloudProfile,_0x1479d0['name']);if(!_0x528349)return;_0x2285cc[_0x405951(0x119)](_0x1479d0[_0x405951(0x151)],_0x3fd970[_0x405951(0x12b)](resolveCloudProfileListUrl,_0x528349,{'authConfig':_0x45a400,'projectOverrides':_0x3fd970['LbDok'](readProfileOverrides,process['cwd'](),_0x1479d0['name'])}));}catch(_0x4d84ad){console['error'](_0x405951(0x136)+_0x1479d0['name']+_0x405951(0x11c)+(_0x4d84ad instanceof Error?_0x4d84ad[_0x405951(0x11d)]:String(_0x4d84ad)));}})),_0x2285cc;}export async function getEnvNames(){const _0x34ff0b=_0x3b176e,_0xedc8d9={'UpLqZ':_0x34ff0b(0x125),'HJMpy':function(_0x3a991b,_0x1b3ede){return _0x3a991b(_0x1b3ede);},'fogoM':function(_0x1ad873,_0x3010fb){return _0x1ad873(_0x3010fb);},'ZJSxa':function(_0x1dff7c,_0x2599d9,_0x23152c){return _0x1dff7c(_0x2599d9,_0x23152c);},'tDrYH':function(_0x26d1df,_0x34bf5c){return _0x26d1df(_0x34bf5c);},'bEMWp':function(_0x4568b8,_0x5ec8f0){return _0x4568b8(_0x5ec8f0);},'GJyJw':_0x34ff0b(0x118),'ZqOhW':function(_0x595973,_0x54095f,_0xba7de9){return _0x595973(_0x54095f,_0xba7de9);}},_0x3cba29=getRangerDir();if(!existsSync(_0x3cba29))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x15a12f=await readActiveProfileName(),_0x1ec509=[],_0x3f55d3={},_0x57f5c3=join(_0x3cba29,_0xedc8d9['UpLqZ']);if(existsSync(_0x57f5c3)){const _0x308b6b=await _0xedc8d9[_0x34ff0b(0x114)](readdir,_0x57f5c3);for(const _0x31cc50 of _0x308b6b){const _0x59a3ac=join(_0x57f5c3,_0x31cc50),_0x463d0b=await _0xedc8d9['fogoM'](stat,_0x59a3ac);_0x463d0b[_0x34ff0b(0x111)]()&&(_0x1ec509[_0x34ff0b(0x12a)](_0x31cc50),_0x3f55d3[_0x31cc50]=_0x34ff0b(0x125));}}const _0x4f3e03=_0xedc8d9['ZJSxa'](join,_0x3cba29,'ci');if(_0xedc8d9['tDrYH'](existsSync,_0x4f3e03)){const _0x1c53da=await _0xedc8d9['bEMWp'](readdir,_0x4f3e03);for(const _0x581aae of _0x1c53da){const _0x565794=join(_0x4f3e03,_0x581aae),_0x1f81e8=await _0xedc8d9['tDrYH'](stat,_0x565794);_0x1f81e8[_0x34ff0b(0x111)]()&&(_0x1ec509[_0x34ff0b(0x12a)](_0x581aae),_0x3f55d3[_0x581aae]='ci');}}const _0x5bcefc=await readdir(_0x3cba29);for(const _0x4b021b of _0x5bcefc){if(NON_ENV_DIRS['includes'](_0x4b021b))continue;if(_0x4b021b[_0x34ff0b(0x12c)]('.'))continue;if(_0x4b021b[_0x34ff0b(0x138)](_0xedc8d9[_0x34ff0b(0x110)]))continue;const _0x164d32=join(_0x3cba29,_0x4b021b),_0xd4cbf3=await stat(_0x164d32);_0xd4cbf3['isDirectory']()&&existsSync(_0xedc8d9[_0x34ff0b(0x149)](join,_0x164d32,'settings.json'))&&(!_0x1ec509[_0x34ff0b(0x141)](_0x4b021b)&&(_0x1ec509[_0x34ff0b(0x12a)](_0x4b021b),_0x3f55d3[_0x4b021b]='legacy'));}return{'envNames':_0x1ec509,'activeEnv':_0x15a12f,'envTypes':_0x3f55d3};}export async function envList(){const _0x4ca39f=_0x3b176e,_0xe7b2f9={'qQqeL':'no\x20session','bzcOI':function(_0x136551){return _0x136551();},'qVyso':function(_0x5a9cfa){return _0x5a9cfa();},'CBMyO':function(_0x4d3c78,_0x18d6db){return _0x4d3c78 instanceof _0x18d6db;},'ZhZmf':function(_0x843be7,_0x3c754c){return _0x843be7===_0x3c754c;},'fStkr':'\x0aNo\x20profiles\x20found.','OLEdz':_0x4ca39f(0x13d),'jqTxW':function(_0x49ee8f,_0x2fd329){return _0x49ee8f(_0x2fd329);},'VpfQw':function(_0x57bcce,_0x9be456){return _0x57bcce(_0x9be456);},'gyyWM':function(_0x5a5898,_0x4092aa,_0x27da01){return _0x5a5898(_0x4092aa,_0x27da01);},'fofnI':function(_0x439955,_0x42c05d){return _0x439955===_0x42c05d;},'FanZh':function(_0x4d64ed,_0x3327a5){return _0x4d64ed>_0x3327a5;},'vDElX':function(_0xd36163,_0x393d53){return _0xd36163(_0x393d53);},'hSBnI':function(_0x3d37e3,_0xa9cc87){return _0x3d37e3(_0xa9cc87);},'bTsvl':_0x4ca39f(0x14d),'DbtgT':function(_0x1dc20b,_0x2b6528,_0x54c683){return _0x1dc20b(_0x2b6528,_0x54c683);},'qyPCK':'\x20\x20\x20\x20','WVBVN':_0x4ca39f(0x112)},{envNames:_0x32415a,activeEnv:_0x27e231,envTypes:_0x1cd532}=await getEnvNames();let _0x4541a2=[],_0x1ddd4e=new Map();const _0x210d1f=await _0xe7b2f9['bzcOI'](getToken);if(_0x210d1f)try{_0x4541a2=await _0xe7b2f9[_0x4ca39f(0x123)](listCloudProfiles),_0x1ddd4e=await loadCloudProfileListUrls(_0x4541a2);}catch(_0x40b464){console['error'](_0x4ca39f(0x144)+(_0xe7b2f9[_0x4ca39f(0x137)](_0x40b464,Error)?_0x40b464['message']:String(_0x40b464)));}if(_0x32415a[_0x4ca39f(0x13f)]===0x0&&_0xe7b2f9['ZhZmf'](_0x4541a2['length'],0x0)){console['log'](_0xe7b2f9['fStkr']),console[_0x4ca39f(0x117)](_0xe7b2f9['OLEdz']);return;}const _0x2aed63=new Set(_0x4541a2['map'](_0x331169=>_0x331169[_0x4ca39f(0x151)]));if(_0x32415a[_0x4ca39f(0x13f)]>0x0){console[_0x4ca39f(0x117)]('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x55e9af of _0x32415a[_0x4ca39f(0x139)]()){const _0x1ae10e=_0xe7b2f9[_0x4ca39f(0x122)](_0x55e9af,_0x27e231)&&!_0x2aed63[_0x4ca39f(0x14c)](_0x55e9af),_0x8d85f4=_0x1cd532[_0x55e9af]||_0x4ca39f(0x125),_0x1df4fa=await _0xe7b2f9[_0x4ca39f(0x128)](loadSettings,_0x55e9af),_0x2a8757=_0xe7b2f9['VpfQw'](resolveProfileUrl,{'localSettingsBaseUrl':expandString(_0x1df4fa['baseUrl']),'projectOverrides':expandProfileOverrides(_0xe7b2f9[_0x4ca39f(0x10f)](readProfileOverrides,process[_0x4ca39f(0x121)](),_0x55e9af))}),_0x2e1a63=_0xe7b2f9['fofnI'](_0x8d85f4,_0x4ca39f(0x115))?'':'\x20['+_0x8d85f4+']';console[_0x4ca39f(0x117)]('\x20\x20'+(_0x1ae10e?'*\x20':'\x20\x20')+_0x55e9af+_0x2e1a63),_0x2a8757['baseUrl']&&console['log'](_0x4ca39f(0x145)+_0x2a8757[_0x4ca39f(0x124)]),_0x1df4fa[_0x4ca39f(0x140)]&&console['log'](_0x4ca39f(0x120)+_0x1df4fa['environmentDetails']);}}const _0x143e45=(_0x4e8b7d,_0x2e1baa)=>{const _0x41c128=_0x4ca39f,_0x3f2150=_0x4e8b7d['name']===_0x27e231,_0xdb6a61=_0x4e8b7d[_0x41c128(0x11b)]?_0x41c128(0x133)+_0x4e8b7d[_0x41c128(0x11b)]+')':_0xe7b2f9[_0x41c128(0x14b)],_0x42f6f0=_0x1ddd4e[_0x41c128(0x13e)](_0x4e8b7d['name']);console[_0x41c128(0x117)](''+_0x2e1baa+(_0x3f2150?'*\x20':'\x20\x20')+_0x4e8b7d[_0x41c128(0x151)]),_0x42f6f0?.[_0x41c128(0x124)]&&console['log'](_0x2e1baa+'\x20\x20\x20\x20URL:\x20'+_0x42f6f0[_0x41c128(0x124)]),console[_0x41c128(0x117)](_0x2e1baa+'\x20\x20\x20\x20Session:\x20'+_0xdb6a61);};if(_0xe7b2f9['FanZh'](_0x4541a2['length'],0x0)){if(_0xe7b2f9['vDElX'](shouldGroupByEnvironment,_0x4541a2)){console['log']('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x3e04af of _0xe7b2f9[_0x4ca39f(0x148)](groupCloudProfilesByEnvironment,_0x4541a2)){const _0x30f3cc=_0x3e04af['environmentKey']??_0xe7b2f9[_0x4ca39f(0x129)];console['log'](_0x4ca39f(0x130)+_0x30f3cc);for(const _0x139029 of _0x3e04af[_0x4ca39f(0x12d)]){_0xe7b2f9[_0x4ca39f(0x14e)](_0x143e45,_0x139029,_0xe7b2f9['qyPCK']);}}}else{console['log'](_0xe7b2f9[_0x4ca39f(0x113)]);for(const _0x58569d of[..._0x4541a2]['sort']((_0x4125d0,_0x3c9198)=>_0x4125d0['name'][_0x4ca39f(0x142)](_0x3c9198[_0x4ca39f(0x151)]))){_0x143e45(_0x58569d,'\x20\x20');}}}_0x27e231&&console['log']('\x0a*\x20=\x20active\x20profile');}
1
+ (function(_0x146f45,_0xc47d9){const _0xce5b56=_0xe91e,_0x47bd32=_0x146f45();while(!![]){try{const _0x20b4d0=-parseInt(_0xce5b56(0xa5))/0x1+parseInt(_0xce5b56(0x7b))/0x2*(parseInt(_0xce5b56(0x81))/0x3)+parseInt(_0xce5b56(0x9e))/0x4+parseInt(_0xce5b56(0x9a))/0x5+-parseInt(_0xce5b56(0x76))/0x6*(parseInt(_0xce5b56(0x89))/0x7)+parseInt(_0xce5b56(0x91))/0x8*(-parseInt(_0xce5b56(0x80))/0x9)+parseInt(_0xce5b56(0x92))/0xa;if(_0x20b4d0===_0xc47d9)break;else _0x47bd32['push'](_0x47bd32['shift']());}catch(_0x1a4ab9){_0x47bd32['push'](_0x47bd32['shift']());}}}(_0x4475,0x536d0));function _0xe91e(_0x54f83a,_0x2e2cd3){_0x54f83a=_0x54f83a-0x75;const _0x447582=_0x4475();let _0xe91ea5=_0x447582[_0x54f83a];return _0xe91ea5;}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports','local','ci'];export function shouldGroupByEnvironment(_0xf1d224){return _0xf1d224['some'](_0x4fcf47=>_0x4fcf47['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x8c1180){const _0x5160b7=_0xe91e,_0x1f2307=new Map();for(const _0x5f6e19 of _0x8c1180){const _0x51bd36=_0x5f6e19[_0x5160b7(0x7c)]??null,_0x4c4ab3=_0x1f2307['get'](_0x51bd36);if(_0x4c4ab3)_0x4c4ab3[_0x5160b7(0x88)](_0x5f6e19);else _0x1f2307[_0x5160b7(0x8c)](_0x51bd36,[_0x5f6e19]);}const _0x221b09=[..._0x1f2307['keys']()][_0x5160b7(0xae)]((_0xf591e5,_0x417efe)=>{const _0x3efa18=_0x5160b7;if(_0xf591e5===null)return 0x1;if(_0x417efe===null)return-0x1;return _0xf591e5[_0x3efa18(0x75)](_0x417efe);});return _0x221b09['map'](_0x5e0b44=>({'environmentKey':_0x5e0b44,'profiles':_0x1f2307['get'](_0x5e0b44)[_0x5160b7(0xae)]((_0x4296cd,_0x1e6cd3)=>_0x4296cd[_0x5160b7(0x78)]['localeCompare'](_0x1e6cd3['name']))}));}function expandString(_0x440486){const _0x2d0ea5=_0xe91e,_0x537823={'iKuER':function(_0x5bc827,_0x460637){return _0x5bc827(_0x460637);}};if(!_0x440486)return undefined;return _0x537823[_0x2d0ea5(0x83)](resolveEnvVars,_0x440486);}function _0x4475(){const _0x2b8ab7=['\x20\x20\x20\x20','projectOverrides','no\x20session','includes','kdrEy','sort','isDirectory','hTpKj','\x20\x20\x20\x20URL:\x20','\x20\x20\x20\x20\x20\x20URL:\x20','environmentDetails','localeCompare','48JEXdjU','Run:\x20ranger\x20profile\x20add\x20<profile-name>','name','TvYss','\x22:\x20','22yhdMpt','environmentKey','ecZSA','SvBkZ','hNhhn','259317shXGFB','29481BhXRud','has','iKuER','juSim','map','baseUrl','ETamS','push','538370iJGxWN','LRuZe','neXrX','set','error','cached\x20(updated\x20','sessionUpdatedAt','rjDgv','112DCejFt','15648680fveMOD','cwd','UplxV','ocQjn','huEOc','\x0aCloud\x20Profiles:','UQSBC','\x0aCloud\x20Profiles\x20(by\x20environment):','992240XGJUIH','legacy','\x0aNo\x20profiles\x20found.','message','435308QocUFg','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','BTNtW','AwcyV','log','uusDI','JUoal','619866YLBboG','nChxw','length','ydcEG'];_0x4475=function(){return _0x2b8ab7;};return _0x4475();}function expandProfileOverrides(_0x2337c9){const _0x57bcff=_0xe91e,_0x2364f8={'hTpKj':function(_0x15353f,_0x323cc5){return _0x15353f(_0x323cc5);}};if(!_0x2337c9)return null;return{..._0x2337c9,'baseUrl':expandString(_0x2337c9['baseUrl']),'startPath':_0x2364f8[_0x57bcff(0xb0)](expandString,_0x2337c9['startPath'])};}export function resolveCloudProfileListUrl(_0x285696,_0x23f97f={}){const _0x27ce41=_0xe91e,_0xbd20d9={'nChxw':function(_0x4a914b,_0x1dbff1,_0x1bf971){return _0x4a914b(_0x1dbff1,_0x1bf971);},'mOVxV':function(_0x267b47,_0x9c92b0){return _0x267b47(_0x9c92b0);},'gwKib':function(_0x38b17a,_0x76254a){return _0x38b17a(_0x76254a);}},_0x14c312=_0x285696['settings']??{},_0x4dc8ae=_0x23f97f['authConfig']?_0xbd20d9[_0x27ce41(0xa6)](resolveAuthEnvironmentLocally,_0x23f97f['authConfig'],_0x285696['environmentKey']):null,_0x1b51c7=_0xbd20d9['mOVxV'](resolveProfileUrl,{'projectOverrides':expandProfileOverrides(_0x23f97f[_0x27ce41(0xaa)]??null),'cloudSettings':{'baseUrl':expandString(_0x14c312[_0x27ce41(0x86)]),'startPath':_0xbd20d9['gwKib'](expandString,_0x14c312['startPath'])},'authEnvironmentDomain':_0x4dc8ae?.['domains']?.[0x0]});return{'baseUrl':_0x1b51c7[_0x27ce41(0x86)],'source':_0x1b51c7['baseUrlSource']};}async function loadCloudProfileListUrls(_0x540da9){const _0x2757f9=_0xe91e,_0xd4ab84={'UplxV':function(_0x290ffa,_0x10e03b){return _0x290ffa instanceof _0x10e03b;},'BTNtW':function(_0x18f604,_0x1e24dc){return _0x18f604(_0x1e24dc);},'SvBkZ':function(_0x59e8b8,_0x292bba){return _0x59e8b8===_0x292bba;}},_0x5cef1e=new Map();if(_0xd4ab84[_0x2757f9(0x7e)](_0x540da9['length'],0x0))return _0x5cef1e;const _0x784f38=await fetchAuthConfig();return await Promise['all'](_0x540da9[_0x2757f9(0x85)](async _0x3ddbd9=>{const _0x2344e0=_0x2757f9;try{const _0x42440d=await fetchCloudProfile(_0x3ddbd9[_0x2344e0(0x78)]);if(!_0x42440d)return;_0x5cef1e['set'](_0x3ddbd9['name'],resolveCloudProfileListUrl(_0x42440d,{'authConfig':_0x784f38,'projectOverrides':readProfileOverrides(process['cwd'](),_0x3ddbd9['name'])}));}catch(_0x279041){console[_0x2344e0(0x8d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22'+_0x3ddbd9[_0x2344e0(0x78)]+_0x2344e0(0x7a)+(_0xd4ab84[_0x2344e0(0x94)](_0x279041,Error)?_0x279041['message']:_0xd4ab84[_0x2344e0(0xa0)](String,_0x279041)));}})),_0x5cef1e;}export async function getEnvNames(){const _0x2faed5=_0xe91e,_0x2665eb={'vSjsC':function(_0x353748,_0x28bf1a){return _0x353748(_0x28bf1a);},'juSim':function(_0x127eb2,_0x31aec5){return _0x127eb2(_0x31aec5);},'AwcyV':'local','VPnwg':function(_0xc5a361,_0x2184ac){return _0xc5a361(_0x2184ac);},'TvYss':function(_0x438e2b,_0x2bcd45,_0x27082c){return _0x438e2b(_0x2bcd45,_0x27082c);},'TIRAI':function(_0x103789,_0x30eb75){return _0x103789(_0x30eb75);},'GexCK':'.txt','HkArT':function(_0x1a83d5,_0x36779b,_0x252f0a){return _0x1a83d5(_0x36779b,_0x252f0a);},'ocQjn':function(_0x482da5,_0x569257){return _0x482da5(_0x569257);},'rjDgv':'legacy'},_0x4e3298=getRangerDir();if(!_0x2665eb['vSjsC'](existsSync,_0x4e3298))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4eff68=await readActiveProfileName(),_0x156109=[],_0x1cc691={},_0x53719b=join(_0x4e3298,'local');if(existsSync(_0x53719b)){const _0x428337=await readdir(_0x53719b);for(const _0xe42057 of _0x428337){const _0x19cfa4=join(_0x53719b,_0xe42057),_0xac64b9=await _0x2665eb[_0x2faed5(0x84)](stat,_0x19cfa4);_0xac64b9['isDirectory']()&&(_0x156109['push'](_0xe42057),_0x1cc691[_0xe42057]=_0x2665eb[_0x2faed5(0xa1)]);}}const _0x3d0bfa=join(_0x4e3298,'ci');if(existsSync(_0x3d0bfa)){const _0x1248b1=await _0x2665eb['VPnwg'](readdir,_0x3d0bfa);for(const _0x28b953 of _0x1248b1){const _0x5af09d=_0x2665eb[_0x2faed5(0x79)](join,_0x3d0bfa,_0x28b953),_0x402049=await _0x2665eb['TIRAI'](stat,_0x5af09d);_0x402049[_0x2faed5(0xaf)]()&&(_0x156109[_0x2faed5(0x88)](_0x28b953),_0x1cc691[_0x28b953]='ci');}}const _0x1695ac=await _0x2665eb['VPnwg'](readdir,_0x4e3298);for(const _0x419e19 of _0x1695ac){if(NON_ENV_DIRS[_0x2faed5(0xac)](_0x419e19))continue;if(_0x419e19['startsWith']('.'))continue;if(_0x419e19['endsWith'](_0x2665eb['GexCK']))continue;const _0x26bd47=_0x2665eb['HkArT'](join,_0x4e3298,_0x419e19),_0x3073ae=await stat(_0x26bd47);_0x3073ae[_0x2faed5(0xaf)]()&&_0x2665eb[_0x2faed5(0x95)](existsSync,_0x2665eb[_0x2faed5(0x79)](join,_0x26bd47,'settings.json'))&&(!_0x156109['includes'](_0x419e19)&&(_0x156109[_0x2faed5(0x88)](_0x419e19),_0x1cc691[_0x419e19]=_0x2665eb[_0x2faed5(0x90)]));}return{'envNames':_0x156109,'activeEnv':_0x4eff68,'envTypes':_0x1cc691};}export async function envList(){const _0x267f45=_0xe91e,_0x22ee4d={'paqLW':function(_0x5a9ca3,_0xb925f2){return _0x5a9ca3===_0xb925f2;},'UQSBC':function(_0x419648){return _0x419648();},'LRuZe':function(_0x1f50d5){return _0x1f50d5();},'hNhhn':function(_0x2f0052){return _0x2f0052();},'neXrX':function(_0x292539,_0x27320e){return _0x292539(_0x27320e);},'KNYjS':function(_0x16c84e,_0x59a041){return _0x16c84e instanceof _0x59a041;},'ydcEG':_0x267f45(0x9c),'bVrjL':_0x267f45(0x77),'uusDI':function(_0x44b2ee,_0x2eebd4){return _0x44b2ee>_0x2eebd4;},'fQcRF':'\x0aLocal\x20Profiles\x20(legacy):','huEOc':_0x267f45(0x9b),'kdrEy':function(_0x1d340d,_0x1de9cb){return _0x1d340d(_0x1de9cb);},'ecZSA':_0x267f45(0x99),'ETamS':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','cdjsz':function(_0x492c33,_0xcd0199,_0x3467d6){return _0x492c33(_0xcd0199,_0x3467d6);},'JUoal':_0x267f45(0xa9),'IxmzV':_0x267f45(0x97)},{envNames:_0x4fa202,activeEnv:_0x14bcfb,envTypes:_0x3078ff}=await _0x22ee4d[_0x267f45(0x98)](getEnvNames);let _0xa80edd=[],_0x29b69c=new Map();const _0x168ce8=await _0x22ee4d[_0x267f45(0x8a)](getToken);if(_0x168ce8)try{_0xa80edd=await _0x22ee4d[_0x267f45(0x7f)](listCloudProfiles),_0x29b69c=await _0x22ee4d[_0x267f45(0x8b)](loadCloudProfileListUrls,_0xa80edd);}catch(_0xf00617){console[_0x267f45(0x8d)](_0x267f45(0x9f)+(_0x22ee4d['KNYjS'](_0xf00617,Error)?_0xf00617[_0x267f45(0x9d)]:_0x22ee4d['neXrX'](String,_0xf00617)));}if(_0x4fa202[_0x267f45(0xa7)]===0x0&&_0x22ee4d['paqLW'](_0xa80edd[_0x267f45(0xa7)],0x0)){console['log'](_0x22ee4d[_0x267f45(0xa8)]),console['log'](_0x22ee4d['bVrjL']);return;}const _0x518060=new Set(_0xa80edd[_0x267f45(0x85)](_0x3dde8d=>_0x3dde8d[_0x267f45(0x78)]));if(_0x22ee4d[_0x267f45(0xa3)](_0x4fa202['length'],0x0)){console[_0x267f45(0xa2)](_0x22ee4d['fQcRF']);for(const _0x53512a of _0x4fa202['sort']()){const _0x166909=_0x53512a===_0x14bcfb&&!_0x518060[_0x267f45(0x82)](_0x53512a),_0x2d93cc=_0x3078ff[_0x53512a]||'local',_0x3bca55=await _0x22ee4d['neXrX'](loadSettings,_0x53512a),_0x8547b3=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x3bca55['baseUrl']),'projectOverrides':expandProfileOverrides(readProfileOverrides(process[_0x267f45(0x93)](),_0x53512a))}),_0x3c0fa3=_0x2d93cc===_0x22ee4d[_0x267f45(0x96)]?'':'\x20['+_0x2d93cc+']';console[_0x267f45(0xa2)]('\x20\x20'+(_0x166909?'*\x20':'\x20\x20')+_0x53512a+_0x3c0fa3),_0x8547b3[_0x267f45(0x86)]&&console[_0x267f45(0xa2)](_0x267f45(0xb2)+_0x8547b3[_0x267f45(0x86)]),_0x3bca55['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x3bca55[_0x267f45(0xb3)]);}}const _0x1343e3=(_0x411bd6,_0x39133a)=>{const _0x53d4b7=_0x267f45,_0x226ae9=_0x22ee4d['paqLW'](_0x411bd6[_0x53d4b7(0x78)],_0x14bcfb),_0x23d227=_0x411bd6[_0x53d4b7(0x8f)]?_0x53d4b7(0x8e)+_0x411bd6[_0x53d4b7(0x8f)]+')':_0x53d4b7(0xab),_0x41b69f=_0x29b69c['get'](_0x411bd6['name']);console[_0x53d4b7(0xa2)](''+_0x39133a+(_0x226ae9?'*\x20':'\x20\x20')+_0x411bd6['name']),_0x41b69f?.['baseUrl']&&console[_0x53d4b7(0xa2)](_0x39133a+_0x53d4b7(0xb1)+_0x41b69f[_0x53d4b7(0x86)]),console[_0x53d4b7(0xa2)](_0x39133a+'\x20\x20\x20\x20Session:\x20'+_0x23d227);};if(_0xa80edd[_0x267f45(0xa7)]>0x0){if(_0x22ee4d[_0x267f45(0xad)](shouldGroupByEnvironment,_0xa80edd)){console[_0x267f45(0xa2)](_0x22ee4d[_0x267f45(0x7d)]);for(const _0x98d58a of _0x22ee4d[_0x267f45(0xad)](groupCloudProfilesByEnvironment,_0xa80edd)){const _0x1cdb7d=_0x98d58a['environmentKey']??_0x22ee4d[_0x267f45(0x87)];console[_0x267f45(0xa2)]('\x0a\x20\x20'+_0x1cdb7d);for(const _0x3f1a28 of _0x98d58a['profiles']){_0x22ee4d['cdjsz'](_0x1343e3,_0x3f1a28,_0x22ee4d[_0x267f45(0xa4)]);}}}else{console['log'](_0x22ee4d['IxmzV']);for(const _0x239980 of[..._0xa80edd]['sort']((_0x551e18,_0xe9b109)=>_0x551e18[_0x267f45(0x78)]['localeCompare'](_0xe9b109[_0x267f45(0x78)]))){_0x22ee4d['cdjsz'](_0x1343e3,_0x239980,'\x20\x20');}}}_0x14bcfb&&console['log']('\x0a*\x20=\x20active\x20profile');}