@ranger-testing/ranger-cli 3.0.0 → 3.0.1-alpha.aab0a1c-26

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 (81) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/playwrightCli.js +1 -1
  60. package/build/commands/utils/profileMessages.js +1 -1
  61. package/build/commands/utils/profileSetupBanner.js +1 -1
  62. package/build/commands/utils/projectsConfig.js +1 -1
  63. package/build/commands/utils/rangerConfig.js +1 -1
  64. package/build/commands/utils/rangerRoot.js +1 -1
  65. package/build/commands/utils/resolveProfileContext.js +1 -1
  66. package/build/commands/utils/resolveProfileUrl.js +1 -1
  67. package/build/commands/utils/retry.js +1 -1
  68. package/build/commands/utils/sessionCache.js +1 -1
  69. package/build/commands/utils/settings.js +1 -1
  70. package/build/commands/utils/skillContent.js +1 -1
  71. package/build/commands/utils/skills.js +1 -1
  72. package/build/commands/utils/stitchWebmFiles.js +1 -1
  73. package/build/commands/utils/telemetry.js +1 -1
  74. package/build/commands/utils/tokenRefresh.js +1 -1
  75. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  76. package/build/commands/utils/userApi.js +1 -1
  77. package/build/commands/utils/version.js +1 -1
  78. package/build/commands/verifyFeature.js +1 -1
  79. package/build/commands/verifyFeatureCli.js +1 -1
  80. package/build/commands/verifyFeatureNovaCli.js +1 -1
  81. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x3bbba5,_0x5a9163){const _0x57dcce=_0x2795,_0x3ed740=_0x3bbba5();while(!![]){try{const _0x13aaf2=-parseInt(_0x57dcce(0x212))/0x1*(-parseInt(_0x57dcce(0x213))/0x2)+parseInt(_0x57dcce(0x1c6))/0x3+parseInt(_0x57dcce(0x20f))/0x4*(parseInt(_0x57dcce(0x1fc))/0x5)+parseInt(_0x57dcce(0x202))/0x6*(-parseInt(_0x57dcce(0x1b1))/0x7)+parseInt(_0x57dcce(0x1bf))/0x8+-parseInt(_0x57dcce(0x1e9))/0x9*(-parseInt(_0x57dcce(0x1b2))/0xa)+parseInt(_0x57dcce(0x1be))/0xb*(-parseInt(_0x57dcce(0x210))/0xc);if(_0x13aaf2===_0x5a9163)break;else _0x3ed740['push'](_0x3ed740['shift']());}catch(_0x2e7477){_0x3ed740['push'](_0x3ed740['shift']());}}}(_0x5ae9,0x436a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x307568 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x2795(_0x114df5,_0x52096b){_0x114df5=_0x114df5-0x1a5;const _0x5ae922=_0x5ae9();let _0x279577=_0x5ae922[_0x114df5];return _0x279577;}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2171f9=_0x2795;if(!process['stdout'][_0x2171f9(0x1d6)])return;console[_0x2171f9(0x1b7)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2d6fe7){const _0x367b2f=_0x2795,_0x1f7097={'DNRzY':function(_0x5a2666,_0x2740fc,_0x42df9f){return _0x5a2666(_0x2740fc,_0x42df9f);},'HnMqC':_0x367b2f(0x1f7),'xxqnv':function(_0x1eee70,_0x276a7c){return _0x1eee70(_0x276a7c);},'YIVvZ':function(_0x3f218e,_0x133b3a){return _0x3f218e<_0x133b3a;},'BtyHR':'TypeError'};try{const _0x13a374=new AbortController(),_0x515266=_0x1f7097[_0x367b2f(0x1fd)](setTimeout,()=>_0x13a374[_0x367b2f(0x21a)](),0x1388),_0x3eeecb={'method':_0x367b2f(0x1e5),'signal':_0x13a374['signal'],'redirect':_0x1f7097[_0x367b2f(0x21f)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x2d6fe7)&&(process['env'][_0x367b2f(0x1dc)]='0');const _0x2f6772=await fetch(_0x2d6fe7,_0x3eeecb);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f7097['xxqnv'](clearTimeout,_0x515266);if(_0x1f7097['YIVvZ'](_0x2f6772[_0x367b2f(0x200)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x2f6772[_0x367b2f(0x200)]};}catch(_0x326e7d){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x356a36=_0x326e7d,_0x25ddee=_0x356a36[_0x367b2f(0x1c5)]||_0x1f7097['xxqnv'](String,_0x326e7d),_0x11375c=_0x25ddee['includes']('Invalid\x20URL')||_0x356a36[_0x367b2f(0x1fb)]===_0x1f7097[_0x367b2f(0x214)]||_0x25ddee['includes'](_0x367b2f(0x1c2));return{'ok':![],'error':_0x25ddee,'isProtocolError':_0x11375c};}}async function sweepOrphanLocalProfile(_0x46992f,_0x507909,_0xbf0fa8){const _0x4cffeb=_0x2795,_0x5d964a={'IBvlw':function(_0x3140b5,_0x20e920,_0x9f485c){return _0x3140b5(_0x20e920,_0x9f485c);},'zFPtT':function(_0x1a322b,_0x2758a9){return _0x1a322b(_0x2758a9);}},_0x2f69c3=join(_0x507909,_0x4cffeb(0x1b6)),_0x504037=_0x5d964a[_0x4cffeb(0x1e2)](join,_0x2f69c3,_0x46992f);existsSync(_0x504037)&&(_0xbf0fa8&&await _0x5d964a[_0x4cffeb(0x1fe)](isPathGitTracked,_0x504037)?console[_0x4cffeb(0x1e1)](_0x4cffeb(0x203)+_0x504037+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x504037,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x504037)));if(_0x5d964a[_0x4cffeb(0x1fe)](existsSync,_0x2f69c3)){let _0x3bbda9=[];try{_0x3bbda9=await readdir(_0x2f69c3);}catch{return;}const _0x237fa8=_0x4cffeb(0x1b0)+_0x46992f+'-';for(const _0x4ee105 of _0x3bbda9){if(!_0x4ee105['startsWith'](_0x237fa8))continue;const _0x18e038=join(_0x2f69c3,_0x4ee105);await rm(_0x18e038,{'recursive':!![],'force':!![]}),console[_0x4cffeb(0x1e1)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x18e038);}}}async function sweepOrphansBestEffort(_0x24f400){const _0xd59a11=_0x2795,_0x4ec49d={'SsYyq':function(_0x17bcaa,_0xc9ce55,_0x1dca74,_0x3756a5){return _0x17bcaa(_0xc9ce55,_0x1dca74,_0x3756a5);},'hSWGd':function(_0x24f026){return _0x24f026();},'QIhZY':function(_0x22017b){return _0x22017b();},'goiQs':function(_0x228046,_0x84638c){return _0x228046(_0x84638c);}};try{await _0x4ec49d[_0xd59a11(0x1b3)](sweepOrphanLocalProfile,_0x24f400,_0x4ec49d['hSWGd'](getRangerHomeDir),![]);const _0x36e8c0=_0x4ec49d['hSWGd'](getRangerDir);_0x36e8c0!==_0x4ec49d['QIhZY'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x24f400,_0x36e8c0,!![]);}catch(_0x58a327){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x58a327 instanceof Error?_0x58a327['message']:_0x4ec49d[_0xd59a11(0x21e)](String,_0x58a327))+').');}}async function markActive(_0x415a50){const _0x9fa460=_0x2795,_0x598269={'GrLiy':function(_0x2c3c47,_0x59c95d){return _0x2c3c47(_0x59c95d);}};try{await _0x598269['GrLiy'](writeActiveProfileName,_0x415a50),console[_0x9fa460(0x1e1)]('\x20\x20Set\x20active\x20profile:\x20'+_0x415a50);}catch{console[_0x9fa460(0x1e1)](_0x9fa460(0x1d0));}}async function tryAutoRouteCloudProfile(_0x5bf623,_0x19805b,_0x35b78f,_0xa6be2d,_0x203d0e){const _0x37e69c=_0x2795,_0x234d37={'nOZJG':function(_0x195626,_0x528ffa){return _0x195626===_0x528ffa;},'rksyN':'profile.add.autoRouteSkipped','FFehE':function(_0x44e1ae,_0x25284c){return _0x44e1ae instanceof _0x25284c;},'SJXrA':function(_0x345bfe,_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a){return _0x345bfe(_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a);},'ndFlt':function(_0x512134,_0x27bea9){return _0x512134+_0x27bea9;},'ZcfVm':'\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','kWWOd':_0x37e69c(0x1bc),'imPWO':_0x37e69c(0x1b9),'FzJmb':_0x37e69c(0x1ab),'lmdhs':'no_match','bkjwY':_0x37e69c(0x1d2),'BzfoC':function(_0x6a5fd6,_0x381b37,_0x11b709,_0x19240c){return _0x6a5fd6(_0x381b37,_0x11b709,_0x19240c);},'HXOID':function(_0x1590fb,_0x59dc02){return _0x1590fb===_0x59dc02;},'WtnEg':function(_0x4d9fe5,_0x24d4fc){return _0x4d9fe5+_0x24d4fc;},'xcPgx':function(_0x43f6b3,_0x3c6835){return _0x43f6b3+_0x3c6835;},'PODcS':function(_0x32b87b,_0x140de8){return _0x32b87b(_0x140de8);}};let _0x11dc40;try{_0x11dc40=await fetchAuthConfig();}catch(_0x3e6a2a){return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x37e69c(0x1da)+(_0x234d37['FFehE'](_0x3e6a2a,Error)?_0x3e6a2a['message']:String(_0x3e6a2a))),![];}if(!_0x11dc40||!_0x11dc40[_0x37e69c(0x1d4)]||_0x234d37[_0x37e69c(0x1f5)](Object[_0x37e69c(0x1f6)](_0x11dc40['environments'])['length'],0x0)){if(_0xa6be2d)return await _0x234d37['SJXrA'](captureEnvLessProfile,_0x5bf623,_0x19805b,_0x35b78f,_0x203d0e);return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x234d37['ndFlt'](_0x234d37[_0x37e69c(0x1ad)](_0x234d37[_0x37e69c(0x1f8)]+'\x0a',_0x234d37['kWWOd']),_0x37e69c(0x1ac)+_0x5bf623+_0x37e69c(0x1c8)+_0x19805b+'\x20--skip-auth\x0a')+'\x0a'+_0x234d37[_0x37e69c(0x1fa)]+_0x234d37[_0x37e69c(0x222)]),![];}const _0x2b53ed=matchAuthEnvironment(_0x19805b,_0x11dc40);if(!_0x2b53ed)return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x234d37['lmdhs'],'profileName':_0x5bf623}),console[_0x37e69c(0x1c9)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x19805b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x11dc40[_0x37e69c(0x1d4)])['join'](',\x20')+'.'),![];const _0x13e46f=_0x11dc40[_0x37e69c(0x1d4)][_0x2b53ed],_0x349189=_0x13e46f?.['domains']??[];if(_0xa6be2d&&!_0x35b78f['yes']){const {saveToCloud:_0xe938ed}=await _0x307568['prompt']([{'type':_0x37e69c(0x20c),'name':_0x234d37['bkjwY'],'message':'Found\x20auth\x20environment\x20\x27'+_0x2b53ed+_0x37e69c(0x1aa)+_0x19805b+'\x0a\x20\x20(domains:\x20'+_0x349189['join'](',\x20')+_0x37e69c(0x201)+_0x5bf623+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xe938ed)return _0x203d0e?.[_0x37e69c(0x1ea)](_0x234d37['rksyN'],{'reason':_0x37e69c(0x218),'profileName':_0x5bf623}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0xc8c00b=_0x349189['some'](_0x450328=>{const _0x1c4916=_0x37e69c;try{return _0x234d37[_0x1c4916(0x1f5)](new URL(_0x450328)[_0x1c4916(0x1c3)],new URL(_0x19805b)[_0x1c4916(0x1c3)]);}catch{return![];}}),_0x18fa1d={};!_0xc8c00b&&(_0x18fa1d[_0x37e69c(0x1f4)]=_0x19805b);try{await _0x234d37[_0x37e69c(0x1d1)](createCloudProfile,_0x5bf623,_0x2b53ed,{'settings':_0x18fa1d}),warnCloudProfileSharedInOrg();}catch(_0x39110f){if(_0x39110f instanceof ApiError&&_0x234d37['HXOID'](_0x39110f[_0x37e69c(0x200)],0x199)){console['error'](_0x234d37[_0x37e69c(0x219)](_0x37e69c(0x1e7)+_0x5bf623+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5bf623));throw _0x39110f;}throw _0x39110f;}return console['log'](_0x234d37[_0x37e69c(0x20b)](_0x37e69c(0x20d)+_0x5bf623+_0x37e69c(0x1ef),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5bf623)),await _0x234d37['PODcS'](sweepOrphansBestEffort,_0x5bf623),_0x203d0e?.['trackPhaseEnd'](_0x37e69c(0x1d5),{'envKey':_0x2b53ed,'profileName':_0x5bf623}),!![];}function _0x5ae9(){const _0x692891=['\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Invalid\x20--setup-header\x20format:\x20\x22','11EKURot','715280Oyivmc','no_auth_config','ULmkg','fetch\x20failed','origin','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','message','743373BVIeuX','tTOmS','\x20--url\x20','error','`\x20again\x20without\x20--skip-auth.','AOSSm','yes','setupHeader','SfJlE','use_suggestion','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','BzfoC','saveToCloud','Enter\x20a\x20different\x20URL','environments','profile.add.autoRouted','isTTY','exit','isElectron','cdpEndpoint','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x0a🌐\x20Profile\x20Setup\x0a','NODE_TLS_REJECT_UNAUTHORIZED','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','slice','vvcpX','\x20\x20Did\x20you\x20mean\x20','log','IBvlw','zNpKd','HRYNF','HEAD','trim','\x0a\x20\x20A\x20profile\x20named\x20\x22','input','747ditNSG','trackPhaseEnd','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','lowIf','profile.add.autoRouteSkipped','force','\x27\x20created.\x0a','CkDbM','Use\x20','Tdaqf','cwd','baseUrl','nOZJG','keys','manual','ZcfVm','oyXJX','imPWO','name','175pIBdra','DNRzY','zFPtT','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','status',')\x0a\x20\x20Save\x20\x27','73122anEjPh','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','indexOf','setupHeaders','test','SFSbn','FGoDo','\x0a✓\x20Profile\x20\x27','UFMml','xcPgx','confirm','✓\x20Profile\x20\x27','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','44580TsyzhY','13405476kGkbsU','length','42577xNNnHv','24oaUckX','BtyHR','FcRPb','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x27\x20created\x20(CDP).','user_declined','WtnEg','abort','iHJXn','continue','CNxqH','goiQs','HnMqC','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','\x22:\x20','FzJmb','Kffbk','rxgCG','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','http://localhost:3000','skipAuth','\x27\x20matching\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','ndFlt','tyfYb','url','.tmp-','91JyguVY','37770ysAJIy','SsYyq','action','QmLni','local','warn','ghxMz','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','AyBVP'];_0x5ae9=function(){return _0x692891;};return _0x5ae9();}async function createUnconfiguredCloudProfile(_0x103cee,_0x1b8808){const _0x4dd917=_0x2795;try{await createCloudProfile(_0x103cee,undefined,{'settings':_0x1b8808}),warnCloudProfileSharedInOrg();}catch(_0x58385b){_0x58385b instanceof ApiError&&_0x58385b['status']===0x199&&console['error'](_0x4dd917(0x1e7)+_0x103cee+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4dd917(0x1dd)+_0x103cee));throw _0x58385b;}}async function captureEnvLessProfile(_0x3fe166,_0x212271,_0x3ba0e8,_0x3f1490){const _0x2ec8aa=_0x2795,_0x55000f={'KBWEM':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','SfJlE':_0x2ec8aa(0x1ed),'tyfYb':_0x2ec8aa(0x218),'FcRPb':function(_0x5aead3,_0x27735b){return _0x5aead3+_0x27735b;},'SFSbn':function(_0x22e265,_0x264596,_0x1c0e96){return _0x22e265(_0x264596,_0x1c0e96);},'hBqAl':function(_0x4c8b42,_0x50bf76){return _0x4c8b42>_0x50bf76;},'rxgCG':function(_0x226fd6,_0x55e310){return _0x226fd6(_0x55e310);},'eiXCP':'profile.add.autoRouted'};if(!_0x3ba0e8[_0x2ec8aa(0x1cc)]){const {capture:_0x1d218e}=await _0x307568['prompt']([{'type':'confirm','name':'capture','message':_0x55000f['KBWEM'],'default':!![]}]);if(!_0x1d218e)return _0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f[_0x2ec8aa(0x1ce)],{'reason':_0x55000f[_0x2ec8aa(0x1ae)],'profileName':_0x3fe166}),console[_0x2ec8aa(0x1c9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x2ec8aa(0x1ff)),![];}const _0x2ef095={};if(_0x3ba0e8['setupHeader'])for(const _0x499e6f of _0x3ba0e8[_0x2ec8aa(0x1cd)]){const _0x2a2c21=_0x499e6f[_0x2ec8aa(0x204)](':');if(_0x2a2c21===-0x1)continue;_0x2ef095[_0x499e6f[_0x2ec8aa(0x1de)](0x0,_0x2a2c21)['trim']()]=_0x499e6f[_0x2ec8aa(0x1de)](_0x2a2c21+0x1)[_0x2ec8aa(0x1e6)]();}const _0x17df1c={'baseUrl':_0x212271};Object['keys'](_0x2ef095)['length']>0x0&&(_0x17df1c[_0x2ec8aa(0x205)]=_0x2ef095);let _0x111b1b;try{_0x111b1b=await createCloudProfile(_0x3fe166,undefined,{'settings':_0x17df1c}),warnCloudProfileSharedInOrg();}catch(_0x259ec1){_0x259ec1 instanceof ApiError&&_0x259ec1['status']===0x199&&console[_0x2ec8aa(0x1c9)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x1e7)+_0x3fe166+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x2ec8aa(0x1dd)+_0x3fe166));throw _0x259ec1;}return await _0x55000f[_0x2ec8aa(0x207)](manualBrowserLogin,_0x111b1b,{'key':'','domains':[_0x212271],'setupHeaders':_0x55000f['hBqAl'](Object[_0x2ec8aa(0x1f6)](_0x2ef095)[_0x2ec8aa(0x211)],0x0)?_0x2ef095:undefined}),console[_0x2ec8aa(0x1e1)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x209)+_0x3fe166+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3fe166)),await _0x55000f[_0x2ec8aa(0x1a6)](sweepOrphansBestEffort,_0x3fe166),_0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f['eiXCP'],{'envKey':null,'profileName':_0x3fe166}),!![];}export async function addEnv(_0x39a8cd,_0x85392f={},_0x4a3cd6){const _0x1051e5=_0x2795,_0x28f6cc={'Kffbk':function(_0x1d9ea6,_0x4b1a45){return _0x1d9ea6+_0x4b1a45;},'UYGPZ':function(_0x1cdf39,_0x48d331){return _0x1cdf39+_0x48d331;},'GpBkH':function(_0x1de8ee,_0x1a5e92){return _0x1de8ee+_0x1a5e92;},'ghxMz':_0x1051e5(0x216),'CNxqH':_0x1051e5(0x1c4),'UFMml':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','lowIf':_0x1051e5(0x1ba),'FGoDo':function(_0x5a315d,_0x328834){return _0x5a315d===_0x328834;},'QmLni':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iHJXn':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vvcpX':_0x1051e5(0x1a7),'Tdaqf':function(_0x380f61,_0x3c4bc5){return _0x380f61>_0x3c4bc5;},'dGLYL':function(_0x2fb84d,_0x579075,_0x2cb946,_0x3a2168,_0x24233e){return _0x2fb84d(_0x579075,_0x2cb946,_0x3a2168,_0x24233e);},'UpXDm':'cdpEndpoint','CkDbM':function(_0x27d54a,_0x382faf){return _0x27d54a instanceof _0x382faf;},'HRYNF':function(_0x2deb4f,_0x4f3b37){return _0x2deb4f(_0x4f3b37);},'ULmkg':function(_0x786ac0,_0x5f33e4){return _0x786ac0>_0x5f33e4;},'fCrKL':function(_0xd64179,_0x2e27bd,_0x1243f0){return _0xd64179(_0x2e27bd,_0x1243f0);},'XOQHc':function(_0x5c2e40,_0x33643f){return _0x5c2e40(_0x33643f);},'AyBVP':_0x1051e5(0x1db),'xNhRa':_0x1051e5(0x1e8),'oyXJX':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zNpKd':'list','AOSSm':'What\x20would\x20you\x20like\x20to\x20do?','tTOmS':'Continue\x20anyway','gKTXc':function(_0x2afcd6,_0x1f0949){return _0x2afcd6(_0x1f0949);},'UcSZD':function(_0x3354f0,_0x391f2b){return _0x3354f0===_0x391f2b;},'MNxew':'continue'};_0x85392f['ci']&&(console[_0x1051e5(0x1c9)](_0x28f6cc['Kffbk'](_0x28f6cc['UYGPZ'](_0x28f6cc['GpBkH'](_0x28f6cc[_0x1051e5(0x1a5)](_0x28f6cc[_0x1051e5(0x1a5)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x28f6cc[_0x1051e5(0x1b8)]+'\x0a',_0x1051e5(0x1eb)),_0x28f6cc[_0x1051e5(0x21d)]),'\x0a'),_0x28f6cc[_0x1051e5(0x20a)]),_0x28f6cc[_0x1051e5(0x1ec)])),process[_0x1051e5(0x1d7)](0x1));const _0x33b768={};if(_0x85392f['setupHeader'])for(const _0x2ded9b of _0x85392f[_0x1051e5(0x1cd)]){const _0x1e12b4=_0x2ded9b['indexOf'](':');if(_0x1e12b4===-0x1)throw new Error(_0x1051e5(0x1bd)+_0x2ded9b+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x9257ef=_0x2ded9b['slice'](0x0,_0x1e12b4)['trim'](),_0x18e24d=_0x2ded9b['slice'](_0x1e12b4+0x1)['trim']();_0x33b768[_0x9257ef]=_0x18e24d;}if(_0x85392f['cdpEndpoint']!==undefined&&_0x28f6cc[_0x1051e5(0x208)](_0x85392f['cdpEndpoint'][_0x1051e5(0x1e6)](),''))throw new Error(_0x28f6cc[_0x1051e5(0x1b5)]);if(_0x85392f[_0x1051e5(0x1d9)]&&_0x85392f['url'])throw new Error(_0x28f6cc[_0x1051e5(0x21b)]);const _0x280904=Boolean(_0x85392f[_0x1051e5(0x1d9)]),_0x392b3f=isInteractive();if(!_0x392b3f&&!_0x85392f[_0x1051e5(0x1af)]&&!_0x280904&&!_0x85392f['skipAuth'])throw new Error(_0x1051e5(0x220));if(_0x280904){const _0x1d7373=_0x85392f[_0x1051e5(0x1d9)];console[_0x1051e5(0x1e1)](_0x28f6cc[_0x1051e5(0x1df)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1d7373);const _0x1719ec={'cdpEndpoint':_0x1d7373,'isElectron':!![]};_0x28f6cc[_0x1051e5(0x1f2)](Object['keys'](_0x33b768)['length'],0x0)&&(_0x1719ec[_0x1051e5(0x205)]=_0x33b768);await createUnconfiguredCloudProfile(_0x39a8cd,_0x1719ec);try{_0x28f6cc['dGLYL'](setProfileOverride,process[_0x1051e5(0x1f3)](),_0x39a8cd,_0x28f6cc['UpXDm'],_0x1d7373),_0x28f6cc['dGLYL'](setProfileOverride,process['cwd'](),_0x39a8cd,_0x1051e5(0x1d8),!![]);}catch(_0x3c92c6){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x28f6cc[_0x1051e5(0x1f0)](_0x3c92c6,Error)?_0x3c92c6['message']:String(_0x3c92c6)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x39a8cd+_0x1051e5(0x217)),await _0x28f6cc[_0x1051e5(0x1e4)](sweepOrphansBestEffort,_0x39a8cd),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);return;}if(_0x85392f[_0x1051e5(0x1a9)]){const _0x5a242c={};_0x85392f[_0x1051e5(0x1af)]&&(_0x5a242c['baseUrl']=_0x85392f['url']);_0x28f6cc[_0x1051e5(0x1c1)](Object[_0x1051e5(0x1f6)](_0x33b768)[_0x1051e5(0x211)],0x0)&&(_0x5a242c[_0x1051e5(0x205)]=_0x33b768);await _0x28f6cc['fCrKL'](createUnconfiguredCloudProfile,_0x39a8cd,_0x5a242c),console['log'](_0x28f6cc[_0x1051e5(0x1a5)]('✓\x20Profile\x20\x27'+_0x39a8cd+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x39a8cd+_0x1051e5(0x1ca))),await sweepOrphansBestEffort(_0x39a8cd),await _0x28f6cc['XOQHc'](markActive,_0x39a8cd);return;}if(_0x85392f['url']){const _0x35d1f9=_0x85392f[_0x1051e5(0x1af)],_0x1ca69e=await checkUrlReachability(_0x35d1f9);if(!_0x1ca69e['ok']&&!_0x85392f[_0x1051e5(0x1ee)])throw new Error('Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1ca69e['ok']&&_0x85392f[_0x1051e5(0x1ee)]&&console[_0x1051e5(0x1e1)]('⚠\x20Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e[_0x1051e5(0x1c9)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x28f6cc[_0x1051e5(0x1bb)]),console['log'](_0x1051e5(0x20e)),console[_0x1051e5(0x1e1)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2227ed='',_0x59405e=![];while(!![]){const _0x3ff74b=await _0x307568['prompt']([{'type':_0x28f6cc['xNhRa'],'name':_0x1051e5(0x1f4),'message':_0x59405e?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x28f6cc[_0x1051e5(0x1f9)],'default':_0x2227ed||_0x1051e5(0x1a8)}]);_0x2227ed=_0x3ff74b['baseUrl'];const _0x59b832=await checkUrlReachability(_0x2227ed);if(_0x59b832['ok'])break;const _0x380d92=/^[a-zA-Z][\w+.-]*:\/\//[_0x1051e5(0x206)](_0x2227ed),_0x1f33d7=_0x59b832['isProtocolError']&&!_0x380d92,_0x12855d=_0x1f33d7?'http://'+_0x2227ed:null;_0x59405e=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x59b832['error']);_0x12855d&&console['log'](_0x1051e5(0x1e0)+_0x12855d+'?');const {action:_0x23fc0b}=await _0x307568['prompt']([{'type':_0x28f6cc[_0x1051e5(0x1e3)],'name':_0x1051e5(0x1b4),'message':_0x28f6cc[_0x1051e5(0x1cb)],'choices':[..._0x12855d?[{'name':_0x1051e5(0x1f1)+_0x12855d,'value':_0x1051e5(0x1cf)}]:[],{'name':_0x1051e5(0x1d3),'value':'retry'},{'name':_0x28f6cc[_0x1051e5(0x1c7)],'value':_0x1051e5(0x21c)}]}]);if(_0x23fc0b===_0x1051e5(0x1cf)&&_0x12855d){_0x2227ed=_0x12855d;const _0x365be2=await _0x28f6cc['gKTXc'](checkUrlReachability,_0x2227ed);if(_0x365be2['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x365be2['error']);}else{if(_0x28f6cc['UcSZD'](_0x23fc0b,_0x28f6cc['MNxew']))break;}}_0x85392f={..._0x85392f,'url':_0x2227ed};}let _0x1cfe41=![];try{_0x1cfe41=await tryAutoRouteCloudProfile(_0x39a8cd,_0x85392f['url'],_0x85392f,_0x392b3f,_0x4a3cd6);}catch(_0x551c1a){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x39a8cd+_0x1051e5(0x221)+(_0x551c1a instanceof Error?_0x551c1a['message']:String(_0x551c1a))),process['exit'](0x1);}!_0x1cfe41&&process['exit'](0x1),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);}
1
+ (function(_0xd4cca5,_0x193d90){const _0x80a06=_0x3162,_0x34bcfe=_0xd4cca5();while(!![]){try{const _0x23f279=-parseInt(_0x80a06(0x124))/0x1+parseInt(_0x80a06(0xf2))/0x2*(parseInt(_0x80a06(0xc3))/0x3)+parseInt(_0x80a06(0x112))/0x4+parseInt(_0x80a06(0x10f))/0x5*(parseInt(_0x80a06(0xb4))/0x6)+-parseInt(_0x80a06(0xab))/0x7+parseInt(_0x80a06(0xd0))/0x8+-parseInt(_0x80a06(0xa8))/0x9*(parseInt(_0x80a06(0xf6))/0xa);if(_0x23f279===_0x193d90)break;else _0x34bcfe['push'](_0x34bcfe['shift']());}catch(_0x35137d){_0x34bcfe['push'](_0x34bcfe['shift']());}}}(_0xe261,0x71790));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x51228d from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0xe261(){const _0x5ad828=['\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','baseUrl','length','4148696hpIVTT','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','isProtocolError','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','environments','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','log','\x0a🌐\x20Profile\x20Setup\x0a','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','rzUtd',')\x0a\x20\x20Save\x20\x27','test','lHDKn','url','TjZPU','.\x20Configured\x20envs:\x20','ffvlY','startsWith','NODE_TLS_REJECT_UNAUTHORIZED','fsfoO','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','mPxTJ','keys','user_declined','HTTP\x20','fetch\x20failed','trim','jZqWp','NaIje','\x0a\x20\x20Could\x20not\x20reach\x20','wUUjd','\x27\x20created.\x0a','AQnHe','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','10vEhjWw','gGqIF','\x20--skip-auth\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','3680140sbHtbu','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x0a✓\x20Profile\x20\x27','cjlir','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','flPIx','ksotx','Found\x20auth\x20environment\x20\x27','GotdK','setupHeader','aOpiG','\x20\x20https://docs.ranger.net/main/concepts/profiles','ZEWZa','status','cdpEndpoint','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Enter\x20a\x20different\x20URL','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','\x20--url\x20','\x20\x20Did\x20you\x20mean\x20','action','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x27\x20created\x20(no\x20session).\x0a','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','10YyTvQc','message','join','3263324OWlliv','BLQHm','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','error','tjqLP','XjoHk','cuLkQ','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','cUhPq','setupHeaders','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','profile.add.autoRouted','manual','`\x20again\x20without\x20--skip-auth.','RyEaK','waDin','retry','460321MEOiiM','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','no_match','JPcwk','qRbuc','qIVQx','confirm','warn','36OxDuQy','vvIqS','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','1324225dkmkyo','CmtRh','UTdOg','name','env','OHbJL','indexOf','uKIrZ','use_suggestion','1960494NXFFMU','XjCWP','exit','LxMFI','MANGI','NfFYK','skipAuth','tujSN','uuYBY','slice','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','force','SBTpk','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','prompt','359052krTmkx','XGzBI','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','✓\x20Profile\x20\x27','CpcEB','\x20(continuing\x20with\x20--force)','cwd','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','trackPhaseEnd'];_0xe261=function(){return _0x5ad828;};return _0xe261();}import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x3162(_0x4c5b7c,_0x1a9846){_0x4c5b7c=_0x4c5b7c-0xa6;const _0xe261e0=_0xe261();let _0x3162c0=_0xe261e0[_0x4c5b7c];return _0x3162c0;}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x1d30a3=_0x3162;if(!process['stdout']['isTTY'])return;console[_0x1d30a3(0xa7)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x192696){const _0x379c54=_0x3162,_0xd84a79={'aOpiG':'HEAD','NaIje':_0x379c54(0x11f),'XhnNS':function(_0x5009be,_0x3f6aba,_0xff6128){return _0x5009be(_0x3f6aba,_0xff6128);},'vvIqS':function(_0x27698c,_0x128d04){return _0x27698c(_0x128d04);},'pJnAe':function(_0x368ee2,_0x27b23b){return _0x368ee2<_0x27b23b;},'UTdOg':'Invalid\x20URL'};try{const _0x255c04=new AbortController(),_0x13a0b6=setTimeout(()=>_0x255c04['abort'](),0x1388),_0x384bac={'method':_0xd84a79[_0x379c54(0x100)],'signal':_0x255c04['signal'],'redirect':_0xd84a79[_0x379c54(0xec)]};/^https:\/\/localhost(:\d+)?/i[_0x379c54(0xdb)](_0x192696)&&(process[_0x379c54(0xaf)][_0x379c54(0xe2)]='0');const _0x53ace9=await _0xd84a79['XhnNS'](fetch,_0x192696,_0x384bac);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0xd84a79['vvIqS'](clearTimeout,_0x13a0b6);if(_0xd84a79['pJnAe'](_0x53ace9['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x379c54(0xe8)+_0x53ace9['status']};}catch(_0xbdd768){delete process[_0x379c54(0xaf)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x3a1c82=_0xbdd768,_0x465628=_0x3a1c82['message']||_0xd84a79[_0x379c54(0xa9)](String,_0xbdd768),_0x1ead45=_0x465628['includes'](_0xd84a79[_0x379c54(0xad)])||_0x3a1c82[_0x379c54(0xae)]==='TypeError'||_0x465628['includes'](_0x379c54(0xe9));return{'ok':![],'error':_0x465628,'isProtocolError':_0x1ead45};}}async function sweepOrphanLocalProfile(_0x124d85,_0x137689,_0x3e9787){const _0x311afe=_0x3162,_0xece58f={'gGqIF':function(_0x51e575,_0x375bdf,_0x11b3c9){return _0x51e575(_0x375bdf,_0x11b3c9);},'JWWnT':'local','QSzUZ':function(_0x100c3a,_0x1ea881){return _0x100c3a(_0x1ea881);},'NfFYK':function(_0x1ed3ba,_0x20c4df,_0x4c2c6d){return _0x1ed3ba(_0x20c4df,_0x4c2c6d);}},_0x2b6a8f=_0xece58f[_0x311afe(0xf3)](join,_0x137689,_0xece58f['JWWnT']),_0x45a983=join(_0x2b6a8f,_0x124d85);_0xece58f['QSzUZ'](existsSync,_0x45a983)&&(_0x3e9787&&await isPathGitTracked(_0x45a983)?console[_0x311afe(0xd6)](_0x311afe(0xc1)+_0x45a983+_0x311afe(0xd1)):(await rm(_0x45a983,{'recursive':!![],'force':!![]}),console[_0x311afe(0xd6)](_0x311afe(0xcb)+_0x45a983)));if(existsSync(_0x2b6a8f)){let _0x5919d5=[];try{_0x5919d5=await _0xece58f['QSzUZ'](readdir,_0x2b6a8f);}catch{return;}const _0x45643b='.tmp-'+_0x124d85+'-';for(const _0x9a7305 of _0x5919d5){if(!_0x9a7305[_0x311afe(0xe1)](_0x45643b))continue;const _0x43e0e9=_0xece58f[_0x311afe(0xb9)](join,_0x2b6a8f,_0x9a7305);await _0xece58f['gGqIF'](rm,_0x43e0e9,{'recursive':!![],'force':!![]}),console[_0x311afe(0xd6)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x43e0e9);}}}async function sweepOrphansBestEffort(_0x5275ed){const _0x393fa3=_0x3162,_0x2f9e9d={'tjqLP':function(_0x5370d1){return _0x5370d1();},'GotdK':function(_0x12f165){return _0x12f165();},'WqViQ':function(_0x3c1919){return _0x3c1919();},'CmtRh':function(_0x239e5b,_0x332779,_0x531ec8,_0x63b7e4){return _0x239e5b(_0x332779,_0x531ec8,_0x63b7e4);}};try{await sweepOrphanLocalProfile(_0x5275ed,_0x2f9e9d[_0x393fa3(0x117)](getRangerHomeDir),![]);const _0xf02544=_0x2f9e9d[_0x393fa3(0xfe)](getRangerDir);_0xf02544!==_0x2f9e9d['WqViQ'](getRangerHomeDir)&&await _0x2f9e9d[_0x393fa3(0xac)](sweepOrphanLocalProfile,_0x5275ed,_0xf02544,!![]);}catch(_0x3f2b61){console[_0x393fa3(0xd6)](_0x393fa3(0x105)+(_0x3f2b61 instanceof Error?_0x3f2b61['message']:String(_0x3f2b61))+').');}}async function markActive(_0x8cd0f9){const _0xa2c88f=_0x3162,_0x4efef7={'uuYBY':_0xa2c88f(0xf5)};try{await writeActiveProfileName(_0x8cd0f9),console[_0xa2c88f(0xd6)]('\x20\x20Set\x20active\x20profile:\x20'+_0x8cd0f9);}catch{console['log'](_0x4efef7[_0xa2c88f(0xbc)]);}}async function tryAutoRouteCloudProfile(_0x3e5b58,_0xb181e2,_0x1d620f,_0x239f15,_0x1ad03c){const _0x8c724d=_0x3162,_0x3d1d97={'XjoHk':function(_0x400f48){return _0x400f48();},'AQnHe':'profile.add.autoRouteSkipped','OHbJL':function(_0x4bf775,_0x26e1de){return _0x4bf775 instanceof _0x26e1de;},'tujSN':function(_0x1ee829,_0x488cda){return _0x1ee829(_0x488cda);},'mPxTJ':function(_0x35542b,_0x427c1a,_0xde338d,_0x5c633e,_0x255449){return _0x35542b(_0x427c1a,_0xde338d,_0x5c633e,_0x255449);},'XjCWP':function(_0x26b2c8,_0x200e70){return _0x26b2c8+_0x200e70;},'lZyyM':function(_0x576d5e,_0x55eba7){return _0x576d5e+_0x55eba7;},'fsfoO':'\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','CpcEB':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','GeQYF':_0x8c724d(0xd3),'flPIx':function(_0x112242,_0x1b53bf,_0x26554b){return _0x112242(_0x1b53bf,_0x26554b);},'sWJFg':_0x8c724d(0xa6),'wUUjd':'saveToCloud','cUhPq':_0x8c724d(0xe7),'cuLkQ':function(_0x51c409,_0x3ae24e,_0x5768ca,_0x50f1b2){return _0x51c409(_0x3ae24e,_0x5768ca,_0x50f1b2);},'WWhhk':function(_0x329c86,_0x4d2763){return _0x329c86+_0x4d2763;},'cicdW':_0x8c724d(0x11e)};let _0x3a69f4;try{_0x3a69f4=await _0x3d1d97[_0x8c724d(0x118)](fetchAuthConfig);}catch(_0x2f450c){return _0x1ad03c?.['trackPhaseEnd'](_0x3d1d97[_0x8c724d(0xf0)],{'reason':'no_auth_config','profileName':_0x3e5b58}),console[_0x8c724d(0x116)](_0x8c724d(0x11a)+(_0x3d1d97[_0x8c724d(0xb0)](_0x2f450c,Error)?_0x2f450c[_0x8c724d(0x110)]:_0x3d1d97[_0x8c724d(0xbb)](String,_0x2f450c))),![];}if(!_0x3a69f4||!_0x3a69f4[_0x8c724d(0xd4)]||Object['keys'](_0x3a69f4[_0x8c724d(0xd4)])[_0x8c724d(0xcf)]===0x0){if(_0x239f15)return await _0x3d1d97[_0x8c724d(0xe5)](captureEnvLessProfile,_0x3e5b58,_0xb181e2,_0x1d620f,_0x1ad03c);return _0x1ad03c?.[_0x8c724d(0xcc)](_0x3d1d97['AQnHe'],{'reason':'no_auth_config','profileName':_0x3e5b58}),console['error'](_0x3d1d97[_0x8c724d(0xb5)](_0x3d1d97['XjCWP'](_0x3d1d97['lZyyM'](_0x3d1d97[_0x8c724d(0xe3)]+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a',_0x8c724d(0xbe)+_0x3e5b58+_0x8c724d(0x108)+_0xb181e2+_0x8c724d(0xf4))+'\x0a',_0x3d1d97[_0x8c724d(0xc7)]),_0x3d1d97['GeQYF'])),![];}const _0x28fe95=_0x3d1d97[_0x8c724d(0xfb)](matchAuthEnvironment,_0xb181e2,_0x3a69f4);if(!_0x28fe95)return _0x1ad03c?.[_0x8c724d(0xcc)](_0x3d1d97[_0x8c724d(0xf0)],{'reason':_0x8c724d(0x126),'profileName':_0x3e5b58}),console[_0x8c724d(0x116)](_0x8c724d(0x114)+_0xb181e2+_0x8c724d(0xdf)+Object['keys'](_0x3a69f4['environments'])[_0x8c724d(0x111)](',\x20')+'.'),![];const _0x1e5685=_0x3a69f4[_0x8c724d(0xd4)][_0x28fe95],_0x242c5c=_0x1e5685?.['domains']??[];if(_0x239f15&&!_0x1d620f['yes']){const {saveToCloud:_0x599281}=await _0x51228d['prompt']([{'type':_0x3d1d97['sWJFg'],'name':_0x3d1d97[_0x8c724d(0xee)],'message':_0x8c724d(0xfd)+_0x28fe95+'\x27\x20matching\x20'+_0xb181e2+'\x0a\x20\x20(domains:\x20'+_0x242c5c[_0x8c724d(0x111)](',\x20')+_0x8c724d(0xda)+_0x3e5b58+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x599281)return _0x1ad03c?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x3d1d97[_0x8c724d(0x11b)],'profileName':_0x3e5b58}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x283388=_0x242c5c['some'](_0x1aba47=>{try{return new URL(_0x1aba47)['origin']===new URL(_0xb181e2)['origin'];}catch{return![];}}),_0x47c191={};!_0x283388&&(_0x47c191[_0x8c724d(0xce)]=_0xb181e2);try{await _0x3d1d97[_0x8c724d(0x119)](createCloudProfile,_0x3e5b58,_0x28fe95,{'settings':_0x47c191}),_0x3d1d97['XjoHk'](warnCloudProfileSharedInOrg);}catch(_0x4a5891){if(_0x4a5891 instanceof ApiError&&_0x4a5891[_0x8c724d(0x103)]===0x199){console[_0x8c724d(0x116)](_0x3d1d97['WWhhk']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3e5b58+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x8c724d(0xcd)+_0x3e5b58));throw _0x4a5891;}throw _0x4a5891;}return console['log'](_0x8c724d(0xc6)+_0x3e5b58+_0x8c724d(0xef)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3e5b58)),await sweepOrphansBestEffort(_0x3e5b58),_0x1ad03c?.['trackPhaseEnd'](_0x3d1d97['cicdW'],{'envKey':_0x28fe95,'profileName':_0x3e5b58}),!![];}async function createUnconfiguredCloudProfile(_0x2434bb,_0x4e7e9a){const _0x233396=_0x3162,_0x2196f={'egDOz':function(_0x5aced7,_0x87c67,_0x4e0654,_0x1ff731){return _0x5aced7(_0x87c67,_0x4e0654,_0x1ff731);},'uKIrZ':function(_0x32ec94){return _0x32ec94();}};try{await _0x2196f['egDOz'](createCloudProfile,_0x2434bb,undefined,{'settings':_0x4e7e9a}),_0x2196f[_0x233396(0xb2)](warnCloudProfileSharedInOrg);}catch(_0x1a69c3){_0x1a69c3 instanceof ApiError&&_0x1a69c3['status']===0x199&&console[_0x233396(0x116)](_0x233396(0xf7)+_0x2434bb+_0x233396(0xf1)+(_0x233396(0xcd)+_0x2434bb));throw _0x1a69c3;}}async function captureEnvLessProfile(_0x5cb28a,_0x285a78,_0x1d546,_0x3ae12b){const _0xd64ee1=_0x3162,_0x3a3d7e={'TnRfA':_0xd64ee1(0xa6),'wpFJP':'profile.add.autoRouteSkipped','ksotx':function(_0x2e3ce2,_0x5483bd){return _0x2e3ce2>_0x5483bd;},'RyEaK':function(_0x387c9f){return _0x387c9f();},'YCtFa':function(_0x8d227a,_0x53931d){return _0x8d227a+_0x53931d;},'KpOkO':function(_0x314de1,_0x2cc61e){return _0x314de1>_0x2cc61e;},'qgSHl':function(_0x2cc8b2,_0x36445e){return _0x2cc8b2(_0x36445e);}};if(!_0x1d546['yes']){const {capture:_0x588f3e}=await _0x51228d[_0xd64ee1(0xc2)]([{'type':_0x3a3d7e['TnRfA'],'name':'capture','message':_0xd64ee1(0x10d),'default':!![]}]);if(!_0x588f3e)return _0x3ae12b?.[_0xd64ee1(0xcc)](_0x3a3d7e['wpFJP'],{'reason':'user_declined','profileName':_0x5cb28a}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x15d7f2={};if(_0x1d546[_0xd64ee1(0xff)])for(const _0x4b9772 of _0x1d546['setupHeader']){const _0x2466c8=_0x4b9772[_0xd64ee1(0xb1)](':');if(_0x2466c8===-0x1)continue;_0x15d7f2[_0x4b9772['slice'](0x0,_0x2466c8)[_0xd64ee1(0xea)]()]=_0x4b9772[_0xd64ee1(0xbd)](_0x2466c8+0x1)[_0xd64ee1(0xea)]();}const _0x30ff4d={'baseUrl':_0x285a78};_0x3a3d7e[_0xd64ee1(0xfc)](Object[_0xd64ee1(0xe6)](_0x15d7f2)[_0xd64ee1(0xcf)],0x0)&&(_0x30ff4d[_0xd64ee1(0x11c)]=_0x15d7f2);let _0x5a0a38;try{_0x5a0a38=await createCloudProfile(_0x5cb28a,undefined,{'settings':_0x30ff4d}),_0x3a3d7e[_0xd64ee1(0x121)](warnCloudProfileSharedInOrg);}catch(_0xafa515){_0xafa515 instanceof ApiError&&_0xafa515['status']===0x199&&console['error'](_0x3a3d7e['YCtFa'](_0xd64ee1(0xf7)+_0x5cb28a+_0xd64ee1(0xf1),_0xd64ee1(0xcd)+_0x5cb28a));throw _0xafa515;}return await manualBrowserLogin(_0x5a0a38,{'key':'','domains':[_0x285a78],'setupHeaders':_0x3a3d7e['KpOkO'](Object[_0xd64ee1(0xe6)](_0x15d7f2)[_0xd64ee1(0xcf)],0x0)?_0x15d7f2:undefined}),console['log'](_0x3a3d7e['YCtFa'](_0xd64ee1(0xf8)+_0x5cb28a+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0xd64ee1(0xca)+_0x5cb28a)),await _0x3a3d7e['qgSHl'](sweepOrphansBestEffort,_0x5cb28a),_0x3ae12b?.[_0xd64ee1(0xcc)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x5cb28a}),!![];}export async function addEnv(_0x193584,_0x525e5c={},_0x1e507c){const _0xfe28a1=_0x3162,_0x1e8aaf={'ffvlY':function(_0x5d014a,_0x4e5c91){return _0x5d014a+_0x4e5c91;},'bdwaV':_0xfe28a1(0xe4),'cjlir':_0xfe28a1(0x101),'lHDKn':function(_0x42c5cd,_0x2c9906){return _0x42c5cd!==_0x2c9906;},'QoHkn':function(_0x4074f6,_0x183af2){return _0x4074f6===_0x183af2;},'BLQHm':_0xfe28a1(0x10e),'ujggq':function(_0x17b491,_0x144c7a){return _0x17b491(_0x144c7a);},'WBZvU':function(_0x40bab2,_0x457278){return _0x40bab2>_0x457278;},'yJHwr':function(_0x525a4e,_0x54121a,_0x10d262){return _0x525a4e(_0x54121a,_0x10d262);},'XGzBI':function(_0x390b73,_0x1d2019,_0x2f15b6,_0x2e9b59,_0x1a864d){return _0x390b73(_0x1d2019,_0x2f15b6,_0x2e9b59,_0x1a864d);},'LxMFI':'isElectron','TjZPU':function(_0x80d460,_0x218fac){return _0x80d460 instanceof _0x218fac;},'ZEWZa':function(_0x19fa68,_0x898c0){return _0x19fa68(_0x898c0);},'qeWxy':function(_0x4f2884,_0x1927af,_0x433cb4){return _0x4f2884(_0x1927af,_0x433cb4);},'JPcwk':function(_0x1684cb,_0x29d9f1){return _0x1684cb+_0x29d9f1;},'LCyfq':function(_0x1914e4,_0x337e66){return _0x1914e4(_0x337e66);},'waDin':'input','qIVQx':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','jZqWp':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','qRbuc':function(_0x5f3033,_0x356393){return _0x5f3033||_0x356393;},'rzUtd':'list','MANGI':_0xfe28a1(0x10a),'SBTpk':'What\x20would\x20you\x20like\x20to\x20do?','WgvUu':_0xfe28a1(0xb3),'PIuKv':'continue','jeSGN':function(_0x22fa5e,_0xfeec42,_0x2a479d,_0x5e279a,_0x50733c,_0x2df8b5){return _0x22fa5e(_0xfeec42,_0x2a479d,_0x5e279a,_0x50733c,_0x2df8b5);}};_0x525e5c['ci']&&(console[_0xfe28a1(0x116)](_0x1e8aaf[_0xfe28a1(0xe0)](_0x1e8aaf['ffvlY'](_0xfe28a1(0x125)+_0x1e8aaf['bdwaV']+'\x0a'+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a',_0xfe28a1(0xaa))+'\x0a',_0xfe28a1(0xc5))+_0x1e8aaf[_0xfe28a1(0xf9)]),process['exit'](0x1));const _0x52332a={};if(_0x525e5c[_0xfe28a1(0xff)])for(const _0x223f19 of _0x525e5c['setupHeader']){const _0x25c64e=_0x223f19[_0xfe28a1(0xb1)](':');if(_0x25c64e===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x223f19+_0xfe28a1(0xd8));const _0x275053=_0x223f19[_0xfe28a1(0xbd)](0x0,_0x25c64e)[_0xfe28a1(0xea)](),_0x1b9701=_0x223f19['slice'](_0x25c64e+0x1)['trim']();_0x52332a[_0x275053]=_0x1b9701;}if(_0x1e8aaf[_0xfe28a1(0xdc)](_0x525e5c[_0xfe28a1(0x104)],undefined)&&_0x1e8aaf['QoHkn'](_0x525e5c[_0xfe28a1(0x104)]['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x525e5c[_0xfe28a1(0x104)]&&_0x525e5c[_0xfe28a1(0xdd)])throw new Error(_0x1e8aaf[_0xfe28a1(0x113)]);const _0x1e1b5b=_0x1e8aaf['ujggq'](Boolean,_0x525e5c[_0xfe28a1(0x104)]),_0x4df715=isInteractive();if(!_0x4df715&&!_0x525e5c[_0xfe28a1(0xdd)]&&!_0x1e1b5b&&!_0x525e5c[_0xfe28a1(0xba)])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(_0x1e1b5b){const _0x59edb1=_0x525e5c['cdpEndpoint'];console[_0xfe28a1(0xd6)](_0xfe28a1(0x11d)),console['log'](_0xfe28a1(0xd5)+_0x59edb1);const _0x25e179={'cdpEndpoint':_0x59edb1,'isElectron':!![]};_0x1e8aaf['WBZvU'](Object[_0xfe28a1(0xe6)](_0x52332a)[_0xfe28a1(0xcf)],0x0)&&(_0x25e179['setupHeaders']=_0x52332a);await _0x1e8aaf['yJHwr'](createUnconfiguredCloudProfile,_0x193584,_0x25e179);try{setProfileOverride(process[_0xfe28a1(0xc9)](),_0x193584,_0xfe28a1(0x104),_0x59edb1),_0x1e8aaf[_0xfe28a1(0xc4)](setProfileOverride,process['cwd'](),_0x193584,_0x1e8aaf[_0xfe28a1(0xb7)],!![]);}catch(_0x515fb1){console[_0xfe28a1(0x116)](_0xfe28a1(0x115)+(_0x1e8aaf['TjZPU'](_0x515fb1,Error)?_0x515fb1['message']:_0x1e8aaf['ZEWZa'](String,_0x515fb1)));}console[_0xfe28a1(0xd6)]('✓\x20Cloud\x20profile\x20\x27'+_0x193584+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x193584),await markActive(_0x193584);return;}if(_0x525e5c[_0xfe28a1(0xba)]){const _0x9233f2={};_0x525e5c['url']&&(_0x9233f2[_0xfe28a1(0xce)]=_0x525e5c[_0xfe28a1(0xdd)]);Object['keys'](_0x52332a)[_0xfe28a1(0xcf)]>0x0&&(_0x9233f2[_0xfe28a1(0x11c)]=_0x52332a);await _0x1e8aaf['qeWxy'](createUnconfiguredCloudProfile,_0x193584,_0x9233f2),console['log'](_0x1e8aaf[_0xfe28a1(0x127)]('✓\x20Profile\x20\x27'+_0x193584+_0xfe28a1(0x10c),_0xfe28a1(0x10b)+_0x193584+_0xfe28a1(0x120))),await _0x1e8aaf[_0xfe28a1(0x102)](sweepOrphansBestEffort,_0x193584),await _0x1e8aaf['LCyfq'](markActive,_0x193584);return;}if(_0x525e5c[_0xfe28a1(0xdd)]){const _0x2eaefa=_0x525e5c[_0xfe28a1(0xdd)],_0x708c85=await checkUrlReachability(_0x2eaefa);if(!_0x708c85['ok']&&!_0x525e5c['force'])throw new Error('Could\x20not\x20reach\x20'+_0x2eaefa+':\x20'+_0x708c85['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x708c85['ok']&&_0x525e5c[_0xfe28a1(0xbf)]&&console[_0xfe28a1(0xd6)]('⚠\x20Could\x20not\x20reach\x20'+_0x2eaefa+':\x20'+_0x708c85['error']+_0xfe28a1(0xc8));}else{console['log'](_0xfe28a1(0xd7)),console[_0xfe28a1(0xd6)](_0xfe28a1(0xfa)),console[_0xfe28a1(0xd6)](_0xfe28a1(0x107));let _0x16f3ad='',_0x34e63b=![];while(!![]){const _0x57aac7=await _0x51228d['prompt']([{'type':_0x1e8aaf[_0xfe28a1(0x122)],'name':'baseUrl','message':_0x34e63b?_0x1e8aaf[_0xfe28a1(0x129)]:_0x1e8aaf[_0xfe28a1(0xeb)],'default':_0x1e8aaf[_0xfe28a1(0x128)](_0x16f3ad,'http://localhost:3000')}]);_0x16f3ad=_0x57aac7[_0xfe28a1(0xce)];const _0x302e0f=await checkUrlReachability(_0x16f3ad);if(_0x302e0f['ok'])break;const _0x12b0c7=/^[a-zA-Z][\w+.-]*:\/\//[_0xfe28a1(0xdb)](_0x16f3ad),_0x1159ed=_0x302e0f[_0xfe28a1(0xd2)]&&!_0x12b0c7,_0x4652ee=_0x1159ed?'http://'+_0x16f3ad:null;_0x34e63b=!![],console['log'](_0xfe28a1(0xed)+_0x16f3ad+':\x20'+_0x302e0f['error']);_0x4652ee&&console['log'](_0xfe28a1(0x109)+_0x4652ee+'?');const {action:_0x316bb4}=await _0x51228d[_0xfe28a1(0xc2)]([{'type':_0x1e8aaf[_0xfe28a1(0xd9)],'name':_0x1e8aaf[_0xfe28a1(0xb8)],'message':_0x1e8aaf[_0xfe28a1(0xc0)],'choices':[..._0x4652ee?[{'name':'Use\x20'+_0x4652ee,'value':_0x1e8aaf['WgvUu']}]:[],{'name':_0xfe28a1(0x106),'value':_0xfe28a1(0x123)},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x316bb4===_0xfe28a1(0xb3)&&_0x4652ee){_0x16f3ad=_0x4652ee;const _0x320cf1=await checkUrlReachability(_0x16f3ad);if(_0x320cf1['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x16f3ad+':\x20'+_0x320cf1['error']);}else{if(_0x1e8aaf['QoHkn'](_0x316bb4,_0x1e8aaf['PIuKv']))break;}}_0x525e5c={..._0x525e5c,'url':_0x16f3ad};}let _0x30c313=![];try{_0x30c313=await _0x1e8aaf['jeSGN'](tryAutoRouteCloudProfile,_0x193584,_0x525e5c['url'],_0x525e5c,_0x4df715,_0x1e507c);}catch(_0x12c778){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x193584+'\x22:\x20'+(_0x1e8aaf[_0xfe28a1(0xde)](_0x12c778,Error)?_0x12c778['message']:String(_0x12c778))),process[_0xfe28a1(0xb6)](0x1);}!_0x30c313&&process[_0xfe28a1(0xb6)](0x1),await _0x1e8aaf['ujggq'](markActive,_0x193584);}
@@ -1 +1 @@
1
- (function(_0xbc2dc1,_0x15ddf5){var _0x3d3130=_0xe6a7,_0x1db64a=_0xbc2dc1();while(!![]){try{var _0x5cf3a0=-parseInt(_0x3d3130(0x15c))/0x1*(-parseInt(_0x3d3130(0x156))/0x2)+-parseInt(_0x3d3130(0x153))/0x3*(parseInt(_0x3d3130(0x150))/0x4)+parseInt(_0x3d3130(0x15a))/0x5*(-parseInt(_0x3d3130(0x152))/0x6)+-parseInt(_0x3d3130(0x157))/0x7+-parseInt(_0x3d3130(0x158))/0x8*(parseInt(_0x3d3130(0x155))/0x9)+parseInt(_0x3d3130(0x154))/0xa+-parseInt(_0x3d3130(0x151))/0xb*(-parseInt(_0x3d3130(0x159))/0xc);if(_0x5cf3a0===_0x15ddf5)break;else _0x1db64a['push'](_0x1db64a['shift']());}catch(_0x44fb62){_0x1db64a['push'](_0x1db64a['shift']());}}}(_0x1435,0xce527));function _0x1435(){var _0x431031=['3172530hoScKG','44442rfOvWy','434ZlQtdU','7137683VFBaIC','424NHmgYG','26484vguYaq','10aOioKZ','error','6619qPGOVx','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','SoWrN','exit','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','ZWnPn','4hJuyXU','6523KmoGLB','1867872GUvBEZ','939675ZNiRsV'];_0x1435=function(){return _0x431031;};return _0x1435();}function _0xe6a7(_0x5a5635,_0x5dc427){_0x5a5635=_0x5a5635-0x150;var _0x1435e0=_0x1435();var _0xe6a762=_0x1435e0[_0x5a5635];return _0xe6a762;}export async function authEncrypt(_0x59e847){var _0x50da0d=_0xe6a7,_0x57a5fa={'SoWrN':function(_0x26d5bc,_0x4feee8){return _0x26d5bc+_0x4feee8;},'djDgT':function(_0x450767,_0x294e73){return _0x450767+_0x294e73;},'kIsLo':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','ZWnPn':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x50da0d(0x15b)](_0x57a5fa['SoWrN'](_0x57a5fa['SoWrN'](_0x57a5fa[_0x50da0d(0x15e)](_0x57a5fa['SoWrN'](_0x57a5fa['djDgT'](_0x50da0d(0x160)+_0x57a5fa['kIsLo'],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x50da0d(0x15d)),'\x0a'),_0x57a5fa[_0x50da0d(0x161)]),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x50da0d(0x15f)](0x1);}
1
+ function _0x58b2(){var _0x559bf9=['1139244YbBmGn','299632KSisti','exit','vEZXR','8816928DoDAip','vHFmG','2590245ozzXFP','245ibvsvw','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','758758fYfrpg','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','1210464PpErMm','31016nCxiMu'];_0x58b2=function(){return _0x559bf9;};return _0x58b2();}function _0xfa5c(_0x295d4a,_0x1e0a5c){_0x295d4a=_0x295d4a-0x121;var _0x58b2c7=_0x58b2();var _0xfa5c67=_0x58b2c7[_0x295d4a];return _0xfa5c67;}(function(_0xf85caa,_0x8703c2){var _0x3284eb=_0xfa5c,_0x1e9e66=_0xf85caa();while(!![]){try{var _0x3b59c9=parseInt(_0x3284eb(0x12a))/0x1+parseInt(_0x3284eb(0x122))/0x2+parseInt(_0x3284eb(0x121))/0x3+parseInt(_0x3284eb(0x12d))/0x4*(parseInt(_0x3284eb(0x128))/0x5)+parseInt(_0x3284eb(0x12c))/0x6+-parseInt(_0x3284eb(0x127))/0x7+-parseInt(_0x3284eb(0x125))/0x8;if(_0x3b59c9===_0x8703c2)break;else _0x1e9e66['push'](_0x1e9e66['shift']());}catch(_0x1f730e){_0x1e9e66['push'](_0x1e9e66['shift']());}}}(_0x58b2,0x61225));export async function authEncrypt(_0xa7aba0){var _0xa646a=_0xfa5c,_0x4db1cd={'QuFEH':function(_0x126984,_0x3c9535){return _0x126984+_0x3c9535;},'NGtLG':function(_0x25df3b,_0x32d5a7){return _0x25df3b+_0x32d5a7;},'vHFmG':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','vEZXR':_0xa646a(0x12b)};console['error'](_0x4db1cd['QuFEH'](_0x4db1cd['QuFEH'](_0x4db1cd['NGtLG'](_0xa646a(0x129),_0x4db1cd[_0xa646a(0x126)])+'\x0a'+_0x4db1cd[_0xa646a(0x124)],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0xa646a(0x123)](0x1);}
@@ -1 +1 @@
1
- const _0x5f4a5c=_0x3fe2;(function(_0x3b5dc3,_0xf549dc){const _0x564bdf=_0x3fe2,_0x5801fd=_0x3b5dc3();while(!![]){try{const _0x33f67f=-parseInt(_0x564bdf(0xa8))/0x1+-parseInt(_0x564bdf(0x9c))/0x2+-parseInt(_0x564bdf(0x80))/0x3*(-parseInt(_0x564bdf(0x86))/0x4)+parseInt(_0x564bdf(0x87))/0x5*(parseInt(_0x564bdf(0xa6))/0x6)+parseInt(_0x564bdf(0x79))/0x7+parseInt(_0x564bdf(0x94))/0x8+parseInt(_0x564bdf(0xa3))/0x9;if(_0x33f67f===_0xf549dc)break;else _0x5801fd['push'](_0x5801fd['shift']());}catch(_0x2cb291){_0x5801fd['push'](_0x5801fd['shift']());}}}(_0x47fb,0xcdd43));function _0x47fb(){const _0x219280=['remove','log','144968TwTVYV','5wnZzqp','tnjqE','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','Ittze','cKdRu','fHyrf','replace','Nothing\x20to\x20clean\x20up.\x0a','\x0a✅\x20Cleanup\x20complete!\x0a','claude','utf-8','yjieG','xntma','1433536yhZZaO','ranger','VphPQ','marketplace','UGfZT','✓\x20Removed\x20trailhead\x20marketplace','platform','close','439978ytoQxj','seaIq','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','IMyxJ','win32','plugin','raMjz','2298384hzvszb','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','string','2960418PnYTJV','LppxE','600785DnSHqG','push','HkbqQ','error','length','ASQnU','user','project','byOGg','idfEt','330960nrlYEZ','leoUe','xxPYy','BPNZp','filter','ignore','JCLLa','57pMBdfQ','OlJzA','✓\x20Removed\x20project\x20skill:\x20','parse'];_0x47fb=function(){return _0x219280;};return _0x47fb();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x3fe2(_0x59c341,_0x1e623e){_0x59c341=_0x59c341-0x72;const _0x47fb53=_0x47fb();let _0x3fe251=_0x47fb53[_0x59c341];return _0x3fe251;}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=[_0x5f4a5c(0x95),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3f9e6d){const _0x1c3e38=_0x5f4a5c,_0x536597=_0x3f9e6d[_0x1c3e38(0x8d)](/\/\*[\s\S]*?\*\//g,''),_0x4b88c0=_0x536597['replace'](/^\s*\/\/.*$/gm,''),_0x2128b4=_0x4b88c0[_0x1c3e38(0x8d)](/,\s*([}\]])/g,'$1');return JSON[_0x1c3e38(0x83)](_0x2128b4);}async function removeOpencodePluginConfig(_0x3bad2d){const _0x153359=_0x5f4a5c,_0x5b9896={'vkaDA':function(_0x541521,_0x45201c){return _0x541521!==_0x45201c;},'GSzAE':function(_0x23050c,_0x5d087c){return _0x23050c!==_0x5d087c;},'DxLEC':function(_0x5b834a,_0x3380b9){return _0x5b834a(_0x3380b9);},'Ittze':function(_0x2b4e40,_0x19ae4a,_0x26331c){return _0x2b4e40(_0x19ae4a,_0x26331c);},'TavtX':function(_0x175112,_0x4c1388){return _0x175112===_0x4c1388;},'JCLLa':function(_0x556fc1,_0x4beec3){return _0x556fc1===_0x4beec3;}};if(!_0x5b9896['DxLEC'](existsSync,_0x3bad2d))return![];let _0x3b9ab9;try{const _0x451140=await _0x5b9896['Ittze'](readFile,_0x3bad2d,_0x153359(0x91));_0x3b9ab9=parseJsonc(_0x451140);}catch{return![];}const _0x26d3ff=Array['isArray'](_0x3b9ab9[_0x153359(0xa1)])?_0x3b9ab9['plugin']:[];if(_0x5b9896['TavtX'](_0x26d3ff[_0x153359(0x73)],0x0))return![];const _0x2e9498=_0x26d3ff[_0x153359(0x7d)](_0x57800f=>{const _0x417bf2=_0x153359;if(_0x5b9896['vkaDA'](typeof _0x57800f,_0x417bf2(0xa5)))return!![];return _0x5b9896['GSzAE'](_0x57800f,opencodePluginName);});if(_0x5b9896[_0x153359(0x7f)](_0x2e9498[_0x153359(0x73)],_0x26d3ff[_0x153359(0x73)]))return![];return _0x5b9896['TavtX'](_0x2e9498['length'],0x0)?delete _0x3b9ab9['plugin']:_0x3b9ab9[_0x153359(0xa1)]=_0x2e9498,await _0x5b9896[_0x153359(0x8a)](writeFile,_0x3bad2d,JSON['stringify'](_0x3b9ab9,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5998bc){const _0x53dab4=_0x5f4a5c,_0x52729a={'zYTEc':function(_0x4ceaa4,_0x5e12bf){return _0x4ceaa4(_0x5e12bf);},'IMyxJ':function(_0x5a4e64,_0x56b8ac){return _0x5a4e64(_0x56b8ac);},'OlJzA':_0x53dab4(0xa1),'smhyu':'ranger@trailhead','UGfZT':'--scope','seaIq':_0x53dab4(0x90),'VphPQ':_0x53dab4(0x7e)};return new Promise(_0x496170=>{const _0x49c405=_0x53dab4,_0x58393c={'raMjz':function(_0x246391,_0xdac900){const _0x15495e=_0x3fe2;return _0x52729a[_0x15495e(0x9f)](_0x246391,_0xdac900);}},_0x2e4bce=[_0x52729a[_0x49c405(0x81)],'uninstall',_0x52729a['smhyu']];_0x5998bc&&_0x2e4bce[_0x49c405(0xa9)](_0x52729a[_0x49c405(0x98)],_0x5998bc);const _0x27f61e=spawn(_0x52729a[_0x49c405(0x9d)],_0x2e4bce,{'stdio':[_0x52729a[_0x49c405(0x96)],_0x52729a[_0x49c405(0x96)],_0x52729a['VphPQ']],'cwd':_0x5998bc?getProjectRoot():undefined,'shell':process[_0x49c405(0x9a)]==='win32'});_0x27f61e['on'](_0x49c405(0x9b),_0x3c6ffd=>{_0x52729a['zYTEc'](_0x496170,_0x3c6ffd===0x0);}),_0x27f61e['on'](_0x49c405(0x72),()=>{const _0x33f88b=_0x49c405;_0x58393c[_0x33f88b(0xa2)](_0x496170,![]);});});}async function removeMarketplace(){const _0x5d984b=_0x5f4a5c,_0x18a00f={'BPNZp':function(_0x3de65c,_0xcfdbfe){return _0x3de65c(_0xcfdbfe);},'SzRzw':function(_0x14137e,_0x1d3284,_0x169abc,_0x178bdc){return _0x14137e(_0x1d3284,_0x169abc,_0x178bdc);},'nXITD':'plugin','BiJMD':_0x5d984b(0x97),'VHHsD':_0x5d984b(0x7e),'TwbSj':function(_0x3142ea,_0xa7acb8){return _0x3142ea===_0xa7acb8;},'yjieG':_0x5d984b(0xa0),'leoUe':_0x5d984b(0x9b),'MTqoB':'error'};return new Promise(_0x46af62=>{const _0xf5fff6=_0x5d984b,_0xe1fc4c={'xntma':function(_0x5a7893,_0x4b02c7){return _0x5a7893===_0x4b02c7;}},_0x3ea2cf=_0x18a00f['SzRzw'](spawn,'claude',[_0x18a00f['nXITD'],_0x18a00f['BiJMD'],_0xf5fff6(0x84),'trailhead'],{'stdio':[_0xf5fff6(0x7e),_0x18a00f['VHHsD'],'ignore'],'shell':_0x18a00f['TwbSj'](process[_0xf5fff6(0x9a)],_0x18a00f[_0xf5fff6(0x92)])});_0x3ea2cf['on'](_0x18a00f[_0xf5fff6(0x7a)],_0x34dd54=>{const _0x2e4de5=_0xf5fff6;_0x46af62(_0xe1fc4c[_0x2e4de5(0x93)](_0x34dd54,0x0));}),_0x3ea2cf['on'](_0x18a00f['MTqoB'],()=>{const _0x29b74f=_0xf5fff6;_0x18a00f[_0x29b74f(0x7c)](_0x46af62,![]);});});}export async function clean(){const _0x87f781=_0x5f4a5c,_0x485202={'pjUWk':'✓\x20Removed\x20stored\x20credentials','HkbqQ':function(_0x205c51,_0x3c64d2){return _0x205c51(_0x3c64d2);},'ASQnU':function(_0x33f5a8){return _0x33f5a8();},'xxPYy':function(_0x52492a,_0x18c5ad,_0x29eb49){return _0x52492a(_0x18c5ad,_0x29eb49);},'cKdRu':function(_0x5a3e55,_0x5a7f7f){return _0x5a3e55(_0x5a7f7f);},'byOGg':_0x87f781(0x75),'idfEt':function(_0x224fa9,_0x5eeaaf,_0x56fc48){return _0x224fa9(_0x5eeaaf,_0x56fc48);},'LppxE':function(_0x3b7d36,_0x12bd4c){return _0x3b7d36(_0x12bd4c);},'fHyrf':function(_0x13905a,_0x3a03cf,_0x3a2251){return _0x13905a(_0x3a03cf,_0x3a2251);},'EHveN':function(_0x2d2565,_0xa7b11f){return _0x2d2565(_0xa7b11f);},'tnjqE':function(_0x245ee1,_0x1f4f27,_0x59371a){return _0x245ee1(_0x1f4f27,_0x59371a);},'UoJhP':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','XKxcK':_0x87f781(0x8f),'hWTxn':_0x87f781(0x8e)};console[_0x87f781(0x85)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x14264e=![];try{await deleteAllCredentials(),console[_0x87f781(0x85)](_0x485202['pjUWk']),_0x14264e=!![];}catch{}const _0x349460=getCacheFile();existsSync(_0x349460)&&(await _0x485202[_0x87f781(0xaa)](rm,_0x349460),_0x14264e=!![]);const _0x5e0652=_0x485202[_0x87f781(0x74)](getRangerDir);existsSync(_0x5e0652)&&(await _0x485202[_0x87f781(0x7b)](rm,_0x5e0652,{'recursive':!![]}),console[_0x87f781(0x85)]('✓\x20Removed\x20.ranger/\x20directory'),_0x14264e=!![]);const _0x4d7e74=_0x485202[_0x87f781(0x74)](getProjectSkillsDir);for(const _0x2047c1 of skillsToRemove){const _0xa12537=join(_0x4d7e74,_0x2047c1);existsSync(_0xa12537)&&(await rm(_0xa12537,{'recursive':!![]}),console[_0x87f781(0x85)](_0x87f781(0x82)+_0x2047c1),_0x14264e=!![]);}const _0x16d159=getUserSkillsDir();for(const _0x332db6 of skillsToRemove){const _0x3b04d2=join(_0x16d159,_0x332db6);_0x485202[_0x87f781(0xaa)](existsSync,_0x3b04d2)&&(await rm(_0x3b04d2,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x332db6),_0x14264e=!![]);}const _0xf690f0=_0x485202[_0x87f781(0x8b)](getOpencodeSkillsDir,_0x87f781(0x76));for(const _0x38cf94 of skillsToRemove){const _0x241255=join(_0xf690f0,_0x38cf94);existsSync(_0x241255)&&(await rm(_0x241255,{'recursive':!![]}),console[_0x87f781(0x85)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x38cf94),_0x14264e=!![]);}const _0x3485c7=_0x485202[_0x87f781(0xaa)](getOpencodeSkillsDir,_0x485202[_0x87f781(0x77)]);for(const _0x6df59e of skillsToRemove){const _0x40f997=_0x485202[_0x87f781(0x78)](join,_0x3485c7,_0x6df59e);_0x485202[_0x87f781(0xa7)](existsSync,_0x40f997)&&(await _0x485202[_0x87f781(0x8c)](rm,_0x40f997,{'recursive':!![]}),console[_0x87f781(0x85)](_0x87f781(0x9e)+_0x6df59e),_0x14264e=!![]);}const _0x499d82=join(_0x485202['EHveN'](getOpencodeConfigDir,_0x87f781(0x76)),'opencode.json');await removeOpencodePluginConfig(_0x499d82)&&(console[_0x87f781(0x85)](_0x87f781(0xa4)),_0x14264e=!![]);const _0x4dbd2c=_0x485202[_0x87f781(0x88)](join,getOpencodeConfigDir(_0x87f781(0x75)),'opencode.json');await removeOpencodePluginConfig(_0x4dbd2c)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x14264e=!![]);const _0x19084a=await _0x485202[_0x87f781(0x74)](uninstallClaudePlugin);_0x19084a&&(console['log'](_0x87f781(0x89)),_0x14264e=!![]);const _0x3f57e3=await _0x485202['cKdRu'](uninstallClaudePlugin,_0x87f781(0x76));_0x3f57e3&&(console['log'](_0x485202['UoJhP']),_0x14264e=!![]);const _0x1168ee=await _0x485202[_0x87f781(0x74)](removeMarketplace);_0x1168ee&&(console['log'](_0x87f781(0x99)),_0x14264e=!![]),_0x14264e?console[_0x87f781(0x85)](_0x485202['XKxcK']):console['log'](_0x485202['hWTxn']);}
1
+ const _0x1f35e0=_0x2be5;(function(_0x337051,_0x411f23){const _0x535a53=_0x2be5,_0x56275b=_0x337051();while(!![]){try{const _0x5032ce=-parseInt(_0x535a53(0xec))/0x1*(parseInt(_0x535a53(0xf6))/0x2)+-parseInt(_0x535a53(0x11a))/0x3*(parseInt(_0x535a53(0x103))/0x4)+-parseInt(_0x535a53(0xee))/0x5+-parseInt(_0x535a53(0x10a))/0x6+-parseInt(_0x535a53(0xeb))/0x7+-parseInt(_0x535a53(0xed))/0x8*(parseInt(_0x535a53(0xf9))/0x9)+parseInt(_0x535a53(0x107))/0xa;if(_0x5032ce===_0x411f23)break;else _0x56275b['push'](_0x56275b['shift']());}catch(_0x2349e4){_0x56275b['push'](_0x56275b['shift']());}}}(_0x7c38,0xd60dd));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';function _0x2be5(_0x3dc62a,_0x428cf4){_0x3dc62a=_0x3dc62a-0xe5;const _0x7c38a5=_0x7c38();let _0x2be572=_0x7c38a5[_0x3dc62a];return _0x2be572;}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=[_0x1f35e0(0x101),_0x1f35e0(0x10e),'bug-bash',_0x1f35e0(0x11c)],opencodePluginName=_0x1f35e0(0x113);function _0x7c38(){const _0x3fceca=['e2e-test-recommender','MGHGz','eRLzv','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','RewJV','QEGbY','beePo','PyyCz','log','KOrBE','uninstall','6406120tqvRJa','173lOvHhG','32ywSjBL','5190105AvCiZy','win32','WXCRk','hOebZ','✓\x20Removed\x20.ranger/\x20directory','ignore','claude','ylUqW','13694JvudVM','hjfGX','xCWnn','454437WlGxAl','length','plugin','HENeL','NFQDJ','IFNvm','parse','FVgmb','ranger','ldLHu','4fxhWiL','marketplace','project','platform','68631000JTyfYT','yFyGW','stringify','9435252rpmEAH','remove','iVVLW','utf-8','feature-tracker','opencode.json','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','--scope','error','@ranger-testing/opencode-plugin','replace','IhNpB','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','✓\x20Removed\x20stored\x20credentials','dcIJV','WVbXP','3222327jcwxTi','LwbCo'];_0x7c38=function(){return _0x3fceca;};return _0x7c38();}function parseJsonc(_0x441750){const _0x4a34e4=_0x1f35e0,_0x518c88=_0x441750[_0x4a34e4(0x114)](/\/\*[\s\S]*?\*\//g,''),_0x3fdab0=_0x518c88[_0x4a34e4(0x114)](/^\s*\/\/.*$/gm,''),_0x27873b=_0x3fdab0[_0x4a34e4(0x114)](/,\s*([}\]])/g,'$1');return JSON[_0x4a34e4(0xff)](_0x27873b);}async function removeOpencodePluginConfig(_0x5cb7aa){const _0x30f157=_0x1f35e0,_0x59bd50={'beePo':function(_0x1d2de4,_0x742b97){return _0x1d2de4(_0x742b97);},'rrwQV':function(_0x23bc7c,_0x26649b,_0x44035d){return _0x23bc7c(_0x26649b,_0x44035d);},'MGHGz':_0x30f157(0x10d),'LwbCo':function(_0x36fc45,_0x1269dc){return _0x36fc45===_0x1269dc;},'NFQDJ':function(_0x1a0d5c,_0x78eaf3,_0x417899){return _0x1a0d5c(_0x78eaf3,_0x417899);},'iVVLW':function(_0x4db6f0,_0x549b42){return _0x4db6f0+_0x549b42;}};if(!_0x59bd50[_0x30f157(0xe6)](existsSync,_0x5cb7aa))return![];let _0x233424;try{const _0x54cac7=await _0x59bd50['rrwQV'](readFile,_0x5cb7aa,_0x59bd50[_0x30f157(0x11d)]);_0x233424=parseJsonc(_0x54cac7);}catch{return![];}const _0x37fb7c=Array['isArray'](_0x233424[_0x30f157(0xfb)])?_0x233424['plugin']:[];if(_0x59bd50['LwbCo'](_0x37fb7c[_0x30f157(0xfa)],0x0))return![];const _0x46a15f=_0x37fb7c['filter'](_0x2a560d=>{if(typeof _0x2a560d!=='string')return!![];return _0x2a560d!==opencodePluginName;});if(_0x59bd50[_0x30f157(0x11b)](_0x46a15f['length'],_0x37fb7c[_0x30f157(0xfa)]))return![];return _0x46a15f[_0x30f157(0xfa)]===0x0?delete _0x233424['plugin']:_0x233424[_0x30f157(0xfb)]=_0x46a15f,await _0x59bd50[_0x30f157(0xfd)](writeFile,_0x5cb7aa,_0x59bd50[_0x30f157(0x10c)](JSON[_0x30f157(0x109)](_0x233424,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x481db7){const _0x657b5f=_0x1f35e0,_0x1e917c={'RewJV':function(_0x22f54f,_0xcbf613){return _0x22f54f===_0xcbf613;},'KOrBE':'plugin','IhNpB':_0x657b5f(0xea),'gQwzv':'claude','MNPpu':_0x657b5f(0xef)};return new Promise(_0x4ab3b0=>{const _0x4afb17=_0x657b5f,_0x3a0e6a=[_0x1e917c[_0x4afb17(0xe9)],_0x1e917c[_0x4afb17(0x115)],'ranger@trailhead'];_0x481db7&&_0x3a0e6a['push'](_0x4afb17(0x111),_0x481db7);const _0x4c5d8e=spawn(_0x1e917c['gQwzv'],_0x3a0e6a,{'stdio':['ignore',_0x4afb17(0xf3),'ignore'],'cwd':_0x481db7?getProjectRoot():undefined,'shell':process[_0x4afb17(0x106)]===_0x1e917c['MNPpu']});_0x4c5d8e['on']('close',_0x13c864=>{const _0x2ac58d=_0x4afb17;_0x4ab3b0(_0x1e917c[_0x2ac58d(0x120)](_0x13c864,0x0));}),_0x4c5d8e['on']('error',()=>{_0x4ab3b0(![]);});});}async function removeMarketplace(){const _0x22d4f4=_0x1f35e0,_0x5ab1aa={'WVbXP':function(_0x365218,_0x4aa292){return _0x365218(_0x4aa292);},'cAPka':function(_0x182efa,_0x2717d7,_0x4e1c7c,_0xdca82){return _0x182efa(_0x2717d7,_0x4e1c7c,_0xdca82);},'gpHtI':_0x22d4f4(0xf4),'IFNvm':'plugin','hbblG':'trailhead','Wamxm':'ignore','QEGbY':_0x22d4f4(0xef),'CeVEw':'close'};return new Promise(_0x5ebb54=>{const _0x2120e0=_0x22d4f4,_0x154d70={'dcIJV':function(_0x166322,_0x387d2e){return _0x166322===_0x387d2e;}},_0x3441e0=_0x5ab1aa['cAPka'](spawn,_0x5ab1aa['gpHtI'],[_0x5ab1aa[_0x2120e0(0xfe)],_0x2120e0(0x104),_0x2120e0(0x10b),_0x5ab1aa['hbblG']],{'stdio':['ignore',_0x2120e0(0xf3),_0x5ab1aa['Wamxm']],'shell':process[_0x2120e0(0x106)]===_0x5ab1aa[_0x2120e0(0xe5)]});_0x3441e0['on'](_0x5ab1aa['CeVEw'],_0x5847d8=>{const _0x5603f8=_0x2120e0;_0x5ebb54(_0x154d70[_0x5603f8(0x118)](_0x5847d8,0x0));}),_0x3441e0['on'](_0x2120e0(0x112),()=>{const _0x1d436d=_0x2120e0;_0x5ab1aa[_0x1d436d(0x119)](_0x5ebb54,![]);});});}export async function clean(){const _0x3b0379=_0x1f35e0,_0x47de7d={'eRLzv':_0x3b0379(0x116),'yFyGW':function(_0x15f63a){return _0x15f63a();},'fwDaL':_0x3b0379(0x117),'PyyCz':function(_0x99aacc,_0x2fee1b){return _0x99aacc(_0x2fee1b);},'ylUqW':function(_0x3c262e,_0x2c77e5,_0x58dc42){return _0x3c262e(_0x2c77e5,_0x58dc42);},'hOebZ':function(_0x28d3ff){return _0x28d3ff();},'FVgmb':function(_0x159f61,_0x266cff){return _0x159f61(_0x266cff);},'WXCRk':'user','dQyuf':function(_0x1e5751,_0x29f6aa,_0x3b9dd6){return _0x1e5751(_0x29f6aa,_0x3b9dd6);},'PUhFT':function(_0x2e55b4,_0xaf615e,_0x32aade){return _0x2e55b4(_0xaf615e,_0x32aade);},'HENeL':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','xCWnn':function(_0x3040d8,_0x4e25c8){return _0x3040d8(_0x4e25c8);},'ldLHu':_0x3b0379(0x10f),'hjfGX':_0x3b0379(0x105)};console['log'](_0x47de7d[_0x3b0379(0x11e)]);let _0x343c0e=![];try{await _0x47de7d[_0x3b0379(0x108)](deleteAllCredentials),console['log'](_0x47de7d['fwDaL']),_0x343c0e=!![];}catch{}const _0x1e9077=getCacheFile();existsSync(_0x1e9077)&&(await rm(_0x1e9077),_0x343c0e=!![]);const _0x14c939=_0x47de7d[_0x3b0379(0x108)](getRangerDir);_0x47de7d['PyyCz'](existsSync,_0x14c939)&&(await _0x47de7d[_0x3b0379(0xf5)](rm,_0x14c939,{'recursive':!![]}),console[_0x3b0379(0xe8)](_0x3b0379(0xf2)),_0x343c0e=!![]);const _0x2cc501=getProjectSkillsDir();for(const _0x2e7dfb of skillsToRemove){const _0x9178f5=_0x47de7d['ylUqW'](join,_0x2cc501,_0x2e7dfb);existsSync(_0x9178f5)&&(await _0x47de7d['ylUqW'](rm,_0x9178f5,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x2e7dfb),_0x343c0e=!![]);}const _0x386c48=_0x47de7d['hOebZ'](getUserSkillsDir);for(const _0x5a8bfa of skillsToRemove){const _0x364e8e=join(_0x386c48,_0x5a8bfa);existsSync(_0x364e8e)&&(await _0x47de7d[_0x3b0379(0xf5)](rm,_0x364e8e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5a8bfa),_0x343c0e=!![]);}const _0x28e308=_0x47de7d['FVgmb'](getOpencodeSkillsDir,'project');for(const _0x28c151 of skillsToRemove){const _0x44a25b=_0x47de7d['ylUqW'](join,_0x28e308,_0x28c151);_0x47de7d[_0x3b0379(0x100)](existsSync,_0x44a25b)&&(await rm(_0x44a25b,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x28c151),_0x343c0e=!![]);}const _0x2c467=getOpencodeSkillsDir(_0x47de7d[_0x3b0379(0xf0)]);for(const _0x9c827c of skillsToRemove){const _0x2a40ce=_0x47de7d['dQyuf'](join,_0x2c467,_0x9c827c);_0x47de7d[_0x3b0379(0xe7)](existsSync,_0x2a40ce)&&(await _0x47de7d['PUhFT'](rm,_0x2a40ce,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x9c827c),_0x343c0e=!![]);}const _0x3d8e03=join(_0x47de7d['FVgmb'](getOpencodeConfigDir,_0x3b0379(0x105)),_0x3b0379(0x10f));await removeOpencodePluginConfig(_0x3d8e03)&&(console[_0x3b0379(0xe8)](_0x47de7d[_0x3b0379(0xfc)]),_0x343c0e=!![]);const _0x1b34f3=join(_0x47de7d[_0x3b0379(0xf8)](getOpencodeConfigDir,_0x47de7d['WXCRk']),_0x47de7d[_0x3b0379(0x102)]);await _0x47de7d[_0x3b0379(0xe7)](removeOpencodePluginConfig,_0x1b34f3)&&(console[_0x3b0379(0xe8)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x343c0e=!![]);const _0x132326=await uninstallClaudePlugin();_0x132326&&(console[_0x3b0379(0xe8)](_0x3b0379(0x110)),_0x343c0e=!![]);const _0x1ae5e6=await _0x47de7d['FVgmb'](uninstallClaudePlugin,_0x47de7d[_0x3b0379(0xf7)]);_0x1ae5e6&&(console[_0x3b0379(0xe8)](_0x3b0379(0x11f)),_0x343c0e=!![]);const _0x4760be=await _0x47de7d[_0x3b0379(0xf1)](removeMarketplace);_0x4760be&&(console['log']('✓\x20Removed\x20trailhead\x20marketplace'),_0x343c0e=!![]),_0x343c0e?console[_0x3b0379(0xe8)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0x3b0379(0xe8)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- const _0x2ec00a=_0x45c0;(function(_0x19ddc8,_0x43ae07){const _0xb58b02=_0x45c0,_0x4def5b=_0x19ddc8();while(!![]){try{const _0x316599=parseInt(_0xb58b02(0x191))/0x1*(parseInt(_0xb58b02(0x1a8))/0x2)+parseInt(_0xb58b02(0x186))/0x3*(-parseInt(_0xb58b02(0x19b))/0x4)+-parseInt(_0xb58b02(0x196))/0x5*(parseInt(_0xb58b02(0x1a5))/0x6)+parseInt(_0xb58b02(0x189))/0x7*(-parseInt(_0xb58b02(0x1a0))/0x8)+-parseInt(_0xb58b02(0x1a9))/0x9*(-parseInt(_0xb58b02(0x195))/0xa)+parseInt(_0xb58b02(0x1b2))/0xb+-parseInt(_0xb58b02(0x18c))/0xc*(parseInt(_0xb58b02(0x187))/0xd);if(_0x316599===_0x43ae07)break;else _0x4def5b['push'](_0x4def5b['shift']());}catch(_0x3b9fd5){_0x4def5b['push'](_0x4def5b['shift']());}}}(_0x1543,0x85028));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x2ec00a(0x1a4)];function parseLocalValue(_0x38ed85,_0x4e10c5){const _0x5561c0=_0x2ec00a;if(BOOLEAN_KEYS[_0x5561c0(0x198)](_0x38ed85)){if(_0x4e10c5===_0x5561c0(0x1af))return!![];if(_0x4e10c5===_0x5561c0(0x18d))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x38ed85+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4e10c5;}function parseOverrideValue(_0x4357b5){const _0x3d170c=_0x2ec00a,_0x208e92={'dVGDz':_0x3d170c(0x18d),'KCJHR':function(_0x567944,_0x4390a7){return _0x567944===_0x4390a7;},'KwBGX':function(_0xcda5b8,_0x5f27bb){return _0xcda5b8(_0x5f27bb);}};if(_0x4357b5===_0x3d170c(0x1af))return!![];if(_0x4357b5===_0x208e92['dVGDz'])return![];if(_0x4357b5==='null')return null;if(_0x208e92[_0x3d170c(0x19e)](_0x4357b5,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x4357b5)){const _0x15246a=_0x208e92[_0x3d170c(0x192)](Number,_0x4357b5);if(Number[_0x3d170c(0x1b8)](_0x15246a))return _0x15246a;}if(/^-?\d+\.\d+$/['test'](_0x4357b5)){const _0x29a634=Number(_0x4357b5);if(!Number[_0x3d170c(0x1a7)](_0x29a634))return _0x29a634;}const _0x324eee=_0x4357b5[_0x3d170c(0x197)]();if(_0x324eee[_0x3d170c(0x194)]('{')&&_0x324eee['endsWith']('}')||_0x324eee[_0x3d170c(0x194)]('[')&&_0x324eee['endsWith'](']'))try{return JSON['parse'](_0x324eee);}catch{}return _0x4357b5;}async function resolveProfileTarget(_0x5dbf73){const _0x1e33bd=_0x2ec00a,_0x5dbac1={'ViJJg':function(_0x11d37b,_0x53876d){return _0x11d37b(_0x53876d);},'iRkgP':_0x1e33bd(0x193)},_0x23adfd=existsSync(getEnvDir(_0x5dbf73));let _0x3e7dfc=![];try{const _0x5b0e2b=await fetchCloudProfile(_0x5dbf73);_0x3e7dfc=_0x5dbac1['ViJJg'](Boolean,_0x5b0e2b);}catch{}if(_0x3e7dfc)return{'kind':'cloud','alsoExistsElsewhere':_0x23adfd};if(_0x23adfd)return{'kind':_0x5dbac1[_0x1e33bd(0x1ae)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5dbf73+_0x1e33bd(0x1aa)+_0x5dbf73);}function printDualExistsHint(_0x2be948){console['log']('\x20\x20Note:\x20\x22'+_0x2be948+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x4bd0fe=_0x2ec00a;return process[_0x4bd0fe(0x1b0)]();}function _0x45c0(_0x38e165,_0x37f94d){_0x38e165=_0x38e165-0x185;const _0x154391=_0x1543();let _0x45c03b=_0x154391[_0x38e165];return _0x45c03b;}async function loadEffectiveCloudSettings(_0x4d002b){const _0x4b8bdf=_0x2ec00a,_0x3ca187={'HkLND':function(_0x4399bd){return _0x4399bd();},'jPcON':function(_0x3392d2,_0x430542,_0xe8f7d4){return _0x3392d2(_0x430542,_0xe8f7d4);},'lkPuI':function(_0x19823d,_0x165983){return _0x19823d??_0x165983;}},_0x4b7258=await fetchCloudProfile(_0x4d002b),_0x7c66db=readProfileOverrides(_0x3ca187['HkLND'](getProjectPath),_0x4d002b);return _0x3ca187[_0x4b8bdf(0x1b4)](mergeCloudProfileSettings,_0x4b7258?.[_0x4b8bdf(0x18b)]??{},_0x3ca187['lkPuI'](_0x7c66db,undefined));}export async function configSet(_0xfcbfb6,_0x5c0610,_0x48ac66){const _0x507df0=_0x2ec00a,_0x40bcec={'nfEvE':function(_0x303c85,_0x5b241f){return _0x303c85===_0x5b241f;},'YQFKF':function(_0x2722c2,_0x574e43){return _0x2722c2(_0x574e43);},'EQztv':function(_0x2ad7c3,_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4){return _0x2ad7c3(_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4);},'GdKgI':function(_0x26b548,_0x2ca558,_0x877d7a){return _0x26b548(_0x2ca558,_0x877d7a);}},_0x22fc89=await resolveProfileTarget(_0xfcbfb6);if(_0x40bcec['nfEvE'](_0x22fc89['kind'],_0x507df0(0x1ac))){if(_0x22fc89['alsoExistsElsewhere'])_0x40bcec[_0x507df0(0x1ab)](printDualExistsHint,_0xfcbfb6);const _0x4dd201=_0x40bcec[_0x507df0(0x1ab)](parseOverrideValue,_0x48ac66);_0x40bcec['EQztv'](setProfileOverride,getProjectPath(),_0xfcbfb6,_0x5c0610,_0x4dd201),console[_0x507df0(0x199)](_0x507df0(0x1b6)+_0x5c0610+'\x20=\x20'+JSON[_0x507df0(0x185)](_0x4dd201)+_0x507df0(0x1a6)+_0xfcbfb6+'\x22');return;}const _0xfbe70e=_0x40bcec[_0x507df0(0x1b3)](parseLocalValue,_0x5c0610,_0x48ac66);setProfileOverride(getProjectPath(),_0xfcbfb6,_0x5c0610,_0xfbe70e),console['log']('Set\x20'+_0x5c0610+'\x20=\x20'+_0xfbe70e+'\x20for\x20\x22'+_0xfcbfb6+'\x22');}function _0x1543(){const _0x46e06c=['YQFKF','cloud','(not\x20set)','iRkgP','true','cwd','\x22\x20not\x20found','11044473BvCYmK','GdKgI','jPcON','No\x20configuration\x20set\x20for\x20\x22','Set\x20','eFmdx','isSafeInteger','stringify','238065KpDCpw','13UpNLcF','KJLXw','7637RfThKK','HwPHV','settings','1244028vPCDKc','false','Key\x20\x22','Removed\x20','kind','3jbwgJn','KwBGX','local','startsWith','10kFBVwc','93820HrAzhK','trim','includes','log','wnKlg','44ZFzfcE','hZRwQ','MiSLy','KCJHR','object','584BRABRR','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','URjyy','btVWg','allowInsecureLocalhost','276fsYLyG','\x20for\x20\x22','isNaN','254542YeguiN','9704817zJVxIr','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'];_0x1543=function(){return _0x46e06c;};return _0x1543();}export async function configGet(_0x1974f3,_0x3a56bd){const _0x2ab719=_0x2ec00a,_0x346c13={'hZRwQ':function(_0x5ed443,_0x5c8c16){return _0x5ed443(_0x5c8c16);},'YUbXf':function(_0x2b6601,_0x442bab){return _0x2b6601===_0x442bab;},'KJLXw':function(_0x51c8cd,_0x5c372b){return _0x51c8cd(_0x5c372b);},'wnKlg':function(_0x3fb3aa,_0x3a7589){return _0x3fb3aa===_0x3a7589;},'btVWg':'object','oUZJv':function(_0x370e1d,_0x2f68de,_0x399061){return _0x370e1d(_0x2f68de,_0x399061);}},_0x5b47d6=await _0x346c13[_0x2ab719(0x19c)](resolveProfileTarget,_0x1974f3);if(_0x346c13['YUbXf'](_0x5b47d6[_0x2ab719(0x190)],'cloud')){const _0x119139=await _0x346c13[_0x2ab719(0x188)](loadEffectiveCloudSettings,_0x1974f3),_0x2fff12=getNestedValue(_0x119139,_0x3a56bd);if(_0x346c13[_0x2ab719(0x19a)](_0x2fff12,undefined))console['log'](_0x2ab719(0x1ad));else typeof _0x2fff12===_0x346c13[_0x2ab719(0x1a3)]?console['log'](JSON[_0x2ab719(0x185)](_0x2fff12,null,0x2)):console[_0x2ab719(0x199)](_0x2fff12);return;}const _0x40e33a=await loadSettings(_0x1974f3),_0x47206a=_0x346c13['oUZJv'](getNestedValue,_0x40e33a,_0x3a56bd);if(_0x47206a===undefined)console['log'](_0x2ab719(0x1ad));else _0x346c13[_0x2ab719(0x19a)](typeof _0x47206a,_0x2ab719(0x19f))?console['log'](JSON[_0x2ab719(0x185)](_0x47206a,null,0x2)):console['log'](_0x47206a);}export async function configList(_0x2694bf){const _0xdf5b9=_0x2ec00a,_0x160442={'eFmdx':function(_0x33a8f9,_0x1798ed){return _0x33a8f9(_0x1798ed);},'DoBfI':function(_0x3ff3d6,_0x108748){return _0x3ff3d6===_0x108748;},'QphgZ':function(_0x343047,_0x15b08c){return _0x343047(_0x15b08c);}},_0x25a75f=await _0x160442[_0xdf5b9(0x1b7)](resolveProfileTarget,_0x2694bf);if(_0x160442['DoBfI'](_0x25a75f[_0xdf5b9(0x190)],'cloud')){const _0x4a0451=await loadEffectiveCloudSettings(_0x2694bf);if(!_0x4a0451||Object['keys'](_0x4a0451)['length']===0x0){console[_0xdf5b9(0x199)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22');return;}console[_0xdf5b9(0x199)](JSON['stringify'](_0x4a0451,null,0x2));return;}const _0x32e87a=_0x160442['eFmdx'](getSettingsPath,_0x2694bf);if(!_0x160442['QphgZ'](existsSync,_0x32e87a)){console['log'](_0xdf5b9(0x1b5)+_0x2694bf+'\x22');return;}const _0x54c77e=await loadSettings(_0x2694bf),_0x3702f8=_0x160442['eFmdx'](formatSettings,_0x54c77e);!_0x3702f8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22'):console[_0xdf5b9(0x199)](_0x3702f8);}export async function configUnset(_0x8647b7,_0x294979){const _0x535ac2=_0x2ec00a,_0x57c570={'fumpL':_0x535ac2(0x1ac),'HwPHV':function(_0x1438bf,_0x2aae19,_0x52fc90,_0x48c958){return _0x1438bf(_0x2aae19,_0x52fc90,_0x48c958);},'URjyy':function(_0x4673e0){return _0x4673e0();}},_0x983c23=await resolveProfileTarget(_0x8647b7);if(_0x983c23[_0x535ac2(0x190)]===_0x57c570['fumpL']){if(_0x983c23['alsoExistsElsewhere'])printDualExistsHint(_0x8647b7);const _0x5a4cd3=_0x57c570[_0x535ac2(0x18a)](unsetProfileOverride,_0x57c570[_0x535ac2(0x1a2)](getProjectPath),_0x8647b7,_0x294979);_0x5a4cd3?console[_0x535ac2(0x199)]('Removed\x20'+_0x294979+_0x535ac2(0x1a6)+_0x8647b7+'\x22'):console['log']('Key\x20\x22'+_0x294979+'\x22\x20not\x20found');return;}const _0x3807c9=unsetProfileOverride(_0x57c570['URjyy'](getProjectPath),_0x8647b7,_0x294979);if(_0x3807c9){console['log'](_0x535ac2(0x18f)+_0x294979);return;}const _0x4200f0=await loadSettings(_0x8647b7),_0x75ce8=deleteNestedValue(_0x4200f0,_0x294979);_0x75ce8?console['log']('Key\x20\x22'+_0x294979+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x8647b7+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x535ac2(0x199)](_0x535ac2(0x18e)+_0x294979+_0x535ac2(0x1b1));}export async function configReset(_0x5de621){const _0x40a1b6=_0x2ec00a,_0x35a9e9={'IRnra':_0x40a1b6(0x1ac),'MiSLy':function(_0x14bc33){return _0x14bc33();}},_0x45fa37=await resolveProfileTarget(_0x5de621);if(_0x45fa37['kind']===_0x35a9e9['IRnra']){resetProfileOverrides(_0x35a9e9[_0x40a1b6(0x19d)](getProjectPath),_0x5de621),console[_0x40a1b6(0x199)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x5de621+'\x22');return;}console[_0x40a1b6(0x199)]('\x22'+_0x5de621+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5de621+_0x40a1b6(0x1a1));}
1
+ const _0x1ccb66=_0x2a3d;(function(_0x200110,_0xa30da0){const _0x173c16=_0x2a3d,_0x1425b9=_0x200110();while(!![]){try{const _0x1d9c0a=parseInt(_0x173c16(0x94))/0x1+parseInt(_0x173c16(0x9d))/0x2*(-parseInt(_0x173c16(0x73))/0x3)+-parseInt(_0x173c16(0x70))/0x4+parseInt(_0x173c16(0x9c))/0x5+-parseInt(_0x173c16(0x7f))/0x6*(-parseInt(_0x173c16(0x71))/0x7)+-parseInt(_0x173c16(0x87))/0x8*(parseInt(_0x173c16(0x93))/0x9)+parseInt(_0x173c16(0x7d))/0xa*(parseInt(_0x173c16(0x6b))/0xb);if(_0x1d9c0a===_0xa30da0)break;else _0x1425b9['push'](_0x1425b9['shift']());}catch(_0x3859db){_0x1425b9['push'](_0x1425b9['shift']());}}}(_0x3d7c,0xa4a89));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x2a3d(_0x570bf4,_0x1511a6){_0x570bf4=_0x570bf4-0x65;const _0x3d7c43=_0x3d7c();let _0x2a3d7b=_0x3d7c43[_0x570bf4];return _0x2a3d7b;}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x1ccb66(0x95)];function parseLocalValue(_0x541629,_0x2538c8){const _0x901fa8=_0x1ccb66,_0x516db6={'RbZLv':'true','wBVXP':'false'};if(BOOLEAN_KEYS[_0x901fa8(0x88)](_0x541629)){if(_0x2538c8===_0x516db6['RbZLv'])return!![];if(_0x2538c8===_0x516db6[_0x901fa8(0x8f)])return![];throw new Error(_0x901fa8(0x89)+_0x541629+_0x901fa8(0x8d));}return _0x2538c8;}function parseOverrideValue(_0x27a9df){const _0x518e66=_0x1ccb66,_0x27c183={'yUFCw':function(_0x46b516,_0x4f56d0){return _0x46b516===_0x4f56d0;},'ADXDL':_0x518e66(0x6a),'VOtAL':function(_0x582594,_0x1b3f3a){return _0x582594===_0x1b3f3a;},'EQJIb':function(_0x2bb404,_0x195ae8){return _0x2bb404===_0x195ae8;},'tLBxY':_0x518e66(0x8a),'dLmLM':function(_0x150cb4,_0x38ff47){return _0x150cb4===_0x38ff47;},'NOGVl':function(_0x4112e5,_0x1ba58a){return _0x4112e5(_0x1ba58a);}};if(_0x27c183['yUFCw'](_0x27a9df,_0x27c183['ADXDL']))return!![];if(_0x27c183['VOtAL'](_0x27a9df,'false'))return![];if(_0x27c183['EQJIb'](_0x27a9df,_0x27c183[_0x518e66(0x6d)]))return null;if(_0x27c183['dLmLM'](_0x27a9df,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x27a9df)){const _0x3d51c9=Number(_0x27a9df);if(Number['isSafeInteger'](_0x3d51c9))return _0x3d51c9;}if(/^-?\d+\.\d+$/['test'](_0x27a9df)){const _0x4a2f96=_0x27c183[_0x518e66(0x91)](Number,_0x27a9df);if(!Number['isNaN'](_0x4a2f96))return _0x4a2f96;}const _0x396d3a=_0x27a9df['trim']();if(_0x396d3a[_0x518e66(0x72)]('{')&&_0x396d3a[_0x518e66(0x9a)]('}')||_0x396d3a[_0x518e66(0x72)]('[')&&_0x396d3a[_0x518e66(0x9a)](']'))try{return JSON['parse'](_0x396d3a);}catch{}return _0x27a9df;}async function resolveProfileTarget(_0x32df43){const _0x3055bb=_0x1ccb66,_0x380c52={'Fvuip':function(_0x32cffa,_0x303bde){return _0x32cffa(_0x303bde);},'wSxBG':_0x3055bb(0x75)},_0x50173e=_0x380c52[_0x3055bb(0x6e)](existsSync,getEnvDir(_0x32df43));let _0xd83b22=![];try{const _0x12c6e5=await fetchCloudProfile(_0x32df43);_0xd83b22=Boolean(_0x12c6e5);}catch{}if(_0xd83b22)return{'kind':_0x380c52[_0x3055bb(0x68)],'alsoExistsElsewhere':_0x50173e};if(_0x50173e)return{'kind':_0x3055bb(0x76),'alsoExistsElsewhere':![]};throw new Error(_0x3055bb(0x82)+_0x32df43+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x32df43);}function _0x3d7c(){const _0x5bb919=['keys','XMkHW','wSxBG','Set\x20','true','143cZFeZd','Removed\x20','tLBxY','Fvuip','nkwBH','1602860aSKKaU','658XlWDDi','startsWith','3GkYgrh','Cleared\x20local\x20overrides\x20for\x20\x22','cloud','local','\x20=\x20','No\x20configuration\x20set\x20for\x20\x22','eunrs','IWFwq','nJhme','BmzWV','44150QRPWOx','alsoExistsElsewhere','55074vXztVo','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','Profile\x20\x22','WRDdt','cwd','stringify','lJFbi','36936bbBlIF','includes','Invalid\x20value\x20for\x20','null','log','cpluH',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','FMqxK','wBVXP','\x20for\x20\x22','NOGVl','kind','234jFtxCK','431130wvgoOi','allowInsecureLocalhost','qbOLR','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','(not\x20set)','endsWith','QNTlF','2308120mhwOFm','1235554XIzRJN','object','settings'];_0x3d7c=function(){return _0x5bb919;};return _0x3d7c();}function printDualExistsHint(_0x2c74eb){const _0x423886=_0x1ccb66;console[_0x423886(0x8b)]('\x20\x20Note:\x20\x22'+_0x2c74eb+_0x423886(0x81));}function getProjectPath(){const _0x3c8108=_0x1ccb66;return process[_0x3c8108(0x84)]();}async function loadEffectiveCloudSettings(_0x241d64){const _0x4b40bf=_0x1ccb66,_0x32d7bb={'BmzWV':function(_0x48c8b1,_0x483186){return _0x48c8b1(_0x483186);},'cpluH':function(_0xc077d5,_0xe003c0,_0x332984){return _0xc077d5(_0xe003c0,_0x332984);}},_0x1737ae=await _0x32d7bb[_0x4b40bf(0x7c)](fetchCloudProfile,_0x241d64),_0x1defae=_0x32d7bb[_0x4b40bf(0x8c)](readProfileOverrides,getProjectPath(),_0x241d64);return mergeCloudProfileSettings(_0x1737ae?.[_0x4b40bf(0x65)]??{},_0x1defae??undefined);}export async function configSet(_0x31e0f2,_0x96e722,_0x3ffadf){const _0x1da0da=_0x1ccb66,_0x3b8e90={'FswCv':function(_0x38a3ab,_0x4bafc5){return _0x38a3ab(_0x4bafc5);},'eunrs':_0x1da0da(0x75),'nJhme':function(_0x13d3b4){return _0x13d3b4();}},_0x2c1951=await _0x3b8e90['FswCv'](resolveProfileTarget,_0x31e0f2);if(_0x2c1951[_0x1da0da(0x92)]===_0x3b8e90[_0x1da0da(0x79)]){if(_0x2c1951['alsoExistsElsewhere'])_0x3b8e90['FswCv'](printDualExistsHint,_0x31e0f2);const _0x3ccbd2=parseOverrideValue(_0x3ffadf);setProfileOverride(getProjectPath(),_0x31e0f2,_0x96e722,_0x3ccbd2),console['log'](_0x1da0da(0x69)+_0x96e722+_0x1da0da(0x77)+JSON['stringify'](_0x3ccbd2)+'\x20for\x20\x22'+_0x31e0f2+'\x22');return;}const _0x36b400=parseLocalValue(_0x96e722,_0x3ffadf);setProfileOverride(_0x3b8e90[_0x1da0da(0x7b)](getProjectPath),_0x31e0f2,_0x96e722,_0x36b400),console['log'](_0x1da0da(0x69)+_0x96e722+_0x1da0da(0x77)+_0x36b400+'\x20for\x20\x22'+_0x31e0f2+'\x22');}export async function configGet(_0x437890,_0x212727){const _0x245dac=_0x1ccb66,_0x1a0fac={'lJFbi':function(_0x2e09d5,_0x2f172a){return _0x2e09d5===_0x2f172a;},'FMqxK':function(_0x2bdf31,_0x194223,_0x2a2101){return _0x2bdf31(_0x194223,_0x2a2101);},'qbOLR':function(_0x4174dd,_0x31c21e){return _0x4174dd===_0x31c21e;},'cZDoI':'object'},_0x3d9357=await resolveProfileTarget(_0x437890);if(_0x3d9357['kind']===_0x245dac(0x75)){const _0x500176=await loadEffectiveCloudSettings(_0x437890),_0x54ccf0=getNestedValue(_0x500176,_0x212727);if(_0x1a0fac['lJFbi'](_0x54ccf0,undefined))console[_0x245dac(0x8b)](_0x245dac(0x99));else _0x1a0fac[_0x245dac(0x86)](typeof _0x54ccf0,_0x245dac(0x9e))?console[_0x245dac(0x8b)](JSON[_0x245dac(0x85)](_0x54ccf0,null,0x2)):console[_0x245dac(0x8b)](_0x54ccf0);return;}const _0x191701=await loadSettings(_0x437890),_0x551612=_0x1a0fac[_0x245dac(0x8e)](getNestedValue,_0x191701,_0x212727);if(_0x1a0fac['lJFbi'](_0x551612,undefined))console[_0x245dac(0x8b)](_0x245dac(0x99));else _0x1a0fac[_0x245dac(0x96)](typeof _0x551612,_0x1a0fac['cZDoI'])?console['log'](JSON[_0x245dac(0x85)](_0x551612,null,0x2)):console['log'](_0x551612);}export async function configList(_0x35364f){const _0x4352c7=_0x1ccb66,_0xc47b29={'XMkHW':function(_0x476501,_0x37d998){return _0x476501===_0x37d998;},'WRDdt':function(_0xc15695,_0x210f35){return _0xc15695(_0x210f35);},'Epuft':function(_0x4421ff,_0x3e3e2e){return _0x4421ff(_0x3e3e2e);}},_0x25d30b=await resolveProfileTarget(_0x35364f);if(_0x25d30b[_0x4352c7(0x92)]==='cloud'){const _0x17f2c0=await loadEffectiveCloudSettings(_0x35364f);if(!_0x17f2c0||_0xc47b29[_0x4352c7(0x67)](Object[_0x4352c7(0x66)](_0x17f2c0)['length'],0x0)){console[_0x4352c7(0x8b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x35364f+'\x22');return;}console['log'](JSON['stringify'](_0x17f2c0,null,0x2));return;}const _0x4dafdd=_0xc47b29['WRDdt'](getSettingsPath,_0x35364f);if(!_0xc47b29['Epuft'](existsSync,_0x4dafdd)){console[_0x4352c7(0x8b)](_0x4352c7(0x78)+_0x35364f+'\x22');return;}const _0x4acbb3=await loadSettings(_0x35364f),_0x4b230f=_0xc47b29[_0x4352c7(0x83)](formatSettings,_0x4acbb3);!_0x4b230f?console[_0x4352c7(0x8b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x35364f+'\x22'):console[_0x4352c7(0x8b)](_0x4b230f);}export async function configUnset(_0x7d7012,_0x15ecb7){const _0x5c4c0b=_0x1ccb66,_0x56ecd1={'JUeBM':function(_0x355120,_0x5b6bfa){return _0x355120===_0x5b6bfa;},'LDwDE':_0x5c4c0b(0x75),'nkwBH':function(_0x4623b0,_0x3852a0){return _0x4623b0(_0x3852a0);},'IWFwq':function(_0x1e3e47,_0x554f82,_0x7b5e11,_0x42df25){return _0x1e3e47(_0x554f82,_0x7b5e11,_0x42df25);},'oQnAw':function(_0x23b906){return _0x23b906();}},_0x27f146=await resolveProfileTarget(_0x7d7012);if(_0x56ecd1['JUeBM'](_0x27f146[_0x5c4c0b(0x92)],_0x56ecd1['LDwDE'])){if(_0x27f146[_0x5c4c0b(0x7e)])_0x56ecd1[_0x5c4c0b(0x6f)](printDualExistsHint,_0x7d7012);const _0x14f173=_0x56ecd1[_0x5c4c0b(0x7a)](unsetProfileOverride,_0x56ecd1['oQnAw'](getProjectPath),_0x7d7012,_0x15ecb7);_0x14f173?console[_0x5c4c0b(0x8b)]('Removed\x20'+_0x15ecb7+_0x5c4c0b(0x90)+_0x7d7012+'\x22'):console[_0x5c4c0b(0x8b)]('Key\x20\x22'+_0x15ecb7+'\x22\x20not\x20found');return;}const _0x4e64d6=_0x56ecd1['IWFwq'](unsetProfileOverride,_0x56ecd1['oQnAw'](getProjectPath),_0x7d7012,_0x15ecb7);if(_0x4e64d6){console['log'](_0x5c4c0b(0x6c)+_0x15ecb7);return;}const _0x50b1b5=await loadSettings(_0x7d7012),_0x5d2f91=deleteNestedValue(_0x50b1b5,_0x15ecb7);_0x5d2f91?console[_0x5c4c0b(0x8b)]('Key\x20\x22'+_0x15ecb7+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x7d7012+_0x5c4c0b(0x98)):console['log']('Key\x20\x22'+_0x15ecb7+'\x22\x20not\x20found');}export async function configReset(_0x2ddda1){const _0x168db9=_0x1ccb66,_0x4c83ab={'ZwEED':function(_0x4242af,_0x42a992){return _0x4242af(_0x42a992);},'PuKRH':function(_0x3cbd1a,_0x21127a,_0xca5dbe){return _0x3cbd1a(_0x21127a,_0xca5dbe);},'QNTlF':function(_0x248d04){return _0x248d04();}},_0xecad8d=await _0x4c83ab['ZwEED'](resolveProfileTarget,_0x2ddda1);if(_0xecad8d['kind']==='cloud'){_0x4c83ab['PuKRH'](resetProfileOverrides,_0x4c83ab[_0x168db9(0x9b)](getProjectPath),_0x2ddda1),console['log'](_0x168db9(0x74)+_0x2ddda1+'\x22');return;}console['log']('\x22'+_0x2ddda1+_0x168db9(0x80)+_0x2ddda1+_0x168db9(0x97));}
@@ -1 +1 @@
1
- (function(_0x41e215,_0x87603a){const _0x3b6c8f=_0x82d7,_0x4ab80f=_0x41e215();while(!![]){try{const _0x1ef316=-parseInt(_0x3b6c8f(0x154))/0x1*(parseInt(_0x3b6c8f(0x14c))/0x2)+-parseInt(_0x3b6c8f(0x14a))/0x3*(parseInt(_0x3b6c8f(0x143))/0x4)+-parseInt(_0x3b6c8f(0x153))/0x5+parseInt(_0x3b6c8f(0x147))/0x6+-parseInt(_0x3b6c8f(0x13f))/0x7*(-parseInt(_0x3b6c8f(0x152))/0x8)+-parseInt(_0x3b6c8f(0x151))/0x9+parseInt(_0x3b6c8f(0x149))/0xa*(parseInt(_0x3b6c8f(0x14f))/0xb);if(_0x1ef316===_0x87603a)break;else _0x4ab80f['push'](_0x4ab80f['shift']());}catch(_0x65a8a6){_0x4ab80f['push'](_0x4ab80f['shift']());}}}(_0x1f93,0x71c57));import _0x89b69c from'inquirer';function _0x82d7(_0x4b302a,_0x1ab185){_0x4b302a=_0x4b302a-0x13d;const _0x1f9342=_0x1f93();let _0x82d772=_0x1f9342[_0x4b302a];return _0x82d772;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x591431,_0x3801ad={}){const _0x7f7457=_0x82d7,_0x387ee7={'ewVBY':function(_0x2f6442,_0x36e0e6){return _0x2f6442(_0x36e0e6);},'XjutY':function(_0x51cf1d){return _0x51cf1d();},'rbhDl':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','dDZZV':'input','AjnKQ':_0x7f7457(0x13e),'Dvkpa':function(_0x733f69,_0xa8ebf3){return _0x733f69!==_0xa8ebf3;},'hhZRt':_0x7f7457(0x14e)},_0x25ab12=await _0x387ee7['ewVBY'](fetchCloudProfile,_0x591431);if(!_0x25ab12)throw new Error(_0x7f7457(0x14d)+_0x591431+_0x7f7457(0x142));if(!_0x3801ad[_0x7f7457(0x13d)]&&!_0x387ee7[_0x7f7457(0x145)](isInteractive))throw new Error(_0x387ee7['rbhDl']);console[_0x7f7457(0x144)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x591431+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x3801ad[_0x7f7457(0x13d)]){const {confirmation:_0x5c28d7}=await _0x89b69c[_0x7f7457(0x140)]([{'type':_0x387ee7[_0x7f7457(0x148)],'name':_0x387ee7[_0x7f7457(0x155)],'message':_0x7f7457(0x141)+_0x591431+_0x7f7457(0x146)}]);if(_0x387ee7['Dvkpa'](_0x5c28d7,_0x591431))throw new Error(_0x387ee7[_0x7f7457(0x156)]);}await deleteCloudProfile(_0x591431),resetProfileOverrides(process[_0x7f7457(0x150)](),_0x591431),clearLastProfile(process[_0x7f7457(0x150)](),_0x591431),console[_0x7f7457(0x144)](_0x7f7457(0x14b)+_0x591431+'\x22.');}function _0x1f93(){const _0x1a54b8=['yes','confirmation','70WmCrDp','prompt','Type\x20\x22','\x22\x20not\x20found.','12gZReXo','log','XjutY','\x22\x20to\x20confirm\x20deletion:','4557492jUkKhk','dDZZV','70hmhrjE','244473dJyJIN','✓\x20Deleted\x20cloud\x20profile\x20\x22','10fRHrgQ','Cloud\x20profile\x20\x22','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','387431gWmQtW','cwd','72954HzGbWm','437672USfufd','3495490dfwxdC','27107cbZuPE','AjnKQ','hhZRt'];_0x1f93=function(){return _0x1a54b8;};return _0x1f93();}
1
+ (function(_0x880de8,_0x2ac0a4){const _0x5c1fbc=_0x566a,_0x5e9ee9=_0x880de8();while(!![]){try{const _0x30d32b=-parseInt(_0x5c1fbc(0x1c7))/0x1+-parseInt(_0x5c1fbc(0x1c2))/0x2*(-parseInt(_0x5c1fbc(0x1c8))/0x3)+-parseInt(_0x5c1fbc(0x1c5))/0x4+parseInt(_0x5c1fbc(0x1c4))/0x5*(parseInt(_0x5c1fbc(0x1ca))/0x6)+parseInt(_0x5c1fbc(0x1d0))/0x7*(-parseInt(_0x5c1fbc(0x1bc))/0x8)+parseInt(_0x5c1fbc(0x1c9))/0x9+parseInt(_0x5c1fbc(0x1d1))/0xa;if(_0x30d32b===_0x2ac0a4)break;else _0x5e9ee9['push'](_0x5e9ee9['shift']());}catch(_0x5d3850){_0x5e9ee9['push'](_0x5e9ee9['shift']());}}}(_0x1104,0x511b7));import _0x4510b9 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x1104(){const _0x4daa4f=['\x22\x20not\x20found.','Cloud\x20profile\x20\x22','tAlxT','\x22\x20for\x20everyone\x20in\x20your\x20organization.','confirmation','24028UdJfoC','NVnpQ','40WtsAKv','111800LpnXFK','\x22\x20to\x20confirm\x20deletion:','533874nnLYOM','93HtgaCU','2719674CkNCZQ','11070jCwjkJ','mScXF','input','Type\x20\x22','yes','✓\x20Deleted\x20cloud\x20profile\x20\x22','566867duZmtZ','6095640OSCCoG','cwd','Vhfrz','log','40RejpmD'];_0x1104=function(){return _0x4daa4f;};return _0x1104();}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x566a(_0x61cb8a,_0x114410){_0x61cb8a=_0x61cb8a-0x1bc;const _0x110416=_0x1104();let _0x566a8a=_0x110416[_0x61cb8a];return _0x566a8a;}export async function deleteProfile(_0x5b181c,_0x5d1eb3={}){const _0x235676=_0x566a,_0x2e5cc0={'NVnpQ':function(_0x985731,_0x34f56e){return _0x985731(_0x34f56e);},'Vhfrz':_0x235676(0x1cc),'VfeSD':function(_0x57f5ba,_0x4a6102){return _0x57f5ba!==_0x4a6102;},'mScXF':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','tAlxT':function(_0xccc5df,_0x756271,_0x5397c2){return _0xccc5df(_0x756271,_0x5397c2);}},_0x5dab09=await _0x2e5cc0[_0x235676(0x1c3)](fetchCloudProfile,_0x5b181c);if(!_0x5dab09)throw new Error(_0x235676(0x1be)+_0x5b181c+_0x235676(0x1bd));if(!_0x5d1eb3[_0x235676(0x1ce)]&&!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[_0x235676(0x1d4)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x5b181c+_0x235676(0x1c0));if(!_0x5d1eb3['yes']){const {confirmation:_0x2af0a1}=await _0x4510b9['prompt']([{'type':_0x2e5cc0[_0x235676(0x1d3)],'name':_0x235676(0x1c1),'message':_0x235676(0x1cd)+_0x5b181c+_0x235676(0x1c6)}]);if(_0x2e5cc0['VfeSD'](_0x2af0a1,_0x5b181c))throw new Error(_0x2e5cc0[_0x235676(0x1cb)]);}await deleteCloudProfile(_0x5b181c),resetProfileOverrides(process[_0x235676(0x1d2)](),_0x5b181c),_0x2e5cc0[_0x235676(0x1bf)](clearLastProfile,process[_0x235676(0x1d2)](),_0x5b181c),console['log'](_0x235676(0x1cf)+_0x5b181c+'\x22.');}
@@ -1 +1 @@
1
- const _0x5d9de7=_0x59a0;(function(_0x1149b2,_0x74464){const _0x43778f=_0x59a0,_0x194263=_0x1149b2();while(!![]){try{const _0x597266=-parseInt(_0x43778f(0xd3))/0x1+-parseInt(_0x43778f(0xe1))/0x2+parseInt(_0x43778f(0xc3))/0x3+-parseInt(_0x43778f(0xe2))/0x4+-parseInt(_0x43778f(0xc7))/0x5+-parseInt(_0x43778f(0xcd))/0x6+parseInt(_0x43778f(0xe0))/0x7;if(_0x597266===_0x74464)break;else _0x194263['push'](_0x194263['shift']());}catch(_0x2c3f7a){_0x194263['push'](_0x194263['shift']());}}}(_0x5c8a,0x9b491));function _0x5c8a(){const _0x469f71=['cZDRS','reports','length','1610316jDZsnq','ahvxz','message','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','xjdOl','.txt','509145Iyemtv','\x0aCloud\x20Profiles:','\x0aNo\x20profiles\x20found.','local','name','\x20\x20\x20\x20\x20\x20Details:\x20','settings.json','bug-bashes','environmentDetails','legacy','includes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','tmBuZ','22244257SdRVBS','1180006nOGsRC','985792EBNIpz','\x0a*\x20=\x20active\x20profile','hgBRZ','error','log','hXKbd','isDirectory','push','406311RGCukX','sessionUpdatedAt','AIOlr','NkJmH','5315785lJdOIC','cached\x20(updated\x20','no\x20session'];_0x5c8a=function(){return _0x469f71;};return _0x5c8a();}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';function _0x59a0(_0x40478a,_0x16276c){_0x40478a=_0x40478a-0xbf;const _0x5c8a05=_0x5c8a();let _0x59a03d=_0x5c8a05[_0x40478a];return _0x59a03d;}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x5d9de7(0xda),_0x5d9de7(0xcb),_0x5d9de7(0xd6),'ci'];export async function getEnvNames(){const _0x47d332=_0x5d9de7,_0xf2cd9c={'hgBRZ':function(_0x34eb6f){return _0x34eb6f();},'NkJmH':function(_0x3a132d){return _0x3a132d();},'xjdOl':function(_0x4a9bf2,_0x129819,_0x3446ee){return _0x4a9bf2(_0x129819,_0x3446ee);},'ODizG':function(_0x1bca42,_0x29c369){return _0x1bca42(_0x29c369);},'eFHsC':_0x47d332(0xd2),'pjPiH':function(_0x1f248e,_0x578edb,_0x1aa5e2){return _0x1f248e(_0x578edb,_0x1aa5e2);},'XLEeS':_0x47d332(0xd9)},_0x255267=_0xf2cd9c[_0x47d332(0xe4)](getRangerDir);if(!existsSync(_0x255267))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1ca116=await _0xf2cd9c[_0x47d332(0xc6)](readActiveProfileName),_0x1d6256=[],_0x57f8a8={},_0x2f4796=_0xf2cd9c[_0x47d332(0xd1)](join,_0x255267,'local');if(existsSync(_0x2f4796)){const _0x28bb99=await readdir(_0x2f4796);for(const _0x1dec2c of _0x28bb99){const _0x24ab3c=_0xf2cd9c[_0x47d332(0xd1)](join,_0x2f4796,_0x1dec2c),_0x49e007=await stat(_0x24ab3c);_0x49e007['isDirectory']()&&(_0x1d6256[_0x47d332(0xc2)](_0x1dec2c),_0x57f8a8[_0x1dec2c]=_0x47d332(0xd6));}}const _0x379632=join(_0x255267,'ci');if(existsSync(_0x379632)){const _0x2d6daa=await readdir(_0x379632);for(const _0x497fe8 of _0x2d6daa){const _0x28505b=_0xf2cd9c['xjdOl'](join,_0x379632,_0x497fe8),_0x4c8b95=await _0xf2cd9c['ODizG'](stat,_0x28505b);_0x4c8b95['isDirectory']()&&(_0x1d6256[_0x47d332(0xc2)](_0x497fe8),_0x57f8a8[_0x497fe8]='ci');}}const _0x2e2593=await readdir(_0x255267);for(const _0x82d098 of _0x2e2593){if(NON_ENV_DIRS['includes'](_0x82d098))continue;if(_0x82d098['startsWith']('.'))continue;if(_0x82d098['endsWith'](_0xf2cd9c['eFHsC']))continue;const _0x3dd28d=join(_0x255267,_0x82d098),_0x1cbada=await stat(_0x3dd28d);_0x1cbada[_0x47d332(0xc1)]()&&existsSync(_0xf2cd9c['pjPiH'](join,_0x3dd28d,_0xf2cd9c['XLEeS']))&&(!_0x1d6256[_0x47d332(0xdd)](_0x82d098)&&(_0x1d6256[_0x47d332(0xc2)](_0x82d098),_0x57f8a8[_0x82d098]=_0x47d332(0xdc)));}return{'envNames':_0x1d6256,'activeEnv':_0x1ca116,'envTypes':_0x57f8a8};}export async function envList(){const _0xf6dd23=_0x5d9de7,_0xf1952b={'tmBuZ':function(_0x1e4fe8){return _0x1e4fe8();},'cZDRS':function(_0x224a8f,_0x5c54d1){return _0x224a8f(_0x5c54d1);},'ZFylI':function(_0xe7f905,_0x140a9a){return _0xe7f905===_0x140a9a;},'svEHU':function(_0x5e3ac7,_0x497c99){return _0x5e3ac7>_0x497c99;},'ahvxz':'\x0aLocal\x20Profiles\x20(legacy):','uTJyE':_0xf6dd23(0xd6),'AIOlr':function(_0x381865,_0x243d20){return _0x381865===_0x243d20;},'hXKbd':_0xf6dd23(0xc9)},{envNames:_0x1d4a48,activeEnv:_0x5c86ad,envTypes:_0x41d47b}=await getEnvNames();let _0xed6940=[];const _0x171ddf=await _0xf1952b[_0xf6dd23(0xdf)](getToken);if(_0x171ddf)try{_0xed6940=await listCloudProfiles();}catch(_0x3435f3){console[_0xf6dd23(0xe5)](_0xf6dd23(0xd0)+(_0x3435f3 instanceof Error?_0x3435f3[_0xf6dd23(0xcf)]:_0xf1952b['cZDRS'](String,_0x3435f3)));}if(_0xf1952b['ZFylI'](_0x1d4a48['length'],0x0)&&_0xed6940['length']===0x0){console[_0xf6dd23(0xbf)](_0xf6dd23(0xd5)),console['log'](_0xf6dd23(0xde));return;}const _0x511a89=new Set(_0xed6940['map'](_0x3526d2=>_0x3526d2['name']));if(_0xf1952b['svEHU'](_0x1d4a48[_0xf6dd23(0xcc)],0x0)){console[_0xf6dd23(0xbf)](_0xf1952b[_0xf6dd23(0xce)]);for(const _0x3744d1 of _0x1d4a48['sort']()){const _0x475169=_0x3744d1===_0x5c86ad&&!_0x511a89['has'](_0x3744d1),_0x5a6238=_0x41d47b[_0x3744d1]||_0xf1952b['uTJyE'],_0x82c043=await _0xf1952b[_0xf6dd23(0xca)](loadSettings,_0x3744d1),_0x56318c=_0xf1952b[_0xf6dd23(0xc5)](_0x5a6238,'legacy')?'':'\x20['+_0x5a6238+']';console['log']('\x20\x20'+(_0x475169?'*\x20':'\x20\x20')+_0x3744d1+_0x56318c),_0x82c043['baseUrl']&&console[_0xf6dd23(0xbf)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x82c043['baseUrl']),_0x82c043[_0xf6dd23(0xdb)]&&console['log'](_0xf6dd23(0xd8)+_0x82c043[_0xf6dd23(0xdb)]);}}if(_0xed6940['length']>0x0){console['log'](_0xf6dd23(0xd4));for(const _0x54c213 of _0xed6940['sort']((_0x547e21,_0xe99939)=>_0x547e21[_0xf6dd23(0xd7)]['localeCompare'](_0xe99939['name']))){const _0x24cb9f=_0x54c213['name']===_0x5c86ad,_0x541bf2=_0x54c213['environmentKey']?'\x20('+_0x54c213['environmentKey']+')':'',_0x41d100=_0x54c213['sessionUpdatedAt']?_0xf6dd23(0xc8)+_0x54c213[_0xf6dd23(0xc4)]+')':_0xf1952b[_0xf6dd23(0xc0)];console['log']('\x20\x20'+(_0x24cb9f?'*\x20':'\x20\x20')+_0x54c213['name']+'\x20[cloud]'+_0x541bf2),console[_0xf6dd23(0xbf)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x41d100);}}_0x5c86ad&&console[_0xf6dd23(0xbf)](_0xf6dd23(0xe3));}
1
+ function _0x4980(_0x5db945,_0x760c70){_0x5db945=_0x5db945-0xb7;const _0x24030b=_0x2403();let _0x49800c=_0x24030b[_0x5db945];return _0x49800c;}function _0x2403(){const _0x2e023e=['hWAvg','cached\x20(updated\x20','local','Run:\x20ranger\x20profile\x20add\x20<profile-name>','35pzGYEB','jfnFN','legacy','627825ryXRHI','MZaQP','name','1080478zJYEZs','sessions','log','message','fEyQA','8872236lxjuuu','1310136rZQcqX','push','Xhmyh','34455700vsPJvX','KrNrC','bug-bashes','\x20\x20\x20\x20\x20\x20Details:\x20','41999aKJTOM','ubNiB','environmentDetails','.txt','has','ouAMG','JRIhW','48NfygHo','OqShZ','length','isDirectory','LhjiW','localeCompare','5577308kKcTSo','includes','3LXmlGx'];_0x2403=function(){return _0x2e023e;};return _0x2403();}const _0x18d895=_0x4980;(function(_0x4fc67e,_0x5383a7){const _0x23efbf=_0x4980,_0x319fa1=_0x4fc67e();while(!![]){try{const _0x52b994=parseInt(_0x23efbf(0xce))/0x1+parseInt(_0x23efbf(0xc1))/0x2*(-parseInt(_0x23efbf(0xdd))/0x3)+-parseInt(_0x23efbf(0xdb))/0x4+-parseInt(_0x23efbf(0xbe))/0x5*(parseInt(_0x23efbf(0xd5))/0x6)+-parseInt(_0x23efbf(0xbb))/0x7*(parseInt(_0x23efbf(0xc7))/0x8)+parseInt(_0x23efbf(0xc6))/0x9+parseInt(_0x23efbf(0xca))/0xa;if(_0x52b994===_0x5383a7)break;else _0x319fa1['push'](_0x319fa1['shift']());}catch(_0x36d4b3){_0x319fa1['push'](_0x319fa1['shift']());}}}(_0x2403,0xaeabc));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x18d895(0xc2),_0x18d895(0xcc),'reports','local','ci'];export async function getEnvNames(){const _0x6027cc=_0x18d895,_0xc2e21d={'ubNiB':function(_0x39728e,_0x46b5d9){return _0x39728e(_0x46b5d9);},'cEZDI':function(_0x26791d,_0x4edd57,_0x2793eb){return _0x26791d(_0x4edd57,_0x2793eb);},'iPLYk':function(_0x40ea3c,_0x424610){return _0x40ea3c(_0x424610);},'MXJFY':function(_0xce0db6,_0x363d01,_0x3241d8){return _0xce0db6(_0x363d01,_0x3241d8);},'GMwDZ':function(_0x40bcc3,_0x507c1d){return _0x40bcc3(_0x507c1d);},'fEyQA':_0x6027cc(0xb9),'jfnFN':function(_0x2ee416,_0x3735ae){return _0x2ee416(_0x3735ae);},'ecMJN':function(_0x3f2bdf,_0x3e57c8,_0x5a45dd){return _0x3f2bdf(_0x3e57c8,_0x5a45dd);},'KrNrC':_0x6027cc(0xd1),'OqShZ':function(_0x5ddf8a,_0x156038){return _0x5ddf8a(_0x156038);}},_0x4acdde=getRangerDir();if(!_0xc2e21d[_0x6027cc(0xcf)](existsSync,_0x4acdde))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x5705eb=await readActiveProfileName(),_0x2c0e58=[],_0x2a95f7={},_0x1ee16d=_0xc2e21d['cEZDI'](join,_0x4acdde,_0x6027cc(0xb9));if(_0xc2e21d['iPLYk'](existsSync,_0x1ee16d)){const _0x4b567b=await readdir(_0x1ee16d);for(const _0xb5d330 of _0x4b567b){const _0x15a0be=_0xc2e21d['MXJFY'](join,_0x1ee16d,_0xb5d330),_0x275b8b=await _0xc2e21d['GMwDZ'](stat,_0x15a0be);_0x275b8b['isDirectory']()&&(_0x2c0e58['push'](_0xb5d330),_0x2a95f7[_0xb5d330]=_0xc2e21d[_0x6027cc(0xc5)]);}}const _0x32479e=join(_0x4acdde,'ci');if(_0xc2e21d[_0x6027cc(0xbc)](existsSync,_0x32479e)){const _0x41922a=await _0xc2e21d['jfnFN'](readdir,_0x32479e);for(const _0x7637b9 of _0x41922a){const _0x3cd60e=_0xc2e21d['ecMJN'](join,_0x32479e,_0x7637b9),_0x4e0683=await _0xc2e21d['jfnFN'](stat,_0x3cd60e);_0x4e0683['isDirectory']()&&(_0x2c0e58[_0x6027cc(0xc8)](_0x7637b9),_0x2a95f7[_0x7637b9]='ci');}}const _0x46dbc4=await readdir(_0x4acdde);for(const _0x803e1f of _0x46dbc4){if(NON_ENV_DIRS[_0x6027cc(0xdc)](_0x803e1f))continue;if(_0x803e1f['startsWith']('.'))continue;if(_0x803e1f['endsWith'](_0xc2e21d[_0x6027cc(0xcb)]))continue;const _0x2f6f82=join(_0x4acdde,_0x803e1f),_0xf335d6=await _0xc2e21d[_0x6027cc(0xd6)](stat,_0x2f6f82);_0xf335d6[_0x6027cc(0xd8)]()&&_0xc2e21d[_0x6027cc(0xcf)](existsSync,_0xc2e21d['MXJFY'](join,_0x2f6f82,'settings.json'))&&(!_0x2c0e58['includes'](_0x803e1f)&&(_0x2c0e58[_0x6027cc(0xc8)](_0x803e1f),_0x2a95f7[_0x803e1f]=_0x6027cc(0xbd)));}return{'envNames':_0x2c0e58,'activeEnv':_0x5705eb,'envTypes':_0x2a95f7};}export async function envList(){const _0x5e9630=_0x18d895,_0x2bb4a2={'xRors':function(_0x2690c7,_0x2275a8){return _0x2690c7 instanceof _0x2275a8;},'Xhmyh':function(_0x395051,_0x17f1cf){return _0x395051(_0x17f1cf);},'KObJe':function(_0x4af579,_0x1327a6){return _0x4af579===_0x1327a6;},'MZaQP':'\x0aNo\x20profiles\x20found.','niQWK':_0x5e9630(0xba),'ouAMG':_0x5e9630(0xb9),'LhjiW':'legacy','hWAvg':'\x0aCloud\x20Profiles:','JRIhW':function(_0x405b1b,_0x1679a8){return _0x405b1b===_0x1679a8;}},{envNames:_0xfa8ce0,activeEnv:_0x25401b,envTypes:_0xb96c55}=await getEnvNames();let _0x3e217a=[];const _0x342f1d=await getToken();if(_0x342f1d)try{_0x3e217a=await listCloudProfiles();}catch(_0x106e2f){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x2bb4a2['xRors'](_0x106e2f,Error)?_0x106e2f[_0x5e9630(0xc4)]:_0x2bb4a2[_0x5e9630(0xc9)](String,_0x106e2f)));}if(_0xfa8ce0['length']===0x0&&_0x2bb4a2['KObJe'](_0x3e217a['length'],0x0)){console['log'](_0x2bb4a2[_0x5e9630(0xbf)]),console['log'](_0x2bb4a2['niQWK']);return;}const _0x4b5c4b=new Set(_0x3e217a['map'](_0x1b96f8=>_0x1b96f8[_0x5e9630(0xc0)]));if(_0xfa8ce0[_0x5e9630(0xd7)]>0x0){console[_0x5e9630(0xc3)]('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x6ac9d4 of _0xfa8ce0['sort']()){const _0x4cc035=_0x6ac9d4===_0x25401b&&!_0x4b5c4b[_0x5e9630(0xd2)](_0x6ac9d4),_0x189938=_0xb96c55[_0x6ac9d4]||_0x2bb4a2[_0x5e9630(0xd3)],_0x1cc663=await _0x2bb4a2['Xhmyh'](loadSettings,_0x6ac9d4),_0x3b7074=_0x189938===_0x2bb4a2[_0x5e9630(0xd9)]?'':'\x20['+_0x189938+']';console[_0x5e9630(0xc3)]('\x20\x20'+(_0x4cc035?'*\x20':'\x20\x20')+_0x6ac9d4+_0x3b7074),_0x1cc663['baseUrl']&&console[_0x5e9630(0xc3)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1cc663['baseUrl']),_0x1cc663[_0x5e9630(0xd0)]&&console[_0x5e9630(0xc3)](_0x5e9630(0xcd)+_0x1cc663[_0x5e9630(0xd0)]);}}if(_0x3e217a['length']>0x0){console[_0x5e9630(0xc3)](_0x2bb4a2[_0x5e9630(0xb7)]);for(const _0x13dadf of _0x3e217a['sort']((_0x453c85,_0x4c43a7)=>_0x453c85['name'][_0x5e9630(0xda)](_0x4c43a7['name']))){const _0x11eda5=_0x2bb4a2[_0x5e9630(0xd4)](_0x13dadf['name'],_0x25401b),_0x333d79=_0x13dadf['environmentKey']?'\x20('+_0x13dadf['environmentKey']+')':'',_0x586d22=_0x13dadf['sessionUpdatedAt']?_0x5e9630(0xb8)+_0x13dadf['sessionUpdatedAt']+')':'no\x20session';console[_0x5e9630(0xc3)]('\x20\x20'+(_0x11eda5?'*\x20':'\x20\x20')+_0x13dadf['name']+'\x20[cloud]'+_0x333d79),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x586d22);}}_0x25401b&&console[_0x5e9630(0xc3)]('\x0a*\x20=\x20active\x20profile');}