@ranger-testing/ranger-cli 3.1.7-alpha.a5be4ca-60 → 3.1.7-alpha.e26cd28-63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/actors.js +1 -0
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -1
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -1
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/organizationEnvApi.js +1 -1
  61. package/build/commands/utils/playwrightCli.js +1 -1
  62. package/build/commands/utils/profileMessages.js +1 -1
  63. package/build/commands/utils/profileSetupBanner.js +1 -1
  64. package/build/commands/utils/projectsConfig.js +1 -1
  65. package/build/commands/utils/rangerConfig.js +1 -1
  66. package/build/commands/utils/rangerRoot.js +1 -1
  67. package/build/commands/utils/rangerwrightCli.js +1 -1
  68. package/build/commands/utils/resolveProfileContext.js +1 -1
  69. package/build/commands/utils/resolveProfileUrl.js +1 -1
  70. package/build/commands/utils/retry.js +1 -1
  71. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  72. package/build/commands/utils/sessionCache.js +1 -1
  73. package/build/commands/utils/settings.js +1 -1
  74. package/build/commands/utils/skillContent.js +1 -1
  75. package/build/commands/utils/skills.js +1 -1
  76. package/build/commands/utils/stitchWebmFiles.js +1 -1
  77. package/build/commands/utils/telemetry.js +1 -1
  78. package/build/commands/utils/tokenRefresh.js +1 -1
  79. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  80. package/build/commands/utils/tunnelClient.js +1 -1
  81. package/build/commands/utils/userApi.js +1 -1
  82. package/build/commands/utils/version.js +1 -1
  83. package/build/commands/verifyFeature.js +1 -1
  84. package/build/commands/verifyFeatureCli.js +1 -1
  85. package/build/commands/verifyFeatureNovaCli.js +1 -1
  86. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  87. package/package.json +5 -14
