@ranger-testing/ranger-cli 3.1.6 → 3.1.7-alpha.34400c2-56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -5
@@ -1 +1 @@
1
- const _0x474c19=_0x4d76;(function(_0x15eeba,_0x39e8e3){const _0x581c65=_0x4d76,_0x36b6c9=_0x15eeba();while(!![]){try{const _0x5094ad=-parseInt(_0x581c65(0x17f))/0x1+-parseInt(_0x581c65(0x16d))/0x2+-parseInt(_0x581c65(0x154))/0x3*(-parseInt(_0x581c65(0x16f))/0x4)+-parseInt(_0x581c65(0x17c))/0x5+-parseInt(_0x581c65(0x18f))/0x6+-parseInt(_0x581c65(0x19d))/0x7+parseInt(_0x581c65(0x179))/0x8;if(_0x5094ad===_0x39e8e3)break;else _0x36b6c9['push'](_0x36b6c9['shift']());}catch(_0x5bc076){_0x36b6c9['push'](_0x36b6c9['shift']());}}}(_0x4137,0x508d9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x36dc62 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';function _0x4d76(_0x331261,_0x2ef2df){_0x331261=_0x331261-0x13d;const _0x41372a=_0x4137();let _0x4d769d=_0x41372a[_0x331261];return _0x4d769d;}function _0x4137(){const _0xf8ccbc=['\x0a\x20\x20A\x20profile\x20named\x20\x22','NODE_TLS_REJECT_UNAUTHORIZED','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','baseUrl','keys','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','log','cwd','url','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','\x27\x20matching\x20','HBwNX','GgmCj','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x27\x20created\x20(CDP).','QQQHI','biaBV','✓\x20Profile\x20\x27','force','includes','profile.add.autoRouted','HcsVZ','XIAgW','join','RGQxA','\x20--skip-auth\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x0a\x20\x20Could\x20not\x20reach\x20','wkrOv','ELCfD','user_declined','\x20--url\x20','jJNeb','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','env','WytvO','Could\x20not\x20reach\x20','zzAcb','tSTAa','\x20(continuing\x20with\x20--force)','pXZxr','list','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','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','HSQWa','signal','cdpEndpoint','environments','profile.add.autoRouteSkipped','VGmFn','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','origin','PsIHe','XeVyy','skipAuth','local','9vbkMWX','SzxKE','xrCNZ','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','trim','QRBUW','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','setupHeaders','Use\x20','\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','continue','WXEvf','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','setupHeader','zuTrn','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','ptTAz','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','message','test','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','SZwDH','716810JzpMoH','oxOZY','866044DUtVer','\x0a\x20\x20(domains:\x20','error','AMjUT','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','slice','QSQrx','\x27\x20created.\x0a','wLqFw','HTTP\x20','6650472hLgOOF','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','cFuSA','975615UWNwEI','xtwTM','http://','413871hTAVAq','JlJmv','prompt','authEnv','isElectron','odoBi','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','EOzlx','QdxgK','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','capture','warn','qSkTr','⚠\x20Could\x20not\x20reach\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','fetch\x20failed','682284yMPCwP','selJY','Enter\x20a\x20different\x20URL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','ISbbV','yes','length','isTTY','peeUf','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','OlfCR','trackPhaseEnd','pqXFX','stdout','488488WhvNHs','exit'];_0x4137=function(){return _0xf8ccbc;};return _0x4137();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x474c19(0x16b);function warnCloudProfileSharedInOrg(){const _0x262b3d=_0x474c19;if(!process[_0x262b3d(0x19c)][_0x262b3d(0x196)])return;console[_0x262b3d(0x18a)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x110c7b){const _0x1f4d53=_0x474c19,_0x145a5b={'ARbok':'HEAD','JFrWM':'manual','AMjUT':function(_0x45931c,_0xd7cfe5){return _0x45931c(_0xd7cfe5);},'UWRWT':function(_0x3152d0,_0x4c4397){return _0x3152d0===_0x4c4397;},'QQQHI':'TypeError','wqSmV':_0x1f4d53(0x18e)};try{const _0x4694f5=new AbortController(),_0x38de49=setTimeout(()=>_0x4694f5['abort'](),0x1388),_0x1b322f={'method':_0x145a5b['ARbok'],'signal':_0x4694f5[_0x1f4d53(0x149)],'redirect':_0x145a5b['JFrWM']};/^https:\/\/localhost(:\d+)?/i[_0x1f4d53(0x16a)](_0x110c7b)&&(process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x2e2c97=await fetch(_0x110c7b,_0x1b322f);delete process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x145a5b[_0x1f4d53(0x172)](clearTimeout,_0x38de49);if(_0x2e2c97['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x1f4d53(0x178)+_0x2e2c97['status']};}catch(_0x2ff3f9){delete process[_0x1f4d53(0x13e)][_0x1f4d53(0x1a0)];const _0x4ef4eb=_0x2ff3f9,_0x3d747d=_0x4ef4eb['message']||String(_0x2ff3f9),_0x85df37=_0x3d747d[_0x1f4d53(0x1b2)]('Invalid\x20URL')||_0x145a5b['UWRWT'](_0x4ef4eb['name'],_0x145a5b[_0x1f4d53(0x1ae)])||_0x3d747d['includes'](_0x145a5b['wqSmV']);return{'ok':![],'error':_0x3d747d,'isProtocolError':_0x85df37};}}async function sweepOrphanLocalProfile(_0x39da34,_0x122016,_0x220c52){const _0x1d544a=_0x474c19,_0x133b63={'jztHC':function(_0x5ab2af,_0x36e1e7,_0x41bdeb){return _0x5ab2af(_0x36e1e7,_0x41bdeb);},'WytvO':function(_0x168bfe,_0x1d9eaf){return _0x168bfe(_0x1d9eaf);},'SZwDH':function(_0x113944,_0x3f50ba,_0x855aec){return _0x113944(_0x3f50ba,_0x855aec);}},_0x1c8e82=join(_0x122016,_0x1d544a(0x153)),_0xf9c730=_0x133b63['jztHC'](join,_0x1c8e82,_0x39da34);_0x133b63['WytvO'](existsSync,_0xf9c730)&&(_0x220c52&&await _0x133b63[_0x1d544a(0x13f)](isPathGitTracked,_0xf9c730)?console[_0x1d544a(0x1a5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xf9c730+_0x1d544a(0x1bb)):(await rm(_0xf9c730,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xf9c730)));if(existsSync(_0x1c8e82)){let _0x245b44=[];try{_0x245b44=await _0x133b63[_0x1d544a(0x13f)](readdir,_0x1c8e82);}catch{return;}const _0x2e55cb='.tmp-'+_0x39da34+'-';for(const _0x10ddfe of _0x245b44){if(!_0x10ddfe['startsWith'](_0x2e55cb))continue;const _0x564dde=_0x133b63[_0x1d544a(0x16c)](join,_0x1c8e82,_0x10ddfe);await rm(_0x564dde,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x564dde);}}}async function sweepOrphansBestEffort(_0x54a463){const _0xd0d54b=_0x474c19,_0x20193c={'selJY':function(_0x545f2c,_0x5313cb,_0x49666f,_0x2083b7){return _0x545f2c(_0x5313cb,_0x49666f,_0x2083b7);},'OEXfi':function(_0x48c730){return _0x48c730();},'SWsel':function(_0x4de933){return _0x4de933();},'DYPFQ':function(_0x5f3d00,_0x35e673){return _0x5f3d00 instanceof _0x35e673;}};try{await _0x20193c['selJY'](sweepOrphanLocalProfile,_0x54a463,_0x20193c['OEXfi'](getRangerHomeDir),![]);const _0x148bd1=getRangerDir();_0x148bd1!==_0x20193c['SWsel'](getRangerHomeDir)&&await _0x20193c[_0xd0d54b(0x190)](sweepOrphanLocalProfile,_0x54a463,_0x148bd1,!![]);}catch(_0x2e7725){console[_0xd0d54b(0x1a5)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x20193c['DYPFQ'](_0x2e7725,Error)?_0x2e7725['message']:String(_0x2e7725))+').');}}async function markActive(_0x1215c5){const _0x3ed437=_0x474c19;try{await writeActiveProfileName(_0x1215c5),console[_0x3ed437(0x1a5)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1215c5);}catch{console['log'](_0x3ed437(0x14e));}}async function tryAutoRouteCloudProfile(_0x24a6f6,_0x34a764,_0x49d5f6,_0xf3109f,_0x1c12f0){const _0x430d03=_0x474c19,_0xdcaa83={'zCWjj':function(_0xa88b68,_0xc02a29){return _0xa88b68===_0xc02a29;},'zuTrn':function(_0x16f86f){return _0x16f86f();},'biaBV':_0x430d03(0x14c),'TTFVr':'no_auth_config','RGQxA':function(_0x16dfd1,_0x4c4455){return _0x16dfd1 instanceof _0x4c4455;},'pqXFX':function(_0x3fc1f0,_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7){return _0x3fc1f0(_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7);},'XTRdB':function(_0x1431da,_0x35e665){return _0x1431da+_0x35e665;},'jJNeb':function(_0x4b3f36,_0x37e141){return _0x4b3f36+_0x37e141;},'HHaiR':function(_0x505d38,_0x1cc5b7){return _0x505d38+_0x1cc5b7;},'xrCNZ':function(_0x2d48a9,_0x4698d5){return _0x2d48a9+_0x4698d5;},'EkgmZ':_0x430d03(0x15d),'mADfB':_0x430d03(0x185),'bxDuj':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','bGZwu':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','pwoGs':'env_not_found','QdxgK':function(_0x1799b6,_0x13d59c){return _0x1799b6+_0x13d59c;},'mcvcg':function(_0x5ad7aa){return _0x5ad7aa();},'Qzyfn':function(_0x461006,_0x5b0b59){return _0x461006+_0x5b0b59;},'ISbbV':function(_0x2bf513,_0x114a0a){return _0x2bf513(_0x114a0a);}};let _0x3150f8;try{_0x3150f8=await _0xdcaa83[_0x430d03(0x163)](fetchAuthConfig);}catch(_0x429d16){return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83[_0x430d03(0x1af)],{'reason':_0xdcaa83['TTFVr'],'profileName':_0x24a6f6}),console['error'](_0x430d03(0x161)+(_0xdcaa83['RGQxA'](_0x429d16,Error)?_0x429d16[_0x430d03(0x169)]:String(_0x429d16))),![];}if((!_0x3150f8||!_0x3150f8['environments']||Object[_0x430d03(0x1a3)](_0x3150f8[_0x430d03(0x14b)])['length']===0x0)&&!_0x49d5f6[_0x430d03(0x182)]){if(_0xf3109f)return await _0xdcaa83[_0x430d03(0x19b)](captureEnvLessProfile,_0x24a6f6,_0x34a764,_0x49d5f6,_0x1c12f0);return _0x1c12f0?.['trackPhaseEnd'](_0x430d03(0x14c),{'reason':'no_auth_config','profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0xdcaa83['XTRdB'](_0xdcaa83['XTRdB'](_0xdcaa83[_0x430d03(0x1c1)](_0xdcaa83['HHaiR'](_0xdcaa83[_0x430d03(0x156)](_0xdcaa83['EkgmZ'],'\x0a'),_0xdcaa83['mADfB']),_0x430d03(0x146)+_0x24a6f6+_0x430d03(0x1c0)+_0x34a764+_0x430d03(0x1b8))+'\x0a',_0xdcaa83['bxDuj']),_0xdcaa83['bGZwu'])),![];}let _0x4047b5;if(_0x49d5f6['authEnv']){if(!_0x3150f8?.[_0x430d03(0x14b)]?.[_0x49d5f6['authEnv']]){const _0x469476=Object['keys'](_0x3150f8?.['environments']??{});return _0x1c12f0?.[_0x430d03(0x19a)]('profile.add.autoRouteSkipped',{'reason':_0xdcaa83['pwoGs'],'profileName':_0x24a6f6}),console['error'](_0xdcaa83[_0x430d03(0x187)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x49d5f6['authEnv']+'\x22\x20not\x20found.',_0x469476['length']?'\x20Configured\x20envs:\x20'+_0x469476[_0x430d03(0x1b6)](',\x20')+'.':_0x430d03(0x1a1))),![];}_0x4047b5=_0x49d5f6['authEnv'];}else _0x4047b5=matchAuthEnvironment(_0x34a764,_0x3150f8);if(!_0x4047b5)return _0x1c12f0?.[_0x430d03(0x19a)](_0xdcaa83['biaBV'],{'reason':'no_match','profileName':_0x24a6f6}),console[_0x430d03(0x171)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x34a764+_0x430d03(0x188)+Object[_0x430d03(0x1a3)](_0x3150f8?.['environments']??{})['join'](',\x20')+'.'),![];const _0x508f3c=_0x3150f8?.['environments']?.[_0x4047b5],_0x4cf8ed=_0x508f3c?.['domains']??[];if(_0xf3109f&&!_0x49d5f6[_0x430d03(0x194)]){const {saveToCloud:_0x37eaac}=await _0x36dc62[_0x430d03(0x181)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x4047b5+_0x430d03(0x1a9)+_0x34a764+_0x430d03(0x170)+_0x4cf8ed[_0x430d03(0x1b6)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x24a6f6+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x37eaac)return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83['biaBV'],{'reason':_0x430d03(0x1bf),'profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0x430d03(0x1b9)),![];}const _0x2a2962=_0x4cf8ed['some'](_0x434b28=>{const _0x446790=_0x430d03;try{return _0xdcaa83['zCWjj'](new URL(_0x434b28)[_0x446790(0x14f)],new URL(_0x34a764)['origin']);}catch{return![];}}),_0x2efd52={};!_0x2a2962&&(_0x2efd52['baseUrl']=_0x34a764);try{await createCloudProfile(_0x24a6f6,_0x4047b5,{'settings':_0x2efd52}),_0xdcaa83['mcvcg'](warnCloudProfileSharedInOrg);}catch(_0x23bba4){if(_0xdcaa83[_0x430d03(0x1b7)](_0x23bba4,ApiError)&&_0xdcaa83['zCWjj'](_0x23bba4['status'],0x199)){console['error'](_0xdcaa83['Qzyfn'](_0x430d03(0x19f)+_0x24a6f6+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x430d03(0x1ac)+_0x24a6f6));throw _0x23bba4;}throw _0x23bba4;}return console[_0x430d03(0x1a5)]('✓\x20Profile\x20\x27'+_0x24a6f6+_0x430d03(0x176)+(_0x430d03(0x17a)+_0x24a6f6)),await _0xdcaa83[_0x430d03(0x193)](sweepOrphansBestEffort,_0x24a6f6),_0x1c12f0?.[_0x430d03(0x19a)](_0x430d03(0x1b3),{'envKey':_0x4047b5,'profileName':_0x24a6f6}),!![];}async function createUnconfiguredCloudProfile(_0x7bf3a7,_0x55a66a){const _0x42d810=_0x474c19,_0x323af7={'qSkTr':function(_0x1d8539,_0x405c83,_0x123b62,_0x8ddd79){return _0x1d8539(_0x405c83,_0x123b62,_0x8ddd79);},'ddJHx':function(_0x4d78f3){return _0x4d78f3();}};try{await _0x323af7[_0x42d810(0x18b)](createCloudProfile,_0x7bf3a7,undefined,{'settings':_0x55a66a}),_0x323af7['ddJHx'](warnCloudProfileSharedInOrg);}catch(_0x56b594){_0x56b594 instanceof ApiError&&_0x56b594['status']===0x199&&console[_0x42d810(0x171)](_0x42d810(0x19f)+_0x7bf3a7+_0x42d810(0x1a4)+(_0x42d810(0x1ac)+_0x7bf3a7));throw _0x56b594;}}async function captureEnvLessProfile(_0x10a8ad,_0x2a42fb,_0x16d983,_0x5c1b64){const _0x1f5a47=_0x474c19,_0x452f96={'HFBiR':'confirm','XeVyy':_0x1f5a47(0x189),'tSTAa':'profile.add.autoRouteSkipped','OlfCR':function(_0x1cdab0,_0x10d92c){return _0x1cdab0+_0x10d92c;},'wkrOv':function(_0x36756b,_0x1cd1a3){return _0x36756b===_0x1cd1a3;},'EOzlx':function(_0x115f30,_0x2942fd){return _0x115f30>_0x2942fd;},'QRBUW':function(_0x556322){return _0x556322();},'YOfab':function(_0x485032,_0x238b38){return _0x485032 instanceof _0x238b38;},'QSQrx':function(_0x5756d2,_0x1b6dfd){return _0x5756d2===_0x1b6dfd;},'fNVCm':function(_0x532384,_0x3e2353){return _0x532384+_0x3e2353;},'GgmCj':function(_0x2b3226,_0x1f01ff){return _0x2b3226(_0x1f01ff);},'RAhRV':'profile.add.autoRouted'};if(!_0x16d983['yes']){const {capture:_0x41e066}=await _0x36dc62[_0x1f5a47(0x181)]([{'type':_0x452f96['HFBiR'],'name':_0x452f96[_0x1f5a47(0x151)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x41e066)return _0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96[_0x1f5a47(0x142)],{'reason':_0x1f5a47(0x1bf),'profileName':_0x10a8ad}),console['error'](_0x452f96[_0x1f5a47(0x199)](_0x1f5a47(0x167),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x1d8a28={};if(_0x16d983[_0x1f5a47(0x162)])for(const _0x17b18b of _0x16d983[_0x1f5a47(0x162)]){const _0x5928ef=_0x17b18b['indexOf'](':');if(_0x452f96[_0x1f5a47(0x1bd)](_0x5928ef,-0x1))continue;_0x1d8a28[_0x17b18b[_0x1f5a47(0x174)](0x0,_0x5928ef)[_0x1f5a47(0x158)]()]=_0x17b18b[_0x1f5a47(0x174)](_0x5928ef+0x1)[_0x1f5a47(0x158)]();}const _0x68b739={'baseUrl':_0x2a42fb};_0x452f96[_0x1f5a47(0x186)](Object[_0x1f5a47(0x1a3)](_0x1d8a28)['length'],0x0)&&(_0x68b739['setupHeaders']=_0x1d8a28);let _0x23863c;try{_0x23863c=await createCloudProfile(_0x10a8ad,undefined,{'settings':_0x68b739}),_0x452f96[_0x1f5a47(0x159)](warnCloudProfileSharedInOrg);}catch(_0x1dddfb){_0x452f96['YOfab'](_0x1dddfb,ApiError)&&_0x452f96[_0x1f5a47(0x175)](_0x1dddfb['status'],0x199)&&console['error'](_0x452f96[_0x1f5a47(0x199)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x10a8ad+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x10a8ad));throw _0x1dddfb;}return await manualBrowserLogin(_0x23863c,{'key':'','domains':[_0x2a42fb],'setupHeaders':_0x452f96['EOzlx'](Object['keys'](_0x1d8a28)[_0x1f5a47(0x195)],0x0)?_0x1d8a28:undefined}),console[_0x1f5a47(0x1a5)](_0x452f96['fNVCm']('\x0a✓\x20Profile\x20\x27'+_0x10a8ad+_0x1f5a47(0x18d),_0x1f5a47(0x17a)+_0x10a8ad)),await _0x452f96[_0x1f5a47(0x1ab)](sweepOrphansBestEffort,_0x10a8ad),_0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96['RAhRV'],{'envKey':null,'profileName':_0x10a8ad}),!![];}export async function addEnv(_0x486160,_0x10da3c={},_0x29f5bd){const _0x40145c=_0x474c19,_0x500ea3={'pXZxr':function(_0x1a93d9,_0x25f323){return _0x1a93d9+_0x25f323;},'wLqFw':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','HBwNX':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ptTAz':function(_0x12b310,_0x579f28){return _0x12b310+_0x579f28;},'lebwA':function(_0x1ec60a,_0x3397a4){return _0x1ec60a===_0x3397a4;},'NuIuc':_0x40145c(0x157),'oBMce':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','RcZWD':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','PsIHe':function(_0x4a2e1a,_0x12cbd7){return _0x4a2e1a(_0x12cbd7);},'cFuSA':_0x40145c(0x160),'IKxFy':function(_0x4bfafe,_0x3d2f2a){return _0x4bfafe>_0x3d2f2a;},'xtwTM':function(_0x5c24b0,_0x5d2f34,_0x51a194){return _0x5c24b0(_0x5d2f34,_0x51a194);},'jyimO':function(_0x4906f7,_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2){return _0x4906f7(_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2);},'qVLLg':'cdpEndpoint','HcsVZ':_0x40145c(0x183),'GfYao':function(_0x41cb68,_0x295cbf){return _0x41cb68 instanceof _0x295cbf;},'oxOZY':function(_0x205259,_0x3f1af7){return _0x205259(_0x3f1af7);},'HSQWa':function(_0x5ef7fe,_0x4bbc06){return _0x5ef7fe(_0x4bbc06);},'peeUf':function(_0xe16b84,_0x42a496){return _0xe16b84>_0x42a496;},'odoBi':function(_0x5469b1,_0x37d447){return _0x5469b1+_0x37d447;},'KLsTa':_0x40145c(0x1a8),'XIAgW':_0x40145c(0x1a2),'SzxKE':function(_0x7ff141,_0x38b5d0){return _0x7ff141||_0x38b5d0;},'zzAcb':'http://localhost:3000','WXEvf':'action','PVGxr':'What\x20would\x20you\x20like\x20to\x20do?','VGmFn':'Continue\x20anyway','JlJmv':_0x40145c(0x168),'ELCfD':function(_0x2830c5,_0xfe6833){return _0x2830c5===_0xfe6833;},'BdDDK':function(_0x58c56e,_0x2339e9){return _0x58c56e instanceof _0x2339e9;}};_0x10da3c['ci']&&(console[_0x40145c(0x171)](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x144)](_0x500ea3['pXZxr'](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x177)]+_0x40145c(0x15a)+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x500ea3[_0x40145c(0x1aa)]),'\x0a'),_0x40145c(0x13d))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x40145c(0x19e)](0x1));const _0x42b1d8={};if(_0x10da3c[_0x40145c(0x162)])for(const _0x49f23c of _0x10da3c[_0x40145c(0x162)]){const _0x56674c=_0x49f23c['indexOf'](':');if(_0x56674c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x49f23c+_0x40145c(0x198));const _0x2c43ab=_0x49f23c[_0x40145c(0x174)](0x0,_0x56674c)[_0x40145c(0x158)](),_0x367c9a=_0x49f23c[_0x40145c(0x174)](_0x500ea3[_0x40145c(0x166)](_0x56674c,0x1))[_0x40145c(0x158)]();_0x42b1d8[_0x2c43ab]=_0x367c9a;}if(_0x10da3c['cdpEndpoint']!==undefined&&_0x500ea3['lebwA'](_0x10da3c[_0x40145c(0x14a)][_0x40145c(0x158)](),''))throw new Error(_0x40145c(0x173));if(_0x10da3c[_0x40145c(0x14a)]&&_0x10da3c['url'])throw new Error(_0x500ea3['NuIuc']);if(_0x10da3c[_0x40145c(0x182)]&&_0x10da3c['skipAuth'])throw new Error(_0x500ea3['oBMce']);if(_0x10da3c['authEnv']&&_0x10da3c[_0x40145c(0x14a)])throw new Error(_0x500ea3['RcZWD']);const _0x515e3a=_0x500ea3[_0x40145c(0x150)](Boolean,_0x10da3c[_0x40145c(0x14a)]),_0x324881=isInteractive();if(!_0x324881&&!_0x10da3c[_0x40145c(0x1a7)]&&!_0x515e3a&&!_0x10da3c[_0x40145c(0x152)])throw new Error(_0x40145c(0x147));if(_0x515e3a){const _0x208617=_0x10da3c['cdpEndpoint'];console[_0x40145c(0x1a5)](_0x500ea3[_0x40145c(0x17b)]),console[_0x40145c(0x1a5)](_0x40145c(0x1ba)+_0x208617);const _0x13aa5d={'cdpEndpoint':_0x208617,'isElectron':!![]};_0x500ea3['IKxFy'](Object['keys'](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x13aa5d[_0x40145c(0x15b)]=_0x42b1d8);await _0x500ea3[_0x40145c(0x17d)](createUnconfiguredCloudProfile,_0x486160,_0x13aa5d);try{_0x500ea3['jyimO'](setProfileOverride,process[_0x40145c(0x1a6)](),_0x486160,_0x500ea3['qVLLg'],_0x208617),_0x500ea3['jyimO'](setProfileOverride,process['cwd'](),_0x486160,_0x500ea3[_0x40145c(0x1b4)],!![]);}catch(_0x1c184b){console[_0x40145c(0x171)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x500ea3['GfYao'](_0x1c184b,Error)?_0x1c184b[_0x40145c(0x169)]:_0x500ea3[_0x40145c(0x16e)](String,_0x1c184b)));}console[_0x40145c(0x1a5)]('✓\x20Cloud\x20profile\x20\x27'+_0x486160+_0x40145c(0x1ad)),await sweepOrphansBestEffort(_0x486160),await _0x500ea3['HSQWa'](markActive,_0x486160);return;}if(_0x10da3c['skipAuth']){const _0x15a5f3={};_0x10da3c[_0x40145c(0x1a7)]&&(_0x15a5f3['baseUrl']=_0x10da3c[_0x40145c(0x1a7)]);_0x500ea3[_0x40145c(0x197)](Object[_0x40145c(0x1a3)](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x15a5f3[_0x40145c(0x15b)]=_0x42b1d8);await createUnconfiguredCloudProfile(_0x486160,_0x15a5f3),console['log'](_0x500ea3[_0x40145c(0x184)](_0x40145c(0x1b0)+_0x486160+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x486160+'`\x20again\x20without\x20--skip-auth.')),await _0x500ea3[_0x40145c(0x148)](sweepOrphansBestEffort,_0x486160),await markActive(_0x486160);return;}if(_0x10da3c[_0x40145c(0x1a7)]){const _0x51c3d8=_0x10da3c['url'],_0x8687e3=await checkUrlReachability(_0x51c3d8);if(!_0x8687e3['ok']&&!_0x10da3c['force'])throw new Error(_0x40145c(0x140)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x165));!_0x8687e3['ok']&&_0x10da3c[_0x40145c(0x1b1)]&&console['log'](_0x40145c(0x18c)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x143));}else{console[_0x40145c(0x1a5)]('\x0a🌐\x20Profile\x20Setup\x0a'),console['log']('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console['log'](_0x500ea3['KLsTa']);let _0x5c6189='',_0x36bc63=![];while(!![]){const _0x448a6=await _0x36dc62['prompt']([{'type':'input','name':_0x500ea3[_0x40145c(0x1b5)],'message':_0x36bc63?_0x40145c(0x164):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x500ea3[_0x40145c(0x155)](_0x5c6189,_0x500ea3[_0x40145c(0x141)])}]);_0x5c6189=_0x448a6[_0x40145c(0x1a2)];const _0x439199=await checkUrlReachability(_0x5c6189);if(_0x439199['ok'])break;const _0x9b42f9=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5c6189),_0x58b069=_0x439199['isProtocolError']&&!_0x9b42f9,_0x1f623d=_0x58b069?_0x40145c(0x17e)+_0x5c6189:null;_0x36bc63=!![],console[_0x40145c(0x1a5)](_0x40145c(0x1bc)+_0x5c6189+':\x20'+_0x439199['error']);_0x1f623d&&console[_0x40145c(0x1a5)]('\x20\x20Did\x20you\x20mean\x20'+_0x1f623d+'?');const {action:_0x241f09}=await _0x36dc62[_0x40145c(0x181)]([{'type':_0x40145c(0x145),'name':_0x500ea3[_0x40145c(0x15f)],'message':_0x500ea3['PVGxr'],'choices':[..._0x1f623d?[{'name':_0x40145c(0x15c)+_0x1f623d,'value':_0x40145c(0x168)}]:[],{'name':_0x40145c(0x191),'value':'retry'},{'name':_0x500ea3[_0x40145c(0x14d)],'value':_0x40145c(0x15e)}]}]);if(_0x241f09===_0x500ea3[_0x40145c(0x180)]&&_0x1f623d){_0x5c6189=_0x1f623d;const _0xb8325=await checkUrlReachability(_0x5c6189);if(_0xb8325['ok'])break;console['log'](_0x40145c(0x192)+_0x5c6189+':\x20'+_0xb8325[_0x40145c(0x171)]);}else{if(_0x500ea3[_0x40145c(0x1be)](_0x241f09,'continue'))break;}}_0x10da3c={..._0x10da3c,'url':_0x5c6189};}let _0x5352c5=![];try{_0x5352c5=await tryAutoRouteCloudProfile(_0x486160,_0x10da3c['url'],_0x10da3c,_0x324881,_0x29f5bd);}catch(_0x565025){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x486160+'\x22:\x20'+(_0x500ea3['BdDDK'](_0x565025,Error)?_0x565025['message']:String(_0x565025))),process[_0x40145c(0x19e)](0x1);}!_0x5352c5&&process['exit'](0x1),await markActive(_0x486160);}
1
+ function _0x52cc(_0x20aea0,_0x14087){_0x20aea0=_0x20aea0-0x7a;const _0xbb0ca1=_0xbb0c();let _0x52cc67=_0xbb0ca1[_0x20aea0];return _0x52cc67;}const _0x18c33c=_0x52cc;(function(_0x42d565,_0x548cdb){const _0xf7975d=_0x52cc,_0x102ce9=_0x42d565();while(!![]){try{const _0x5b0355=parseInt(_0xf7975d(0xe8))/0x1+-parseInt(_0xf7975d(0xc7))/0x2*(-parseInt(_0xf7975d(0xe1))/0x3)+parseInt(_0xf7975d(0x8a))/0x4*(parseInt(_0xf7975d(0xeb))/0x5)+parseInt(_0xf7975d(0xe2))/0x6*(-parseInt(_0xf7975d(0x95))/0x7)+-parseInt(_0xf7975d(0xa6))/0x8+parseInt(_0xf7975d(0xb9))/0x9+-parseInt(_0xf7975d(0x88))/0xa;if(_0x5b0355===_0x548cdb)break;else _0x102ce9['push'](_0x102ce9['shift']());}catch(_0x232cbf){_0x102ce9['push'](_0x102ce9['shift']());}}}(_0xbb0c,0xeda3e));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x44c9a0 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=_0x18c33c(0x9a);function warnCloudProfileSharedInOrg(){const _0x24e429=_0x18c33c;if(!process[_0x24e429(0x80)]['isTTY'])return;console[_0x24e429(0xc9)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x1a1867){const _0x5c070c=_0x18c33c,_0x1f0a03={'NZyLI':_0x5c070c(0xc4),'XzAJs':function(_0x1b7598,_0x4f9e00,_0x421378){return _0x1b7598(_0x4f9e00,_0x421378);},'ZIBZa':function(_0x412dc3,_0x2f4f9d){return _0x412dc3(_0x2f4f9d);},'pyDmm':function(_0x15683d,_0x5033eb){return _0x15683d<_0x5033eb;},'GLUmw':'fetch\x20failed'};try{const _0x262de5=new AbortController(),_0x539745=setTimeout(()=>_0x262de5['abort'](),0x1388),_0x186dd5={'method':'HEAD','signal':_0x262de5['signal'],'redirect':_0x1f0a03['NZyLI']};/^https:\/\/localhost(:\d+)?/i['test'](_0x1a1867)&&(process['env'][_0x5c070c(0xf3)]='0');const _0x58a498=await _0x1f0a03['XzAJs'](fetch,_0x1a1867,_0x186dd5);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f0a03['ZIBZa'](clearTimeout,_0x539745);if(_0x1f0a03[_0x5c070c(0x9f)](_0x58a498[_0x5c070c(0x98)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x5c070c(0xe3)+_0x58a498['status']};}catch(_0xcc756){delete process[_0x5c070c(0x84)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xd04d85=_0xcc756,_0xf5f46e=_0xd04d85['message']||String(_0xcc756),_0x173143=_0xf5f46e['includes']('Invalid\x20URL')||_0xd04d85['name']==='TypeError'||_0xf5f46e['includes'](_0x1f0a03[_0x5c070c(0xb6)]);return{'ok':![],'error':_0xf5f46e,'isProtocolError':_0x173143};}}async function sweepOrphanLocalProfile(_0x2394d1,_0x30d02a,_0x76e168){const _0x2ec91e=_0x18c33c,_0x141de3={'McxVP':'local','NpwQm':function(_0xa908bd,_0x167591,_0xce43f1){return _0xa908bd(_0x167591,_0xce43f1);},'GNAHW':function(_0x9245ae,_0x4cfb2a){return _0x9245ae(_0x4cfb2a);},'cYfGR':function(_0x21fe66,_0x177f37){return _0x21fe66(_0x177f37);},'skiTD':function(_0x11014a,_0x2cfa57,_0x4a5b59){return _0x11014a(_0x2cfa57,_0x4a5b59);}},_0x5a1a24=join(_0x30d02a,_0x141de3[_0x2ec91e(0x81)]),_0x3e29c2=_0x141de3[_0x2ec91e(0xcf)](join,_0x5a1a24,_0x2394d1);_0x141de3['GNAHW'](existsSync,_0x3e29c2)&&(_0x76e168&&await _0x141de3[_0x2ec91e(0xb0)](isPathGitTracked,_0x3e29c2)?console[_0x2ec91e(0x7e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3e29c2+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x3e29c2,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3e29c2)));if(existsSync(_0x5a1a24)){let _0x5eb6ef=[];try{_0x5eb6ef=await _0x141de3[_0x2ec91e(0x85)](readdir,_0x5a1a24);}catch{return;}const _0x4683f6='.tmp-'+_0x2394d1+'-';for(const _0x5c5f01 of _0x5eb6ef){if(!_0x5c5f01['startsWith'](_0x4683f6))continue;const _0x12140f=join(_0x5a1a24,_0x5c5f01);await _0x141de3['skiTD'](rm,_0x12140f,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x12140f);}}}function _0xbb0c(){const _0x25c839=['profile.add.autoRouted','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x22\x20not\x20found.','manual','input','prompt','2578546CgVrsQ','\x27\x20created.\x0a','warn','HoLiN','eGTWA','zQDVT','error','baseUrl','NpwQm','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','Enter\x20a\x20different\x20URL','\x22:\x20','setupHeaders','continue','use_suggestion','\x0a\x20\x20(domains:\x20','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','ImtCp','trim','✓\x20Cloud\x20profile\x20\x27','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','test','YqBwE','\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','3Kpcdaf','2658ojXbJw','HTTP\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','some','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','1353538AcrEUO','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isElectron','15UKoKsi','yes','\x20(continuing\x20with\x20--force)','env_not_found','What\x20would\x20you\x20like\x20to\x20do?','LUost','BBiKh','authEnv','NODE_TLS_REJECT_UNAUTHORIZED','list','\x27\x20created\x20(no\x20session).\x0a','PQfUP','`\x20again\x20without\x20--skip-auth.','length','dVCox','tkFRx','force','log','NOIZv','stdout','McxVP','slice','uhGny','env','cYfGR','keys','rinWG','14878140BCBzNY','XovCP','384708fvgQOZ','uLapI','wDziJ','no_auth_config','NQwkw','\x27\x20created\x20(CDP).','no_match','qtgoH','exit','http://localhost:3000','skipAuth','7504UtMknG','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','TSpXX','status','cwd','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20\x20Did\x20you\x20mean\x20','setupHeader','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a🌐\x20Profile\x20Setup\x0a','pyDmm','message','\x20Configured\x20envs:\x20','pIwfP','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','7233752vOeMui','trackPhaseEnd','profile.add.autoRouteSkipped','dZmlt','HFxDS','cdpEndpoint','indexOf','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','rHEvH','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','GNAHW','✓\x20Profile\x20\x27','url','CmzjY','isProtocolError','environments','GLUmw','\x0a\x20\x20Could\x20not\x20reach\x20','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','8180649jBecwY','nBWOt','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','kmUTK','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','origin','vNnYO'];_0xbb0c=function(){return _0x25c839;};return _0xbb0c();}async function sweepOrphansBestEffort(_0x4b16cb){const _0x42938f=_0x18c33c,_0x1b9fca={'ieATx':function(_0xa62038){return _0xa62038();},'CmzjY':function(_0x829e00,_0x3c5b1b){return _0x829e00!==_0x3c5b1b;},'HqcHA':function(_0x37f109){return _0x37f109();},'pIwfP':function(_0x41012f,_0x4c1a85,_0x459918,_0x3bb3f6){return _0x41012f(_0x4c1a85,_0x459918,_0x3bb3f6);}};try{await sweepOrphanLocalProfile(_0x4b16cb,getRangerHomeDir(),![]);const _0x56c760=_0x1b9fca['ieATx'](getRangerDir);_0x1b9fca[_0x42938f(0xb3)](_0x56c760,_0x1b9fca['HqcHA'](getRangerHomeDir))&&await _0x1b9fca[_0x42938f(0xa2)](sweepOrphanLocalProfile,_0x4b16cb,_0x56c760,!![]);}catch(_0x2fe2e3){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x2fe2e3 instanceof Error?_0x2fe2e3['message']:String(_0x2fe2e3))+').');}}async function markActive(_0x36ed37){const _0x4ecbeb=_0x18c33c;try{await writeActiveProfileName(_0x36ed37),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x36ed37);}catch{console['log'](_0x4ecbeb(0x96));}}async function tryAutoRouteCloudProfile(_0x21b7b7,_0x199956,_0x34ee2b,_0x387980,_0x247027){const _0xaaa9a7=_0x18c33c,_0x4716f3={'tkFRx':'profile.add.autoRouteSkipped','ITdFW':function(_0x791864,_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67){return _0x791864(_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67);},'xUmZx':_0xaaa9a7(0x8d),'qzLHB':_0xaaa9a7(0xe0),'joapH':_0xaaa9a7(0xad),'uhGny':_0xaaa9a7(0xc2),'NQwkw':_0xaaa9a7(0xd0),'vNnYO':'user_declined','rwzvw':_0xaaa9a7(0xa3),'HoLiN':function(_0x2e9e6b,_0x40693b,_0x3d13d7,_0x249518){return _0x2e9e6b(_0x40693b,_0x3d13d7,_0x249518);},'DKQxg':function(_0x83bf5c){return _0x83bf5c();},'wDziJ':function(_0x3553d4,_0x5abb8e){return _0x3553d4+_0x5abb8e;},'qtgoH':function(_0x39c7d8,_0x2ed04c){return _0x39c7d8(_0x2ed04c);}};let _0x361f86;try{_0x361f86=await fetchAuthConfig();}catch(_0x23e014){return _0x247027?.['trackPhaseEnd'](_0x4716f3[_0xaaa9a7(0x7c)],{'reason':_0xaaa9a7(0x8d),'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0xaaa9a7(0xbd)+(_0x23e014 instanceof Error?_0x23e014[_0xaaa9a7(0xa0)]:String(_0x23e014))),![];}if((!_0x361f86||!_0x361f86[_0xaaa9a7(0xb5)]||Object[_0xaaa9a7(0x86)](_0x361f86[_0xaaa9a7(0xb5)])[_0xaaa9a7(0x7a)]===0x0)&&!_0x34ee2b['authEnv']){if(_0x387980)return await _0x4716f3['ITdFW'](captureEnvLessProfile,_0x21b7b7,_0x199956,_0x34ee2b,_0x247027);return _0x247027?.[_0xaaa9a7(0xa7)]('profile.add.autoRouteSkipped',{'reason':_0x4716f3['xUmZx'],'profileName':_0x21b7b7}),console['error'](_0x4716f3['qzLHB']+'\x0a'+_0x4716f3['joapH']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b7b7+'\x20--url\x20'+_0x199956+'\x20--skip-auth\x0a')+'\x0a'+_0x4716f3[_0xaaa9a7(0x83)]+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}let _0x34c080;if(_0x34ee2b[_0xaaa9a7(0xf2)]){if(!_0x361f86?.['environments']?.[_0x34ee2b['authEnv']]){const _0xfee778=Object[_0xaaa9a7(0x86)](_0x361f86?.[_0xaaa9a7(0xb5)]??{});return _0x247027?.[_0xaaa9a7(0xa7)](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0xee),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x34ee2b[_0xaaa9a7(0xf2)]+_0xaaa9a7(0xc3)+(_0xfee778['length']?_0xaaa9a7(0xa1)+_0xfee778['join'](',\x20')+'.':_0x4716f3[_0xaaa9a7(0x8e)])),![];}_0x34c080=_0x34ee2b[_0xaaa9a7(0xf2)];}else _0x34c080=matchAuthEnvironment(_0x199956,_0x361f86);if(!_0x34c080)return _0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0x90),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x199956+_0xaaa9a7(0xd9)+Object['keys'](_0x361f86?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2ec8ac=_0x361f86?.[_0xaaa9a7(0xb5)]?.[_0x34c080],_0x1b6316=_0x2ec8ac?.['domains']??[];if(_0x387980&&!_0x34ee2b['yes']){const {saveToCloud:_0x196d0e}=await _0x44c9a0[_0xaaa9a7(0xc6)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x34c080+'\x27\x20matching\x20'+_0x199956+_0xaaa9a7(0xd7)+_0x1b6316['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b7b7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x196d0e)return _0x247027?.[_0xaaa9a7(0xa7)](_0x4716f3['tkFRx'],{'reason':_0x4716f3[_0xaaa9a7(0xbf)],'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0x4716f3['rwzvw']),![];}const _0x291a6b=_0x1b6316[_0xaaa9a7(0xe5)](_0x4d9316=>{const _0x2cb6f0=_0xaaa9a7;try{return new URL(_0x4d9316)[_0x2cb6f0(0xbe)]===new URL(_0x199956)['origin'];}catch{return![];}}),_0x4d4b59={};!_0x291a6b&&(_0x4d4b59['baseUrl']=_0x199956);try{await _0x4716f3[_0xaaa9a7(0xca)](createCloudProfile,_0x21b7b7,_0x34c080,{'settings':_0x4d4b59}),_0x4716f3['DKQxg'](warnCloudProfileSharedInOrg);}catch(_0x1d42bc){if(_0x1d42bc instanceof ApiError&&_0x1d42bc['status']===0x199){console['error'](_0x4716f3[_0xaaa9a7(0x8c)](_0xaaa9a7(0xa4)+_0x21b7b7+_0xaaa9a7(0xa5),_0xaaa9a7(0xaf)+_0x21b7b7));throw _0x1d42bc;}throw _0x1d42bc;}return console['log'](_0xaaa9a7(0xb1)+_0x21b7b7+_0xaaa9a7(0xc8)+(_0xaaa9a7(0xd1)+_0x21b7b7)),await _0x4716f3[_0xaaa9a7(0x91)](sweepOrphansBestEffort,_0x21b7b7),_0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xc0),{'envKey':_0x34c080,'profileName':_0x21b7b7}),!![];}async function createUnconfiguredCloudProfile(_0x5c2291,_0x27032e){const _0x5a1111=_0x18c33c,_0x4e36b0={'wpBJx':function(_0x1328c0,_0x43e6db,_0x2ac7d8,_0x4299f8){return _0x1328c0(_0x43e6db,_0x2ac7d8,_0x4299f8);}};try{await _0x4e36b0['wpBJx'](createCloudProfile,_0x5c2291,undefined,{'settings':_0x27032e}),warnCloudProfileSharedInOrg();}catch(_0x471207){_0x471207 instanceof ApiError&&_0x471207[_0x5a1111(0x98)]===0x199&&console['error'](_0x5a1111(0xa4)+_0x5c2291+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x5a1111(0xaf)+_0x5c2291));throw _0x471207;}}async function captureEnvLessProfile(_0x225c34,_0x4a93a3,_0x5a4cd7,_0x75abc1){const _0x224aae=_0x18c33c,_0x122566={'gEqWa':'confirm','JsYNa':'capture','UZyyZ':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','eGTWA':'user_declined','NOIZv':function(_0x20cd89,_0x1dde6b){return _0x20cd89+_0x1dde6b;},'YUgLh':function(_0x5b368c,_0x148cb8,_0x220034,_0x12f550){return _0x5b368c(_0x148cb8,_0x220034,_0x12f550);},'rHEvH':function(_0x2ded60,_0x53bc0e){return _0x2ded60===_0x53bc0e;},'CFzVe':function(_0x5a0a59,_0x2becf2,_0x5bba0d){return _0x5a0a59(_0x2becf2,_0x5bba0d);},'eJhfM':function(_0x1fda23,_0x4ea5b6){return _0x1fda23>_0x4ea5b6;}};if(!_0x5a4cd7[_0x224aae(0xec)]){const {capture:_0x3917d3}=await _0x44c9a0['prompt']([{'type':_0x122566['gEqWa'],'name':_0x122566['JsYNa'],'message':_0x122566['UZyyZ'],'default':!![]}]);if(!_0x3917d3)return _0x75abc1?.[_0x224aae(0xa7)](_0x224aae(0xa8),{'reason':_0x122566[_0x224aae(0xcb)],'profileName':_0x225c34}),console['error'](_0x122566[_0x224aae(0x7f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x2d39f3={};if(_0x5a4cd7[_0x224aae(0x9c)])for(const _0xb43326 of _0x5a4cd7[_0x224aae(0x9c)]){const _0x4ac1d7=_0xb43326[_0x224aae(0xac)](':');if(_0x4ac1d7===-0x1)continue;_0x2d39f3[_0xb43326[_0x224aae(0x82)](0x0,_0x4ac1d7)['trim']()]=_0xb43326['slice'](_0x4ac1d7+0x1)[_0x224aae(0xdb)]();}const _0x456742={'baseUrl':_0x4a93a3};Object[_0x224aae(0x86)](_0x2d39f3)[_0x224aae(0x7a)]>0x0&&(_0x456742[_0x224aae(0xd4)]=_0x2d39f3);let _0x3d8630;try{_0x3d8630=await _0x122566['YUgLh'](createCloudProfile,_0x225c34,undefined,{'settings':_0x456742}),warnCloudProfileSharedInOrg();}catch(_0x28cf7f){_0x28cf7f instanceof ApiError&&_0x122566[_0x224aae(0xae)](_0x28cf7f['status'],0x199)&&console['error'](_0x122566['NOIZv'](_0x224aae(0xa4)+_0x225c34+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x225c34));throw _0x28cf7f;}return await _0x122566['CFzVe'](manualBrowserLogin,_0x3d8630,{'key':'','domains':[_0x4a93a3],'setupHeaders':_0x122566['eJhfM'](Object['keys'](_0x2d39f3)[_0x224aae(0x7a)],0x0)?_0x2d39f3:undefined}),console[_0x224aae(0x7e)]('\x0a✓\x20Profile\x20\x27'+_0x225c34+_0x224aae(0xe4)+(_0x224aae(0xd1)+_0x225c34)),await sweepOrphansBestEffort(_0x225c34),_0x75abc1?.['trackPhaseEnd'](_0x224aae(0xc0),{'envKey':null,'profileName':_0x225c34}),!![];}export async function addEnv(_0x5e8845,_0x3123d5={},_0x4b0e09){const _0x1f79da=_0x18c33c,_0x1a2158={'HFxDS':function(_0x1ae53a,_0x2bdb45){return _0x1ae53a+_0x2bdb45;},'dVCox':function(_0x494063,_0xc1763b){return _0x494063+_0xc1763b;},'NDwTh':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ImtCp':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','wCyts':function(_0x548ea8,_0x1bc251){return _0x548ea8===_0x1bc251;},'YqBwE':_0x1f79da(0xbb),'rinWG':_0x1f79da(0xc1),'zJkaL':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','tcCvl':function(_0x1958ec,_0x25ae49){return _0x1958ec(_0x25ae49);},'uLapI':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','LUost':function(_0x314326,_0x597285){return _0x314326>_0x597285;},'vMiAW':'cdpEndpoint','TSpXX':function(_0x541d67,_0x214cc3){return _0x541d67(_0x214cc3);},'tCdaZ':function(_0x580030,_0x5c698c,_0x46ffb1){return _0x580030(_0x5c698c,_0x46ffb1);},'BBiKh':_0x1f79da(0xc5),'dZmlt':_0x1f79da(0xce),'SEPGs':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','PQfUP':'action','zQDVT':_0x1f79da(0xd6),'kmUTK':'retry','XovCP':_0x1f79da(0xd5),'nBWOt':function(_0x58073b,_0xcdd50a){return _0x58073b(_0xcdd50a);},'uISnZ':function(_0x477658,_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf){return _0x477658(_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf);}};_0x3123d5['ci']&&(console['error'](_0x1a2158[_0x1f79da(0xaa)](_0x1a2158['HFxDS'](_0x1a2158['HFxDS'](_0x1a2158[_0x1f79da(0x7b)](_0x1a2158['HFxDS'](_0x1f79da(0xe9),'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+_0x1a2158['NDwTh'],'\x0a'),_0x1a2158[_0x1f79da(0xda)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x1f79da(0x92)](0x1));const _0x1764a0={};if(_0x3123d5['setupHeader'])for(const _0x252998 of _0x3123d5['setupHeader']){const _0x32d887=_0x252998['indexOf'](':');if(_0x1a2158['wCyts'](_0x32d887,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x252998+_0x1f79da(0x9d));const _0x56c9b2=_0x252998[_0x1f79da(0x82)](0x0,_0x32d887)[_0x1f79da(0xdb)](),_0x17170d=_0x252998['slice'](_0x32d887+0x1)[_0x1f79da(0xdb)]();_0x1764a0[_0x56c9b2]=_0x17170d;}if(_0x3123d5['cdpEndpoint']!==undefined&&_0x3123d5[_0x1f79da(0xab)][_0x1f79da(0xdb)]()==='')throw new Error(_0x1a2158[_0x1f79da(0xdf)]);if(_0x3123d5[_0x1f79da(0xab)]&&_0x3123d5['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x3123d5['authEnv']&&_0x3123d5[_0x1f79da(0x94)])throw new Error(_0x1a2158[_0x1f79da(0x87)]);if(_0x3123d5['authEnv']&&_0x3123d5['cdpEndpoint'])throw new Error(_0x1a2158['zJkaL']);const _0x3d559f=_0x1a2158['tcCvl'](Boolean,_0x3123d5[_0x1f79da(0xab)]),_0x49190f=isInteractive();if(!_0x49190f&&!_0x3123d5[_0x1f79da(0xb2)]&&!_0x3d559f&&!_0x3123d5['skipAuth'])throw new Error(_0x1f79da(0xb8));if(_0x3d559f){const _0x49139=_0x3123d5[_0x1f79da(0xab)];console['log'](_0x1a2158[_0x1f79da(0x8b)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x49139);const _0x41053f={'cdpEndpoint':_0x49139,'isElectron':!![]};_0x1a2158['LUost'](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x41053f['setupHeaders']=_0x1764a0);await createUnconfiguredCloudProfile(_0x5e8845,_0x41053f);try{setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1a2158['vMiAW'],_0x49139),setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1f79da(0xea),!![]);}catch(_0x248338){console[_0x1f79da(0xcd)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x248338 instanceof Error?_0x248338[_0x1f79da(0xa0)]:String(_0x248338)));}console[_0x1f79da(0x7e)](_0x1f79da(0xdc)+_0x5e8845+_0x1f79da(0x8f)),await sweepOrphansBestEffort(_0x5e8845),await _0x1a2158['TSpXX'](markActive,_0x5e8845);return;}if(_0x3123d5[_0x1f79da(0x94)]){const _0x50ce4c={};_0x3123d5[_0x1f79da(0xb2)]&&(_0x50ce4c[_0x1f79da(0xce)]=_0x3123d5['url']);_0x1a2158[_0x1f79da(0xf0)](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x50ce4c['setupHeaders']=_0x1764a0);await _0x1a2158['tCdaZ'](createUnconfiguredCloudProfile,_0x5e8845,_0x50ce4c),console['log'](_0x1a2158['dVCox']('✓\x20Profile\x20\x27'+_0x5e8845+_0x1f79da(0xf5),'\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5e8845+_0x1f79da(0xf7))),await _0x1a2158[_0x1f79da(0x97)](sweepOrphansBestEffort,_0x5e8845),await markActive(_0x5e8845);return;}if(_0x3123d5['url']){const _0x278f7f=_0x3123d5[_0x1f79da(0xb2)],_0x573fca=await _0x1a2158['TSpXX'](checkUrlReachability,_0x278f7f);if(!_0x573fca['ok']&&!_0x3123d5[_0x1f79da(0x7d)])throw new Error('Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca[_0x1f79da(0xcd)]+_0x1f79da(0xd8));!_0x573fca['ok']&&_0x3123d5[_0x1f79da(0x7d)]&&console[_0x1f79da(0x7e)]('⚠\x20Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca['error']+_0x1f79da(0xed));}else{console[_0x1f79da(0x7e)](_0x1f79da(0x9e)),console[_0x1f79da(0x7e)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x1f79da(0x7e)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5675dd='',_0x54bb74=![];while(!![]){const _0x1c3f22=await _0x44c9a0['prompt']([{'type':_0x1a2158[_0x1f79da(0xf1)],'name':_0x1a2158[_0x1f79da(0xa9)],'message':_0x54bb74?_0x1f79da(0xe7):_0x1a2158['SEPGs'],'default':_0x5675dd||_0x1f79da(0x93)}]);_0x5675dd=_0x1c3f22['baseUrl'];const _0x11043f=await _0x1a2158['TSpXX'](checkUrlReachability,_0x5675dd);if(_0x11043f['ok'])break;const _0x204ee2=/^[a-zA-Z][\w+.-]*:\/\//[_0x1f79da(0xde)](_0x5675dd),_0x51e4e4=_0x11043f[_0x1f79da(0xb4)]&&!_0x204ee2,_0x515291=_0x51e4e4?'http://'+_0x5675dd:null;_0x54bb74=!![],console[_0x1f79da(0x7e)](_0x1f79da(0xb7)+_0x5675dd+':\x20'+_0x11043f['error']);_0x515291&&console[_0x1f79da(0x7e)](_0x1f79da(0x9b)+_0x515291+'?');const {action:_0x365bed}=await _0x44c9a0['prompt']([{'type':_0x1f79da(0xf4),'name':_0x1a2158[_0x1f79da(0xf6)],'message':_0x1f79da(0xef),'choices':[..._0x515291?[{'name':'Use\x20'+_0x515291,'value':_0x1a2158[_0x1f79da(0xcc)]}]:[],{'name':_0x1f79da(0xd2),'value':_0x1a2158[_0x1f79da(0xbc)]},{'name':'Continue\x20anyway','value':_0x1a2158['XovCP']}]}]);if(_0x365bed===_0x1a2158[_0x1f79da(0xcc)]&&_0x515291){_0x5675dd=_0x515291;const _0x46fadc=await _0x1a2158[_0x1f79da(0xba)](checkUrlReachability,_0x5675dd);if(_0x46fadc['ok'])break;console[_0x1f79da(0x7e)](_0x1f79da(0xdd)+_0x5675dd+':\x20'+_0x46fadc[_0x1f79da(0xcd)]);}else{if(_0x365bed===_0x1a2158[_0x1f79da(0x89)])break;}}_0x3123d5={..._0x3123d5,'url':_0x5675dd};}let _0x21503c=![];try{_0x21503c=await _0x1a2158['uISnZ'](tryAutoRouteCloudProfile,_0x5e8845,_0x3123d5['url'],_0x3123d5,_0x49190f,_0x4b0e09);}catch(_0xc84b27){console['error'](_0x1f79da(0xe6)+_0x5e8845+_0x1f79da(0xd3)+(_0xc84b27 instanceof Error?_0xc84b27['message']:_0x1a2158[_0x1f79da(0x97)](String,_0xc84b27))),process['exit'](0x1);}!_0x21503c&&process[_0x1f79da(0x92)](0x1),await markActive(_0x5e8845);}
@@ -1 +1 @@
1
- (function(_0x4d0866,_0x3f22a9){var _0xdd6530=_0x3310,_0x7e0c2d=_0x4d0866();while(!![]){try{var _0x43348d=parseInt(_0xdd6530(0xba))/0x1*(-parseInt(_0xdd6530(0xc5))/0x2)+parseInt(_0xdd6530(0xbf))/0x3*(parseInt(_0xdd6530(0xc4))/0x4)+parseInt(_0xdd6530(0xc1))/0x5+-parseInt(_0xdd6530(0xbd))/0x6*(parseInt(_0xdd6530(0xb9))/0x7)+-parseInt(_0xdd6530(0xc2))/0x8+parseInt(_0xdd6530(0xbe))/0x9+-parseInt(_0xdd6530(0xbb))/0xa;if(_0x43348d===_0x3f22a9)break;else _0x7e0c2d['push'](_0x7e0c2d['shift']());}catch(_0x1637f9){_0x7e0c2d['push'](_0x7e0c2d['shift']());}}}(_0x132a,0x6c3d8));function _0x3310(_0x42780f,_0x452b8f){_0x42780f=_0x42780f-0xb8;var _0x132a80=_0x132a();var _0x33101f=_0x132a80[_0x42780f];return _0x33101f;}export async function authEncrypt(_0x47250d){var _0xe085f0=_0x3310,_0x778edc={'lbLFR':function(_0x1aa58e,_0x452279){return _0x1aa58e+_0x452279;},'BQDam':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','ZJzMd':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console['error'](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc['lbLFR']('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a'+_0x778edc['BQDam']+'\x0a',_0x778edc[_0xe085f0(0xc3)]),_0xe085f0(0xbc))+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0xe085f0(0xb8))),process[_0xe085f0(0xc6)](0x1);}function _0x132a(){var _0x3e2285=['241507NKILDf','13abvEDZ','8047890ORuzBI','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','84FxpCxo','7504740YuvrxT','3rvMJsW','lbLFR','1326900JarBEu','135960oskQWo','ZJzMd','2793812YxmoXh','7622XBUtfo','exit','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x132a=function(){return _0x3e2285;};return _0x132a();}
1
+ (function(_0x3c01fb,_0x36eaaf){var _0x2d4940=_0x1988,_0x5bbab3=_0x3c01fb();while(!![]){try{var _0x56f5c6=-parseInt(_0x2d4940(0x17e))/0x1+parseInt(_0x2d4940(0x17f))/0x2*(parseInt(_0x2d4940(0x17c))/0x3)+parseInt(_0x2d4940(0x182))/0x4*(parseInt(_0x2d4940(0x179))/0x5)+-parseInt(_0x2d4940(0x184))/0x6*(-parseInt(_0x2d4940(0x18a))/0x7)+-parseInt(_0x2d4940(0x180))/0x8+-parseInt(_0x2d4940(0x187))/0x9*(parseInt(_0x2d4940(0x17a))/0xa)+-parseInt(_0x2d4940(0x188))/0xb;if(_0x56f5c6===_0x36eaaf)break;else _0x5bbab3['push'](_0x5bbab3['shift']());}catch(_0x40679a){_0x5bbab3['push'](_0x5bbab3['shift']());}}}(_0x36d7,0x3c5ff));function _0x1988(_0x5cf506,_0x447387){_0x5cf506=_0x5cf506-0x179;var _0x36d7f9=_0x36d7();var _0x1988e5=_0x36d7f9[_0x5cf506];return _0x1988e5;}function _0x36d7(){var _0x3b9ba6=['3991504GCgOKJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6937pGEoig','15bJSqEV','30SbqVsl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','777EFaOzU','WUmKX','10146kkULCb','2570rJZkXQ','399528zFAcaW','error','378212VVOdNz','hcXRl','2124bREujn','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','TPvZi','891126izesLv'];_0x36d7=function(){return _0x3b9ba6;};return _0x36d7();}export async function authEncrypt(_0x213a0a){var _0x3b442c=_0x1988,_0x96229a={'WUmKX':function(_0x3d2905,_0x3d5866){return _0x3d2905+_0x3d5866;},'xYsxu':function(_0x270c45,_0x156ba1){return _0x270c45+_0x156ba1;},'hcXRl':function(_0x282000,_0x4fac23){return _0x282000+_0x4fac23;},'TPvZi':function(_0x4af8c1,_0x3dea15){return _0x4af8c1+_0x3dea15;},'tcwLW':_0x3b442c(0x189),'yfBbw':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x3b442c(0x181)](_0x96229a[_0x3b442c(0x17d)](_0x96229a['xYsxu'](_0x96229a[_0x3b442c(0x183)](_0x96229a[_0x3b442c(0x186)](_0x96229a['hcXRl'](_0x3b442c(0x17b),_0x3b442c(0x185)),'\x0a')+_0x96229a['tcwLW'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x96229a['yfBbw'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x5d2372=_0x4161;(function(_0x3754d7,_0x1e49e8){const _0x36f09f=_0x4161,_0x3b7c8f=_0x3754d7();while(!![]){try{const _0x115fa5=parseInt(_0x36f09f(0x10b))/0x1*(-parseInt(_0x36f09f(0x11a))/0x2)+parseInt(_0x36f09f(0x117))/0x3+-parseInt(_0x36f09f(0x137))/0x4+parseInt(_0x36f09f(0x10d))/0x5+-parseInt(_0x36f09f(0x11d))/0x6*(parseInt(_0x36f09f(0x11b))/0x7)+parseInt(_0x36f09f(0x127))/0x8*(-parseInt(_0x36f09f(0x115))/0x9)+-parseInt(_0x36f09f(0x126))/0xa*(-parseInt(_0x36f09f(0x112))/0xb);if(_0x115fa5===_0x1e49e8)break;else _0x3b7c8f['push'](_0x3b7c8f['shift']());}catch(_0x3e569b){_0x3b7c8f['push'](_0x3b7c8f['shift']());}}}(_0x12bc,0x91a9d));function _0x4161(_0x284119,_0x2332c9){_0x284119=_0x284119-0x104;const _0x12bc73=_0x12bc();let _0x4161c1=_0x12bc73[_0x284119];return _0x4161c1;}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x12bc(){const _0x991d0f=['project','2315165AEJIeb','utf-8','fBphD','bug-bash','isArray','31911ndRGEA','ifnLF','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','1953OfAsTa','ignore','2372265eplwrS','error','replace','52976JEstjG','7408737lnwbZi','fFKTI','6umzabW','jJvPO','OLUJl','--scope','DlGot','close','Zdolj','opiPp','platform','4030xnYBur','15184yauTQj','VqYuu','plugin','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','DBaBk','opencode.json','MUepC','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','InfSL','ranger@trailhead','MMkfO','length','PcGWZ','LETuV','46612DRnYXY','feature-tracker','✓\x20Removed\x20project\x20skill:\x20','e2e-test-recommender','aWUsg','mJSyE','stringify','sCMqF','glLAs','yTOCR','bGHCE','log','EySGE','✓\x20Removed\x20.ranger/\x20directory','\x0a✅\x20Cleanup\x20complete!\x0a','sHMBr','fdGGt','13cRMNzC'];_0x12bc=function(){return _0x991d0f;};return _0x12bc();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x5d2372(0x138),_0x5d2372(0x110),_0x5d2372(0x13a)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1e4d0b){const _0x4eb74d=_0x5d2372,_0xefd507=_0x1e4d0b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x9cf462=_0xefd507[_0x4eb74d(0x119)](/^\s*\/\/.*$/gm,''),_0x37e6b9=_0x9cf462['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x37e6b9);}async function removeOpencodePluginConfig(_0x5c1531){const _0x5943b3=_0x5d2372,_0xa1bf1f={'CWQvr':'string','sHMBr':function(_0x34fe7a,_0x338357,_0x2785dd){return _0x34fe7a(_0x338357,_0x2785dd);},'xGjro':function(_0x3166ce,_0x13a288){return _0x3166ce(_0x13a288);},'sCMqF':function(_0x1f680e,_0x15d326){return _0x1f680e===_0x15d326;},'mJSyE':function(_0x2bc812,_0x1bd34c){return _0x2bc812===_0x1bd34c;}};if(!existsSync(_0x5c1531))return![];let _0x33f611;try{const _0x44522f=await _0xa1bf1f[_0x5943b3(0x109)](readFile,_0x5c1531,_0x5943b3(0x10e));_0x33f611=_0xa1bf1f['xGjro'](parseJsonc,_0x44522f);}catch{return![];}const _0x161f4a=Array[_0x5943b3(0x111)](_0x33f611[_0x5943b3(0x129)])?_0x33f611['plugin']:[];if(_0xa1bf1f[_0x5943b3(0x13e)](_0x161f4a[_0x5943b3(0x134)],0x0))return![];const _0x277c9b=_0x161f4a['filter'](_0x212241=>{if(typeof _0x212241!==_0xa1bf1f['CWQvr'])return!![];return _0x212241!==opencodePluginName;});if(_0xa1bf1f[_0x5943b3(0x13c)](_0x277c9b[_0x5943b3(0x134)],_0x161f4a[_0x5943b3(0x134)]))return![];return _0x277c9b[_0x5943b3(0x134)]===0x0?delete _0x33f611[_0x5943b3(0x129)]:_0x33f611[_0x5943b3(0x129)]=_0x277c9b,await _0xa1bf1f[_0x5943b3(0x109)](writeFile,_0x5c1531,JSON[_0x5943b3(0x13d)](_0x33f611,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xd8fa18){const _0x1d4b63=_0x5d2372,_0x55899a={'EySGE':_0x1d4b63(0x129),'DbQTi':'uninstall','uQgYn':function(_0x2c3a50,_0x421a83,_0xc5cf12,_0x5196a0){return _0x2c3a50(_0x421a83,_0xc5cf12,_0x5196a0);},'fFKTI':'claude','UWQMV':function(_0x5f38f9){return _0x5f38f9();},'Zdolj':function(_0xd83f38,_0x489da0){return _0xd83f38===_0x489da0;},'MMkfO':_0x1d4b63(0x122)};return new Promise(_0x31749c=>{const _0xe3c757=_0x1d4b63,_0x5324aa={'LETuV':function(_0x3463c0,_0x47a19c){return _0x3463c0===_0x47a19c;}},_0x2334dc=[_0x55899a[_0xe3c757(0x106)],_0x55899a['DbQTi'],_0xe3c757(0x132)];_0xd8fa18&&_0x2334dc['push'](_0xe3c757(0x120),_0xd8fa18);const _0x36f3bc=_0x55899a['uQgYn'](spawn,_0x55899a[_0xe3c757(0x11c)],_0x2334dc,{'stdio':['ignore',_0xe3c757(0x116),'ignore'],'cwd':_0xd8fa18?_0x55899a['UWQMV'](getProjectRoot):undefined,'shell':_0x55899a[_0xe3c757(0x123)](process[_0xe3c757(0x125)],'win32')});_0x36f3bc['on'](_0x55899a[_0xe3c757(0x133)],_0x43538d=>{const _0x509087=_0xe3c757;_0x31749c(_0x5324aa[_0x509087(0x136)](_0x43538d,0x0));}),_0x36f3bc['on']('error',()=>{_0x31749c(![]);});});}async function removeMarketplace(){const _0x3e5391=_0x5d2372,_0x3b0d71={'InfSL':function(_0x4e1e40,_0x567049){return _0x4e1e40===_0x567049;},'yTOCR':function(_0x490b58,_0xbeaa57,_0x1778f2,_0x2256bb){return _0x490b58(_0xbeaa57,_0x1778f2,_0x2256bb);},'OLUJl':'claude','EwLVi':'plugin','glLAs':'marketplace','KOhSf':'trailhead','PcGWZ':_0x3e5391(0x116),'mzArr':'win32'};return new Promise(_0x3f96ab=>{const _0x9ee895=_0x3e5391,_0x58ddc5=_0x3b0d71[_0x9ee895(0x140)](spawn,_0x3b0d71[_0x9ee895(0x11f)],[_0x3b0d71['EwLVi'],_0x3b0d71[_0x9ee895(0x13f)],'remove',_0x3b0d71['KOhSf']],{'stdio':[_0x3b0d71['PcGWZ'],_0x3b0d71[_0x9ee895(0x135)],'ignore'],'shell':process[_0x9ee895(0x125)]===_0x3b0d71['mzArr']});_0x58ddc5['on'](_0x9ee895(0x122),_0x5de54a=>{const _0x4ee43c=_0x9ee895;_0x3f96ab(_0x3b0d71[_0x4ee43c(0x131)](_0x5de54a,0x0));}),_0x58ddc5['on'](_0x9ee895(0x118),()=>{_0x3f96ab(![]);});});}export async function clean(){const _0xde93ae=_0x5d2372,_0x586c0b={'bGHCE':function(_0x39b19e){return _0x39b19e();},'VqYuu':'✓\x20Removed\x20stored\x20credentials','NiuRC':function(_0x36a7c8,_0x2f5d6e){return _0x36a7c8(_0x2f5d6e);},'aWUsg':function(_0x350a68,_0x1cbfbf,_0x10d80b){return _0x350a68(_0x1cbfbf,_0x10d80b);},'fdGGt':function(_0x580ab9){return _0x580ab9();},'HjpQT':function(_0x33d016,_0x5b5ed2){return _0x33d016(_0x5b5ed2);},'opiPp':function(_0x413d5c,_0xf23a84,_0x545736){return _0x413d5c(_0xf23a84,_0x545736);},'DlGot':function(_0x6fcf73,_0x52357e){return _0x6fcf73(_0x52357e);},'fBphD':_0xde93ae(0x10c),'fdPhq':function(_0xdc4aa5,_0x1cca35){return _0xdc4aa5(_0x1cca35);},'jJvPO':_0xde93ae(0x12b),'ifnLF':_0xde93ae(0x12d),'YEbub':function(_0x2371e5){return _0x2371e5();},'dqyjp':function(_0x43b38c){return _0x43b38c();},'MUepC':'✓\x20Removed\x20trailhead\x20marketplace','DBaBk':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0xde93ae(0x105)](_0xde93ae(0x12f));let _0x7c4ec4=![];try{await _0x586c0b[_0xde93ae(0x104)](deleteAllCredentials),console['log'](_0x586c0b[_0xde93ae(0x128)]),_0x7c4ec4=!![];}catch{}const _0x3829df=_0x586c0b[_0xde93ae(0x104)](getCacheFile);existsSync(_0x3829df)&&(await rm(_0x3829df),_0x7c4ec4=!![]);const _0xd32b48=_0x586c0b['bGHCE'](getRangerDir);existsSync(_0xd32b48)&&(await rm(_0xd32b48,{'recursive':!![]}),console[_0xde93ae(0x105)](_0xde93ae(0x107)),_0x7c4ec4=!![]);const _0x37e404=_0x586c0b['bGHCE'](getProjectSkillsDir);for(const _0x3f008f of skillsToRemove){const _0x337b80=join(_0x37e404,_0x3f008f);_0x586c0b['NiuRC'](existsSync,_0x337b80)&&(await _0x586c0b['aWUsg'](rm,_0x337b80,{'recursive':!![]}),console['log'](_0xde93ae(0x139)+_0x3f008f),_0x7c4ec4=!![]);}const _0x9e10f2=_0x586c0b[_0xde93ae(0x10a)](getUserSkillsDir);for(const _0x5b76e4 of skillsToRemove){const _0x134115=join(_0x9e10f2,_0x5b76e4);existsSync(_0x134115)&&(await _0x586c0b[_0xde93ae(0x13b)](rm,_0x134115,{'recursive':!![]}),console[_0xde93ae(0x105)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5b76e4),_0x7c4ec4=!![]);}const _0x1b6a85=getOpencodeSkillsDir('project');for(const _0x1a54d8 of skillsToRemove){const _0x8c745a=join(_0x1b6a85,_0x1a54d8);existsSync(_0x8c745a)&&(await _0x586c0b['aWUsg'](rm,_0x8c745a,{'recursive':!![]}),console['log'](_0xde93ae(0x12a)+_0x1a54d8),_0x7c4ec4=!![]);}const _0xce08dd=_0x586c0b['HjpQT'](getOpencodeSkillsDir,'user');for(const _0x330c18 of skillsToRemove){const _0x4eb125=_0x586c0b[_0xde93ae(0x124)](join,_0xce08dd,_0x330c18);_0x586c0b[_0xde93ae(0x121)](existsSync,_0x4eb125)&&(await _0x586c0b['aWUsg'](rm,_0x4eb125,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x330c18),_0x7c4ec4=!![]);}const _0x507756=join(getOpencodeConfigDir(_0x586c0b[_0xde93ae(0x10f)]),_0xde93ae(0x12d));await _0x586c0b['fdPhq'](removeOpencodePluginConfig,_0x507756)&&(console[_0xde93ae(0x105)](_0x586c0b[_0xde93ae(0x11e)]),_0x7c4ec4=!![]);const _0x3a679c=join(getOpencodeConfigDir('user'),_0x586c0b[_0xde93ae(0x113)]);await _0x586c0b['DlGot'](removeOpencodePluginConfig,_0x3a679c)&&(console['log'](_0xde93ae(0x114)),_0x7c4ec4=!![]);const _0x2cc49d=await _0x586c0b['YEbub'](uninstallClaudePlugin);_0x2cc49d&&(console[_0xde93ae(0x105)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x7c4ec4=!![]);const _0x22f603=await uninstallClaudePlugin(_0x586c0b['fBphD']);_0x22f603&&(console['log'](_0xde93ae(0x130)),_0x7c4ec4=!![]);const _0x516ff9=await _0x586c0b['dqyjp'](removeMarketplace);_0x516ff9&&(console['log'](_0x586c0b[_0xde93ae(0x12e)]),_0x7c4ec4=!![]),_0x7c4ec4?console['log'](_0xde93ae(0x108)):console['log'](_0x586c0b[_0xde93ae(0x12c)]);}
1
+ const _0x562198=_0x19ea;(function(_0x3bc797,_0x4b42c8){const _0x5cbd66=_0x19ea,_0x9f4dbe=_0x3bc797();while(!![]){try{const _0x599ed0=-parseInt(_0x5cbd66(0xfa))/0x1*(-parseInt(_0x5cbd66(0xea))/0x2)+-parseInt(_0x5cbd66(0xef))/0x3+parseInt(_0x5cbd66(0xf6))/0x4*(parseInt(_0x5cbd66(0x10a))/0x5)+parseInt(_0x5cbd66(0xf2))/0x6*(parseInt(_0x5cbd66(0x101))/0x7)+-parseInt(_0x5cbd66(0xeb))/0x8+parseInt(_0x5cbd66(0x10b))/0x9*(parseInt(_0x5cbd66(0x102))/0xa)+parseInt(_0x5cbd66(0xee))/0xb*(-parseInt(_0x5cbd66(0xf3))/0xc);if(_0x599ed0===_0x4b42c8)break;else _0x9f4dbe['push'](_0x9f4dbe['shift']());}catch(_0x382f3f){_0x9f4dbe['push'](_0x9f4dbe['shift']());}}}(_0x23ce,0xaec82));import{rm,readFile,writeFile}from'fs/promises';function _0x19ea(_0x1b6920,_0x2ddaab){_0x1b6920=_0x1b6920-0xde;const _0x23ce58=_0x23ce();let _0x19ead0=_0x23ce58[_0x1b6920];return _0x19ead0;}function _0x23ce(){const _0x4dac1b=['✓\x20Removed\x20stored\x20credentials','parse','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','BSHxD','✓\x20Removed\x20trailhead\x20marketplace','replace','xRczR','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','user','platform','pdLxA','utf-8','2vplnGe','10596392SnhXVl','jRfqy','--scope','33LXapIa','1981842DgKpDG','EqyOO','cRcPB','4686YSkyQG','1849452EYCRGB','rWGfI','tWGca','4184ZXCZQV','string','plugin','stringify','649429rvSwZZ','fJiWm','ZLjuZ','close','GAFge','RjLxj','@ranger-testing/opencode-plugin','4739GRQdFz','213260vByKCF','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','ignore','VuQVx','project','✓\x20Removed\x20.ranger/\x20directory','GvAda','GTDHT','3985zHKsvc','486yDissN','gVABw','pNQTD','LUVbG','XWWrR','feature-tracker','log','error','e2e-test-recommender'];_0x23ce=function(){return _0x4dac1b;};return _0x23ce();}import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x562198(0x110),'bug-bash',_0x562198(0x113)],opencodePluginName=_0x562198(0x100);function parseJsonc(_0x31008a){const _0x46343f=_0x562198,_0x425663=_0x31008a['replace'](/\/\*[\s\S]*?\*\//g,''),_0x53f50=_0x425663['replace'](/^\s*\/\/.*$/gm,''),_0x500c1f=_0x53f50[_0x46343f(0xe3)](/,\s*([}\]])/g,'$1');return JSON[_0x46343f(0xde)](_0x500c1f);}async function removeOpencodePluginConfig(_0xa4316a){const _0x12bc55=_0x562198,_0x3af322={'GvAda':_0x12bc55(0xf7),'qjjGZ':function(_0x4f45dc,_0x27b95d){return _0x4f45dc!==_0x27b95d;},'GAFge':function(_0x485ce1,_0x114e26){return _0x485ce1(_0x114e26);}};if(!existsSync(_0xa4316a))return![];let _0x26bf7f;try{const _0x436e0e=await readFile(_0xa4316a,_0x12bc55(0xe9));_0x26bf7f=_0x3af322[_0x12bc55(0xfe)](parseJsonc,_0x436e0e);}catch{return![];}const _0x2210c7=Array['isArray'](_0x26bf7f['plugin'])?_0x26bf7f[_0x12bc55(0xf8)]:[];if(_0x2210c7['length']===0x0)return![];const _0x2008e1=_0x2210c7['filter'](_0x1fa309=>{const _0x1c7e0f=_0x12bc55;if(typeof _0x1fa309!==_0x3af322[_0x1c7e0f(0x108)])return!![];return _0x3af322['qjjGZ'](_0x1fa309,opencodePluginName);});if(_0x2008e1['length']===_0x2210c7['length'])return![];return _0x2008e1['length']===0x0?delete _0x26bf7f[_0x12bc55(0xf8)]:_0x26bf7f[_0x12bc55(0xf8)]=_0x2008e1,await writeFile(_0xa4316a,JSON[_0x12bc55(0xf9)](_0x26bf7f,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x33c4c7){const _0xcab7c8=_0x562198,_0x56e10c={'VZVeb':'uninstall','GTDHT':'ranger@trailhead','GRNmW':_0xcab7c8(0xed),'WoKlM':_0xcab7c8(0xfd)};return new Promise(_0x3f6eda=>{const _0x24bea4=_0xcab7c8,_0x4bb28d={'Rlzpb':function(_0x57f41f,_0x446da0){return _0x57f41f(_0x446da0);},'KwihW':function(_0x47698c,_0x533ad6){return _0x47698c===_0x533ad6;}},_0x3c77d1=[_0x24bea4(0xf8),_0x56e10c['VZVeb'],_0x56e10c[_0x24bea4(0x109)]];_0x33c4c7&&_0x3c77d1['push'](_0x56e10c['GRNmW'],_0x33c4c7);const _0x5c4043=spawn('claude',_0x3c77d1,{'stdio':[_0x24bea4(0x104),'ignore','ignore'],'cwd':_0x33c4c7?getProjectRoot():undefined,'shell':process[_0x24bea4(0xe7)]==='win32'});_0x5c4043['on'](_0x56e10c['WoKlM'],_0x9aa182=>{_0x4bb28d['Rlzpb'](_0x3f6eda,_0x4bb28d['KwihW'](_0x9aa182,0x0));}),_0x5c4043['on']('error',()=>{_0x3f6eda(![]);});});}async function removeMarketplace(){const _0x250d64=_0x562198,_0x2d4659={'xQcWS':function(_0x1605a6,_0x41c975){return _0x1605a6(_0x41c975);},'zOsPa':'plugin','XWWrR':'remove','lXaiX':'trailhead','xRczR':_0x250d64(0x104),'fJiWm':_0x250d64(0xfd)};return new Promise(_0x4c9077=>{const _0x1b4555=_0x250d64,_0x714687=spawn('claude',[_0x2d4659['zOsPa'],'marketplace',_0x2d4659[_0x1b4555(0x10f)],_0x2d4659['lXaiX']],{'stdio':[_0x2d4659['xRczR'],_0x1b4555(0x104),_0x2d4659[_0x1b4555(0xe4)]],'shell':process['platform']==='win32'});_0x714687['on'](_0x2d4659[_0x1b4555(0xfb)],_0x4281e3=>{_0x4c9077(_0x4281e3===0x0);}),_0x714687['on'](_0x1b4555(0x112),()=>{_0x2d4659['xQcWS'](_0x4c9077,![]);});});}export async function clean(){const _0xacf4da=_0x562198,_0x4721ff={'EqyOO':_0xacf4da(0x103),'gVABw':function(_0x53922d){return _0x53922d();},'LUVbG':_0xacf4da(0x114),'pNQTD':function(_0x383888){return _0x383888();},'jnNqh':function(_0x1816a6,_0x427a0d,_0x28fcfb){return _0x1816a6(_0x427a0d,_0x28fcfb);},'ZLjuZ':function(_0x5b5005){return _0x5b5005();},'gERpV':function(_0x961786,_0x3b74d3,_0x49a677){return _0x961786(_0x3b74d3,_0x49a677);},'pdLxA':function(_0xb5f289){return _0xb5f289();},'VuQVx':function(_0x106079,_0x34ed9a){return _0x106079(_0x34ed9a);},'rWGfI':function(_0x4aef6b,_0x1a4723,_0x570b7b){return _0x4aef6b(_0x1a4723,_0x570b7b);},'cRcPB':_0xacf4da(0xe6),'RjLxj':'opencode.json','PSXMH':_0xacf4da(0xe5),'jRfqy':function(_0x24e8aa,_0x24e184,_0x361349){return _0x24e8aa(_0x24e184,_0x361349);},'fGBvC':_0xacf4da(0xe0),'BSHxD':function(_0x5c17b6,_0x50e4bd){return _0x5c17b6(_0x50e4bd);},'tWGca':_0xacf4da(0xe2),'GjSHO':'\x0a✅\x20Cleanup\x20complete!\x0a'};console['log'](_0x4721ff[_0xacf4da(0xf0)]);let _0x1aa5ac=![];try{await _0x4721ff[_0xacf4da(0x10c)](deleteAllCredentials),console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0x10e)]),_0x1aa5ac=!![];}catch{}const _0x5d21a1=_0x4721ff['gVABw'](getCacheFile);existsSync(_0x5d21a1)&&(await rm(_0x5d21a1),_0x1aa5ac=!![]);const _0x55f75d=_0x4721ff[_0xacf4da(0x10d)](getRangerDir);existsSync(_0x55f75d)&&(await _0x4721ff['jnNqh'](rm,_0x55f75d,{'recursive':!![]}),console['log'](_0xacf4da(0x107)),_0x1aa5ac=!![]);const _0x244702=_0x4721ff[_0xacf4da(0xfc)](getProjectSkillsDir);for(const _0x248b45 of skillsToRemove){const _0xb31d86=join(_0x244702,_0x248b45);existsSync(_0xb31d86)&&(await _0x4721ff['gERpV'](rm,_0xb31d86,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x248b45),_0x1aa5ac=!![]);}const _0x1d2983=_0x4721ff[_0xacf4da(0xe8)](getUserSkillsDir);for(const _0x5500bb of skillsToRemove){const _0x480a5f=join(_0x1d2983,_0x5500bb);_0x4721ff['VuQVx'](existsSync,_0x480a5f)&&(await rm(_0x480a5f,{'recursive':!![]}),console[_0xacf4da(0x111)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5500bb),_0x1aa5ac=!![]);}const _0x2a423b=getOpencodeSkillsDir(_0xacf4da(0x106));for(const _0x1a0a08 of skillsToRemove){const _0x47e203=_0x4721ff['rWGfI'](join,_0x2a423b,_0x1a0a08);existsSync(_0x47e203)&&(await _0x4721ff['gERpV'](rm,_0x47e203,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1a0a08),_0x1aa5ac=!![]);}const _0x5640c0=getOpencodeSkillsDir(_0x4721ff[_0xacf4da(0xf1)]);for(const _0x1f0f77 of skillsToRemove){const _0x2fdb9e=_0x4721ff[_0xacf4da(0xf4)](join,_0x5640c0,_0x1f0f77);_0x4721ff[_0xacf4da(0x105)](existsSync,_0x2fdb9e)&&(await rm(_0x2fdb9e,{'recursive':!![]}),console[_0xacf4da(0x111)](_0xacf4da(0xdf)+_0x1f0f77),_0x1aa5ac=!![]);}const _0x2f5a48=join(getOpencodeConfigDir('project'),_0x4721ff[_0xacf4da(0xff)]);await removeOpencodePluginConfig(_0x2f5a48)&&(console['log'](_0x4721ff['PSXMH']),_0x1aa5ac=!![]);const _0x104f7d=_0x4721ff[_0xacf4da(0xec)](join,_0x4721ff['VuQVx'](getOpencodeConfigDir,_0x4721ff['cRcPB']),_0x4721ff['RjLxj']);await _0x4721ff[_0xacf4da(0x105)](removeOpencodePluginConfig,_0x104f7d)&&(console[_0xacf4da(0x111)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x1aa5ac=!![]);const _0x31e5d4=await uninstallClaudePlugin();_0x31e5d4&&(console[_0xacf4da(0x111)](_0x4721ff['fGBvC']),_0x1aa5ac=!![]);const _0x543106=await _0x4721ff[_0xacf4da(0xe1)](uninstallClaudePlugin,_0xacf4da(0x106));_0x543106&&(console[_0xacf4da(0x111)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x1aa5ac=!![]);const _0x38556e=await removeMarketplace();_0x38556e&&(console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0xf5)]),_0x1aa5ac=!![]),_0x1aa5ac?console['log'](_0x4721ff['GjSHO']):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- (function(_0x51bae9,_0x486c26){const _0x380e27=_0x93b1,_0x143ce5=_0x51bae9();while(!![]){try{const _0x1af882=parseInt(_0x380e27(0xb2))/0x1*(parseInt(_0x380e27(0x90))/0x2)+parseInt(_0x380e27(0xb7))/0x3*(-parseInt(_0x380e27(0x9e))/0x4)+-parseInt(_0x380e27(0xa2))/0x5*(-parseInt(_0x380e27(0x96))/0x6)+parseInt(_0x380e27(0xa5))/0x7+parseInt(_0x380e27(0xb0))/0x8*(-parseInt(_0x380e27(0x9c))/0x9)+parseInt(_0x380e27(0x8c))/0xa+-parseInt(_0x380e27(0xa6))/0xb;if(_0x1af882===_0x486c26)break;else _0x143ce5['push'](_0x143ce5['shift']());}catch(_0x10e46c){_0x143ce5['push'](_0x143ce5['shift']());}}}(_0x15ae,0x7784c));function _0x15ae(){const _0x2d5b6c=['false','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','UvrJF','2805470MiAsQM','log','slnhh','umXDR','1376558SXrFhv','Key\x20\x22','settings','trim','true','vDBcm','12vDESSE','cloud','startsWith','lwYlx','(not\x20set)','\x22\x20not\x20found','5163381woTWgI','\x20for\x20\x22','44syylGt','\x20=\x20','kind','LPdrs','224535TjXkeR','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','giKfd','5435507xuxDTA','469997oaMUCz','isSafeInteger','endsWith','includes','fJdGO','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Profile\x20\x22','object','No\x20configuration\x20set\x20for\x20\x22','8WILUnI','gWLWa','1VOoHYR','OQjfN','test','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','yIXlZ','198861yIzvKo','alsoExistsElsewhere','udYxa','jcTYj','cwd','stringify','DXzka','Set\x20','lGilD'];_0x15ae=function(){return _0x2d5b6c;};return _0x15ae();}import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x555455,_0x28d824){const _0x5d25dd=_0x93b1,_0x22fd53={'LPdrs':function(_0x59d6e1,_0x46f014){return _0x59d6e1===_0x46f014;},'slnhh':_0x5d25dd(0x89)};if(BOOLEAN_KEYS[_0x5d25dd(0xa9)](_0x555455)){if(_0x22fd53['LPdrs'](_0x28d824,_0x5d25dd(0x94)))return!![];if(_0x22fd53[_0x5d25dd(0xa1)](_0x28d824,_0x22fd53[_0x5d25dd(0x8e)]))return![];throw new Error(_0x5d25dd(0xab)+_0x555455+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x28d824;}function _0x93b1(_0x5cbb2d,_0x555ffd){_0x5cbb2d=_0x5cbb2d-0x87;const _0x15ae09=_0x15ae();let _0x93b12b=_0x15ae09[_0x5cbb2d];return _0x93b12b;}function parseOverrideValue(_0x18b4e0){const _0x1a1ff8=_0x93b1,_0x1a9d29={'ODhvh':function(_0x3af97f,_0x448203){return _0x3af97f===_0x448203;},'ubLHd':_0x1a1ff8(0x89)};if(_0x1a9d29['ODhvh'](_0x18b4e0,_0x1a1ff8(0x94)))return!![];if(_0x18b4e0===_0x1a9d29['ubLHd'])return![];if(_0x18b4e0==='null')return null;if(_0x18b4e0==='undefined')return undefined;if(/^-?\d+$/[_0x1a1ff8(0xb4)](_0x18b4e0)){const _0x494e51=Number(_0x18b4e0);if(Number[_0x1a1ff8(0xa7)](_0x494e51))return _0x494e51;}if(/^-?\d+\.\d+$/['test'](_0x18b4e0)){const _0x319b5d=Number(_0x18b4e0);if(!Number['isNaN'](_0x319b5d))return _0x319b5d;}const _0x169a9c=_0x18b4e0[_0x1a1ff8(0x93)]();if(_0x169a9c['startsWith']('{')&&_0x169a9c[_0x1a1ff8(0xa8)]('}')||_0x169a9c[_0x1a1ff8(0x98)]('[')&&_0x169a9c[_0x1a1ff8(0xa8)](']'))try{return JSON['parse'](_0x169a9c);}catch{}return _0x18b4e0;}async function resolveProfileTarget(_0x2f8976){const _0x8c85cf=_0x93b1,_0x33b3b5={'QDqNG':function(_0x35e5a7,_0x2373f5){return _0x35e5a7(_0x2373f5);},'yqWmY':function(_0x4798dd,_0x1c110e){return _0x4798dd(_0x1c110e);},'SiFMO':function(_0x10eaf3,_0xba8807){return _0x10eaf3(_0xba8807);},'TjcSw':'cloud','DtJyt':'local'},_0x55aa2c=_0x33b3b5['QDqNG'](existsSync,_0x33b3b5['yqWmY'](getEnvDir,_0x2f8976));let _0xe59a7b=![];try{const _0x116fe3=await fetchCloudProfile(_0x2f8976);_0xe59a7b=_0x33b3b5['SiFMO'](Boolean,_0x116fe3);}catch{}if(_0xe59a7b)return{'kind':_0x33b3b5['TjcSw'],'alsoExistsElsewhere':_0x55aa2c};if(_0x55aa2c)return{'kind':_0x33b3b5['DtJyt'],'alsoExistsElsewhere':![]};throw new Error(_0x8c85cf(0xad)+_0x2f8976+_0x8c85cf(0xb5)+_0x2f8976);}function printDualExistsHint(_0x5350d8){const _0x5539cf=_0x93b1;console['log']('\x20\x20Note:\x20\x22'+_0x5350d8+_0x5539cf(0x8a));}function getProjectPath(){const _0x2c774b=_0x93b1;return process[_0x2c774b(0xbb)]();}async function loadEffectiveCloudSettings(_0x5c9bbb){const _0x5c90c3=_0x93b1,_0x410215={'pMSOI':function(_0x3fa9e7,_0x2f21a6,_0x5abbd3){return _0x3fa9e7(_0x2f21a6,_0x5abbd3);},'udYxa':function(_0x10e59b,_0x326d49){return _0x10e59b??_0x326d49;}},_0x32e031=await fetchCloudProfile(_0x5c9bbb),_0x30fe1c=readProfileOverrides(getProjectPath(),_0x5c9bbb);return _0x410215['pMSOI'](mergeCloudProfileSettings,_0x32e031?.[_0x5c90c3(0x92)]??{},_0x410215[_0x5c90c3(0xb9)](_0x30fe1c,undefined));}export async function configSet(_0x3ad62e,_0xb6167,_0x199ab1){const _0x1e60cc=_0x93b1,_0x933004={'DXzka':function(_0x560b19,_0x1a98d7){return _0x560b19(_0x1a98d7);},'uFOdN':function(_0x7b2ec,_0x4e69dc){return _0x7b2ec===_0x4e69dc;},'FICXa':_0x1e60cc(0x97),'SQaPW':function(_0x39653e){return _0x39653e();},'OQjfN':function(_0x4ef0f5,_0x277b11,_0x595ee4){return _0x4ef0f5(_0x277b11,_0x595ee4);},'jcTYj':function(_0x492923){return _0x492923();}},_0x3d6d03=await _0x933004[_0x1e60cc(0xbd)](resolveProfileTarget,_0x3ad62e);if(_0x933004['uFOdN'](_0x3d6d03[_0x1e60cc(0xa0)],_0x933004['FICXa'])){if(_0x3d6d03['alsoExistsElsewhere'])printDualExistsHint(_0x3ad62e);const _0x58de86=_0x933004[_0x1e60cc(0xbd)](parseOverrideValue,_0x199ab1);setProfileOverride(_0x933004['SQaPW'](getProjectPath),_0x3ad62e,_0xb6167,_0x58de86),console['log']('Set\x20'+_0xb6167+_0x1e60cc(0x9f)+JSON[_0x1e60cc(0xbc)](_0x58de86)+'\x20for\x20\x22'+_0x3ad62e+'\x22');return;}const _0x56303f=_0x933004[_0x1e60cc(0xb3)](parseLocalValue,_0xb6167,_0x199ab1);setProfileOverride(_0x933004[_0x1e60cc(0xba)](getProjectPath),_0x3ad62e,_0xb6167,_0x56303f),console[_0x1e60cc(0x8d)](_0x1e60cc(0x87)+_0xb6167+_0x1e60cc(0x9f)+_0x56303f+_0x1e60cc(0x9d)+_0x3ad62e+'\x22');}export async function configGet(_0x35c2da,_0x1484b2){const _0x1674ec=_0x93b1,_0x58a94e={'vDBcm':function(_0xf3ab13,_0x2a0702){return _0xf3ab13===_0x2a0702;},'gWLWa':_0x1674ec(0xae),'lwYlx':function(_0x53e043,_0x5a1af4,_0x306f31){return _0x53e043(_0x5a1af4,_0x306f31);},'umXDR':function(_0x688c54,_0x203cff){return _0x688c54===_0x203cff;}},_0x40b42b=await resolveProfileTarget(_0x35c2da);if(_0x40b42b[_0x1674ec(0xa0)]===_0x1674ec(0x97)){const _0x37168a=await loadEffectiveCloudSettings(_0x35c2da),_0x5dd1db=getNestedValue(_0x37168a,_0x1484b2);if(_0x58a94e[_0x1674ec(0x95)](_0x5dd1db,undefined))console[_0x1674ec(0x8d)](_0x1674ec(0x9a));else _0x58a94e['vDBcm'](typeof _0x5dd1db,_0x58a94e[_0x1674ec(0xb1)])?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0x5dd1db,null,0x2)):console['log'](_0x5dd1db);return;}const _0xf59fc=await loadSettings(_0x35c2da),_0xc3ecbc=_0x58a94e[_0x1674ec(0x99)](getNestedValue,_0xf59fc,_0x1484b2);if(_0x58a94e[_0x1674ec(0x8f)](_0xc3ecbc,undefined))console['log']('(not\x20set)');else typeof _0xc3ecbc===_0x58a94e[_0x1674ec(0xb1)]?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0xc3ecbc,null,0x2)):console['log'](_0xc3ecbc);}export async function configList(_0x2c9efc){const _0xd5a7b7=_0x93b1,_0x3debd1={'UvrJF':function(_0x4ba381,_0xae19c7){return _0x4ba381(_0xae19c7);},'giKfd':function(_0x190e86,_0x71598b){return _0x190e86===_0x71598b;},'JScVs':function(_0x2e5a97,_0x177436){return _0x2e5a97(_0x177436);}},_0xc058c3=await _0x3debd1[_0xd5a7b7(0x8b)](resolveProfileTarget,_0x2c9efc);if(_0x3debd1[_0xd5a7b7(0xa4)](_0xc058c3['kind'],'cloud')){const _0x13a0cf=await loadEffectiveCloudSettings(_0x2c9efc);if(!_0x13a0cf||_0x3debd1['giKfd'](Object['keys'](_0x13a0cf)['length'],0x0)){console[_0xd5a7b7(0x8d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22');return;}console[_0xd5a7b7(0x8d)](JSON[_0xd5a7b7(0xbc)](_0x13a0cf,null,0x2));return;}const _0xa60dfd=_0x3debd1['JScVs'](getSettingsPath,_0x2c9efc);if(!_0x3debd1['UvrJF'](existsSync,_0xa60dfd)){console[_0xd5a7b7(0x8d)](_0xd5a7b7(0xaf)+_0x2c9efc+'\x22');return;}const _0x40d250=await loadSettings(_0x2c9efc),_0x1616e8=_0x3debd1['UvrJF'](formatSettings,_0x40d250);!_0x1616e8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22'):console['log'](_0x1616e8);}export async function configUnset(_0x5d42fa,_0x1605bb){const _0x59b175=_0x93b1,_0x29f39b={'fJdGO':function(_0x12da66,_0x48e19f){return _0x12da66(_0x48e19f);},'yIXlZ':function(_0x2747dd,_0x382e4d,_0x45e1bf,_0x55b6e4){return _0x2747dd(_0x382e4d,_0x45e1bf,_0x55b6e4);},'ggEDy':function(_0x26c829){return _0x26c829();},'AHCNv':function(_0x4693ec){return _0x4693ec();}},_0x30b9f4=await resolveProfileTarget(_0x5d42fa);if(_0x30b9f4['kind']==='cloud'){if(_0x30b9f4[_0x59b175(0xb8)])_0x29f39b[_0x59b175(0xaa)](printDualExistsHint,_0x5d42fa);const _0x35578a=_0x29f39b['yIXlZ'](unsetProfileOverride,_0x29f39b['ggEDy'](getProjectPath),_0x5d42fa,_0x1605bb);_0x35578a?console['log']('Removed\x20'+_0x1605bb+'\x20for\x20\x22'+_0x5d42fa+'\x22'):console['log'](_0x59b175(0x91)+_0x1605bb+_0x59b175(0x9b));return;}const _0x23e4c3=_0x29f39b[_0x59b175(0xb6)](unsetProfileOverride,_0x29f39b['AHCNv'](getProjectPath),_0x5d42fa,_0x1605bb);if(_0x23e4c3){console['log']('Removed\x20'+_0x1605bb);return;}const _0x15697f=await loadSettings(_0x5d42fa),_0x337b62=deleteNestedValue(_0x15697f,_0x1605bb);_0x337b62?console['log']('Key\x20\x22'+_0x1605bb+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x5d42fa+_0x59b175(0xa3)):console[_0x59b175(0x8d)]('Key\x20\x22'+_0x1605bb+_0x59b175(0x9b));}export async function configReset(_0xa32f18){const _0x2f8202=_0x93b1,_0x5b8188={'zBSAY':_0x2f8202(0x97),'lGilD':function(_0x244c8c){return _0x244c8c();}},_0x1fc9e2=await resolveProfileTarget(_0xa32f18);if(_0x1fc9e2['kind']===_0x5b8188['zBSAY']){resetProfileOverrides(_0x5b8188[_0x2f8202(0x88)](getProjectPath),_0xa32f18),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0xa32f18+'\x22');return;}console['log']('\x22'+_0xa32f18+_0x2f8202(0xac)+_0xa32f18+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ (function(_0x51954d,_0x3a18ed){const _0x49c9f2=_0x5450,_0x5e3908=_0x51954d();while(!![]){try{const _0x50fa5b=-parseInt(_0x49c9f2(0x11e))/0x1+-parseInt(_0x49c9f2(0xfd))/0x2*(parseInt(_0x49c9f2(0x10c))/0x3)+parseInt(_0x49c9f2(0x10a))/0x4+-parseInt(_0x49c9f2(0x10e))/0x5*(parseInt(_0x49c9f2(0xfa))/0x6)+parseInt(_0x49c9f2(0x106))/0x7+-parseInt(_0x49c9f2(0x12b))/0x8*(-parseInt(_0x49c9f2(0x107))/0x9)+-parseInt(_0x49c9f2(0x12a))/0xa*(-parseInt(_0x49c9f2(0xfb))/0xb);if(_0x50fa5b===_0x3a18ed)break;else _0x5e3908['push'](_0x5e3908['shift']());}catch(_0x3f0d6c){_0x5e3908['push'](_0x5e3908['shift']());}}}(_0x2658,0x40ebb));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x278bc2,_0x3d7f8f){const _0x560944=_0x5450,_0x3b6839={'EZxxV':'false'};if(BOOLEAN_KEYS['includes'](_0x278bc2)){if(_0x3d7f8f===_0x560944(0x128))return!![];if(_0x3d7f8f===_0x3b6839['EZxxV'])return![];throw new Error(_0x560944(0x119)+_0x278bc2+_0x560944(0x117));}return _0x3d7f8f;}function parseOverrideValue(_0x17642d){const _0x35c2ca=_0x5450,_0x1d8178={'qKspA':function(_0x37f2da,_0x485905){return _0x37f2da===_0x485905;},'voVvA':_0x35c2ca(0x10b),'jsFIr':_0x35c2ca(0x11c),'pdBCM':function(_0x3c14d0,_0x3562e9){return _0x3c14d0(_0x3562e9);}};if(_0x17642d===_0x35c2ca(0x128))return!![];if(_0x1d8178[_0x35c2ca(0x12d)](_0x17642d,_0x1d8178['voVvA']))return![];if(_0x1d8178['qKspA'](_0x17642d,'null'))return null;if(_0x17642d===_0x1d8178[_0x35c2ca(0x132)])return undefined;if(/^-?\d+$/[_0x35c2ca(0x116)](_0x17642d)){const _0x3dd280=_0x1d8178[_0x35c2ca(0x112)](Number,_0x17642d);if(Number['isSafeInteger'](_0x3dd280))return _0x3dd280;}if(/^-?\d+\.\d+$/['test'](_0x17642d)){const _0x23c3ac=Number(_0x17642d);if(!Number['isNaN'](_0x23c3ac))return _0x23c3ac;}const _0x3c5a74=_0x17642d[_0x35c2ca(0x127)]();if(_0x3c5a74[_0x35c2ca(0x113)]('{')&&_0x3c5a74[_0x35c2ca(0x101)]('}')||_0x3c5a74['startsWith']('[')&&_0x3c5a74['endsWith'](']'))try{return JSON['parse'](_0x3c5a74);}catch{}return _0x17642d;}async function resolveProfileTarget(_0x3ba72d){const _0x50a76c=_0x5450,_0x63117={'gBznH':function(_0xe1f252,_0x44dc13){return _0xe1f252(_0x44dc13);},'oYdYJ':'cloud','zoInX':'local'},_0x1ca4a8=existsSync(_0x63117['gBznH'](getEnvDir,_0x3ba72d));let _0x40fc52=![];try{const _0x3edc25=await _0x63117['gBznH'](fetchCloudProfile,_0x3ba72d);_0x40fc52=_0x63117[_0x50a76c(0x122)](Boolean,_0x3edc25);}catch{}if(_0x40fc52)return{'kind':_0x63117[_0x50a76c(0xfc)],'alsoExistsElsewhere':_0x1ca4a8};if(_0x1ca4a8)return{'kind':_0x63117[_0x50a76c(0xf9)],'alsoExistsElsewhere':![]};throw new Error(_0x50a76c(0xff)+_0x3ba72d+_0x50a76c(0x11b)+_0x3ba72d);}function printDualExistsHint(_0x107836){const _0x282a9e=_0x5450;console[_0x282a9e(0x125)](_0x282a9e(0x103)+_0x107836+_0x282a9e(0x10d));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3e1ec2){const _0x3b9587=_0x5450,_0x5d0418={'HaYwr':function(_0x50f7d0,_0x28f676){return _0x50f7d0(_0x28f676);},'TKgZy':function(_0x1f2156,_0x3260db,_0x89fe4c){return _0x1f2156(_0x3260db,_0x89fe4c);},'fsWhK':function(_0x2fb4b3,_0x6ecad0){return _0x2fb4b3??_0x6ecad0;}},_0x28ce3f=await _0x5d0418[_0x3b9587(0xf8)](fetchCloudProfile,_0x3e1ec2),_0x1783c8=_0x5d0418['TKgZy'](readProfileOverrides,getProjectPath(),_0x3e1ec2);return mergeCloudProfileSettings(_0x28ce3f?.['settings']??{},_0x5d0418['fsWhK'](_0x1783c8,undefined));}export async function configSet(_0xf22639,_0x160d34,_0x5d170b){const _0x4e93c6=_0x5450,_0x53755d={'LWoec':function(_0x1e2c2e,_0x54813d){return _0x1e2c2e===_0x54813d;},'qWwZS':'cloud','HiVUF':function(_0x4ce920,_0x3f4049){return _0x4ce920(_0x3f4049);},'wbqtV':function(_0x1d73e5){return _0x1d73e5();},'hYXce':function(_0x63a0c5,_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9){return _0x63a0c5(_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9);},'fyLVF':function(_0x57e725){return _0x57e725();}},_0x22a905=await resolveProfileTarget(_0xf22639);if(_0x53755d[_0x4e93c6(0x129)](_0x22a905[_0x4e93c6(0x121)],_0x53755d[_0x4e93c6(0x105)])){if(_0x22a905['alsoExistsElsewhere'])_0x53755d[_0x4e93c6(0x133)](printDualExistsHint,_0xf22639);const _0x4792aa=parseOverrideValue(_0x5d170b);setProfileOverride(_0x53755d[_0x4e93c6(0x126)](getProjectPath),_0xf22639,_0x160d34,_0x4792aa),console['log']('Set\x20'+_0x160d34+_0x4e93c6(0x118)+JSON[_0x4e93c6(0x100)](_0x4792aa)+_0x4e93c6(0x123)+_0xf22639+'\x22');return;}const _0x712161=parseLocalValue(_0x160d34,_0x5d170b);_0x53755d[_0x4e93c6(0x11f)](setProfileOverride,_0x53755d[_0x4e93c6(0x111)](getProjectPath),_0xf22639,_0x160d34,_0x712161),console['log'](_0x4e93c6(0x108)+_0x160d34+_0x4e93c6(0x118)+_0x712161+_0x4e93c6(0x123)+_0xf22639+'\x22');}export async function configGet(_0x4edfd0,_0x52500c){const _0x1bfce7=_0x5450,_0x506211={'pEkPk':function(_0x4f04cc,_0x5c38c7){return _0x4f04cc===_0x5c38c7;},'BbQOI':function(_0x5abaf4,_0x2da7a0){return _0x5abaf4(_0x2da7a0);}},_0x1fe0d8=await resolveProfileTarget(_0x4edfd0);if(_0x506211[_0x1bfce7(0x115)](_0x1fe0d8['kind'],_0x1bfce7(0x104))){const _0x24b97f=await loadEffectiveCloudSettings(_0x4edfd0),_0x55a65c=getNestedValue(_0x24b97f,_0x52500c);if(_0x55a65c===undefined)console['log'](_0x1bfce7(0x130));else _0x506211[_0x1bfce7(0x115)](typeof _0x55a65c,'object')?console[_0x1bfce7(0x125)](JSON['stringify'](_0x55a65c,null,0x2)):console[_0x1bfce7(0x125)](_0x55a65c);return;}const _0x34607c=await _0x506211[_0x1bfce7(0x11a)](loadSettings,_0x4edfd0),_0x1d7ea5=getNestedValue(_0x34607c,_0x52500c);if(_0x1d7ea5===undefined)console['log'](_0x1bfce7(0x130));else _0x506211['pEkPk'](typeof _0x1d7ea5,_0x1bfce7(0x110))?console[_0x1bfce7(0x125)](JSON[_0x1bfce7(0x100)](_0x1d7ea5,null,0x2)):console['log'](_0x1d7ea5);}function _0x5450(_0x372a9c,_0x5b9d29){_0x372a9c=_0x372a9c-0xf8;const _0x2658ea=_0x2658();let _0x54502c=_0x2658ea[_0x372a9c];return _0x54502c;}export async function configList(_0x398b3c){const _0x2461ca=_0x5450,_0x29b1b7={'dfxbr':function(_0x35ce37,_0x37d74e){return _0x35ce37(_0x37d74e);}},_0x1e3471=await _0x29b1b7[_0x2461ca(0x10f)](resolveProfileTarget,_0x398b3c);if(_0x1e3471[_0x2461ca(0x121)]==='cloud'){const _0x4ad38e=await _0x29b1b7['dfxbr'](loadEffectiveCloudSettings,_0x398b3c);if(!_0x4ad38e||Object['keys'](_0x4ad38e)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x398b3c+'\x22');return;}console[_0x2461ca(0x125)](JSON[_0x2461ca(0x100)](_0x4ad38e,null,0x2));return;}const _0x1301cd=getSettingsPath(_0x398b3c);if(!existsSync(_0x1301cd)){console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22');return;}const _0x4bcfd8=await loadSettings(_0x398b3c),_0x59187b=formatSettings(_0x4bcfd8);!_0x59187b?console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22'):console['log'](_0x59187b);}function _0x2658(){const _0x419c95=['poggq','qKspA','ZihRi','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','(not\x20set)','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','jsFIr','HiVUF','HaYwr','zoInX','6agIKWr','60269RjqjLj','oYdYJ','509254daznxk','Removed\x20','Profile\x20\x22','stringify','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x20\x20Note:\x20\x22','cloud','qWwZS','2747066NtzLOZ','18AEYDra','Set\x20','alsoExistsElsewhere','1113076bGOGIJ','false','3COXmqa','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','588515dyPTON','dfxbr','object','fyLVF','pdBCM','startsWith','eMLEY','pEkPk','test',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','Invalid\x20value\x20for\x20','BbQOI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','undefined','No\x20configuration\x20set\x20for\x20\x22','89601sXykRI','hYXce','CorHW','kind','gBznH','\x20for\x20\x22','Key\x20\x22','log','wbqtV','trim','true','LWoec','30zkiCFM','162808kHIZeT'];_0x2658=function(){return _0x419c95;};return _0x2658();}export async function configUnset(_0x2b1bcb,_0xbb406c){const _0x49e38a=_0x5450,_0x4b889d={'poggq':function(_0x785e53,_0x190034){return _0x785e53===_0x190034;},'cnYZh':_0x49e38a(0x104),'CorHW':function(_0x3754e3,_0x41e803){return _0x3754e3(_0x41e803);},'ZihRi':function(_0x7f8d4c,_0x2eb407,_0x2b124b,_0x271c06){return _0x7f8d4c(_0x2eb407,_0x2b124b,_0x271c06);},'eMLEY':function(_0x3457d6,_0x585673,_0x39a23e){return _0x3457d6(_0x585673,_0x39a23e);}},_0x21e4fd=await resolveProfileTarget(_0x2b1bcb);if(_0x4b889d[_0x49e38a(0x12c)](_0x21e4fd['kind'],_0x4b889d['cnYZh'])){if(_0x21e4fd[_0x49e38a(0x109)])_0x4b889d[_0x49e38a(0x120)](printDualExistsHint,_0x2b1bcb);const _0x4ab226=_0x4b889d[_0x49e38a(0x12e)](unsetProfileOverride,getProjectPath(),_0x2b1bcb,_0xbb406c);_0x4ab226?console[_0x49e38a(0x125)]('Removed\x20'+_0xbb406c+'\x20for\x20\x22'+_0x2b1bcb+'\x22'):console[_0x49e38a(0x125)](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');return;}const _0x5dace2=unsetProfileOverride(getProjectPath(),_0x2b1bcb,_0xbb406c);if(_0x5dace2){console['log'](_0x49e38a(0xfe)+_0xbb406c);return;}const _0x5279c2=await loadSettings(_0x2b1bcb),_0xfd5b18=_0x4b889d[_0x49e38a(0x114)](deleteNestedValue,_0x5279c2,_0xbb406c);_0xfd5b18?console['log']('Key\x20\x22'+_0xbb406c+_0x49e38a(0x131)+_0x2b1bcb+_0x49e38a(0x102)):console['log'](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');}export async function configReset(_0x453178){const _0x1f3337=_0x5450,_0x518b22=await resolveProfileTarget(_0x453178);if(_0x518b22[_0x1f3337(0x121)]==='cloud'){resetProfileOverrides(getProjectPath(),_0x453178),console[_0x1f3337(0x125)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x453178+'\x22');return;}console[_0x1f3337(0x125)]('\x22'+_0x453178+_0x1f3337(0x12f)+_0x453178+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- (function(_0x107546,_0x220a55){const _0x3dfcc1=_0x58f5,_0x1c3da9=_0x107546();while(!![]){try{const _0x1e8f8f=-parseInt(_0x3dfcc1(0x1b8))/0x1*(-parseInt(_0x3dfcc1(0x1b7))/0x2)+-parseInt(_0x3dfcc1(0x1b6))/0x3+-parseInt(_0x3dfcc1(0x1bf))/0x4*(parseInt(_0x3dfcc1(0x1b0))/0x5)+-parseInt(_0x3dfcc1(0x1ba))/0x6*(parseInt(_0x3dfcc1(0x1b1))/0x7)+parseInt(_0x3dfcc1(0x1b3))/0x8+-parseInt(_0x3dfcc1(0x1c1))/0x9*(-parseInt(_0x3dfcc1(0x1b9))/0xa)+parseInt(_0x3dfcc1(0x1b4))/0xb*(parseInt(_0x3dfcc1(0x1c5))/0xc);if(_0x1e8f8f===_0x220a55)break;else _0x1c3da9['push'](_0x1c3da9['shift']());}catch(_0x1339e5){_0x1c3da9['push'](_0x1c3da9['shift']());}}}(_0x373c,0x65bb1));function _0x58f5(_0x56eb59,_0x41f8f7){_0x56eb59=_0x56eb59-0x1af;const _0x373c59=_0x373c();let _0x58f579=_0x373c59[_0x56eb59];return _0x58f579;}function _0x373c(){const _0x8c5677=['✓\x20Deleted\x20cloud\x20profile\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.','input','prompt','13996rvhccO','\x22\x20to\x20confirm\x20deletion:','855VdgmMk','bxIIC','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','12iStMhr','cwd','1090OKvGHV','3604202JsxfrZ','ogrxQ','1045600WJFlSO','14301936vEUcdZ','confirmation','1067424qMTrFD','48gBtOEi','4306gGYQKz','54310Vdzaqi','6EhLFRF'];_0x373c=function(){return _0x8c5677;};return _0x373c();}import _0x300061 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x53e380,_0xb6af93={}){const _0x4d1e64=_0x58f5,_0x3b211f={'bxIIC':_0x4d1e64(0x1bd),'ogrxQ':function(_0xb8b517,_0x31d625,_0x1f1547){return _0xb8b517(_0x31d625,_0x1f1547);}},_0x47e189=await fetchCloudProfile(_0x53e380);if(!_0x47e189)throw new Error('Cloud\x20profile\x20\x22'+_0x53e380+'\x22\x20not\x20found.');if(!_0xb6af93['yes']&&!isInteractive())throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log'](_0x4d1e64(0x1c4)+_0x53e380+_0x4d1e64(0x1bc));if(!_0xb6af93['yes']){const {confirmation:_0x3d1c5d}=await _0x300061[_0x4d1e64(0x1be)]([{'type':_0x3b211f[_0x4d1e64(0x1c2)],'name':_0x4d1e64(0x1b5),'message':'Type\x20\x22'+_0x53e380+_0x4d1e64(0x1c0)}]);if(_0x3d1c5d!==_0x53e380)throw new Error(_0x4d1e64(0x1c3));}await deleteCloudProfile(_0x53e380),resetProfileOverrides(process[_0x4d1e64(0x1af)](),_0x53e380),_0x3b211f[_0x4d1e64(0x1b2)](clearLastProfile,process[_0x4d1e64(0x1af)](),_0x53e380),console['log'](_0x4d1e64(0x1bb)+_0x53e380+'\x22.');}
1
+ function _0x2451(){const _0x429ba2=['7Tgvfwc','\x22\x20for\x20everyone\x20in\x20your\x20organization.','48414ziruNi','4737978przuQJ','3071070eBsBVX','\x22\x20not\x20found.','33RiYNYd','confirmation','235769hcgjqU','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','24iOJZev','aIhCe','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','input','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','758585cTjRIv','Cloud\x20profile\x20\x22','80MAvztU','1658304xaCCcZ','4036144YCbSFq','cwd'];_0x2451=function(){return _0x429ba2;};return _0x2451();}(function(_0x5154ab,_0x3dc7eb){const _0x10e629=_0x40a1,_0x2e4ccc=_0x5154ab();while(!![]){try{const _0x34883a=-parseInt(_0x10e629(0x10f))/0x1+parseInt(_0x10e629(0x11b))/0x2+-parseInt(_0x10e629(0x120))/0x3*(parseInt(_0x10e629(0x11a))/0x4)+-parseInt(_0x10e629(0x118))/0x5*(parseInt(_0x10e629(0x111))/0x6)+-parseInt(_0x10e629(0x11e))/0x7*(parseInt(_0x10e629(0x11c))/0x8)+parseInt(_0x10e629(0x121))/0x9+parseInt(_0x10e629(0x10b))/0xa*(parseInt(_0x10e629(0x10d))/0xb);if(_0x34883a===_0x3dc7eb)break;else _0x2e4ccc['push'](_0x2e4ccc['shift']());}catch(_0xe041ae){_0x2e4ccc['push'](_0x2e4ccc['shift']());}}}(_0x2451,0x94318));import _0x2919b8 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x40a1(_0x3ba408,_0x3066c9){_0x3ba408=_0x3ba408-0x10b;const _0x245116=_0x2451();let _0x40a1ed=_0x245116[_0x3ba408];return _0x40a1ed;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x38f2c4,_0x2687ab={}){const _0x3e0b93=_0x40a1,_0x302584={'fVSzt':function(_0x3fbb1b){return _0x3fbb1b();},'RVzYN':_0x3e0b93(0x115),'aIhCe':_0x3e0b93(0x10e),'JHrRA':function(_0x4dcd34,_0x197882,_0x489f2c){return _0x4dcd34(_0x197882,_0x489f2c);}},_0x393452=await fetchCloudProfile(_0x38f2c4);if(!_0x393452)throw new Error(_0x3e0b93(0x119)+_0x38f2c4+_0x3e0b93(0x10c));if(!_0x2687ab['yes']&&!_0x302584['fVSzt'](isInteractive))throw new Error(_0x3e0b93(0x110));console['log'](_0x3e0b93(0x114)+_0x38f2c4+_0x3e0b93(0x11f));if(!_0x2687ab['yes']){const {confirmation:_0x1ff472}=await _0x2919b8['prompt']([{'type':_0x302584['RVzYN'],'name':_0x302584[_0x3e0b93(0x112)],'message':_0x3e0b93(0x116)+_0x38f2c4+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x1ff472!==_0x38f2c4)throw new Error(_0x3e0b93(0x113));}await deleteCloudProfile(_0x38f2c4),_0x302584['JHrRA'](resetProfileOverrides,process[_0x3e0b93(0x11d)](),_0x38f2c4),clearLastProfile(process['cwd'](),_0x38f2c4),console['log'](_0x3e0b93(0x117)+_0x38f2c4+'\x22.');}
@@ -1 +1 @@
1
- function _0x2ddc(_0x5368e1,_0x2cb108){_0x5368e1=_0x5368e1-0x7a;const _0x1ff73c=_0x1ff7();let _0x2ddc54=_0x1ff73c[_0x5368e1];return _0x2ddc54;}(function(_0x5c9586,_0x5120ac){const _0x251dbf=_0x2ddc,_0x58f4f3=_0x5c9586();while(!![]){try{const _0x128fb8=-parseInt(_0x251dbf(0x8c))/0x1*(parseInt(_0x251dbf(0x8d))/0x2)+parseInt(_0x251dbf(0xa1))/0x3*(-parseInt(_0x251dbf(0x89))/0x4)+-parseInt(_0x251dbf(0x8b))/0x5+-parseInt(_0x251dbf(0x9c))/0x6+parseInt(_0x251dbf(0x7b))/0x7+-parseInt(_0x251dbf(0x82))/0x8*(-parseInt(_0x251dbf(0x98))/0x9)+-parseInt(_0x251dbf(0x93))/0xa*(-parseInt(_0x251dbf(0x9f))/0xb);if(_0x128fb8===_0x5120ac)break;else _0x58f4f3['push'](_0x58f4f3['shift']());}catch(_0xa81dd1){_0x58f4f3['push'](_0x58f4f3['shift']());}}}(_0x1ff7,0xb4364));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';function _0x1ff7(){const _0x34f9d7=['profiles','60RdCTKY','baseUrl','4729580lMPFqY','934608gAvxmD','2BwCiec','isDirectory','sort','\x20\x20\x20\x20','bHFde','log','34939310TFcUZB','HDTkF','environmentDetails','\x0a*\x20=\x20active\x20profile','startsWith','17631sJTCyP','includes','Klkuf','\x0a\x20\x20','3347166IHMTNq','keys','IKoJm','11apjGou','hhHhd','231393kxGcck','\x0aCloud\x20Profiles\x20(by\x20environment):','myxlN','jNdWU','length','push','name','\x0aNo\x20profiles\x20found.','szxhk','1447670TTVrEC','NBDDY','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','kitKT','nbukp','environmentKey','2584XbDjtT','jGZlB','lPFeM','no\x20session','\x20\x20\x20\x20\x20\x20URL:\x20','cached\x20(updated\x20'];_0x1ff7=function(){return _0x34f9d7;};return _0x1ff7();}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','reports','local','ci'];export function shouldGroupByEnvironment(_0x485b6f){const _0x7b88f7=_0x2ddc;return _0x485b6f['some'](_0x527332=>_0x527332[_0x7b88f7(0x81)]);}export function groupCloudProfilesByEnvironment(_0x5bac20){const _0x41931b=_0x2ddc,_0x27cff8=new Map();for(const _0x2de41a of _0x5bac20){const _0x100d32=_0x2de41a[_0x41931b(0x81)]??null,_0x5afa19=_0x27cff8['get'](_0x100d32);if(_0x5afa19)_0x5afa19[_0x41931b(0xa6)](_0x2de41a);else _0x27cff8['set'](_0x100d32,[_0x2de41a]);}const _0x2f14b4=[..._0x27cff8[_0x41931b(0x9d)]()]['sort']((_0x358513,_0x1be5d7)=>{if(_0x358513===null)return 0x1;if(_0x1be5d7===null)return-0x1;return _0x358513['localeCompare'](_0x1be5d7);});return _0x2f14b4['map'](_0x258b66=>({'environmentKey':_0x258b66,'profiles':_0x27cff8['get'](_0x258b66)['sort']((_0x33351e,_0x25a7b4)=>_0x33351e[_0x41931b(0xa7)]['localeCompare'](_0x25a7b4['name']))}));}export async function getEnvNames(){const _0x53c74e=_0x2ddc,_0x1ae0a7={'jNdWU':function(_0x2f02cd,_0x32d318){return _0x2f02cd(_0x32d318);},'xFKoG':function(_0x5450a9){return _0x5450a9();},'oeNTZ':function(_0x3ded54,_0x188d0c,_0x94e058){return _0x3ded54(_0x188d0c,_0x94e058);},'kitKT':'local','szxhk':function(_0x5afba2,_0x3f9113){return _0x5afba2(_0x3f9113);},'azicd':function(_0x390b4a,_0x32c0ae,_0x214089){return _0x390b4a(_0x32c0ae,_0x214089);},'hhHhd':function(_0x2321ed,_0x4c1871){return _0x2321ed(_0x4c1871);},'NBDDY':'.txt','cJfLV':function(_0x27a40f,_0x39414e){return _0x27a40f(_0x39414e);},'jGZlB':'settings.json','myxlN':'legacy'},_0x5e149b=getRangerDir();if(!_0x1ae0a7[_0x53c74e(0xa4)](existsSync,_0x5e149b))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x44237f=await _0x1ae0a7['xFKoG'](readActiveProfileName),_0x8fa66c=[],_0x2c26ab={},_0x58eb87=_0x1ae0a7['oeNTZ'](join,_0x5e149b,_0x1ae0a7[_0x53c74e(0x7f)]);if(_0x1ae0a7[_0x53c74e(0x7a)](existsSync,_0x58eb87)){const _0x4360f6=await readdir(_0x58eb87);for(const _0x1db65a of _0x4360f6){const _0x247a9d=join(_0x58eb87,_0x1db65a),_0x285ab7=await _0x1ae0a7[_0x53c74e(0xa4)](stat,_0x247a9d);_0x285ab7['isDirectory']()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x1db65a),_0x2c26ab[_0x1db65a]=_0x1ae0a7['kitKT']);}}const _0x115034=_0x1ae0a7['azicd'](join,_0x5e149b,'ci');if(existsSync(_0x115034)){const _0x4dba0b=await _0x1ae0a7[_0x53c74e(0xa0)](readdir,_0x115034);for(const _0x4b6460 of _0x4dba0b){const _0xb53b9f=join(_0x115034,_0x4b6460),_0x2feab6=await stat(_0xb53b9f);_0x2feab6[_0x53c74e(0x8e)]()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x4b6460),_0x2c26ab[_0x4b6460]='ci');}}const _0x1f9f71=await readdir(_0x5e149b);for(const _0x2bdbd7 of _0x1f9f71){if(NON_ENV_DIRS[_0x53c74e(0x99)](_0x2bdbd7))continue;if(_0x2bdbd7[_0x53c74e(0x97)]('.'))continue;if(_0x2bdbd7['endsWith'](_0x1ae0a7[_0x53c74e(0x7c)]))continue;const _0x5dd0de=join(_0x5e149b,_0x2bdbd7),_0xb2979b=await stat(_0x5dd0de);_0xb2979b[_0x53c74e(0x8e)]()&&_0x1ae0a7['cJfLV'](existsSync,join(_0x5dd0de,_0x1ae0a7[_0x53c74e(0x83)]))&&(!_0x8fa66c[_0x53c74e(0x99)](_0x2bdbd7)&&(_0x8fa66c[_0x53c74e(0xa6)](_0x2bdbd7),_0x2c26ab[_0x2bdbd7]=_0x1ae0a7[_0x53c74e(0xa3)]));}return{'envNames':_0x8fa66c,'activeEnv':_0x44237f,'envTypes':_0x2c26ab};}export async function envList(){const _0xbadbb2=_0x2ddc,_0x11c395={'yNtAj':function(_0x14c150,_0x455a45){return _0x14c150===_0x455a45;},'hYYVi':_0xbadbb2(0x85),'ipzFd':function(_0x197f5d,_0x4b0765){return _0x197f5d instanceof _0x4b0765;},'lPFeM':function(_0x31434c,_0x364e06){return _0x31434c(_0x364e06);},'dZnlJ':function(_0x1009d0,_0x1be052){return _0x1009d0===_0x1be052;},'CDYsw':_0xbadbb2(0xa8),'lrIwx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','iUStG':'\x0aLocal\x20Profiles\x20(legacy):','IKoJm':'local','bHFde':function(_0x25c347,_0x32bcba){return _0x25c347>_0x32bcba;},'HDTkF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','nbukp':function(_0x54a045,_0x32ee11,_0x53815a){return _0x54a045(_0x32ee11,_0x53815a);},'RFhpE':'\x0aCloud\x20Profiles:','Klkuf':function(_0x4323ff,_0x3866a9,_0x54002f){return _0x4323ff(_0x3866a9,_0x54002f);}},{envNames:_0x4e93bb,activeEnv:_0x5151f5,envTypes:_0x357f72}=await getEnvNames();let _0x6be061=[];const _0x5161ce=await getToken();if(_0x5161ce)try{_0x6be061=await listCloudProfiles();}catch(_0x4bdf8e){console['error'](_0xbadbb2(0x7d)+(_0x11c395['ipzFd'](_0x4bdf8e,Error)?_0x4bdf8e['message']:_0x11c395[_0xbadbb2(0x84)](String,_0x4bdf8e)));}if(_0x11c395['yNtAj'](_0x4e93bb['length'],0x0)&&_0x11c395['dZnlJ'](_0x6be061[_0xbadbb2(0xa5)],0x0)){console['log'](_0x11c395['CDYsw']),console['log'](_0x11c395['lrIwx']);return;}const _0x38c53e=new Set(_0x6be061['map'](_0x3cc644=>_0x3cc644['name']));if(_0x4e93bb[_0xbadbb2(0xa5)]>0x0){console[_0xbadbb2(0x92)](_0x11c395['iUStG']);for(const _0x51bf93 of _0x4e93bb[_0xbadbb2(0x8f)]()){const _0x3b25e3=_0x11c395['dZnlJ'](_0x51bf93,_0x5151f5)&&!_0x38c53e['has'](_0x51bf93),_0x342602=_0x357f72[_0x51bf93]||_0x11c395[_0xbadbb2(0x9e)],_0x1a2d26=await loadSettings(_0x51bf93),_0x59efae=_0x342602==='legacy'?'':'\x20['+_0x342602+']';console[_0xbadbb2(0x92)]('\x20\x20'+(_0x3b25e3?'*\x20':'\x20\x20')+_0x51bf93+_0x59efae),_0x1a2d26[_0xbadbb2(0x8a)]&&console['log'](_0xbadbb2(0x86)+_0x1a2d26[_0xbadbb2(0x8a)]),_0x1a2d26['environmentDetails']&&console[_0xbadbb2(0x92)](_0xbadbb2(0x7e)+_0x1a2d26[_0xbadbb2(0x95)]);}}const _0x5bb50f=(_0x4ad674,_0x1eb1cd)=>{const _0x4f4381=_0xbadbb2,_0x2c1e44=_0x11c395['yNtAj'](_0x4ad674['name'],_0x5151f5),_0x32ab35=_0x4ad674['sessionUpdatedAt']?_0x4f4381(0x87)+_0x4ad674['sessionUpdatedAt']+')':_0x11c395['hYYVi'];console['log'](''+_0x1eb1cd+(_0x2c1e44?'*\x20':'\x20\x20')+_0x4ad674[_0x4f4381(0xa7)]),console['log'](_0x1eb1cd+'\x20\x20\x20\x20Session:\x20'+_0x32ab35);};if(_0x11c395[_0xbadbb2(0x91)](_0x6be061['length'],0x0)){if(shouldGroupByEnvironment(_0x6be061)){console['log'](_0xbadbb2(0xa2));for(const _0xd9286a of groupCloudProfilesByEnvironment(_0x6be061)){const _0x36abb6=_0xd9286a['environmentKey']??_0x11c395[_0xbadbb2(0x94)];console[_0xbadbb2(0x92)](_0xbadbb2(0x9b)+_0x36abb6);for(const _0x46bdd8 of _0xd9286a[_0xbadbb2(0x88)]){_0x11c395[_0xbadbb2(0x80)](_0x5bb50f,_0x46bdd8,_0xbadbb2(0x90));}}}else{console[_0xbadbb2(0x92)](_0x11c395['RFhpE']);for(const _0xec0b88 of[..._0x6be061][_0xbadbb2(0x8f)]((_0x49615f,_0x2f3bb1)=>_0x49615f['name']['localeCompare'](_0x2f3bb1[_0xbadbb2(0xa7)]))){_0x11c395[_0xbadbb2(0x9a)](_0x5bb50f,_0xec0b88,'\x20\x20');}}}_0x5151f5&&console[_0xbadbb2(0x92)](_0xbadbb2(0x96));}
1
+ const _0x30bb1f=_0x2d17;(function(_0x26bf2b,_0x3e324e){const _0x27d66c=_0x2d17,_0x199b0a=_0x26bf2b();while(!![]){try{const _0x3bbf22=-parseInt(_0x27d66c(0x126))/0x1*(-parseInt(_0x27d66c(0x132))/0x2)+parseInt(_0x27d66c(0x134))/0x3*(-parseInt(_0x27d66c(0x123))/0x4)+-parseInt(_0x27d66c(0x144))/0x5+parseInt(_0x27d66c(0x124))/0x6*(parseInt(_0x27d66c(0x11f))/0x7)+parseInt(_0x27d66c(0x11d))/0x8+parseInt(_0x27d66c(0x147))/0x9+parseInt(_0x27d66c(0x13a))/0xa*(parseInt(_0x27d66c(0x141))/0xb);if(_0x3bbf22===_0x3e324e)break;else _0x199b0a['push'](_0x199b0a['shift']());}catch(_0x4eba3c){_0x199b0a['push'](_0x199b0a['shift']());}}}(_0x462e,0xee21b));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x2d17(_0x54e261,_0x17ea76){_0x54e261=_0x54e261-0x11d;const _0x462e76=_0x462e();let _0x2d1742=_0x462e76[_0x54e261];return _0x2d1742;}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',_0x30bb1f(0x12e),'reports',_0x30bb1f(0x13b),'ci'];export function shouldGroupByEnvironment(_0x39808b){return _0x39808b['some'](_0x30a7df=>_0x30a7df['environmentKey']);}function _0x462e(){const _0x417b14=['\x0aLocal\x20Profiles\x20(legacy):','1994625AblFNr','pymSL','Run:\x20ranger\x20profile\x20add\x20<profile-name>','14978968RtgRkf','qgGFD','2507162ebHUVF','set','name','settings.json','24KUkdIr','6cbOJet','sessionUpdatedAt','2sBkOhS','\x0aCloud\x20Profiles:','\x0aCloud\x20Profiles\x20(by\x20environment):','qmmGG','TVKZb','no\x20session','log','BiyCN','bug-bashes','tnlgB','localeCompare','\x20\x20\x20\x20','1022396EEgoGe','message','919497oRehFA','RSJUz','includes','\x20\x20\x20\x20Session:\x20','environmentKey','xtNeR','10ylhbud','local','profiles','sort','isDirectory','length','JFZJu','5015516ECVXbE','get','map','5580665hcytUL','legacy'];_0x462e=function(){return _0x417b14;};return _0x462e();}export function groupCloudProfilesByEnvironment(_0x39f0a6){const _0x498419=_0x30bb1f,_0x109c93={'WsLcd':function(_0x4cf6c1,_0x1900e2){return _0x4cf6c1===_0x1900e2;}},_0x605950=new Map();for(const _0x18f7c6 of _0x39f0a6){const _0x41ccfa=_0x18f7c6[_0x498419(0x138)]??null,_0x3daf38=_0x605950['get'](_0x41ccfa);if(_0x3daf38)_0x3daf38['push'](_0x18f7c6);else _0x605950[_0x498419(0x120)](_0x41ccfa,[_0x18f7c6]);}const _0x5d5e81=[..._0x605950['keys']()][_0x498419(0x13d)]((_0x1b6b55,_0x3a4224)=>{if(_0x109c93['WsLcd'](_0x1b6b55,null))return 0x1;if(_0x109c93['WsLcd'](_0x3a4224,null))return-0x1;return _0x1b6b55['localeCompare'](_0x3a4224);});return _0x5d5e81[_0x498419(0x143)](_0x334306=>({'environmentKey':_0x334306,'profiles':_0x605950[_0x498419(0x142)](_0x334306)['sort']((_0x59aefb,_0x4fb2ec)=>_0x59aefb['name'][_0x498419(0x130)](_0x4fb2ec['name']))}));}export async function getEnvNames(){const _0x2e9989=_0x30bb1f,_0x4f5901={'aKGBT':function(_0x45bec4){return _0x45bec4();},'cfbXl':function(_0x16cedd,_0x3326c8){return _0x16cedd(_0x3326c8);},'JVcPS':_0x2e9989(0x13b),'qmmGG':function(_0x4ab9ee,_0x37f9cd){return _0x4ab9ee(_0x37f9cd);},'BiyCN':function(_0x3188d6,_0x5a34f8){return _0x3188d6(_0x5a34f8);},'jojtO':'.txt','JFZJu':function(_0x1dd44d,_0x467f3b,_0x217592){return _0x1dd44d(_0x467f3b,_0x217592);},'xtNeR':function(_0x5cfac5,_0x4a74b6){return _0x5cfac5(_0x4a74b6);},'riHWR':_0x2e9989(0x122),'EdDSA':_0x2e9989(0x145)},_0x11ab7c=getRangerDir();if(!existsSync(_0x11ab7c))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x176617=await _0x4f5901['aKGBT'](readActiveProfileName),_0x1b23d0=[],_0x13eb8c={},_0xa3c300=join(_0x11ab7c,_0x2e9989(0x13b));if(_0x4f5901['cfbXl'](existsSync,_0xa3c300)){const _0x4fef47=await readdir(_0xa3c300);for(const _0x270d16 of _0x4fef47){const _0x5202f8=join(_0xa3c300,_0x270d16),_0x39f142=await stat(_0x5202f8);_0x39f142['isDirectory']()&&(_0x1b23d0['push'](_0x270d16),_0x13eb8c[_0x270d16]=_0x4f5901['JVcPS']);}}const _0xca044a=join(_0x11ab7c,'ci');if(_0x4f5901['qmmGG'](existsSync,_0xca044a)){const _0x825a35=await _0x4f5901[_0x2e9989(0x129)](readdir,_0xca044a);for(const _0x1918a0 of _0x825a35){const _0x4ae8f7=join(_0xca044a,_0x1918a0),_0x25890f=await stat(_0x4ae8f7);_0x25890f['isDirectory']()&&(_0x1b23d0['push'](_0x1918a0),_0x13eb8c[_0x1918a0]='ci');}}const _0x35ca6e=await _0x4f5901[_0x2e9989(0x12d)](readdir,_0x11ab7c);for(const _0x1f3a9e of _0x35ca6e){if(NON_ENV_DIRS[_0x2e9989(0x136)](_0x1f3a9e))continue;if(_0x1f3a9e['startsWith']('.'))continue;if(_0x1f3a9e['endsWith'](_0x4f5901['jojtO']))continue;const _0x535c64=_0x4f5901[_0x2e9989(0x140)](join,_0x11ab7c,_0x1f3a9e),_0x4e8352=await _0x4f5901[_0x2e9989(0x139)](stat,_0x535c64);_0x4e8352[_0x2e9989(0x13e)]()&&existsSync(join(_0x535c64,_0x4f5901['riHWR']))&&(!_0x1b23d0['includes'](_0x1f3a9e)&&(_0x1b23d0['push'](_0x1f3a9e),_0x13eb8c[_0x1f3a9e]=_0x4f5901['EdDSA']));}return{'envNames':_0x1b23d0,'activeEnv':_0x176617,'envTypes':_0x13eb8c};}export async function envList(){const _0x33fd44=_0x30bb1f,_0x10dc64={'qgGFD':function(_0x22aa34,_0x2404fc){return _0x22aa34===_0x2404fc;},'pymSL':function(_0x4d43fc){return _0x4d43fc();},'lOvQB':function(_0x2c097e,_0x2372bc){return _0x2c097e instanceof _0x2372bc;},'TVKZb':function(_0x1a27b9,_0x21a698){return _0x1a27b9(_0x21a698);},'sfsUw':'\x0aNo\x20profiles\x20found.','RSJUz':_0x33fd44(0x149),'UrJuQ':_0x33fd44(0x13b),'tnlgB':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','bHYGo':_0x33fd44(0x131)},{envNames:_0x29c0a5,activeEnv:_0x2657a9,envTypes:_0x19365b}=await getEnvNames();let _0x2b0151=[];const _0x444829=await getToken();if(_0x444829)try{_0x2b0151=await _0x10dc64[_0x33fd44(0x148)](listCloudProfiles);}catch(_0x125deb){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x10dc64['lOvQB'](_0x125deb,Error)?_0x125deb[_0x33fd44(0x133)]:_0x10dc64[_0x33fd44(0x12a)](String,_0x125deb)));}if(_0x10dc64['qgGFD'](_0x29c0a5[_0x33fd44(0x13f)],0x0)&&_0x10dc64[_0x33fd44(0x11e)](_0x2b0151['length'],0x0)){console['log'](_0x10dc64['sfsUw']),console[_0x33fd44(0x12c)](_0x10dc64[_0x33fd44(0x135)]);return;}const _0x1e9ef1=new Set(_0x2b0151['map'](_0x387909=>_0x387909[_0x33fd44(0x121)]));if(_0x29c0a5[_0x33fd44(0x13f)]>0x0){console['log'](_0x33fd44(0x146));for(const _0x175916 of _0x29c0a5['sort']()){const _0x384b8e=_0x175916===_0x2657a9&&!_0x1e9ef1['has'](_0x175916),_0x444384=_0x19365b[_0x175916]||_0x10dc64['UrJuQ'],_0xc8a89f=await loadSettings(_0x175916),_0x42c2fb=_0x10dc64[_0x33fd44(0x11e)](_0x444384,'legacy')?'':'\x20['+_0x444384+']';console[_0x33fd44(0x12c)]('\x20\x20'+(_0x384b8e?'*\x20':'\x20\x20')+_0x175916+_0x42c2fb),_0xc8a89f['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xc8a89f['baseUrl']),_0xc8a89f['environmentDetails']&&console[_0x33fd44(0x12c)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xc8a89f['environmentDetails']);}}const _0x5c20a1=(_0x101624,_0x5e8632)=>{const _0x3072c1=_0x33fd44,_0x4d155f=_0x10dc64[_0x3072c1(0x11e)](_0x101624['name'],_0x2657a9),_0x126976=_0x101624[_0x3072c1(0x125)]?'cached\x20(updated\x20'+_0x101624[_0x3072c1(0x125)]+')':_0x3072c1(0x12b);console['log'](''+_0x5e8632+(_0x4d155f?'*\x20':'\x20\x20')+_0x101624[_0x3072c1(0x121)]),console['log'](_0x5e8632+_0x3072c1(0x137)+_0x126976);};if(_0x2b0151['length']>0x0){if(shouldGroupByEnvironment(_0x2b0151)){console['log'](_0x33fd44(0x128));for(const _0x44fdf7 of groupCloudProfilesByEnvironment(_0x2b0151)){const _0x2adb68=_0x44fdf7[_0x33fd44(0x138)]??_0x10dc64[_0x33fd44(0x12f)];console[_0x33fd44(0x12c)]('\x0a\x20\x20'+_0x2adb68);for(const _0x3aa9ba of _0x44fdf7[_0x33fd44(0x13c)]){_0x5c20a1(_0x3aa9ba,_0x10dc64['bHYGo']);}}}else{console[_0x33fd44(0x12c)](_0x33fd44(0x127));for(const _0x4e6056 of[..._0x2b0151]['sort']((_0x44a012,_0xb2f70b)=>_0x44a012['name'][_0x33fd44(0x130)](_0xb2f70b['name']))){_0x5c20a1(_0x4e6056,'\x20\x20');}}}_0x2657a9&&console['log']('\x0a*\x20=\x20active\x20profile');}