@ranger-testing/ranger-cli 3.1.5-alpha.9b89f77-48 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +5 -3
@@ -1 +1 @@
1
- (function(_0x3b8dff,_0x1a26aa){const _0x19c635=_0x2117,_0xcd6d7d=_0x3b8dff();while(!![]){try{const _0x3e3145=parseInt(_0x19c635(0x1dc))/0x1+parseInt(_0x19c635(0x223))/0x2+parseInt(_0x19c635(0x1fc))/0x3*(parseInt(_0x19c635(0x24f))/0x4)+parseInt(_0x19c635(0x1e4))/0x5+-parseInt(_0x19c635(0x20e))/0x6*(-parseInt(_0x19c635(0x244))/0x7)+parseInt(_0x19c635(0x22a))/0x8+-parseInt(_0x19c635(0x245))/0x9;if(_0x3e3145===_0x1a26aa)break;else _0xcd6d7d['push'](_0xcd6d7d['shift']());}catch(_0x4752f6){_0xcd6d7d['push'](_0xcd6d7d['shift']());}}}(_0x3693,0xcda10));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x568d0f from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x3693(){const _0x21c54e=['\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','bsOJX','\x27\x20created\x20(no\x20session).\x0a','rEudU','dgjkQ','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','isElectron','status','ePMSp','yCkNK','\x22\x20not\x20found.','user_declined','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x27\x20to\x20the\x20cloud?','49xcdwZQ','49282587gYLLai','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','origin','no_match','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','log','ZcNvO','3656388NkVhVX','action','use_suggestion','✓\x20Cloud\x20profile\x20\x27','MjteK','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','fgpwB','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x22:\x20','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','\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','\x20\x20Did\x20you\x20mean\x20','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','JDYXl','\x0a✓\x20Profile\x20\x27','no_auth_config','cFXqs','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','UZEvD','cwd','trim','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','keys','\x0a\x20\x20(domains:\x20','693502vfWPJG','\x20Configured\x20envs:\x20','join','nmYdA','force','message','rxYxf','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','7064745APxhdI','env','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','trackPhaseEnd','`\x20again\x20without\x20--skip-auth.','skipAuth','environments','http://localhost:3000','continue','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','isTTY','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','profile.add.autoRouteSkipped','KzFmv','VoWgP','confirm','WeKrn','baseUrl','xtsZQ','prompt','setupHeaders','\x0a\x20\x20Auth\x20environment\x20\x22','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','cdpEndpoint','3xOLmDT','authEnv','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','mFPah','EjNnD','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','includes','test','KJHxK','MkOjr','zHENm','olZPi','error','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','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','XfRaa','\x20\x20https://docs.ranger.net/main/concepts/profiles','1386654qIpKVU','dUkVh','PULJl','NODE_TLS_REJECT_UNAUTHORIZED','Invalid\x20--setup-header\x20format:\x20\x22','slice','local','MoARr','setupHeader','exit','\x20--skip-auth\x0a','xZuQi','XCcFM','tKmfm','KBaEi','zJoOi','Continue\x20anyway','some','\x27\x20created\x20(CDP).','.tmp-','✓\x20Profile\x20\x27','753762xcrJtQ','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','snLqp','\x0a🌐\x20Profile\x20Setup\x0a','tfKhZ','jAZHC','HEAD','10423256GqitrI','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','url','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','indexOf','ScMBN','Hvpmu','rRklC','signal','yes','length','McFMc'];_0x3693=function(){return _0x21c54e;};return _0x3693();}import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x167942=_0x2117;if(!process['stdout'][_0x167942(0x1ee)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x10d111){const _0x225e7f=_0x2117,_0x5e421b={'snLqp':'Invalid\x20URL','rxYxf':function(_0x1588aa,_0x9e2804){return _0x1588aa===_0x9e2804;},'HjzoF':'TypeError','PULJl':'fetch\x20failed'};try{const _0x5375dc=new AbortController(),_0x358c16=setTimeout(()=>_0x5375dc['abort'](),0x1388),_0x59abe2={'method':_0x225e7f(0x229),'signal':_0x5375dc[_0x225e7f(0x232)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x225e7f(0x203)](_0x10d111)&&(process['env'][_0x225e7f(0x211)]='0');const _0x24381c=await fetch(_0x10d111,_0x59abe2);delete process[_0x225e7f(0x1e5)][_0x225e7f(0x211)],clearTimeout(_0x358c16);if(_0x24381c[_0x225e7f(0x23d)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x24381c['status']};}catch(_0x169d89){delete process[_0x225e7f(0x1e5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xd3b768=_0x169d89,_0x1249b9=_0xd3b768[_0x225e7f(0x1e1)]||String(_0x169d89),_0x5e51ac=_0x1249b9[_0x225e7f(0x202)](_0x5e421b[_0x225e7f(0x225)])||_0x5e421b[_0x225e7f(0x1e2)](_0xd3b768['name'],_0x5e421b['HjzoF'])||_0x1249b9['includes'](_0x5e421b[_0x225e7f(0x210)]);return{'ok':![],'error':_0x1249b9,'isProtocolError':_0x5e51ac};}}async function sweepOrphanLocalProfile(_0x158d55,_0x1ec358,_0x1bb0a2){const _0x2dbe21=_0x2117,_0x22819c={'EjNnD':_0x2dbe21(0x214),'CPDoq':function(_0x279aba,_0xe35124){return _0x279aba(_0xe35124);},'zYHRv':function(_0x4f527d,_0x265e68,_0x2c2239){return _0x4f527d(_0x265e68,_0x2c2239);},'TnPGV':function(_0x30a2f1,_0x4481a6,_0x313b2b){return _0x30a2f1(_0x4481a6,_0x313b2b);}},_0x214be8=join(_0x1ec358,_0x22819c[_0x2dbe21(0x200)]),_0x3fc764=join(_0x214be8,_0x158d55);existsSync(_0x3fc764)&&(_0x1bb0a2&&await _0x22819c['CPDoq'](isPathGitTracked,_0x3fc764)?console[_0x2dbe21(0x24d)](_0x2dbe21(0x1d5)+_0x3fc764+_0x2dbe21(0x1ef)):(await _0x22819c['zYHRv'](rm,_0x3fc764,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3fc764)));if(existsSync(_0x214be8)){let _0x1f04bd=[];try{_0x1f04bd=await readdir(_0x214be8);}catch{return;}const _0x58e907=_0x2dbe21(0x221)+_0x158d55+'-';for(const _0x111847 of _0x1f04bd){if(!_0x111847['startsWith'](_0x58e907))continue;const _0x59bd69=join(_0x214be8,_0x111847);await _0x22819c['TnPGV'](rm,_0x59bd69,{'recursive':!![],'force':!![]}),console[_0x2dbe21(0x24d)](_0x2dbe21(0x1d9)+_0x59bd69);}}}async function sweepOrphansBestEffort(_0x1da19c){const _0x42dc14=_0x2117,_0x371789={'szDcY':function(_0x4b72ee,_0xcc3b48,_0x5e45ad,_0x222c3d){return _0x4b72ee(_0xcc3b48,_0x5e45ad,_0x222c3d);},'JQXeb':function(_0x45be7e){return _0x45be7e();}};try{await _0x371789['szDcY'](sweepOrphanLocalProfile,_0x1da19c,getRangerHomeDir(),![]);const _0x24b478=_0x371789['JQXeb'](getRangerDir);_0x24b478!==_0x371789['JQXeb'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x1da19c,_0x24b478,!![]);}catch(_0x227cbd){console[_0x42dc14(0x24d)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x227cbd instanceof Error?_0x227cbd[_0x42dc14(0x1e1)]:String(_0x227cbd))+').');}}async function markActive(_0x4b3c7c){const _0x2df5e4=_0x2117,_0x2d47fd={'UZEvD':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x4b3c7c),console[_0x2df5e4(0x24d)]('\x20\x20Set\x20active\x20profile:\x20'+_0x4b3c7c);}catch{console['log'](_0x2d47fd[_0x2df5e4(0x1d6)]);}}async function tryAutoRouteCloudProfile(_0x3707b8,_0x5c6a28,_0x2e7d61,_0x132e08,_0x430949){const _0x1edaba=_0x2117,_0x5e3257={'MjteK':function(_0x99a389,_0x1af2d4){return _0x99a389===_0x1af2d4;},'pvljN':function(_0x2a098f){return _0x2a098f();},'ZkAVG':'profile.add.autoRouteSkipped','GTUCM':function(_0x32ae9f,_0xb33828){return _0x32ae9f instanceof _0xb33828;},'rRklC':function(_0x367e4c,_0xba673c){return _0x367e4c(_0xba673c);},'KHlvE':function(_0x1051d8,_0x584ff7){return _0x1051d8+_0x584ff7;},'HHysF':function(_0x49faea,_0x171af9){return _0x49faea+_0x171af9;},'rycdX':_0x1edaba(0x259),'XCcFM':_0x1edaba(0x224),'ePMSp':'env_not_found','KzFmv':function(_0x5c2a53,_0x421552){return _0x5c2a53+_0x421552;},'zHENm':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','jAZHC':function(_0xf38d8,_0x4256f6,_0x277202){return _0xf38d8(_0x4256f6,_0x277202);},'ZWjak':_0x1edaba(0x1f3),'MkOjr':'saveToCloud','FTMJr':_0x1edaba(0x241),'xZuQi':_0x1edaba(0x254),'XfRaa':function(_0x960222,_0x2945f9,_0x4ff0e9,_0x322fd3){return _0x960222(_0x2945f9,_0x4ff0e9,_0x322fd3);},'dgjkQ':function(_0x477216,_0x37e269){return _0x477216===_0x37e269;},'KJHxK':'profile.add.autoRouted'};let _0x4d3aa7;try{_0x4d3aa7=await _0x5e3257['pvljN'](fetchAuthConfig);}catch(_0xa7703e){return _0x430949?.[_0x1edaba(0x1e7)](_0x5e3257['ZkAVG'],{'reason':_0x1edaba(0x25e),'profileName':_0x3707b8}),console[_0x1edaba(0x208)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5e3257['GTUCM'](_0xa7703e,Error)?_0xa7703e[_0x1edaba(0x1e1)]:_0x5e3257[_0x1edaba(0x231)](String,_0xa7703e))),![];}if((!_0x4d3aa7||!_0x4d3aa7[_0x1edaba(0x1ea)]||Object[_0x1edaba(0x1da)](_0x4d3aa7['environments'])[_0x1edaba(0x234)]===0x0)&&!_0x2e7d61[_0x1edaba(0x1fd)]){if(_0x132e08)return await captureEnvLessProfile(_0x3707b8,_0x5c6a28,_0x2e7d61,_0x430949);return _0x430949?.[_0x1edaba(0x1e7)](_0x5e3257['ZkAVG'],{'reason':'no_auth_config','profileName':_0x3707b8}),console[_0x1edaba(0x208)](_0x5e3257['KHlvE'](_0x5e3257['HHysF'](_0x5e3257['HHysF'](_0x5e3257['rycdX']+'\x0a'+_0x5e3257[_0x1edaba(0x21a)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x3707b8+'\x20--url\x20'+_0x5c6a28+_0x1edaba(0x218)),'\x0a')+_0x1edaba(0x1ed),_0x1edaba(0x1e3))),![];}let _0x1b5f69;if(_0x2e7d61[_0x1edaba(0x1fd)]){if(!_0x4d3aa7?.['environments']?.[_0x2e7d61[_0x1edaba(0x1fd)]]){const _0x2a24dd=Object[_0x1edaba(0x1da)](_0x4d3aa7?.['environments']??{});return _0x430949?.[_0x1edaba(0x1e7)]('profile.add.autoRouteSkipped',{'reason':_0x5e3257[_0x1edaba(0x23e)],'profileName':_0x3707b8}),console[_0x1edaba(0x208)](_0x5e3257[_0x1edaba(0x1f1)](_0x1edaba(0x1f9)+_0x2e7d61[_0x1edaba(0x1fd)]+_0x1edaba(0x240),_0x2a24dd[_0x1edaba(0x234)]?_0x1edaba(0x1dd)+_0x2a24dd['join'](',\x20')+'.':_0x5e3257[_0x1edaba(0x206)])),![];}_0x1b5f69=_0x2e7d61['authEnv'];}else _0x1b5f69=_0x5e3257[_0x1edaba(0x228)](matchAuthEnvironment,_0x5c6a28,_0x4d3aa7);if(!_0x1b5f69)return _0x430949?.['trackPhaseEnd'](_0x5e3257['ZkAVG'],{'reason':_0x1edaba(0x24b),'profileName':_0x3707b8}),console[_0x1edaba(0x208)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x5c6a28+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x1edaba(0x1da)](_0x4d3aa7?.[_0x1edaba(0x1ea)]??{})[_0x1edaba(0x1de)](',\x20')+'.'),![];const _0x466c2f=_0x4d3aa7?.['environments']?.[_0x1b5f69],_0x15a8f7=_0x466c2f?.['domains']??[];if(_0x132e08&&!_0x2e7d61[_0x1edaba(0x233)]){const {saveToCloud:_0x40fcf9}=await _0x568d0f[_0x1edaba(0x1f7)]([{'type':_0x5e3257['ZWjak'],'name':_0x5e3257[_0x1edaba(0x205)],'message':'Found\x20auth\x20environment\x20\x27'+_0x1b5f69+'\x27\x20matching\x20'+_0x5c6a28+_0x1edaba(0x1db)+_0x15a8f7['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x3707b8+_0x1edaba(0x243),'default':!![]}]);if(!_0x40fcf9)return _0x430949?.[_0x1edaba(0x1e7)](_0x1edaba(0x1f0),{'reason':_0x5e3257['FTMJr'],'profileName':_0x3707b8}),console[_0x1edaba(0x208)](_0x5e3257[_0x1edaba(0x219)]),![];}const _0x30e51b=_0x15a8f7[_0x1edaba(0x21f)](_0x2cbe9b=>{const _0x54e6f2=_0x1edaba;try{return _0x5e3257[_0x54e6f2(0x253)](new URL(_0x2cbe9b)['origin'],new URL(_0x5c6a28)[_0x54e6f2(0x24a)]);}catch{return![];}}),_0x1482bd={};!_0x30e51b&&(_0x1482bd['baseUrl']=_0x5c6a28);try{await _0x5e3257[_0x1edaba(0x20c)](createCloudProfile,_0x3707b8,_0x1b5f69,{'settings':_0x1482bd}),warnCloudProfileSharedInOrg();}catch(_0x636845){if(_0x636845 instanceof ApiError&&_0x5e3257[_0x1edaba(0x23a)](_0x636845[_0x1edaba(0x23d)],0x199)){console[_0x1edaba(0x208)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3707b8+_0x1edaba(0x23b)+(_0x1edaba(0x1fe)+_0x3707b8));throw _0x636845;}throw _0x636845;}return console['log'](_0x5e3257['KHlvE'](_0x1edaba(0x222)+_0x3707b8+_0x1edaba(0x248),_0x1edaba(0x249)+_0x3707b8)),await sweepOrphansBestEffort(_0x3707b8),_0x430949?.[_0x1edaba(0x1e7)](_0x5e3257[_0x1edaba(0x204)],{'envKey':_0x1b5f69,'profileName':_0x3707b8}),!![];}async function createUnconfiguredCloudProfile(_0x365fa7,_0x569236){const _0xd2cf03=_0x2117,_0x5cd0b0={'ZcNvO':function(_0x10baca,_0x1356c8){return _0x10baca+_0x1356c8;}};try{await createCloudProfile(_0x365fa7,undefined,{'settings':_0x569236}),warnCloudProfileSharedInOrg();}catch(_0x485351){_0x485351 instanceof ApiError&&_0x485351['status']===0x199&&console['error'](_0x5cd0b0[_0xd2cf03(0x24e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x365fa7+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0xd2cf03(0x1fe)+_0x365fa7));throw _0x485351;}}async function captureEnvLessProfile(_0x360d48,_0x4da24a,_0x4cf0d9,_0x3e8d28){const _0x53cf44=_0x2117,_0x3320e9={'VJDsq':'user_declined','dUkVh':function(_0x1b0fff,_0x1750c1){return _0x1b0fff+_0x1750c1;},'cFXqs':function(_0xb8d8cb,_0x174669,_0x4abc63,_0x24f60c){return _0xb8d8cb(_0x174669,_0x4abc63,_0x24f60c);},'fgpwB':function(_0x4c7c4d){return _0x4c7c4d();},'nmYdA':function(_0x1e2f7e,_0x9d32e0){return _0x1e2f7e instanceof _0x9d32e0;},'xHaoB':'profile.add.autoRouted'};if(!_0x4cf0d9['yes']){const {capture:_0x361fd7}=await _0x568d0f[_0x53cf44(0x1f7)]([{'type':_0x53cf44(0x1f3),'name':'capture','message':_0x53cf44(0x1e6),'default':!![]}]);if(!_0x361fd7)return _0x3e8d28?.[_0x53cf44(0x1e7)]('profile.add.autoRouteSkipped',{'reason':_0x3320e9['VJDsq'],'profileName':_0x360d48}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x253976={};if(_0x4cf0d9['setupHeader'])for(const _0x5cecfa of _0x4cf0d9[_0x53cf44(0x216)]){const _0x77f37f=_0x5cecfa[_0x53cf44(0x22e)](':');if(_0x77f37f===-0x1)continue;_0x253976[_0x5cecfa['slice'](0x0,_0x77f37f)[_0x53cf44(0x1d8)]()]=_0x5cecfa['slice'](_0x3320e9[_0x53cf44(0x20f)](_0x77f37f,0x1))[_0x53cf44(0x1d8)]();}const _0x41d35b={'baseUrl':_0x4da24a};Object['keys'](_0x253976)[_0x53cf44(0x234)]>0x0&&(_0x41d35b[_0x53cf44(0x1f8)]=_0x253976);let _0x2f863b;try{_0x2f863b=await _0x3320e9[_0x53cf44(0x1d4)](createCloudProfile,_0x360d48,undefined,{'settings':_0x41d35b}),_0x3320e9[_0x53cf44(0x255)](warnCloudProfileSharedInOrg);}catch(_0x545090){_0x3320e9[_0x53cf44(0x1df)](_0x545090,ApiError)&&_0x545090['status']===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x360d48+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x360d48));throw _0x545090;}return await manualBrowserLogin(_0x2f863b,{'key':'','domains':[_0x4da24a],'setupHeaders':Object[_0x53cf44(0x1da)](_0x253976)['length']>0x0?_0x253976:undefined}),console['log'](_0x3320e9['dUkVh'](_0x53cf44(0x25d)+_0x360d48+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x53cf44(0x249)+_0x360d48)),await sweepOrphansBestEffort(_0x360d48),_0x3e8d28?.[_0x53cf44(0x1e7)](_0x3320e9['xHaoB'],{'envKey':null,'profileName':_0x360d48}),!![];}function _0x2117(_0x46967a,_0x3f4c24){_0x46967a=_0x46967a-0x1d4;const _0x36933b=_0x3693();let _0x21176e=_0x36933b[_0x46967a];return _0x21176e;}export async function addEnv(_0x4a26d3,_0x2d6fa9={},_0x452dbd){const _0x5aca11=_0x2117,_0x4c8d99={'ScMBN':function(_0xa28053,_0x180b1f){return _0xa28053+_0x180b1f;},'YwVkY':_0x5aca11(0x22b),'KMemT':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','MoARr':_0x5aca11(0x1fa),'zJoOi':_0x5aca11(0x242),'MpDZP':function(_0x4ee425,_0x58566e){return _0x4ee425===_0x58566e;},'KBaEi':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','tKmfm':_0x5aca11(0x258),'VoWgP':function(_0x270073,_0x442c30){return _0x270073(_0x442c30);},'Wwonl':function(_0x4258b1){return _0x4258b1();},'WeKrn':_0x5aca11(0x20b),'qqXJl':_0x5aca11(0x201),'rEudU':function(_0x2ac8a8,_0x324b7b){return _0x2ac8a8>_0x324b7b;},'xtsZQ':_0x5aca11(0x1fb),'McFMc':function(_0x4372dc,_0x11c9c1,_0x429fe4,_0x5c2928,_0x4e45d7){return _0x4372dc(_0x11c9c1,_0x429fe4,_0x5c2928,_0x4e45d7);},'yCkNK':function(_0x3081bc,_0x4252fb){return _0x3081bc instanceof _0x4252fb;},'tfKhZ':function(_0xd1509f,_0x51750a){return _0xd1509f>_0x51750a;},'olZPi':_0x5aca11(0x22d),'mFPah':_0x5aca11(0x24c),'fPwsB':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','JDYXl':_0x5aca11(0x209),'Hvpmu':function(_0xbb47ef,_0xaf8eba){return _0xbb47ef||_0xaf8eba;},'vXIqd':function(_0x57ef88,_0x267618){return _0x57ef88(_0x267618);},'zNjfY':'continue','bsOJX':_0x5aca11(0x251),'gGlqh':function(_0x264249,_0x129b31,_0x556d10,_0x374329,_0x3efc38,_0x3284fe){return _0x264249(_0x129b31,_0x556d10,_0x374329,_0x3efc38,_0x3284fe);}};_0x2d6fa9['ci']&&(console[_0x5aca11(0x208)](_0x4c8d99[_0x5aca11(0x22f)](_0x5aca11(0x256),_0x4c8d99['YwVkY'])+'\x0a'+_0x4c8d99['KMemT']+_0x4c8d99[_0x5aca11(0x215)]+'\x0a'+_0x4c8d99[_0x5aca11(0x21d)]+_0x5aca11(0x20d)),process[_0x5aca11(0x217)](0x1));const _0x53aec3={};if(_0x2d6fa9[_0x5aca11(0x216)])for(const _0x449be7 of _0x2d6fa9[_0x5aca11(0x216)]){const _0x2f5216=_0x449be7['indexOf'](':');if(_0x2f5216===-0x1)throw new Error(_0x5aca11(0x212)+_0x449be7+_0x5aca11(0x247));const _0x2a25d1=_0x449be7[_0x5aca11(0x213)](0x0,_0x2f5216)[_0x5aca11(0x1d8)](),_0x1fd4c7=_0x449be7[_0x5aca11(0x213)](_0x2f5216+0x1)[_0x5aca11(0x1d8)]();_0x53aec3[_0x2a25d1]=_0x1fd4c7;}if(_0x2d6fa9[_0x5aca11(0x1fb)]!==undefined&&_0x4c8d99['MpDZP'](_0x2d6fa9['cdpEndpoint']['trim'](),''))throw new Error(_0x4c8d99[_0x5aca11(0x21c)]);if(_0x2d6fa9[_0x5aca11(0x1fb)]&&_0x2d6fa9['url'])throw new Error(_0x5aca11(0x25b));if(_0x2d6fa9[_0x5aca11(0x1fd)]&&_0x2d6fa9[_0x5aca11(0x1e9)])throw new Error(_0x4c8d99[_0x5aca11(0x21b)]);if(_0x2d6fa9[_0x5aca11(0x1fd)]&&_0x2d6fa9['cdpEndpoint'])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x308f3b=_0x4c8d99[_0x5aca11(0x1f2)](Boolean,_0x2d6fa9['cdpEndpoint']),_0x1d14b3=_0x4c8d99['Wwonl'](isInteractive);if(!_0x1d14b3&&!_0x2d6fa9[_0x5aca11(0x22c)]&&!_0x308f3b&&!_0x2d6fa9[_0x5aca11(0x1e9)])throw new Error(_0x4c8d99[_0x5aca11(0x1f4)]);if(_0x308f3b){const _0x2f7dc1=_0x2d6fa9['cdpEndpoint'];console[_0x5aca11(0x24d)](_0x4c8d99['qqXJl']),console[_0x5aca11(0x24d)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x2f7dc1);const _0x40ad3d={'cdpEndpoint':_0x2f7dc1,'isElectron':!![]};_0x4c8d99[_0x5aca11(0x239)](Object[_0x5aca11(0x1da)](_0x53aec3)['length'],0x0)&&(_0x40ad3d['setupHeaders']=_0x53aec3);await createUnconfiguredCloudProfile(_0x4a26d3,_0x40ad3d);try{setProfileOverride(process['cwd'](),_0x4a26d3,_0x4c8d99[_0x5aca11(0x1f6)],_0x2f7dc1),_0x4c8d99[_0x5aca11(0x235)](setProfileOverride,process[_0x5aca11(0x1d7)](),_0x4a26d3,_0x5aca11(0x23c),!![]);}catch(_0x162b42){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x4c8d99[_0x5aca11(0x23f)](_0x162b42,Error)?_0x162b42['message']:String(_0x162b42)));}console[_0x5aca11(0x24d)](_0x5aca11(0x252)+_0x4a26d3+_0x5aca11(0x220)),await _0x4c8d99['VoWgP'](sweepOrphansBestEffort,_0x4a26d3),await markActive(_0x4a26d3);return;}if(_0x2d6fa9[_0x5aca11(0x1e9)]){const _0x162fb3={};_0x2d6fa9['url']&&(_0x162fb3[_0x5aca11(0x1f5)]=_0x2d6fa9[_0x5aca11(0x22c)]);_0x4c8d99[_0x5aca11(0x227)](Object[_0x5aca11(0x1da)](_0x53aec3)['length'],0x0)&&(_0x162fb3['setupHeaders']=_0x53aec3);await createUnconfiguredCloudProfile(_0x4a26d3,_0x162fb3),console['log'](_0x5aca11(0x222)+_0x4a26d3+_0x5aca11(0x238)+(_0x5aca11(0x236)+_0x4a26d3+_0x5aca11(0x1e8))),await sweepOrphansBestEffort(_0x4a26d3),await markActive(_0x4a26d3);return;}if(_0x2d6fa9[_0x5aca11(0x22c)]){const _0x4d1727=_0x2d6fa9[_0x5aca11(0x22c)],_0x188e8e=await _0x4c8d99[_0x5aca11(0x1f2)](checkUrlReachability,_0x4d1727);if(!_0x188e8e['ok']&&!_0x2d6fa9[_0x5aca11(0x1e0)])throw new Error('Could\x20not\x20reach\x20'+_0x4d1727+':\x20'+_0x188e8e['error']+_0x5aca11(0x20a));!_0x188e8e['ok']&&_0x2d6fa9['force']&&console[_0x5aca11(0x24d)]('⚠\x20Could\x20not\x20reach\x20'+_0x4d1727+':\x20'+_0x188e8e['error']+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x5aca11(0x226)),console['log'](_0x4c8d99[_0x5aca11(0x207)]),console[_0x5aca11(0x24d)](_0x4c8d99[_0x5aca11(0x1ff)]);let _0x305b67='',_0x41c35b=![];while(!![]){const _0xd56a7f=await _0x568d0f[_0x5aca11(0x1f7)]([{'type':'input','name':'baseUrl','message':_0x41c35b?_0x4c8d99['fPwsB']:_0x4c8d99[_0x5aca11(0x25c)],'default':_0x4c8d99[_0x5aca11(0x230)](_0x305b67,_0x5aca11(0x1eb))}]);_0x305b67=_0xd56a7f[_0x5aca11(0x1f5)];const _0xc7c32d=await _0x4c8d99['vXIqd'](checkUrlReachability,_0x305b67);if(_0xc7c32d['ok'])break;const _0x3ef0f4=/^[a-zA-Z][\w+.-]*:\/\//[_0x5aca11(0x203)](_0x305b67),_0x40a00a=_0xc7c32d['isProtocolError']&&!_0x3ef0f4,_0x332961=_0x40a00a?'http://'+_0x305b67:null;_0x41c35b=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x305b67+':\x20'+_0xc7c32d['error']);_0x332961&&console[_0x5aca11(0x24d)](_0x5aca11(0x25a)+_0x332961+'?');const {action:_0x484791}=await _0x568d0f['prompt']([{'type':'list','name':_0x5aca11(0x250),'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x332961?[{'name':'Use\x20'+_0x332961,'value':_0x5aca11(0x251)}]:[],{'name':'Enter\x20a\x20different\x20URL','value':'retry'},{'name':_0x5aca11(0x21e),'value':_0x4c8d99['zNjfY']}]}]);if(_0x484791===_0x4c8d99[_0x5aca11(0x237)]&&_0x332961){_0x305b67=_0x332961;const _0x2f683e=await checkUrlReachability(_0x305b67);if(_0x2f683e['ok'])break;console['log'](_0x5aca11(0x246)+_0x305b67+':\x20'+_0x2f683e[_0x5aca11(0x208)]);}else{if(_0x484791===_0x5aca11(0x1ec))break;}}_0x2d6fa9={..._0x2d6fa9,'url':_0x305b67};}let _0x5a761f=![];try{_0x5a761f=await _0x4c8d99['gGlqh'](tryAutoRouteCloudProfile,_0x4a26d3,_0x2d6fa9['url'],_0x2d6fa9,_0x1d14b3,_0x452dbd);}catch(_0x31ac03){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4a26d3+_0x5aca11(0x257)+(_0x31ac03 instanceof Error?_0x31ac03['message']:String(_0x31ac03))),process['exit'](0x1);}!_0x5a761f&&process['exit'](0x1),await markActive(_0x4a26d3);}
1
+ (function(_0x184362,_0x208d99){const _0x3e3d52=_0x3a23,_0x5c44a2=_0x184362();while(!![]){try{const _0x14581e=parseInt(_0x3e3d52(0x222))/0x1*(-parseInt(_0x3e3d52(0x20d))/0x2)+-parseInt(_0x3e3d52(0x1b0))/0x3*(-parseInt(_0x3e3d52(0x1a5))/0x4)+-parseInt(_0x3e3d52(0x1c1))/0x5+-parseInt(_0x3e3d52(0x20e))/0x6+parseInt(_0x3e3d52(0x1f7))/0x7+parseInt(_0x3e3d52(0x1c8))/0x8+parseInt(_0x3e3d52(0x1b2))/0x9*(-parseInt(_0x3e3d52(0x1ce))/0xa);if(_0x14581e===_0x208d99)break;else _0x5c44a2['push'](_0x5c44a2['shift']());}catch(_0x529e74){_0x5c44a2['push'](_0x5c44a2['shift']());}}}(_0x39dc,0x581ff));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x26ae9b from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x26fd6c=_0x3a23;if(!process['stdout']['isTTY'])return;console[_0x26fd6c(0x1fd)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4e35d8){const _0x37890f=_0x3a23,_0xf4fe7b={'iIdyh':function(_0x46c9f6,_0x52666a){return _0x46c9f6(_0x52666a);},'Ktsmj':'Invalid\x20URL','SDhRL':'TypeError','Xsias':_0x37890f(0x1f2)};try{const _0x53e80a=new AbortController(),_0x350ebc=setTimeout(()=>_0x53e80a[_0x37890f(0x208)](),0x1388),_0x17e5ac={'method':_0x37890f(0x1fa),'signal':_0x53e80a['signal'],'redirect':_0x37890f(0x1d9)};/^https:\/\/localhost(:\d+)?/i['test'](_0x4e35d8)&&(process[_0x37890f(0x21c)][_0x37890f(0x20f)]='0');const _0x33198f=await fetch(_0x4e35d8,_0x17e5ac);delete process['env'][_0x37890f(0x20f)],_0xf4fe7b[_0x37890f(0x1bb)](clearTimeout,_0x350ebc);if(_0x33198f['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x37890f(0x1a3)+_0x33198f['status']};}catch(_0xa0572c){delete process['env'][_0x37890f(0x20f)];const _0x356e72=_0xa0572c,_0x55af85=_0x356e72['message']||_0xf4fe7b['iIdyh'](String,_0xa0572c),_0x3519e1=_0x55af85['includes'](_0xf4fe7b['Ktsmj'])||_0x356e72['name']===_0xf4fe7b['SDhRL']||_0x55af85[_0x37890f(0x1bd)](_0xf4fe7b[_0x37890f(0x1d0)]);return{'ok':![],'error':_0x55af85,'isProtocolError':_0x3519e1};}}async function sweepOrphanLocalProfile(_0x2642be,_0x53ad35,_0x57bd5d){const _0x25654b=_0x3a23,_0xb2f29e={'vvUjD':'local','jndwg':function(_0x3ab559,_0x3d75db){return _0x3ab559(_0x3d75db);},'SXnGy':function(_0x72fb7e,_0x261691){return _0x72fb7e(_0x261691);},'RVUuh':function(_0x45f9d9,_0x5a1ff0,_0x47915d){return _0x45f9d9(_0x5a1ff0,_0x47915d);}},_0x3a88e7=join(_0x53ad35,_0xb2f29e['vvUjD']),_0x4285dd=join(_0x3a88e7,_0x2642be);_0xb2f29e[_0x25654b(0x19f)](existsSync,_0x4285dd)&&(_0x57bd5d&&await _0xb2f29e[_0x25654b(0x1b3)](isPathGitTracked,_0x4285dd)?console[_0x25654b(0x1ca)](_0x25654b(0x1fb)+_0x4285dd+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x4285dd,{'recursive':!![],'force':!![]}),console[_0x25654b(0x1ca)](_0x25654b(0x1e6)+_0x4285dd)));if(existsSync(_0x3a88e7)){let _0x3f38fd=[];try{_0x3f38fd=await readdir(_0x3a88e7);}catch{return;}const _0x28035b='.tmp-'+_0x2642be+'-';for(const _0x41df11 of _0x3f38fd){if(!_0x41df11[_0x25654b(0x1f9)](_0x28035b))continue;const _0x1b6a25=_0xb2f29e[_0x25654b(0x1e3)](join,_0x3a88e7,_0x41df11);await rm(_0x1b6a25,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x1b6a25);}}}function _0x39dc(){const _0x47b3c5=['BZFEN','isProtocolError','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','status','3633168XxGUUP','✓\x20Profile\x20\x27','log',')\x0a\x20\x20Save\x20\x27','crBwo','cwd','6342090CDRFpS','Found\x20auth\x20environment\x20\x27','Xsias','skipAuth','mOoag','epvmb','Use\x20','message','cdqyS','trim','no_match','manual','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','oVMgO','setupHeader','setupHeaders','keys','tuNSi','LpUqH','baseUrl','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','RVUuh','indexOf','profile.add.autoRouted','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x20\x20Set\x20active\x20profile:\x20','Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','LmdeH','\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','domains','PIIAJ','✓\x20Cloud\x20profile\x20\x27','\x0a\x20\x20(domains:\x20','fetch\x20failed','url','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','mgYLO','\x27\x20matching\x20','2577750SEsyhx','vmYgC','startsWith','HEAD','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Lqiok','warn','What\x20would\x20you\x20like\x20to\x20do?','\x0a🌐\x20Profile\x20Setup\x0a','\x20\x20Did\x20you\x20mean\x20','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','http://localhost:3000','prompt','⚠\x20Could\x20not\x20reach\x20','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','KNSRx','user_declined','abort','input','authEnv','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','aIoZd','68HxVbnw','994794GSlFxb','NODE_TLS_REJECT_UNAUTHORIZED','\x27\x20created\x20(CDP).','dLbGL','bBazH','\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','SFHmZ','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','length','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','slice','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','env','\x0a\x20\x20Could\x20not\x20reach\x20','GBVmv','trackPhaseEnd','join','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','4454LYVQHM','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','jlAuM','BQtiV','no_auth_config','\x22:\x20','profile.add.autoRouteSkipped','mjImk','cAJXw','origin','bBVNW','jndwg','Continue\x20anyway','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','cdpEndpoint','HTTP\x20','saveToCloud','244EkgwCS','wSZUv','action','kvdfk','vYFfj','dDYaG','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','Enter\x20a\x20different\x20URL','http://','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','31833jrAzEi','FimPh','9hyBvwQ','SXnGy','force','EhisU','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','error','environments','TlZHQ','wJInF','iIdyh','OxiBh','includes','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','use_suggestion','786320LzjCCU','FWuHX','list'];_0x39dc=function(){return _0x47b3c5;};return _0x39dc();}async function sweepOrphansBestEffort(_0x2653e3){const _0x5ad480=_0x3a23,_0x1effdd={'bBVNW':function(_0x236694,_0x42aecf){return _0x236694!==_0x42aecf;},'bbEkq':function(_0x4e9341){return _0x4e9341();},'sPUUB':function(_0x38e578,_0x493fea){return _0x38e578(_0x493fea);}};try{await sweepOrphanLocalProfile(_0x2653e3,getRangerHomeDir(),![]);const _0x3dc65a=getRangerDir();_0x1effdd[_0x5ad480(0x19e)](_0x3dc65a,_0x1effdd['bbEkq'](getRangerHomeDir))&&await sweepOrphanLocalProfile(_0x2653e3,_0x3dc65a,!![]);}catch(_0x3010e6){console[_0x5ad480(0x1ca)](_0x5ad480(0x21b)+(_0x3010e6 instanceof Error?_0x3010e6['message']:_0x1effdd['sPUUB'](String,_0x3010e6))+').');}}function _0x3a23(_0x3976f9,_0x1d69a7){_0x3976f9=_0x3976f9-0x19d;const _0x39dcac=_0x39dc();let _0x3a23f4=_0x39dcac[_0x3976f9];return _0x3a23f4;}async function markActive(_0x2f7654){const _0x178614=_0x3a23;try{await writeActiveProfileName(_0x2f7654),console[_0x178614(0x1ca)](_0x178614(0x1e8)+_0x2f7654);}catch{console[_0x178614(0x1ca)](_0x178614(0x223));}}async function tryAutoRouteCloudProfile(_0x52f364,_0x25d723,_0x24295e,_0x315070,_0x353b52){const _0x42cdc5=_0x3a23,_0x3d11cd={'mgYLO':function(_0x42de19,_0x4cd77a){return _0x42de19===_0x4cd77a;},'epvmb':function(_0x2fc5ce,_0x1d7e58){return _0x2fc5ce(_0x1d7e58);},'vYFfj':_0x42cdc5(0x226),'cdqyS':function(_0x41ae8a,_0x3e6fad){return _0x41ae8a+_0x3e6fad;},'UmRUi':function(_0x156e3e,_0x276187){return _0x156e3e+_0x276187;},'JwBkW':function(_0x1f377b,_0x3b9a4b){return _0x1f377b+_0x3b9a4b;},'cAJXw':_0x42cdc5(0x1f4),'UwzHI':_0x42cdc5(0x219),'GUmBG':'env_not_found','BQtiV':function(_0x363d1e,_0x58104d){return _0x363d1e+_0x58104d;},'BZFEN':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','jlAuM':function(_0x58ffb6,_0x1a8f50,_0x86401c){return _0x58ffb6(_0x1a8f50,_0x86401c);},'aIoZd':_0x42cdc5(0x1a4),'dDYaG':function(_0x3a48a6,_0x5ee080,_0x1cbc44,_0x3bd4e6){return _0x3a48a6(_0x5ee080,_0x1cbc44,_0x3bd4e6);},'wJInF':function(_0x23e314){return _0x23e314();},'dLbGL':function(_0x8562e9,_0x462579){return _0x8562e9 instanceof _0x462579;},'pJZQT':function(_0x2e6eb7,_0x388729){return _0x2e6eb7+_0x388729;},'LmdeH':function(_0x522e75,_0x4dbc4f){return _0x522e75+_0x4dbc4f;},'FimPh':'profile.add.autoRouted'};let _0x579a36;try{_0x579a36=await fetchAuthConfig();}catch(_0x1b09a2){return _0x353b52?.[_0x42cdc5(0x21f)](_0x42cdc5(0x228),{'reason':'no_auth_config','profileName':_0x52f364}),console[_0x42cdc5(0x1b7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x1b09a2 instanceof Error?_0x1b09a2[_0x42cdc5(0x1d5)]:_0x3d11cd[_0x42cdc5(0x1d3)](String,_0x1b09a2))),![];}if((!_0x579a36||!_0x579a36['environments']||_0x3d11cd[_0x42cdc5(0x1f5)](Object['keys'](_0x579a36['environments'])[_0x42cdc5(0x216)],0x0))&&!_0x24295e[_0x42cdc5(0x20a)]){if(_0x315070)return await captureEnvLessProfile(_0x52f364,_0x25d723,_0x24295e,_0x353b52);return _0x353b52?.[_0x42cdc5(0x21f)](_0x42cdc5(0x228),{'reason':_0x3d11cd[_0x42cdc5(0x1a9)],'profileName':_0x52f364}),console[_0x42cdc5(0x1b7)](_0x3d11cd['cdqyS'](_0x3d11cd[_0x42cdc5(0x1d6)](_0x3d11cd['UmRUi'](_0x3d11cd['JwBkW'](_0x3d11cd['cdqyS'](_0x42cdc5(0x213),'\x0a'),_0x3d11cd[_0x42cdc5(0x22a)])+(_0x42cdc5(0x201)+_0x52f364+'\x20--url\x20'+_0x25d723+'\x20--skip-auth\x0a'),'\x0a'),_0x3d11cd['UwzHI']),_0x42cdc5(0x1af))),![];}let _0x2cb23f;if(_0x24295e['authEnv']){if(!_0x579a36?.[_0x42cdc5(0x1b8)]?.[_0x24295e[_0x42cdc5(0x20a)]]){const _0x49988d=Object['keys'](_0x579a36?.[_0x42cdc5(0x1b8)]??{});return _0x353b52?.['trackPhaseEnd'](_0x42cdc5(0x228),{'reason':_0x3d11cd['GUmBG'],'profileName':_0x52f364}),console['error'](_0x3d11cd[_0x42cdc5(0x225)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x24295e['authEnv']+'\x22\x20not\x20found.',_0x49988d[_0x42cdc5(0x216)]?'\x20Configured\x20envs:\x20'+_0x49988d['join'](',\x20')+'.':_0x3d11cd[_0x42cdc5(0x1c4)])),![];}_0x2cb23f=_0x24295e[_0x42cdc5(0x20a)];}else _0x2cb23f=_0x3d11cd[_0x42cdc5(0x224)](matchAuthEnvironment,_0x25d723,_0x579a36);if(!_0x2cb23f)return _0x353b52?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x42cdc5(0x1d8),'profileName':_0x52f364}),console[_0x42cdc5(0x1b7)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x25d723+_0x42cdc5(0x1ae)+Object[_0x42cdc5(0x1de)](_0x579a36?.[_0x42cdc5(0x1b8)]??{})['join'](',\x20')+'.'),![];const _0x469688=_0x579a36?.['environments']?.[_0x2cb23f],_0x249889=_0x469688?.[_0x42cdc5(0x1ee)]??[];if(_0x315070&&!_0x24295e['yes']){const {saveToCloud:_0x15905f}=await _0x26ae9b['prompt']([{'type':'confirm','name':_0x3d11cd[_0x42cdc5(0x20c)],'message':_0x42cdc5(0x1cf)+_0x2cb23f+_0x42cdc5(0x1f6)+_0x25d723+_0x42cdc5(0x1f1)+_0x249889[_0x42cdc5(0x220)](',\x20')+_0x42cdc5(0x1cb)+_0x52f364+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x15905f)return _0x353b52?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x52f364}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x1ecce2=_0x249889['some'](_0x12dc26=>{const _0x323872=_0x42cdc5;try{return _0x3d11cd['mgYLO'](new URL(_0x12dc26)[_0x323872(0x19d)],new URL(_0x25d723)[_0x323872(0x19d)]);}catch{return![];}}),_0x27303b={};!_0x1ecce2&&(_0x27303b['baseUrl']=_0x25d723);try{await _0x3d11cd[_0x42cdc5(0x1aa)](createCloudProfile,_0x52f364,_0x2cb23f,{'settings':_0x27303b}),_0x3d11cd[_0x42cdc5(0x1ba)](warnCloudProfileSharedInOrg);}catch(_0x1bb481){if(_0x3d11cd[_0x42cdc5(0x211)](_0x1bb481,ApiError)&&_0x1bb481['status']===0x199){console[_0x42cdc5(0x1b7)](_0x3d11cd['pJZQT']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x52f364+_0x42cdc5(0x1ab),_0x42cdc5(0x217)+_0x52f364));throw _0x1bb481;}throw _0x1bb481;}return console[_0x42cdc5(0x1ca)](_0x3d11cd[_0x42cdc5(0x1eb)]('✓\x20Profile\x20\x27'+_0x52f364+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x52f364)),await sweepOrphansBestEffort(_0x52f364),_0x353b52?.['trackPhaseEnd'](_0x3d11cd[_0x42cdc5(0x1b1)],{'envKey':_0x2cb23f,'profileName':_0x52f364}),!![];}async function createUnconfiguredCloudProfile(_0x3bdf19,_0x57dc1a){const _0x29939f=_0x3a23,_0x5a0927={'KNSRx':function(_0x23f373,_0x87fcef,_0x229e3e,_0x46e19a){return _0x23f373(_0x87fcef,_0x229e3e,_0x46e19a);},'GBVmv':function(_0x30167b,_0x417b1d){return _0x30167b===_0x417b1d;},'BEXOZ':function(_0x331a97,_0x3d58ca){return _0x331a97+_0x3d58ca;}};try{await _0x5a0927[_0x29939f(0x206)](createCloudProfile,_0x3bdf19,undefined,{'settings':_0x57dc1a}),warnCloudProfileSharedInOrg();}catch(_0x15ab89){_0x15ab89 instanceof ApiError&&_0x5a0927[_0x29939f(0x21e)](_0x15ab89[_0x29939f(0x1c7)],0x199)&&console['error'](_0x5a0927['BEXOZ'](_0x29939f(0x21a)+_0x3bdf19+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x3bdf19));throw _0x15ab89;}}async function captureEnvLessProfile(_0x163d3a,_0x3dceeb,_0x4192a8,_0x3c9ea3){const _0x27615c=_0x3a23,_0x2fb93a={'WVXcM':'confirm','Lqiok':'profile.add.autoRouteSkipped','rRyRc':function(_0x53473d,_0x456949){return _0x53473d===_0x456949;},'OxiBh':function(_0x24c3da,_0x3d3f6e){return _0x24c3da+_0x3d3f6e;},'bBazH':function(_0xdf5804,_0x4e2c4e){return _0xdf5804>_0x4e2c4e;},'resCn':function(_0x4929ab){return _0x4929ab();},'MyYRo':function(_0x195108,_0x19f2ea){return _0x195108 instanceof _0x19f2ea;},'jcFWW':function(_0x46b127,_0x185bb5){return _0x46b127+_0x185bb5;},'xRZfn':function(_0x31edbe,_0x1b6ad4){return _0x31edbe+_0x1b6ad4;}};if(!_0x4192a8['yes']){const {capture:_0x5885a1}=await _0x26ae9b[_0x27615c(0x203)]([{'type':_0x2fb93a['WVXcM'],'name':'capture','message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x5885a1)return _0x3c9ea3?.[_0x27615c(0x21f)](_0x2fb93a[_0x27615c(0x1fc)],{'reason':_0x27615c(0x207),'profileName':_0x163d3a}),console[_0x27615c(0x1b7)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x397783={};if(_0x4192a8['setupHeader'])for(const _0x50b4e2 of _0x4192a8[_0x27615c(0x1dc)]){const _0x575709=_0x50b4e2[_0x27615c(0x1e4)](':');if(_0x2fb93a['rRyRc'](_0x575709,-0x1))continue;_0x397783[_0x50b4e2['slice'](0x0,_0x575709)[_0x27615c(0x1d7)]()]=_0x50b4e2[_0x27615c(0x218)](_0x2fb93a[_0x27615c(0x1bc)](_0x575709,0x1))[_0x27615c(0x1d7)]();}const _0x5a1346={'baseUrl':_0x3dceeb};_0x2fb93a[_0x27615c(0x212)](Object['keys'](_0x397783)['length'],0x0)&&(_0x5a1346['setupHeaders']=_0x397783);let _0x27d894;try{_0x27d894=await createCloudProfile(_0x163d3a,undefined,{'settings':_0x5a1346}),_0x2fb93a['resCn'](warnCloudProfileSharedInOrg);}catch(_0x422bc4){_0x2fb93a['MyYRo'](_0x422bc4,ApiError)&&_0x2fb93a['rRyRc'](_0x422bc4['status'],0x199)&&console['error'](_0x2fb93a['jcFWW'](_0x27615c(0x21a)+_0x163d3a+_0x27615c(0x1ab),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x163d3a));throw _0x422bc4;}return await manualBrowserLogin(_0x27d894,{'key':'','domains':[_0x3dceeb],'setupHeaders':Object['keys'](_0x397783)[_0x27615c(0x216)]>0x0?_0x397783:undefined}),console['log'](_0x2fb93a['xRZfn']('\x0a✓\x20Profile\x20\x27'+_0x163d3a+_0x27615c(0x20b),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x163d3a)),await sweepOrphansBestEffort(_0x163d3a),_0x3c9ea3?.[_0x27615c(0x21f)](_0x27615c(0x1e5),{'envKey':null,'profileName':_0x163d3a}),!![];}export async function addEnv(_0x494a89,_0x136abd={},_0x4a6984){const _0x110e94=_0x3a23,_0x5c15b1={'oVMgO':function(_0x32ac0e,_0x592612){return _0x32ac0e+_0x592612;},'brSME':function(_0x1ba041,_0x1d6259){return _0x1ba041+_0x1d6259;},'BqPjw':_0x110e94(0x1e2),'PIIAJ':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','KvrOb':_0x110e94(0x1b6),'TbCPT':_0x110e94(0x1ec),'niDux':function(_0x5ca6fc,_0x15f8a8){return _0x5ca6fc===_0x15f8a8;},'mOoag':function(_0x3bdae3,_0x1b4644){return _0x3bdae3+_0x1b4644;},'mjImk':function(_0x2d7e6e,_0x34adc0){return _0x2d7e6e!==_0x34adc0;},'wSZUv':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','LpUqH':_0x110e94(0x205),'JMMcX':function(_0x4abafd){return _0x4abafd();},'gRaCL':_0x110e94(0x1be),'tuNSi':function(_0x1137ad,_0x521961,_0x5c5a6f,_0x203a25,_0x382a25){return _0x1137ad(_0x521961,_0x5c5a6f,_0x203a25,_0x382a25);},'EhisU':'isElectron','vmYgC':function(_0x3b617a,_0x35d15f){return _0x3b617a instanceof _0x35d15f;},'FWuHX':function(_0x126ebe,_0x41d2c5){return _0x126ebe(_0x41d2c5);},'xpQhi':function(_0x1d31cb,_0x329a72){return _0x1d31cb(_0x329a72);},'TlZHQ':function(_0x4818c0,_0x18f9bd,_0x20788c){return _0x4818c0(_0x18f9bd,_0x20788c);},'crBwo':function(_0x5c59d2,_0x2d0d23){return _0x5c59d2(_0x2d0d23);},'JFlaN':_0x110e94(0x1ff),'fLuTD':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','smDeU':_0x110e94(0x1bf),'kvdfk':_0x110e94(0x209),'FuxTn':_0x110e94(0x1e1),'afJVX':_0x110e94(0x202),'SFHmZ':function(_0x2d27eb,_0x5c8184){return _0x2d27eb===_0x5c8184;}};_0x136abd['ci']&&(console['error'](_0x5c15b1[_0x110e94(0x1db)](_0x5c15b1['oVMgO'](_0x5c15b1['brSME'](_0x5c15b1['oVMgO'](_0x5c15b1['BqPjw']+_0x5c15b1[_0x110e94(0x1ef)],'\x0a')+_0x110e94(0x1da),_0x5c15b1['KvrOb']),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x5c15b1['TbCPT']),process[_0x110e94(0x1ed)](0x1));const _0x133e36={};if(_0x136abd[_0x110e94(0x1dc)])for(const _0x97cfd0 of _0x136abd[_0x110e94(0x1dc)]){const _0x1d19ee=_0x97cfd0['indexOf'](':');if(_0x5c15b1['niDux'](_0x1d19ee,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x97cfd0+_0x110e94(0x1e7));const _0xacec1=_0x97cfd0['slice'](0x0,_0x1d19ee)['trim'](),_0x4f27c7=_0x97cfd0[_0x110e94(0x218)](_0x5c15b1[_0x110e94(0x1d2)](_0x1d19ee,0x1))['trim']();_0x133e36[_0xacec1]=_0x4f27c7;}if(_0x5c15b1[_0x110e94(0x229)](_0x136abd[_0x110e94(0x1a2)],undefined)&&_0x136abd[_0x110e94(0x1a2)][_0x110e94(0x1d7)]()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x136abd[_0x110e94(0x1a2)]&&_0x136abd[_0x110e94(0x1f3)])throw new Error(_0x5c15b1[_0x110e94(0x1a6)]);if(_0x136abd['authEnv']&&_0x136abd[_0x110e94(0x1d1)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x136abd['authEnv']&&_0x136abd['cdpEndpoint'])throw new Error(_0x5c15b1[_0x110e94(0x1e0)]);const _0x4896b0=Boolean(_0x136abd['cdpEndpoint']),_0x1fbddc=_0x5c15b1['JMMcX'](isInteractive);if(!_0x1fbddc&&!_0x136abd['url']&&!_0x4896b0&&!_0x136abd[_0x110e94(0x1d1)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x4896b0){const _0x55ac34=_0x136abd[_0x110e94(0x1a2)];console[_0x110e94(0x1ca)](_0x5c15b1['gRaCL']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x55ac34);const _0x5bc38b={'cdpEndpoint':_0x55ac34,'isElectron':!![]};Object[_0x110e94(0x1de)](_0x133e36)['length']>0x0&&(_0x5bc38b['setupHeaders']=_0x133e36);await createUnconfiguredCloudProfile(_0x494a89,_0x5bc38b);try{_0x5c15b1[_0x110e94(0x1df)](setProfileOverride,process[_0x110e94(0x1cd)](),_0x494a89,_0x110e94(0x1a2),_0x55ac34),setProfileOverride(process[_0x110e94(0x1cd)](),_0x494a89,_0x5c15b1[_0x110e94(0x1b5)],!![]);}catch(_0x51c5b0){console['error'](_0x110e94(0x1c6)+(_0x5c15b1[_0x110e94(0x1f8)](_0x51c5b0,Error)?_0x51c5b0['message']:String(_0x51c5b0)));}console[_0x110e94(0x1ca)](_0x110e94(0x1f0)+_0x494a89+_0x110e94(0x210)),await _0x5c15b1[_0x110e94(0x1c2)](sweepOrphansBestEffort,_0x494a89),await _0x5c15b1['xpQhi'](markActive,_0x494a89);return;}if(_0x136abd[_0x110e94(0x1d1)]){const _0x46b8e2={};_0x136abd['url']&&(_0x46b8e2[_0x110e94(0x1e1)]=_0x136abd['url']);Object[_0x110e94(0x1de)](_0x133e36)['length']>0x0&&(_0x46b8e2[_0x110e94(0x1dd)]=_0x133e36);await _0x5c15b1[_0x110e94(0x1b9)](createUnconfiguredCloudProfile,_0x494a89,_0x46b8e2),console[_0x110e94(0x1ca)](_0x5c15b1['brSME'](_0x110e94(0x1c9)+_0x494a89+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x494a89+'`\x20again\x20without\x20--skip-auth.')),await _0x5c15b1['crBwo'](sweepOrphansBestEffort,_0x494a89),await _0x5c15b1[_0x110e94(0x1cc)](markActive,_0x494a89);return;}if(_0x136abd[_0x110e94(0x1f3)]){const _0x22cabf=_0x136abd[_0x110e94(0x1f3)],_0x560326=await _0x5c15b1['crBwo'](checkUrlReachability,_0x22cabf);if(!_0x560326['ok']&&!_0x136abd[_0x110e94(0x1b4)])throw new Error(_0x110e94(0x1e9)+_0x22cabf+':\x20'+_0x560326['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x560326['ok']&&_0x136abd['force']&&console[_0x110e94(0x1ca)](_0x110e94(0x204)+_0x22cabf+':\x20'+_0x560326['error']+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x5c15b1['JFlaN']),console['log'](_0x5c15b1['fLuTD']),console['log'](_0x5c15b1['smDeU']);let _0x73114b='',_0x4a576a=![];while(!![]){const _0x1bfe34=await _0x26ae9b['prompt']([{'type':_0x5c15b1[_0x110e94(0x1a8)],'name':_0x5c15b1['FuxTn'],'message':_0x4a576a?_0x110e94(0x1ea):_0x110e94(0x221),'default':_0x73114b||_0x5c15b1['afJVX']}]);_0x73114b=_0x1bfe34['baseUrl'];const _0x210eba=await checkUrlReachability(_0x73114b);if(_0x210eba['ok'])break;const _0x4cd602=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x73114b),_0x1975b7=_0x210eba[_0x110e94(0x1c5)]&&!_0x4cd602,_0x37ca3b=_0x1975b7?_0x110e94(0x1ad)+_0x73114b:null;_0x4a576a=!![],console['log'](_0x110e94(0x21d)+_0x73114b+':\x20'+_0x210eba['error']);_0x37ca3b&&console[_0x110e94(0x1ca)](_0x110e94(0x200)+_0x37ca3b+'?');const {action:_0xfbcfc7}=await _0x26ae9b['prompt']([{'type':_0x110e94(0x1c3),'name':_0x110e94(0x1a7),'message':_0x110e94(0x1fe),'choices':[..._0x37ca3b?[{'name':_0x110e94(0x1d4)+_0x37ca3b,'value':_0x110e94(0x1c0)}]:[],{'name':_0x110e94(0x1ac),'value':'retry'},{'name':_0x110e94(0x1a0),'value':'continue'}]}]);if(_0xfbcfc7===_0x110e94(0x1c0)&&_0x37ca3b){_0x73114b=_0x37ca3b;const _0xf5ce25=await checkUrlReachability(_0x73114b);if(_0xf5ce25['ok'])break;console[_0x110e94(0x1ca)](_0x110e94(0x215)+_0x73114b+':\x20'+_0xf5ce25['error']);}else{if(_0x5c15b1[_0x110e94(0x214)](_0xfbcfc7,'continue'))break;}}_0x136abd={..._0x136abd,'url':_0x73114b};}let _0x83b5c1=![];try{_0x83b5c1=await tryAutoRouteCloudProfile(_0x494a89,_0x136abd['url'],_0x136abd,_0x1fbddc,_0x4a6984);}catch(_0x11d269){console[_0x110e94(0x1b7)](_0x110e94(0x1a1)+_0x494a89+_0x110e94(0x227)+(_0x11d269 instanceof Error?_0x11d269['message']:String(_0x11d269))),process['exit'](0x1);}!_0x83b5c1&&process['exit'](0x1),await _0x5c15b1['FWuHX'](markActive,_0x494a89);}
@@ -1 +1 @@
1
- function _0x3279(_0x2c69e4,_0x73d3a8){_0x2c69e4=_0x2c69e4-0x115;var _0x16e95d=_0x16e9();var _0x327946=_0x16e95d[_0x2c69e4];return _0x327946;}(function(_0x5cf423,_0x3ebd05){var _0x10fa93=_0x3279,_0x1b23e5=_0x5cf423();while(!![]){try{var _0x20f669=-parseInt(_0x10fa93(0x11b))/0x1*(-parseInt(_0x10fa93(0x118))/0x2)+parseInt(_0x10fa93(0x125))/0x3+parseInt(_0x10fa93(0x120))/0x4+-parseInt(_0x10fa93(0x123))/0x5*(parseInt(_0x10fa93(0x11e))/0x6)+parseInt(_0x10fa93(0x11f))/0x7+parseInt(_0x10fa93(0x126))/0x8*(-parseInt(_0x10fa93(0x122))/0x9)+-parseInt(_0x10fa93(0x11d))/0xa*(-parseInt(_0x10fa93(0x127))/0xb);if(_0x20f669===_0x3ebd05)break;else _0x1b23e5['push'](_0x1b23e5['shift']());}catch(_0x118a99){_0x1b23e5['push'](_0x1b23e5['shift']());}}}(_0x16e9,0xd8f82));export async function authEncrypt(_0x4155cb){var _0x109463=_0x3279,_0x43f101={'TWHYP':function(_0x30fd22,_0x5a5b63){return _0x30fd22+_0x5a5b63;},'sZOms':function(_0x544988,_0xb8e8d7){return _0x544988+_0xb8e8d7;},'hbPHE':_0x109463(0x121),'ahrBG':_0x109463(0x11c),'CTpZA':_0x109463(0x124)};console['error'](_0x43f101[_0x109463(0x117)](_0x43f101['TWHYP'](_0x43f101['TWHYP'](_0x43f101[_0x109463(0x119)](_0x109463(0x11a),_0x43f101['hbPHE']),'\x0a')+_0x43f101[_0x109463(0x115)],_0x109463(0x116)),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x43f101['CTpZA']),process['exit'](0x1);}function _0x16e9(){var _0x618a04=['\x20\x20ranger\x20profile\x20add\x20<name>\x0a','TWHYP','2ORvneq','sZOms','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','145708nnoCpJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','8230IxgPNm','4541538WfhDOM','9994019CfWIjj','119648bRbNAv','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','114624tTPlTb','5vzkQRL','\x20\x20https://docs.ranger.net/main/concepts/profiles','132864umrIZr','24tVglLQ','484UCvsJO','ahrBG'];_0x16e9=function(){return _0x618a04;};return _0x16e9();}
1
+ function _0x5de6(_0x47d50e,_0x3f122a){_0x47d50e=_0x47d50e-0x136;var _0x3a4273=_0x3a42();var _0x5de601=_0x3a4273[_0x47d50e];return _0x5de601;}(function(_0x1d940a,_0x3ffe4d){var _0x12dbd4=_0x5de6,_0x4a7e93=_0x1d940a();while(!![]){try{var _0x3fd4e5=-parseInt(_0x12dbd4(0x146))/0x1*(parseInt(_0x12dbd4(0x143))/0x2)+parseInt(_0x12dbd4(0x137))/0x3+-parseInt(_0x12dbd4(0x13a))/0x4+parseInt(_0x12dbd4(0x13d))/0x5+parseInt(_0x12dbd4(0x140))/0x6+-parseInt(_0x12dbd4(0x145))/0x7*(-parseInt(_0x12dbd4(0x138))/0x8)+parseInt(_0x12dbd4(0x13c))/0x9*(-parseInt(_0x12dbd4(0x141))/0xa);if(_0x3fd4e5===_0x3ffe4d)break;else _0x4a7e93['push'](_0x4a7e93['shift']());}catch(_0x2d83ff){_0x4a7e93['push'](_0x4a7e93['shift']());}}}(_0x3a42,0xc68ec));function _0x3a42(){var _0x370646=['9JWXmBr','45810WBMdXv','error','Hlnyh','5461980RBtnHk','14148560OEvGPR','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','6INMOTU','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','21oHIBEW','112089fVEEeo','WBgUq','918120mbNWDn','3818624HDEEER','RMbvD','372404OdUlvw','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'];_0x3a42=function(){return _0x370646;};return _0x3a42();}export async function authEncrypt(_0x1a702c){var _0x52b0ae=_0x5de6,_0x4c3618={'RMbvD':function(_0x10f568,_0x5a0a43){return _0x10f568+_0x5a0a43;},'Hlnyh':function(_0x4801ec,_0x15446e){return _0x4801ec+_0x15446e;},'DXurq':_0x52b0ae(0x142),'WBgUq':_0x52b0ae(0x144),'nZQVs':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console[_0x52b0ae(0x13e)](_0x4c3618['RMbvD'](_0x4c3618['RMbvD'](_0x4c3618[_0x52b0ae(0x13f)](_0x4c3618[_0x52b0ae(0x139)](_0x4c3618['DXurq']+_0x4c3618[_0x52b0ae(0x136)],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x4c3618['nZQVs'])+'\x0a',_0x52b0ae(0x13b)),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x43f0d9=_0x2052;(function(_0x261947,_0x243184){const _0x1daf89=_0x2052,_0x295659=_0x261947();while(!![]){try{const _0x592dd2=parseInt(_0x1daf89(0x164))/0x1*(-parseInt(_0x1daf89(0x153))/0x2)+parseInt(_0x1daf89(0x15b))/0x3*(parseInt(_0x1daf89(0x17c))/0x4)+-parseInt(_0x1daf89(0x15d))/0x5*(parseInt(_0x1daf89(0x173))/0x6)+parseInt(_0x1daf89(0x17e))/0x7+-parseInt(_0x1daf89(0x152))/0x8+parseInt(_0x1daf89(0x174))/0x9*(-parseInt(_0x1daf89(0x189))/0xa)+-parseInt(_0x1daf89(0x16e))/0xb*(-parseInt(_0x1daf89(0x179))/0xc);if(_0x592dd2===_0x243184)break;else _0x295659['push'](_0x295659['shift']());}catch(_0x5e51f7){_0x295659['push'](_0x295659['shift']());}}}(_0x4bd7,0x7e017));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';function _0x2052(_0x18b3a8,_0x4302b2){_0x18b3a8=_0x18b3a8-0x151;const _0x4bd7fd=_0x4bd7();let _0x20520b=_0x4bd7fd[_0x18b3a8];return _0x20520b;}const skillsToRemove=['ranger','feature-tracker',_0x43f0d9(0x156),_0x43f0d9(0x180)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x31c5f6){const _0x20c0e7=_0x43f0d9,_0x665a40=_0x31c5f6[_0x20c0e7(0x15a)](/\/\*[\s\S]*?\*\//g,''),_0x2eb44e=_0x665a40[_0x20c0e7(0x15a)](/^\s*\/\/.*$/gm,''),_0x353547=_0x2eb44e[_0x20c0e7(0x15a)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x353547);}async function removeOpencodePluginConfig(_0x3d4128){const _0x4d4918=_0x43f0d9,_0x28e093={'HhPkH':'string','dNXGq':function(_0x445ddc,_0x2c6a4f){return _0x445ddc!==_0x2c6a4f;},'tENXH':function(_0x5e70b5,_0x2503f0,_0x4de237){return _0x5e70b5(_0x2503f0,_0x4de237);},'qnQOd':_0x4d4918(0x181),'PLpkO':function(_0xa36eea,_0x59bc5d){return _0xa36eea===_0x59bc5d;},'XDzvW':function(_0x341022,_0x3f4e86){return _0x341022+_0x3f4e86;}};if(!existsSync(_0x3d4128))return![];let _0x5d66a6;try{const _0x48e928=await _0x28e093['tENXH'](readFile,_0x3d4128,_0x28e093['qnQOd']);_0x5d66a6=parseJsonc(_0x48e928);}catch{return![];}const _0x189114=Array[_0x4d4918(0x16d)](_0x5d66a6[_0x4d4918(0x177)])?_0x5d66a6['plugin']:[];if(_0x28e093[_0x4d4918(0x167)](_0x189114[_0x4d4918(0x16f)],0x0))return![];const _0x1be31b=_0x189114['filter'](_0x3c01e4=>{const _0x541e30=_0x4d4918;if(typeof _0x3c01e4!==_0x28e093[_0x541e30(0x171)])return!![];return _0x28e093[_0x541e30(0x161)](_0x3c01e4,opencodePluginName);});if(_0x1be31b[_0x4d4918(0x16f)]===_0x189114['length'])return![];return _0x1be31b[_0x4d4918(0x16f)]===0x0?delete _0x5d66a6[_0x4d4918(0x177)]:_0x5d66a6[_0x4d4918(0x177)]=_0x1be31b,await writeFile(_0x3d4128,_0x28e093[_0x4d4918(0x178)](JSON['stringify'](_0x5d66a6,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x11419c){const _0x8f874d=_0x43f0d9,_0x2b43cc={'qyLvm':function(_0x1eff9b,_0x4df358){return _0x1eff9b(_0x4df358);},'rRoeX':_0x8f874d(0x177),'GgcEk':_0x8f874d(0x18b),'YgAcX':'ranger@trailhead','OvHsi':'--scope','jjruX':'ignore','zybhx':function(_0xccc7fb,_0x3cc4ff){return _0xccc7fb===_0x3cc4ff;},'zFVwM':'win32','abOQT':_0x8f874d(0x165)};return new Promise(_0x35e772=>{const _0x241357=_0x8f874d,_0x1e8492={'QOxjT':function(_0x155a53,_0x3da555){const _0x2763c6=_0x2052;return _0x2b43cc[_0x2763c6(0x18c)](_0x155a53,_0x3da555);},'AqaFE':function(_0x4c2686,_0x3e6df6){return _0x4c2686===_0x3e6df6;},'kVnTc':function(_0x19f9df,_0x267326){return _0x19f9df(_0x267326);}},_0x5391e3=[_0x2b43cc[_0x241357(0x155)],_0x2b43cc[_0x241357(0x17a)],_0x2b43cc['YgAcX']];_0x11419c&&_0x5391e3[_0x241357(0x151)](_0x2b43cc[_0x241357(0x15e)],_0x11419c);const _0x36148e=spawn(_0x241357(0x159),_0x5391e3,{'stdio':[_0x2b43cc['jjruX'],'ignore',_0x2b43cc['jjruX']],'cwd':_0x11419c?getProjectRoot():undefined,'shell':_0x2b43cc[_0x241357(0x158)](process[_0x241357(0x184)],_0x2b43cc['zFVwM'])});_0x36148e['on']('close',_0x2dd3bc=>{_0x1e8492['QOxjT'](_0x35e772,_0x1e8492['AqaFE'](_0x2dd3bc,0x0));}),_0x36148e['on'](_0x2b43cc[_0x241357(0x17d)],()=>{_0x1e8492['kVnTc'](_0x35e772,![]);});});}async function removeMarketplace(){const _0x5b7725=_0x43f0d9,_0x24cade={'opaXD':function(_0x21e65d,_0x2b133d){return _0x21e65d(_0x2b133d);},'NDYbN':function(_0x27ff44,_0x3b7c6a){return _0x27ff44===_0x3b7c6a;},'tPJWs':function(_0x1fb0fe,_0x1a2a73,_0x30272b,_0x51ca7f){return _0x1fb0fe(_0x1a2a73,_0x30272b,_0x51ca7f);},'aiSBI':_0x5b7725(0x168),'QOdln':'close','FOOVQ':'error'};return new Promise(_0x82d743=>{const _0x357ac4=_0x5b7725,_0x53a9a2=_0x24cade['tPJWs'](spawn,_0x357ac4(0x159),['plugin',_0x357ac4(0x176),_0x357ac4(0x170),'trailhead'],{'stdio':[_0x24cade[_0x357ac4(0x172)],_0x24cade['aiSBI'],_0x24cade[_0x357ac4(0x172)]],'shell':process['platform']==='win32'});_0x53a9a2['on'](_0x24cade['QOdln'],_0x2953a9=>{_0x24cade['opaXD'](_0x82d743,_0x24cade['NDYbN'](_0x2953a9,0x0));}),_0x53a9a2['on'](_0x24cade[_0x357ac4(0x17f)],()=>{_0x82d743(![]);});});}export async function clean(){const _0x12dc8b=_0x43f0d9,_0x4414b1={'RCSZo':_0x12dc8b(0x162),'YmVyV':function(_0x48fad7){return _0x48fad7();},'HRpsJ':_0x12dc8b(0x182),'PemXI':function(_0x157433,_0x5386ed){return _0x157433(_0x5386ed);},'TDkTR':_0x12dc8b(0x15c),'prvtb':function(_0x3f3376,_0x29dd61,_0x5020e4){return _0x3f3376(_0x29dd61,_0x5020e4);},'JgVbm':function(_0x1c2718){return _0x1c2718();},'ezrRi':function(_0x56791c,_0x2edffe,_0x11f2af){return _0x56791c(_0x2edffe,_0x11f2af);},'Qrrwm':function(_0x17be1b,_0x3a82cc,_0x434b0d){return _0x17be1b(_0x3a82cc,_0x434b0d);},'TmrCM':'project','bQDMH':function(_0x44e814,_0x2697ec,_0x225e91){return _0x44e814(_0x2697ec,_0x225e91);},'abzfK':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','waBwD':function(_0x210c49,_0x2458b0){return _0x210c49(_0x2458b0);},'dpsCn':_0x12dc8b(0x175),'OGsOQ':_0x12dc8b(0x163)};console[_0x12dc8b(0x18a)](_0x4414b1[_0x12dc8b(0x183)]);let _0x5af014=![];try{await _0x4414b1['YmVyV'](deleteAllCredentials),console['log'](_0x4414b1[_0x12dc8b(0x185)]),_0x5af014=!![];}catch{}const _0x5373fe=getCacheFile();existsSync(_0x5373fe)&&(await rm(_0x5373fe),_0x5af014=!![]);const _0x39c9bf=getRangerDir();_0x4414b1[_0x12dc8b(0x166)](existsSync,_0x39c9bf)&&(await rm(_0x39c9bf,{'recursive':!![]}),console['log'](_0x4414b1['TDkTR']),_0x5af014=!![]);const _0x48898b=_0x4414b1[_0x12dc8b(0x16b)](getProjectSkillsDir);for(const _0x4a01d6 of skillsToRemove){const _0x569198=join(_0x48898b,_0x4a01d6);existsSync(_0x569198)&&(await _0x4414b1['prvtb'](rm,_0x569198,{'recursive':!![]}),console[_0x12dc8b(0x18a)](_0x12dc8b(0x160)+_0x4a01d6),_0x5af014=!![]);}const _0x4de01f=_0x4414b1['JgVbm'](getUserSkillsDir);for(const _0x2b0f77 of skillsToRemove){const _0x528bed=_0x4414b1[_0x12dc8b(0x187)](join,_0x4de01f,_0x2b0f77);existsSync(_0x528bed)&&(await _0x4414b1['Qrrwm'](rm,_0x528bed,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x2b0f77),_0x5af014=!![]);}const _0x507b84=getOpencodeSkillsDir(_0x4414b1['TmrCM']);for(const _0x2bb046 of skillsToRemove){const _0x19fba8=join(_0x507b84,_0x2bb046);existsSync(_0x19fba8)&&(await rm(_0x19fba8,{'recursive':!![]}),console[_0x12dc8b(0x18a)](_0x12dc8b(0x154)+_0x2bb046),_0x5af014=!![]);}const _0x5ab99d=getOpencodeSkillsDir(_0x12dc8b(0x188));for(const _0x2ceb32 of skillsToRemove){const _0x48a935=_0x4414b1[_0x12dc8b(0x187)](join,_0x5ab99d,_0x2ceb32);existsSync(_0x48a935)&&(await rm(_0x48a935,{'recursive':!![]}),console[_0x12dc8b(0x18a)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x2ceb32),_0x5af014=!![]);}const _0x3c6dea=_0x4414b1[_0x12dc8b(0x16a)](join,getOpencodeConfigDir(_0x4414b1['TmrCM']),_0x12dc8b(0x16c));await _0x4414b1[_0x12dc8b(0x166)](removeOpencodePluginConfig,_0x3c6dea)&&(console['log'](_0x12dc8b(0x157)),_0x5af014=!![]);const _0xd3f2d8=join(getOpencodeConfigDir('user'),'opencode.json');await _0x4414b1[_0x12dc8b(0x166)](removeOpencodePluginConfig,_0xd3f2d8)&&(console[_0x12dc8b(0x18a)](_0x4414b1['abzfK']),_0x5af014=!![]);const _0x3f8925=await uninstallClaudePlugin();_0x3f8925&&(console[_0x12dc8b(0x18a)](_0x12dc8b(0x17b)),_0x5af014=!![]);const _0x3bfaba=await _0x4414b1[_0x12dc8b(0x186)](uninstallClaudePlugin,'project');_0x3bfaba&&(console[_0x12dc8b(0x18a)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x5af014=!![]);const _0x13daa2=await removeMarketplace();_0x13daa2&&(console['log']('✓\x20Removed\x20trailhead\x20marketplace'),_0x5af014=!![]),_0x5af014?console['log'](_0x4414b1[_0x12dc8b(0x15f)]):console['log'](_0x4414b1[_0x12dc8b(0x169)]);}function _0x4bd7(){const _0x2c905b=['length','remove','HhPkH','aiSBI','12azDZno','9ianreT','\x0a✅\x20Cleanup\x20complete!\x0a','marketplace','plugin','XDzvW','300pcHRXT','GgcEk','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','9452jQZMUC','abOQT','5109104rLinIV','FOOVQ','e2e-test-recommender','utf-8','✓\x20Removed\x20stored\x20credentials','RCSZo','platform','HRpsJ','waBwD','ezrRi','user','2172990rwdQCM','log','uninstall','qyLvm','push','2848464wtVAzj','18IqEVUM','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','rRoeX','bug-bash','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','zybhx','claude','replace','894cismEs','✓\x20Removed\x20.ranger/\x20directory','1659715fvgZGi','OvHsi','dpsCn','✓\x20Removed\x20project\x20skill:\x20','dNXGq','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','Nothing\x20to\x20clean\x20up.\x0a','54601KIvUOc','error','PemXI','PLpkO','ignore','OGsOQ','bQDMH','YmVyV','opencode.json','isArray','356719rKMmQK'];_0x4bd7=function(){return _0x2c905b;};return _0x4bd7();}
1
+ const _0x57064a=_0x29f6;(function(_0x46f893,_0x219195){const _0x42f666=_0x29f6,_0x1dcd56=_0x46f893();while(!![]){try{const _0x3712d0=parseInt(_0x42f666(0xf0))/0x1+-parseInt(_0x42f666(0x109))/0x2+-parseInt(_0x42f666(0xe9))/0x3+parseInt(_0x42f666(0x10a))/0x4+-parseInt(_0x42f666(0xfe))/0x5*(-parseInt(_0x42f666(0x10c))/0x6)+parseInt(_0x42f666(0xf4))/0x7*(parseInt(_0x42f666(0xff))/0x8)+parseInt(_0x42f666(0xe2))/0x9*(parseInt(_0x42f666(0xfa))/0xa);if(_0x3712d0===_0x219195)break;else _0x1dcd56['push'](_0x1dcd56['shift']());}catch(_0x1b7090){_0x1dcd56['push'](_0x1dcd56['shift']());}}}(_0x24f3,0xac799));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=[_0x57064a(0x10b),'feature-tracker',_0x57064a(0x115),'e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function _0x24f3(){const _0x23175f=['ranger','3906678ntEXZZ','CwzqP','SglAO','ignore','mYcoK','jDQAM','YLQrx','\x0a✅\x20Cleanup\x20complete!\x0a','close','bug-bash','qHjyC','log','length','4521843VxVntU','uninstall','push','replace','KWMEv','--scope','Reupg','1872315hApKPR','RzDgV','parse','✓\x20Removed\x20trailhead\x20marketplace','✓\x20Removed\x20.ranger/\x20directory','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','COsrv','377987SciffV','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','user','isArray','5062715LrFphq','project','vldqN','GLBEC','JicXC','JIfcp','10vCcafA','wmMEn','oJsdx','NXLZZ','5msiauF','8cHaDaN','opencode.json','✓\x20Removed\x20user\x20skill:\x20','sTxwJ','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','utf-8','ranger@trailhead','plugin','claude','cTqzp','2462396xDErZC','1227952jIXtnG'];_0x24f3=function(){return _0x23175f;};return _0x24f3();}function parseJsonc(_0x140c5f){const _0x526ef6=_0x57064a,_0x1f087d=_0x140c5f['replace'](/\/\*[\s\S]*?\*\//g,''),_0x57f688=_0x1f087d['replace'](/^\s*\/\/.*$/gm,''),_0x38cbdd=_0x57f688[_0x526ef6(0xe5)](/,\s*([}\]])/g,'$1');return JSON[_0x526ef6(0xeb)](_0x38cbdd);}async function removeOpencodePluginConfig(_0x5b6ee5){const _0x6c6d31=_0x57064a,_0x4e7928={'LLAIc':function(_0x113027,_0x50eeb1){return _0x113027!==_0x50eeb1;},'EFovU':function(_0x1e21c0,_0x5a941c){return _0x1e21c0!==_0x5a941c;},'CfKxo':function(_0xe3bb82,_0x1be99d,_0x5f0b2c){return _0xe3bb82(_0x1be99d,_0x5f0b2c);},'rVIXJ':_0x6c6d31(0x104),'JIfcp':function(_0x2503f0,_0x3561dd){return _0x2503f0===_0x3561dd;},'hcHDn':function(_0x10fd85,_0x4e764d){return _0x10fd85===_0x4e764d;},'mYcoK':function(_0x3d46b2,_0x555de5,_0xae46){return _0x3d46b2(_0x555de5,_0xae46);}};if(!existsSync(_0x5b6ee5))return![];let _0x435f8b;try{const _0x1d9ee1=await _0x4e7928['CfKxo'](readFile,_0x5b6ee5,_0x4e7928['rVIXJ']);_0x435f8b=parseJsonc(_0x1d9ee1);}catch{return![];}const _0xd59ccc=Array[_0x6c6d31(0xf3)](_0x435f8b['plugin'])?_0x435f8b['plugin']:[];if(_0x4e7928['JIfcp'](_0xd59ccc['length'],0x0))return![];const _0x337eed=_0xd59ccc['filter'](_0x148f22=>{if(_0x4e7928['LLAIc'](typeof _0x148f22,'string'))return!![];return _0x4e7928['EFovU'](_0x148f22,opencodePluginName);});if(_0x4e7928['hcHDn'](_0x337eed[_0x6c6d31(0x118)],_0xd59ccc['length']))return![];return _0x4e7928[_0x6c6d31(0xf9)](_0x337eed[_0x6c6d31(0x118)],0x0)?delete _0x435f8b['plugin']:_0x435f8b['plugin']=_0x337eed,await _0x4e7928[_0x6c6d31(0x110)](writeFile,_0x5b6ee5,JSON['stringify'](_0x435f8b,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x3aae85){const _0x1dda16=_0x57064a,_0x46213d={'KWMEv':_0x1dda16(0xe3),'oJsdx':_0x1dda16(0x105),'dzaNJ':_0x1dda16(0xe7),'qHjyC':_0x1dda16(0x10f)};return new Promise(_0x26aae4=>{const _0x5e64a8=_0x1dda16,_0x28fc33={'pFMOr':function(_0x2eeafd,_0x5dfa92){return _0x2eeafd===_0x5dfa92;}},_0x2ec2ba=[_0x5e64a8(0x106),_0x46213d[_0x5e64a8(0xe6)],_0x46213d[_0x5e64a8(0xfc)]];_0x3aae85&&_0x2ec2ba[_0x5e64a8(0xe4)](_0x46213d['dzaNJ'],_0x3aae85);const _0x31877d=spawn(_0x5e64a8(0x107),_0x2ec2ba,{'stdio':[_0x46213d[_0x5e64a8(0x116)],_0x46213d['qHjyC'],'ignore'],'cwd':_0x3aae85?getProjectRoot():undefined,'shell':process['platform']==='win32'});_0x31877d['on'](_0x5e64a8(0x114),_0x30a8cb=>{_0x26aae4(_0x28fc33['pFMOr'](_0x30a8cb,0x0));}),_0x31877d['on']('error',()=>{_0x26aae4(![]);});});}function _0x29f6(_0x36823a,_0x22ce5b){_0x36823a=_0x36823a-0xe2;const _0x24f3a3=_0x24f3();let _0x29f6c2=_0x24f3a3[_0x36823a];return _0x29f6c2;}async function removeMarketplace(){const _0x51c276=_0x57064a,_0x11c9c2={'qmWQb':function(_0x43dcce,_0x16b889,_0x56ee9b,_0x5e3b40){return _0x43dcce(_0x16b889,_0x56ee9b,_0x5e3b40);},'jDQAM':'claude','CwzqP':_0x51c276(0x106),'rQjcR':'marketplace','COsrv':'trailhead','yjHaP':_0x51c276(0x10f),'wmMEn':'close','SglAO':'error'};return new Promise(_0xecac28=>{const _0x212b9e=_0x51c276,_0x19e0be=_0x11c9c2['qmWQb'](spawn,_0x11c9c2[_0x212b9e(0x111)],[_0x11c9c2[_0x212b9e(0x10d)],_0x11c9c2['rQjcR'],'remove',_0x11c9c2[_0x212b9e(0xef)]],{'stdio':[_0x212b9e(0x10f),'ignore',_0x11c9c2['yjHaP']],'shell':process['platform']==='win32'});_0x19e0be['on'](_0x11c9c2[_0x212b9e(0xfb)],_0xf8018b=>{_0xecac28(_0xf8018b===0x0);}),_0x19e0be['on'](_0x11c9c2[_0x212b9e(0x10e)],()=>{_0xecac28(![]);});});}export async function clean(){const _0x428e50=_0x57064a,_0x4e616e={'JicXC':'✓\x20Removed\x20stored\x20credentials','vldqN':function(_0x495a1b,_0x3bb16b){return _0x495a1b(_0x3bb16b);},'YLQrx':function(_0x229e37){return _0x229e37();},'KJTmx':_0x428e50(0xed),'GLBEC':function(_0xc3d35d,_0x353c6c,_0x5cda74){return _0xc3d35d(_0x353c6c,_0x5cda74);},'NXLZZ':function(_0x13f984,_0x564e0e,_0xd5ee2b){return _0x13f984(_0x564e0e,_0xd5ee2b);},'AwdXg':function(_0x5d363c,_0x4d8fb0){return _0x5d363c(_0x4d8fb0);},'cTqzp':_0x428e50(0xf5),'sTxwJ':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RzDgV':_0x428e50(0xf1),'VPPlc':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','Reupg':_0x428e50(0xec)};console[_0x428e50(0x117)](_0x428e50(0xee));let _0x3afe90=![];try{await deleteAllCredentials(),console[_0x428e50(0x117)](_0x4e616e[_0x428e50(0xf8)]),_0x3afe90=!![];}catch{}const _0x174cd8=getCacheFile();_0x4e616e[_0x428e50(0xf6)](existsSync,_0x174cd8)&&(await rm(_0x174cd8),_0x3afe90=!![]);const _0x14948a=_0x4e616e['YLQrx'](getRangerDir);existsSync(_0x14948a)&&(await rm(_0x14948a,{'recursive':!![]}),console['log'](_0x4e616e['KJTmx']),_0x3afe90=!![]);const _0x485454=getProjectSkillsDir();for(const _0x264482 of skillsToRemove){const _0x2c9c80=_0x4e616e['GLBEC'](join,_0x485454,_0x264482);existsSync(_0x2c9c80)&&(await _0x4e616e['NXLZZ'](rm,_0x2c9c80,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x264482),_0x3afe90=!![]);}const _0x384ec6=getUserSkillsDir();for(const _0xdc5972 of skillsToRemove){const _0x1085e1=_0x4e616e[_0x428e50(0xfd)](join,_0x384ec6,_0xdc5972);existsSync(_0x1085e1)&&(await rm(_0x1085e1,{'recursive':!![]}),console[_0x428e50(0x117)](_0x428e50(0x101)+_0xdc5972),_0x3afe90=!![]);}const _0x290e87=_0x4e616e['vldqN'](getOpencodeSkillsDir,'project');for(const _0x2dd97e of skillsToRemove){const _0x2c8ab9=join(_0x290e87,_0x2dd97e);_0x4e616e[_0x428e50(0xf6)](existsSync,_0x2c8ab9)&&(await _0x4e616e['GLBEC'](rm,_0x2c8ab9,{'recursive':!![]}),console[_0x428e50(0x117)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2dd97e),_0x3afe90=!![]);}const _0x565bad=_0x4e616e['AwdXg'](getOpencodeSkillsDir,'user');for(const _0x58f954 of skillsToRemove){const _0x1c8c83=_0x4e616e[_0x428e50(0xf7)](join,_0x565bad,_0x58f954);existsSync(_0x1c8c83)&&(await rm(_0x1c8c83,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x58f954),_0x3afe90=!![]);}const _0x337ff3=join(_0x4e616e[_0x428e50(0xf6)](getOpencodeConfigDir,_0x4e616e[_0x428e50(0x108)]),'opencode.json');await removeOpencodePluginConfig(_0x337ff3)&&(console[_0x428e50(0x117)](_0x428e50(0x103)),_0x3afe90=!![]);const _0x2c6bb8=_0x4e616e['NXLZZ'](join,_0x4e616e[_0x428e50(0xf6)](getOpencodeConfigDir,_0x428e50(0xf2)),_0x428e50(0x100));await _0x4e616e['AwdXg'](removeOpencodePluginConfig,_0x2c6bb8)&&(console[_0x428e50(0x117)](_0x4e616e[_0x428e50(0x102)]),_0x3afe90=!![]);const _0x1b1893=await _0x4e616e[_0x428e50(0x112)](uninstallClaudePlugin);_0x1b1893&&(console[_0x428e50(0x117)](_0x4e616e[_0x428e50(0xea)]),_0x3afe90=!![]);const _0x205d5f=await uninstallClaudePlugin(_0x4e616e['cTqzp']);_0x205d5f&&(console['log'](_0x4e616e['VPPlc']),_0x3afe90=!![]);const _0xa65a31=await removeMarketplace();_0xa65a31&&(console['log'](_0x4e616e[_0x428e50(0xe8)]),_0x3afe90=!![]),_0x3afe90?console[_0x428e50(0x117)](_0x428e50(0x113)):console[_0x428e50(0x117)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- function _0x1087(_0x29cdee,_0xc3db48){_0x29cdee=_0x29cdee-0x103;const _0x360107=_0x3601();let _0x1087c1=_0x360107[_0x29cdee];return _0x1087c1;}const _0x1527de=_0x1087;(function(_0x587789,_0x2082c8){const _0x24d2f4=_0x1087,_0x51ebc1=_0x587789();while(!![]){try{const _0x33c446=parseInt(_0x24d2f4(0x134))/0x1*(-parseInt(_0x24d2f4(0x124))/0x2)+-parseInt(_0x24d2f4(0x136))/0x3*(parseInt(_0x24d2f4(0x123))/0x4)+-parseInt(_0x24d2f4(0x10e))/0x5+parseInt(_0x24d2f4(0x10a))/0x6*(parseInt(_0x24d2f4(0x137))/0x7)+-parseInt(_0x24d2f4(0x11c))/0x8+parseInt(_0x24d2f4(0x122))/0x9+-parseInt(_0x24d2f4(0x110))/0xa*(-parseInt(_0x24d2f4(0x131))/0xb);if(_0x33c446===_0x2082c8)break;else _0x51ebc1['push'](_0x51ebc1['shift']());}catch(_0x253f50){_0x51ebc1['push'](_0x51ebc1['shift']());}}}(_0x3601,0x51d44));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=['headless','allowInsecureLocalhost',_0x1527de(0x109)];function parseLocalValue(_0x2de668,_0x4b7c1b){const _0x57ff30=_0x1527de,_0x1a1f21={'JkSzk':function(_0x2c1439,_0x38d6d4){return _0x2c1439===_0x38d6d4;},'Rygpp':_0x57ff30(0x11d),'GveSI':function(_0x1de1c1,_0x4b6e63){return _0x1de1c1===_0x4b6e63;},'KLQuE':'false'};if(BOOLEAN_KEYS['includes'](_0x2de668)){if(_0x1a1f21['JkSzk'](_0x4b7c1b,_0x1a1f21['Rygpp']))return!![];if(_0x1a1f21[_0x57ff30(0x132)](_0x4b7c1b,_0x1a1f21[_0x57ff30(0x12b)]))return![];throw new Error(_0x57ff30(0x12d)+_0x2de668+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4b7c1b;}function parseOverrideValue(_0x7a832b){const _0x1d34f6=_0x1527de,_0x305725={'uRJSV':function(_0xe5e1ff,_0xf37183){return _0xe5e1ff===_0xf37183;},'ONDsQ':_0x1d34f6(0x11d),'pIUKP':'null','XAjUb':'undefined','EQieH':function(_0x1ce61c,_0xc7f28){return _0x1ce61c(_0xc7f28);}};if(_0x305725[_0x1d34f6(0x11a)](_0x7a832b,_0x305725['ONDsQ']))return!![];if(_0x305725['uRJSV'](_0x7a832b,_0x1d34f6(0x121)))return![];if(_0x7a832b===_0x305725[_0x1d34f6(0x107)])return null;if(_0x7a832b===_0x305725['XAjUb'])return undefined;if(/^-?\d+$/['test'](_0x7a832b)){const _0x2d82a2=_0x305725['EQieH'](Number,_0x7a832b);if(Number[_0x1d34f6(0x11f)](_0x2d82a2))return _0x2d82a2;}if(/^-?\d+\.\d+$/['test'](_0x7a832b)){const _0x43133b=Number(_0x7a832b);if(!Number[_0x1d34f6(0x130)](_0x43133b))return _0x43133b;}const _0x585194=_0x7a832b[_0x1d34f6(0x106)]();if(_0x585194[_0x1d34f6(0x129)]('{')&&_0x585194['endsWith']('}')||_0x585194['startsWith']('[')&&_0x585194['endsWith'](']'))try{return JSON['parse'](_0x585194);}catch{}return _0x7a832b;}function _0x3601(){const _0x10934d=['wzPOM','ioawM','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','trim','pIUKP','Profile\x20\x22','forceLogin','3834xhAkbB','dyJnO','settings','kind','402590PCQyEl','fPvzj','920ObdlNa','Set\x20','log','\x22\x20not\x20found','\x20for\x20\x22','eCZPo','cwd','Key\x20\x22','stringify','cloud','uRJSV','alsoExistsElsewhere','4177992bHcRxW','true','(not\x20set)','isSafeInteger','ynYzs','false','4851063etyswZ','26836gLqfww','893804BNdKnP','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','mocfL','Cleared\x20local\x20overrides\x20for\x20\x22','\x20\x20Note:\x20\x22','startsWith','zJjRL','KLQuE','\x20=\x20','Invalid\x20value\x20for\x20','HRVNe','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','isNaN','36916XECGAj','GveSI','WVwQv','1fOLgEi','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','15VCaPOh','6251DpaVMz'];_0x3601=function(){return _0x10934d;};return _0x3601();}async function resolveProfileTarget(_0x2d537c){const _0x1dd5ae=_0x1527de,_0x1c2c81={'YBFzX':function(_0x478d59,_0x4e34bd){return _0x478d59(_0x4e34bd);},'ynYzs':'local'},_0x26b1b8=existsSync(_0x1c2c81['YBFzX'](getEnvDir,_0x2d537c));let _0x1f8686=![];try{const _0x1c0c09=await fetchCloudProfile(_0x2d537c);_0x1f8686=_0x1c2c81['YBFzX'](Boolean,_0x1c0c09);}catch{}if(_0x1f8686)return{'kind':_0x1dd5ae(0x119),'alsoExistsElsewhere':_0x26b1b8};if(_0x26b1b8)return{'kind':_0x1c2c81[_0x1dd5ae(0x120)],'alsoExistsElsewhere':![]};throw new Error(_0x1dd5ae(0x108)+_0x2d537c+_0x1dd5ae(0x125)+_0x2d537c);}function printDualExistsHint(_0x30bbab){const _0x469171=_0x1527de;console[_0x469171(0x112)](_0x469171(0x128)+_0x30bbab+_0x469171(0x105));}function getProjectPath(){const _0x1a2de1=_0x1527de;return process[_0x1a2de1(0x116)]();}async function loadEffectiveCloudSettings(_0x1b42d2){const _0x58d70f=_0x1527de,_0x2664ab=await fetchCloudProfile(_0x1b42d2),_0x50f9b6=readProfileOverrides(getProjectPath(),_0x1b42d2);return mergeCloudProfileSettings(_0x2664ab?.[_0x58d70f(0x10c)]??{},_0x50f9b6??undefined);}export async function configSet(_0x10defc,_0x15a218,_0x338a72){const _0x41f266=_0x1527de,_0x537618={'mocfL':function(_0x4b8157,_0x4bd7d9){return _0x4b8157(_0x4bd7d9);},'OGjaH':function(_0x5ac114,_0x58ecc5,_0x3454f5,_0x13d76a,_0x191975){return _0x5ac114(_0x58ecc5,_0x3454f5,_0x13d76a,_0x191975);},'xlnmg':function(_0x695da3,_0x325cee,_0x1628ec){return _0x695da3(_0x325cee,_0x1628ec);}},_0x278c92=await resolveProfileTarget(_0x10defc);if(_0x278c92[_0x41f266(0x10d)]===_0x41f266(0x119)){if(_0x278c92[_0x41f266(0x11b)])_0x537618['mocfL'](printDualExistsHint,_0x10defc);const _0x35d965=_0x537618[_0x41f266(0x126)](parseOverrideValue,_0x338a72);_0x537618['OGjaH'](setProfileOverride,getProjectPath(),_0x10defc,_0x15a218,_0x35d965),console['log'](_0x41f266(0x111)+_0x15a218+'\x20=\x20'+JSON['stringify'](_0x35d965)+_0x41f266(0x114)+_0x10defc+'\x22');return;}const _0x46d23d=_0x537618['xlnmg'](parseLocalValue,_0x15a218,_0x338a72);_0x537618['OGjaH'](setProfileOverride,getProjectPath(),_0x10defc,_0x15a218,_0x46d23d),console['log']('Set\x20'+_0x15a218+_0x41f266(0x12c)+_0x46d23d+_0x41f266(0x114)+_0x10defc+'\x22');}export async function configGet(_0x1c20bb,_0x65f55f){const _0x1f3023=_0x1527de,_0x5d909b={'HRVNe':_0x1f3023(0x119),'fPvzj':function(_0x184a43,_0x34d951){return _0x184a43===_0x34d951;},'eCZPo':'object'},_0x2793f0=await resolveProfileTarget(_0x1c20bb);if(_0x2793f0['kind']===_0x5d909b[_0x1f3023(0x12e)]){const _0x351ee3=await loadEffectiveCloudSettings(_0x1c20bb),_0x23981a=getNestedValue(_0x351ee3,_0x65f55f);if(_0x5d909b['fPvzj'](_0x23981a,undefined))console['log'](_0x1f3023(0x11e));else typeof _0x23981a===_0x5d909b['eCZPo']?console['log'](JSON['stringify'](_0x23981a,null,0x2)):console['log'](_0x23981a);return;}const _0x4e9004=await loadSettings(_0x1c20bb),_0x300da0=getNestedValue(_0x4e9004,_0x65f55f);if(_0x300da0===undefined)console['log'](_0x1f3023(0x11e));else _0x5d909b[_0x1f3023(0x10f)](typeof _0x300da0,_0x5d909b[_0x1f3023(0x115)])?console['log'](JSON['stringify'](_0x300da0,null,0x2)):console[_0x1f3023(0x112)](_0x300da0);}export async function configList(_0x645800){const _0x5c1803=_0x1527de,_0x4b0cbd={'dyJnO':function(_0x16557a,_0x38a70a){return _0x16557a(_0x38a70a);},'CkynZ':function(_0x4152f5,_0x4e29e5){return _0x4152f5===_0x4e29e5;},'hpOhU':function(_0x527c3e,_0x4916f8){return _0x527c3e(_0x4916f8);}},_0x4ffa94=await _0x4b0cbd[_0x5c1803(0x10b)](resolveProfileTarget,_0x645800);if(_0x4b0cbd['CkynZ'](_0x4ffa94[_0x5c1803(0x10d)],'cloud')){const _0x157327=await loadEffectiveCloudSettings(_0x645800);if(!_0x157327||Object['keys'](_0x157327)['length']===0x0){console[_0x5c1803(0x112)]('No\x20configuration\x20set\x20for\x20\x22'+_0x645800+'\x22');return;}console['log'](JSON[_0x5c1803(0x118)](_0x157327,null,0x2));return;}const _0x24d9e3=_0x4b0cbd[_0x5c1803(0x10b)](getSettingsPath,_0x645800);if(!existsSync(_0x24d9e3)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x645800+'\x22');return;}const _0x9948a7=await loadSettings(_0x645800),_0x30d42f=_0x4b0cbd['hpOhU'](formatSettings,_0x9948a7);!_0x30d42f?console[_0x5c1803(0x112)]('No\x20configuration\x20set\x20for\x20\x22'+_0x645800+'\x22'):console[_0x5c1803(0x112)](_0x30d42f);}export async function configUnset(_0x36c515,_0x458d5d){const _0x289254=_0x1527de,_0x2046d={'WVwQv':function(_0x3ddcd1,_0x47d1ab){return _0x3ddcd1(_0x47d1ab);},'zJjRL':'cloud','KXPck':function(_0x523f9f,_0x3896e0,_0x3aff16,_0x2f745c){return _0x523f9f(_0x3896e0,_0x3aff16,_0x2f745c);},'OAiHf':function(_0x379f18){return _0x379f18();},'ioawM':function(_0x5338df){return _0x5338df();}},_0x4a8ad8=await _0x2046d[_0x289254(0x133)](resolveProfileTarget,_0x36c515);if(_0x4a8ad8['kind']===_0x2046d[_0x289254(0x12a)]){if(_0x4a8ad8['alsoExistsElsewhere'])printDualExistsHint(_0x36c515);const _0x2a2939=_0x2046d['KXPck'](unsetProfileOverride,_0x2046d['OAiHf'](getProjectPath),_0x36c515,_0x458d5d);_0x2a2939?console['log']('Removed\x20'+_0x458d5d+_0x289254(0x114)+_0x36c515+'\x22'):console[_0x289254(0x112)]('Key\x20\x22'+_0x458d5d+_0x289254(0x113));return;}const _0x2e0495=_0x2046d['KXPck'](unsetProfileOverride,_0x2046d[_0x289254(0x104)](getProjectPath),_0x36c515,_0x458d5d);if(_0x2e0495){console[_0x289254(0x112)]('Removed\x20'+_0x458d5d);return;}const _0x7e8fe=await loadSettings(_0x36c515),_0x43e37f=deleteNestedValue(_0x7e8fe,_0x458d5d);_0x43e37f?console[_0x289254(0x112)]('Key\x20\x22'+_0x458d5d+_0x289254(0x12f)+_0x36c515+_0x289254(0x135)):console['log'](_0x289254(0x117)+_0x458d5d+'\x22\x20not\x20found');}export async function configReset(_0x4ca90f){const _0x3b94a9=_0x1527de,_0x20d06d={'BaePs':function(_0x5dc354,_0x430ced){return _0x5dc354===_0x430ced;},'wzPOM':_0x3b94a9(0x119),'RKgHx':function(_0x394744,_0x511073,_0x12a26b){return _0x394744(_0x511073,_0x12a26b);}},_0x15dada=await resolveProfileTarget(_0x4ca90f);if(_0x20d06d['BaePs'](_0x15dada[_0x3b94a9(0x10d)],_0x20d06d[_0x3b94a9(0x103)])){_0x20d06d['RKgHx'](resetProfileOverrides,getProjectPath(),_0x4ca90f),console['log'](_0x3b94a9(0x127)+_0x4ca90f+'\x22');return;}console[_0x3b94a9(0x112)]('\x22'+_0x4ca90f+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x4ca90f+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x3540ab=_0xaf3e;(function(_0x121e8a,_0x1cb339){const _0x339701=_0xaf3e,_0x5a80e6=_0x121e8a();while(!![]){try{const _0x11b80c=parseInt(_0x339701(0x155))/0x1+parseInt(_0x339701(0x145))/0x2*(parseInt(_0x339701(0x14c))/0x3)+-parseInt(_0x339701(0x158))/0x4*(parseInt(_0x339701(0x14e))/0x5)+parseInt(_0x339701(0x15d))/0x6*(parseInt(_0x339701(0x15c))/0x7)+-parseInt(_0x339701(0x170))/0x8+-parseInt(_0x339701(0x165))/0x9*(-parseInt(_0x339701(0x161))/0xa)+parseInt(_0x339701(0x159))/0xb*(-parseInt(_0x339701(0x141))/0xc);if(_0x11b80c===_0x1cb339)break;else _0x5a80e6['push'](_0x5a80e6['shift']());}catch(_0x40de29){_0x5a80e6['push'](_0x5a80e6['shift']());}}}(_0x1984,0xbe33a));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=[_0x3540ab(0x15f),'allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x2cd629,_0x4c5a95){const _0x178923=_0x3540ab,_0x14c394={'kLPzk':function(_0x3b1434,_0x5b08f9){return _0x3b1434===_0x5b08f9;},'BHyeH':_0x178923(0x14d)};if(BOOLEAN_KEYS[_0x178923(0x14b)](_0x2cd629)){if(_0x14c394[_0x178923(0x171)](_0x4c5a95,_0x178923(0x14a)))return!![];if(_0x4c5a95===_0x14c394['BHyeH'])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2cd629+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4c5a95;}function parseOverrideValue(_0x5ab95b){const _0x5a78e0=_0x3540ab,_0x3eedad={'QWuPk':_0x5a78e0(0x167),'xeePt':_0x5a78e0(0x16c)};if(_0x5ab95b==='true')return!![];if(_0x5ab95b===_0x5a78e0(0x14d))return![];if(_0x5ab95b===_0x3eedad['QWuPk'])return null;if(_0x5ab95b===_0x3eedad[_0x5a78e0(0x163)])return undefined;if(/^-?\d+$/['test'](_0x5ab95b)){const _0x163d09=Number(_0x5ab95b);if(Number[_0x5a78e0(0x157)](_0x163d09))return _0x163d09;}if(/^-?\d+\.\d+$/[_0x5a78e0(0x13f)](_0x5ab95b)){const _0x207164=Number(_0x5ab95b);if(!Number[_0x5a78e0(0x16b)](_0x207164))return _0x207164;}const _0x43ae02=_0x5ab95b['trim']();if(_0x43ae02['startsWith']('{')&&_0x43ae02[_0x5a78e0(0x15a)]('}')||_0x43ae02[_0x5a78e0(0x173)]('[')&&_0x43ae02['endsWith'](']'))try{return JSON[_0x5a78e0(0x164)](_0x43ae02);}catch{}return _0x5ab95b;}function _0xaf3e(_0x236dab,_0x146c5a){_0x236dab=_0x236dab-0x13c;const _0x19844c=_0x1984();let _0xaf3eb4=_0x19844c[_0x236dab];return _0xaf3eb4;}async function resolveProfileTarget(_0x4e01cb){const _0x419936=_0x3540ab,_0x2e0be8={'ItpVc':function(_0x1477f7,_0x29a282){return _0x1477f7(_0x29a282);},'iBNYH':function(_0x858ec4,_0x15a77c){return _0x858ec4(_0x15a77c);}},_0x2cb273=_0x2e0be8[_0x419936(0x16f)](existsSync,_0x2e0be8['iBNYH'](getEnvDir,_0x4e01cb));let _0x443be3=![];try{const _0x249cae=await fetchCloudProfile(_0x4e01cb);_0x443be3=_0x2e0be8['iBNYH'](Boolean,_0x249cae);}catch{}if(_0x443be3)return{'kind':_0x419936(0x142),'alsoExistsElsewhere':_0x2cb273};if(_0x2cb273)return{'kind':_0x419936(0x14f),'alsoExistsElsewhere':![]};throw new Error(_0x419936(0x16d)+_0x4e01cb+_0x419936(0x148)+_0x4e01cb);}function printDualExistsHint(_0x1796f8){const _0x585873=_0x3540ab;console[_0x585873(0x15e)](_0x585873(0x146)+_0x1796f8+_0x585873(0x16e));}function _0x1984(){const _0x4e46dd=['isSafeInteger','1589620nEtWdj','11iAVLec','endsWith','\x20for\x20\x22','7sbJTWI','5764542wpoOSb','log','headless','Set\x20','1553890jxoYOu','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','xeePt','parse','45nwFCAb','bkwgy','null','kind','alsoExistsElsewhere','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','isNaN','undefined','Profile\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','ItpVc','7763728uVclls','kLPzk','stringify','startsWith','GdbBm','rdNpI','ffxEi','Key\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','object','test','cwd','23689428cJbeVl','cloud','GdVld','fJRkP','138004GBOdnI','\x20\x20Note:\x20\x22','gYtTI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','No\x20configuration\x20set\x20for\x20\x22','true','includes','51ESmtkJ','false','5QiHqUQ','local','IFQBo','Removed\x20','pzcvm','UlaYO','PiQex','1210320akvyNZ','keys'];_0x1984=function(){return _0x4e46dd;};return _0x1984();}function getProjectPath(){const _0x18ea9d=_0x3540ab;return process[_0x18ea9d(0x140)]();}async function loadEffectiveCloudSettings(_0x2f7279){const _0x1b94b5={'jQlzK':function(_0x22ebdd,_0xd24b3d,_0x2fc935){return _0x22ebdd(_0xd24b3d,_0x2fc935);},'ajpwi':function(_0x5b8959){return _0x5b8959();},'ngdmD':function(_0x43e188,_0x30b8f4){return _0x43e188??_0x30b8f4;}},_0xbf954f=await fetchCloudProfile(_0x2f7279),_0x2b31e3=_0x1b94b5['jQlzK'](readProfileOverrides,_0x1b94b5['ajpwi'](getProjectPath),_0x2f7279);return mergeCloudProfileSettings(_0xbf954f?.['settings']??{},_0x1b94b5['ngdmD'](_0x2b31e3,undefined));}export async function configSet(_0x33fe81,_0x2e21d7,_0x14352f){const _0x84e1f8=_0x3540ab,_0x32319a={'GdbBm':function(_0xd555de,_0x42b255){return _0xd555de(_0x42b255);},'gYtTI':function(_0x2f4a3d,_0x112a88,_0x55ccd3,_0x577ebf,_0x2aae5d){return _0x2f4a3d(_0x112a88,_0x55ccd3,_0x577ebf,_0x2aae5d);},'bkwgy':function(_0x55bc1f){return _0x55bc1f();}},_0x2fbe54=await resolveProfileTarget(_0x33fe81);if(_0x2fbe54['kind']===_0x84e1f8(0x142)){if(_0x2fbe54[_0x84e1f8(0x169)])_0x32319a[_0x84e1f8(0x174)](printDualExistsHint,_0x33fe81);const _0x49a9b4=_0x32319a['GdbBm'](parseOverrideValue,_0x14352f);_0x32319a[_0x84e1f8(0x147)](setProfileOverride,_0x32319a[_0x84e1f8(0x166)](getProjectPath),_0x33fe81,_0x2e21d7,_0x49a9b4),console[_0x84e1f8(0x15e)](_0x84e1f8(0x160)+_0x2e21d7+'\x20=\x20'+JSON[_0x84e1f8(0x172)](_0x49a9b4)+_0x84e1f8(0x15b)+_0x33fe81+'\x22');return;}const _0x4cf27b=parseLocalValue(_0x2e21d7,_0x14352f);setProfileOverride(_0x32319a['bkwgy'](getProjectPath),_0x33fe81,_0x2e21d7,_0x4cf27b),console['log']('Set\x20'+_0x2e21d7+'\x20=\x20'+_0x4cf27b+'\x20for\x20\x22'+_0x33fe81+'\x22');}export async function configGet(_0x43cc37,_0x4a15f7){const _0x4e51a6=_0x3540ab,_0x30ed76={'IFQBo':function(_0x28d226,_0x771e89){return _0x28d226(_0x771e89);},'PiQex':'cloud','rdNpI':_0x4e51a6(0x13e),'UlaYO':function(_0x3d23cd,_0x5a8957){return _0x3d23cd===_0x5a8957;},'EHpsn':function(_0x3c7bd0,_0xa9582e){return _0x3c7bd0===_0xa9582e;}},_0x4d4bde=await _0x30ed76['IFQBo'](resolveProfileTarget,_0x43cc37);if(_0x4d4bde['kind']===_0x30ed76[_0x4e51a6(0x154)]){const _0x550f6c=await _0x30ed76[_0x4e51a6(0x150)](loadEffectiveCloudSettings,_0x43cc37),_0x3718c3=getNestedValue(_0x550f6c,_0x4a15f7);if(_0x3718c3===undefined)console['log']('(not\x20set)');else typeof _0x3718c3===_0x30ed76[_0x4e51a6(0x175)]?console[_0x4e51a6(0x15e)](JSON[_0x4e51a6(0x172)](_0x3718c3,null,0x2)):console['log'](_0x3718c3);return;}const _0x4e387c=await loadSettings(_0x43cc37),_0x23e898=getNestedValue(_0x4e387c,_0x4a15f7);if(_0x30ed76[_0x4e51a6(0x153)](_0x23e898,undefined))console[_0x4e51a6(0x15e)]('(not\x20set)');else _0x30ed76['EHpsn'](typeof _0x23e898,_0x4e51a6(0x13e))?console['log'](JSON[_0x4e51a6(0x172)](_0x23e898,null,0x2)):console[_0x4e51a6(0x15e)](_0x23e898);}export async function configList(_0x46074b){const _0x375b27=_0x3540ab,_0x5d4f14={'QLYTS':function(_0x1bd7ed,_0x502a23){return _0x1bd7ed===_0x502a23;},'ttsry':function(_0x2b3164,_0x5310c5){return _0x2b3164(_0x5310c5);},'GdVld':function(_0x16fd7c,_0x10eb90){return _0x16fd7c(_0x10eb90);}},_0x4955d3=await resolveProfileTarget(_0x46074b);if(_0x5d4f14['QLYTS'](_0x4955d3['kind'],'cloud')){const _0x50fae7=await loadEffectiveCloudSettings(_0x46074b);if(!_0x50fae7||_0x5d4f14['QLYTS'](Object[_0x375b27(0x156)](_0x50fae7)['length'],0x0)){console[_0x375b27(0x15e)]('No\x20configuration\x20set\x20for\x20\x22'+_0x46074b+'\x22');return;}console['log'](JSON['stringify'](_0x50fae7,null,0x2));return;}const _0x3bfdf0=getSettingsPath(_0x46074b);if(!_0x5d4f14['ttsry'](existsSync,_0x3bfdf0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x46074b+'\x22');return;}const _0x5512ac=await _0x5d4f14[_0x375b27(0x143)](loadSettings,_0x46074b),_0x2c75c0=_0x5d4f14[_0x375b27(0x143)](formatSettings,_0x5512ac);!_0x2c75c0?console['log'](_0x375b27(0x149)+_0x46074b+'\x22'):console[_0x375b27(0x15e)](_0x2c75c0);}export async function configUnset(_0x24917f,_0x2ca180){const _0x1b0849=_0x3540ab,_0x2cd6fd={'ffxEi':function(_0x3ae3e0,_0x44566b){return _0x3ae3e0(_0x44566b);},'fJRkP':_0x1b0849(0x142),'pzcvm':function(_0x17c971,_0x4df99f){return _0x17c971(_0x4df99f);},'JAPDP':function(_0x5bc1af,_0x126fd5,_0x5a6d7d){return _0x5bc1af(_0x126fd5,_0x5a6d7d);}},_0x256c6a=await _0x2cd6fd[_0x1b0849(0x176)](resolveProfileTarget,_0x24917f);if(_0x256c6a['kind']===_0x2cd6fd[_0x1b0849(0x144)]){if(_0x256c6a['alsoExistsElsewhere'])_0x2cd6fd['ffxEi'](printDualExistsHint,_0x24917f);const _0x2524a6=unsetProfileOverride(getProjectPath(),_0x24917f,_0x2ca180);_0x2524a6?console['log']('Removed\x20'+_0x2ca180+'\x20for\x20\x22'+_0x24917f+'\x22'):console['log']('Key\x20\x22'+_0x2ca180+'\x22\x20not\x20found');return;}const _0x5b2b7a=unsetProfileOverride(getProjectPath(),_0x24917f,_0x2ca180);if(_0x5b2b7a){console['log'](_0x1b0849(0x151)+_0x2ca180);return;}const _0xde21c9=await _0x2cd6fd[_0x1b0849(0x152)](loadSettings,_0x24917f),_0xe15279=_0x2cd6fd['JAPDP'](deleteNestedValue,_0xde21c9,_0x2ca180);_0xe15279?console[_0x1b0849(0x15e)](_0x1b0849(0x13c)+_0x2ca180+_0x1b0849(0x162)+_0x24917f+_0x1b0849(0x16a)):console[_0x1b0849(0x15e)]('Key\x20\x22'+_0x2ca180+'\x22\x20not\x20found');}export async function configReset(_0x33f161){const _0x3ef9fa=_0x3540ab,_0x39ca16={'CKDrb':function(_0x1734cc,_0x129f90){return _0x1734cc(_0x129f90);},'KXKaj':function(_0x3aa31a,_0x1c09c6){return _0x3aa31a===_0x1c09c6;}},_0x4f14f4=await _0x39ca16['CKDrb'](resolveProfileTarget,_0x33f161);if(_0x39ca16['KXKaj'](_0x4f14f4[_0x3ef9fa(0x168)],_0x3ef9fa(0x142))){resetProfileOverrides(getProjectPath(),_0x33f161),console[_0x3ef9fa(0x15e)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x33f161+'\x22');return;}console[_0x3ef9fa(0x15e)]('\x22'+_0x33f161+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x33f161+_0x3ef9fa(0x13d));}
@@ -1 +1 @@
1
- (function(_0x3ef4eb,_0x37c5fa){const _0x211842=_0x3fab,_0x13aece=_0x3ef4eb();while(!![]){try{const _0x162bc7=-parseInt(_0x211842(0xb8))/0x1*(parseInt(_0x211842(0xa7))/0x2)+parseInt(_0x211842(0xba))/0x3*(parseInt(_0x211842(0xb4))/0x4)+-parseInt(_0x211842(0xa9))/0x5*(parseInt(_0x211842(0xac))/0x6)+parseInt(_0x211842(0xaa))/0x7*(parseInt(_0x211842(0xb7))/0x8)+parseInt(_0x211842(0xb5))/0x9+-parseInt(_0x211842(0xb0))/0xa+parseInt(_0x211842(0xab))/0xb*(parseInt(_0x211842(0xb1))/0xc);if(_0x162bc7===_0x37c5fa)break;else _0x13aece['push'](_0x13aece['shift']());}catch(_0x13cf11){_0x13aece['push'](_0x13aece['shift']());}}}(_0x17ab,0xd45e8));import _0x37d38b from'inquirer';function _0x3fab(_0x50fda7,_0x57fa4c){_0x50fda7=_0x50fda7-0xa6;const _0x17abef=_0x17ab();let _0x3fab64=_0x17abef[_0x50fda7];return _0x3fab64;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x17ab(){const _0x908001=['CBvQQ','\x22\x20not\x20found.','4209280xvhMmA','30516izamEZ','\x22\x20to\x20confirm\x20deletion:','confirmation','3424412jVBOjB','12982527rUlqUN','Type\x20\x22','1356648wZRiPD','3593GAuLQi','yes','3mmABxA','cwd','568uYemkK','prompt','81585bDShQb','7CbjUvl','5038HPMeVe','486Ooaxtr','log'];_0x17ab=function(){return _0x908001;};return _0x17ab();}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x54fe84,_0x2b8726={}){const _0x4aca4c=_0x3fab,_0x2775ca={'CBvQQ':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','BTRAm':'input','Fltpr':function(_0x33dfb7,_0x487d97){return _0x33dfb7(_0x487d97);},'iMzKK':function(_0x55c731,_0x5e4320,_0x2cfa6b){return _0x55c731(_0x5e4320,_0x2cfa6b);},'IwaEw':function(_0x5e6440,_0xf1b72b,_0x330b0a){return _0x5e6440(_0xf1b72b,_0x330b0a);}},_0x3ddef9=await fetchCloudProfile(_0x54fe84);if(!_0x3ddef9)throw new Error('Cloud\x20profile\x20\x22'+_0x54fe84+_0x4aca4c(0xaf));if(!_0x2b8726[_0x4aca4c(0xb9)]&&!isInteractive())throw new Error(_0x2775ca[_0x4aca4c(0xae)]);console[_0x4aca4c(0xad)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x54fe84+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x2b8726['yes']){const {confirmation:_0x4d0694}=await _0x37d38b[_0x4aca4c(0xa8)]([{'type':_0x2775ca['BTRAm'],'name':_0x4aca4c(0xb3),'message':_0x4aca4c(0xb6)+_0x54fe84+_0x4aca4c(0xb2)}]);if(_0x4d0694!==_0x54fe84)throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await _0x2775ca['Fltpr'](deleteCloudProfile,_0x54fe84),_0x2775ca['iMzKK'](resetProfileOverrides,process['cwd'](),_0x54fe84),_0x2775ca['IwaEw'](clearLastProfile,process[_0x4aca4c(0xa6)](),_0x54fe84),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x54fe84+'\x22.');}
1
+ (function(_0x22f1a0,_0x4c9aef){const _0x51ace4=_0xeb1d,_0x2d5166=_0x22f1a0();while(!![]){try{const _0xe12270=parseInt(_0x51ace4(0xb9))/0x1*(parseInt(_0x51ace4(0xc2))/0x2)+-parseInt(_0x51ace4(0xc5))/0x3*(-parseInt(_0x51ace4(0xc7))/0x4)+parseInt(_0x51ace4(0xca))/0x5+parseInt(_0x51ace4(0xce))/0x6*(parseInt(_0x51ace4(0xc9))/0x7)+-parseInt(_0x51ace4(0xcb))/0x8*(parseInt(_0x51ace4(0xba))/0x9)+-parseInt(_0x51ace4(0xbf))/0xa*(-parseInt(_0x51ace4(0xcc))/0xb)+parseInt(_0x51ace4(0xcf))/0xc*(-parseInt(_0x51ace4(0xc3))/0xd);if(_0xe12270===_0x4c9aef)break;else _0x2d5166['push'](_0x2d5166['shift']());}catch(_0x5ac249){_0x2d5166['push'](_0x2d5166['shift']());}}}(_0x4afc,0x8f960));import _0x53dd10 from'inquirer';function _0xeb1d(_0x227875,_0x56c221){_0x227875=_0x227875-0xb9;const _0x4afcb0=_0x4afc();let _0xeb1d0e=_0x4afcb0[_0x227875];return _0xeb1d0e;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x4afc(){const _0xc7d6b8=['input','71730TDXQaf','34385806rOEFLb','\x22\x20for\x20everyone\x20in\x20your\x20organization.','3WNgulX','✓\x20Deleted\x20cloud\x20profile\x20\x22','2467988kCqTZx','\x22\x20to\x20confirm\x20deletion:','94087kxHhzp','4314420VpZGmc','168SnPKMK','1265tAUUUE','log','432dhtApQ','12RpclkZ','25dSXXUo','162387CbDaDH','\x22\x20not\x20found.','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','VECzS','confirmation','23290hDLwFl','yes'];_0x4afc=function(){return _0xc7d6b8;};return _0x4afc();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x6a3263,_0x28560b={}){const _0x265a16=_0xeb1d,_0xf9b64c={'tFRNN':function(_0x294ac8,_0x437402){return _0x294ac8(_0x437402);},'VECzS':_0x265a16(0xbc)},_0x47c345=await _0xf9b64c['tFRNN'](fetchCloudProfile,_0x6a3263);if(!_0x47c345)throw new Error('Cloud\x20profile\x20\x22'+_0x6a3263+_0x265a16(0xbb));if(!_0x28560b[_0x265a16(0xc0)]&&!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[_0x265a16(0xcd)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x6a3263+_0x265a16(0xc4));if(!_0x28560b['yes']){const {confirmation:_0x34f634}=await _0x53dd10['prompt']([{'type':_0x265a16(0xc1),'name':_0x265a16(0xbe),'message':'Type\x20\x22'+_0x6a3263+_0x265a16(0xc8)}]);if(_0x34f634!==_0x6a3263)throw new Error(_0xf9b64c[_0x265a16(0xbd)]);}await _0xf9b64c['tFRNN'](deleteCloudProfile,_0x6a3263),resetProfileOverrides(process['cwd'](),_0x6a3263),clearLastProfile(process['cwd'](),_0x6a3263),console[_0x265a16(0xcd)](_0x265a16(0xc6)+_0x6a3263+'\x22.');}
@@ -1 +1 @@
1
- function _0x4f9d(){const _0x511a73=['todOJ','length','\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20URL:\x20','141780wqpWZn','includes','sessionUpdatedAt','\x0aLocal\x20Profiles\x20(legacy):','keys','sort','hmUAH','130zwUvCK','sessions','vFVSb','push','legacy','some','endsWith','bug-bashes','error','673694wylsgc','localeCompare','startsWith','has','reports','rEaDH','1561840mewISH','environmentKey','vTiUL','Hudwg','1888956zAFMUI','name','\x20\x20\x20\x20\x20\x20Details:\x20','ilDsa','isDirectory','\x20\x20\x20\x20Session:\x20','get','local','\x0aNo\x20profiles\x20found.','cached\x20(updated\x20','message','2GNxFoD','2548926kKSbGN','2859405lhGJUb','7Yrfevd','log','no\x20session','\x0a*\x20=\x20active\x20profile','1556420gtfoDr','\x0a\x20\x20'];_0x4f9d=function(){return _0x511a73;};return _0x4f9d();}const _0x58f667=_0x4dc4;(function(_0x278950,_0x33fe65){const _0x3f9863=_0x4dc4,_0x1515fa=_0x278950();while(!![]){try{const _0x1aed46=parseInt(_0x3f9863(0x138))/0x1*(-parseInt(_0x3f9863(0x14d))/0x2)+-parseInt(_0x3f9863(0x15a))/0x3+-parseInt(_0x3f9863(0x154))/0x4+-parseInt(_0x3f9863(0x14f))/0x5+-parseInt(_0x3f9863(0x14e))/0x6+parseInt(_0x3f9863(0x150))/0x7*(-parseInt(_0x3f9863(0x13e))/0x8)+parseInt(_0x3f9863(0x142))/0x9*(parseInt(_0x3f9863(0x161))/0xa);if(_0x1aed46===_0x33fe65)break;else _0x1515fa['push'](_0x1515fa['shift']());}catch(_0x2a5591){_0x1515fa['push'](_0x1515fa['shift']());}}}(_0x4f9d,0x68205));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x4dc4(_0x198731,_0x82dbf8){_0x198731=_0x198731-0x132;const _0x4f9d68=_0x4f9d();let _0x4dc41a=_0x4f9d68[_0x198731];return _0x4dc41a;}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x58f667(0x162),_0x58f667(0x136),_0x58f667(0x13c),'local','ci'];export function shouldGroupByEnvironment(_0x430e53){const _0x2b8f95=_0x58f667;return _0x430e53[_0x2b8f95(0x134)](_0x2e627c=>_0x2e627c[_0x2b8f95(0x13f)]);}export function groupCloudProfilesByEnvironment(_0x483177){const _0x53cc7b=_0x58f667,_0x3ec867=new Map();for(const _0x2696aa of _0x483177){const _0x1a2827=_0x2696aa[_0x53cc7b(0x13f)]??null,_0x28c0b4=_0x3ec867['get'](_0x1a2827);if(_0x28c0b4)_0x28c0b4['push'](_0x2696aa);else _0x3ec867['set'](_0x1a2827,[_0x2696aa]);}const _0x3710dd=[..._0x3ec867[_0x53cc7b(0x15e)]()][_0x53cc7b(0x15f)]((_0x12e877,_0x1a151f)=>{const _0x27a24c=_0x53cc7b;if(_0x12e877===null)return 0x1;if(_0x1a151f===null)return-0x1;return _0x12e877[_0x27a24c(0x139)](_0x1a151f);});return _0x3710dd['map'](_0x4693e3=>({'environmentKey':_0x4693e3,'profiles':_0x3ec867[_0x53cc7b(0x148)](_0x4693e3)[_0x53cc7b(0x15f)]((_0x3c3e9e,_0x5023fc)=>_0x3c3e9e[_0x53cc7b(0x143)]['localeCompare'](_0x5023fc['name']))}));}export async function getEnvNames(){const _0xb4a1a3=_0x58f667,_0x574e61={'vFVSb':_0xb4a1a3(0x149),'jMZHe':function(_0xec8a31,_0x56a26b){return _0xec8a31(_0x56a26b);},'vTiUL':function(_0x15c188,_0x16cddb){return _0x15c188(_0x16cddb);},'todOJ':function(_0x462e1a,_0x3b281a){return _0x462e1a(_0x3b281a);},'hmUAH':function(_0x7523d0,_0x1c11be,_0x3437ca){return _0x7523d0(_0x1c11be,_0x3437ca);},'Hudwg':function(_0x1a63ec,_0x14bfb9){return _0x1a63ec(_0x14bfb9);},'rEaDH':function(_0x2bd1e8,_0x4ed1d2){return _0x2bd1e8(_0x4ed1d2);},'kvGoV':'.txt','TWxJC':_0xb4a1a3(0x133)},_0x32cd20=getRangerDir();if(!existsSync(_0x32cd20))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x15c766=await readActiveProfileName(),_0x188b00=[],_0xfa0d43={},_0x3d592a=join(_0x32cd20,_0x574e61[_0xb4a1a3(0x163)]);if(existsSync(_0x3d592a)){const _0x201cc1=await _0x574e61['jMZHe'](readdir,_0x3d592a);for(const _0x56c77d of _0x201cc1){const _0x320e2e=join(_0x3d592a,_0x56c77d),_0x37fc83=await _0x574e61['vTiUL'](stat,_0x320e2e);_0x37fc83[_0xb4a1a3(0x146)]()&&(_0x188b00[_0xb4a1a3(0x132)](_0x56c77d),_0xfa0d43[_0x56c77d]=_0x574e61[_0xb4a1a3(0x163)]);}}const _0x3ad596=join(_0x32cd20,'ci');if(existsSync(_0x3ad596)){const _0x5f3386=await _0x574e61[_0xb4a1a3(0x156)](readdir,_0x3ad596);for(const _0x5ee23a of _0x5f3386){const _0x407f22=_0x574e61[_0xb4a1a3(0x160)](join,_0x3ad596,_0x5ee23a),_0x467a77=await _0x574e61[_0xb4a1a3(0x141)](stat,_0x407f22);_0x467a77['isDirectory']()&&(_0x188b00[_0xb4a1a3(0x132)](_0x5ee23a),_0xfa0d43[_0x5ee23a]='ci');}}const _0x4e8752=await _0x574e61[_0xb4a1a3(0x13d)](readdir,_0x32cd20);for(const _0x28150c of _0x4e8752){if(NON_ENV_DIRS['includes'](_0x28150c))continue;if(_0x28150c[_0xb4a1a3(0x13a)]('.'))continue;if(_0x28150c[_0xb4a1a3(0x135)](_0x574e61['kvGoV']))continue;const _0x3253e2=join(_0x32cd20,_0x28150c),_0xacb2ea=await stat(_0x3253e2);_0xacb2ea['isDirectory']()&&_0x574e61[_0xb4a1a3(0x140)](existsSync,join(_0x3253e2,'settings.json'))&&(!_0x188b00[_0xb4a1a3(0x15b)](_0x28150c)&&(_0x188b00[_0xb4a1a3(0x132)](_0x28150c),_0xfa0d43[_0x28150c]=_0x574e61['TWxJC']));}return{'envNames':_0x188b00,'activeEnv':_0x15c766,'envTypes':_0xfa0d43};}export async function envList(){const _0x1dc028=_0x58f667,_0x480f28={'cxUUY':function(_0x172cab,_0x3ccf91){return _0x172cab(_0x3ccf91);},'RqOkS':function(_0x3f30e8,_0x4c1806){return _0x3f30e8===_0x4c1806;},'kVECa':_0x1dc028(0x14a),'LrylZ':function(_0x27e705,_0x8ddb8f){return _0x27e705>_0x8ddb8f;},'ilDsa':'local','sNUHH':function(_0x49b8b7,_0x2e10f3){return _0x49b8b7===_0x2e10f3;},'dENyM':'\x0aCloud\x20Profiles\x20(by\x20environment):','dbGhq':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)'},{envNames:_0x6fae62,activeEnv:_0x4cf77e,envTypes:_0x9ae46c}=await getEnvNames();let _0x2c3998=[];const _0x325b29=await getToken();if(_0x325b29)try{_0x2c3998=await listCloudProfiles();}catch(_0x22d4e2){console[_0x1dc028(0x137)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x22d4e2 instanceof Error?_0x22d4e2[_0x1dc028(0x14c)]:_0x480f28['cxUUY'](String,_0x22d4e2)));}if(_0x480f28['RqOkS'](_0x6fae62[_0x1dc028(0x157)],0x0)&&_0x2c3998['length']===0x0){console[_0x1dc028(0x151)](_0x480f28['kVECa']),console[_0x1dc028(0x151)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x5cbc2b=new Set(_0x2c3998['map'](_0x5b70b9=>_0x5b70b9['name']));if(_0x480f28['LrylZ'](_0x6fae62[_0x1dc028(0x157)],0x0)){console['log'](_0x1dc028(0x15d));for(const _0xb115d6 of _0x6fae62['sort']()){const _0x2e8bfe=_0xb115d6===_0x4cf77e&&!_0x5cbc2b[_0x1dc028(0x13b)](_0xb115d6),_0x128b8f=_0x9ae46c[_0xb115d6]||_0x480f28[_0x1dc028(0x145)],_0x995241=await loadSettings(_0xb115d6),_0x3a90bc=_0x480f28['sNUHH'](_0x128b8f,'legacy')?'':'\x20['+_0x128b8f+']';console[_0x1dc028(0x151)]('\x20\x20'+(_0x2e8bfe?'*\x20':'\x20\x20')+_0xb115d6+_0x3a90bc),_0x995241['baseUrl']&&console['log'](_0x1dc028(0x159)+_0x995241['baseUrl']),_0x995241['environmentDetails']&&console['log'](_0x1dc028(0x144)+_0x995241['environmentDetails']);}}const _0x533e71=(_0x1bda8f,_0x5a6aa3)=>{const _0x495056=_0x1dc028,_0x167c75=_0x1bda8f['name']===_0x4cf77e,_0x3bf2e3=_0x1bda8f['sessionUpdatedAt']?_0x495056(0x14b)+_0x1bda8f[_0x495056(0x15c)]+')':_0x495056(0x152);console[_0x495056(0x151)](''+_0x5a6aa3+(_0x167c75?'*\x20':'\x20\x20')+_0x1bda8f['name']),console[_0x495056(0x151)](_0x5a6aa3+_0x495056(0x147)+_0x3bf2e3);};if(_0x2c3998['length']>0x0){if(shouldGroupByEnvironment(_0x2c3998)){console[_0x1dc028(0x151)](_0x480f28['dENyM']);for(const _0x28f15e of groupCloudProfilesByEnvironment(_0x2c3998)){const _0x4b326e=_0x28f15e[_0x1dc028(0x13f)]??_0x480f28['dbGhq'];console['log'](_0x1dc028(0x155)+_0x4b326e);for(const _0x21007f of _0x28f15e['profiles']){_0x533e71(_0x21007f,_0x1dc028(0x158));}}}else{console[_0x1dc028(0x151)]('\x0aCloud\x20Profiles:');for(const _0x888eeb of[..._0x2c3998][_0x1dc028(0x15f)]((_0x231f6c,_0x251fd6)=>_0x231f6c['name']['localeCompare'](_0x251fd6['name']))){_0x533e71(_0x888eeb,'\x20\x20');}}}_0x4cf77e&&console['log'](_0x1dc028(0x153));}
1
+ const _0x5ae571=_0xab25;(function(_0x588e56,_0x475f49){const _0x57ad2a=_0xab25,_0xcba12f=_0x588e56();while(!![]){try{const _0x3a7f7e=parseInt(_0x57ad2a(0x10a))/0x1*(-parseInt(_0x57ad2a(0x10d))/0x2)+parseInt(_0x57ad2a(0x119))/0x3*(-parseInt(_0x57ad2a(0x12d))/0x4)+-parseInt(_0x57ad2a(0x113))/0x5+-parseInt(_0x57ad2a(0x109))/0x6+parseInt(_0x57ad2a(0x120))/0x7+parseInt(_0x57ad2a(0x11c))/0x8*(parseInt(_0x57ad2a(0x127))/0x9)+parseInt(_0x57ad2a(0x110))/0xa;if(_0x3a7f7e===_0x475f49)break;else _0xcba12f['push'](_0xcba12f['shift']());}catch(_0x28be0e){_0xcba12f['push'](_0xcba12f['shift']());}}}(_0x56b6,0xea945));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x5ae571(0x115),'reports',_0x5ae571(0x112),'ci'];export function shouldGroupByEnvironment(_0x1b0a3b){const _0x31e1fc=_0x5ae571;return _0x1b0a3b[_0x31e1fc(0x126)](_0x1341a1=>_0x1341a1[_0x31e1fc(0x130)]);}function _0x56b6(){const _0x12d831=['local','4245310IssBSX','ATncA','bug-bashes','baseUrl','legacy','profiles','41556DfgpUZ','\x0aNo\x20profiles\x20found.','length','293208GuLeBI','environmentDetails','fqNgH','gZZum','8307978TaDCjd','set','\x0a*\x20=\x20active\x20profile','log','\x20\x20\x20\x20\x20\x20Details:\x20','nZxNY','some','261VMpyAa','\x0aCloud\x20Profiles:','keys','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','get','message','88friQoS','startsWith','yqSRP','environmentKey','efMjE','name','endsWith','qgAHq','isDirectory','2378802cuidpu','56iQTURQ','includes','localeCompare','15136BwkNyF','push','sort','6851850MAuECb','map'];_0x56b6=function(){return _0x12d831;};return _0x56b6();}export function groupCloudProfilesByEnvironment(_0x349cf5){const _0x27c44b=_0x5ae571,_0x203838={'CjqKh':function(_0x1f8651,_0x1ffe6e){return _0x1f8651===_0x1ffe6e;},'wKoQc':function(_0x5a746c,_0x420707){return _0x5a746c===_0x420707;}},_0x23df27=new Map();for(const _0x5ab948 of _0x349cf5){const _0x25b3d2=_0x5ab948[_0x27c44b(0x130)]??null,_0x58cfba=_0x23df27[_0x27c44b(0x12b)](_0x25b3d2);if(_0x58cfba)_0x58cfba[_0x27c44b(0x10e)](_0x5ab948);else _0x23df27[_0x27c44b(0x121)](_0x25b3d2,[_0x5ab948]);}const _0x5a2d17=[..._0x23df27[_0x27c44b(0x129)]()]['sort']((_0x4a8097,_0x5894d5)=>{const _0x36129d=_0x27c44b;if(_0x203838['CjqKh'](_0x4a8097,null))return 0x1;if(_0x203838['wKoQc'](_0x5894d5,null))return-0x1;return _0x4a8097[_0x36129d(0x10c)](_0x5894d5);});return _0x5a2d17[_0x27c44b(0x111)](_0x55f1a3=>({'environmentKey':_0x55f1a3,'profiles':_0x23df27['get'](_0x55f1a3)[_0x27c44b(0x10f)]((_0x22aa6d,_0x5c2368)=>_0x22aa6d['name'][_0x27c44b(0x10c)](_0x5c2368['name']))}));}function _0xab25(_0x5f138e,_0x541911){_0x5f138e=_0x5f138e-0x109;const _0x56b6e9=_0x56b6();let _0xab25b=_0x56b6e9[_0x5f138e];return _0xab25b;}export async function getEnvNames(){const _0x5d7435=_0x5ae571,_0xecaf95={'TtNUH':function(_0x235c8b){return _0x235c8b();},'gZZum':function(_0x2f4589,_0x4148f3){return _0x2f4589(_0x4148f3);},'eOddd':'local','BuUJM':function(_0x330b8d,_0x58ec6c,_0x22f5ea){return _0x330b8d(_0x58ec6c,_0x22f5ea);},'ATncA':function(_0x1e8a35,_0x3894da){return _0x1e8a35(_0x3894da);},'hZmIr':'.txt','otCoq':'settings.json','tSifY':_0x5d7435(0x117)},_0x4920bd=_0xecaf95['TtNUH'](getRangerDir);if(!_0xecaf95['gZZum'](existsSync,_0x4920bd))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x11f4ff=await readActiveProfileName(),_0x1b31db=[],_0x235669={},_0x3499ed=join(_0x4920bd,'local');if(_0xecaf95[_0x5d7435(0x11f)](existsSync,_0x3499ed)){const _0x40f0d7=await readdir(_0x3499ed);for(const _0x325221 of _0x40f0d7){const _0x8dc9d8=join(_0x3499ed,_0x325221),_0x542af9=await _0xecaf95[_0x5d7435(0x11f)](stat,_0x8dc9d8);_0x542af9[_0x5d7435(0x135)]()&&(_0x1b31db[_0x5d7435(0x10e)](_0x325221),_0x235669[_0x325221]=_0xecaf95['eOddd']);}}const _0x8d0b49=_0xecaf95['BuUJM'](join,_0x4920bd,'ci');if(existsSync(_0x8d0b49)){const _0x5d04a2=await _0xecaf95['ATncA'](readdir,_0x8d0b49);for(const _0x44e6b3 of _0x5d04a2){const _0xa3b056=join(_0x8d0b49,_0x44e6b3),_0x58e7a9=await stat(_0xa3b056);_0x58e7a9['isDirectory']()&&(_0x1b31db['push'](_0x44e6b3),_0x235669[_0x44e6b3]='ci');}}const _0x339396=await _0xecaf95[_0x5d7435(0x114)](readdir,_0x4920bd);for(const _0x2bef47 of _0x339396){if(NON_ENV_DIRS['includes'](_0x2bef47))continue;if(_0x2bef47[_0x5d7435(0x12e)]('.'))continue;if(_0x2bef47[_0x5d7435(0x133)](_0xecaf95['hZmIr']))continue;const _0x5e9cc2=join(_0x4920bd,_0x2bef47),_0x56187c=await _0xecaf95['gZZum'](stat,_0x5e9cc2);_0x56187c[_0x5d7435(0x135)]()&&existsSync(join(_0x5e9cc2,_0xecaf95['otCoq']))&&(!_0x1b31db[_0x5d7435(0x10b)](_0x2bef47)&&(_0x1b31db['push'](_0x2bef47),_0x235669[_0x2bef47]=_0xecaf95['tSifY']));}return{'envNames':_0x1b31db,'activeEnv':_0x11f4ff,'envTypes':_0x235669};}export async function envList(){const _0x2c7b66=_0x5ae571,_0x306eee={'HyWev':function(_0x4e29e6,_0x1cd5c8){return _0x4e29e6===_0x1cd5c8;},'LmtrV':function(_0x8e016c){return _0x8e016c();},'qgAHq':function(_0x29041e,_0x56b7f3){return _0x29041e(_0x56b7f3);},'nZxNY':'\x0aCloud\x20Profiles\x20(by\x20environment):','efMjE':function(_0x45c351,_0x390e7e){return _0x45c351(_0x390e7e);},'fqNgH':function(_0x15a4cb,_0x3eaeb9,_0xe5c55c){return _0x15a4cb(_0x3eaeb9,_0xe5c55c);},'yqSRP':'\x20\x20\x20\x20'},{envNames:_0x25a000,activeEnv:_0x44697e,envTypes:_0x7a2b4f}=await _0x306eee['LmtrV'](getEnvNames);let _0x37a509=[];const _0x58b4c9=await getToken();if(_0x58b4c9)try{_0x37a509=await listCloudProfiles();}catch(_0xb36636){console['error'](_0x2c7b66(0x12a)+(_0xb36636 instanceof Error?_0xb36636[_0x2c7b66(0x12c)]:_0x306eee[_0x2c7b66(0x134)](String,_0xb36636)));}if(_0x306eee['HyWev'](_0x25a000['length'],0x0)&&_0x306eee['HyWev'](_0x37a509[_0x2c7b66(0x11b)],0x0)){console['log'](_0x2c7b66(0x11a)),console[_0x2c7b66(0x123)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x5ebcfd=new Set(_0x37a509['map'](_0xc66870=>_0xc66870[_0x2c7b66(0x132)]));if(_0x25a000[_0x2c7b66(0x11b)]>0x0){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x15b270 of _0x25a000[_0x2c7b66(0x10f)]()){const _0x289433=_0x306eee['HyWev'](_0x15b270,_0x44697e)&&!_0x5ebcfd['has'](_0x15b270),_0x2d373d=_0x7a2b4f[_0x15b270]||'local',_0x544933=await _0x306eee[_0x2c7b66(0x134)](loadSettings,_0x15b270),_0x57fb00=_0x306eee['HyWev'](_0x2d373d,_0x2c7b66(0x117))?'':'\x20['+_0x2d373d+']';console['log']('\x20\x20'+(_0x289433?'*\x20':'\x20\x20')+_0x15b270+_0x57fb00),_0x544933['baseUrl']&&console[_0x2c7b66(0x123)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x544933[_0x2c7b66(0x116)]),_0x544933['environmentDetails']&&console['log'](_0x2c7b66(0x124)+_0x544933[_0x2c7b66(0x11d)]);}}const _0x12850c=(_0x506eca,_0x37c911)=>{const _0x77985c=_0x2c7b66,_0xfb3bef=_0x306eee['HyWev'](_0x506eca['name'],_0x44697e),_0x112ce2=_0x506eca['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x506eca['sessionUpdatedAt']+')':'no\x20session';console[_0x77985c(0x123)](''+_0x37c911+(_0xfb3bef?'*\x20':'\x20\x20')+_0x506eca['name']),console['log'](_0x37c911+'\x20\x20\x20\x20Session:\x20'+_0x112ce2);};if(_0x37a509[_0x2c7b66(0x11b)]>0x0){if(shouldGroupByEnvironment(_0x37a509)){console[_0x2c7b66(0x123)](_0x306eee[_0x2c7b66(0x125)]);for(const _0x33e7cc of _0x306eee[_0x2c7b66(0x131)](groupCloudProfilesByEnvironment,_0x37a509)){const _0x95fa40=_0x33e7cc[_0x2c7b66(0x130)]??'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)';console[_0x2c7b66(0x123)]('\x0a\x20\x20'+_0x95fa40);for(const _0x3ec11f of _0x33e7cc[_0x2c7b66(0x118)]){_0x306eee['fqNgH'](_0x12850c,_0x3ec11f,_0x306eee[_0x2c7b66(0x12f)]);}}}else{console[_0x2c7b66(0x123)](_0x2c7b66(0x128));for(const _0x2238bc of[..._0x37a509]['sort']((_0x174982,_0x231279)=>_0x174982[_0x2c7b66(0x132)][_0x2c7b66(0x10c)](_0x231279['name']))){_0x306eee[_0x2c7b66(0x11e)](_0x12850c,_0x2238bc,'\x20\x20');}}}_0x44697e&&console[_0x2c7b66(0x123)](_0x2c7b66(0x122));}