@ranger-testing/ranger-cli 3.1.3-alpha.e1ca941-42 → 3.1.3

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 (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/tunnelClient.js +1 -1
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  85. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x354464,_0xe5bd38){const _0x377245=_0x8dce,_0x116703=_0x354464();while(!![]){try{const _0x23765b=-parseInt(_0x377245(0x117))/0x1*(-parseInt(_0x377245(0xf4))/0x2)+-parseInt(_0x377245(0x107))/0x3*(-parseInt(_0x377245(0x15c))/0x4)+-parseInt(_0x377245(0xe8))/0x5*(parseInt(_0x377245(0xe4))/0x6)+-parseInt(_0x377245(0x142))/0x7*(parseInt(_0x377245(0x114))/0x8)+-parseInt(_0x377245(0x138))/0x9*(parseInt(_0x377245(0x10b))/0xa)+-parseInt(_0x377245(0x11f))/0xb+parseInt(_0x377245(0x131))/0xc;if(_0x23765b===_0xe5bd38)break;else _0x116703['push'](_0x116703['shift']());}catch(_0x3eb535){_0x116703['push'](_0x116703['shift']());}}}(_0x1520,0x267aa));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x176ead 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 _0x8dce(_0x473d14,_0x40eee5){_0x473d14=_0x473d14-0xe0;const _0x15203e=_0x1520();let _0x8dceab=_0x15203e[_0x473d14];return _0x8dceab;}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 _0x212485=_0x8dce;if(!process[_0x212485(0xf1)]['isTTY'])return;console[_0x212485(0x109)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4627cc){const _0x30d6b1=_0x8dce,_0x49f36b={'jANMw':function(_0x2cf012,_0x230d72,_0x7efb07){return _0x2cf012(_0x230d72,_0x7efb07);},'SItWR':function(_0x4fc795,_0x11b078){return _0x4fc795(_0x11b078);},'vVImQ':function(_0x25e62b,_0x54b9fa){return _0x25e62b===_0x54b9fa;},'SnrBy':'TypeError'};try{const _0x245469=new AbortController(),_0x43ca13=setTimeout(()=>_0x245469['abort'](),0x1388),_0x265cf9={'method':_0x30d6b1(0x147),'signal':_0x245469['signal'],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x30d6b1(0x118)](_0x4627cc)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x31c3c4=await _0x49f36b['jANMw'](fetch,_0x4627cc,_0x265cf9);delete process[_0x30d6b1(0x10a)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x43ca13);if(_0x31c3c4['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x30d6b1(0x13d)+_0x31c3c4[_0x30d6b1(0xfc)]};}catch(_0x266173){delete process[_0x30d6b1(0x10a)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x5c64b3=_0x266173,_0xee5de=_0x5c64b3[_0x30d6b1(0x102)]||_0x49f36b[_0x30d6b1(0x137)](String,_0x266173),_0x5d6331=_0xee5de['includes']('Invalid\x20URL')||_0x49f36b[_0x30d6b1(0x101)](_0x5c64b3[_0x30d6b1(0x12a)],_0x49f36b['SnrBy'])||_0xee5de[_0x30d6b1(0x145)](_0x30d6b1(0xec));return{'ok':![],'error':_0xee5de,'isProtocolError':_0x5d6331};}}async function sweepOrphanLocalProfile(_0x294522,_0x58ffca,_0x313211){const _0x2eaf93=_0x8dce,_0x13fac8={'MUKAV':_0x2eaf93(0x129),'LoAae':function(_0x4ad0fb,_0x17a6f4){return _0x4ad0fb(_0x17a6f4);},'GOewt':function(_0x1233f9,_0x4d0948){return _0x1233f9(_0x4d0948);},'CcZhP':function(_0x1c5ac6,_0x5d2396,_0x415974){return _0x1c5ac6(_0x5d2396,_0x415974);}},_0x3d3148=join(_0x58ffca,_0x13fac8['MUKAV']),_0x1a6d83=join(_0x3d3148,_0x294522);_0x13fac8[_0x2eaf93(0x14a)](existsSync,_0x1a6d83)&&(_0x313211&&await _0x13fac8['GOewt'](isPathGitTracked,_0x1a6d83)?console['log'](_0x2eaf93(0x162)+_0x1a6d83+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x1a6d83,{'recursive':!![],'force':!![]}),console[_0x2eaf93(0x160)](_0x2eaf93(0x141)+_0x1a6d83)));if(existsSync(_0x3d3148)){let _0x4b12ab=[];try{_0x4b12ab=await readdir(_0x3d3148);}catch{return;}const _0x39772e='.tmp-'+_0x294522+'-';for(const _0x34081d of _0x4b12ab){if(!_0x34081d['startsWith'](_0x39772e))continue;const _0x3e1e85=_0x13fac8[_0x2eaf93(0x139)](join,_0x3d3148,_0x34081d);await rm(_0x3e1e85,{'recursive':!![],'force':!![]}),console['log'](_0x2eaf93(0x141)+_0x3e1e85);}}}async function sweepOrphansBestEffort(_0x221a44){const _0x220f85=_0x8dce,_0x5391da={'ZUStg':function(_0x2f6f21,_0x4eb8ad,_0x31218a,_0x195c04){return _0x2f6f21(_0x4eb8ad,_0x31218a,_0x195c04);},'RBsCH':function(_0x1a5685){return _0x1a5685();},'EHmhV':function(_0x626dad,_0x4e24bc){return _0x626dad(_0x4e24bc);}};try{await _0x5391da['ZUStg'](sweepOrphanLocalProfile,_0x221a44,_0x5391da[_0x220f85(0xe6)](getRangerHomeDir),![]);const _0x414322=getRangerDir();_0x414322!==_0x5391da['RBsCH'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x221a44,_0x414322,!![]);}catch(_0x455277){console['log'](_0x220f85(0x135)+(_0x455277 instanceof Error?_0x455277['message']:_0x5391da['EHmhV'](String,_0x455277))+').');}}async function markActive(_0x20a3a8){const _0x5b7aaf=_0x8dce;try{await writeActiveProfileName(_0x20a3a8),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x20a3a8);}catch{console['log'](_0x5b7aaf(0x111));}}function _0x1520(){const _0x11629b=['prompt','warn','env','2620UCrkPS','ncxWz','hapHe','no_auth_config','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','mcgTP','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','wevpG','http://localhost:3000','2106296JRXNiZ','Enter\x20a\x20different\x20URL','error','152746qGUgar','test','✓\x20Profile\x20\x27','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','RltbF','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','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','user_declined','576477ONLpNk','setupHeader','\x27\x20to\x20the\x20cloud?','TiIYm','keys','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20(domains:\x20','\x0a🌐\x20Profile\x20Setup\x0a','\x0a✓\x20Profile\x20\x27','http://','local','name','TyXnX','BOwON','isElectron','ReMrQ','UmgDU','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','3495492ZQMWWV','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','confirm','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','✓\x20Cloud\x20profile\x20\x27','SItWR','27NkTEGP','CcZhP','NlGhW','zvtqg','.\x20Configured\x20envs:\x20','HTTP\x20','iDUSn','HnNOa','force','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','7ebssEK','BihkZ','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','includes','BbvTT','HEAD','aMgaC','wJrEa','LoAae','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','slice','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\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','RkMQm','environments','QhOLp','mLCtP','input','\x20\x20Did\x20you\x20mean\x20','retry','origin','indexOf','exit','Ugtpe','XeggJ','584DXKhtI','PksCP','\x27\x20created.\x0a','setupHeaders','log','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','GcjpM','JJHFw','yes','isProtocolError','1173102WltPIf','xMmKo','RBsCH','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','5zfjlmf','uTqgv','lMNIm','ZlzCv','fetch\x20failed','join','trim','url','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','stdout','skipAuth','profile.add.autoRouted','2dLjDte','trackPhaseEnd','\x0a\x20\x20A\x20profile\x20named\x20\x22','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','lDQXN','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','Wpecw','status','Invalid\x20--setup-header\x20format:\x20\x22','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','emDaK','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','vVImQ','message','action','cwd','length','profile.add.autoRouteSkipped','4635YlbZdm'];_0x1520=function(){return _0x11629b;};return _0x1520();}async function tryAutoRouteCloudProfile(_0x15472c,_0x3e5bef,_0xae2d48,_0x5c97bc,_0x2015ca){const _0xccc5c6=_0x8dce,_0x3546b3={'XeggJ':function(_0x4f9ebf,_0x3364e4){return _0x4f9ebf===_0x3364e4;},'BihkZ':function(_0x358643){return _0x358643();},'LEnqU':function(_0x174a26,_0x40c14){return _0x174a26 instanceof _0x40c14;},'UmgDU':function(_0x4fd7b8,_0x3c3ae7,_0x1f5406,_0x5b6190,_0x19c133){return _0x4fd7b8(_0x3c3ae7,_0x1f5406,_0x5b6190,_0x19c133);},'mLCtP':_0xccc5c6(0x106),'BOwON':_0xccc5c6(0x10e),'mcgTP':function(_0x20dae7,_0x5bf3e2){return _0x20dae7+_0x5bf3e2;},'QhOLp':function(_0x2fa8a7,_0x5b4c57){return _0x2fa8a7+_0x5b4c57;},'TiIYm':function(_0x3f50b6,_0x359e55){return _0x3f50b6+_0x359e55;},'lDQXN':_0xccc5c6(0x14f),'JJHFw':'no_match','rXpmT':_0xccc5c6(0x134),'lMNIm':'saveToCloud','zvtqg':_0xccc5c6(0xe7),'gsTdg':function(_0x4e091b,_0x543879,_0xde0174,_0x44861a){return _0x4e091b(_0x543879,_0xde0174,_0x44861a);},'xMmKo':function(_0x3a1b78,_0x7362f3){return _0x3a1b78 instanceof _0x7362f3;},'uTqgv':function(_0x21e8f0,_0x1f8318){return _0x21e8f0+_0x1f8318;}};let _0x506833;try{_0x506833=await _0x3546b3['BihkZ'](fetchAuthConfig);}catch(_0x48d7ba){return _0x2015ca?.[_0xccc5c6(0xf5)]('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x15472c}),console['error'](_0xccc5c6(0x161)+(_0x3546b3['LEnqU'](_0x48d7ba,Error)?_0x48d7ba['message']:String(_0x48d7ba))),![];}if(!_0x506833||!_0x506833['environments']||Object[_0xccc5c6(0x123)](_0x506833['environments'])[_0xccc5c6(0x105)]===0x0){if(_0x5c97bc)return await _0x3546b3[_0xccc5c6(0x12f)](captureEnvLessProfile,_0x15472c,_0x3e5bef,_0xae2d48,_0x2015ca);return _0x2015ca?.[_0xccc5c6(0xf5)](_0x3546b3[_0xccc5c6(0x153)],{'reason':_0x3546b3[_0xccc5c6(0x12c)],'profileName':_0x15472c}),console['error'](_0x3546b3[_0xccc5c6(0x110)](_0x3546b3['QhOLp'](_0x3546b3['TiIYm'](_0x3546b3[_0xccc5c6(0x122)](_0x3546b3[_0xccc5c6(0xf8)],'\x0a')+_0xccc5c6(0x14c),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x15472c+'\x20--url\x20'+_0x3e5bef+'\x20--skip-auth\x0a'),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login')),![];}const _0x499d47=matchAuthEnvironment(_0x3e5bef,_0x506833);if(!_0x499d47)return _0x2015ca?.[_0xccc5c6(0xf5)](_0x3546b3['mLCtP'],{'reason':_0x3546b3[_0xccc5c6(0xe1)],'profileName':_0x15472c}),console[_0xccc5c6(0x116)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x3e5bef+_0xccc5c6(0x13c)+Object['keys'](_0x506833['environments'])[_0xccc5c6(0xed)](',\x20')+'.'),![];const _0x13c43d=_0x506833[_0xccc5c6(0x151)][_0x499d47],_0x253704=_0x13c43d?.['domains']??[];if(_0x5c97bc&&!_0xae2d48['yes']){const {saveToCloud:_0x1d1965}=await _0x176ead['prompt']([{'type':_0x3546b3['rXpmT'],'name':_0x3546b3[_0xccc5c6(0xea)],'message':'Found\x20auth\x20environment\x20\x27'+_0x499d47+'\x27\x20matching\x20'+_0x3e5bef+_0xccc5c6(0x125)+_0x253704['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x15472c+_0xccc5c6(0x121),'default':!![]}]);if(!_0x1d1965)return _0x2015ca?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0xccc5c6(0x11e),'profileName':_0x15472c}),console['error'](_0x3546b3[_0xccc5c6(0x13b)]),![];}const _0x2d5c26=_0x253704['some'](_0x4f7348=>{const _0x387d07=_0xccc5c6;try{return _0x3546b3['XeggJ'](new URL(_0x4f7348)[_0x387d07(0x157)],new URL(_0x3e5bef)['origin']);}catch{return![];}}),_0x1e0849={};!_0x2d5c26&&(_0x1e0849['baseUrl']=_0x3e5bef);try{await _0x3546b3['gsTdg'](createCloudProfile,_0x15472c,_0x499d47,{'settings':_0x1e0849}),_0x3546b3[_0xccc5c6(0x143)](warnCloudProfileSharedInOrg);}catch(_0x3db91e){if(_0x3546b3[_0xccc5c6(0xe5)](_0x3db91e,ApiError)&&_0x3546b3[_0xccc5c6(0x15b)](_0x3db91e[_0xccc5c6(0xfc)],0x199)){console['error'](_0x3546b3[_0xccc5c6(0x152)](_0xccc5c6(0xf6)+_0x15472c+_0xccc5c6(0x144),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x15472c));throw _0x3db91e;}throw _0x3db91e;}return console[_0xccc5c6(0x160)](_0x3546b3[_0xccc5c6(0xe9)](_0xccc5c6(0x119)+_0x15472c+_0xccc5c6(0x15e),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x15472c)),await sweepOrphansBestEffort(_0x15472c),_0x2015ca?.[_0xccc5c6(0xf5)](_0xccc5c6(0xf3),{'envKey':_0x499d47,'profileName':_0x15472c}),!![];}async function createUnconfiguredCloudProfile(_0x4dc91a,_0x1d969c){const _0x547695=_0x8dce,_0x5482c4={'PksCP':function(_0xa5bc75,_0x1e3829,_0x4fdff8,_0x5e9d38){return _0xa5bc75(_0x1e3829,_0x4fdff8,_0x5e9d38);},'gWCqZ':function(_0x2892ce,_0x146429){return _0x2892ce===_0x146429;}};try{await _0x5482c4[_0x547695(0x15d)](createCloudProfile,_0x4dc91a,undefined,{'settings':_0x1d969c}),warnCloudProfileSharedInOrg();}catch(_0x1179ad){_0x1179ad instanceof ApiError&&_0x5482c4['gWCqZ'](_0x1179ad['status'],0x199)&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x4dc91a+_0x547695(0x144)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4dc91a));throw _0x1179ad;}}async function captureEnvLessProfile(_0x7f8b3f,_0x13607e,_0x3dfbc8,_0xcb67b7){const _0x37400b=_0x8dce,_0xd38004={'wevpG':_0x37400b(0x134),'iDUSn':_0x37400b(0x11a),'GcjpM':'user_declined','BbvTT':function(_0x10d366,_0x548eed){return _0x10d366+_0x548eed;},'Wpecw':function(_0x2ee512,_0x4eba13){return _0x2ee512>_0x4eba13;},'OFpqu':function(_0x26ad7c){return _0x26ad7c();},'VUNWr':function(_0x5a12d5,_0x238acc){return _0x5a12d5 instanceof _0x238acc;},'HFGfC':function(_0x1e4364,_0x20393b){return _0x1e4364+_0x20393b;}};if(!_0x3dfbc8[_0x37400b(0xe2)]){const {capture:_0x171385}=await _0x176ead[_0x37400b(0x108)]([{'type':_0xd38004[_0x37400b(0x112)],'name':'capture','message':_0xd38004[_0x37400b(0x13e)],'default':!![]}]);if(!_0x171385)return _0xcb67b7?.[_0x37400b(0xf5)](_0x37400b(0x106),{'reason':_0xd38004[_0x37400b(0xe0)],'profileName':_0x7f8b3f}),console['error'](_0xd38004[_0x37400b(0x146)](_0x37400b(0x133),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x55f447={};if(_0x3dfbc8[_0x37400b(0x120)])for(const _0x4de4d3 of _0x3dfbc8['setupHeader']){const _0x53e3fb=_0x4de4d3[_0x37400b(0x158)](':');if(_0x53e3fb===-0x1)continue;_0x55f447[_0x4de4d3[_0x37400b(0x14d)](0x0,_0x53e3fb)[_0x37400b(0xee)]()]=_0x4de4d3['slice'](_0x53e3fb+0x1)['trim']();}const _0x5edda6={'baseUrl':_0x13607e};_0xd38004[_0x37400b(0xfb)](Object['keys'](_0x55f447)['length'],0x0)&&(_0x5edda6['setupHeaders']=_0x55f447);let _0x37bcb8;try{_0x37bcb8=await createCloudProfile(_0x7f8b3f,undefined,{'settings':_0x5edda6}),_0xd38004['OFpqu'](warnCloudProfileSharedInOrg);}catch(_0x32a819){_0xd38004['VUNWr'](_0x32a819,ApiError)&&_0x32a819['status']===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x7f8b3f+_0x37400b(0x144)+(_0x37400b(0x14b)+_0x7f8b3f));throw _0x32a819;}return await manualBrowserLogin(_0x37bcb8,{'key':'','domains':[_0x13607e],'setupHeaders':_0xd38004['Wpecw'](Object['keys'](_0x55f447)[_0x37400b(0x105)],0x0)?_0x55f447:undefined}),console['log'](_0xd38004['HFGfC'](_0x37400b(0x127)+_0x7f8b3f+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x37400b(0x11d)+_0x7f8b3f)),await sweepOrphansBestEffort(_0x7f8b3f),_0xcb67b7?.[_0x37400b(0xf5)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x7f8b3f}),!![];}export async function addEnv(_0x47cc63,_0x347a02={},_0x5949d5){const _0x57c060=_0x8dce,_0x45d103={'hYzMC':function(_0x54a7cb,_0x5c4dc9){return _0x54a7cb+_0x5c4dc9;},'lyppF':function(_0x316f13,_0x41d003){return _0x316f13+_0x41d003;},'ncxWz':function(_0x47d60f,_0x416c0d){return _0x47d60f+_0x416c0d;},'HnNOa':_0x57c060(0x14e),'CMxYF':_0x57c060(0x132),'TyXnX':_0x57c060(0x124),'ReMrQ':function(_0x4afa44,_0x21faab){return _0x4afa44!==_0x21faab;},'NlGhW':function(_0x5b4387,_0x14c73b){return _0x5b4387===_0x14c73b;},'Ugtpe':function(_0x4b2913,_0x29f6b8){return _0x4b2913(_0x29f6b8);},'sMBSf':_0x57c060(0x11c),'BfCpC':_0x57c060(0xfa),'QlDBR':function(_0x3dc3c8,_0x4a2d15,_0x2c8681){return _0x3dc3c8(_0x4a2d15,_0x2c8681);},'PKaLo':function(_0x5c6721,_0x4ba5bf,_0x429ac0,_0x30f8e4,_0x5d9dea){return _0x5c6721(_0x4ba5bf,_0x429ac0,_0x30f8e4,_0x5d9dea);},'RltbF':function(_0x2d8e27,_0x3e648f){return _0x2d8e27(_0x3e648f);},'RkMQm':_0x57c060(0x126),'aMgaC':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','emDaK':_0x57c060(0xf7),'xtdeP':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','wJrEa':_0x57c060(0x103),'SxJJS':'What\x20would\x20you\x20like\x20to\x20do?','hapHe':_0x57c060(0x115),'rKLvL':_0x57c060(0x156),'Ptuhj':'Continue\x20anyway','ZlzCv':'continue','zynjm':function(_0x332b14,_0x385786){return _0x332b14(_0x385786);}};_0x347a02['ci']&&(console['error'](_0x45d103['hYzMC'](_0x45d103['lyppF'](_0x45d103[_0x57c060(0x10c)](_0x57c060(0xf9)+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+_0x45d103[_0x57c060(0x13f)],'\x0a')+_0x45d103['CMxYF'],_0x45d103[_0x57c060(0x12b)])),process[_0x57c060(0x159)](0x1));const _0x4d1e00={};if(_0x347a02[_0x57c060(0x120)])for(const _0xaf5661 of _0x347a02[_0x57c060(0x120)]){const _0x2c2ed1=_0xaf5661['indexOf'](':');if(_0x2c2ed1===-0x1)throw new Error(_0x57c060(0xfd)+_0xaf5661+_0x57c060(0xfe));const _0x89420f=_0xaf5661['slice'](0x0,_0x2c2ed1)['trim'](),_0x328ce5=_0xaf5661[_0x57c060(0x14d)](_0x45d103['lyppF'](_0x2c2ed1,0x1))['trim']();_0x4d1e00[_0x89420f]=_0x328ce5;}if(_0x45d103[_0x57c060(0x12e)](_0x347a02['cdpEndpoint'],undefined)&&_0x45d103[_0x57c060(0x13a)](_0x347a02['cdpEndpoint'][_0x57c060(0xee)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x347a02['cdpEndpoint']&&_0x347a02['url'])throw new Error(_0x57c060(0xf0));const _0xa413a8=_0x45d103['Ugtpe'](Boolean,_0x347a02['cdpEndpoint']),_0x556e03=isInteractive();if(!_0x556e03&&!_0x347a02['url']&&!_0xa413a8&&!_0x347a02[_0x57c060(0xf2)])throw new Error(_0x45d103['sMBSf']);if(_0xa413a8){const _0x221704=_0x347a02['cdpEndpoint'];console[_0x57c060(0x160)](_0x45d103['BfCpC']),console[_0x57c060(0x160)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x221704);const _0x289f89={'cdpEndpoint':_0x221704,'isElectron':!![]};Object['keys'](_0x4d1e00)['length']>0x0&&(_0x289f89['setupHeaders']=_0x4d1e00);await _0x45d103['QlDBR'](createUnconfiguredCloudProfile,_0x47cc63,_0x289f89);try{setProfileOverride(process['cwd'](),_0x47cc63,'cdpEndpoint',_0x221704),_0x45d103['PKaLo'](setProfileOverride,process[_0x57c060(0x104)](),_0x47cc63,_0x57c060(0x12d),!![]);}catch(_0x1442c6){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x1442c6 instanceof Error?_0x1442c6[_0x57c060(0x102)]:_0x45d103[_0x57c060(0x15a)](String,_0x1442c6)));}console[_0x57c060(0x160)](_0x57c060(0x136)+_0x47cc63+'\x27\x20created\x20(CDP).'),await _0x45d103[_0x57c060(0x15a)](sweepOrphansBestEffort,_0x47cc63),await _0x45d103[_0x57c060(0x11b)](markActive,_0x47cc63);return;}if(_0x347a02[_0x57c060(0xf2)]){const _0x287d94={};_0x347a02['url']&&(_0x287d94['baseUrl']=_0x347a02['url']);Object['keys'](_0x4d1e00)['length']>0x0&&(_0x287d94[_0x57c060(0x15f)]=_0x4d1e00);await createUnconfiguredCloudProfile(_0x47cc63,_0x287d94),console['log'](_0x57c060(0x119)+_0x47cc63+'\x27\x20created\x20(no\x20session).\x0a'+(_0x57c060(0x10f)+_0x47cc63+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x47cc63),await markActive(_0x47cc63);return;}if(_0x347a02[_0x57c060(0xef)]){const _0x3a9f68=_0x347a02[_0x57c060(0xef)],_0x1f7805=await checkUrlReachability(_0x3a9f68);if(!_0x1f7805['ok']&&!_0x347a02['force'])throw new Error('Could\x20not\x20reach\x20'+_0x3a9f68+':\x20'+_0x1f7805['error']+_0x57c060(0x130));!_0x1f7805['ok']&&_0x347a02[_0x57c060(0x140)]&&console[_0x57c060(0x160)]('⚠\x20Could\x20not\x20reach\x20'+_0x3a9f68+':\x20'+_0x1f7805[_0x57c060(0x116)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x45d103[_0x57c060(0x150)]),console['log'](_0x45d103[_0x57c060(0x148)]),console['log'](_0x57c060(0x100));let _0x4a85f4='',_0x27b772=![];while(!![]){const _0x408629=await _0x176ead[_0x57c060(0x108)]([{'type':_0x57c060(0x154),'name':'baseUrl','message':_0x27b772?_0x45d103[_0x57c060(0xff)]:_0x45d103['xtdeP'],'default':_0x4a85f4||_0x57c060(0x113)}]);_0x4a85f4=_0x408629['baseUrl'];const _0x52119c=await checkUrlReachability(_0x4a85f4);if(_0x52119c['ok'])break;const _0x22e4e9=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x4a85f4),_0x1ee97f=_0x52119c[_0x57c060(0xe3)]&&!_0x22e4e9,_0x5b7c94=_0x1ee97f?_0x57c060(0x128)+_0x4a85f4:null;_0x27b772=!![],console[_0x57c060(0x160)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x4a85f4+':\x20'+_0x52119c['error']);_0x5b7c94&&console['log'](_0x57c060(0x155)+_0x5b7c94+'?');const {action:_0xae5448}=await _0x176ead[_0x57c060(0x108)]([{'type':'list','name':_0x45d103[_0x57c060(0x149)],'message':_0x45d103['SxJJS'],'choices':[..._0x5b7c94?[{'name':'Use\x20'+_0x5b7c94,'value':'use_suggestion'}]:[],{'name':_0x45d103[_0x57c060(0x10d)],'value':_0x45d103['rKLvL']},{'name':_0x45d103['Ptuhj'],'value':'continue'}]}]);if(_0x45d103['NlGhW'](_0xae5448,'use_suggestion')&&_0x5b7c94){_0x4a85f4=_0x5b7c94;const _0x321b61=await checkUrlReachability(_0x4a85f4);if(_0x321b61['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x4a85f4+':\x20'+_0x321b61[_0x57c060(0x116)]);}else{if(_0xae5448===_0x45d103[_0x57c060(0xeb)])break;}}_0x347a02={..._0x347a02,'url':_0x4a85f4};}let _0xa30ad4=![];try{_0xa30ad4=await tryAutoRouteCloudProfile(_0x47cc63,_0x347a02[_0x57c060(0xef)],_0x347a02,_0x556e03,_0x5949d5);}catch(_0x573799){console[_0x57c060(0x116)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x47cc63+'\x22:\x20'+(_0x573799 instanceof Error?_0x573799['message']:_0x45d103[_0x57c060(0x11b)](String,_0x573799))),process['exit'](0x1);}!_0xa30ad4&&process[_0x57c060(0x159)](0x1),await _0x45d103['zynjm'](markActive,_0x47cc63);}
1
+ function _0x2039(){const _0x16a4fa=['list','kITMq','\x27\x20created\x20(no\x20session).\x0a','dhYar','retry','environments','length','startsWith','setupHeaders','profile.add.autoRouted','NUANO','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\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','LhmXK','eoAHL','NODE_TLS_REJECT_UNAUTHORIZED','tEFHF','cdpEndpoint','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','TSLfc','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','kMpQz','CHOZr','What\x20would\x20you\x20like\x20to\x20do?','Syftg','lNUzK','2724575YgGDmS','\x0a\x20\x20(domains:\x20','\x20--skip-auth\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','CktQu','2772080dtxoTH','RgzGI','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x27\x20created.\x0a','4656216ixLZbl','RYTPs','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','7843608fpHPvk','knQLP','error','confirm','log','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','indexOf','fOmfz','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','udcIp','IpGGw','join','includes','isTTY','capture','slice','domains','YYZZS','BjsFA','gZxho','uIdKY','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','ogQOY','Continue\x20anyway','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','7OLmfqd','eyqYx','name','`\x20again\x20without\x20--skip-auth.','trackPhaseEnd','ycUIr','nuoMh','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','BAKXD','message','Enter\x20a\x20different\x20URL','Could\x20not\x20reach\x20','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','env','ovvlZ','GVIid','fetch\x20failed','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','prompt','yRbds','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','cwd','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','GZKVP','1132944YCRfod','status','yyTrO','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','bnZaR','\x0a\x20\x20A\x20profile\x20named\x20\x22','signal','\x0a🌐\x20Profile\x20Setup\x0a','url','stdout','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','baseUrl','\x20--url\x20','1180998rKGbxl','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','test','rVtpA','manual','\x20\x20Set\x20active\x20profile:\x20','\x27\x20to\x20the\x20cloud?','\x20(continuing\x20with\x20--force)','678897NiGOAQ','VURfN','keys','use_suggestion','action','continue','HEAD','.\x20Configured\x20envs:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','exit','gFVed','skipAuth','6KvIcSs','bcuDB','setupHeader','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'];_0x2039=function(){return _0x16a4fa;};return _0x2039();}(function(_0x126a57,_0x5e2f22){const _0x3f7bf3=_0x41c2,_0x3607f8=_0x126a57();while(!![]){try{const _0x18b904=parseInt(_0x3f7bf3(0xe0))/0x1+-parseInt(_0x3f7bf3(0xcb))/0x2+parseInt(_0x3f7bf3(0xd8))/0x3+parseInt(_0x3f7bf3(0x112))/0x4+-parseInt(_0x3f7bf3(0x10d))/0x5*(parseInt(_0x3f7bf3(0xed))/0x6)+-parseInt(_0x3f7bf3(0xb3))/0x7*(-parseInt(_0x3f7bf3(0x116))/0x8)+-parseInt(_0x3f7bf3(0x119))/0x9;if(_0x18b904===_0x5e2f22)break;else _0x3607f8['push'](_0x3607f8['shift']());}catch(_0x4450e2){_0x3607f8['push'](_0x3607f8['shift']());}}}(_0x2039,0x590a7));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x41c2(_0x1d7877,_0x491db5){_0x1d7877=_0x1d7877-0x9e;const _0x203993=_0x2039();let _0x41c2c1=_0x203993[_0x1d7877];return _0x41c2c1;}import _0x5eb420 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x475300=_0x41c2;if(!process[_0x475300(0xd4)][_0x475300(0xa7)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x3a4816){const _0x37b5cc=_0x41c2,_0x2d620d={'LhmXK':function(_0x20436b,_0x143b58,_0x2e1137){return _0x20436b(_0x143b58,_0x2e1137);},'tEFHF':_0x37b5cc(0xe6),'wSKRN':'Invalid\x20URL','CHOZr':function(_0x115f1e,_0x53cb97){return _0x115f1e===_0x53cb97;},'gZxho':'TypeError','ovvlZ':_0x37b5cc(0xc3)};try{const _0x4ad933=new AbortController(),_0x1264df=_0x2d620d[_0x37b5cc(0xff)](setTimeout,()=>_0x4ad933['abort'](),0x1388),_0x264a07={'method':_0x2d620d[_0x37b5cc(0x102)],'signal':_0x4ad933[_0x37b5cc(0xd1)],'redirect':_0x37b5cc(0xdc)};/^https:\/\/localhost(:\d+)?/i['test'](_0x3a4816)&&(process[_0x37b5cc(0xc0)][_0x37b5cc(0x101)]='0');const _0x33b50a=await fetch(_0x3a4816,_0x264a07);delete process[_0x37b5cc(0xc0)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x1264df);if(_0x33b50a[_0x37b5cc(0xcc)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x33b50a['status']};}catch(_0x58ee59){delete process['env'][_0x37b5cc(0x101)];const _0x4c1638=_0x58ee59,_0x5b16fc=_0x4c1638[_0x37b5cc(0xbc)]||String(_0x58ee59),_0x5e7163=_0x5b16fc['includes'](_0x2d620d['wSKRN'])||_0x2d620d[_0x37b5cc(0x109)](_0x4c1638[_0x37b5cc(0xb5)],_0x2d620d[_0x37b5cc(0xad)])||_0x5b16fc[_0x37b5cc(0xa6)](_0x2d620d[_0x37b5cc(0xc1)]);return{'ok':![],'error':_0x5b16fc,'isProtocolError':_0x5e7163};}}async function sweepOrphanLocalProfile(_0x2344f9,_0x52fc81,_0x87f39b){const _0x3535d2=_0x41c2,_0x139d6e={'kITMq':function(_0x3d08c0,_0xe69f83,_0x1e1468){return _0x3d08c0(_0xe69f83,_0x1e1468);},'eyqYx':function(_0x3a730a,_0x3f1072,_0x1a5d2e){return _0x3a730a(_0x3f1072,_0x1a5d2e);},'nuoMh':function(_0x146124,_0x2337ad){return _0x146124(_0x2337ad);},'yRbds':function(_0x38bd42,_0x1169e5,_0x505dd0){return _0x38bd42(_0x1169e5,_0x505dd0);}},_0x4d4aaf=_0x139d6e[_0x3535d2(0xf3)](join,_0x52fc81,'local'),_0x5565d6=_0x139d6e[_0x3535d2(0xb4)](join,_0x4d4aaf,_0x2344f9);_0x139d6e[_0x3535d2(0xb9)](existsSync,_0x5565d6)&&(_0x87f39b&&await _0x139d6e[_0x3535d2(0xb9)](isPathGitTracked,_0x5565d6)?console[_0x3535d2(0x9e)](_0x3535d2(0xba)+_0x5565d6+_0x3535d2(0x118)):(await rm(_0x5565d6,{'recursive':!![],'force':!![]}),console['log'](_0x3535d2(0x104)+_0x5565d6)));if(_0x139d6e['nuoMh'](existsSync,_0x4d4aaf)){let _0xfb97b8=[];try{_0xfb97b8=await _0x139d6e[_0x3535d2(0xb9)](readdir,_0x4d4aaf);}catch{return;}const _0x4609ff='.tmp-'+_0x2344f9+'-';for(const _0x33ebb1 of _0xfb97b8){if(!_0x33ebb1[_0x3535d2(0xf9)](_0x4609ff))continue;const _0x3158fd=_0x139d6e['yRbds'](join,_0x4d4aaf,_0x33ebb1);await _0x139d6e[_0x3535d2(0xc6)](rm,_0x3158fd,{'recursive':!![],'force':!![]}),console[_0x3535d2(0x9e)](_0x3535d2(0x104)+_0x3158fd);}}}async function sweepOrphansBestEffort(_0x30f7c1){const _0x5c0e50=_0x41c2,_0x213e0d={'RgzGI':function(_0x8f8e2){return _0x8f8e2();}};try{await sweepOrphanLocalProfile(_0x30f7c1,getRangerHomeDir(),![]);const _0x3a0de4=getRangerDir();_0x3a0de4!==_0x213e0d[_0x5c0e50(0x113)](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x30f7c1,_0x3a0de4,!![]);}catch(_0x52d433){console['log'](_0x5c0e50(0xd9)+(_0x52d433 instanceof Error?_0x52d433['message']:String(_0x52d433))+').');}}async function markActive(_0x5858e6){const _0x2d6dbd=_0x41c2,_0xd2c9fa={'yZUre':function(_0x94bab8,_0xe6c78d){return _0x94bab8(_0xe6c78d);},'bRsXG':_0x2d6dbd(0x110)};try{await _0xd2c9fa['yZUre'](writeActiveProfileName,_0x5858e6),console['log'](_0x2d6dbd(0xdd)+_0x5858e6);}catch{console['log'](_0xd2c9fa['bRsXG']);}}async function tryAutoRouteCloudProfile(_0x3e611a,_0x4c4786,_0x2ceac2,_0x4e5553,_0x406845){const _0x3c094c=_0x41c2,_0x152008={'rVtpA':function(_0x4490b0,_0x342187){return _0x4490b0===_0x342187;},'RVPAs':'profile.add.autoRouteSkipped','YYZZS':'no_auth_config','VURfN':function(_0x22af16,_0x4e4817){return _0x22af16(_0x4e4817);},'cuuuM':function(_0x402bac,_0xf8192b){return _0x402bac+_0xf8192b;},'gYjhx':function(_0x5d2a29,_0x546fcf){return _0x5d2a29+_0x546fcf;},'GVIid':_0x3c094c(0xfe),'cUuev':_0x3c094c(0xaf),'xlgQR':function(_0x459920,_0x19397f,_0x721211){return _0x459920(_0x19397f,_0x721211);},'uCVOA':'saveToCloud','NUANO':'user_declined','ubNJU':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Syftg':function(_0x59128b,_0xa10a9d,_0x7043e7,_0x4a55b2){return _0x59128b(_0xa10a9d,_0x7043e7,_0x4a55b2);},'ycUIr':_0x3c094c(0xfb)};let _0x29c1a2;try{_0x29c1a2=await fetchAuthConfig();}catch(_0x287e35){return _0x406845?.[_0x3c094c(0xb7)](_0x152008['RVPAs'],{'reason':_0x152008[_0x3c094c(0xab)],'profileName':_0x3e611a}),console[_0x3c094c(0x11b)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x287e35 instanceof Error?_0x287e35[_0x3c094c(0xbc)]:_0x152008[_0x3c094c(0xe1)](String,_0x287e35))),![];}if(!_0x29c1a2||!_0x29c1a2[_0x3c094c(0xf7)]||Object['keys'](_0x29c1a2[_0x3c094c(0xf7)])['length']===0x0){if(_0x4e5553)return await captureEnvLessProfile(_0x3e611a,_0x4c4786,_0x2ceac2,_0x406845);return _0x406845?.['trackPhaseEnd'](_0x152008['RVPAs'],{'reason':_0x152008[_0x3c094c(0xab)],'profileName':_0x3e611a}),console[_0x3c094c(0x11b)](_0x152008['cuuuM'](_0x152008['cuuuM'](_0x152008['gYjhx'](_0x152008[_0x3c094c(0xc2)]+'\x0a'+_0x152008['cUuev'],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x3e611a+_0x3c094c(0xd7)+_0x4c4786+_0x3c094c(0x10f))+'\x0a',_0x3c094c(0x105)),'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login')),![];}const _0x5cccad=_0x152008['xlgQR'](matchAuthEnvironment,_0x4c4786,_0x29c1a2);if(!_0x5cccad)return _0x406845?.[_0x3c094c(0xb7)]('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x3e611a}),console['error'](_0x3c094c(0x114)+_0x4c4786+_0x3c094c(0xe7)+Object[_0x3c094c(0xe2)](_0x29c1a2[_0x3c094c(0xf7)])[_0x3c094c(0xa5)](',\x20')+'.'),![];const _0x462a40=_0x29c1a2[_0x3c094c(0xf7)][_0x5cccad],_0x15158c=_0x462a40?.[_0x3c094c(0xaa)]??[];if(_0x4e5553&&!_0x2ceac2['yes']){const {saveToCloud:_0x2cfe15}=await _0x5eb420['prompt']([{'type':_0x3c094c(0x11c),'name':_0x152008['uCVOA'],'message':'Found\x20auth\x20environment\x20\x27'+_0x5cccad+'\x27\x20matching\x20'+_0x4c4786+_0x3c094c(0x10e)+_0x15158c['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x3e611a+_0x3c094c(0xde),'default':!![]}]);if(!_0x2cfe15)return _0x406845?.['trackPhaseEnd'](_0x152008['RVPAs'],{'reason':_0x152008[_0x3c094c(0xfc)],'profileName':_0x3e611a}),console[_0x3c094c(0x11b)](_0x152008['ubNJU']),![];}const _0x51f890=_0x15158c['some'](_0x442af3=>{const _0x5d1bad=_0x3c094c;try{return _0x152008[_0x5d1bad(0xdb)](new URL(_0x442af3)['origin'],new URL(_0x4c4786)['origin']);}catch{return![];}}),_0x389658={};!_0x51f890&&(_0x389658[_0x3c094c(0xd6)]=_0x4c4786);try{await _0x152008[_0x3c094c(0x10b)](createCloudProfile,_0x3e611a,_0x5cccad,{'settings':_0x389658}),warnCloudProfileSharedInOrg();}catch(_0x82d916){if(_0x82d916 instanceof ApiError&&_0x82d916[_0x3c094c(0xcc)]===0x199){console['error'](_0x152008['gYjhx'](_0x3c094c(0xd0)+_0x3e611a+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x3c094c(0x107)+_0x3e611a));throw _0x82d916;}throw _0x82d916;}return console[_0x3c094c(0x9e)]('✓\x20Profile\x20\x27'+_0x3e611a+_0x3c094c(0x115)+(_0x3c094c(0xbf)+_0x3e611a)),await sweepOrphansBestEffort(_0x3e611a),_0x406845?.['trackPhaseEnd'](_0x152008[_0x3c094c(0xb8)],{'envKey':_0x5cccad,'profileName':_0x3e611a}),!![];}async function createUnconfiguredCloudProfile(_0x2a6e41,_0x3f06a8){const _0x323a4c=_0x41c2,_0x55c9c3={'kYrew':function(_0x170503,_0x366237,_0x479f2d,_0x4b5a98){return _0x170503(_0x366237,_0x479f2d,_0x4b5a98);}};try{await _0x55c9c3['kYrew'](createCloudProfile,_0x2a6e41,undefined,{'settings':_0x3f06a8}),warnCloudProfileSharedInOrg();}catch(_0x251a41){_0x251a41 instanceof ApiError&&_0x251a41[_0x323a4c(0xcc)]===0x199&&console[_0x323a4c(0x11b)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x2a6e41+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x2a6e41));throw _0x251a41;}}async function captureEnvLessProfile(_0x4baf6d,_0x42cde5,_0x4cbeeb,_0x2171b4){const _0x3145c0=_0x41c2,_0x56985d={'kMpQz':_0x3145c0(0x11c),'FTXtP':_0x3145c0(0xd5),'pBTlt':'profile.add.autoRouteSkipped','PcAWx':function(_0x5cec01,_0x48a5a5){return _0x5cec01+_0x48a5a5;},'TSLfc':function(_0x4fec05,_0x4b3d5c){return _0x4fec05===_0x4b3d5c;},'udcIp':function(_0x17d052,_0x2aad13){return _0x17d052>_0x2aad13;},'OqJlX':function(_0x325256,_0x434aef,_0x47c96e,_0x100ad6){return _0x325256(_0x434aef,_0x47c96e,_0x100ad6);},'dhYar':function(_0xd3f84c){return _0xd3f84c();},'Torlf':function(_0x31de24,_0x55e7e7){return _0x31de24 instanceof _0x55e7e7;},'rVdul':function(_0x5c21b2,_0x54882f){return _0x5c21b2+_0x54882f;}};if(!_0x4cbeeb['yes']){const {capture:_0x539589}=await _0x5eb420['prompt']([{'type':_0x56985d[_0x3145c0(0x108)],'name':_0x3145c0(0xa8),'message':_0x56985d['FTXtP'],'default':!![]}]);if(!_0x539589)return _0x2171b4?.[_0x3145c0(0xb7)](_0x56985d['pBTlt'],{'reason':'user_declined','profileName':_0x4baf6d}),console['error'](_0x56985d['PcAWx']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x3145c0(0xce))),![];}const _0x30e4d7={};if(_0x4cbeeb[_0x3145c0(0xef)])for(const _0x480220 of _0x4cbeeb['setupHeader']){const _0x3af1a2=_0x480220[_0x3145c0(0xa0)](':');if(_0x56985d[_0x3145c0(0x106)](_0x3af1a2,-0x1))continue;_0x30e4d7[_0x480220['slice'](0x0,_0x3af1a2)['trim']()]=_0x480220[_0x3145c0(0xa9)](_0x56985d['PcAWx'](_0x3af1a2,0x1))['trim']();}const _0x2174e6={'baseUrl':_0x42cde5};_0x56985d[_0x3145c0(0xa3)](Object[_0x3145c0(0xe2)](_0x30e4d7)[_0x3145c0(0xf8)],0x0)&&(_0x2174e6['setupHeaders']=_0x30e4d7);let _0x4899b3;try{_0x4899b3=await _0x56985d['OqJlX'](createCloudProfile,_0x4baf6d,undefined,{'settings':_0x2174e6}),_0x56985d[_0x3145c0(0xf5)](warnCloudProfileSharedInOrg);}catch(_0x26895){_0x56985d['Torlf'](_0x26895,ApiError)&&_0x26895['status']===0x199&&console['error'](_0x3145c0(0xd0)+_0x4baf6d+_0x3145c0(0xfd)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4baf6d));throw _0x26895;}return await manualBrowserLogin(_0x4899b3,{'key':'','domains':[_0x42cde5],'setupHeaders':Object['keys'](_0x30e4d7)[_0x3145c0(0xf8)]>0x0?_0x30e4d7:undefined}),console[_0x3145c0(0x9e)](_0x56985d['rVdul']('\x0a✓\x20Profile\x20\x27'+_0x4baf6d+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x4baf6d)),await sweepOrphansBestEffort(_0x4baf6d),_0x2171b4?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x4baf6d}),!![];}export async function addEnv(_0x206be3,_0x33c23f={},_0x56d170){const _0x52773c=_0x41c2,_0x45798d={'ogQOY':function(_0xef8486,_0x14cbfe){return _0xef8486+_0x14cbfe;},'BjsFA':function(_0x2b7757,_0x40aa16){return _0x2b7757+_0x40aa16;},'KSBeX':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','fOmfz':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','BwDbs':_0x52773c(0xf1),'gFVed':_0x52773c(0xb2),'BAKXD':'\x20\x20https://docs.ranger.net/main/concepts/profiles','GZKVP':function(_0x292775,_0x4fc343){return _0x292775===_0x4fc343;},'nhziL':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','SFMIo':'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','lPTkk':function(_0x5d8f43,_0x41f9e5){return _0x5d8f43>_0x41f9e5;},'CktQu':function(_0x8f1e74,_0x3f16ca,_0x1e9ca0){return _0x8f1e74(_0x3f16ca,_0x1e9ca0);},'bcuDB':function(_0x69678,_0x3aaf16){return _0x69678 instanceof _0x3aaf16;},'IpGGw':function(_0x581f5c,_0xab920a){return _0x581f5c(_0xab920a);},'eoAHL':function(_0x4d8d88,_0x2f0b8c){return _0x4d8d88(_0x2f0b8c);},'lJYkq':function(_0x2e0416,_0x4c1d95){return _0x2e0416>_0x4c1d95;},'RseHq':function(_0x8222e6,_0x82ea0){return _0x8222e6+_0x82ea0;},'yyTrO':_0x52773c(0xc4),'knQLP':'input','oyyPO':function(_0x375283,_0xdda4fe){return _0x375283(_0xdda4fe);},'lSSof':_0x52773c(0xe4),'bnZaR':_0x52773c(0x10a),'gikqW':_0x52773c(0xf6),'oLBnR':_0x52773c(0xb1),'uIdKY':_0x52773c(0xe5),'RYTPs':function(_0x2c95ac,_0xfc2df4){return _0x2c95ac===_0xfc2df4;},'oDvwW':function(_0x12d460,_0xf9027f,_0x1a9316,_0x1200a4,_0x37d19e,_0x4f4dd5){return _0x12d460(_0xf9027f,_0x1a9316,_0x1200a4,_0x37d19e,_0x4f4dd5);},'lNUzK':function(_0x322a86,_0x4f0d63){return _0x322a86(_0x4f0d63);}};_0x33c23f['ci']&&(console[_0x52773c(0x11b)](_0x45798d[_0x52773c(0xb0)](_0x45798d['ogQOY'](_0x45798d[_0x52773c(0xac)](_0x45798d['KSBeX']+_0x45798d[_0x52773c(0xa1)]+'\x0a',_0x45798d['BwDbs'])+_0x45798d[_0x52773c(0xeb)]+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x45798d[_0x52773c(0xbb)])),process[_0x52773c(0xea)](0x1));const _0x39c1e7={};if(_0x33c23f['setupHeader'])for(const _0x2cb8fb of _0x33c23f[_0x52773c(0xef)]){const _0x2086d0=_0x2cb8fb['indexOf'](':');if(_0x45798d[_0x52773c(0xca)](_0x2086d0,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2cb8fb+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x37e536=_0x2cb8fb['slice'](0x0,_0x2086d0)['trim'](),_0xf93833=_0x2cb8fb['slice'](_0x45798d['ogQOY'](_0x2086d0,0x1))['trim']();_0x39c1e7[_0x37e536]=_0xf93833;}if(_0x33c23f['cdpEndpoint']!==undefined&&_0x33c23f[_0x52773c(0x103)]['trim']()==='')throw new Error(_0x52773c(0xc9));if(_0x33c23f['cdpEndpoint']&&_0x33c23f['url'])throw new Error(_0x45798d['nhziL']);const _0x15f0bb=Boolean(_0x33c23f['cdpEndpoint']),_0x5a2692=isInteractive();if(!_0x5a2692&&!_0x33c23f[_0x52773c(0xd3)]&&!_0x15f0bb&&!_0x33c23f[_0x52773c(0xec)])throw new Error(_0x45798d['SFMIo']);if(_0x15f0bb){const _0x4950b8=_0x33c23f[_0x52773c(0x103)];console[_0x52773c(0x9e)](_0x52773c(0x9f)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x4950b8);const _0x164ef4={'cdpEndpoint':_0x4950b8,'isElectron':!![]};_0x45798d['lPTkk'](Object[_0x52773c(0xe2)](_0x39c1e7)[_0x52773c(0xf8)],0x0)&&(_0x164ef4[_0x52773c(0xfa)]=_0x39c1e7);await _0x45798d[_0x52773c(0x111)](createUnconfiguredCloudProfile,_0x206be3,_0x164ef4);try{setProfileOverride(process['cwd'](),_0x206be3,'cdpEndpoint',_0x4950b8),setProfileOverride(process[_0x52773c(0xc8)](),_0x206be3,'isElectron',!![]);}catch(_0xad2252){console[_0x52773c(0x11b)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x45798d['bcuDB'](_0xad2252,Error)?_0xad2252['message']:_0x45798d['IpGGw'](String,_0xad2252)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x206be3+'\x27\x20created\x20(CDP).'),await _0x45798d[_0x52773c(0x100)](sweepOrphansBestEffort,_0x206be3),await _0x45798d[_0x52773c(0xa4)](markActive,_0x206be3);return;}if(_0x33c23f['skipAuth']){const _0x1cde6e={};_0x33c23f['url']&&(_0x1cde6e['baseUrl']=_0x33c23f[_0x52773c(0xd3)]);_0x45798d['lJYkq'](Object['keys'](_0x39c1e7)['length'],0x0)&&(_0x1cde6e[_0x52773c(0xfa)]=_0x39c1e7);await createUnconfiguredCloudProfile(_0x206be3,_0x1cde6e),console[_0x52773c(0x9e)](_0x45798d['RseHq']('✓\x20Profile\x20\x27'+_0x206be3+_0x52773c(0xf4),_0x52773c(0xe9)+_0x206be3+_0x52773c(0xb6))),await sweepOrphansBestEffort(_0x206be3),await markActive(_0x206be3);return;}if(_0x33c23f[_0x52773c(0xd3)]){const _0x363eb2=_0x33c23f['url'],_0x4845f1=await checkUrlReachability(_0x363eb2);if(!_0x4845f1['ok']&&!_0x33c23f['force'])throw new Error(_0x52773c(0xbe)+_0x363eb2+':\x20'+_0x4845f1[_0x52773c(0x11b)]+_0x52773c(0xa2));!_0x4845f1['ok']&&_0x33c23f['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x363eb2+':\x20'+_0x4845f1[_0x52773c(0x11b)]+_0x52773c(0xdf));}else{console['log'](_0x52773c(0xd2)),console[_0x52773c(0x9e)](_0x52773c(0xe8)),console[_0x52773c(0x9e)](_0x45798d[_0x52773c(0xcd)]);let _0x1aafba='',_0x5574f8=![];while(!![]){const _0x34d63b=await _0x5eb420['prompt']([{'type':_0x45798d[_0x52773c(0x11a)],'name':_0x52773c(0xd6),'message':_0x5574f8?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x52773c(0xf0),'default':_0x1aafba||'http://localhost:3000'}]);_0x1aafba=_0x34d63b['baseUrl'];const _0xcd4014=await _0x45798d['oyyPO'](checkUrlReachability,_0x1aafba);if(_0xcd4014['ok'])break;const _0x15348b=/^[a-zA-Z][\w+.-]*:\/\//[_0x52773c(0xda)](_0x1aafba),_0x135e72=_0xcd4014['isProtocolError']&&!_0x15348b,_0x1ec49b=_0x135e72?'http://'+_0x1aafba:null;_0x5574f8=!![],console[_0x52773c(0x9e)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x1aafba+':\x20'+_0xcd4014['error']);_0x1ec49b&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x1ec49b+'?');const {action:_0x4b4677}=await _0x5eb420[_0x52773c(0xc5)]([{'type':_0x52773c(0xf2),'name':_0x45798d['lSSof'],'message':_0x45798d[_0x52773c(0xcf)],'choices':[..._0x1ec49b?[{'name':'Use\x20'+_0x1ec49b,'value':_0x52773c(0xe3)}]:[],{'name':_0x52773c(0xbd),'value':_0x45798d['gikqW']},{'name':_0x45798d['oLBnR'],'value':_0x45798d[_0x52773c(0xae)]}]}]);if(_0x45798d[_0x52773c(0x117)](_0x4b4677,'use_suggestion')&&_0x1ec49b){_0x1aafba=_0x1ec49b;const _0x9ae17e=await _0x45798d[_0x52773c(0xa4)](checkUrlReachability,_0x1aafba);if(_0x9ae17e['ok'])break;console['log'](_0x52773c(0xc7)+_0x1aafba+':\x20'+_0x9ae17e['error']);}else{if(_0x4b4677==='continue')break;}}_0x33c23f={..._0x33c23f,'url':_0x1aafba};}let _0x5e89e1=![];try{_0x5e89e1=await _0x45798d['oDvwW'](tryAutoRouteCloudProfile,_0x206be3,_0x33c23f[_0x52773c(0xd3)],_0x33c23f,_0x5a2692,_0x56d170);}catch(_0x255b0a){console[_0x52773c(0x11b)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x206be3+'\x22:\x20'+(_0x45798d[_0x52773c(0xee)](_0x255b0a,Error)?_0x255b0a['message']:String(_0x255b0a))),process[_0x52773c(0xea)](0x1);}!_0x5e89e1&&process['exit'](0x1),await _0x45798d[_0x52773c(0x10c)](markActive,_0x206be3);}
@@ -1 +1 @@
1
- function _0x19cc(_0x27521d,_0xde8045){_0x27521d=_0x27521d-0x1af;var _0x25896f=_0x2589();var _0x19ccaf=_0x25896f[_0x27521d];return _0x19ccaf;}(function(_0x5ba5df,_0x41fef7){var _0x4d26d1=_0x19cc,_0x64066a=_0x5ba5df();while(!![]){try{var _0x35ce72=parseInt(_0x4d26d1(0x1b6))/0x1*(parseInt(_0x4d26d1(0x1b3))/0x2)+parseInt(_0x4d26d1(0x1ba))/0x3*(-parseInt(_0x4d26d1(0x1c0))/0x4)+parseInt(_0x4d26d1(0x1b7))/0x5+-parseInt(_0x4d26d1(0x1af))/0x6*(-parseInt(_0x4d26d1(0x1b1))/0x7)+parseInt(_0x4d26d1(0x1bb))/0x8+-parseInt(_0x4d26d1(0x1b9))/0x9+parseInt(_0x4d26d1(0x1bf))/0xa*(-parseInt(_0x4d26d1(0x1bc))/0xb);if(_0x35ce72===_0x41fef7)break;else _0x64066a['push'](_0x64066a['shift']());}catch(_0x430c6f){_0x64066a['push'](_0x64066a['shift']());}}}(_0x2589,0x2ae97));function _0x2589(){var _0x320193=['363027kOIJLO','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','278ztuqjN','\x20\x20https://docs.ranger.net/main/concepts/profiles','gqidG','6HGsFax','1219115BXMElB','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','442602qkfQeC','30cOaJVM','2323056IAmcsg','3575ozYYhD','tTfvt','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','9410naHkcY','22452xbTcDR','6klCJLC','rcXma'];_0x2589=function(){return _0x320193;};return _0x2589();}export async function authEncrypt(_0x1184cc){var _0x4f7411=_0x19cc,_0x5b8f2d={'tRRWX':function(_0x2c0492,_0x9ccc9c){return _0x2c0492+_0x9ccc9c;},'LfBmS':function(_0x2f1b44,_0x583701){return _0x2f1b44+_0x583701;},'gqidG':function(_0xbf58e,_0x2aafbb){return _0xbf58e+_0x2aafbb;},'tTfvt':function(_0x39f18a,_0x2851d1){return _0x39f18a+_0x2851d1;},'rcXma':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'};console['error'](_0x5b8f2d['tRRWX'](_0x5b8f2d['LfBmS'](_0x5b8f2d[_0x4f7411(0x1b5)](_0x5b8f2d[_0x4f7411(0x1bd)]('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a',_0x5b8f2d[_0x4f7411(0x1b0)])+'\x0a',_0x4f7411(0x1be))+_0x4f7411(0x1b2)+'\x0a',_0x4f7411(0x1b8)),_0x4f7411(0x1b4))),process['exit'](0x1);}
1
+ (function(_0x36d827,_0x4e7b3e){var _0x3d07e1=_0x4a99,_0x5708ce=_0x36d827();while(!![]){try{var _0x5287a3=parseInt(_0x3d07e1(0x1f8))/0x1+parseInt(_0x3d07e1(0x1f3))/0x2+-parseInt(_0x3d07e1(0x1fc))/0x3*(-parseInt(_0x3d07e1(0x1f2))/0x4)+parseInt(_0x3d07e1(0x1fb))/0x5*(parseInt(_0x3d07e1(0x1f7))/0x6)+parseInt(_0x3d07e1(0x1ff))/0x7+-parseInt(_0x3d07e1(0x1fe))/0x8+-parseInt(_0x3d07e1(0x200))/0x9;if(_0x5287a3===_0x4e7b3e)break;else _0x5708ce['push'](_0x5708ce['shift']());}catch(_0x255953){_0x5708ce['push'](_0x5708ce['shift']());}}}(_0x4535,0xcc8f8));function _0x4a99(_0x38ea45,_0x576fed){_0x38ea45=_0x38ea45-0x1f2;var _0x453556=_0x4535();var _0x4a99f3=_0x453556[_0x38ea45];return _0x4a99f3;}function _0x4535(){var _0x549100=['12336872kzRETn','9209606fSSzPU','34473483IFidIL','5580784aPfwaB','3041576BOzkeH','BEGaW','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','12WPUKel','859006mMPQJs','dlbrw','error','2799320shjeuD','3RxinsH','exit'];_0x4535=function(){return _0x549100;};return _0x4535();}export async function authEncrypt(_0x128f83){var _0x4430c3=_0x4a99,_0x373347={'KCjYf':function(_0x1426f5,_0x1890e8){return _0x1426f5+_0x1890e8;},'dlbrw':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','BEGaW':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','GKzdP':_0x4430c3(0x1f5)};console[_0x4430c3(0x1fa)](_0x373347['KCjYf'](_0x373347['KCjYf'](_0x4430c3(0x1f6),'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a')+'\x0a'+_0x373347[_0x4430c3(0x1f9)]+_0x373347[_0x4430c3(0x1f4)]+'\x0a'+_0x373347['GKzdP'],'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x4430c3(0x1fd)](0x1);}
@@ -1 +1 @@
1
- const _0x147f21=_0x34c9;(function(_0x5861a8,_0x3217b7){const _0x344920=_0x34c9,_0x39e487=_0x5861a8();while(!![]){try{const _0x56d5ee=-parseInt(_0x344920(0x1d6))/0x1*(parseInt(_0x344920(0x1c2))/0x2)+-parseInt(_0x344920(0x1ad))/0x3*(parseInt(_0x344920(0x1d5))/0x4)+-parseInt(_0x344920(0x1bc))/0x5*(-parseInt(_0x344920(0x1a5))/0x6)+parseInt(_0x344920(0x1cf))/0x7+parseInt(_0x344920(0x1da))/0x8*(parseInt(_0x344920(0x1c6))/0x9)+-parseInt(_0x344920(0x1ab))/0xa+-parseInt(_0x344920(0x1a7))/0xb*(-parseInt(_0x344920(0x1d7))/0xc);if(_0x56d5ee===_0x3217b7)break;else _0x39e487['push'](_0x39e487['shift']());}catch(_0x505116){_0x39e487['push'](_0x39e487['shift']());}}}(_0x4fb7,0xd06dc));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x34c9(_0x28c73d,_0x3f0f75){_0x28c73d=_0x28c73d-0x1a2;const _0x4fb7d8=_0x4fb7();let _0x34c9ef=_0x4fb7d8[_0x28c73d];return _0x34c9ef;}import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x147f21(0x1cc),_0x147f21(0x1bf),'bug-bash',_0x147f21(0x1ba)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x26ee6a){const _0x16ec1f=_0x147f21,_0x47e685=_0x26ee6a[_0x16ec1f(0x1b6)](/\/\*[\s\S]*?\*\//g,''),_0x31dc51=_0x47e685['replace'](/^\s*\/\/.*$/gm,''),_0x722e5b=_0x31dc51['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x16ec1f(0x1af)](_0x722e5b);}async function removeOpencodePluginConfig(_0x5a110c){const _0x1672c2=_0x147f21,_0x3fbc96={'bKHHd':function(_0x1beed2,_0x5d59b4){return _0x1beed2!==_0x5d59b4;},'aAidz':function(_0x468bf9,_0x53fefc){return _0x468bf9!==_0x53fefc;},'yCszN':function(_0x9a8fe,_0x5b2857,_0x65d948){return _0x9a8fe(_0x5b2857,_0x65d948);},'zFHLF':function(_0x301c69,_0x154a66){return _0x301c69===_0x154a66;},'iQBcW':function(_0x45fa49,_0x19784b){return _0x45fa49+_0x19784b;}};if(!existsSync(_0x5a110c))return![];let _0x3ab4a9;try{const _0x3c2148=await _0x3fbc96[_0x1672c2(0x1c3)](readFile,_0x5a110c,'utf-8');_0x3ab4a9=parseJsonc(_0x3c2148);}catch{return![];}const _0x4677c7=Array['isArray'](_0x3ab4a9['plugin'])?_0x3ab4a9['plugin']:[];if(_0x4677c7[_0x1672c2(0x1a9)]===0x0)return![];const _0x296899=_0x4677c7[_0x1672c2(0x1b0)](_0x3ca67f=>{const _0x43ccea=_0x1672c2;if(_0x3fbc96[_0x43ccea(0x1a6)](typeof _0x3ca67f,_0x43ccea(0x1b3)))return!![];return _0x3fbc96[_0x43ccea(0x1e0)](_0x3ca67f,opencodePluginName);});if(_0x296899[_0x1672c2(0x1a9)]===_0x4677c7[_0x1672c2(0x1a9)])return![];return _0x3fbc96[_0x1672c2(0x1ae)](_0x296899[_0x1672c2(0x1a9)],0x0)?delete _0x3ab4a9[_0x1672c2(0x1c1)]:_0x3ab4a9['plugin']=_0x296899,await _0x3fbc96[_0x1672c2(0x1c3)](writeFile,_0x5a110c,_0x3fbc96[_0x1672c2(0x1b7)](JSON['stringify'](_0x3ab4a9,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x32986c){const _0x390f23=_0x147f21,_0xc9aa01={'brqoz':'plugin','ImlcH':_0x390f23(0x1d8),'kieJE':_0x390f23(0x1d9),'LSwqE':_0x390f23(0x1b5),'BSBnt':function(_0x2cb8bb,_0x6ef478){return _0x2cb8bb===_0x6ef478;},'UIxfU':_0x390f23(0x1cd),'SWIzI':'close'};return new Promise(_0x55b96e=>{const _0x599d7d=_0x390f23,_0x28fb6a=[_0xc9aa01['brqoz'],_0xc9aa01[_0x599d7d(0x1c8)],'ranger@trailhead'];_0x32986c&&_0x28fb6a['push'](_0x599d7d(0x1b2),_0x32986c);const _0x5797de=spawn(_0xc9aa01['kieJE'],_0x28fb6a,{'stdio':['ignore',_0xc9aa01[_0x599d7d(0x1aa)],_0x599d7d(0x1b5)],'cwd':_0x32986c?getProjectRoot():undefined,'shell':_0xc9aa01[_0x599d7d(0x1e1)](process['platform'],_0xc9aa01[_0x599d7d(0x1c0)])});_0x5797de['on'](_0xc9aa01['SWIzI'],_0x16d89c=>{_0x55b96e(_0x16d89c===0x0);}),_0x5797de['on']('error',()=>{_0x55b96e(![]);});});}async function removeMarketplace(){const _0x489057=_0x147f21,_0x2be5b0={'JXrVx':'marketplace','Fdsrf':_0x489057(0x1d3),'woVfB':_0x489057(0x1a3),'vDTjx':_0x489057(0x1b5),'zBjnk':'win32','fcHMh':'close','gYPdV':_0x489057(0x1be)};return new Promise(_0x4a4882=>{const _0x389e56=_0x489057,_0x5ae101={'KKZHV':function(_0x1734a5,_0x149f7f){return _0x1734a5(_0x149f7f);},'PqQQB':function(_0x4f3647,_0x4334ff){return _0x4f3647===_0x4334ff;}},_0x28d262=spawn('claude',['plugin',_0x2be5b0['JXrVx'],_0x2be5b0['Fdsrf'],_0x2be5b0[_0x389e56(0x1c9)]],{'stdio':[_0x2be5b0[_0x389e56(0x1c4)],_0x389e56(0x1b5),_0x389e56(0x1b5)],'shell':process['platform']===_0x2be5b0[_0x389e56(0x1a4)]});_0x28d262['on'](_0x2be5b0['fcHMh'],_0x4eee47=>{const _0x26b104=_0x389e56;_0x5ae101[_0x26b104(0x1d4)](_0x4a4882,_0x5ae101['PqQQB'](_0x4eee47,0x0));}),_0x28d262['on'](_0x2be5b0[_0x389e56(0x1db)],()=>{_0x4a4882(![]);});});}function _0x4fb7(){const _0x4cc91a=['ImlcH','woVfB','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','ranger','win32','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','7299089ACKSLe','user','pScqJ','opyPN','remove','KKZHV','2724360CCPDGg','149oPZiHm','1957992jHyjvp','uninstall','claude','40808UQftpp','gYPdV','log','✓\x20Removed\x20project\x20skill:\x20','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','✓\x20Removed\x20stored\x20credentials','aAidz','BSBnt','LQdic','trailhead','zBjnk','668292JhowdM','bKHHd','110BUpLJn','myuSy','length','LSwqE','4259050HshJTm','GzCBb','3NHenSg','zFHLF','parse','filter','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','--scope','string','YsZks','ignore','replace','iQBcW','✓\x20Removed\x20.ranger/\x20directory','yaVXL','e2e-test-recommender','Ltlrr','20lPCCES','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','error','feature-tracker','UIxfU','plugin','18230VAchIN','yCszN','vDTjx','✓\x20Removed\x20user\x20skill:\x20','351vwPSOf','BZHJv'];_0x4fb7=function(){return _0x4cc91a;};return _0x4fb7();}export async function clean(){const _0x47c353=_0x147f21,_0x3d5d05={'GzCBb':function(_0x5e52d6,_0x1cf3fd){return _0x5e52d6(_0x1cf3fd);},'myuSy':function(_0x19fa36){return _0x19fa36();},'pScqJ':function(_0xf4a426,_0x62fbf,_0x14d67e){return _0xf4a426(_0x62fbf,_0x14d67e);},'mjAct':function(_0x2b12f8,_0x5e6730,_0x534387){return _0x2b12f8(_0x5e6730,_0x534387);},'fQnPP':function(_0x5211dd,_0x59bdbb){return _0x5211dd(_0x59bdbb);},'DrYrV':function(_0x95cf3,_0x5cc540){return _0x95cf3(_0x5cc540);},'yaVXL':_0x47c353(0x1d0),'LQdic':function(_0x8f90a1,_0x29147d,_0x22f14b){return _0x8f90a1(_0x29147d,_0x22f14b);},'BZHJv':function(_0x35e52f,_0x2a7240){return _0x35e52f(_0x2a7240);},'Ltlrr':'project','YsZks':'opencode.json','EUcoL':function(_0x4b6199,_0x5b25c0){return _0x4b6199(_0x5b25c0);},'Iqlmi':_0x47c353(0x1ce),'opyPN':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0x47c353(0x1dc)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x342b34=![];try{await deleteAllCredentials(),console['log'](_0x47c353(0x1df)),_0x342b34=!![];}catch{}const _0x4e4e44=getCacheFile();existsSync(_0x4e4e44)&&(await _0x3d5d05[_0x47c353(0x1ac)](rm,_0x4e4e44),_0x342b34=!![]);const _0xb24aea=_0x3d5d05[_0x47c353(0x1a8)](getRangerDir);existsSync(_0xb24aea)&&(await rm(_0xb24aea,{'recursive':!![]}),console['log'](_0x47c353(0x1b8)),_0x342b34=!![]);const _0x3b9ad4=getProjectSkillsDir();for(const _0x590e67 of skillsToRemove){const _0x5a2ca3=join(_0x3b9ad4,_0x590e67);existsSync(_0x5a2ca3)&&(await _0x3d5d05[_0x47c353(0x1d1)](rm,_0x5a2ca3,{'recursive':!![]}),console['log'](_0x47c353(0x1dd)+_0x590e67),_0x342b34=!![]);}const _0x3598c8=_0x3d5d05[_0x47c353(0x1a8)](getUserSkillsDir);for(const _0x1fe297 of skillsToRemove){const _0x491541=_0x3d5d05['mjAct'](join,_0x3598c8,_0x1fe297);_0x3d5d05['fQnPP'](existsSync,_0x491541)&&(await rm(_0x491541,{'recursive':!![]}),console[_0x47c353(0x1dc)](_0x47c353(0x1c5)+_0x1fe297),_0x342b34=!![]);}const _0x588370=getOpencodeSkillsDir('project');for(const _0x2e3a83 of skillsToRemove){const _0x1e9c3f=_0x3d5d05[_0x47c353(0x1d1)](join,_0x588370,_0x2e3a83);_0x3d5d05['DrYrV'](existsSync,_0x1e9c3f)&&(await rm(_0x1e9c3f,{'recursive':!![]}),console['log'](_0x47c353(0x1de)+_0x2e3a83),_0x342b34=!![]);}const _0x400857=_0x3d5d05['DrYrV'](getOpencodeSkillsDir,_0x3d5d05[_0x47c353(0x1b9)]);for(const _0x945c94 of skillsToRemove){const _0x189011=_0x3d5d05[_0x47c353(0x1d1)](join,_0x400857,_0x945c94);_0x3d5d05[_0x47c353(0x1ac)](existsSync,_0x189011)&&(await _0x3d5d05[_0x47c353(0x1a2)](rm,_0x189011,{'recursive':!![]}),console['log'](_0x47c353(0x1b1)+_0x945c94),_0x342b34=!![]);}const _0x4e76e7=_0x3d5d05[_0x47c353(0x1a2)](join,_0x3d5d05[_0x47c353(0x1c7)](getOpencodeConfigDir,_0x3d5d05[_0x47c353(0x1bb)]),_0x3d5d05[_0x47c353(0x1b4)]);await removeOpencodePluginConfig(_0x4e76e7)&&(console['log'](_0x47c353(0x1cb)),_0x342b34=!![]);const _0x1f51cd=join(_0x3d5d05['EUcoL'](getOpencodeConfigDir,_0x3d5d05['yaVXL']),_0x3d5d05['YsZks']);await removeOpencodePluginConfig(_0x1f51cd)&&(console[_0x47c353(0x1dc)](_0x47c353(0x1ca)),_0x342b34=!![]);const _0x529ddf=await uninstallClaudePlugin();_0x529ddf&&(console[_0x47c353(0x1dc)](_0x3d5d05['Iqlmi']),_0x342b34=!![]);const _0x58f14f=await _0x3d5d05['EUcoL'](uninstallClaudePlugin,_0x3d5d05[_0x47c353(0x1bb)]);_0x58f14f&&(console[_0x47c353(0x1dc)](_0x47c353(0x1bd)),_0x342b34=!![]);const _0x229738=await _0x3d5d05['myuSy'](removeMarketplace);_0x229738&&(console[_0x47c353(0x1dc)](_0x3d5d05[_0x47c353(0x1d2)]),_0x342b34=!![]),_0x342b34?console[_0x47c353(0x1dc)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x167a59=_0x57a5;(function(_0x4cfb24,_0x30afe3){const _0x447656=_0x57a5,_0x4d7b9a=_0x4cfb24();while(!![]){try{const _0x37c62d=-parseInt(_0x447656(0xf2))/0x1*(parseInt(_0x447656(0x10f))/0x2)+-parseInt(_0x447656(0xf0))/0x3*(-parseInt(_0x447656(0x11d))/0x4)+-parseInt(_0x447656(0x10c))/0x5*(-parseInt(_0x447656(0x121))/0x6)+-parseInt(_0x447656(0x11b))/0x7*(-parseInt(_0x447656(0xfa))/0x8)+parseInt(_0x447656(0xfd))/0x9+-parseInt(_0x447656(0xf9))/0xa+-parseInt(_0x447656(0x119))/0xb*(-parseInt(_0x447656(0x10e))/0xc);if(_0x37c62d===_0x30afe3)break;else _0x4d7b9a['push'](_0x4d7b9a['shift']());}catch(_0x1d604d){_0x4d7b9a['push'](_0x4d7b9a['shift']());}}}(_0x1794,0x5ac17));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x1794(){const _0x2d3f2d=['12sxOPOm','58444pZpqlE','LGLaz','JBtZk','\x0a✅\x20Cleanup\x20complete!\x0a','qgweW','isArray','opencode.json','close','JPKnk','fyKhb','1151711fypGfK','rYNkb','2858198ecTzbq','XOOWd','381884JTyyzz','push','GANqW','✓\x20Removed\x20.ranger/\x20directory','297324VvuiWi','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','plugin','platform','PDrMH','gPhPN','AlLjW','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','parse','length','rJCgD','✓\x20Removed\x20trailhead\x20marketplace','kRLoP','CiXGc','9GlZzzt','hbSaT','19hfRGZb','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','@ranger-testing/opencode-plugin','NdMiQ','filter','error','remove','4803900wAzcwi','8ZWvdse','FNCNV','✓\x20Removed\x20user\x20skill:\x20','4579263SduJDl','user','MjzuE','win32','replace','project','log','rtiSh','VeyOv','ukJll','UtsUT','marketplace','ZXmZu','ddeZR','ignore','10nvCLhv','XtqXh'];_0x1794=function(){return _0x2d3f2d;};return _0x1794();}import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x57a5(_0x45cfae,_0x5c8d9e){_0x45cfae=_0x45cfae-0xe3;const _0x1794bb=_0x1794();let _0x57a528=_0x1794bb[_0x45cfae];return _0x57a528;}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName=_0x167a59(0xf4);function parseJsonc(_0x2afa8a){const _0x2445c2=_0x167a59,_0x416aab=_0x2afa8a['replace'](/\/\*[\s\S]*?\*\//g,''),_0xab41c=_0x416aab[_0x2445c2(0x101)](/^\s*\/\/.*$/gm,''),_0x40a659=_0xab41c[_0x2445c2(0x101)](/,\s*([}\]])/g,'$1');return JSON[_0x2445c2(0xea)](_0x40a659);}async function removeOpencodePluginConfig(_0x142119){const _0x3434e5=_0x167a59,_0x5386da={'VeyOv':function(_0x3ddfda,_0x445c2c){return _0x3ddfda!==_0x445c2c;},'Pthrj':'string','YZZgM':function(_0x461ee7,_0x5dc18d){return _0x461ee7(_0x5dc18d);},'UtsUT':function(_0x237519,_0xa6589f,_0x3871d7){return _0x237519(_0xa6589f,_0x3871d7);},'JBtZk':function(_0x51e98c,_0x497696){return _0x51e98c===_0x497696;},'LdVuo':function(_0x278404,_0x5afce8){return _0x278404===_0x5afce8;},'gPhPN':function(_0x5de9a2,_0xcfdb4){return _0x5de9a2+_0xcfdb4;}};if(!_0x5386da['YZZgM'](existsSync,_0x142119))return![];let _0x14d604;try{const _0xa301bb=await _0x5386da['UtsUT'](readFile,_0x142119,'utf-8');_0x14d604=parseJsonc(_0xa301bb);}catch{return![];}const _0x3c450a=Array[_0x3434e5(0x114)](_0x14d604[_0x3434e5(0xe4)])?_0x14d604['plugin']:[];if(_0x5386da[_0x3434e5(0x111)](_0x3c450a[_0x3434e5(0xeb)],0x0))return![];const _0x261bd1=_0x3c450a[_0x3434e5(0xf6)](_0x15a9d9=>{const _0x2de863=_0x3434e5;if(_0x5386da[_0x2de863(0x105)](typeof _0x15a9d9,_0x5386da['Pthrj']))return!![];return _0x15a9d9!==opencodePluginName;});if(_0x5386da['LdVuo'](_0x261bd1[_0x3434e5(0xeb)],_0x3c450a[_0x3434e5(0xeb)]))return![];return _0x5386da[_0x3434e5(0x111)](_0x261bd1[_0x3434e5(0xeb)],0x0)?delete _0x14d604['plugin']:_0x14d604[_0x3434e5(0xe4)]=_0x261bd1,await _0x5386da[_0x3434e5(0x107)](writeFile,_0x142119,_0x5386da[_0x3434e5(0xe7)](JSON['stringify'](_0x14d604,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3708e7){const _0x6136ba=_0x167a59,_0x5da422={'ZXmZu':_0x6136ba(0xe4),'rtiSh':'uninstall','RRlMJ':'--scope','ukJll':function(_0x15bb86,_0x4f0efc,_0x3b5352,_0x17f368){return _0x15bb86(_0x4f0efc,_0x3b5352,_0x17f368);},'ueUzj':'claude','fyKhb':_0x6136ba(0x10b),'JPKnk':function(_0x5d54d7){return _0x5d54d7();}};return new Promise(_0x510205=>{const _0x2f44cb=_0x6136ba,_0x3e63fd=[_0x5da422[_0x2f44cb(0x109)],_0x5da422[_0x2f44cb(0x104)],'ranger@trailhead'];_0x3708e7&&_0x3e63fd[_0x2f44cb(0x11e)](_0x5da422['RRlMJ'],_0x3708e7);const _0x4c7417=_0x5da422[_0x2f44cb(0x106)](spawn,_0x5da422['ueUzj'],_0x3e63fd,{'stdio':[_0x5da422[_0x2f44cb(0x118)],_0x5da422['fyKhb'],_0x2f44cb(0x10b)],'cwd':_0x3708e7?_0x5da422[_0x2f44cb(0x117)](getProjectRoot):undefined,'shell':process[_0x2f44cb(0xe5)]==='win32'});_0x4c7417['on'](_0x2f44cb(0x116),_0x5516af=>{_0x510205(_0x5516af===0x0);}),_0x4c7417['on']('error',()=>{_0x510205(![]);});});}async function removeMarketplace(){const _0x770a33=_0x167a59,_0x45522b={'WwIiz':function(_0x4092a7,_0x28e560){return _0x4092a7(_0x28e560);},'fLRqE':function(_0x58e83d,_0x46b477,_0x16b65b,_0x487169){return _0x58e83d(_0x46b477,_0x16b65b,_0x487169);},'ndaPR':'claude','zEHFe':_0x770a33(0x108),'kRLoP':'ignore','Hvhep':function(_0x428421,_0x32bdfd){return _0x428421===_0x32bdfd;},'ucxtI':'close','rJCgD':_0x770a33(0xf7)};return new Promise(_0x1c4d11=>{const _0x350fa3=_0x770a33,_0x2778f3=_0x45522b['fLRqE'](spawn,_0x45522b['ndaPR'],[_0x350fa3(0xe4),_0x45522b['zEHFe'],_0x350fa3(0xf8),'trailhead'],{'stdio':[_0x350fa3(0x10b),_0x45522b[_0x350fa3(0xee)],_0x45522b['kRLoP']],'shell':_0x45522b['Hvhep'](process['platform'],_0x350fa3(0x100))});_0x2778f3['on'](_0x45522b['ucxtI'],_0x49fe9b=>{_0x1c4d11(_0x49fe9b===0x0);}),_0x2778f3['on'](_0x45522b[_0x350fa3(0xec)],()=>{_0x45522b['WwIiz'](_0x1c4d11,![]);});});}export async function clean(){const _0x3c1b1b=_0x167a59,_0x3a1d9a={'aZhAE':function(_0x153017){return _0x153017();},'zbDLM':'✓\x20Removed\x20stored\x20credentials','TOoDT':function(_0x180311,_0x162318){return _0x180311(_0x162318);},'NdMiQ':function(_0x34ec22){return _0x34ec22();},'CiXGc':function(_0x47615a,_0x1f5f40){return _0x47615a(_0x1f5f40);},'MjzuE':_0x3c1b1b(0x120),'rYNkb':function(_0xdad3d0){return _0xdad3d0();},'LGLaz':function(_0x2bbadd,_0x14f123,_0x56d739){return _0x2bbadd(_0x14f123,_0x56d739);},'FNCNV':function(_0x161e3f,_0x520ce7){return _0x161e3f(_0x520ce7);},'ddeZR':_0x3c1b1b(0x102),'qgweW':function(_0x5f1d04,_0xb9b9b,_0x42ced6){return _0x5f1d04(_0xb9b9b,_0x42ced6);},'XOOWd':_0x3c1b1b(0x115),'hbSaT':function(_0x3c0ace,_0x383fd4){return _0x3c0ace(_0x383fd4);},'GANqW':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','afjES':function(_0x3876f3,_0x271040){return _0x3876f3(_0x271040);},'XtqXh':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','ReRek':_0x3c1b1b(0xe3),'AlLjW':_0x3c1b1b(0xed),'PDrMH':_0x3c1b1b(0x112),'aMKzJ':'Nothing\x20to\x20clean\x20up.\x0a'};console['log'](_0x3c1b1b(0xf3));let _0x2ad03f=![];try{await _0x3a1d9a['aZhAE'](deleteAllCredentials),console['log'](_0x3a1d9a['zbDLM']),_0x2ad03f=!![];}catch{}const _0x2de3d7=getCacheFile();_0x3a1d9a['TOoDT'](existsSync,_0x2de3d7)&&(await _0x3a1d9a['TOoDT'](rm,_0x2de3d7),_0x2ad03f=!![]);const _0x1b28f3=_0x3a1d9a[_0x3c1b1b(0xf5)](getRangerDir);_0x3a1d9a['CiXGc'](existsSync,_0x1b28f3)&&(await rm(_0x1b28f3,{'recursive':!![]}),console[_0x3c1b1b(0x103)](_0x3a1d9a[_0x3c1b1b(0xff)]),_0x2ad03f=!![]);const _0x414810=_0x3a1d9a[_0x3c1b1b(0x11a)](getProjectSkillsDir);for(const _0x4c4707 of skillsToRemove){const _0x33d633=_0x3a1d9a['LGLaz'](join,_0x414810,_0x4c4707);_0x3a1d9a['FNCNV'](existsSync,_0x33d633)&&(await rm(_0x33d633,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x4c4707),_0x2ad03f=!![]);}const _0x2ec510=getUserSkillsDir();for(const _0x1e9dd1 of skillsToRemove){const _0x461e80=_0x3a1d9a['LGLaz'](join,_0x2ec510,_0x1e9dd1);_0x3a1d9a[_0x3c1b1b(0xfb)](existsSync,_0x461e80)&&(await _0x3a1d9a[_0x3c1b1b(0x110)](rm,_0x461e80,{'recursive':!![]}),console['log'](_0x3c1b1b(0xfc)+_0x1e9dd1),_0x2ad03f=!![]);}const _0x317668=getOpencodeSkillsDir(_0x3a1d9a[_0x3c1b1b(0x10a)]);for(const _0x44d43c of skillsToRemove){const _0x203c73=join(_0x317668,_0x44d43c);_0x3a1d9a[_0x3c1b1b(0xef)](existsSync,_0x203c73)&&(await rm(_0x203c73,{'recursive':!![]}),console[_0x3c1b1b(0x103)](_0x3c1b1b(0xe9)+_0x44d43c),_0x2ad03f=!![]);}const _0x420d37=_0x3a1d9a[_0x3c1b1b(0xfb)](getOpencodeSkillsDir,_0x3c1b1b(0xfe));for(const _0x4b0fb5 of skillsToRemove){const _0x379fcf=_0x3a1d9a[_0x3c1b1b(0x113)](join,_0x420d37,_0x4b0fb5);existsSync(_0x379fcf)&&(await rm(_0x379fcf,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x4b0fb5),_0x2ad03f=!![]);}const _0x2bc4ee=_0x3a1d9a[_0x3c1b1b(0x113)](join,_0x3a1d9a['FNCNV'](getOpencodeConfigDir,_0x3a1d9a[_0x3c1b1b(0x10a)]),_0x3a1d9a[_0x3c1b1b(0x11c)]);await _0x3a1d9a[_0x3c1b1b(0xf1)](removeOpencodePluginConfig,_0x2bc4ee)&&(console[_0x3c1b1b(0x103)](_0x3a1d9a[_0x3c1b1b(0x11f)]),_0x2ad03f=!![]);const _0x37c916=join(_0x3a1d9a['afjES'](getOpencodeConfigDir,'user'),'opencode.json');await removeOpencodePluginConfig(_0x37c916)&&(console[_0x3c1b1b(0x103)](_0x3a1d9a[_0x3c1b1b(0x10d)]),_0x2ad03f=!![]);const _0xe4fe93=await _0x3a1d9a[_0x3c1b1b(0x11a)](uninstallClaudePlugin);_0xe4fe93&&(console[_0x3c1b1b(0x103)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x2ad03f=!![]);const _0xf9cd27=await _0x3a1d9a['TOoDT'](uninstallClaudePlugin,_0x3a1d9a[_0x3c1b1b(0x10a)]);_0xf9cd27&&(console['log'](_0x3a1d9a['ReRek']),_0x2ad03f=!![]);const _0x28e4b7=await removeMarketplace();_0x28e4b7&&(console[_0x3c1b1b(0x103)](_0x3a1d9a[_0x3c1b1b(0xe8)]),_0x2ad03f=!![]),_0x2ad03f?console[_0x3c1b1b(0x103)](_0x3a1d9a[_0x3c1b1b(0xe6)]):console[_0x3c1b1b(0x103)](_0x3a1d9a['aMKzJ']);}
@@ -1 +1 @@
1
- (function(_0x530202,_0x1a8cc2){const _0x1f1b7d=_0x3264,_0x42054c=_0x530202();while(!![]){try{const _0x282e67=-parseInt(_0x1f1b7d(0x208))/0x1+-parseInt(_0x1f1b7d(0x1fb))/0x2*(-parseInt(_0x1f1b7d(0x1f4))/0x3)+-parseInt(_0x1f1b7d(0x1ec))/0x4+-parseInt(_0x1f1b7d(0x1f2))/0x5+-parseInt(_0x1f1b7d(0x1ea))/0x6*(-parseInt(_0x1f1b7d(0x1fa))/0x7)+parseInt(_0x1f1b7d(0x1d8))/0x8*(-parseInt(_0x1f1b7d(0x1f5))/0x9)+parseInt(_0x1f1b7d(0x1db))/0xa;if(_0x282e67===_0x1a8cc2)break;else _0x42054c['push'](_0x42054c['shift']());}catch(_0x5a2b65){_0x42054c['push'](_0x42054c['shift']());}}}(_0x334c,0xbe5fe));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';function _0x3264(_0x55a355,_0x12a98d){_0x55a355=_0x55a355-0x1d7;const _0x334cc2=_0x334c();let _0x326424=_0x334cc2[_0x55a355];return _0x326424;}const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x48fd2c,_0x22c992){const _0x19f5fa=_0x3264;if(BOOLEAN_KEYS[_0x19f5fa(0x1e3)](_0x48fd2c)){if(_0x22c992==='true')return!![];if(_0x22c992===_0x19f5fa(0x1e5))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x48fd2c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x22c992;}function parseOverrideValue(_0x3d1fbb){const _0x348e94=_0x3264,_0x67bfa0={'LlucI':'true','rnBUO':function(_0x93ab4e,_0x25d033){return _0x93ab4e===_0x25d033;},'fNLeq':function(_0x31fe6f,_0x46d7c1){return _0x31fe6f===_0x46d7c1;},'SWCGR':'null','bejpG':function(_0x43fd9f,_0x1b70a8){return _0x43fd9f===_0x1b70a8;},'cvkqY':function(_0x46c051,_0x341361){return _0x46c051(_0x341361);},'JkFOW':function(_0x2a024d,_0x52adad){return _0x2a024d(_0x52adad);}};if(_0x3d1fbb===_0x67bfa0[_0x348e94(0x203)])return!![];if(_0x67bfa0['rnBUO'](_0x3d1fbb,'false'))return![];if(_0x67bfa0['fNLeq'](_0x3d1fbb,_0x67bfa0[_0x348e94(0x1df)]))return null;if(_0x67bfa0['bejpG'](_0x3d1fbb,_0x348e94(0x1fe)))return undefined;if(/^-?\d+$/[_0x348e94(0x1e7)](_0x3d1fbb)){const _0x109554=_0x67bfa0['cvkqY'](Number,_0x3d1fbb);if(Number['isSafeInteger'](_0x109554))return _0x109554;}if(/^-?\d+\.\d+$/[_0x348e94(0x1e7)](_0x3d1fbb)){const _0x21962a=_0x67bfa0['JkFOW'](Number,_0x3d1fbb);if(!Number[_0x348e94(0x1e0)](_0x21962a))return _0x21962a;}const _0xc9d79c=_0x3d1fbb['trim']();if(_0xc9d79c['startsWith']('{')&&_0xc9d79c[_0x348e94(0x1da)]('}')||_0xc9d79c['startsWith']('[')&&_0xc9d79c['endsWith'](']'))try{return JSON[_0x348e94(0x1ed)](_0xc9d79c);}catch{}return _0x3d1fbb;}function _0x334c(){const _0x12edf3=['4796908sAKtNL','parse','(not\x20set)','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','RFPYe','\x20=\x20','3119415KwKtoW','utaQe','1599YpAXqs','9lZzlXt','eBZyt','hTyOD','Removed\x20','oeCLs','1043PkUJLz','4714PPKlcO','Set\x20','alsoExistsElsewhere','undefined','jttgQ','pcbPq','NBYoX','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','LlucI','yzgeZ','Profile\x20\x22','yhbYK','\x20\x20Note:\x20\x22','45071eVnISE','log','Wuycg','1072696XYNTyF','stringify','endsWith','15068380zlZygv','\x20for\x20\x22','KOGUV','Key\x20\x22','SWCGR','isNaN','cloud','qjXMA','includes','CNwmj','false','No\x20configuration\x20set\x20for\x20\x22','test','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','settings','762JWNOcL','kind'];_0x334c=function(){return _0x12edf3;};return _0x334c();}async function resolveProfileTarget(_0x5ae394){const _0xa45446=_0x3264,_0x98362f={'yzgeZ':function(_0x3711fa,_0x33720f){return _0x3711fa(_0x33720f);},'oeCLs':'local'},_0x3436fd=existsSync(_0x98362f[_0xa45446(0x204)](getEnvDir,_0x5ae394));let _0x1944ae=![];try{const _0xc1d96c=await fetchCloudProfile(_0x5ae394);_0x1944ae=Boolean(_0xc1d96c);}catch{}if(_0x1944ae)return{'kind':_0xa45446(0x1e1),'alsoExistsElsewhere':_0x3436fd};if(_0x3436fd)return{'kind':_0x98362f[_0xa45446(0x1f9)],'alsoExistsElsewhere':![]};throw new Error(_0xa45446(0x205)+_0x5ae394+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x5ae394);}function printDualExistsHint(_0x31faf8){const _0x45d6c7=_0x3264;console[_0x45d6c7(0x209)](_0x45d6c7(0x207)+_0x31faf8+_0x45d6c7(0x1ef));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2833aa){const _0x15c3d8=_0x3264,_0x44ff5f={'eBZyt':function(_0x1959a4,_0x52ff2e){return _0x1959a4(_0x52ff2e);}},_0x4b2185=await _0x44ff5f[_0x15c3d8(0x1f6)](fetchCloudProfile,_0x2833aa),_0x2fb952=readProfileOverrides(getProjectPath(),_0x2833aa);return mergeCloudProfileSettings(_0x4b2185?.[_0x15c3d8(0x1e9)]??{},_0x2fb952??undefined);}export async function configSet(_0x3817db,_0x4d8428,_0xf69608){const _0x2c2cef=_0x3264,_0x1ec5f6={'Emnzf':'cloud','qjXMA':function(_0x2746b8,_0x5002e1){return _0x2746b8(_0x5002e1);},'ZyorC':function(_0x2e0707,_0x185a46){return _0x2e0707(_0x185a46);},'EjbTq':function(_0x3d9928){return _0x3d9928();},'GvMrd':function(_0x112fba,_0x2c1a8f,_0x4307ba){return _0x112fba(_0x2c1a8f,_0x4307ba);}},_0x54d937=await resolveProfileTarget(_0x3817db);if(_0x54d937[_0x2c2cef(0x1eb)]===_0x1ec5f6['Emnzf']){if(_0x54d937[_0x2c2cef(0x1fd)])_0x1ec5f6[_0x2c2cef(0x1e2)](printDualExistsHint,_0x3817db);const _0x1bf516=_0x1ec5f6['ZyorC'](parseOverrideValue,_0xf69608);setProfileOverride(_0x1ec5f6['EjbTq'](getProjectPath),_0x3817db,_0x4d8428,_0x1bf516),console['log'](_0x2c2cef(0x1fc)+_0x4d8428+'\x20=\x20'+JSON[_0x2c2cef(0x1d9)](_0x1bf516)+'\x20for\x20\x22'+_0x3817db+'\x22');return;}const _0x134dbc=_0x1ec5f6['GvMrd'](parseLocalValue,_0x4d8428,_0xf69608);setProfileOverride(getProjectPath(),_0x3817db,_0x4d8428,_0x134dbc),console['log'](_0x2c2cef(0x1fc)+_0x4d8428+_0x2c2cef(0x1f1)+_0x134dbc+_0x2c2cef(0x1dc)+_0x3817db+'\x22');}export async function configGet(_0x422303,_0x50a21f){const _0x9f3ebf=_0x3264,_0x40f527={'jttgQ':function(_0x1ac420,_0x12a42f){return _0x1ac420(_0x12a42f);},'pcbPq':function(_0x3a2218,_0x585fcd){return _0x3a2218===_0x585fcd;},'hTyOD':function(_0xd35572,_0x564638,_0x5e15b0){return _0xd35572(_0x564638,_0x5e15b0);},'oYwMp':'object','dBrPM':function(_0x238f07,_0x4b2c8f){return _0x238f07(_0x4b2c8f);}},_0x32a812=await _0x40f527[_0x9f3ebf(0x1ff)](resolveProfileTarget,_0x422303);if(_0x40f527[_0x9f3ebf(0x200)](_0x32a812[_0x9f3ebf(0x1eb)],_0x9f3ebf(0x1e1))){const _0x5f3da3=await loadEffectiveCloudSettings(_0x422303),_0x34bb3b=_0x40f527[_0x9f3ebf(0x1f7)](getNestedValue,_0x5f3da3,_0x50a21f);if(_0x40f527['pcbPq'](_0x34bb3b,undefined))console['log']('(not\x20set)');else typeof _0x34bb3b===_0x40f527['oYwMp']?console[_0x9f3ebf(0x209)](JSON['stringify'](_0x34bb3b,null,0x2)):console['log'](_0x34bb3b);return;}const _0x449a5a=await _0x40f527['dBrPM'](loadSettings,_0x422303),_0xe05a17=_0x40f527[_0x9f3ebf(0x1f7)](getNestedValue,_0x449a5a,_0x50a21f);if(_0x40f527['pcbPq'](_0xe05a17,undefined))console[_0x9f3ebf(0x209)](_0x9f3ebf(0x1ee));else typeof _0xe05a17===_0x40f527['oYwMp']?console['log'](JSON['stringify'](_0xe05a17,null,0x2)):console['log'](_0xe05a17);}export async function configList(_0x2a5bc5){const _0x44f747=_0x3264,_0x1dcf43={'NBYoX':function(_0x41ffc4,_0x3db74f){return _0x41ffc4===_0x3db74f;},'QqPum':_0x44f747(0x1e1),'RFPYe':function(_0x3cffd9,_0x17633a){return _0x3cffd9(_0x17633a);},'gcluY':function(_0x13fe3f,_0x2dbf85){return _0x13fe3f(_0x2dbf85);},'utaQe':function(_0x4b3edf,_0x8dee85){return _0x4b3edf(_0x8dee85);},'xYDXS':function(_0x1bddd4,_0x1dbc43){return _0x1bddd4(_0x1dbc43);}},_0x30ca07=await resolveProfileTarget(_0x2a5bc5);if(_0x1dcf43[_0x44f747(0x201)](_0x30ca07['kind'],_0x1dcf43['QqPum'])){const _0x4191e9=await _0x1dcf43[_0x44f747(0x1f0)](loadEffectiveCloudSettings,_0x2a5bc5);if(!_0x4191e9||Object['keys'](_0x4191e9)['length']===0x0){console['log'](_0x44f747(0x1e6)+_0x2a5bc5+'\x22');return;}console['log'](JSON[_0x44f747(0x1d9)](_0x4191e9,null,0x2));return;}const _0x365b8b=getSettingsPath(_0x2a5bc5);if(!_0x1dcf43['gcluY'](existsSync,_0x365b8b)){console[_0x44f747(0x209)](_0x44f747(0x1e6)+_0x2a5bc5+'\x22');return;}const _0x20487a=await _0x1dcf43[_0x44f747(0x1f3)](loadSettings,_0x2a5bc5),_0x2a2f38=_0x1dcf43['xYDXS'](formatSettings,_0x20487a);!_0x2a2f38?console[_0x44f747(0x209)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2a5bc5+'\x22'):console['log'](_0x2a2f38);}export async function configUnset(_0x328707,_0x541657){const _0x3567fb=_0x3264,_0x1822fc={'Wuycg':function(_0x2fb091,_0x16691e){return _0x2fb091===_0x16691e;},'KipLf':function(_0x2cdcc8,_0x15f198){return _0x2cdcc8(_0x15f198);},'yhbYK':function(_0x425def,_0x5364ad,_0x520a1f,_0x3afbdf){return _0x425def(_0x5364ad,_0x520a1f,_0x3afbdf);},'CNwmj':function(_0x36fbb3){return _0x36fbb3();},'KOGUV':function(_0x785f6a,_0x13fa87){return _0x785f6a(_0x13fa87);}},_0x1cd5b3=await resolveProfileTarget(_0x328707);if(_0x1822fc[_0x3567fb(0x1d7)](_0x1cd5b3[_0x3567fb(0x1eb)],_0x3567fb(0x1e1))){if(_0x1cd5b3['alsoExistsElsewhere'])_0x1822fc['KipLf'](printDualExistsHint,_0x328707);const _0x438db7=unsetProfileOverride(getProjectPath(),_0x328707,_0x541657);_0x438db7?console['log'](_0x3567fb(0x1f8)+_0x541657+_0x3567fb(0x1dc)+_0x328707+'\x22'):console['log'](_0x3567fb(0x1de)+_0x541657+'\x22\x20not\x20found');return;}const _0x1507de=_0x1822fc[_0x3567fb(0x206)](unsetProfileOverride,_0x1822fc[_0x3567fb(0x1e4)](getProjectPath),_0x328707,_0x541657);if(_0x1507de){console[_0x3567fb(0x209)]('Removed\x20'+_0x541657);return;}const _0x42c6ad=await _0x1822fc[_0x3567fb(0x1dd)](loadSettings,_0x328707),_0xe66cd3=deleteNestedValue(_0x42c6ad,_0x541657);_0xe66cd3?console[_0x3567fb(0x209)](_0x3567fb(0x1de)+_0x541657+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x328707+_0x3567fb(0x1e8)):console[_0x3567fb(0x209)]('Key\x20\x22'+_0x541657+'\x22\x20not\x20found');}export async function configReset(_0x523dc6){const _0x3bc41a=_0x3264,_0x4c9aea=await resolveProfileTarget(_0x523dc6);if(_0x4c9aea[_0x3bc41a(0x1eb)]==='cloud'){resetProfileOverrides(getProjectPath(),_0x523dc6),console[_0x3bc41a(0x209)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x523dc6+'\x22');return;}console[_0x3bc41a(0x209)]('\x22'+_0x523dc6+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x523dc6+_0x3bc41a(0x202));}
1
+ const _0x7eba42=_0x4cf8;(function(_0x1ae65e,_0x3b7b1b){const _0x4e1717=_0x4cf8,_0x10b3b1=_0x1ae65e();while(!![]){try{const _0x199c58=-parseInt(_0x4e1717(0x106))/0x1+-parseInt(_0x4e1717(0xf2))/0x2*(-parseInt(_0x4e1717(0x103))/0x3)+parseInt(_0x4e1717(0x102))/0x4*(parseInt(_0x4e1717(0xfb))/0x5)+parseInt(_0x4e1717(0x10e))/0x6*(-parseInt(_0x4e1717(0xf8))/0x7)+parseInt(_0x4e1717(0xec))/0x8*(-parseInt(_0x4e1717(0x105))/0x9)+parseInt(_0x4e1717(0xfd))/0xa+parseInt(_0x4e1717(0xfc))/0xb;if(_0x199c58===_0x3b7b1b)break;else _0x10b3b1['push'](_0x10b3b1['shift']());}catch(_0x525cf1){_0x10b3b1['push'](_0x10b3b1['shift']());}}}(_0x23ea,0x9e53f));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',_0x7eba42(0x10c),'forceLogin'];function parseLocalValue(_0x17e9cc,_0x591b15){const _0x2b1ec1=_0x7eba42,_0x1e08b8={'ufLWH':'false'};if(BOOLEAN_KEYS[_0x2b1ec1(0x113)](_0x17e9cc)){if(_0x591b15===_0x2b1ec1(0xe8))return!![];if(_0x591b15===_0x1e08b8['ufLWH'])return![];throw new Error(_0x2b1ec1(0xe9)+_0x17e9cc+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x591b15;}function parseOverrideValue(_0x3243e4){const _0x1c944b=_0x7eba42,_0x15b5a3={'yMOCg':function(_0x566b69,_0xeb2555){return _0x566b69===_0xeb2555;},'eTPJz':function(_0x4dba58,_0xc3aa62){return _0x4dba58===_0xc3aa62;},'wYuzS':_0x1c944b(0xee)};if(_0x3243e4===_0x1c944b(0xe8))return!![];if(_0x15b5a3['yMOCg'](_0x3243e4,'false'))return![];if(_0x15b5a3[_0x1c944b(0xf3)](_0x3243e4,'null'))return null;if(_0x3243e4===_0x15b5a3['wYuzS'])return undefined;if(/^-?\d+$/[_0x1c944b(0xf7)](_0x3243e4)){const _0x44fe66=Number(_0x3243e4);if(Number['isSafeInteger'](_0x44fe66))return _0x44fe66;}if(/^-?\d+\.\d+$/[_0x1c944b(0xf7)](_0x3243e4)){const _0x11b51f=Number(_0x3243e4);if(!Number[_0x1c944b(0xe7)](_0x11b51f))return _0x11b51f;}const _0x3e79df=_0x3243e4[_0x1c944b(0xef)]();if(_0x3e79df['startsWith']('{')&&_0x3e79df[_0x1c944b(0x10d)]('}')||_0x3e79df[_0x1c944b(0xff)]('[')&&_0x3e79df[_0x1c944b(0x10d)](']'))try{return JSON[_0x1c944b(0x104)](_0x3e79df);}catch{}return _0x3243e4;}async function resolveProfileTarget(_0x3f9a65){const _0x33775d={'edggX':function(_0x1c0c14,_0x4f428d){return _0x1c0c14(_0x4f428d);},'NOXGe':'local'},_0xd69969=existsSync(getEnvDir(_0x3f9a65));let _0x317e60=![];try{const _0x53b1f2=await fetchCloudProfile(_0x3f9a65);_0x317e60=_0x33775d['edggX'](Boolean,_0x53b1f2);}catch{}if(_0x317e60)return{'kind':'cloud','alsoExistsElsewhere':_0xd69969};if(_0xd69969)return{'kind':_0x33775d['NOXGe'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x3f9a65+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x3f9a65);}function _0x4cf8(_0x5709e5,_0x4a4396){_0x5709e5=_0x5709e5-0xe6;const _0x23ea9a=_0x23ea();let _0x4cf8ca=_0x23ea9a[_0x5709e5];return _0x4cf8ca;}function printDualExistsHint(_0x33e0a1){const _0x5b6719=_0x7eba42;console['log'](_0x5b6719(0x101)+_0x33e0a1+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0xd55985){const _0x1610b7=_0x7eba42,_0x52a876={'hkosH':function(_0x43c8c0,_0x14866c){return _0x43c8c0(_0x14866c);},'mvrMs':function(_0x1800e9,_0x23c86a,_0x1f9719){return _0x1800e9(_0x23c86a,_0x1f9719);},'uktZb':function(_0x375dbc,_0x480e06){return _0x375dbc??_0x480e06;}},_0x15a663=await _0x52a876[_0x1610b7(0xf6)](fetchCloudProfile,_0xd55985),_0x3fe77a=readProfileOverrides(getProjectPath(),_0xd55985);return _0x52a876[_0x1610b7(0xf1)](mergeCloudProfileSettings,_0x15a663?.['settings']??{},_0x52a876[_0x1610b7(0x10b)](_0x3fe77a,undefined));}export async function configSet(_0x42bd46,_0x2e521f,_0x49adca){const _0x57c48b=_0x7eba42,_0x45f706={'wLhQo':function(_0x529332,_0x5b1558){return _0x529332(_0x5b1558);},'QZhpw':function(_0x1947da,_0x3debae){return _0x1947da===_0x3debae;},'OxBPS':function(_0xcef653,_0x859665,_0x5f25e9,_0x508e3b,_0x2e8e9c){return _0xcef653(_0x859665,_0x5f25e9,_0x508e3b,_0x2e8e9c);},'SwBsM':function(_0x2d836a){return _0x2d836a();},'cprXc':function(_0x44af85,_0x3630a4,_0x4760e0,_0x534402,_0xfdc802){return _0x44af85(_0x3630a4,_0x4760e0,_0x534402,_0xfdc802);},'MstSa':function(_0x163009){return _0x163009();}},_0x574783=await _0x45f706['wLhQo'](resolveProfileTarget,_0x42bd46);if(_0x45f706['QZhpw'](_0x574783['kind'],_0x57c48b(0x111))){if(_0x574783['alsoExistsElsewhere'])printDualExistsHint(_0x42bd46);const _0x16c7b6=parseOverrideValue(_0x49adca);_0x45f706[_0x57c48b(0x10f)](setProfileOverride,_0x45f706[_0x57c48b(0xe6)](getProjectPath),_0x42bd46,_0x2e521f,_0x16c7b6),console['log']('Set\x20'+_0x2e521f+_0x57c48b(0xf0)+JSON['stringify'](_0x16c7b6)+'\x20for\x20\x22'+_0x42bd46+'\x22');return;}const _0x2964ed=parseLocalValue(_0x2e521f,_0x49adca);_0x45f706[_0x57c48b(0xf9)](setProfileOverride,_0x45f706[_0x57c48b(0x110)](getProjectPath),_0x42bd46,_0x2e521f,_0x2964ed),console['log']('Set\x20'+_0x2e521f+_0x57c48b(0xf0)+_0x2964ed+_0x57c48b(0xea)+_0x42bd46+'\x22');}export async function configGet(_0x89661f,_0x23e30c){const _0x3d57ff=_0x7eba42,_0x3fa0f5={'kDKUp':function(_0x5ae269,_0x5ba055){return _0x5ae269(_0x5ba055);},'gKWnB':function(_0x1afecc,_0x8a91f4,_0x70ddae){return _0x1afecc(_0x8a91f4,_0x70ddae);},'rqirw':function(_0x5e700b,_0x4fa6a4){return _0x5e700b===_0x4fa6a4;}},_0x37c316=await _0x3fa0f5['kDKUp'](resolveProfileTarget,_0x89661f);if(_0x37c316['kind']===_0x3d57ff(0x111)){const _0x16c5be=await loadEffectiveCloudSettings(_0x89661f),_0x1bab36=_0x3fa0f5[_0x3d57ff(0xed)](getNestedValue,_0x16c5be,_0x23e30c);if(_0x3fa0f5['rqirw'](_0x1bab36,undefined))console['log']('(not\x20set)');else typeof _0x1bab36===_0x3d57ff(0xf4)?console[_0x3d57ff(0x108)](JSON['stringify'](_0x1bab36,null,0x2)):console['log'](_0x1bab36);return;}const _0x3f8ccf=await _0x3fa0f5[_0x3d57ff(0xf5)](loadSettings,_0x89661f),_0x4790a7=getNestedValue(_0x3f8ccf,_0x23e30c);if(_0x4790a7===undefined)console['log'](_0x3d57ff(0x100));else typeof _0x4790a7===_0x3d57ff(0xf4)?console['log'](JSON[_0x3d57ff(0x112)](_0x4790a7,null,0x2)):console[_0x3d57ff(0x108)](_0x4790a7);}export async function configList(_0x356718){const _0x23a09f=_0x7eba42,_0x166482={'VOiUM':function(_0x4b8268,_0x62e82f){return _0x4b8268(_0x62e82f);},'zkGkm':function(_0x1bea60,_0x4a3e8f){return _0x1bea60===_0x4a3e8f;}},_0x54ffb6=await _0x166482['VOiUM'](resolveProfileTarget,_0x356718);if(_0x166482['zkGkm'](_0x54ffb6[_0x23a09f(0xfe)],_0x23a09f(0x111))){const _0x5c63b6=await _0x166482['VOiUM'](loadEffectiveCloudSettings,_0x356718);if(!_0x5c63b6||_0x166482[_0x23a09f(0xeb)](Object['keys'](_0x5c63b6)['length'],0x0)){console[_0x23a09f(0x108)]('No\x20configuration\x20set\x20for\x20\x22'+_0x356718+'\x22');return;}console['log'](JSON[_0x23a09f(0x112)](_0x5c63b6,null,0x2));return;}const _0x2534af=_0x166482['VOiUM'](getSettingsPath,_0x356718);if(!existsSync(_0x2534af)){console[_0x23a09f(0x108)]('No\x20configuration\x20set\x20for\x20\x22'+_0x356718+'\x22');return;}const _0x34cd84=await _0x166482[_0x23a09f(0x107)](loadSettings,_0x356718),_0x22e9c1=formatSettings(_0x34cd84);!_0x22e9c1?console['log'](_0x23a09f(0x109)+_0x356718+'\x22'):console['log'](_0x22e9c1);}function _0x23ea(){const _0x48cf06=['Removed\x20','4273760PqXxTS','5254865QvnuhB','6637110HtbZXb','kind','startsWith','(not\x20set)','\x20\x20Note:\x20\x22','4jwpszK','183PfozfG','parse','108558yLzXoG','350786EjZlkX','VOiUM','log','No\x20configuration\x20set\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','uktZb','allowInsecureLocalhost','endsWith','126EdCTnX','OxBPS','MstSa','cloud','stringify','includes','SwBsM','isNaN','true','Invalid\x20value\x20for\x20','\x20for\x20\x22','zkGkm','688RKhDao','gKWnB','undefined','trim','\x20=\x20','mvrMs','27988CSmNav','eTPJz','object','kDKUp','hkosH','test','271061lAwrBJ','cprXc'];_0x23ea=function(){return _0x48cf06;};return _0x23ea();}export async function configUnset(_0x23fa28,_0x12bcf4){const _0x47dfe9=_0x7eba42,_0x455fbd={'SwVXf':_0x47dfe9(0x111),'zyYDA':function(_0x242efb,_0x1bbe7b,_0x4afaa6,_0x4c21c1){return _0x242efb(_0x1bbe7b,_0x4afaa6,_0x4c21c1);}},_0x5600c8=await resolveProfileTarget(_0x23fa28);if(_0x5600c8['kind']===_0x455fbd['SwVXf']){if(_0x5600c8['alsoExistsElsewhere'])printDualExistsHint(_0x23fa28);const _0x4ea75d=_0x455fbd['zyYDA'](unsetProfileOverride,getProjectPath(),_0x23fa28,_0x12bcf4);_0x4ea75d?console[_0x47dfe9(0x108)](_0x47dfe9(0xfa)+_0x12bcf4+'\x20for\x20\x22'+_0x23fa28+'\x22'):console[_0x47dfe9(0x108)]('Key\x20\x22'+_0x12bcf4+'\x22\x20not\x20found');return;}const _0x4c00f7=unsetProfileOverride(getProjectPath(),_0x23fa28,_0x12bcf4);if(_0x4c00f7){console['log']('Removed\x20'+_0x12bcf4);return;}const _0x44c2b8=await loadSettings(_0x23fa28),_0x19417f=deleteNestedValue(_0x44c2b8,_0x12bcf4);_0x19417f?console['log']('Key\x20\x22'+_0x12bcf4+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x23fa28+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x47dfe9(0x108)]('Key\x20\x22'+_0x12bcf4+'\x22\x20not\x20found');}export async function configReset(_0x25b68e){const _0x198fe4=_0x7eba42,_0x39153e={'ChjIz':function(_0x28792e){return _0x28792e();}},_0xab25cb=await resolveProfileTarget(_0x25b68e);if(_0xab25cb['kind']==='cloud'){resetProfileOverrides(_0x39153e['ChjIz'](getProjectPath),_0x25b68e),console[_0x198fe4(0x108)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x25b68e+'\x22');return;}console[_0x198fe4(0x108)]('\x22'+_0x25b68e+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x25b68e+_0x198fe4(0x10a));}
@@ -1 +1 @@
1
- (function(_0x1fd81e,_0x707bb5){const _0x21a4a2=_0x379d,_0x3e46d5=_0x1fd81e();while(!![]){try{const _0x5b0de9=-parseInt(_0x21a4a2(0x19e))/0x1*(parseInt(_0x21a4a2(0x1a4))/0x2)+-parseInt(_0x21a4a2(0x1b1))/0x3+-parseInt(_0x21a4a2(0x1ab))/0x4*(parseInt(_0x21a4a2(0x1ad))/0x5)+parseInt(_0x21a4a2(0x1af))/0x6+parseInt(_0x21a4a2(0x1a6))/0x7*(parseInt(_0x21a4a2(0x1b0))/0x8)+parseInt(_0x21a4a2(0x1a1))/0x9+parseInt(_0x21a4a2(0x19f))/0xa;if(_0x5b0de9===_0x707bb5)break;else _0x3e46d5['push'](_0x3e46d5['shift']());}catch(_0x4b8413){_0x3e46d5['push'](_0x3e46d5['shift']());}}}(_0x43a2,0x6a90a));import _0x3b13c6 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x43a2(){const _0x351510=['788388igxTNh','616696dewQsg','1181649rrZbiC','161erqBrK','2864100LfsjqO','✓\x20Deleted\x20cloud\x20profile\x20\x22','7428240UpKzce','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','Cloud\x20profile\x20\x22','8152zNBxHb','KZXfp','63eUIWXK','\x22\x20not\x20found.','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','prompt','confirmation','600456deiiFQ','yes','15OPxUTU','hsaHR'];_0x43a2=function(){return _0x351510;};return _0x43a2();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x379d(_0x4b6532,_0x2f365e){_0x4b6532=_0x4b6532-0x19e;const _0x43a286=_0x43a2();let _0x379d3a=_0x43a286[_0x4b6532];return _0x379d3a;}export async function deleteProfile(_0x5fd895,_0x5c5a01={}){const _0x4605b3=_0x379d,_0x41f69b={'Zhuww':function(_0x56399c,_0xc93821){return _0x56399c(_0xc93821);},'hsaHR':function(_0xc976a4){return _0xc976a4();},'JoauW':'input','KZXfp':function(_0x268909,_0x4f951a,_0x5c1f5d){return _0x268909(_0x4f951a,_0x5c1f5d);}},_0x2202d6=await _0x41f69b['Zhuww'](fetchCloudProfile,_0x5fd895);if(!_0x2202d6)throw new Error(_0x4605b3(0x1a3)+_0x5fd895+_0x4605b3(0x1a7));if(!_0x5c5a01[_0x4605b3(0x1ac)]&&!_0x41f69b[_0x4605b3(0x1ae)](isInteractive))throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log'](_0x4605b3(0x1a2)+_0x5fd895+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x5c5a01['yes']){const {confirmation:_0xd68a26}=await _0x3b13c6[_0x4605b3(0x1a9)]([{'type':_0x41f69b['JoauW'],'name':_0x4605b3(0x1aa),'message':'Type\x20\x22'+_0x5fd895+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0xd68a26!==_0x5fd895)throw new Error(_0x4605b3(0x1a8));}await deleteCloudProfile(_0x5fd895),resetProfileOverrides(process['cwd'](),_0x5fd895),_0x41f69b[_0x4605b3(0x1a5)](clearLastProfile,process['cwd'](),_0x5fd895),console['log'](_0x4605b3(0x1a0)+_0x5fd895+'\x22.');}
1
+ (function(_0xdcd401,_0x32cd59){const _0x18afc1=_0xdac4,_0x40e615=_0xdcd401();while(!![]){try{const _0x2ccd15=-parseInt(_0x18afc1(0xa3))/0x1*(parseInt(_0x18afc1(0xab))/0x2)+-parseInt(_0x18afc1(0xad))/0x3+parseInt(_0x18afc1(0xa9))/0x4*(-parseInt(_0x18afc1(0x9d))/0x5)+-parseInt(_0x18afc1(0xaa))/0x6*(parseInt(_0x18afc1(0x9c))/0x7)+-parseInt(_0x18afc1(0x9f))/0x8+parseInt(_0x18afc1(0xa0))/0x9*(parseInt(_0x18afc1(0xa2))/0xa)+parseInt(_0x18afc1(0xa6))/0xb*(parseInt(_0x18afc1(0xa4))/0xc);if(_0x2ccd15===_0x32cd59)break;else _0x40e615['push'](_0x40e615['shift']());}catch(_0x4cb03c){_0x40e615['push'](_0x40e615['shift']());}}}(_0x19e7,0xea9a1));function _0x19e7(){const _0x31123c=['Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','Type\x20\x22','16gGRBXQ','5442rxIgDl','2040ZYlvBq','cwd','5187963wGNpml','\x22\x20not\x20found.','log','8659lJhzio','953480NdYvKh','bhoZV','13666904KFcxKB','4014324YMqzrI','\x22\x20for\x20everyone\x20in\x20your\x20organization.','10ufAwtG','1727BOggxF','12zcIzIb','\x22\x20to\x20confirm\x20deletion:','83587460REeOCZ'];_0x19e7=function(){return _0x31123c;};return _0x19e7();}import _0x122080 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0xdac4(_0x540e63,_0x4bc40f){_0x540e63=_0x540e63-0x9a;const _0x19e75a=_0x19e7();let _0xdac48=_0x19e75a[_0x540e63];return _0xdac48;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x91b87c,_0x58365e={}){const _0xc009aa=_0xdac4,_0x1cf3c1={'Rjicl':_0xc009aa(0xa7),'bhoZV':'confirmation','PQswg':function(_0x21bb3c,_0x3b715a,_0x1f26c6){return _0x21bb3c(_0x3b715a,_0x1f26c6);}},_0x2da840=await fetchCloudProfile(_0x91b87c);if(!_0x2da840)throw new Error('Cloud\x20profile\x20\x22'+_0x91b87c+_0xc009aa(0x9a));if(!_0x58365e['yes']&&!isInteractive())throw new Error(_0x1cf3c1['Rjicl']);console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x91b87c+_0xc009aa(0xa1));if(!_0x58365e['yes']){const {confirmation:_0x1be421}=await _0x122080['prompt']([{'type':'input','name':_0x1cf3c1[_0xc009aa(0x9e)],'message':_0xc009aa(0xa8)+_0x91b87c+_0xc009aa(0xa5)}]);if(_0x1be421!==_0x91b87c)throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await deleteCloudProfile(_0x91b87c),resetProfileOverrides(process['cwd'](),_0x91b87c),_0x1cf3c1['PQswg'](clearLastProfile,process[_0xc009aa(0xac)](),_0x91b87c),console[_0xc009aa(0x9b)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x91b87c+'\x22.');}
@@ -1 +1 @@
1
- function _0x424d(_0x2407c5,_0x3dcce5){_0x2407c5=_0x2407c5-0x144;const _0x4a3081=_0x4a30();let _0x424d46=_0x4a3081[_0x2407c5];return _0x424d46;}const _0x3c3757=_0x424d;(function(_0xf58074,_0x3e3074){const _0x880988=_0x424d,_0x4ac4dd=_0xf58074();while(!![]){try{const _0x41db35=-parseInt(_0x880988(0x15c))/0x1+-parseInt(_0x880988(0x162))/0x2+-parseInt(_0x880988(0x151))/0x3*(-parseInt(_0x880988(0x149))/0x4)+parseInt(_0x880988(0x161))/0x5*(-parseInt(_0x880988(0x16b))/0x6)+-parseInt(_0x880988(0x16a))/0x7+parseInt(_0x880988(0x14b))/0x8*(-parseInt(_0x880988(0x157))/0x9)+parseInt(_0x880988(0x155))/0xa;if(_0x41db35===_0x3e3074)break;else _0x4ac4dd['push'](_0x4ac4dd['shift']());}catch(_0xa15b68){_0x4ac4dd['push'](_0x4ac4dd['shift']());}}}(_0x4a30,0x874af));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x3c3757(0x14c),_0x3c3757(0x14f),'ci'];export async function getEnvNames(){const _0x3f777a=_0x3c3757,_0x216d0a={'pwfmu':function(_0x2e187e,_0x58615b){return _0x2e187e(_0x58615b);},'iWBFB':function(_0x1b4014){return _0x1b4014();},'QygTp':'local','ZzYlW':function(_0xf922fb,_0x4a111a,_0x141c75){return _0xf922fb(_0x4a111a,_0x141c75);},'dEMLE':function(_0x3e8411,_0x388c4b){return _0x3e8411(_0x388c4b);},'hMrWT':function(_0x22f2d4,_0x378fd8,_0x1c3683){return _0x22f2d4(_0x378fd8,_0x1c3683);},'dIWlj':function(_0x4efcd7,_0x235162,_0x1cd6b5){return _0x4efcd7(_0x235162,_0x1cd6b5);}},_0x4de570=getRangerDir();if(!_0x216d0a['pwfmu'](existsSync,_0x4de570))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3818e7=await _0x216d0a[_0x3f777a(0x15b)](readActiveProfileName),_0xcc5e6e=[],_0x4fb3fc={},_0x2f3fcb=join(_0x4de570,_0x216d0a[_0x3f777a(0x158)]);if(existsSync(_0x2f3fcb)){const _0x261895=await readdir(_0x2f3fcb);for(const _0x240027 of _0x261895){const _0x312d9c=_0x216d0a[_0x3f777a(0x14a)](join,_0x2f3fcb,_0x240027),_0x4af142=await _0x216d0a[_0x3f777a(0x150)](stat,_0x312d9c);_0x4af142['isDirectory']()&&(_0xcc5e6e['push'](_0x240027),_0x4fb3fc[_0x240027]='local');}}const _0x440658=join(_0x4de570,'ci');if(existsSync(_0x440658)){const _0x525ac6=await _0x216d0a['dEMLE'](readdir,_0x440658);for(const _0x325043 of _0x525ac6){const _0x30fcff=_0x216d0a[_0x3f777a(0x164)](join,_0x440658,_0x325043),_0x42f328=await stat(_0x30fcff);_0x42f328[_0x3f777a(0x146)]()&&(_0xcc5e6e['push'](_0x325043),_0x4fb3fc[_0x325043]='ci');}}const _0x2afcfb=await _0x216d0a['pwfmu'](readdir,_0x4de570);for(const _0x26347f of _0x2afcfb){if(NON_ENV_DIRS['includes'](_0x26347f))continue;if(_0x26347f['startsWith']('.'))continue;if(_0x26347f['endsWith']('.txt'))continue;const _0x1b7a32=join(_0x4de570,_0x26347f),_0x1e52cd=await stat(_0x1b7a32);_0x1e52cd[_0x3f777a(0x146)]()&&existsSync(_0x216d0a[_0x3f777a(0x156)](join,_0x1b7a32,_0x3f777a(0x14d)))&&(!_0xcc5e6e[_0x3f777a(0x167)](_0x26347f)&&(_0xcc5e6e[_0x3f777a(0x14e)](_0x26347f),_0x4fb3fc[_0x26347f]='legacy'));}return{'envNames':_0xcc5e6e,'activeEnv':_0x3818e7,'envTypes':_0x4fb3fc};}export async function envList(){const _0x2c27ad=_0x3c3757,_0x186605={'wItGQ':function(_0x2a41f0,_0x2ee9e6){return _0x2a41f0 instanceof _0x2ee9e6;},'LWMOc':function(_0x2c6042,_0x561102){return _0x2c6042(_0x561102);},'fXkqD':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LanBb':function(_0x49b66c,_0x118646){return _0x49b66c>_0x118646;},'pYJhi':function(_0x2a3283,_0xe40556){return _0x2a3283===_0xe40556;},'ufIMH':function(_0x39b35f,_0x5d0159){return _0x39b35f===_0x5d0159;},'soSrh':function(_0x51a60a,_0x2ef993){return _0x51a60a>_0x2ef993;},'bhXCB':_0x2c27ad(0x160),'nIKCx':'no\x20session'},{envNames:_0x45e4ce,activeEnv:_0x2c0d5b,envTypes:_0x3c0b72}=await getEnvNames();let _0x5b0102=[];const _0x665c90=await getToken();if(_0x665c90)try{_0x5b0102=await listCloudProfiles();}catch(_0x12bd66){console[_0x2c27ad(0x153)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x186605[_0x2c27ad(0x154)](_0x12bd66,Error)?_0x12bd66[_0x2c27ad(0x166)]:_0x186605['LWMOc'](String,_0x12bd66)));}if(_0x45e4ce[_0x2c27ad(0x159)]===0x0&&_0x5b0102[_0x2c27ad(0x159)]===0x0){console[_0x2c27ad(0x15f)](_0x2c27ad(0x168)),console['log'](_0x186605[_0x2c27ad(0x148)]);return;}const _0x30dd89=new Set(_0x5b0102['map'](_0x1e48b4=>_0x1e48b4[_0x2c27ad(0x15d)]));if(_0x186605[_0x2c27ad(0x147)](_0x45e4ce[_0x2c27ad(0x159)],0x0)){console[_0x2c27ad(0x15f)](_0x2c27ad(0x163));for(const _0x12f084 of _0x45e4ce[_0x2c27ad(0x165)]()){const _0xb9d127=_0x186605['pYJhi'](_0x12f084,_0x2c0d5b)&&!_0x30dd89[_0x2c27ad(0x169)](_0x12f084),_0x7f9bd3=_0x3c0b72[_0x12f084]||'local',_0x1c7e5c=await loadSettings(_0x12f084),_0x144e8c=_0x186605[_0x2c27ad(0x16c)](_0x7f9bd3,'legacy')?'':'\x20['+_0x7f9bd3+']';console['log']('\x20\x20'+(_0xb9d127?'*\x20':'\x20\x20')+_0x12f084+_0x144e8c),_0x1c7e5c['baseUrl']&&console[_0x2c27ad(0x15f)](_0x2c27ad(0x15a)+_0x1c7e5c['baseUrl']),_0x1c7e5c[_0x2c27ad(0x145)]&&console[_0x2c27ad(0x15f)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x1c7e5c['environmentDetails']);}}if(_0x186605[_0x2c27ad(0x152)](_0x5b0102['length'],0x0)){console[_0x2c27ad(0x15f)](_0x186605['bhXCB']);for(const _0x3615fc of _0x5b0102['sort']((_0x2abb9e,_0x54182b)=>_0x2abb9e[_0x2c27ad(0x15d)]['localeCompare'](_0x54182b[_0x2c27ad(0x15d)]))){const _0x195fab=_0x3615fc[_0x2c27ad(0x15d)]===_0x2c0d5b,_0x5f1588=_0x3615fc['environmentKey']?'\x20('+_0x3615fc['environmentKey']+')':'',_0x4e9fa1=_0x3615fc['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x3615fc[_0x2c27ad(0x15e)]+')':_0x186605[_0x2c27ad(0x144)];console[_0x2c27ad(0x15f)]('\x20\x20'+(_0x195fab?'*\x20':'\x20\x20')+_0x3615fc[_0x2c27ad(0x15d)]+'\x20[cloud]'+_0x5f1588),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x4e9fa1);}}_0x2c0d5b&&console[_0x2c27ad(0x15f)]('\x0a*\x20=\x20active\x20profile');}function _0x4a30(){const _0x2df0ee=['35496050jFqKuO','dIWlj','9934587bYksVh','QygTp','length','\x20\x20\x20\x20\x20\x20URL:\x20','iWBFB','313005vbMlcf','name','sessionUpdatedAt','log','\x0aCloud\x20Profiles:','5rRvPxs','1499260pSgjEq','\x0aLocal\x20Profiles\x20(legacy):','hMrWT','sort','message','includes','\x0aNo\x20profiles\x20found.','has','3016174SDvfBV','3216198CzKOVn','ufIMH','nIKCx','environmentDetails','isDirectory','LanBb','fXkqD','4lXNaAJ','ZzYlW','8MfsCxC','reports','settings.json','push','local','pwfmu','413841rwmCZZ','soSrh','error','wItGQ'];_0x4a30=function(){return _0x2df0ee;};return _0x4a30();}
1
+ const _0x28c6b0=_0x10e5;(function(_0x57ffa1,_0x1190ab){const _0x1c77e6=_0x10e5,_0x4d965e=_0x57ffa1();while(!![]){try{const _0x2c03e2=-parseInt(_0x1c77e6(0x199))/0x1*(-parseInt(_0x1c77e6(0x18a))/0x2)+-parseInt(_0x1c77e6(0x1a4))/0x3+-parseInt(_0x1c77e6(0x19d))/0x4*(-parseInt(_0x1c77e6(0x1ae))/0x5)+-parseInt(_0x1c77e6(0x189))/0x6+parseInt(_0x1c77e6(0x1ac))/0x7+-parseInt(_0x1c77e6(0x192))/0x8+parseInt(_0x1c77e6(0x1a7))/0x9*(parseInt(_0x1c77e6(0x1a5))/0xa);if(_0x2c03e2===_0x1190ab)break;else _0x4d965e['push'](_0x4d965e['shift']());}catch(_0x22ba66){_0x4d965e['push'](_0x4d965e['shift']());}}}(_0x6e66,0x44a3a));import{readdir,stat}from'fs/promises';function _0x6e66(){const _0x5bbef0=['7034PQdMcz','message','name','\x0aCloud\x20Profiles:','PmGyO','\x20\x20\x20\x20\x20\x20URL:\x20','\x20[cloud]','isDirectory','3642144PqvBWr','WoDqZ','\x0aNo\x20profiles\x20found.','includes','jsLjk','.txt','KudJn','50ZuGXNW','\x20\x20\x20\x20\x20\x20Session:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','legacy','195988nfKNrA','baseUrl','Run:\x20ranger\x20profile\x20add\x20<profile-name>','length','startsWith','OfkSL','reports','1213239oDDuhG','35770LqIvvP','sort','1710OklLUX','eMCev','local','BAJhv','no\x20session','765044rilRXf','has','45kXJbYe','\x0a*\x20=\x20active\x20profile','push','log','environmentDetails','1589508YbJfXO'];_0x6e66=function(){return _0x5bbef0;};return _0x6e66();}import{join}from'path';function _0x10e5(_0x4083f6,_0x5aebfd){_0x4083f6=_0x4083f6-0x189;const _0x6e667d=_0x6e66();let _0x10e57b=_0x6e667d[_0x4083f6];return _0x10e57b;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x28c6b0(0x1a3),_0x28c6b0(0x1a9),'ci'];export async function getEnvNames(){const _0x58ab55=_0x28c6b0,_0x234bfd={'eMCev':function(_0x1eefa7,_0x211193){return _0x1eefa7(_0x211193);},'jsLjk':'local','OJHIG':function(_0x11fa13,_0x567618,_0x2306b1){return _0x11fa13(_0x567618,_0x2306b1);},'mzHUP':function(_0x55bbd8,_0x52cfce){return _0x55bbd8(_0x52cfce);},'DyJCz':function(_0x277319,_0x1bea77){return _0x277319(_0x1bea77);},'WoDqZ':function(_0x46b996,_0x246ee7){return _0x46b996(_0x246ee7);},'AkPwq':_0x58ab55(0x197),'BAJhv':function(_0x17ac30,_0x22d5fd,_0x24e53a){return _0x17ac30(_0x22d5fd,_0x24e53a);},'OfkSL':'settings.json'},_0x4d0f93=getRangerDir();if(!_0x234bfd[_0x58ab55(0x1a8)](existsSync,_0x4d0f93))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1ca217=await readActiveProfileName(),_0x39f1c0=[],_0x529dd9={},_0x3c7f23=join(_0x4d0f93,_0x234bfd[_0x58ab55(0x196)]);if(_0x234bfd[_0x58ab55(0x1a8)](existsSync,_0x3c7f23)){const _0x489e53=await readdir(_0x3c7f23);for(const _0x1b2c19 of _0x489e53){const _0x538a1a=_0x234bfd['OJHIG'](join,_0x3c7f23,_0x1b2c19),_0x588138=await _0x234bfd[_0x58ab55(0x1a8)](stat,_0x538a1a);_0x588138['isDirectory']()&&(_0x39f1c0['push'](_0x1b2c19),_0x529dd9[_0x1b2c19]=_0x234bfd[_0x58ab55(0x196)]);}}const _0x281ae7=join(_0x4d0f93,'ci');if(_0x234bfd['mzHUP'](existsSync,_0x281ae7)){const _0x2823e1=await _0x234bfd['eMCev'](readdir,_0x281ae7);for(const _0x3fdad8 of _0x2823e1){const _0x21b4b8=_0x234bfd['OJHIG'](join,_0x281ae7,_0x3fdad8),_0x171f44=await _0x234bfd['DyJCz'](stat,_0x21b4b8);_0x171f44['isDirectory']()&&(_0x39f1c0[_0x58ab55(0x1b0)](_0x3fdad8),_0x529dd9[_0x3fdad8]='ci');}}const _0x5c85f5=await _0x234bfd[_0x58ab55(0x193)](readdir,_0x4d0f93);for(const _0x3ba1d3 of _0x5c85f5){if(NON_ENV_DIRS[_0x58ab55(0x195)](_0x3ba1d3))continue;if(_0x3ba1d3[_0x58ab55(0x1a1)]('.'))continue;if(_0x3ba1d3['endsWith'](_0x234bfd['AkPwq']))continue;const _0x5b284b=_0x234bfd[_0x58ab55(0x1aa)](join,_0x4d0f93,_0x3ba1d3),_0x181f47=await stat(_0x5b284b);_0x181f47[_0x58ab55(0x191)]()&&existsSync(_0x234bfd[_0x58ab55(0x1aa)](join,_0x5b284b,_0x234bfd[_0x58ab55(0x1a2)]))&&(!_0x39f1c0['includes'](_0x3ba1d3)&&(_0x39f1c0['push'](_0x3ba1d3),_0x529dd9[_0x3ba1d3]=_0x58ab55(0x19c)));}return{'envNames':_0x39f1c0,'activeEnv':_0x1ca217,'envTypes':_0x529dd9};}export async function envList(){const _0x606aeb=_0x28c6b0,_0x33d42d={'PmGyO':function(_0x170393,_0x20d782){return _0x170393===_0x20d782;},'cVNDZ':_0x606aeb(0x19f),'KudJn':'\x0aLocal\x20Profiles\x20(legacy):','fZRuX':function(_0x56bdad,_0x37e199){return _0x56bdad===_0x37e199;},'TCtYT':_0x606aeb(0x1a9),'hnDmh':function(_0x518482,_0x3702b6){return _0x518482>_0x3702b6;},'oMBEh':_0x606aeb(0x1ab)},{envNames:_0x4f927a,activeEnv:_0x40581f,envTypes:_0x5db72f}=await getEnvNames();let _0x37d9c8=[];const _0x106635=await getToken();if(_0x106635)try{_0x37d9c8=await listCloudProfiles();}catch(_0x110357){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x110357 instanceof Error?_0x110357[_0x606aeb(0x18b)]:String(_0x110357)));}if(_0x4f927a[_0x606aeb(0x1a0)]===0x0&&_0x33d42d[_0x606aeb(0x18e)](_0x37d9c8['length'],0x0)){console['log'](_0x606aeb(0x194)),console['log'](_0x33d42d['cVNDZ']);return;}const _0x52f0cf=new Set(_0x37d9c8['map'](_0x5c172a=>_0x5c172a[_0x606aeb(0x18c)]));if(_0x4f927a[_0x606aeb(0x1a0)]>0x0){console[_0x606aeb(0x1b1)](_0x33d42d[_0x606aeb(0x198)]);for(const _0x501953 of _0x4f927a[_0x606aeb(0x1a6)]()){const _0x490398=_0x33d42d['fZRuX'](_0x501953,_0x40581f)&&!_0x52f0cf[_0x606aeb(0x1ad)](_0x501953),_0x27e7d0=_0x5db72f[_0x501953]||_0x33d42d['TCtYT'],_0x1cb9e5=await loadSettings(_0x501953),_0x2f4b93=_0x27e7d0==='legacy'?'':'\x20['+_0x27e7d0+']';console[_0x606aeb(0x1b1)]('\x20\x20'+(_0x490398?'*\x20':'\x20\x20')+_0x501953+_0x2f4b93),_0x1cb9e5[_0x606aeb(0x19e)]&&console['log'](_0x606aeb(0x18f)+_0x1cb9e5['baseUrl']),_0x1cb9e5['environmentDetails']&&console[_0x606aeb(0x1b1)](_0x606aeb(0x19b)+_0x1cb9e5[_0x606aeb(0x1b2)]);}}if(_0x33d42d['hnDmh'](_0x37d9c8['length'],0x0)){console['log'](_0x606aeb(0x18d));for(const _0x341607 of _0x37d9c8[_0x606aeb(0x1a6)]((_0x524696,_0x1fbd54)=>_0x524696['name']['localeCompare'](_0x1fbd54[_0x606aeb(0x18c)]))){const _0x376a93=_0x33d42d[_0x606aeb(0x18e)](_0x341607['name'],_0x40581f),_0x2286ab=_0x341607['environmentKey']?'\x20('+_0x341607['environmentKey']+')':'',_0x18727d=_0x341607['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x341607['sessionUpdatedAt']+')':_0x33d42d['oMBEh'];console['log']('\x20\x20'+(_0x376a93?'*\x20':'\x20\x20')+_0x341607['name']+_0x606aeb(0x190)+_0x2286ab),console['log'](_0x606aeb(0x19a)+_0x18727d);}}_0x40581f&&console[_0x606aeb(0x1b1)](_0x606aeb(0x1af));}