@@ -1 +1 @@
1
- const _0x3ece7a=_0x5a4c;(function(_0x52b8d4,_0x1b2907){const _0x317c4c=_0x5a4c,_0x4aee4f=_0x52b8d4();while(!![]){try{const _0x31fcf7=-parseInt(_0x317c4c(0x256))/0x1+parseInt(_0x317c4c(0x247))/0x2*(-parseInt(_0x317c4c(0x251))/0x3)+-parseInt(_0x317c4c(0x261))/0x4*(-parseInt(_0x317c4c(0x228))/0x5)+-parseInt(_0x317c4c(0x21c))/0x6*(parseInt(_0x317c4c(0x26b))/0x7)+-parseInt(_0x317c4c(0x20c))/0x8+parseInt(_0x317c4c(0x227))/0x9*(parseInt(_0x317c4c(0x21d))/0xa)+-parseInt(_0x317c4c(0x209))/0xb*(-parseInt(_0x317c4c(0x20b))/0xc);if(_0x31fcf7===_0x1b2907)break;else _0x4aee4f['push'](_0x4aee4f['shift']());}catch(_0xfbf38e){_0x4aee4f['push'](_0x4aee4f['shift']());}}}(_0x1ab8,0xab7a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x24b349 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x3ece7a(0x230);function warnCloudProfileSharedInOrg(){const _0x4969b5=_0x3ece7a;if(!process['stdout'][_0x4969b5(0x205)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5d6bb2){const _0x8b68f8=_0x3ece7a,_0x1886d9={'lxkUG':function(_0x343f12,_0x56c90b,_0x1e5bca){return _0x343f12(_0x56c90b,_0x1e5bca);},'GUcUa':function(_0x3e0c3b,_0x189c91){return _0x3e0c3b(_0x189c91);},'Inqiy':function(_0x30017b,_0x508fc7){return _0x30017b<_0x508fc7;},'NiUSU':_0x8b68f8(0x270)};try{const _0x42aa90=new AbortController(),_0x4155d4=setTimeout(()=>_0x42aa90[_0x8b68f8(0x211)](),0x1388),_0x399b37={'method':'HEAD','signal':_0x42aa90['signal'],'redirect':_0x8b68f8(0x210)};/^https:\/\/localhost(:\d+)?/i[_0x8b68f8(0x262)](_0x5d6bb2)&&(process[_0x8b68f8(0x229)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4bd635=await _0x1886d9['lxkUG'](fetch,_0x5d6bb2,_0x399b37);delete process[_0x8b68f8(0x229)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1886d9[_0x8b68f8(0x1f1)](clearTimeout,_0x4155d4);if(_0x1886d9[_0x8b68f8(0x266)](_0x4bd635[_0x8b68f8(0x22c)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x8b68f8(0x1f7)+_0x4bd635['status']};}catch(_0x1e613f){delete process['env'][_0x8b68f8(0x250)];const _0x3a8f0b=_0x1e613f,_0x54ca2a=_0x3a8f0b['message']||String(_0x1e613f),_0x3d5200=_0x54ca2a['includes'](_0x8b68f8(0x225))||_0x3a8f0b['name']===_0x1886d9[_0x8b68f8(0x263)]||_0x54ca2a[_0x8b68f8(0x246)](_0x8b68f8(0x25f));return{'ok':![],'error':_0x54ca2a,'isProtocolError':_0x3d5200};}}function _0x1ab8(){const _0x4be5cb=['27056JMVOmA','test','NiUSU','⚠\x20Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','Inqiy','\x20Configured\x20envs:\x20','roGde','RQQwu','✓\x20Cloud\x20profile\x20\x27','10262PyERNL','wfujh','fvPOB','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','SUfOR','TypeError','\x27\x20created\x20(CDP).','tZXoj','GUcUa','indexOf','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','origin','IzHHt','keys','HTTP\x20','\x27\x20matching\x20','\x22:\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','retry','\x0a🌐\x20Profile\x20Setup\x0a','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','profile.add.autoRouteSkipped','slice','rPIXW','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','url','zQVtm','length','isTTY','\x27\x20to\x20the\x20cloud?','✓\x20Profile\x20\x27','capture','847uNpyAp','\x0a\x20\x20Auth\x20environment\x20\x22','496776hPoLeP','5404360gKSDAo','message','confirm','error','manual','abort','Could\x20not\x20reach\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','mtJIw','DLRou','no_auth_config','\x20--skip-auth\x0a','trackPhaseEnd','Use\x20','env_not_found','setupHeader','4938VaGBZg','15900lCsflx','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Found\x20auth\x20environment\x20\x27','skipAuth','pfvNC','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','ZKewH','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Invalid\x20URL','RRMFE','4572RKENka','190CjvpZj','env','\x27\x20created.\x0a','join','status','\x20(continuing\x20with\x20--force)','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20--url\x20','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','prompt','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20A\x20profile\x20named\x20\x22','cdpEndpoint','wFphM','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','exit','trim','http://localhost:3000','yZAjd','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Bncly','OsVRq','continue','dHUbQ','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','authEnv','includes','3118iPAIDA','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','force','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','jGvZZ','Enter\x20a\x20different\x20URL','cxpEU','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','NODE_TLS_REJECT_UNAUTHORIZED','2379pXKKMC','xhJkh','domains','vZBWs','HRJDn','431671AtYoRP','environments','YhyWg','log','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','GyWcB','TtOKx','\x0a\x20\x20Could\x20not\x20reach\x20','fetch\x20failed','\x0a\x20\x20(domains:\x20'];_0x1ab8=function(){return _0x4be5cb;};return _0x1ab8();}async function sweepOrphanLocalProfile(_0x37ee0f,_0x7e2144,_0x3de50f){const _0x31d918=_0x3ece7a,_0x44adbb={'ggzvj':'local','HIqHU':function(_0x2b54da,_0x3b30bc,_0x194673){return _0x2b54da(_0x3b30bc,_0x194673);},'Rfbvq':function(_0x24fc3d,_0x25b5ff){return _0x24fc3d(_0x25b5ff);},'DLRou':function(_0x55b58b,_0x47824d){return _0x55b58b(_0x47824d);}},_0x382f49=join(_0x7e2144,_0x44adbb['ggzvj']),_0x4d11f3=_0x44adbb['HIqHU'](join,_0x382f49,_0x37ee0f);existsSync(_0x4d11f3)&&(_0x3de50f&&await _0x44adbb['Rfbvq'](isPathGitTracked,_0x4d11f3)?console[_0x31d918(0x259)](_0x31d918(0x224)+_0x4d11f3+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x4d11f3,{'recursive':!![],'force':!![]}),console[_0x31d918(0x259)](_0x31d918(0x22e)+_0x4d11f3)));if(existsSync(_0x382f49)){let _0x3b6bd0=[];try{_0x3b6bd0=await _0x44adbb[_0x31d918(0x215)](readdir,_0x382f49);}catch{return;}const _0x2149c1='.tmp-'+_0x37ee0f+'-';for(const _0x47f44a of _0x3b6bd0){if(!_0x47f44a['startsWith'](_0x2149c1))continue;const _0x11bb59=join(_0x382f49,_0x47f44a);await rm(_0x11bb59,{'recursive':!![],'force':!![]}),console[_0x31d918(0x259)](_0x31d918(0x22e)+_0x11bb59);}}}async function sweepOrphansBestEffort(_0x2bba01){const _0x32d4f2=_0x3ece7a,_0x1fc9cb={'TtOKx':function(_0x2239c6){return _0x2239c6();},'GyWcB':function(_0x5a9d28){return _0x5a9d28();},'tmauq':function(_0x4151fc,_0x3092b8,_0x484ec3,_0x341565){return _0x4151fc(_0x3092b8,_0x484ec3,_0x341565);},'pfvNC':function(_0x14d1bf,_0x46b764){return _0x14d1bf(_0x46b764);}};try{await sweepOrphanLocalProfile(_0x2bba01,_0x1fc9cb[_0x32d4f2(0x25d)](getRangerHomeDir),![]);const _0x37e054=_0x1fc9cb[_0x32d4f2(0x25c)](getRangerDir);_0x37e054!==getRangerHomeDir()&&await _0x1fc9cb['tmauq'](sweepOrphanLocalProfile,_0x2bba01,_0x37e054,!![]);}catch(_0x58429b){console[_0x32d4f2(0x259)](_0x32d4f2(0x24a)+(_0x58429b instanceof Error?_0x58429b['message']:_0x1fc9cb[_0x32d4f2(0x221)](String,_0x58429b))+').');}}async function markActive(_0x35a316){const _0x11922e=_0x3ece7a;try{await writeActiveProfileName(_0x35a316),console[_0x11922e(0x259)]('\x20\x20Set\x20active\x20profile:\x20'+_0x35a316);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x23457c,_0x43d5be,_0x30b096,_0x7e0c1e,_0x4d81a3){const _0xf6d85b=_0x3ece7a,_0x520918={'QWdPv':function(_0x5662a3,_0x2d4bb3){return _0x5662a3===_0x2d4bb3;},'UbDtR':function(_0x3d4d19){return _0x3d4d19();},'vZBWs':_0xf6d85b(0x1fe),'ktVAR':'no_auth_config','KDdOH':function(_0x2998ce,_0x358b7c){return _0x2998ce instanceof _0x358b7c;},'ChsWX':function(_0x20a294,_0x554502){return _0x20a294(_0x554502);},'jGvZZ':function(_0x28af84,_0x22d198){return _0x28af84===_0x22d198;},'tZXoj':function(_0x2264e1,_0x5a2126){return _0x2264e1+_0x5a2126;},'YhyWg':function(_0x4453a0,_0x7f097e){return _0x4453a0+_0x7f097e;},'IzHHt':_0xf6d85b(0x23e),'HYjDY':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','omIKQ':function(_0x5ec320,_0x1145da,_0x4be00f){return _0x5ec320(_0x1145da,_0x4be00f);},'ultZU':'no_match','RRMFE':'saveToCloud','wfujh':'user_declined','nuTxK':function(_0x2845b2,_0x57aca7,_0x252d0d,_0x58c73e){return _0x2845b2(_0x57aca7,_0x252d0d,_0x58c73e);},'wQAdQ':function(_0x10fc10){return _0x10fc10();},'mtJIw':function(_0x45e3cc,_0x18266b){return _0x45e3cc instanceof _0x18266b;},'QvTMy':function(_0x2c8fb2,_0x5caea3){return _0x2c8fb2(_0x5caea3);}};let _0x5a1a1a;try{_0x5a1a1a=await _0x520918['UbDtR'](fetchAuthConfig);}catch(_0x393621){return _0x4d81a3?.['trackPhaseEnd'](_0x520918[_0xf6d85b(0x254)],{'reason':_0x520918['ktVAR'],'profileName':_0x23457c}),console[_0xf6d85b(0x20f)](_0xf6d85b(0x26e)+(_0x520918['KDdOH'](_0x393621,Error)?_0x393621['message']:_0x520918['ChsWX'](String,_0x393621))),![];}if((!_0x5a1a1a||!_0x5a1a1a[_0xf6d85b(0x257)]||_0x520918[_0xf6d85b(0x24b)](Object[_0xf6d85b(0x1f6)](_0x5a1a1a[_0xf6d85b(0x257)])[_0xf6d85b(0x204)],0x0))&&!_0x30b096[_0xf6d85b(0x245)]){if(_0x7e0c1e)return await captureEnvLessProfile(_0x23457c,_0x43d5be,_0x30b096,_0x4d81a3);return _0x4d81a3?.[_0xf6d85b(0x218)](_0xf6d85b(0x1fe),{'reason':_0xf6d85b(0x216),'profileName':_0x23457c}),console[_0xf6d85b(0x20f)](_0x520918[_0xf6d85b(0x1f0)](_0x520918['tZXoj'](_0x520918[_0xf6d85b(0x258)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a'+_0x520918[_0xf6d85b(0x1f5)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x23457c+_0xf6d85b(0x22f)+_0x43d5be+_0xf6d85b(0x217)),'\x0a')+_0x520918['HYjDY'],_0xf6d85b(0x248))),![];}let _0x3bf2b1;if(_0x30b096[_0xf6d85b(0x245)]){if(!_0x5a1a1a?.[_0xf6d85b(0x257)]?.[_0x30b096[_0xf6d85b(0x245)]]){const _0x54b3df=Object['keys'](_0x5a1a1a?.[_0xf6d85b(0x257)]??{});return _0x4d81a3?.[_0xf6d85b(0x218)](_0x520918[_0xf6d85b(0x254)],{'reason':_0xf6d85b(0x21a),'profileName':_0x23457c}),console['error'](_0x520918['tZXoj'](_0xf6d85b(0x20a)+_0x30b096[_0xf6d85b(0x245)]+'\x22\x20not\x20found.',_0x54b3df[_0xf6d85b(0x204)]?_0xf6d85b(0x267)+_0x54b3df[_0xf6d85b(0x22b)](',\x20')+'.':_0xf6d85b(0x231))),![];}_0x3bf2b1=_0x30b096['authEnv'];}else _0x3bf2b1=_0x520918['omIKQ'](matchAuthEnvironment,_0x43d5be,_0x5a1a1a);if(!_0x3bf2b1)return _0x4d81a3?.['trackPhaseEnd'](_0x520918['vZBWs'],{'reason':_0x520918['ultZU'],'profileName':_0x23457c}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x43d5be+_0xf6d85b(0x24e)+Object[_0xf6d85b(0x1f6)](_0x5a1a1a?.[_0xf6d85b(0x257)]??{})['join'](',\x20')+'.'),![];const _0x1a28d6=_0x5a1a1a?.[_0xf6d85b(0x257)]?.[_0x3bf2b1],_0x38e880=_0x1a28d6?.[_0xf6d85b(0x253)]??[];if(_0x7e0c1e&&!_0x30b096[_0xf6d85b(0x25b)]){const {saveToCloud:_0x283c08}=await _0x24b349['prompt']([{'type':'confirm','name':_0x520918[_0xf6d85b(0x226)],'message':_0xf6d85b(0x21f)+_0x3bf2b1+_0xf6d85b(0x1f8)+_0x43d5be+_0xf6d85b(0x260)+_0x38e880['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x23457c+_0xf6d85b(0x206),'default':!![]}]);if(!_0x283c08)return _0x4d81a3?.['trackPhaseEnd'](_0x520918['vZBWs'],{'reason':_0x520918[_0xf6d85b(0x26c)],'profileName':_0x23457c}),console['error'](_0xf6d85b(0x1fa)),![];}const _0x47d911=_0x38e880['some'](_0x25d992=>{const _0x538596=_0xf6d85b;try{return _0x520918['QWdPv'](new URL(_0x25d992)['origin'],new URL(_0x43d5be)[_0x538596(0x1f4)]);}catch{return![];}}),_0xa9b3dd={};!_0x47d911&&(_0xa9b3dd['baseUrl']=_0x43d5be);try{await _0x520918['nuTxK'](createCloudProfile,_0x23457c,_0x3bf2b1,{'settings':_0xa9b3dd}),_0x520918['wQAdQ'](warnCloudProfileSharedInOrg);}catch(_0x3c44a3){if(_0x520918[_0xf6d85b(0x214)](_0x3c44a3,ApiError)&&_0x3c44a3[_0xf6d85b(0x22c)]===0x199){console['error'](_0xf6d85b(0x236)+_0x23457c+_0xf6d85b(0x244)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x23457c));throw _0x3c44a3;}throw _0x3c44a3;}return console[_0xf6d85b(0x259)](_0xf6d85b(0x207)+_0x23457c+_0xf6d85b(0x22a)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x23457c)),await _0x520918['QvTMy'](sweepOrphansBestEffort,_0x23457c),_0x4d81a3?.[_0xf6d85b(0x218)]('profile.add.autoRouted',{'envKey':_0x3bf2b1,'profileName':_0x23457c}),!![];}function _0x5a4c(_0x2d6f3d,_0xe33cb5){_0x2d6f3d=_0x2d6f3d-0x1f0;const _0x1ab811=_0x1ab8();let _0x5a4ce4=_0x1ab811[_0x2d6f3d];return _0x5a4ce4;}async function createUnconfiguredCloudProfile(_0x15e32f,_0x3eb410){const _0xeed991=_0x3ece7a,_0x40c3c0={'rPIXW':function(_0x48ebde,_0x426cad){return _0x48ebde instanceof _0x426cad;},'RQQwu':function(_0x248833,_0x2ba864){return _0x248833===_0x2ba864;},'ZkBec':function(_0x396cc2,_0x1d05c8){return _0x396cc2+_0x1d05c8;}};try{await createCloudProfile(_0x15e32f,undefined,{'settings':_0x3eb410}),warnCloudProfileSharedInOrg();}catch(_0x9b4e59){_0x40c3c0[_0xeed991(0x200)](_0x9b4e59,ApiError)&&_0x40c3c0[_0xeed991(0x269)](_0x9b4e59[_0xeed991(0x22c)],0x199)&&console['error'](_0x40c3c0['ZkBec'](_0xeed991(0x236)+_0x15e32f+_0xeed991(0x244),_0xeed991(0x21e)+_0x15e32f));throw _0x9b4e59;}}async function captureEnvLessProfile(_0x2b725a,_0x4506d9,_0x52a15f,_0x1e9ffd){const _0x33fbf6=_0x3ece7a,_0x19b6d6={'SUfOR':_0x33fbf6(0x20e),'ZKewH':_0x33fbf6(0x235),'roGde':function(_0x58f795,_0x3a1a15,_0x535b1c,_0x5bff5e){return _0x58f795(_0x3a1a15,_0x535b1c,_0x5bff5e);},'dgSuf':function(_0x41acf4,_0x1bbec3){return _0x41acf4 instanceof _0x1bbec3;},'RCSTa':function(_0x46c7b7,_0x2ef3b6){return _0x46c7b7===_0x2ef3b6;},'cxpEU':function(_0x3903b0,_0x18e18c,_0x59ba27){return _0x3903b0(_0x18e18c,_0x59ba27);},'dHUbQ':function(_0x241b2c,_0x2f359e){return _0x241b2c(_0x2f359e);},'yZAjd':'profile.add.autoRouted'};if(!_0x52a15f[_0x33fbf6(0x25b)]){const {capture:_0x4295ad}=await _0x24b349[_0x33fbf6(0x233)]([{'type':_0x19b6d6[_0x33fbf6(0x26f)],'name':_0x33fbf6(0x208),'message':_0x19b6d6[_0x33fbf6(0x223)],'default':!![]}]);if(!_0x4295ad)return _0x1e9ffd?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x2b725a}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x33fbf6(0x25a)),![];}const _0x56834e={};if(_0x52a15f[_0x33fbf6(0x21b)])for(const _0x101bdf of _0x52a15f['setupHeader']){const _0x240954=_0x101bdf['indexOf'](':');if(_0x240954===-0x1)continue;_0x56834e[_0x101bdf['slice'](0x0,_0x240954)['trim']()]=_0x101bdf[_0x33fbf6(0x1ff)](_0x240954+0x1)['trim']();}const _0x295405={'baseUrl':_0x4506d9};Object[_0x33fbf6(0x1f6)](_0x56834e)['length']>0x0&&(_0x295405['setupHeaders']=_0x56834e);let _0x168acd;try{_0x168acd=await _0x19b6d6[_0x33fbf6(0x268)](createCloudProfile,_0x2b725a,undefined,{'settings':_0x295405}),warnCloudProfileSharedInOrg();}catch(_0x381ad4){_0x19b6d6['dgSuf'](_0x381ad4,ApiError)&&_0x19b6d6['RCSTa'](_0x381ad4['status'],0x199)&&console[_0x33fbf6(0x20f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x2b725a+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x33fbf6(0x21e)+_0x2b725a));throw _0x381ad4;}return await _0x19b6d6[_0x33fbf6(0x24d)](manualBrowserLogin,_0x168acd,{'key':'','domains':[_0x4506d9],'setupHeaders':Object['keys'](_0x56834e)['length']>0x0?_0x56834e:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x2b725a+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2b725a)),await _0x19b6d6[_0x33fbf6(0x242)](sweepOrphansBestEffort,_0x2b725a),_0x1e9ffd?.['trackPhaseEnd'](_0x19b6d6[_0x33fbf6(0x23d)],{'envKey':null,'profileName':_0x2b725a}),!![];}export async function addEnv(_0x465e21,_0x3ee680={},_0xc26e05){const _0x5b2af3=_0x3ece7a,_0x4dc8c2={'bvDJi':function(_0x220f1e,_0x4fd16f){return _0x220f1e+_0x4fd16f;},'fvPOB':function(_0x40559a,_0x18a70c){return _0x40559a+_0x18a70c;},'wFphM':function(_0x203217,_0x335ec5){return _0x203217+_0x335ec5;},'DRjio':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','Bncly':_0x5b2af3(0x222),'ggznw':_0x5b2af3(0x239),'mFRbw':function(_0x457fde){return _0x457fde();},'JaKvz':_0x5b2af3(0x1f3),'AOdLy':function(_0x1f051b,_0x442326){return _0x1f051b>_0x442326;},'TSSKs':function(_0x5e0c8,_0x541163,_0x534cec){return _0x5e0c8(_0x541163,_0x534cec);},'BxfDk':'cdpEndpoint','zQVtm':function(_0x20ed82,_0x5a2d8d){return _0x20ed82(_0x5a2d8d);},'zIyBz':_0x5b2af3(0x1fc),'GVziQ':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','OsVRq':_0x5b2af3(0x243),'HRJDn':'use_suggestion','ItiWq':_0x5b2af3(0x24c),'vztRi':_0x5b2af3(0x1fb),'YoeAR':function(_0x58e09e,_0x479967){return _0x58e09e===_0x479967;},'lBfcI':function(_0x1efecb,_0x3d18e7){return _0x1efecb(_0x3d18e7);},'xhJkh':_0x5b2af3(0x241),'NVNDC':function(_0x39b205,_0x2ffaa5,_0x2a2b35,_0x1ed748,_0x2979a6,_0x36fcdc){return _0x39b205(_0x2ffaa5,_0x2a2b35,_0x1ed748,_0x2979a6,_0x36fcdc);}};_0x3ee680['ci']&&(console['error'](_0x4dc8c2['bvDJi'](_0x4dc8c2[_0x5b2af3(0x26d)](_0x4dc8c2[_0x5b2af3(0x238)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a',_0x4dc8c2['DRjio'])+_0x5b2af3(0x232),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x5b2af3(0x23a)](0x1));const _0x4da3dc={};if(_0x3ee680[_0x5b2af3(0x21b)])for(const _0x554447 of _0x3ee680[_0x5b2af3(0x21b)]){const _0x145b3c=_0x554447[_0x5b2af3(0x1f2)](':');if(_0x145b3c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x554447+_0x5b2af3(0x234));const _0x1323c9=_0x554447[_0x5b2af3(0x1ff)](0x0,_0x145b3c)[_0x5b2af3(0x23b)](),_0x3e66dc=_0x554447['slice'](_0x145b3c+0x1)['trim']();_0x4da3dc[_0x1323c9]=_0x3e66dc;}if(_0x3ee680['cdpEndpoint']!==undefined&&_0x3ee680['cdpEndpoint'][_0x5b2af3(0x23b)]()==='')throw new Error(_0x4dc8c2[_0x5b2af3(0x23f)]);if(_0x3ee680['cdpEndpoint']&&_0x3ee680[_0x5b2af3(0x202)])throw new Error(_0x5b2af3(0x1fd));if(_0x3ee680[_0x5b2af3(0x245)]&&_0x3ee680[_0x5b2af3(0x220)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x3ee680['authEnv']&&_0x3ee680['cdpEndpoint'])throw new Error(_0x4dc8c2['ggznw']);const _0x46af0a=Boolean(_0x3ee680['cdpEndpoint']),_0x2cc7cf=_0x4dc8c2['mFRbw'](isInteractive);if(!_0x2cc7cf&&!_0x3ee680['url']&&!_0x46af0a&&!_0x3ee680[_0x5b2af3(0x220)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x46af0a){const _0x4296ac=_0x3ee680[_0x5b2af3(0x237)];console[_0x5b2af3(0x259)](_0x4dc8c2['JaKvz']),console['log'](_0x5b2af3(0x24f)+_0x4296ac);const _0x28875e={'cdpEndpoint':_0x4296ac,'isElectron':!![]};_0x4dc8c2['AOdLy'](Object[_0x5b2af3(0x1f6)](_0x4da3dc)[_0x5b2af3(0x204)],0x0)&&(_0x28875e['setupHeaders']=_0x4da3dc);await _0x4dc8c2['TSSKs'](createUnconfiguredCloudProfile,_0x465e21,_0x28875e);try{setProfileOverride(process['cwd'](),_0x465e21,_0x4dc8c2['BxfDk'],_0x4296ac),setProfileOverride(process['cwd'](),_0x465e21,'isElectron',!![]);}catch(_0x54feed){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x54feed instanceof Error?_0x54feed['message']:_0x4dc8c2[_0x5b2af3(0x203)](String,_0x54feed)));}console[_0x5b2af3(0x259)](_0x5b2af3(0x26a)+_0x465e21+_0x5b2af3(0x271)),await _0x4dc8c2[_0x5b2af3(0x203)](sweepOrphansBestEffort,_0x465e21),await markActive(_0x465e21);return;}if(_0x3ee680[_0x5b2af3(0x220)]){const _0x27f0e9={};_0x3ee680['url']&&(_0x27f0e9['baseUrl']=_0x3ee680[_0x5b2af3(0x202)]);Object[_0x5b2af3(0x1f6)](_0x4da3dc)[_0x5b2af3(0x204)]>0x0&&(_0x27f0e9['setupHeaders']=_0x4da3dc);await createUnconfiguredCloudProfile(_0x465e21,_0x27f0e9),console['log']('✓\x20Profile\x20\x27'+_0x465e21+'\x27\x20created\x20(no\x20session).\x0a'+(_0x5b2af3(0x213)+_0x465e21+'`\x20again\x20without\x20--skip-auth.')),await _0x4dc8c2[_0x5b2af3(0x203)](sweepOrphansBestEffort,_0x465e21),await _0x4dc8c2[_0x5b2af3(0x203)](markActive,_0x465e21);return;}if(_0x3ee680[_0x5b2af3(0x202)]){const _0x53db48=_0x3ee680['url'],_0x306aa8=await _0x4dc8c2[_0x5b2af3(0x203)](checkUrlReachability,_0x53db48);if(!_0x306aa8['ok']&&!_0x3ee680[_0x5b2af3(0x249)])throw new Error(_0x5b2af3(0x212)+_0x53db48+':\x20'+_0x306aa8['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x306aa8['ok']&&_0x3ee680['force']&&console[_0x5b2af3(0x259)](_0x5b2af3(0x264)+_0x53db48+':\x20'+_0x306aa8[_0x5b2af3(0x20f)]+_0x5b2af3(0x22d));}else{console[_0x5b2af3(0x259)](_0x4dc8c2['zIyBz']),console['log'](_0x4dc8c2['GVziQ']),console[_0x5b2af3(0x259)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x4bb42e='',_0x2d6f8e=![];while(!![]){const _0x6f7334=await _0x24b349[_0x5b2af3(0x233)]([{'type':'input','name':'baseUrl','message':_0x2d6f8e?_0x5b2af3(0x265):_0x4dc8c2[_0x5b2af3(0x240)],'default':_0x4bb42e||_0x5b2af3(0x23c)}]);_0x4bb42e=_0x6f7334['baseUrl'];const _0x4e121b=await checkUrlReachability(_0x4bb42e);if(_0x4e121b['ok'])break;const _0x5f46fc=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x4bb42e),_0x338a58=_0x4e121b['isProtocolError']&&!_0x5f46fc,_0x3db199=_0x338a58?'http://'+_0x4bb42e:null;_0x2d6f8e=!![],console['log'](_0x5b2af3(0x25e)+_0x4bb42e+':\x20'+_0x4e121b[_0x5b2af3(0x20f)]);_0x3db199&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3db199+'?');const {action:_0x4e5830}=await _0x24b349[_0x5b2af3(0x233)]([{'type':'list','name':'action','message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x3db199?[{'name':_0x5b2af3(0x219)+_0x3db199,'value':_0x4dc8c2[_0x5b2af3(0x255)]}]:[],{'name':_0x4dc8c2['ItiWq'],'value':_0x4dc8c2['vztRi']},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x4dc8c2['YoeAR'](_0x4e5830,'use_suggestion')&&_0x3db199){_0x4bb42e=_0x3db199;const _0x94a79f=await _0x4dc8c2['lBfcI'](checkUrlReachability,_0x4bb42e);if(_0x94a79f['ok'])break;console[_0x5b2af3(0x259)](_0x5b2af3(0x201)+_0x4bb42e+':\x20'+_0x94a79f[_0x5b2af3(0x20f)]);}else{if(_0x4e5830===_0x4dc8c2[_0x5b2af3(0x252)])break;}}_0x3ee680={..._0x3ee680,'url':_0x4bb42e};}let _0x418c80=![];try{_0x418c80=await _0x4dc8c2['NVNDC'](tryAutoRouteCloudProfile,_0x465e21,_0x3ee680[_0x5b2af3(0x202)],_0x3ee680,_0x2cc7cf,_0xc26e05);}catch(_0x316dbe){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x465e21+_0x5b2af3(0x1f9)+(_0x316dbe instanceof Error?_0x316dbe[_0x5b2af3(0x20d)]:String(_0x316dbe))),process[_0x5b2af3(0x23a)](0x1);}!_0x418c80&&process['exit'](0x1),await _0x4dc8c2[_0x5b2af3(0x203)](markActive,_0x465e21);}
1
+ (function(_0x557437,_0x361f37){const _0x158d33=_0x2797,_0x25dacf=_0x557437();while(!![]){try{const _0x6d13e5=-parseInt(_0x158d33(0x10f))/0x1*(parseInt(_0x158d33(0xeb))/0x2)+parseInt(_0x158d33(0xcc))/0x3+parseInt(_0x158d33(0xf3))/0x4+parseInt(_0x158d33(0xec))/0x5+parseInt(_0x158d33(0xcf))/0x6*(-parseInt(_0x158d33(0xc0))/0x7)+-parseInt(_0x158d33(0xca))/0x8+parseInt(_0x158d33(0x123))/0x9;if(_0x6d13e5===_0x361f37)break;else _0x25dacf['push'](_0x25dacf['shift']());}catch(_0x305b83){_0x25dacf['push'](_0x25dacf['shift']());}}}(_0x151b,0x83b91));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x2797(_0xb7dc37,_0x2843e9){_0xb7dc37=_0xb7dc37-0xa3;const _0x151b6f=_0x151b();let _0x279771=_0x151b6f[_0xb7dc37];return _0x279771;}import{existsSync}from'fs';import _0x5ab92a 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 _0x151b(){const _0x56f3c4=['kjUTI','lpfKt','ukujb','user_declined','nSTNE','error','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','lBaaa','\x0a\x20\x20(domains:\x20','signal','fjDjK','log','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','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','WnsMc','saveToCloud','\x27\x20created\x20(no\x20session).\x0a','llIun','list','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','EnsGx','ynZUO','baseUrl','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','dLbNh','KAMZa','1219918Crrbrn','1143485khjzPI','cdpEndpoint','yZwZu','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','indexOf','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','HTTP\x20','2405252ILDguN','setupHeader','bwpXo','\x22:\x20','zFenx','\x0a\x20\x20A\x20profile\x20named\x20\x22','skipAuth','test','setupHeaders','vBDuy','`\x20again\x20without\x20--skip-auth.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','JURsC','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','beQmr','REpGi','UZKpd','status','env','ZqHXj','QVsum','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','keys','env_not_found','cwd','1iYzIrx','authEnv','message','length','Xkzpt','CxvoW','jzpmU','prompt','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','EtFza','\x27\x20created.\x0a','continue','\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','QUfFr','Enter\x20a\x20different\x20URL','url','includes','environments','oYUvh','OFbZi','6224274oYbOwR','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','slice','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','warn','profile.add.autoRouted','vjQRv','\x0a🌐\x20Profile\x20Setup\x0a','HEAD','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','NCzrP','exit',')\x0a\x20\x20Save\x20\x27','\x27\x20to\x20the\x20cloud?','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20not\x20found.','trim','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','http://localhost:3000','riDGL','trackPhaseEnd','name','UyZgf','HFDlt','QmZPT','✓\x20Profile\x20\x27','pTBeL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','some','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','NODE_TLS_REJECT_UNAUTHORIZED','KfKuD','180397FMIGzU','zMCVW','Found\x20auth\x20environment\x20\x27','confirm','isElectron','origin','join','Use\x20','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','profile.add.autoRouteSkipped','4344200QkPcJB','PqEnU','1208592kUMYRY','\x0a✓\x20Profile\x20\x27','RWeQb','54KAlYCk','vgMXm'];_0x151b=function(){return _0x56f3c4;};return _0x151b();}function warnCloudProfileSharedInOrg(){const _0x11fd2b=_0x2797;if(!process['stdout']['isTTY'])return;console[_0x11fd2b(0xa3)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5867b7){const _0x2804b3=_0x2797,_0x13e0c6={'AvLgw':function(_0x5a979a,_0x3e31d7){return _0x5a979a<_0x3e31d7;},'SPhxl':function(_0xbc5b8a,_0x17b31c){return _0xbc5b8a(_0x17b31c);},'ROach':'Invalid\x20URL','piKzi':'TypeError','FoKup':'fetch\x20failed'};try{const _0x41fa1f=new AbortController(),_0x45f0dd=setTimeout(()=>_0x41fa1f['abort'](),0x1388),_0x4b1c50={'method':_0x2804b3(0xa7),'signal':_0x41fa1f[_0x2804b3(0xda)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x2804b3(0xfa)](_0x5867b7)&&(process[_0x2804b3(0x105)][_0x2804b3(0xbe)]='0');const _0x1c18a4=await fetch(_0x5867b7,_0x4b1c50);delete process['env'][_0x2804b3(0xbe)],clearTimeout(_0x45f0dd);if(_0x13e0c6['AvLgw'](_0x1c18a4[_0x2804b3(0x104)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x2804b3(0xf2)+_0x1c18a4['status']};}catch(_0x1db2d8){delete process[_0x2804b3(0x105)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x17dd6f=_0x1db2d8,_0x15b58f=_0x17dd6f['message']||_0x13e0c6['SPhxl'](String,_0x1db2d8),_0x256464=_0x15b58f['includes'](_0x13e0c6['ROach'])||_0x17dd6f[_0x2804b3(0xb5)]===_0x13e0c6['piKzi']||_0x15b58f[_0x2804b3(0x11f)](_0x13e0c6['FoKup']);return{'ok':![],'error':_0x15b58f,'isProtocolError':_0x256464};}}async function sweepOrphanLocalProfile(_0x2ae4ee,_0x4e2be7,_0x2d2cd9){const _0x3a66b1=_0x2797,_0x21dc10={'QVsum':function(_0x144f68,_0x201bff,_0x3475a6){return _0x144f68(_0x201bff,_0x3475a6);},'beQmr':'local','KfKuD':function(_0x5ca34d,_0x41ed40,_0x248696){return _0x5ca34d(_0x41ed40,_0x248696);},'QUfFr':function(_0x1a8ff4,_0x4b7afe){return _0x1a8ff4(_0x4b7afe);},'lpfKt':function(_0x1c2583,_0x14b5eb,_0x1c1dc7){return _0x1c2583(_0x14b5eb,_0x1c1dc7);}},_0x2d1cec=_0x21dc10[_0x3a66b1(0x107)](join,_0x4e2be7,_0x21dc10[_0x3a66b1(0x101)]),_0xe5f1bc=_0x21dc10[_0x3a66b1(0xbf)](join,_0x2d1cec,_0x2ae4ee);_0x21dc10[_0x3a66b1(0x11c)](existsSync,_0xe5f1bc)&&(_0x2d2cd9&&await isPathGitTracked(_0xe5f1bc)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xe5f1bc+_0x3a66b1(0xe4)):(await _0x21dc10['QVsum'](rm,_0xe5f1bc,{'recursive':!![],'force':!![]}),console[_0x3a66b1(0xdc)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xe5f1bc)));if(existsSync(_0x2d1cec)){let _0x4b04c7=[];try{_0x4b04c7=await readdir(_0x2d1cec);}catch{return;}const _0xc7b69='.tmp-'+_0x2ae4ee+'-';for(const _0x1bcc37 of _0x4b04c7){if(!_0x1bcc37['startsWith'](_0xc7b69))continue;const _0x4400c6=join(_0x2d1cec,_0x1bcc37);await _0x21dc10[_0x3a66b1(0xd2)](rm,_0x4400c6,{'recursive':!![],'force':!![]}),console[_0x3a66b1(0xdc)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4400c6);}}}async function sweepOrphansBestEffort(_0x2e925f){const _0x487f50=_0x2797,_0x5ce207={'CxvoW':function(_0x41a6ec,_0x56a8ef,_0xeb9da5,_0x2fd939){return _0x41a6ec(_0x56a8ef,_0xeb9da5,_0x2fd939);},'llIun':function(_0xb33807){return _0xb33807();},'OFbZi':function(_0x24ee70,_0x2750c8){return _0x24ee70 instanceof _0x2750c8;},'lBaaa':function(_0x31d7b9,_0x2b973b){return _0x31d7b9(_0x2b973b);}};try{await _0x5ce207[_0x487f50(0x114)](sweepOrphanLocalProfile,_0x2e925f,_0x5ce207[_0x487f50(0xe2)](getRangerHomeDir),![]);const _0x21fedf=getRangerDir();_0x21fedf!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x2e925f,_0x21fedf,!![]);}catch(_0x7176e3){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x5ce207[_0x487f50(0x122)](_0x7176e3,Error)?_0x7176e3['message']:_0x5ce207[_0x487f50(0xd8)](String,_0x7176e3))+').');}}async function markActive(_0x4240c0){const _0x4a3e2a={'jFNdI':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x4240c0),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x4240c0);}catch{console['log'](_0x4a3e2a['jFNdI']);}}async function tryAutoRouteCloudProfile(_0x3e522c,_0x412678,_0xe1554f,_0x3a033d,_0x43c579){const _0x41840c=_0x2797,_0x38e443={'REpGi':function(_0x21daf3){return _0x21daf3();},'HFDlt':_0x41840c(0xc9),'MLfAF':'no_auth_config','yZwZu':function(_0x870d9e,_0x47400c){return _0x870d9e(_0x47400c);},'AePbL':function(_0x361874,_0x1eb59f,_0x25db6a,_0x42e6f3,_0x13bcb3){return _0x361874(_0x1eb59f,_0x25db6a,_0x42e6f3,_0x13bcb3);},'UyZgf':function(_0x5d7dfb,_0x2e2509){return _0x5d7dfb+_0x2e2509;},'ajYjF':function(_0x39eab7,_0x3168cd){return _0x39eab7+_0x3168cd;},'ynZUO':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','tTlau':'no_match','NCzrP':_0x41840c(0xc3),'dLbNh':_0x41840c(0xe0),'jmxeN':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','EnyAV':function(_0x1774fc,_0x2d6e51,_0x989a74,_0x3bf0fc){return _0x1774fc(_0x2d6e51,_0x989a74,_0x3bf0fc);},'nSTNE':function(_0xe0361e,_0xecd942){return _0xe0361e instanceof _0xecd942;},'PHpEp':_0x41840c(0xa4)};let _0x115865;try{_0x115865=await _0x38e443[_0x41840c(0x102)](fetchAuthConfig);}catch(_0x48f899){return _0x43c579?.[_0x41840c(0xb4)](_0x38e443[_0x41840c(0xb7)],{'reason':_0x38e443['MLfAF'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x48f899 instanceof Error?_0x48f899['message']:_0x38e443[_0x41840c(0xee)](String,_0x48f899))),![];}if((!_0x115865||!_0x115865[_0x41840c(0x120)]||Object['keys'](_0x115865[_0x41840c(0x120)])['length']===0x0)&&!_0xe1554f['authEnv']){if(_0x3a033d)return await _0x38e443['AePbL'](captureEnvLessProfile,_0x3e522c,_0x412678,_0xe1554f,_0x43c579);return _0x43c579?.[_0x41840c(0xb4)](_0x38e443[_0x41840c(0xb7)],{'reason':_0x38e443['MLfAF'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x38e443[_0x41840c(0xb6)](_0x38e443[_0x41840c(0xb6)](_0x38e443['ajYjF'](_0x38e443['ajYjF'](_0x41840c(0x11b)+'\x0a',_0x41840c(0xdd)),_0x41840c(0xfe)+_0x3e522c+'\x20--url\x20'+_0x412678+'\x20--skip-auth\x0a'),'\x0a'),_0x38e443[_0x41840c(0xe6)])+_0x41840c(0x100)),![];}let _0x37699c;if(_0xe1554f[_0x41840c(0x110)]){if(!_0x115865?.[_0x41840c(0x120)]?.[_0xe1554f['authEnv']]){const _0x288e19=Object[_0x41840c(0x10c)](_0x115865?.['environments']??{});return _0x43c579?.['trackPhaseEnd'](_0x38e443['HFDlt'],{'reason':_0x41840c(0x10d),'profileName':_0x3e522c}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0xe1554f['authEnv']+_0x41840c(0xaf)+(_0x288e19[_0x41840c(0x112)]?'\x20Configured\x20envs:\x20'+_0x288e19['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x37699c=_0xe1554f[_0x41840c(0x110)];}else _0x37699c=matchAuthEnvironment(_0x412678,_0x115865);if(!_0x37699c)return _0x43c579?.[_0x41840c(0xb4)]('profile.add.autoRouteSkipped',{'reason':_0x38e443['tTlau'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x41840c(0xc8)+_0x412678+_0x41840c(0xbd)+Object[_0x41840c(0x10c)](_0x115865?.[_0x41840c(0x120)]??{})[_0x41840c(0xc6)](',\x20')+'.'),![];const _0x38ffc9=_0x115865?.[_0x41840c(0x120)]?.[_0x37699c],_0x49b51c=_0x38ffc9?.['domains']??[];if(_0x3a033d&&!_0xe1554f['yes']){const {saveToCloud:_0x5e547c}=await _0x5ab92a['prompt']([{'type':_0x38e443[_0x41840c(0xa9)],'name':_0x38e443[_0x41840c(0xe9)],'message':_0x41840c(0xc2)+_0x37699c+'\x27\x20matching\x20'+_0x412678+_0x41840c(0xd9)+_0x49b51c['join'](',\x20')+_0x41840c(0xab)+_0x3e522c+_0x41840c(0xac),'default':!![]}]);if(!_0x5e547c)return _0x43c579?.[_0x41840c(0xb4)](_0x41840c(0xc9),{'reason':_0x41840c(0xd4),'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x38e443['jmxeN']),![];}const _0x14a838=_0x49b51c[_0x41840c(0xbc)](_0x27e1c0=>{const _0x3fb0f0=_0x41840c;try{return new URL(_0x27e1c0)[_0x3fb0f0(0xc5)]===new URL(_0x412678)[_0x3fb0f0(0xc5)];}catch{return![];}}),_0x5805d0={};!_0x14a838&&(_0x5805d0[_0x41840c(0xe7)]=_0x412678);try{await _0x38e443['EnyAV'](createCloudProfile,_0x3e522c,_0x37699c,{'settings':_0x5805d0}),_0x38e443['REpGi'](warnCloudProfileSharedInOrg);}catch(_0x4f2252){if(_0x38e443[_0x41840c(0xd5)](_0x4f2252,ApiError)&&_0x4f2252[_0x41840c(0x104)]===0x199){console[_0x41840c(0xd6)](_0x38e443[_0x41840c(0xb6)](_0x41840c(0xf8)+_0x3e522c+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x41840c(0xbb)+_0x3e522c));throw _0x4f2252;}throw _0x4f2252;}return console['log']('✓\x20Profile\x20\x27'+_0x3e522c+_0x41840c(0x119)+(_0x41840c(0xad)+_0x3e522c)),await _0x38e443['yZwZu'](sweepOrphansBestEffort,_0x3e522c),_0x43c579?.['trackPhaseEnd'](_0x38e443['PHpEp'],{'envKey':_0x37699c,'profileName':_0x3e522c}),!![];}async function createUnconfiguredCloudProfile(_0xa9aa7a,_0xcf8e78){const _0x4cf7d8=_0x2797,_0xc50653={'bnRxK':function(_0x5a613f,_0x33715f,_0x1dfe05,_0x2e3df6){return _0x5a613f(_0x33715f,_0x1dfe05,_0x2e3df6);}};try{await _0xc50653['bnRxK'](createCloudProfile,_0xa9aa7a,undefined,{'settings':_0xcf8e78}),warnCloudProfileSharedInOrg();}catch(_0x2ecbdc){_0x2ecbdc instanceof ApiError&&_0x2ecbdc[_0x4cf7d8(0x104)]===0x199&&console[_0x4cf7d8(0xd6)](_0x4cf7d8(0xf8)+_0xa9aa7a+_0x4cf7d8(0x117)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0xa9aa7a));throw _0x2ecbdc;}}async function captureEnvLessProfile(_0x4b51aa,_0x213ac2,_0x1b19a5,_0x4d2e06){const _0x71765a=_0x2797,_0x32c107={'oYUvh':'capture','vBDuy':'profile.add.autoRouteSkipped','riUjo':'user_declined','ukujb':function(_0xdd92,_0x5b3ddf){return _0xdd92+_0x5b3ddf;},'fjDjK':function(_0x22cada,_0x3afc36){return _0x22cada>_0x3afc36;},'JZDUp':function(_0x3a775b,_0x760c9d,_0x52f52a,_0x25344f){return _0x3a775b(_0x760c9d,_0x52f52a,_0x25344f);},'riDGL':function(_0x11c930,_0x2a9e40){return _0x11c930+_0x2a9e40;},'yVqCr':_0x71765a(0xa4)};if(!_0x1b19a5['yes']){const {capture:_0x1b5f6f}=await _0x5ab92a['prompt']([{'type':'confirm','name':_0x32c107[_0x71765a(0x121)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x1b5f6f)return _0x4d2e06?.[_0x71765a(0xb4)](_0x32c107[_0x71765a(0xfc)],{'reason':_0x32c107['riUjo'],'profileName':_0x4b51aa}),console[_0x71765a(0xd6)](_0x32c107[_0x71765a(0xd3)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x71765a(0x124))),![];}const _0x110d66={};if(_0x1b19a5[_0x71765a(0xf4)])for(const _0x4012a4 of _0x1b19a5['setupHeader']){const _0x3d2ecd=_0x4012a4[_0x71765a(0xf0)](':');if(_0x3d2ecd===-0x1)continue;_0x110d66[_0x4012a4['slice'](0x0,_0x3d2ecd)['trim']()]=_0x4012a4['slice'](_0x3d2ecd+0x1)['trim']();}const _0x44d644={'baseUrl':_0x213ac2};_0x32c107[_0x71765a(0xdb)](Object[_0x71765a(0x10c)](_0x110d66)['length'],0x0)&&(_0x44d644[_0x71765a(0xfb)]=_0x110d66);let _0x11da35;try{_0x11da35=await _0x32c107['JZDUp'](createCloudProfile,_0x4b51aa,undefined,{'settings':_0x44d644}),warnCloudProfileSharedInOrg();}catch(_0x52a768){_0x52a768 instanceof ApiError&&_0x52a768['status']===0x199&&console['error'](_0x32c107[_0x71765a(0xd3)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x4b51aa+_0x71765a(0x117),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4b51aa));throw _0x52a768;}return await manualBrowserLogin(_0x11da35,{'key':'','domains':[_0x213ac2],'setupHeaders':Object[_0x71765a(0x10c)](_0x110d66)['length']>0x0?_0x110d66:undefined}),console['log'](_0x32c107[_0x71765a(0xb3)](_0x71765a(0xcd)+_0x4b51aa+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x4b51aa)),await sweepOrphansBestEffort(_0x4b51aa),_0x4d2e06?.[_0x71765a(0xb4)](_0x32c107['yVqCr'],{'envKey':null,'profileName':_0x4b51aa}),!![];}export async function addEnv(_0x52a935,_0x538065={},_0xde6152){const _0x33792f=_0x2797,_0x2d716={'ZqHXj':function(_0x4e9c3f,_0x4b94b9){return _0x4e9c3f+_0x4b94b9;},'pTBeL':function(_0x7c8e00,_0x1f4eac){return _0x7c8e00+_0x1f4eac;},'vImQW':_0x33792f(0x10b),'RWeQb':function(_0x90a093,_0x156014){return _0x90a093===_0x156014;},'vgMXm':_0x33792f(0x109),'gzHzE':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','QmZPT':_0x33792f(0x10a),'KAMZa':function(_0x5da5f3,_0x30aef3){return _0x5da5f3(_0x30aef3);},'OsWnj':function(_0x596ae3){return _0x596ae3();},'zMCVW':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','dCTmh':function(_0x1f84b1,_0x55463c,_0x4a8677){return _0x1f84b1(_0x55463c,_0x4a8677);},'EnsGx':function(_0x491276,_0x413d88,_0xa55dd4,_0x1949ac,_0x3102a6){return _0x491276(_0x413d88,_0xa55dd4,_0x1949ac,_0x3102a6);},'RZwRV':function(_0x14b5ec,_0x155b44){return _0x14b5ec instanceof _0x155b44;},'EtFza':function(_0x46165e,_0x142926){return _0x46165e(_0x142926);},'PqEnU':function(_0x87ca82,_0x368128){return _0x87ca82>_0x368128;},'kwaWj':function(_0x4d6ddf,_0x3eb686,_0x339418){return _0x4d6ddf(_0x3eb686,_0x339418);},'UKrHY':function(_0xedd7ae,_0x5f2bd3){return _0xedd7ae+_0x5f2bd3;},'vjQRv':_0x33792f(0xa6),'TXCno':_0x33792f(0xef),'KsoMB':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','zFenx':'input','QdCwy':'baseUrl','JURsC':function(_0x564717,_0x2f504b){return _0x564717||_0x2f504b;},'zzzxa':_0x33792f(0xb2),'kjUTI':_0x33792f(0xe3),'jzpmU':'action','Xkzpt':'retry','bwpXo':'Continue\x20anyway','UZKpd':_0x33792f(0x11a),'WnsMc':function(_0x56e608,_0x4d5dd0){return _0x56e608 instanceof _0x4d5dd0;}};_0x538065['ci']&&(console['error'](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0xba)](_0x2d716['vImQW']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x33792f(0x127)),'\x0a')+_0x33792f(0xf1)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x33792f(0xaa)](0x1));const _0x35fc02={};if(_0x538065['setupHeader'])for(const _0x8ffa9d of _0x538065[_0x33792f(0xf4)]){const _0x207f8c=_0x8ffa9d['indexOf'](':');if(_0x207f8c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x8ffa9d+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0xf2ad5c=_0x8ffa9d['slice'](0x0,_0x207f8c)['trim'](),_0x2b7ace=_0x8ffa9d[_0x33792f(0x125)](_0x207f8c+0x1)[_0x33792f(0xb0)]();_0x35fc02[_0xf2ad5c]=_0x2b7ace;}if(_0x538065['cdpEndpoint']!==undefined&&_0x2d716[_0x33792f(0xce)](_0x538065['cdpEndpoint']['trim'](),''))throw new Error(_0x33792f(0x126));if(_0x538065[_0x33792f(0xed)]&&_0x538065['url'])throw new Error(_0x2d716[_0x33792f(0xd0)]);if(_0x538065[_0x33792f(0x110)]&&_0x538065[_0x33792f(0xf9)])throw new Error(_0x2d716['gzHzE']);if(_0x538065[_0x33792f(0x110)]&&_0x538065[_0x33792f(0xed)])throw new Error(_0x2d716[_0x33792f(0xb8)]);const _0x2b0493=_0x2d716['KAMZa'](Boolean,_0x538065[_0x33792f(0xed)]),_0x49f399=_0x2d716['OsWnj'](isInteractive);if(!_0x49f399&&!_0x538065['url']&&!_0x2b0493&&!_0x538065[_0x33792f(0xf9)])throw new Error(_0x33792f(0xde));if(_0x2b0493){const _0x163a23=_0x538065[_0x33792f(0xed)];console[_0x33792f(0xdc)](_0x2d716[_0x33792f(0xc1)]),console['log'](_0x33792f(0xd7)+_0x163a23);const _0x1c05f3={'cdpEndpoint':_0x163a23,'isElectron':!![]};Object['keys'](_0x35fc02)[_0x33792f(0x112)]>0x0&&(_0x1c05f3[_0x33792f(0xfb)]=_0x35fc02);await _0x2d716['dCTmh'](createUnconfiguredCloudProfile,_0x52a935,_0x1c05f3);try{_0x2d716[_0x33792f(0xe5)](setProfileOverride,process['cwd'](),_0x52a935,_0x33792f(0xed),_0x163a23),setProfileOverride(process[_0x33792f(0x10e)](),_0x52a935,_0x33792f(0xc4),!![]);}catch(_0xb37025){console['error'](_0x33792f(0xb1)+(_0x2d716['RZwRV'](_0xb37025,Error)?_0xb37025[_0x33792f(0x111)]:_0x2d716[_0x33792f(0x118)](String,_0xb37025)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x52a935+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x52a935),await markActive(_0x52a935);return;}if(_0x538065['skipAuth']){const _0x38c29e={};_0x538065['url']&&(_0x38c29e['baseUrl']=_0x538065['url']);_0x2d716[_0x33792f(0xcb)](Object[_0x33792f(0x10c)](_0x35fc02)[_0x33792f(0x112)],0x0)&&(_0x38c29e['setupHeaders']=_0x35fc02);await _0x2d716['kwaWj'](createUnconfiguredCloudProfile,_0x52a935,_0x38c29e),console['log'](_0x2d716['UKrHY'](_0x33792f(0xb9)+_0x52a935+_0x33792f(0xe1),_0x33792f(0xae)+_0x52a935+_0x33792f(0xfd))),await sweepOrphansBestEffort(_0x52a935),await markActive(_0x52a935);return;}if(_0x538065['url']){const _0x10e1ce=_0x538065['url'],_0xe7fda5=await checkUrlReachability(_0x10e1ce);if(!_0xe7fda5['ok']&&!_0x538065['force'])throw new Error('Could\x20not\x20reach\x20'+_0x10e1ce+':\x20'+_0xe7fda5['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0xe7fda5['ok']&&_0x538065['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x10e1ce+':\x20'+_0xe7fda5['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x33792f(0xdc)](_0x2d716[_0x33792f(0xa5)]),console[_0x33792f(0xdc)](_0x2d716['TXCno']),console[_0x33792f(0xdc)](_0x2d716['KsoMB']);let _0x5201a9='',_0x5c2af7=![];while(!![]){const _0x3bf1b6=await _0x5ab92a['prompt']([{'type':_0x2d716[_0x33792f(0xf7)],'name':_0x2d716['QdCwy'],'message':_0x5c2af7?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x33792f(0xa8),'default':_0x2d716[_0x33792f(0xff)](_0x5201a9,_0x2d716['zzzxa'])}]);_0x5201a9=_0x3bf1b6[_0x33792f(0xe7)];const _0x4874b8=await _0x2d716[_0x33792f(0xea)](checkUrlReachability,_0x5201a9);if(_0x4874b8['ok'])break;const _0x22cf13=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5201a9),_0x449f07=_0x4874b8['isProtocolError']&&!_0x22cf13,_0x156641=_0x449f07?'http://'+_0x5201a9:null;_0x5c2af7=!![],console[_0x33792f(0xdc)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x5201a9+':\x20'+_0x4874b8['error']);_0x156641&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x156641+'?');const {action:_0x43d80f}=await _0x5ab92a[_0x33792f(0x116)]([{'type':_0x2d716[_0x33792f(0xd1)],'name':_0x2d716[_0x33792f(0x115)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x156641?[{'name':_0x33792f(0xc7)+_0x156641,'value':'use_suggestion'}]:[],{'name':_0x33792f(0x11d),'value':_0x2d716[_0x33792f(0x113)]},{'name':_0x2d716[_0x33792f(0xf5)],'value':_0x2d716[_0x33792f(0x103)]}]}]);if(_0x2d716['RWeQb'](_0x43d80f,'use_suggestion')&&_0x156641){_0x5201a9=_0x156641;const _0x3e9941=await checkUrlReachability(_0x5201a9);if(_0x3e9941['ok'])break;console['log'](_0x33792f(0xe8)+_0x5201a9+':\x20'+_0x3e9941[_0x33792f(0xd6)]);}else{if(_0x2d716['RWeQb'](_0x43d80f,_0x2d716[_0x33792f(0x103)]))break;}}_0x538065={..._0x538065,'url':_0x5201a9};}let _0x221c29=![];try{_0x221c29=await tryAutoRouteCloudProfile(_0x52a935,_0x538065[_0x33792f(0x11e)],_0x538065,_0x49f399,_0xde6152);}catch(_0x5b3590){console[_0x33792f(0xd6)](_0x33792f(0x108)+_0x52a935+_0x33792f(0xf6)+(_0x2d716[_0x33792f(0xdf)](_0x5b3590,Error)?_0x5b3590['message']:String(_0x5b3590))),process[_0x33792f(0xaa)](0x1);}!_0x221c29&&process[_0x33792f(0xaa)](0x1),await markActive(_0x52a935);}
@@ -1 +1 @@
1
- (function(_0x4e683c,_0x2b8be7){var _0x3b343d=_0x4ea8,_0x5cf063=_0x4e683c();while(!![]){try{var _0x57234d=parseInt(_0x3b343d(0x17b))/0x1*(-parseInt(_0x3b343d(0x178))/0x2)+parseInt(_0x3b343d(0x17a))/0x3+parseInt(_0x3b343d(0x181))/0x4+parseInt(_0x3b343d(0x182))/0x5+-parseInt(_0x3b343d(0x187))/0x6*(-parseInt(_0x3b343d(0x186))/0x7)+-parseInt(_0x3b343d(0x17e))/0x8*(-parseInt(_0x3b343d(0x17c))/0x9)+-parseInt(_0x3b343d(0x188))/0xa*(parseInt(_0x3b343d(0x183))/0xb);if(_0x57234d===_0x2b8be7)break;else _0x5cf063['push'](_0x5cf063['shift']());}catch(_0x4da68a){_0x5cf063['push'](_0x5cf063['shift']());}}}(_0x1a78,0x227fc));function _0x1a78(){var _0x2850cf=['428994VIvrAN','3NjjfeE','9beupLQ','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','818256atfoSL','gYiio','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','223132wbzAnp','1223265bPuZUz','4785704eejgtI','error','XGmHX','1398614LMAsSp','6LVtqTa','10qngPTO','exit','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','112764QAOfqF','SGWBl'];_0x1a78=function(){return _0x2850cf;};return _0x1a78();}function _0x4ea8(_0x535da2,_0x438d6c){_0x535da2=_0x535da2-0x178;var _0x1a781c=_0x1a78();var _0x4ea894=_0x1a781c[_0x535da2];return _0x4ea894;}export async function authEncrypt(_0x5fbc60){var _0x3386be=_0x4ea8,_0x22dc40={'SGWBl':function(_0x1d3707,_0x12bb50){return _0x1d3707+_0x12bb50;},'HCIIZ':_0x3386be(0x180),'XGmHX':_0x3386be(0x17d),'kjnMv':_0x3386be(0x18a),'gYiio':_0x3386be(0x18b)};console[_0x3386be(0x184)](_0x22dc40[_0x3386be(0x179)](_0x22dc40[_0x3386be(0x179)](_0x22dc40['HCIIZ']+_0x22dc40[_0x3386be(0x185)]+'\x0a'+_0x22dc40['kjnMv'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+_0x22dc40[_0x3386be(0x17f)],'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x3386be(0x189)](0x1);}
1
+ function _0x8bb1(){var _0x212d12=['15cBTZlf','8883480FoSyan','JCWkN','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5527854JsAwFj','5208400XNtPPO','470198tyIEvZ','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','707IaRIha','6819610UqlzNk','77818omjmnG','AIRHE','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','NdwkZ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','21768SfAFZx'];_0x8bb1=function(){return _0x212d12;};return _0x8bb1();}(function(_0x215236,_0x231bd7){var _0x363d44=_0x174f,_0x498cc6=_0x215236();while(!![]){try{var _0xa9449b=-parseInt(_0x363d44(0x179))/0x1+-parseInt(_0x363d44(0x175))/0x2*(parseInt(_0x363d44(0x16f))/0x3)+parseInt(_0x363d44(0x174))/0x4+parseInt(_0x363d44(0x178))/0x5+-parseInt(_0x363d44(0x170))/0x6+-parseInt(_0x363d44(0x177))/0x7*(-parseInt(_0x363d44(0x16e))/0x8)+parseInt(_0x363d44(0x173))/0x9;if(_0xa9449b===_0x231bd7)break;else _0x498cc6['push'](_0x498cc6['shift']());}catch(_0x408029){_0x498cc6['push'](_0x498cc6['shift']());}}}(_0x8bb1,0xc87a4));function _0x174f(_0x2bb738,_0x572c65){_0x2bb738=_0x2bb738-0x16a;var _0x8bb113=_0x8bb1();var _0x174f27=_0x8bb113[_0x2bb738];return _0x174f27;}export async function authEncrypt(_0x2880bc){var _0x469750=_0x174f,_0x3ba096={'NdwkZ':_0x469750(0x172),'AIRHE':_0x469750(0x176),'JCWkN':_0x469750(0x16b),'KDfmc':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x3ba096[_0x469750(0x16c)]+_0x3ba096[_0x469750(0x16a)]+'\x0a'+_0x469750(0x16d)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+_0x3ba096[_0x469750(0x171)]+_0x3ba096['KDfmc']),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x305f73=_0x3767;(function(_0xbf701f,_0xf1944b){const _0xd749de=_0x3767,_0x327f8f=_0xbf701f();while(!![]){try{const _0x163f67=parseInt(_0xd749de(0xe1))/0x1+-parseInt(_0xd749de(0xc5))/0x2+parseInt(_0xd749de(0xe7))/0x3*(parseInt(_0xd749de(0xdd))/0x4)+-parseInt(_0xd749de(0xdc))/0x5*(-parseInt(_0xd749de(0xe5))/0x6)+parseInt(_0xd749de(0xd8))/0x7+parseInt(_0xd749de(0xde))/0x8*(-parseInt(_0xd749de(0xdb))/0x9)+-parseInt(_0xd749de(0xbd))/0xa;if(_0x163f67===_0xf1944b)break;else _0x327f8f['push'](_0x327f8f['shift']());}catch(_0x2ed8b3){_0x327f8f['push'](_0x327f8f['shift']());}}}(_0x2275,0x5ccd6));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x305f73(0xcb),'bug-bash','e2e-test-recommender'],opencodePluginName=_0x305f73(0xd5);function parseJsonc(_0x4e9f2b){const _0x4a61ca=_0x305f73,_0x537b3d=_0x4e9f2b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4e0fdf=_0x537b3d[_0x4a61ca(0xd1)](/^\s*\/\/.*$/gm,''),_0x29a751=_0x4e0fdf[_0x4a61ca(0xd1)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x29a751);}function _0x3767(_0x545367,_0x5f5cbf){_0x545367=_0x545367-0xb7;const _0x22750d=_0x2275();let _0x3767f3=_0x22750d[_0x545367];return _0x3767f3;}async function removeOpencodePluginConfig(_0x3e15a3){const _0x17dd55=_0x305f73,_0x51d36a={'sWaNC':_0x17dd55(0xce),'EZDor':function(_0x45a4b4,_0x14e5be){return _0x45a4b4!==_0x14e5be;},'raIxJ':function(_0x4d68f0,_0x457d94){return _0x4d68f0(_0x457d94);},'ouOll':function(_0x200f6c,_0x154cf0){return _0x200f6c===_0x154cf0;}};if(!existsSync(_0x3e15a3))return![];let _0x5d7d7f;try{const _0x5d5397=await readFile(_0x3e15a3,_0x17dd55(0xc9));_0x5d7d7f=_0x51d36a['raIxJ'](parseJsonc,_0x5d5397);}catch{return![];}const _0x4d6fba=Array['isArray'](_0x5d7d7f[_0x17dd55(0xe6)])?_0x5d7d7f[_0x17dd55(0xe6)]:[];if(_0x4d6fba[_0x17dd55(0xd9)]===0x0)return![];const _0x519620=_0x4d6fba['filter'](_0x2c7598=>{const _0x1cd5e9=_0x17dd55;if(typeof _0x2c7598!==_0x51d36a['sWaNC'])return!![];return _0x51d36a[_0x1cd5e9(0xda)](_0x2c7598,opencodePluginName);});if(_0x51d36a['ouOll'](_0x519620[_0x17dd55(0xd9)],_0x4d6fba[_0x17dd55(0xd9)]))return![];return _0x519620[_0x17dd55(0xd9)]===0x0?delete _0x5d7d7f[_0x17dd55(0xe6)]:_0x5d7d7f['plugin']=_0x519620,await writeFile(_0x3e15a3,JSON['stringify'](_0x5d7d7f,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5d0f27){const _0xc56f93=_0x305f73,_0x1b5ea6={'ykLdA':function(_0x393b42,_0x34517c){return _0x393b42===_0x34517c;},'VfJgR':function(_0x4c9f45,_0x5ec9ab){return _0x4c9f45(_0x5ec9ab);},'DBhJU':_0xc56f93(0xe6),'EHYXM':'uninstall','nqVXi':function(_0x24ec33,_0x134838,_0x341dbf,_0x4ec27a){return _0x24ec33(_0x134838,_0x341dbf,_0x4ec27a);},'WFXpe':'claude','spWfr':'ignore','WuvUE':'win32'};return new Promise(_0x29a951=>{const _0xbd92c0=_0xc56f93,_0x4b9771={'ziuib':function(_0x4284d6,_0x289cc9){const _0x5f175a=_0x3767;return _0x1b5ea6[_0x5f175a(0xbf)](_0x4284d6,_0x289cc9);},'qgiUs':function(_0x294c27,_0x319860){return _0x1b5ea6['VfJgR'](_0x294c27,_0x319860);}},_0x3b07ad=[_0x1b5ea6[_0xbd92c0(0xd3)],_0x1b5ea6['EHYXM'],_0xbd92c0(0xea)];_0x5d0f27&&_0x3b07ad['push']('--scope',_0x5d0f27);const _0x552b75=_0x1b5ea6['nqVXi'](spawn,_0x1b5ea6['WFXpe'],_0x3b07ad,{'stdio':['ignore',_0x1b5ea6[_0xbd92c0(0xdf)],_0xbd92c0(0xc0)],'cwd':_0x5d0f27?getProjectRoot():undefined,'shell':process['platform']===_0x1b5ea6[_0xbd92c0(0xbb)]});_0x552b75['on'](_0xbd92c0(0xe8),_0x1b65a1=>{const _0x12ae01=_0xbd92c0;_0x29a951(_0x4b9771[_0x12ae01(0xd2)](_0x1b65a1,0x0));}),_0x552b75['on']('error',()=>{_0x4b9771['qgiUs'](_0x29a951,![]);});});}function _0x2275(){const _0x12fc5d=['✓\x20Removed\x20trailhead\x20marketplace','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','string','log','opencode.json','replace','ziuib','DBhJU','trailhead','@ranger-testing/opencode-plugin','tmRBP','KLnky','1963143SbXTgd','length','EZDor','171aMGBZS','20RYDfHy','1432388cQqIFI','25448YwaRIT','spWfr','TtFJV','484940iPZvwb','✓\x20Removed\x20.ranger/\x20directory','JrYYk','vZkVM','1123602cTmvSG','plugin','3iPviJL','close','rmZQH','ranger@trailhead','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','GWVdZ','Nothing\x20to\x20clean\x20up.\x0a','remove','qmPIB','WuvUE','\x0a✅\x20Cleanup\x20complete!\x0a','9190190CCcJIs','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ykLdA','ignore','user','marketplace','XblTD','yEwto','1025956ndlslD','JZojn','project','fdkDw','utf-8','LGtDx','feature-tracker'];_0x2275=function(){return _0x12fc5d;};return _0x2275();}async function removeMarketplace(){const _0x42a4c4=_0x305f73,_0x243a07={'GWVdZ':function(_0x5456ea,_0xdf5476,_0x4b7f36,_0x2f9e3b){return _0x5456ea(_0xdf5476,_0x4b7f36,_0x2f9e3b);},'KLnky':_0x42a4c4(0xc2),'LGtDx':_0x42a4c4(0xc0),'cYBBI':function(_0x322f79,_0x252dae){return _0x322f79===_0x252dae;},'JZojn':'close','CZGhp':'error'};return new Promise(_0x4619c5=>{const _0x4c84a0=_0x42a4c4,_0x5531d9=_0x243a07[_0x4c84a0(0xb7)](spawn,'claude',[_0x4c84a0(0xe6),_0x243a07[_0x4c84a0(0xd7)],_0x4c84a0(0xb9),_0x4c84a0(0xd4)],{'stdio':[_0x243a07[_0x4c84a0(0xca)],'ignore',_0x4c84a0(0xc0)],'shell':_0x243a07['cYBBI'](process['platform'],'win32')});_0x5531d9['on'](_0x243a07[_0x4c84a0(0xc6)],_0xbacc5a=>{_0x4619c5(_0xbacc5a===0x0);}),_0x5531d9['on'](_0x243a07['CZGhp'],()=>{_0x4619c5(![]);});});}export async function clean(){const _0x2119e1=_0x305f73,_0x4b4f26={'HZUDw':function(_0x4fc47b){return _0x4fc47b();},'tmRBP':function(_0xbb4a01){return _0xbb4a01();},'XblTD':_0x2119e1(0xe2),'fdkDw':function(_0x24e33c){return _0x24e33c();},'TtFJV':function(_0xfdefd8,_0x56065a,_0x1e0ec8){return _0xfdefd8(_0x56065a,_0x1e0ec8);},'JrYYk':_0x2119e1(0xc7),'vZkVM':function(_0xbfe7e1,_0x3065fd,_0x22e529){return _0xbfe7e1(_0x3065fd,_0x22e529);},'yEwto':function(_0x414453,_0x2f528a){return _0x414453(_0x2f528a);},'qmPIB':_0x2119e1(0xc1),'rmZQH':function(_0x415ee9,_0x4666f8){return _0x415ee9(_0x4666f8);},'GGMiY':function(_0x48d1aa,_0x43c651,_0x96a474){return _0x48d1aa(_0x43c651,_0x96a474);},'FKudW':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','sFlxE':_0x2119e1(0xbc)};console[_0x2119e1(0xcf)](_0x2119e1(0xcd));let _0x50f19c=![];try{await _0x4b4f26['HZUDw'](deleteAllCredentials),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x50f19c=!![];}catch{}const _0x493d4a=getCacheFile();existsSync(_0x493d4a)&&(await rm(_0x493d4a),_0x50f19c=!![]);const _0x5abdc2=_0x4b4f26[_0x2119e1(0xd6)](getRangerDir);existsSync(_0x5abdc2)&&(await rm(_0x5abdc2,{'recursive':!![]}),console[_0x2119e1(0xcf)](_0x4b4f26[_0x2119e1(0xc3)]),_0x50f19c=!![]);const _0x273977=getProjectSkillsDir();for(const _0x4bd3b9 of skillsToRemove){const _0x4e608c=join(_0x273977,_0x4bd3b9);existsSync(_0x4e608c)&&(await rm(_0x4e608c,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x4bd3b9),_0x50f19c=!![]);}const _0x981b19=_0x4b4f26[_0x2119e1(0xc8)](getUserSkillsDir);for(const _0x2e3f7f of skillsToRemove){const _0x54587e=_0x4b4f26[_0x2119e1(0xe0)](join,_0x981b19,_0x2e3f7f);existsSync(_0x54587e)&&(await _0x4b4f26[_0x2119e1(0xe0)](rm,_0x54587e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x2e3f7f),_0x50f19c=!![]);}const _0x4aa6f8=getOpencodeSkillsDir(_0x4b4f26['JrYYk']);for(const _0x13af1f of skillsToRemove){const _0x173d9b=_0x4b4f26[_0x2119e1(0xe4)](join,_0x4aa6f8,_0x13af1f);_0x4b4f26[_0x2119e1(0xc4)](existsSync,_0x173d9b)&&(await rm(_0x173d9b,{'recursive':!![]}),console['log'](_0x2119e1(0xeb)+_0x13af1f),_0x50f19c=!![]);}const _0x5e7872=getOpencodeSkillsDir(_0x4b4f26[_0x2119e1(0xba)]);for(const _0x3c27cc of skillsToRemove){const _0x110e43=join(_0x5e7872,_0x3c27cc);_0x4b4f26[_0x2119e1(0xe9)](existsSync,_0x110e43)&&(await _0x4b4f26[_0x2119e1(0xe4)](rm,_0x110e43,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x3c27cc),_0x50f19c=!![]);}const _0x4600b3=_0x4b4f26['GGMiY'](join,_0x4b4f26[_0x2119e1(0xc4)](getOpencodeConfigDir,_0x4b4f26[_0x2119e1(0xe3)]),_0x2119e1(0xd0));await _0x4b4f26['rmZQH'](removeOpencodePluginConfig,_0x4600b3)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x50f19c=!![]);const _0x108022=join(getOpencodeConfigDir(_0x4b4f26['qmPIB']),_0x2119e1(0xd0));await _0x4b4f26['rmZQH'](removeOpencodePluginConfig,_0x108022)&&(console[_0x2119e1(0xcf)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x50f19c=!![]);const _0x2d411e=await _0x4b4f26['fdkDw'](uninstallClaudePlugin);_0x2d411e&&(console['log'](_0x2119e1(0xbe)),_0x50f19c=!![]);const _0x3b8730=await _0x4b4f26[_0x2119e1(0xc4)](uninstallClaudePlugin,_0x4b4f26['JrYYk']);_0x3b8730&&(console['log'](_0x4b4f26['FKudW']),_0x50f19c=!![]);const _0xd8cc93=await _0x4b4f26[_0x2119e1(0xd6)](removeMarketplace);_0xd8cc93&&(console['log'](_0x2119e1(0xcc)),_0x50f19c=!![]),_0x50f19c?console['log'](_0x4b4f26['sFlxE']):console[_0x2119e1(0xcf)](_0x2119e1(0xb8));}
1
+ const _0x11f4f0=_0x1d97;(function(_0x4e2517,_0x2654fc){const _0x29f35d=_0x1d97,_0x2db0dc=_0x4e2517();while(!![]){try{const _0x5e5d9d=parseInt(_0x29f35d(0xe6))/0x1*(-parseInt(_0x29f35d(0xc9))/0x2)+-parseInt(_0x29f35d(0xc2))/0x3*(parseInt(_0x29f35d(0xbf))/0x4)+parseInt(_0x29f35d(0xb9))/0x5*(parseInt(_0x29f35d(0xd1))/0x6)+parseInt(_0x29f35d(0xc5))/0x7+-parseInt(_0x29f35d(0xcd))/0x8*(parseInt(_0x29f35d(0xe8))/0x9)+-parseInt(_0x29f35d(0xb8))/0xa*(-parseInt(_0x29f35d(0xdb))/0xb)+parseInt(_0x29f35d(0xe7))/0xc;if(_0x5e5d9d===_0x2654fc)break;else _0x2db0dc['push'](_0x2db0dc['shift']());}catch(_0x22abce){_0x2db0dc['push'](_0x2db0dc['shift']());}}}(_0x53ba,0x88a98));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x11f4f0(0xcb),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x10bd2a){const _0x3f081b=_0x11f4f0,_0x285e6a=_0x10bd2a[_0x3f081b(0xbd)](/\/\*[\s\S]*?\*\//g,''),_0x24744f=_0x285e6a[_0x3f081b(0xbd)](/^\s*\/\/.*$/gm,''),_0x310b5c=_0x24744f[_0x3f081b(0xbd)](/,\s*([}\]])/g,'$1');return JSON[_0x3f081b(0xbc)](_0x310b5c);}async function removeOpencodePluginConfig(_0x2c4221){const _0x508676=_0x11f4f0,_0x4e6e87={'ahpbm':_0x508676(0xcc),'OuFgy':_0x508676(0xde),'QWbMw':function(_0x4e42e3,_0x4b1914){return _0x4e42e3(_0x4b1914);},'IWnEB':function(_0x33ad03,_0x59cab2){return _0x33ad03===_0x59cab2;},'ARgWE':function(_0x239289,_0x46ad83){return _0x239289===_0x46ad83;},'JVMyU':function(_0x141e7f,_0x16da92,_0x92a80a){return _0x141e7f(_0x16da92,_0x92a80a);},'TXuOm':function(_0x14ef93,_0xe2f858){return _0x14ef93+_0xe2f858;}};if(!existsSync(_0x2c4221))return![];let _0x2e1fa6;try{const _0x1b4c41=await readFile(_0x2c4221,_0x4e6e87['OuFgy']);_0x2e1fa6=_0x4e6e87['QWbMw'](parseJsonc,_0x1b4c41);}catch{return![];}const _0x8dd00d=Array[_0x508676(0xeb)](_0x2e1fa6['plugin'])?_0x2e1fa6[_0x508676(0xe0)]:[];if(_0x4e6e87[_0x508676(0xe1)](_0x8dd00d[_0x508676(0xb5)],0x0))return![];const _0x43a733=_0x8dd00d[_0x508676(0xe2)](_0x1821e6=>{const _0x1eb5de=_0x508676;if(typeof _0x1821e6!==_0x4e6e87[_0x1eb5de(0xee)])return!![];return _0x1821e6!==opencodePluginName;});if(_0x4e6e87['ARgWE'](_0x43a733['length'],_0x8dd00d[_0x508676(0xb5)]))return![];return _0x4e6e87[_0x508676(0xd8)](_0x43a733['length'],0x0)?delete _0x2e1fa6['plugin']:_0x2e1fa6['plugin']=_0x43a733,await _0x4e6e87['JVMyU'](writeFile,_0x2c4221,_0x4e6e87['TXuOm'](JSON[_0x508676(0xdc)](_0x2e1fa6,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x11ffae){const _0x4f3ab4=_0x11f4f0,_0x1543ed={'VwulP':function(_0x865405,_0x22f7cd){return _0x865405(_0x22f7cd);},'girxJ':function(_0x5261f3,_0x57da93){return _0x5261f3===_0x57da93;},'cTAIu':'plugin','AlZkd':_0x4f3ab4(0xb4),'BwJoh':function(_0x148eb7,_0x328516,_0x10caf8,_0x57ba8e){return _0x148eb7(_0x328516,_0x10caf8,_0x57ba8e);},'GEOhN':_0x4f3ab4(0xef),'vafeT':'ignore','sQQLC':function(_0x3ccac9){return _0x3ccac9();},'lptUo':_0x4f3ab4(0xdd),'DddHJ':_0x4f3ab4(0xdf)};return new Promise(_0x321fa8=>{const _0x424cfe=_0x4f3ab4,_0x5abaa2={'QvzEe':function(_0x1f4919,_0x423aab){return _0x1543ed['girxJ'](_0x1f4919,_0x423aab);}},_0x471cc6=[_0x1543ed[_0x424cfe(0xe9)],_0x1543ed['AlZkd'],_0x424cfe(0xe3)];_0x11ffae&&_0x471cc6[_0x424cfe(0xce)](_0x424cfe(0xb2),_0x11ffae);const _0x3a064e=_0x1543ed[_0x424cfe(0xe4)](spawn,_0x1543ed['GEOhN'],_0x471cc6,{'stdio':[_0x1543ed[_0x424cfe(0xbb)],_0x424cfe(0xc0),_0x1543ed[_0x424cfe(0xbb)]],'cwd':_0x11ffae?_0x1543ed['sQQLC'](getProjectRoot):undefined,'shell':process['platform']===_0x1543ed['lptUo']});_0x3a064e['on']('close',_0x5a7f5f=>{const _0x20e05e=_0x424cfe;_0x321fa8(_0x5abaa2[_0x20e05e(0xd3)](_0x5a7f5f,0x0));}),_0x3a064e['on'](_0x1543ed[_0x424cfe(0xc8)],()=>{_0x1543ed['VwulP'](_0x321fa8,![]);});});}function _0x1d97(_0x3320ca,_0x1485f7){_0x3320ca=_0x3320ca-0xb2;const _0x53bade=_0x53ba();let _0x1d97e6=_0x53bade[_0x3320ca];return _0x1d97e6;}async function removeMarketplace(){const _0x43c936=_0x11f4f0,_0x1aff53={'QRVFd':'claude','pOdnu':_0x43c936(0xe0),'wHwgy':'marketplace','YeACE':_0x43c936(0xc0),'nbcLM':function(_0x3a86c5,_0x410375){return _0x3a86c5===_0x410375;},'vPpZf':_0x43c936(0xdd)};return new Promise(_0x13f390=>{const _0x78b508=_0x43c936,_0x5a079c=spawn(_0x1aff53['QRVFd'],[_0x1aff53[_0x78b508(0xf0)],_0x1aff53['wHwgy'],'remove',_0x78b508(0xd5)],{'stdio':['ignore',_0x1aff53['YeACE'],_0x1aff53[_0x78b508(0xc3)]],'shell':_0x1aff53['nbcLM'](process[_0x78b508(0xd4)],_0x1aff53['vPpZf'])});_0x5a079c['on'](_0x78b508(0xc7),_0x3f59a3=>{_0x13f390(_0x3f59a3===0x0);}),_0x5a079c['on']('error',()=>{_0x13f390(![]);});});}function _0x53ba(){const _0x102eec=['✓\x20Removed\x20trailhead\x20marketplace','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','ahpbm','claude','pOdnu','--scope','pGDRm','uninstall','length','\x0a✅\x20Cleanup\x20complete!\x0a','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','1760030qEPKkN','5vLEsyq','✓\x20Removed\x20stored\x20credentials','vafeT','parse','replace','project','30136yUPKoj','ignore','BXgJu','207gToENk','YeACE','TBqnW','6018138xWowcE','user','close','DddHJ','18474xtrGTK','xrHpG','feature-tracker','string','16WOxlBh','push','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','GbMod','6557586CmTGBv','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','QvzEe','platform','trailhead','vAenO','vGWSP','ARgWE','CFTOr','RztCQ','22hKwyMr','stringify','win32','utf-8','error','plugin','IWnEB','filter','ranger@trailhead','BwJoh','log','118hbtyUK','5099004HPRpEI','2520036FkkhJI','cTAIu','✓\x20Removed\x20user\x20skill:\x20','isArray'];_0x53ba=function(){return _0x102eec;};return _0x53ba();}export async function clean(){const _0x95ada3=_0x11f4f0,_0x4152af={'ERBLF':_0x95ada3(0xd2),'RztCQ':_0x95ada3(0xba),'GbMod':function(_0x2beee9,_0x23ae21){return _0x2beee9(_0x23ae21);},'BXgJu':function(_0x50c74a){return _0x50c74a();},'TBqnW':function(_0x1d87f4,_0x4c0637,_0x1a731e){return _0x1d87f4(_0x4c0637,_0x1a731e);},'jlYfK':function(_0x54547d,_0xa77173){return _0x54547d(_0xa77173);},'CFTOr':function(_0x4179b9,_0x1b34fc,_0x20faf8){return _0x4179b9(_0x1b34fc,_0x20faf8);},'xrHpG':function(_0x343f00,_0x48eedf){return _0x343f00(_0x48eedf);},'vGWSP':_0x95ada3(0xc6),'TfOoK':function(_0x237b41,_0x2c2a23,_0x5882c3){return _0x237b41(_0x2c2a23,_0x5882c3);},'FZQRI':'project','YfhlD':'opencode.json','RhwnG':function(_0x248fdd,_0x2ec4c5){return _0x248fdd(_0x2ec4c5);},'qICXP':function(_0x5887f6){return _0x5887f6();},'vAenO':_0x95ada3(0xec),'pGDRm':'Nothing\x20to\x20clean\x20up.\x0a'};console['log'](_0x4152af['ERBLF']);let _0x47a42b=![];try{await deleteAllCredentials(),console[_0x95ada3(0xe5)](_0x4152af[_0x95ada3(0xda)]),_0x47a42b=!![];}catch{}const _0xcc086d=getCacheFile();_0x4152af['GbMod'](existsSync,_0xcc086d)&&(await rm(_0xcc086d),_0x47a42b=!![]);const _0x1355f7=_0x4152af[_0x95ada3(0xc1)](getRangerDir);existsSync(_0x1355f7)&&(await _0x4152af['TBqnW'](rm,_0x1355f7,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20.ranger/\x20directory'),_0x47a42b=!![]);const _0x309121=getProjectSkillsDir();for(const _0xe43946 of skillsToRemove){const _0x1fcf57=_0x4152af[_0x95ada3(0xc4)](join,_0x309121,_0xe43946);_0x4152af['jlYfK'](existsSync,_0x1fcf57)&&(await _0x4152af[_0x95ada3(0xd9)](rm,_0x1fcf57,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20project\x20skill:\x20'+_0xe43946),_0x47a42b=!![]);}const _0x3bd2b7=getUserSkillsDir();for(const _0x45c36f of skillsToRemove){const _0x28455b=join(_0x3bd2b7,_0x45c36f);_0x4152af['jlYfK'](existsSync,_0x28455b)&&(await rm(_0x28455b,{'recursive':!![]}),console[_0x95ada3(0xe5)](_0x95ada3(0xea)+_0x45c36f),_0x47a42b=!![]);}const _0x5e62e5=_0x4152af[_0x95ada3(0xd0)](getOpencodeSkillsDir,_0x95ada3(0xbe));for(const _0x17d366 of skillsToRemove){const _0x581f01=_0x4152af[_0x95ada3(0xc4)](join,_0x5e62e5,_0x17d366);_0x4152af[_0x95ada3(0xca)](existsSync,_0x581f01)&&(await rm(_0x581f01,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x17d366),_0x47a42b=!![]);}const _0x5dc220=getOpencodeSkillsDir(_0x4152af[_0x95ada3(0xd7)]);for(const _0x39bf19 of skillsToRemove){const _0x43fc3d=_0x4152af['TfOoK'](join,_0x5dc220,_0x39bf19);existsSync(_0x43fc3d)&&(await rm(_0x43fc3d,{'recursive':!![]}),console['log'](_0x95ada3(0xed)+_0x39bf19),_0x47a42b=!![]);}const _0x45f27c=join(getOpencodeConfigDir(_0x4152af['FZQRI']),_0x4152af['YfhlD']);await _0x4152af['RhwnG'](removeOpencodePluginConfig,_0x45f27c)&&(console['log'](_0x95ada3(0xcf)),_0x47a42b=!![]);const _0x40afc3=join(getOpencodeConfigDir('user'),'opencode.json');await removeOpencodePluginConfig(_0x40afc3)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x47a42b=!![]);const _0x117ba4=await _0x4152af['qICXP'](uninstallClaudePlugin);_0x117ba4&&(console['log'](_0x95ada3(0xb7)),_0x47a42b=!![]);const _0x2e61fd=await uninstallClaudePlugin(_0x4152af['FZQRI']);_0x2e61fd&&(console[_0x95ada3(0xe5)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x47a42b=!![]);const _0x16b199=await _0x4152af[_0x95ada3(0xc1)](removeMarketplace);_0x16b199&&(console['log'](_0x4152af[_0x95ada3(0xd6)]),_0x47a42b=!![]),_0x47a42b?console['log'](_0x95ada3(0xb6)):console[_0x95ada3(0xe5)](_0x4152af[_0x95ada3(0xb3)]);}
@@ -1 +1 @@
1
- function _0xf1d4(){const _0x482cd5=['25YxlGgA','qDFDa','180678rqKTCX','alsoExistsElsewhere','22680nbGLym','headless','vPqfd','2744667YIHsXr','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','221740JCWsDf','FvdhK','allowInsecureLocalhost','cloud','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Key\x20\x22','IcyOx','dpQuU','44CQYDPs','yYady','GSmEw','isSafeInteger','GneFV','YyEKF','log',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','exrIi','EvAjc','cRLsb','\x22\x20not\x20found','length','bTySL','thkCt','forceLogin','422696eorJfq','rZgWv','startsWith','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','stringify','aNrLe','settings','(not\x20set)','true','YkJQZ','35cMJdOy','kind','\x20=\x20','endsWith','1073170xDewMn','test','3pDkVNk','false','No\x20configuration\x20set\x20for\x20\x22','object','693006jKvicx'];_0xf1d4=function(){return _0x482cd5;};return _0xf1d4();}function _0x105a(_0x33418d,_0x22be9d){_0x33418d=_0x33418d-0xdd;const _0xf1d445=_0xf1d4();let _0x105aa0=_0xf1d445[_0x33418d];return _0x105aa0;}const _0x5bd86c=_0x105a;(function(_0x28a3e4,_0x192670){const _0x2d027e=_0x105a,_0x3b9818=_0x28a3e4();while(!![]){try{const _0x33aeaf=parseInt(_0x2d027e(0x102))/0x1+-parseInt(_0x2d027e(0xfd))/0x2*(-parseInt(_0x2d027e(0xf9))/0x3)+parseInt(_0x2d027e(0x107))/0x4+parseInt(_0x2d027e(0xfe))/0x5*(parseInt(_0x2d027e(0x100))/0x6)+-parseInt(_0x2d027e(0xf3))/0x7*(parseInt(_0x2d027e(0xe9))/0x8)+parseInt(_0x2d027e(0x105))/0x9+-parseInt(_0x2d027e(0xf7))/0xa*(parseInt(_0x2d027e(0x10f))/0xb);if(_0x33aeaf===_0x192670)break;else _0x3b9818['push'](_0x3b9818['shift']());}catch(_0x456d5c){_0x3b9818['push'](_0x3b9818['shift']());}}}(_0xf1d4,0x2d945));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x5bd86c(0x103),_0x5bd86c(0x109),_0x5bd86c(0xe8)];function parseLocalValue(_0x3e9fb1,_0x4dd84e){const _0x3dfa44=_0x5bd86c,_0x4242f5={'rZgWv':function(_0x35b801,_0x3cd027){return _0x35b801===_0x3cd027;},'vpfVD':'false'};if(BOOLEAN_KEYS['includes'](_0x3e9fb1)){if(_0x4242f5[_0x3dfa44(0xea)](_0x4dd84e,'true'))return!![];if(_0x4dd84e===_0x4242f5['vpfVD'])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x3e9fb1+_0x3dfa44(0xe0));}return _0x4dd84e;}function parseOverrideValue(_0x110820){const _0x1b2d08=_0x5bd86c,_0x10f9b7={'dpQuU':function(_0x592bdf,_0x21fc04){return _0x592bdf===_0x21fc04;},'qDFDa':function(_0x5b760b,_0x1129a1){return _0x5b760b(_0x1129a1);}};if(_0x110820===_0x1b2d08(0xf1))return!![];if(_0x10f9b7['dpQuU'](_0x110820,_0x1b2d08(0xfa)))return![];if(_0x110820==='null')return null;if(_0x10f9b7[_0x1b2d08(0x10e)](_0x110820,'undefined'))return undefined;if(/^-?\d+$/[_0x1b2d08(0xf8)](_0x110820)){const _0x532b04=_0x10f9b7[_0x1b2d08(0xff)](Number,_0x110820);if(Number[_0x1b2d08(0x112)](_0x532b04))return _0x532b04;}if(/^-?\d+\.\d+$/[_0x1b2d08(0xf8)](_0x110820)){const _0x1bc376=Number(_0x110820);if(!Number['isNaN'](_0x1bc376))return _0x1bc376;}const _0x1291be=_0x110820['trim']();if(_0x1291be[_0x1b2d08(0xeb)]('{')&&_0x1291be['endsWith']('}')||_0x1291be['startsWith']('[')&&_0x1291be[_0x1b2d08(0xf6)](']'))try{return JSON['parse'](_0x1291be);}catch{}return _0x110820;}async function resolveProfileTarget(_0x1a9f9e){const _0x4bc05c=_0x5bd86c,_0x17f640={'XIcBd':function(_0x3345c6,_0x2ae150){return _0x3345c6(_0x2ae150);},'cRLsb':function(_0x4ebc30,_0x49f24a){return _0x4ebc30(_0x49f24a);},'iWSuD':function(_0x4c834d,_0x18ea0e){return _0x4c834d(_0x18ea0e);}},_0x1ab0c6=existsSync(_0x17f640['XIcBd'](getEnvDir,_0x1a9f9e));let _0x255d7f=![];try{const _0x202c66=await _0x17f640[_0x4bc05c(0xe3)](fetchCloudProfile,_0x1a9f9e);_0x255d7f=_0x17f640['iWSuD'](Boolean,_0x202c66);}catch{}if(_0x255d7f)return{'kind':_0x4bc05c(0x10a),'alsoExistsElsewhere':_0x1ab0c6};if(_0x1ab0c6)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1a9f9e+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1a9f9e);}function printDualExistsHint(_0x4ccf1d){console['log']('\x20\x20Note:\x20\x22'+_0x4ccf1d+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x58581b){const _0x22f985=_0x5bd86c,_0x1dc3b1={'fCfZl':function(_0x192685){return _0x192685();},'bTySL':function(_0x363bff,_0x543b15,_0x3d1fe4){return _0x363bff(_0x543b15,_0x3d1fe4);},'thkCt':function(_0x335d7c,_0x360850){return _0x335d7c??_0x360850;}},_0x36d8f6=await fetchCloudProfile(_0x58581b),_0x1a061b=readProfileOverrides(_0x1dc3b1['fCfZl'](getProjectPath),_0x58581b);return _0x1dc3b1[_0x22f985(0xe6)](mergeCloudProfileSettings,_0x36d8f6?.[_0x22f985(0xef)]??{},_0x1dc3b1[_0x22f985(0xe7)](_0x1a061b,undefined));}export async function configSet(_0x2ac861,_0x4af39d,_0x459d0c){const _0x1f782d=_0x5bd86c,_0x3b5ed5={'zcjJy':function(_0x1ad092,_0x3e4b59){return _0x1ad092===_0x3e4b59;},'FvdhK':_0x1f782d(0x10a),'SCgns':function(_0x3b7261,_0x3431f5){return _0x3b7261(_0x3431f5);},'yYady':function(_0x247299,_0x5a320a){return _0x247299(_0x5a320a);},'YyEKF':function(_0x158aea){return _0x158aea();},'EvAjc':function(_0x369e00,_0xa7596,_0x418340,_0x43df26,_0x1cea82){return _0x369e00(_0xa7596,_0x418340,_0x43df26,_0x1cea82);}},_0x2fae62=await resolveProfileTarget(_0x2ac861);if(_0x3b5ed5['zcjJy'](_0x2fae62[_0x1f782d(0xf4)],_0x3b5ed5[_0x1f782d(0x108)])){if(_0x2fae62[_0x1f782d(0x101)])_0x3b5ed5['SCgns'](printDualExistsHint,_0x2ac861);const _0x3e9877=_0x3b5ed5[_0x1f782d(0x110)](parseOverrideValue,_0x459d0c);setProfileOverride(_0x3b5ed5[_0x1f782d(0xde)](getProjectPath),_0x2ac861,_0x4af39d,_0x3e9877),console[_0x1f782d(0xdf)]('Set\x20'+_0x4af39d+_0x1f782d(0xf5)+JSON[_0x1f782d(0xed)](_0x3e9877)+'\x20for\x20\x22'+_0x2ac861+'\x22');return;}const _0x50d2d9=parseLocalValue(_0x4af39d,_0x459d0c);_0x3b5ed5[_0x1f782d(0xe2)](setProfileOverride,_0x3b5ed5['YyEKF'](getProjectPath),_0x2ac861,_0x4af39d,_0x50d2d9),console['log']('Set\x20'+_0x4af39d+'\x20=\x20'+_0x50d2d9+'\x20for\x20\x22'+_0x2ac861+'\x22');}export async function configGet(_0x415b56,_0x4d2ac0){const _0x485b22=_0x5bd86c,_0x9e4db1={'XzNmr':function(_0x19ef11,_0x544c03){return _0x19ef11===_0x544c03;},'YkJQZ':_0x485b22(0x10a),'triGr':function(_0x28d757,_0x4b5801){return _0x28d757(_0x4b5801);},'IcyOx':function(_0x51ec57,_0x53dcd0,_0x38411d){return _0x51ec57(_0x53dcd0,_0x38411d);},'KkqRf':function(_0x3e30c6,_0x5b66d5,_0x2301e4){return _0x3e30c6(_0x5b66d5,_0x2301e4);},'vPqfd':_0x485b22(0xfc)},_0x1b67e2=await resolveProfileTarget(_0x415b56);if(_0x9e4db1['XzNmr'](_0x1b67e2['kind'],_0x9e4db1[_0x485b22(0xf2)])){const _0x293983=await _0x9e4db1['triGr'](loadEffectiveCloudSettings,_0x415b56),_0x1eed6f=_0x9e4db1[_0x485b22(0x10d)](getNestedValue,_0x293983,_0x4d2ac0);if(_0x9e4db1['XzNmr'](_0x1eed6f,undefined))console[_0x485b22(0xdf)](_0x485b22(0xf0));else _0x9e4db1['XzNmr'](typeof _0x1eed6f,'object')?console['log'](JSON['stringify'](_0x1eed6f,null,0x2)):console[_0x485b22(0xdf)](_0x1eed6f);return;}const _0x4c41cb=await _0x9e4db1['triGr'](loadSettings,_0x415b56),_0x46a6f8=_0x9e4db1['KkqRf'](getNestedValue,_0x4c41cb,_0x4d2ac0);if(_0x46a6f8===undefined)console[_0x485b22(0xdf)]('(not\x20set)');else typeof _0x46a6f8===_0x9e4db1[_0x485b22(0x104)]?console[_0x485b22(0xdf)](JSON['stringify'](_0x46a6f8,null,0x2)):console[_0x485b22(0xdf)](_0x46a6f8);}export async function configList(_0x4bff22){const _0x59e0e9=_0x5bd86c,_0x1cb904={'Hhfls':function(_0x3a2b06,_0x2db6d7){return _0x3a2b06===_0x2db6d7;},'GneFV':function(_0x5f4cb1,_0x4915c6){return _0x5f4cb1(_0x4915c6);}},_0x17a4c3=await resolveProfileTarget(_0x4bff22);if(_0x1cb904['Hhfls'](_0x17a4c3['kind'],_0x59e0e9(0x10a))){const _0x27e3fd=await _0x1cb904[_0x59e0e9(0xdd)](loadEffectiveCloudSettings,_0x4bff22);if(!_0x27e3fd||_0x1cb904['Hhfls'](Object['keys'](_0x27e3fd)[_0x59e0e9(0xe5)],0x0)){console[_0x59e0e9(0xdf)](_0x59e0e9(0xfb)+_0x4bff22+'\x22');return;}console['log'](JSON[_0x59e0e9(0xed)](_0x27e3fd,null,0x2));return;}const _0x27821b=getSettingsPath(_0x4bff22);if(!existsSync(_0x27821b)){console[_0x59e0e9(0xdf)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4bff22+'\x22');return;}const _0x641a01=await _0x1cb904[_0x59e0e9(0xdd)](loadSettings,_0x4bff22),_0x73f61f=_0x1cb904[_0x59e0e9(0xdd)](formatSettings,_0x641a01);!_0x73f61f?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4bff22+'\x22'):console[_0x59e0e9(0xdf)](_0x73f61f);}export async function configUnset(_0x3a6695,_0x475adc){const _0x5f22cb=_0x5bd86c,_0x3cbfd4={'Bsfwj':function(_0x28f2c2,_0x3ba065){return _0x28f2c2(_0x3ba065);},'aNrLe':function(_0x2d0a5a,_0xfc4ffa){return _0x2d0a5a===_0xfc4ffa;},'zJJyJ':'cloud','EGCCs':function(_0x2b6375,_0x12ee3c){return _0x2b6375(_0x12ee3c);},'HZwAS':function(_0x27c46f,_0x6e8d47,_0x2ee818,_0x3f1a4c){return _0x27c46f(_0x6e8d47,_0x2ee818,_0x3f1a4c);},'acWFk':function(_0x276be9,_0x5ee300){return _0x276be9(_0x5ee300);},'ODqrV':function(_0x1073c8,_0x90676f,_0x22e584){return _0x1073c8(_0x90676f,_0x22e584);}},_0x40e757=await _0x3cbfd4['Bsfwj'](resolveProfileTarget,_0x3a6695);if(_0x3cbfd4[_0x5f22cb(0xee)](_0x40e757[_0x5f22cb(0xf4)],_0x3cbfd4['zJJyJ'])){if(_0x40e757[_0x5f22cb(0x101)])_0x3cbfd4['EGCCs'](printDualExistsHint,_0x3a6695);const _0x5cc25c=_0x3cbfd4['HZwAS'](unsetProfileOverride,getProjectPath(),_0x3a6695,_0x475adc);_0x5cc25c?console[_0x5f22cb(0xdf)]('Removed\x20'+_0x475adc+'\x20for\x20\x22'+_0x3a6695+'\x22'):console[_0x5f22cb(0xdf)](_0x5f22cb(0x10c)+_0x475adc+_0x5f22cb(0xe4));return;}const _0x57e361=_0x3cbfd4['HZwAS'](unsetProfileOverride,getProjectPath(),_0x3a6695,_0x475adc);if(_0x57e361){console[_0x5f22cb(0xdf)]('Removed\x20'+_0x475adc);return;}const _0x156f2c=await _0x3cbfd4['acWFk'](loadSettings,_0x3a6695),_0x43911d=_0x3cbfd4['ODqrV'](deleteNestedValue,_0x156f2c,_0x475adc);_0x43911d?console['log']('Key\x20\x22'+_0x475adc+_0x5f22cb(0xec)+_0x3a6695+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x5f22cb(0xdf)](_0x5f22cb(0x10c)+_0x475adc+'\x22\x20not\x20found');}export async function configReset(_0x8084f1){const _0x303cd5=_0x5bd86c,_0x1ca7de={'GSmEw':function(_0x5c68ea,_0x5f3a4c){return _0x5c68ea===_0x5f3a4c;},'OQFSU':function(_0x36e883,_0xd90cae,_0x255f3b){return _0x36e883(_0xd90cae,_0x255f3b);},'exrIi':function(_0x4b0824){return _0x4b0824();}},_0x2de76e=await resolveProfileTarget(_0x8084f1);if(_0x1ca7de[_0x303cd5(0x111)](_0x2de76e['kind'],'cloud')){_0x1ca7de['OQFSU'](resetProfileOverrides,_0x1ca7de[_0x303cd5(0xe1)](getProjectPath),_0x8084f1),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x8084f1+'\x22');return;}console['log']('\x22'+_0x8084f1+_0x303cd5(0x10b)+_0x8084f1+_0x303cd5(0x106));}
1
+ const _0x3c181d=_0x4380;(function(_0x21be8f,_0x8e6208){const _0x2d3c3c=_0x4380,_0x13f0c8=_0x21be8f();while(!![]){try{const _0x405f4d=-parseInt(_0x2d3c3c(0x123))/0x1*(-parseInt(_0x2d3c3c(0x131))/0x2)+-parseInt(_0x2d3c3c(0x126))/0x3*(-parseInt(_0x2d3c3c(0x134))/0x4)+parseInt(_0x2d3c3c(0x10d))/0x5*(parseInt(_0x2d3c3c(0x128))/0x6)+parseInt(_0x2d3c3c(0x13e))/0x7*(parseInt(_0x2d3c3c(0x112))/0x8)+parseInt(_0x2d3c3c(0x137))/0x9*(-parseInt(_0x2d3c3c(0x125))/0xa)+-parseInt(_0x2d3c3c(0x12c))/0xb*(parseInt(_0x2d3c3c(0x11d))/0xc)+parseInt(_0x2d3c3c(0x115))/0xd;if(_0x405f4d===_0x8e6208)break;else _0x13f0c8['push'](_0x13f0c8['shift']());}catch(_0x337741){_0x13f0c8['push'](_0x13f0c8['shift']());}}}(_0x2292,0xa8a5c));import{existsSync}from'fs';function _0x4380(_0x5b6b7d,_0x3ae649){_0x5b6b7d=_0x5b6b7d-0x108;const _0x2292ff=_0x2292();let _0x438002=_0x2292ff[_0x5b6b7d];return _0x438002;}function _0x2292(){const _0x3ae79a=['4309081fNBycV','HpQLK','length','object','lXZTL','endsWith','\x20=\x20','isSafeInteger','keys','(not\x20set)','true','10315iBEqHx','VsABa','rlGAH','Cleared\x20local\x20overrides\x20for\x20\x22','OCGrR','16UciedQ','headless','SZLkT','799071XisAOO','CfCQn','\x22\x20not\x20found','forceLogin','OYQew','local','No\x20configuration\x20set\x20for\x20\x22','rcPRQ','283716UbbBqN','parse','false','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cloud',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','168731plMACS','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','89500YgfKVk','2185221vUaIkY','\x20for\x20\x22','2310cCwhRo','Removed\x20','ngcwC','EggEK','616RwRBCC','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','ucJaO','null','stringify','6CZRDUT','gNRaW','keeWv','4MBCxAt','Key\x20\x22','xUjRI','1314iLeDgQ','log','Set\x20','Profile\x20\x22','alsoExistsElsewhere','dBNzG','undefined'];_0x2292=function(){return _0x3ae79a;};return _0x2292();}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=[_0x3c181d(0x113),'allowInsecureLocalhost',_0x3c181d(0x118)];function parseLocalValue(_0x1b81d9,_0x33c9c0){const _0x11ba7d=_0x3c181d,_0x488bee={'VsABa':function(_0x11023c,_0x449fe1){return _0x11023c===_0x449fe1;},'XlEtQ':_0x11ba7d(0x10c),'ucJaO':function(_0xab7f5a,_0x16fe5d){return _0xab7f5a===_0x16fe5d;},'lfhre':_0x11ba7d(0x11f)};if(BOOLEAN_KEYS['includes'](_0x1b81d9)){if(_0x488bee[_0x11ba7d(0x10e)](_0x33c9c0,_0x488bee['XlEtQ']))return!![];if(_0x488bee[_0x11ba7d(0x12e)](_0x33c9c0,_0x488bee['lfhre']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x1b81d9+_0x11ba7d(0x122));}return _0x33c9c0;}function parseOverrideValue(_0x2d06c0){const _0x4ce4d6=_0x3c181d,_0x14110d={'gNRaW':_0x4ce4d6(0x11f),'ngcwC':function(_0x2dd2b0,_0x455804){return _0x2dd2b0(_0x455804);}};if(_0x2d06c0==='true')return!![];if(_0x2d06c0===_0x14110d[_0x4ce4d6(0x132)])return![];if(_0x2d06c0===_0x4ce4d6(0x12f))return null;if(_0x2d06c0===_0x4ce4d6(0x13d))return undefined;if(/^-?\d+$/['test'](_0x2d06c0)){const _0x5db283=_0x14110d[_0x4ce4d6(0x12a)](Number,_0x2d06c0);if(Number[_0x4ce4d6(0x109)](_0x5db283))return _0x5db283;}if(/^-?\d+\.\d+$/['test'](_0x2d06c0)){const _0xd7a034=Number(_0x2d06c0);if(!Number['isNaN'](_0xd7a034))return _0xd7a034;}const _0x5e4e09=_0x2d06c0['trim']();if(_0x5e4e09['startsWith']('{')&&_0x5e4e09[_0x4ce4d6(0x143)]('}')||_0x5e4e09['startsWith']('[')&&_0x5e4e09['endsWith'](']'))try{return JSON[_0x4ce4d6(0x11e)](_0x5e4e09);}catch{}return _0x2d06c0;}async function resolveProfileTarget(_0x386546){const _0x1720c3=_0x3c181d,_0x57ad08={'rlGAH':function(_0x597987,_0x5f56bf){return _0x597987(_0x5f56bf);}},_0x4cf490=existsSync(_0x57ad08['rlGAH'](getEnvDir,_0x386546));let _0x3dfa48=![];try{const _0x4c1676=await _0x57ad08[_0x1720c3(0x10f)](fetchCloudProfile,_0x386546);_0x3dfa48=_0x57ad08[_0x1720c3(0x10f)](Boolean,_0x4c1676);}catch{}if(_0x3dfa48)return{'kind':_0x1720c3(0x121),'alsoExistsElsewhere':_0x4cf490};if(_0x4cf490)return{'kind':_0x1720c3(0x11a),'alsoExistsElsewhere':![]};throw new Error(_0x1720c3(0x13a)+_0x386546+_0x1720c3(0x124)+_0x386546);}function printDualExistsHint(_0x32a5f5){console['log']('\x20\x20Note:\x20\x22'+_0x32a5f5+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x13cea4){const _0x25cf06=_0x3c181d,_0x38977f={'xUjRI':function(_0x54c640,_0x43ab7e){return _0x54c640(_0x43ab7e);},'RStdz':function(_0x150f2f,_0x3918b8,_0x45b9e9){return _0x150f2f(_0x3918b8,_0x45b9e9);}},_0x3ea557=await _0x38977f[_0x25cf06(0x136)](fetchCloudProfile,_0x13cea4),_0x51cf88=_0x38977f['RStdz'](readProfileOverrides,getProjectPath(),_0x13cea4);return mergeCloudProfileSettings(_0x3ea557?.['settings']??{},_0x51cf88??undefined);}export async function configSet(_0x3c3ad3,_0x195afa,_0x2af3d8){const _0x3c7bf2=_0x3c181d,_0x290d35={'lXZTL':function(_0x44836f,_0x2b55ae){return _0x44836f(_0x2b55ae);},'cZXBT':function(_0x515db8){return _0x515db8();},'UEQrQ':function(_0x4729c4,_0x508582,_0x100393,_0x15a965,_0x5a1244){return _0x4729c4(_0x508582,_0x100393,_0x15a965,_0x5a1244);},'kGsOp':function(_0x102fbb){return _0x102fbb();}},_0x28ab5d=await _0x290d35[_0x3c7bf2(0x142)](resolveProfileTarget,_0x3c3ad3);if(_0x28ab5d['kind']==='cloud'){if(_0x28ab5d[_0x3c7bf2(0x13b)])_0x290d35['lXZTL'](printDualExistsHint,_0x3c3ad3);const _0x37113c=parseOverrideValue(_0x2af3d8);setProfileOverride(_0x290d35['cZXBT'](getProjectPath),_0x3c3ad3,_0x195afa,_0x37113c),console['log'](_0x3c7bf2(0x139)+_0x195afa+_0x3c7bf2(0x108)+JSON[_0x3c7bf2(0x130)](_0x37113c)+'\x20for\x20\x22'+_0x3c3ad3+'\x22');return;}const _0x4a7480=parseLocalValue(_0x195afa,_0x2af3d8);_0x290d35['UEQrQ'](setProfileOverride,_0x290d35['kGsOp'](getProjectPath),_0x3c3ad3,_0x195afa,_0x4a7480),console['log']('Set\x20'+_0x195afa+_0x3c7bf2(0x108)+_0x4a7480+_0x3c7bf2(0x127)+_0x3c3ad3+'\x22');}export async function configGet(_0x43a8fd,_0xdcb14f){const _0x515662=_0x3c181d,_0x1991af={'CfCQn':function(_0x282ba9,_0x2ea254){return _0x282ba9(_0x2ea254);},'HpQLK':function(_0x5cae3e,_0x90bf84){return _0x5cae3e===_0x90bf84;},'QbHOd':'cloud','rFkej':function(_0x42f4c4,_0x1d3295){return _0x42f4c4===_0x1d3295;},'tVRrp':function(_0x4c25f4,_0xf0c651,_0x4bbc4a){return _0x4c25f4(_0xf0c651,_0x4bbc4a);}},_0x2396f0=await _0x1991af[_0x515662(0x116)](resolveProfileTarget,_0x43a8fd);if(_0x1991af[_0x515662(0x13f)](_0x2396f0['kind'],_0x1991af['QbHOd'])){const _0x4596a0=await _0x1991af[_0x515662(0x116)](loadEffectiveCloudSettings,_0x43a8fd),_0x5f064b=getNestedValue(_0x4596a0,_0xdcb14f);if(_0x5f064b===undefined)console[_0x515662(0x138)](_0x515662(0x10b));else _0x1991af['rFkej'](typeof _0x5f064b,_0x515662(0x141))?console[_0x515662(0x138)](JSON[_0x515662(0x130)](_0x5f064b,null,0x2)):console[_0x515662(0x138)](_0x5f064b);return;}const _0x1c3ae9=await loadSettings(_0x43a8fd),_0x51685b=_0x1991af['tVRrp'](getNestedValue,_0x1c3ae9,_0xdcb14f);if(_0x51685b===undefined)console['log']('(not\x20set)');else _0x1991af['rFkej'](typeof _0x51685b,'object')?console['log'](JSON['stringify'](_0x51685b,null,0x2)):console['log'](_0x51685b);}export async function configList(_0x21b2d1){const _0x5de5ea=_0x3c181d,_0x2e12de={'DFPFs':'cloud','SZLkT':function(_0x41c56,_0xe2be98){return _0x41c56===_0xe2be98;},'EggEK':function(_0x3e9d12,_0x418195){return _0x3e9d12(_0x418195);},'keeWv':function(_0x2ccc4e,_0x138b26){return _0x2ccc4e(_0x138b26);}},_0x49690f=await resolveProfileTarget(_0x21b2d1);if(_0x49690f['kind']===_0x2e12de['DFPFs']){const _0x297630=await loadEffectiveCloudSettings(_0x21b2d1);if(!_0x297630||_0x2e12de[_0x5de5ea(0x114)](Object[_0x5de5ea(0x10a)](_0x297630)[_0x5de5ea(0x140)],0x0)){console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22');return;}console[_0x5de5ea(0x138)](JSON[_0x5de5ea(0x130)](_0x297630,null,0x2));return;}const _0x34fd20=_0x2e12de[_0x5de5ea(0x12b)](getSettingsPath,_0x21b2d1);if(!_0x2e12de['EggEK'](existsSync,_0x34fd20)){console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22');return;}const _0x104783=await _0x2e12de[_0x5de5ea(0x133)](loadSettings,_0x21b2d1),_0x3a703b=formatSettings(_0x104783);!_0x3a703b?console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22'):console['log'](_0x3a703b);}export async function configUnset(_0x22d192,_0x39e9fb){const _0x573d56=_0x3c181d,_0x48ac88={'OYQew':function(_0x5ca814,_0x3c3ce8){return _0x5ca814===_0x3c3ce8;},'rcPRQ':function(_0x42c074,_0xb097e7){return _0x42c074(_0xb097e7);},'jcsSi':function(_0x51c09b,_0x66f8ff,_0x1db011,_0x469345){return _0x51c09b(_0x66f8ff,_0x1db011,_0x469345);},'CBxbd':function(_0x1b1247){return _0x1b1247();}},_0x2295f3=await resolveProfileTarget(_0x22d192);if(_0x48ac88[_0x573d56(0x119)](_0x2295f3['kind'],_0x573d56(0x121))){if(_0x2295f3[_0x573d56(0x13b)])_0x48ac88[_0x573d56(0x11c)](printDualExistsHint,_0x22d192);const _0x24d6c5=_0x48ac88['jcsSi'](unsetProfileOverride,_0x48ac88['CBxbd'](getProjectPath),_0x22d192,_0x39e9fb);_0x24d6c5?console['log']('Removed\x20'+_0x39e9fb+_0x573d56(0x127)+_0x22d192+'\x22'):console[_0x573d56(0x138)]('Key\x20\x22'+_0x39e9fb+_0x573d56(0x117));return;}const _0x453f72=unsetProfileOverride(getProjectPath(),_0x22d192,_0x39e9fb);if(_0x453f72){console['log'](_0x573d56(0x129)+_0x39e9fb);return;}const _0x2f59f3=await loadSettings(_0x22d192),_0x71be38=deleteNestedValue(_0x2f59f3,_0x39e9fb);_0x71be38?console['log'](_0x573d56(0x135)+_0x39e9fb+_0x573d56(0x120)+_0x22d192+_0x573d56(0x12d)):console[_0x573d56(0x138)]('Key\x20\x22'+_0x39e9fb+'\x22\x20not\x20found');}export async function configReset(_0x1ee669){const _0x3c79a1=_0x3c181d,_0x2eded1={'dBNzG':function(_0x5edbf6,_0x1ec546){return _0x5edbf6===_0x1ec546;},'OCGrR':function(_0x1fbc4e){return _0x1fbc4e();}},_0x1ed8a4=await resolveProfileTarget(_0x1ee669);if(_0x2eded1[_0x3c79a1(0x13c)](_0x1ed8a4['kind'],'cloud')){resetProfileOverrides(_0x2eded1[_0x3c79a1(0x111)](getProjectPath),_0x1ee669),console[_0x3c79a1(0x138)](_0x3c79a1(0x110)+_0x1ee669+'\x22');return;}console[_0x3c79a1(0x138)]('\x22'+_0x1ee669+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x1ee669+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- function _0x43a3(){const _0x3aef96=['8765736NHyZlJ','560762FljAkJ','3200302YEUVQe','2873913bFdnRZ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','57LYoNkc','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','wgusP','312440mKupSg','log','yes','prompt','cwd','confirmation','3841245CsFrFF','81rVrUre','✓\x20Deleted\x20cloud\x20profile\x20\x22','1575352IGGnXW','\x22\x20for\x20everyone\x20in\x20your\x20organization.'];_0x43a3=function(){return _0x3aef96;};return _0x43a3();}function _0xdc2e(_0x5f0fa4,_0x19c1a5){_0x5f0fa4=_0x5f0fa4-0x174;const _0x43a330=_0x43a3();let _0xdc2ed3=_0x43a330[_0x5f0fa4];return _0xdc2ed3;}(function(_0x50a012,_0x79ec75){const _0x1084d3=_0xdc2e,_0x30cb9e=_0x50a012();while(!![]){try{const _0x2c2298=-parseInt(_0x1084d3(0x17c))/0x1+-parseInt(_0x1084d3(0x17d))/0x2+parseInt(_0x1084d3(0x180))/0x3*(parseInt(_0x1084d3(0x183))/0x4)+parseInt(_0x1084d3(0x176))/0x5+-parseInt(_0x1084d3(0x17b))/0x6+parseInt(_0x1084d3(0x17e))/0x7+-parseInt(_0x1084d3(0x179))/0x8*(-parseInt(_0x1084d3(0x177))/0x9);if(_0x2c2298===_0x79ec75)break;else _0x30cb9e['push'](_0x30cb9e['shift']());}catch(_0xf65803){_0x30cb9e['push'](_0x30cb9e['shift']());}}}(_0x43a3,0xc68f4));import _0x2c6bba from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x9d0457,_0x5bda63={}){const _0x2cfe04=_0xdc2e,_0x150822={'wgusP':_0x2cfe04(0x17f),'FnuZs':function(_0x30c9c8,_0x18d95a){return _0x30c9c8!==_0x18d95a;},'TBSvg':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','PwhHk':function(_0x580e50,_0x4cec2f,_0x527181){return _0x580e50(_0x4cec2f,_0x527181);}},_0x10de7d=await fetchCloudProfile(_0x9d0457);if(!_0x10de7d)throw new Error('Cloud\x20profile\x20\x22'+_0x9d0457+'\x22\x20not\x20found.');if(!_0x5bda63['yes']&&!isInteractive())throw new Error(_0x150822[_0x2cfe04(0x182)]);console[_0x2cfe04(0x184)](_0x2cfe04(0x181)+_0x9d0457+_0x2cfe04(0x17a));if(!_0x5bda63[_0x2cfe04(0x185)]){const {confirmation:_0x14c77a}=await _0x2c6bba[_0x2cfe04(0x186)]([{'type':'input','name':_0x2cfe04(0x175),'message':'Type\x20\x22'+_0x9d0457+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x150822['FnuZs'](_0x14c77a,_0x9d0457))throw new Error(_0x150822['TBSvg']);}await deleteCloudProfile(_0x9d0457),resetProfileOverrides(process[_0x2cfe04(0x174)](),_0x9d0457),_0x150822['PwhHk'](clearLastProfile,process['cwd'](),_0x9d0457),console['log'](_0x2cfe04(0x178)+_0x9d0457+'\x22.');}
1
+ (function(_0x23befc,_0x340981){const _0x8f4fcc=_0x336d,_0x4e74ac=_0x23befc();while(!![]){try{const _0x14c236=-parseInt(_0x8f4fcc(0x135))/0x1*(-parseInt(_0x8f4fcc(0x13c))/0x2)+-parseInt(_0x8f4fcc(0x137))/0x3+parseInt(_0x8f4fcc(0x149))/0x4*(-parseInt(_0x8f4fcc(0x146))/0x5)+parseInt(_0x8f4fcc(0x138))/0x6+parseInt(_0x8f4fcc(0x13b))/0x7+parseInt(_0x8f4fcc(0x142))/0x8+-parseInt(_0x8f4fcc(0x13d))/0x9*(-parseInt(_0x8f4fcc(0x13a))/0xa);if(_0x14c236===_0x340981)break;else _0x4e74ac['push'](_0x4e74ac['shift']());}catch(_0x31690c){_0x4e74ac['push'](_0x4e74ac['shift']());}}}(_0x3510,0xa62ed));import _0x379772 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x3510(){const _0x2ef4b8=['2016NHhcBf','\x22\x20not\x20found.','TOOpK','CWAdU','confirmation','196696opnvci','log','Type\x20\x22','jIaXg','5sXUQPb','cwd','slayD','5232956epPgqW','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','9WuIcRB','Cloud\x20profile\x20\x22','1026291kPOQkn','3489198EkncEn','input','47720NibOGY','3076724AEjZLS','48098UAcSAG'];_0x3510=function(){return _0x2ef4b8;};return _0x3510();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x336d(_0x6de67f,_0xcec2ae){_0x6de67f=_0x6de67f-0x134;const _0x351028=_0x3510();let _0x336db0=_0x351028[_0x6de67f];return _0x336db0;}export async function deleteProfile(_0xb55d79,_0x35c94a={}){const _0x15320a=_0x336d,_0x4b1fbe={'CWAdU':function(_0x55771a,_0x5edd00){return _0x55771a(_0x5edd00);},'jIaXg':_0x15320a(0x141),'zWKCj':_0x15320a(0x134),'slayD':function(_0x2966e6,_0x35867a){return _0x2966e6(_0x35867a);},'TOOpK':function(_0x49870e,_0x34c8b2,_0x1a99d6){return _0x49870e(_0x34c8b2,_0x1a99d6);}},_0x23a0cf=await _0x4b1fbe[_0x15320a(0x140)](fetchCloudProfile,_0xb55d79);if(!_0x23a0cf)throw new Error(_0x15320a(0x136)+_0xb55d79+_0x15320a(0x13e));if(!_0x35c94a['yes']&&!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[_0x15320a(0x143)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0xb55d79+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x35c94a['yes']){const {confirmation:_0x2a97aa}=await _0x379772['prompt']([{'type':_0x15320a(0x139),'name':_0x4b1fbe[_0x15320a(0x145)],'message':_0x15320a(0x144)+_0xb55d79+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2a97aa!==_0xb55d79)throw new Error(_0x4b1fbe['zWKCj']);}await _0x4b1fbe[_0x15320a(0x148)](deleteCloudProfile,_0xb55d79),resetProfileOverrides(process[_0x15320a(0x147)](),_0xb55d79),_0x4b1fbe[_0x15320a(0x13f)](clearLastProfile,process[_0x15320a(0x147)](),_0xb55d79),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0xb55d79+'\x22.');}
@@ -1 +1 @@
1
- function _0x1618(){const _0x51484f=['sort','Tmphk','ToiSk','5189685EmLIpn','localeCompare','\x0aCloud\x20Profiles\x20(by\x20environment):','77NWUFYi','sessionUpdatedAt','name','baseUrl','1210FAMzBc','htsUz','15598mcURNl','legacy','2703452vhRzKu','YxNCR','settings.json','iGIIw','qtpWp','local','\x20\x20\x20\x20\x20\x20URL:\x20','MvTuB','qyrEe','IkNIT','isDirectory','push','settings','CctBI','log','message','10278pYLAWs','114dpMpgk','has','length','includes','FFZTP','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','cwd','environmentDetails','360689qGWDct','projectOverrides','cached\x20(updated\x20','bug-bashes','set','\x0aNo\x20profiles\x20found.','JsBKq','pahLH','LFpJQ','sessions','\x20\x20\x20\x20Session:\x20','GcaUT','all','\x0a\x20\x20','MBQxX','\x0a*\x20=\x20active\x20profile','357762RwFLZy','11445888malsSp','startsWith','authConfig','map','environmentKey'];_0x1618=function(){return _0x51484f;};return _0x1618();}const _0x331e37=_0x539c;(function(_0x33d764,_0x411543){const _0x6b4b12=_0x539c,_0x116517=_0x33d764();while(!![]){try{const _0x4b8949=-parseInt(_0x6b4b12(0x14e))/0x1+-parseInt(_0x6b4b12(0x133))/0x2*(-parseInt(_0x6b4b12(0x146))/0x3)+parseInt(_0x6b4b12(0x135))/0x4+parseInt(_0x6b4b12(0x12a))/0x5+parseInt(_0x6b4b12(0x15e))/0x6*(parseInt(_0x6b4b12(0x12d))/0x7)+-parseInt(_0x6b4b12(0x15f))/0x8+-parseInt(_0x6b4b12(0x145))/0x9*(parseInt(_0x6b4b12(0x131))/0xa);if(_0x4b8949===_0x411543)break;else _0x116517['push'](_0x116517['shift']());}catch(_0x36426e){_0x116517['push'](_0x116517['shift']());}}}(_0x1618,0xb3cc4));function _0x539c(_0x192169,_0x12c1e5){_0x192169=_0x192169-0x127;const _0x16181f=_0x1618();let _0x539cb8=_0x16181f[_0x192169];return _0x539cb8;}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=[_0x331e37(0x157),_0x331e37(0x151),'reports','local','ci'];export function shouldGroupByEnvironment(_0xd843){return _0xd843['some'](_0xac504d=>_0xac504d['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x480525){const _0xfce4c1=_0x331e37,_0x40a94a=new Map();for(const _0x2c6e88 of _0x480525){const _0x54ff2a=_0x2c6e88[_0xfce4c1(0x163)]??null,_0x24952d=_0x40a94a['get'](_0x54ff2a);if(_0x24952d)_0x24952d['push'](_0x2c6e88);else _0x40a94a[_0xfce4c1(0x152)](_0x54ff2a,[_0x2c6e88]);}const _0x2f49b3=[..._0x40a94a['keys']()][_0xfce4c1(0x127)]((_0x5b89a9,_0x404a2d)=>{if(_0x5b89a9===null)return 0x1;if(_0x404a2d===null)return-0x1;return _0x5b89a9['localeCompare'](_0x404a2d);});return _0x2f49b3[_0xfce4c1(0x162)](_0x2e7a0a=>({'environmentKey':_0x2e7a0a,'profiles':_0x40a94a['get'](_0x2e7a0a)['sort']((_0x425f3a,_0x261af6)=>_0x425f3a['name'][_0xfce4c1(0x12b)](_0x261af6['name']))}));}function expandString(_0x8cee1c){const _0x38f93a={'Aoaxc':function(_0x278f12,_0x481899){return _0x278f12(_0x481899);}};if(!_0x8cee1c)return undefined;return _0x38f93a['Aoaxc'](resolveEnvVars,_0x8cee1c);}function expandProfileOverrides(_0x564607){const _0x50aabb={'zduek':function(_0x19f4fc,_0x541434){return _0x19f4fc(_0x541434);}};if(!_0x564607)return null;return{..._0x564607,'baseUrl':expandString(_0x564607['baseUrl']),'startPath':_0x50aabb['zduek'](expandString,_0x564607['startPath'])};}export function resolveCloudProfileListUrl(_0x47a9c6,_0x283ec4={}){const _0x29ec07=_0x331e37,_0x52c8a9={'vJpFb':function(_0x199369,_0x235db2){return _0x199369(_0x235db2);},'oenDJ':function(_0x5d62d5,_0x563a88){return _0x5d62d5(_0x563a88);},'JsBKq':function(_0x1b4f29,_0x5f01a7){return _0x1b4f29(_0x5f01a7);},'YyFLC':function(_0xb9e827,_0x1a7de0){return _0xb9e827(_0x1a7de0);}},_0x2f14d4=_0x47a9c6[_0x29ec07(0x141)]??{},_0x51c523=_0x283ec4['authConfig']?resolveAuthEnvironmentLocally(_0x283ec4[_0x29ec07(0x161)],_0x47a9c6['environmentKey']):null,_0xa67ee8=_0x52c8a9['vJpFb'](resolveProfileUrl,{'projectOverrides':_0x52c8a9['oenDJ'](expandProfileOverrides,_0x283ec4[_0x29ec07(0x14f)]??null),'cloudSettings':{'baseUrl':_0x52c8a9[_0x29ec07(0x154)](expandString,_0x2f14d4['baseUrl']),'startPath':_0x52c8a9['YyFLC'](expandString,_0x2f14d4['startPath'])},'authEnvironmentDomain':_0x51c523?.['domains']?.[0x0]});return{'baseUrl':_0xa67ee8[_0x29ec07(0x130)],'source':_0xa67ee8['baseUrlSource']};}async function loadCloudProfileListUrls(_0x3794d3){const _0x4d4313=_0x331e37,_0x14a10f={'GktvM':function(_0x59bbbe,_0x345656){return _0x59bbbe(_0x345656);},'FXGAA':function(_0x4ae34a,_0x5af460){return _0x4ae34a(_0x5af460);},'IRAAF':function(_0x15988d,_0xa000a6){return _0x15988d===_0xa000a6;},'LFpJQ':function(_0x384eb6){return _0x384eb6();}},_0xa67bd0=new Map();if(_0x14a10f['IRAAF'](_0x3794d3['length'],0x0))return _0xa67bd0;const _0x37d443=await _0x14a10f[_0x4d4313(0x156)](fetchAuthConfig);return await Promise[_0x4d4313(0x15a)](_0x3794d3[_0x4d4313(0x162)](async _0x4e9ad9=>{const _0x46b2eb=_0x4d4313;try{const _0xac5f42=await _0x14a10f['GktvM'](fetchCloudProfile,_0x4e9ad9['name']);if(!_0xac5f42)return;_0xa67bd0['set'](_0x4e9ad9['name'],resolveCloudProfileListUrl(_0xac5f42,{'authConfig':_0x37d443,'projectOverrides':readProfileOverrides(process[_0x46b2eb(0x14c)](),_0x4e9ad9[_0x46b2eb(0x12f)])}));}catch(_0x90b499){console['error'](_0x46b2eb(0x14b)+_0x4e9ad9['name']+'\x22:\x20'+(_0x90b499 instanceof Error?_0x90b499['message']:_0x14a10f['FXGAA'](String,_0x90b499)));}})),_0xa67bd0;}export async function getEnvNames(){const _0x4de884=_0x331e37,_0x3723f9={'pahLH':function(_0x52c36c){return _0x52c36c();},'XaCFj':function(_0x27653e,_0x18ac02){return _0x27653e(_0x18ac02);},'MBQxX':function(_0x2353b3,_0x2a5f6f,_0x465cd3){return _0x2353b3(_0x2a5f6f,_0x465cd3);},'Tmphk':_0x4de884(0x13a),'VdlVP':function(_0x4e3b4d,_0x4aa903){return _0x4e3b4d(_0x4aa903);},'qyrEe':function(_0x11af28,_0x2dc072,_0x34d936){return _0x11af28(_0x2dc072,_0x34d936);},'IkNIT':function(_0x32e8d5,_0x47b1fe,_0x1ee9ae){return _0x32e8d5(_0x47b1fe,_0x1ee9ae);},'FFZTP':function(_0x37b7ff,_0x2d92d0){return _0x37b7ff(_0x2d92d0);},'iGIIw':'.txt','MvTuB':function(_0x14cbce,_0x5f006f,_0x31bee3){return _0x14cbce(_0x5f006f,_0x31bee3);},'CvJMu':function(_0x4ad5dd,_0x20be1f){return _0x4ad5dd(_0x20be1f);}},_0x4cf030=_0x3723f9[_0x4de884(0x155)](getRangerDir);if(!_0x3723f9['XaCFj'](existsSync,_0x4cf030))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4035e3=await _0x3723f9['pahLH'](readActiveProfileName),_0xa5bcf6=[],_0x8c3e6a={},_0x19517e=_0x3723f9[_0x4de884(0x15c)](join,_0x4cf030,_0x3723f9[_0x4de884(0x128)]);if(_0x3723f9['VdlVP'](existsSync,_0x19517e)){const _0xef1012=await readdir(_0x19517e);for(const _0x3a00ec of _0xef1012){const _0x49934b=_0x3723f9[_0x4de884(0x13d)](join,_0x19517e,_0x3a00ec),_0x32a358=await stat(_0x49934b);_0x32a358[_0x4de884(0x13f)]()&&(_0xa5bcf6[_0x4de884(0x140)](_0x3a00ec),_0x8c3e6a[_0x3a00ec]=_0x4de884(0x13a));}}const _0x24df52=_0x3723f9[_0x4de884(0x13e)](join,_0x4cf030,'ci');if(existsSync(_0x24df52)){const _0x2b6110=await readdir(_0x24df52);for(const _0x22e2d2 of _0x2b6110){const _0x1b13f7=join(_0x24df52,_0x22e2d2),_0x3341a6=await _0x3723f9[_0x4de884(0x14a)](stat,_0x1b13f7);_0x3341a6[_0x4de884(0x13f)]()&&(_0xa5bcf6[_0x4de884(0x140)](_0x22e2d2),_0x8c3e6a[_0x22e2d2]='ci');}}const _0x216c9a=await _0x3723f9[_0x4de884(0x14a)](readdir,_0x4cf030);for(const _0x4deae5 of _0x216c9a){if(NON_ENV_DIRS[_0x4de884(0x149)](_0x4deae5))continue;if(_0x4deae5[_0x4de884(0x160)]('.'))continue;if(_0x4deae5['endsWith'](_0x3723f9[_0x4de884(0x138)]))continue;const _0x33fcbf=_0x3723f9[_0x4de884(0x13c)](join,_0x4cf030,_0x4deae5),_0x205e11=await stat(_0x33fcbf);_0x205e11['isDirectory']()&&_0x3723f9['CvJMu'](existsSync,join(_0x33fcbf,_0x4de884(0x137)))&&(!_0xa5bcf6[_0x4de884(0x149)](_0x4deae5)&&(_0xa5bcf6['push'](_0x4deae5),_0x8c3e6a[_0x4deae5]=_0x4de884(0x134)));}return{'envNames':_0xa5bcf6,'activeEnv':_0x4035e3,'envTypes':_0x8c3e6a};}export async function envList(){const _0x2a7b74=_0x331e37,_0x5e016={'ToiSk':'no\x20session','YxNCR':function(_0xb57b41){return _0xb57b41();},'UmmIF':function(_0x9770ec){return _0x9770ec();},'CctBI':function(_0x450a56,_0x1fbdf3){return _0x450a56(_0x1fbdf3);},'qtpWp':function(_0x46a8b4,_0x3b6775){return _0x46a8b4===_0x3b6775;},'YvBic':function(_0x30d575,_0x3bc96f){return _0x30d575===_0x3bc96f;},'atQkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','MQeDG':function(_0x4fa6fc,_0x2f932d){return _0x4fa6fc===_0x2f932d;},'rhvRE':function(_0x25422f,_0x5edb94,_0x2e5b99){return _0x25422f(_0x5edb94,_0x2e5b99);},'GcaUT':function(_0x3f1bc7,_0x550474){return _0x3f1bc7===_0x550474;},'htsUz':function(_0x5368e8,_0x1c53ac){return _0x5368e8(_0x1c53ac);},'AoXWf':'\x20\x20\x20\x20'},{envNames:_0x520e60,activeEnv:_0x185b7c,envTypes:_0x5240f1}=await _0x5e016[_0x2a7b74(0x136)](getEnvNames);let _0x2f1ddb=[],_0x4b4425=new Map();const _0x40132f=await _0x5e016['UmmIF'](getToken);if(_0x40132f)try{_0x2f1ddb=await listCloudProfiles(),_0x4b4425=await _0x5e016[_0x2a7b74(0x142)](loadCloudProfileListUrls,_0x2f1ddb);}catch(_0x22fc23){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x22fc23 instanceof Error?_0x22fc23[_0x2a7b74(0x144)]:_0x5e016['CctBI'](String,_0x22fc23)));}if(_0x5e016[_0x2a7b74(0x139)](_0x520e60[_0x2a7b74(0x148)],0x0)&&_0x5e016['YvBic'](_0x2f1ddb['length'],0x0)){console[_0x2a7b74(0x143)](_0x2a7b74(0x153)),console['log'](_0x5e016['atQkC']);return;}const _0xcf6da7=new Set(_0x2f1ddb['map'](_0xf6d734=>_0xf6d734[_0x2a7b74(0x12f)]));if(_0x520e60['length']>0x0){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x4ddc67 of _0x520e60[_0x2a7b74(0x127)]()){const _0x2b6655=_0x5e016['MQeDG'](_0x4ddc67,_0x185b7c)&&!_0xcf6da7[_0x2a7b74(0x147)](_0x4ddc67),_0x10f24c=_0x5240f1[_0x4ddc67]||'local',_0x48f22d=await _0x5e016[_0x2a7b74(0x142)](loadSettings,_0x4ddc67),_0x44cb36=_0x5e016[_0x2a7b74(0x142)](resolveProfileUrl,{'localSettingsBaseUrl':expandString(_0x48f22d['baseUrl']),'projectOverrides':expandProfileOverrides(_0x5e016['rhvRE'](readProfileOverrides,process[_0x2a7b74(0x14c)](),_0x4ddc67))}),_0x2051ae=_0x5e016[_0x2a7b74(0x159)](_0x10f24c,'legacy')?'':'\x20['+_0x10f24c+']';console[_0x2a7b74(0x143)]('\x20\x20'+(_0x2b6655?'*\x20':'\x20\x20')+_0x4ddc67+_0x2051ae),_0x44cb36[_0x2a7b74(0x130)]&&console['log'](_0x2a7b74(0x13b)+_0x44cb36[_0x2a7b74(0x130)]),_0x48f22d[_0x2a7b74(0x14d)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x48f22d['environmentDetails']);}}const _0x58d1a5=(_0x46f272,_0x54479d)=>{const _0x3e62c7=_0x2a7b74,_0x8b8756=_0x46f272[_0x3e62c7(0x12f)]===_0x185b7c,_0x190ec2=_0x46f272[_0x3e62c7(0x12e)]?_0x3e62c7(0x150)+_0x46f272['sessionUpdatedAt']+')':_0x5e016[_0x3e62c7(0x129)],_0x43a287=_0x4b4425['get'](_0x46f272[_0x3e62c7(0x12f)]);console[_0x3e62c7(0x143)](''+_0x54479d+(_0x8b8756?'*\x20':'\x20\x20')+_0x46f272['name']),_0x43a287?.['baseUrl']&&console[_0x3e62c7(0x143)](_0x54479d+'\x20\x20\x20\x20URL:\x20'+_0x43a287[_0x3e62c7(0x130)]),console['log'](_0x54479d+_0x3e62c7(0x158)+_0x190ec2);};if(_0x2f1ddb['length']>0x0){if(shouldGroupByEnvironment(_0x2f1ddb)){console['log'](_0x2a7b74(0x12c));for(const _0x53b308 of _0x5e016[_0x2a7b74(0x132)](groupCloudProfilesByEnvironment,_0x2f1ddb)){const _0x3f4c18=_0x53b308['environmentKey']??'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)';console[_0x2a7b74(0x143)](_0x2a7b74(0x15b)+_0x3f4c18);for(const _0x5c0d14 of _0x53b308['profiles']){_0x58d1a5(_0x5c0d14,_0x5e016['AoXWf']);}}}else{console[_0x2a7b74(0x143)]('\x0aCloud\x20Profiles:');for(const _0x3299ce of[..._0x2f1ddb]['sort']((_0x287d43,_0x560e71)=>_0x287d43['name']['localeCompare'](_0x560e71[_0x2a7b74(0x12f)]))){_0x58d1a5(_0x3299ce,'\x20\x20');}}}_0x185b7c&&console['log'](_0x2a7b74(0x15d));}
1
+ const _0x1c82e0=_0x433d;(function(_0x5e5fa0,_0x218f45){const _0x550373=_0x433d,_0x55712b=_0x5e5fa0();while(!![]){try{const _0x38acd5=parseInt(_0x550373(0x1de))/0x1*(-parseInt(_0x550373(0x1d1))/0x2)+-parseInt(_0x550373(0x200))/0x3+-parseInt(_0x550373(0x1db))/0x4*(-parseInt(_0x550373(0x1fa))/0x5)+-parseInt(_0x550373(0x1f0))/0x6+parseInt(_0x550373(0x1dc))/0x7+-parseInt(_0x550373(0x1df))/0x8+-parseInt(_0x550373(0x1da))/0x9*(-parseInt(_0x550373(0x1cd))/0xa);if(_0x38acd5===_0x218f45)break;else _0x55712b['push'](_0x55712b['shift']());}catch(_0x35b80d){_0x55712b['push'](_0x55712b['shift']());}}}(_0x26a3,0x645f3));function _0x26a3(){const _0x4d7e5e=['gGaeB','OilrZ','224710yaVUYm','name','nThbz','sessionUpdatedAt','419638UFOpWV','\x0a*\x20=\x20active\x20profile','environmentKey','\x20\x20\x20\x20Session:\x20','ZtOHY','VaiED','some','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','rNeIr','531DRoYeA','2220KZxgiG','578263aeLLkG','BOznV','1LKAIpp','5386136jxVUxv','map','ZCjiy','wFJkY','environmentDetails','includes','NrRtL','\x22:\x20','cwd','error','.txt','legacy','log','settings.json','AHMUp','cached\x20(updated\x20','GUxLB','802548LCCNOd','wiAoc','all','bug-bashes','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','baseUrl','KqISv','upBrJ','oImlf','set','2515rntrfj','MrBpG','local','HsIyG','CBuqa','no\x20session','778788EUrJxo','localeCompare','sort','\x20\x20\x20\x20','SRUoC','profiles','get','startsWith','startPath','isDirectory','length','SYrSE','PdnpV'];_0x26a3=function(){return _0x4d7e5e;};return _0x26a3();}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';function _0x433d(_0x8d8b26,_0x369c26){_0x8d8b26=_0x8d8b26-0x1c5;const _0x26a3ee=_0x26a3();let _0x433d1b=_0x26a3ee[_0x8d8b26];return _0x433d1b;}import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions',_0x1c82e0(0x1f3),'reports','local','ci'];export function shouldGroupByEnvironment(_0x112338){const _0x24fc99=_0x1c82e0;return _0x112338[_0x24fc99(0x1d7)](_0x255ccb=>_0x255ccb['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x3d051b){const _0x2c8cf8=_0x1c82e0,_0xaf20bb={'nThbz':function(_0x91e906,_0x21f0dd){return _0x91e906===_0x21f0dd;}},_0x3566d7=new Map();for(const _0x35f433 of _0x3d051b){const _0x14c7df=_0x35f433[_0x2c8cf8(0x1d3)]??null,_0x1e8361=_0x3566d7['get'](_0x14c7df);if(_0x1e8361)_0x1e8361['push'](_0x35f433);else _0x3566d7[_0x2c8cf8(0x1f9)](_0x14c7df,[_0x35f433]);}const _0x16af68=[..._0x3566d7['keys']()][_0x2c8cf8(0x202)]((_0x527941,_0x59756e)=>{const _0x51c8c6=_0x2c8cf8;if(_0xaf20bb[_0x51c8c6(0x1cf)](_0x527941,null))return 0x1;if(_0xaf20bb[_0x51c8c6(0x1cf)](_0x59756e,null))return-0x1;return _0x527941[_0x51c8c6(0x201)](_0x59756e);});return _0x16af68['map'](_0x462913=>({'environmentKey':_0x462913,'profiles':_0x3566d7[_0x2c8cf8(0x206)](_0x462913)[_0x2c8cf8(0x202)]((_0x488a86,_0x372340)=>_0x488a86[_0x2c8cf8(0x1ce)][_0x2c8cf8(0x201)](_0x372340['name']))}));}function expandString(_0x43c97b){const _0x1afb7c=_0x1c82e0,_0xeabe27={'ZCjiy':function(_0x501bd4,_0x1efdc9){return _0x501bd4(_0x1efdc9);}};if(!_0x43c97b)return undefined;return _0xeabe27[_0x1afb7c(0x1e1)](resolveEnvVars,_0x43c97b);}function expandProfileOverrides(_0x1db8f0){const _0x3c9f4c=_0x1c82e0,_0x1b0c84={'zIZzw':function(_0x40eff2,_0x2efc7f){return _0x40eff2(_0x2efc7f);},'CBuqa':function(_0x18437f,_0x1a071a){return _0x18437f(_0x1a071a);}};if(!_0x1db8f0)return null;return{..._0x1db8f0,'baseUrl':_0x1b0c84['zIZzw'](expandString,_0x1db8f0['baseUrl']),'startPath':_0x1b0c84[_0x3c9f4c(0x1fe)](expandString,_0x1db8f0['startPath'])};}export function resolveCloudProfileListUrl(_0xaac321,_0x2678ae={}){const _0x55eb80=_0x1c82e0,_0x49af05={'tBeXu':function(_0x27a1df,_0x3edd40,_0x6b9549){return _0x27a1df(_0x3edd40,_0x6b9549);},'MrBpG':function(_0x2de2b7,_0x1c2378){return _0x2de2b7(_0x1c2378);},'gHjge':function(_0x559321,_0x2806df){return _0x559321(_0x2806df);},'uAlgf':function(_0x45de9e,_0x3fd086){return _0x45de9e(_0x3fd086);},'RKcxO':function(_0x43add6,_0x1f8dbd){return _0x43add6(_0x1f8dbd);}},_0x551b69=_0xaac321['settings']??{},_0x3a66a9=_0x2678ae['authConfig']?_0x49af05['tBeXu'](resolveAuthEnvironmentLocally,_0x2678ae['authConfig'],_0xaac321[_0x55eb80(0x1d3)]):null,_0x5bba34=_0x49af05[_0x55eb80(0x1fb)](resolveProfileUrl,{'projectOverrides':_0x49af05['gHjge'](expandProfileOverrides,_0x2678ae['projectOverrides']??null),'cloudSettings':{'baseUrl':_0x49af05['uAlgf'](expandString,_0x551b69[_0x55eb80(0x1f5)]),'startPath':_0x49af05['RKcxO'](expandString,_0x551b69[_0x55eb80(0x1c6)])},'authEnvironmentDomain':_0x3a66a9?.['domains']?.[0x0]});return{'baseUrl':_0x5bba34['baseUrl'],'source':_0x5bba34['baseUrlSource']};}async function loadCloudProfileListUrls(_0x534f91){const _0x2ba6f9=_0x1c82e0,_0x36e39f={'wFJkY':function(_0x22a842,_0x4bc30a){return _0x22a842(_0x4bc30a);},'SRUoC':function(_0x29c7ad,_0x8ef68e,_0x4019f2){return _0x29c7ad(_0x8ef68e,_0x4019f2);},'rNeIr':function(_0x4308fa,_0x2e138e){return _0x4308fa instanceof _0x2e138e;}},_0x4e0a71=new Map();if(_0x534f91[_0x2ba6f9(0x1c8)]===0x0)return _0x4e0a71;const _0xb9bd20=await fetchAuthConfig();return await Promise[_0x2ba6f9(0x1f2)](_0x534f91['map'](async _0x14568c=>{const _0x59d051=_0x2ba6f9;try{const _0x2bc419=await _0x36e39f[_0x59d051(0x1e2)](fetchCloudProfile,_0x14568c['name']);if(!_0x2bc419)return;_0x4e0a71[_0x59d051(0x1f9)](_0x14568c[_0x59d051(0x1ce)],resolveCloudProfileListUrl(_0x2bc419,{'authConfig':_0xb9bd20,'projectOverrides':_0x36e39f[_0x59d051(0x204)](readProfileOverrides,process['cwd'](),_0x14568c[_0x59d051(0x1ce)])}));}catch(_0x202a7a){console[_0x59d051(0x1e8)](_0x59d051(0x1f4)+_0x14568c['name']+_0x59d051(0x1e6)+(_0x36e39f[_0x59d051(0x1d9)](_0x202a7a,Error)?_0x202a7a['message']:_0x36e39f[_0x59d051(0x1e2)](String,_0x202a7a)));}})),_0x4e0a71;}export async function getEnvNames(){const _0x289920=_0x1c82e0,_0x4bdbfe={'HsIyG':function(_0x5d7344){return _0x5d7344();},'ZtOHY':function(_0x253cae,_0x4d7e24){return _0x253cae(_0x4d7e24);},'AHMUp':function(_0x4a724c,_0xc98f92,_0x241b3b){return _0x4a724c(_0xc98f92,_0x241b3b);},'TlGnP':function(_0x5d0b66,_0x270af8,_0x26f6fc){return _0x5d0b66(_0x270af8,_0x26f6fc);},'PdnpV':function(_0x50d2f9,_0x1838be){return _0x50d2f9(_0x1838be);},'GUxLB':function(_0x42d539,_0x2abd2f){return _0x42d539(_0x2abd2f);},'BOznV':function(_0x7483b0,_0xd3a467,_0x5c711d){return _0x7483b0(_0xd3a467,_0x5c711d);},'wiAoc':function(_0x27c6e2,_0x407f97,_0x486c07){return _0x27c6e2(_0x407f97,_0x486c07);}},_0x640595=_0x4bdbfe[_0x289920(0x1fd)](getRangerDir);if(!_0x4bdbfe[_0x289920(0x1d5)](existsSync,_0x640595))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3fe745=await readActiveProfileName(),_0x2a4284=[],_0xb8704e={},_0x1d2495=_0x4bdbfe[_0x289920(0x1ed)](join,_0x640595,_0x289920(0x1fc));if(_0x4bdbfe[_0x289920(0x1d5)](existsSync,_0x1d2495)){const _0x1bc827=await readdir(_0x1d2495);for(const _0x46b9cb of _0x1bc827){const _0x3e1495=_0x4bdbfe['TlGnP'](join,_0x1d2495,_0x46b9cb),_0x5d7969=await stat(_0x3e1495);_0x5d7969[_0x289920(0x1c7)]()&&(_0x2a4284['push'](_0x46b9cb),_0xb8704e[_0x46b9cb]='local');}}const _0x520b14=join(_0x640595,'ci');if(_0x4bdbfe[_0x289920(0x1ca)](existsSync,_0x520b14)){const _0x150cc2=await _0x4bdbfe[_0x289920(0x1ef)](readdir,_0x520b14);for(const _0x467362 of _0x150cc2){const _0x86a75d=_0x4bdbfe[_0x289920(0x1dd)](join,_0x520b14,_0x467362),_0x3a3a0e=await stat(_0x86a75d);_0x3a3a0e[_0x289920(0x1c7)]()&&(_0x2a4284['push'](_0x467362),_0xb8704e[_0x467362]='ci');}}const _0x341a5=await _0x4bdbfe[_0x289920(0x1ca)](readdir,_0x640595);for(const _0x1b348d of _0x341a5){if(NON_ENV_DIRS[_0x289920(0x1e4)](_0x1b348d))continue;if(_0x1b348d[_0x289920(0x1c5)]('.'))continue;if(_0x1b348d['endsWith'](_0x289920(0x1e9)))continue;const _0x759fff=_0x4bdbfe[_0x289920(0x1f1)](join,_0x640595,_0x1b348d),_0x2ac7ea=await stat(_0x759fff);_0x2ac7ea['isDirectory']()&&_0x4bdbfe['ZtOHY'](existsSync,_0x4bdbfe[_0x289920(0x1dd)](join,_0x759fff,_0x289920(0x1ec)))&&(!_0x2a4284['includes'](_0x1b348d)&&(_0x2a4284['push'](_0x1b348d),_0xb8704e[_0x1b348d]=_0x289920(0x1ea)));}return{'envNames':_0x2a4284,'activeEnv':_0x3fe745,'envTypes':_0xb8704e};}export async function envList(){const _0x523270=_0x1c82e0,_0x247d92={'KqISv':_0x523270(0x1ff),'cuDqo':function(_0x5c8d2a){return _0x5c8d2a();},'VaiED':function(_0x44a19b){return _0x44a19b();},'HnxyU':function(_0x2073db,_0x1f1ca4){return _0x2073db(_0x1f1ca4);},'uWVoB':function(_0x3378bf,_0x1541b8){return _0x3378bf===_0x1541b8;},'upBrJ':function(_0x350010,_0x2238c8){return _0x350010===_0x2238c8;},'NrRtL':'\x0aNo\x20profiles\x20found.','gGaeB':'\x0aLocal\x20Profiles\x20(legacy):','EhRkq':function(_0x1c3daf,_0x3a0779){return _0x1c3daf(_0x3a0779);},'hqzoQ':function(_0x580306,_0x4cff25){return _0x580306(_0x4cff25);},'pHPzW':function(_0x1f5703,_0x122239,_0x283c0f){return _0x1f5703(_0x122239,_0x283c0f);},'OilrZ':'\x0aCloud\x20Profiles\x20(by\x20environment):','oImlf':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','SYrSE':_0x523270(0x203),'TFmQY':'\x0aCloud\x20Profiles:'},{envNames:_0x43561e,activeEnv:_0x133d68,envTypes:_0x2ab0ef}=await _0x247d92['cuDqo'](getEnvNames);let _0x2b8e43=[],_0x58d1a9=new Map();const _0x59f570=await _0x247d92[_0x523270(0x1d6)](getToken);if(_0x59f570)try{_0x2b8e43=await _0x247d92['cuDqo'](listCloudProfiles),_0x58d1a9=await _0x247d92['HnxyU'](loadCloudProfileListUrls,_0x2b8e43);}catch(_0x416d82){console['error'](_0x523270(0x1d8)+(_0x416d82 instanceof Error?_0x416d82['message']:String(_0x416d82)));}if(_0x247d92['uWVoB'](_0x43561e['length'],0x0)&&_0x247d92[_0x523270(0x1f7)](_0x2b8e43[_0x523270(0x1c8)],0x0)){console[_0x523270(0x1eb)](_0x247d92[_0x523270(0x1e5)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x402690=new Set(_0x2b8e43[_0x523270(0x1e0)](_0x45172c=>_0x45172c[_0x523270(0x1ce)]));if(_0x43561e['length']>0x0){console[_0x523270(0x1eb)](_0x247d92[_0x523270(0x1cb)]);for(const _0x3117fe of _0x43561e['sort']()){const _0x212100=_0x3117fe===_0x133d68&&!_0x402690['has'](_0x3117fe),_0x3bcfcc=_0x2ab0ef[_0x3117fe]||_0x523270(0x1fc),_0x3acda7=await loadSettings(_0x3117fe),_0x44fddc=_0x247d92['EhRkq'](resolveProfileUrl,{'localSettingsBaseUrl':_0x247d92['hqzoQ'](expandString,_0x3acda7[_0x523270(0x1f5)]),'projectOverrides':expandProfileOverrides(_0x247d92['pHPzW'](readProfileOverrides,process[_0x523270(0x1e7)](),_0x3117fe))}),_0x5a0eaf=_0x247d92[_0x523270(0x1f7)](_0x3bcfcc,_0x523270(0x1ea))?'':'\x20['+_0x3bcfcc+']';console['log']('\x20\x20'+(_0x212100?'*\x20':'\x20\x20')+_0x3117fe+_0x5a0eaf),_0x44fddc['baseUrl']&&console[_0x523270(0x1eb)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x44fddc[_0x523270(0x1f5)]),_0x3acda7['environmentDetails']&&console[_0x523270(0x1eb)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x3acda7[_0x523270(0x1e3)]);}}const _0x246112=(_0x4bed21,_0x48a7ab)=>{const _0x526615=_0x523270,_0x255653=_0x4bed21[_0x526615(0x1ce)]===_0x133d68,_0x30593e=_0x4bed21[_0x526615(0x1d0)]?_0x526615(0x1ee)+_0x4bed21['sessionUpdatedAt']+')':_0x247d92[_0x526615(0x1f6)],_0x41fb68=_0x58d1a9[_0x526615(0x206)](_0x4bed21[_0x526615(0x1ce)]);console['log'](''+_0x48a7ab+(_0x255653?'*\x20':'\x20\x20')+_0x4bed21[_0x526615(0x1ce)]),_0x41fb68?.[_0x526615(0x1f5)]&&console[_0x526615(0x1eb)](_0x48a7ab+'\x20\x20\x20\x20URL:\x20'+_0x41fb68['baseUrl']),console[_0x526615(0x1eb)](_0x48a7ab+_0x526615(0x1d4)+_0x30593e);};if(_0x2b8e43['length']>0x0){if(shouldGroupByEnvironment(_0x2b8e43)){console['log'](_0x247d92[_0x523270(0x1cc)]);for(const _0x2591d5 of groupCloudProfilesByEnvironment(_0x2b8e43)){const _0x4726d0=_0x2591d5[_0x523270(0x1d3)]??_0x247d92[_0x523270(0x1f8)];console[_0x523270(0x1eb)]('\x0a\x20\x20'+_0x4726d0);for(const _0x34e9d4 of _0x2591d5[_0x523270(0x205)]){_0x246112(_0x34e9d4,_0x247d92[_0x523270(0x1c9)]);}}}else{console[_0x523270(0x1eb)](_0x247d92['TFmQY']);for(const _0x5f55df of[..._0x2b8e43]['sort']((_0x279525,_0x21812d)=>_0x279525['name'][_0x523270(0x201)](_0x21812d[_0x523270(0x1ce)]))){_0x246112(_0x5f55df,'\x20\x20');}}}_0x133d68&&console['log'](_0x523270(0x1d2));}