@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.9ed0a8d-59
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.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +2 -5
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x439cf8,_0xe18756){const _0x672e38=_0x16fe,_0x456c8a=_0x439cf8();while(!![]){try{const _0x49bbc0=parseInt(_0x672e38(0x131))/0x1*(-parseInt(_0x672e38(0x153))/0x2)+-parseInt(_0x672e38(0x18f))/0x3+parseInt(_0x672e38(0x160))/0x4+-parseInt(_0x672e38(0x1b0))/0x5*(parseInt(_0x672e38(0x18b))/0x6)+-parseInt(_0x672e38(0x15a))/0x7*(-parseInt(_0x672e38(0x1a4))/0x8)+parseInt(_0x672e38(0x169))/0x9*(-parseInt(_0x672e38(0x17c))/0xa)+parseInt(_0x672e38(0x14a))/0xb;if(_0x49bbc0===_0xe18756)break;else _0x456c8a['push'](_0x456c8a['shift']());}catch(_0x50759b){_0x456c8a['push'](_0x456c8a['shift']());}}}(_0x1270,0x482a0));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x42e4ef 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';function _0x16fe(_0x3c21fd,_0x5c104f){_0x3c21fd=_0x3c21fd-0x12e;const _0x127016=_0x1270();let _0x16fe60=_0x127016[_0x3c21fd];return _0x16fe60;}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x142cf1=_0x16fe;if(!process[_0x142cf1(0x1a0)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2f587b){const _0x5d109a=_0x16fe,_0x3b34e5={'VKEHL':'HEAD','zgKha':function(_0x579516,_0x4e5cbb){return _0x579516(_0x4e5cbb);},'YHUwa':_0x5d109a(0x15e),'yRqsR':'fetch\x20failed'};try{const _0x23f3ef=new AbortController(),_0x4aea5d=setTimeout(()=>_0x23f3ef[_0x5d109a(0x175)](),0x1388),_0x108589={'method':_0x3b34e5[_0x5d109a(0x17e)],'signal':_0x23f3ef[_0x5d109a(0x147)],'redirect':_0x5d109a(0x15d)};/^https:\/\/localhost(:\d+)?/i[_0x5d109a(0x19b)](_0x2f587b)&&(process[_0x5d109a(0x192)][_0x5d109a(0x168)]='0');const _0x5f3b5b=await fetch(_0x2f587b,_0x108589);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4aea5d);if(_0x5f3b5b[_0x5d109a(0x138)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5f3b5b['status']};}catch(_0x46b05a){delete process[_0x5d109a(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x2bde66=_0x46b05a,_0x2fd408=_0x2bde66['message']||_0x3b34e5['zgKha'](String,_0x46b05a),_0x4014bb=_0x2fd408[_0x5d109a(0x17b)](_0x5d109a(0x1ac))||_0x2bde66['name']===_0x3b34e5[_0x5d109a(0x188)]||_0x2fd408[_0x5d109a(0x17b)](_0x3b34e5['yRqsR']);return{'ok':![],'error':_0x2fd408,'isProtocolError':_0x4014bb};}}async function sweepOrphanLocalProfile(_0x4bc023,_0x4884cd,_0x41c123){const _0x3ec6c9=_0x16fe,_0x1e15d4={'JDEoR':'local','gQncA':function(_0x226587,_0x4c9ac2,_0x3104bf){return _0x226587(_0x4c9ac2,_0x3104bf);},'TsJbh':function(_0x242122,_0x46fb2a){return _0x242122(_0x46fb2a);}},_0x164191=join(_0x4884cd,_0x1e15d4[_0x3ec6c9(0x15c)]),_0x2e14b8=join(_0x164191,_0x4bc023);existsSync(_0x2e14b8)&&(_0x41c123&&await isPathGitTracked(_0x2e14b8)?console[_0x3ec6c9(0x130)](_0x3ec6c9(0x16c)+_0x2e14b8+_0x3ec6c9(0x18a)):(await _0x1e15d4[_0x3ec6c9(0x150)](rm,_0x2e14b8,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2e14b8)));if(_0x1e15d4[_0x3ec6c9(0x15f)](existsSync,_0x164191)){let _0x49d939=[];try{_0x49d939=await readdir(_0x164191);}catch{return;}const _0x2b6463=_0x3ec6c9(0x136)+_0x4bc023+'-';for(const _0x197b99 of _0x49d939){if(!_0x197b99[_0x3ec6c9(0x19f)](_0x2b6463))continue;const _0x19e04f=join(_0x164191,_0x197b99);await rm(_0x19e04f,{'recursive':!![],'force':!![]}),console[_0x3ec6c9(0x130)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x19e04f);}}}async function sweepOrphansBestEffort(_0x1bc2e5){const _0x55e7ad=_0x16fe,_0x218436={'GDfce':function(_0x30d841){return _0x30d841();},'srdNg':function(_0x3e166a){return _0x3e166a();},'ZccML':function(_0x373ff3,_0x3bc932){return _0x373ff3!==_0x3bc932;},'KycqC':function(_0x144af0,_0x4795db){return _0x144af0 instanceof _0x4795db;},'vaaAv':function(_0x382fb5,_0x869e93){return _0x382fb5(_0x869e93);}};try{await sweepOrphanLocalProfile(_0x1bc2e5,_0x218436['GDfce'](getRangerHomeDir),![]);const _0x1cc009=_0x218436[_0x55e7ad(0x182)](getRangerDir);_0x218436['ZccML'](_0x1cc009,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x1bc2e5,_0x1cc009,!![]);}catch(_0x4f9525){console['log'](_0x55e7ad(0x144)+(_0x218436[_0x55e7ad(0x17d)](_0x4f9525,Error)?_0x4f9525[_0x55e7ad(0x193)]:_0x218436['vaaAv'](String,_0x4f9525))+').');}}function _0x1270(){const _0x5bde6a=['6rpcLtO','\x0a✓\x20Profile\x20\x27','\x20Configured\x20envs:\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','748710GfjXQD','VEAqd','authEnv','env','message','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','NvMwb','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','NOIFN','setupHeader','KpQXz','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','test','env_not_found','trackPhaseEnd','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','startsWith','stdout','ciMVc','isProtocolError','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','1934392MTriIw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20--url\x20','environments','cwd','WYtmO','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','KeVoz','Invalid\x20URL','no_match','continue','xsFXB','2380505YFhhmO','LhZYt','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','profile.add.autoRouted','prompt','ThnPv','trim','log','11rSPzLs','slice','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Found\x20auth\x20environment\x20\x27','.tmp-','Use\x20','status','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','dSWOA','kDCqN','JLDlf','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','tPQRV','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','Enter\x20a\x20different\x20URL','QTCUN','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','xzNVQ','MgqvO','signal','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','cdpEndpoint','5402540ctqSkd','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created\x20(CDP).','SMITt','setupHeaders','XpwNz','gQncA','baseUrl','use_suggestion','5482vMyLnw','yes','DPwxM','\x0a\x20\x20A\x20profile\x20named\x20\x22','BJPSg','skipAuth','bPboJ','7gIzpLL','\x20\x20https://docs.ranger.net/main/concepts/profiles','JDEoR','manual','TypeError','TsJbh','1508288FxrNoY','profile.add.autoRouteSkipped','lKcXG','\x0a\x20\x20(domains:\x20','Omztm','flOos','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','NODE_TLS_REJECT_UNAUTHORIZED','135AKXtxM','no_auth_config','url','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\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','isElectron','exit','length','list','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','iKFrx','CaTDE','abort','YyiJh','YctTj','http://','error','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','includes','39070NVHBkT','KycqC','VKEHL','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','RraHm','srdNg','DuuNT','CFlpJ','\x22\x20not\x20found.','uexPs','pLMNu','YHUwa','PpZYD','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'];_0x1270=function(){return _0x5bde6a;};return _0x1270();}async function markActive(_0xf8114d){const _0x55c020=_0x16fe,_0x43a74f={'gdXYr':function(_0xf0f94b,_0x98e9b8){return _0xf0f94b(_0x98e9b8);},'xzNVQ':_0x55c020(0x172)};try{await _0x43a74f['gdXYr'](writeActiveProfileName,_0xf8114d),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0xf8114d);}catch{console[_0x55c020(0x130)](_0x43a74f[_0x55c020(0x145)]);}}async function tryAutoRouteCloudProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x79ecd8,_0x3beaf1){const _0x1c18b4=_0x16fe,_0x1c6051={'lKcXG':_0x1c18b4(0x16a),'JLDlf':function(_0xc4f61d,_0x40f066){return _0xc4f61d instanceof _0x40f066;},'NvMwb':_0x1c18b4(0x161),'RraHm':function(_0x2fb0ea,_0x2cb0c8){return _0x2fb0ea+_0x2cb0c8;},'BJPSg':function(_0x95e039,_0x4b72dc){return _0x95e039+_0x4b72dc;},'Omztm':_0x1c18b4(0x133),'NOIFN':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','dSWOA':_0x1c18b4(0x19a),'KpQXz':_0x1c18b4(0x19c),'gKdwg':function(_0x1b6ad3,_0xaae490){return _0x1b6ad3+_0xaae490;},'bPboJ':function(_0x4780d1,_0x291e8c,_0x4edde7){return _0x4780d1(_0x291e8c,_0x4edde7);},'AAwor':'confirm','CFlpJ':function(_0xe32d27,_0x5c73b3,_0x328038,_0x535cc3){return _0xe32d27(_0x5c73b3,_0x328038,_0x535cc3);},'XpwNz':function(_0x3f8671,_0x2de470){return _0x3f8671===_0x2de470;},'QTCUN':function(_0x10b9e7,_0x204528){return _0x10b9e7(_0x204528);}};let _0xe1e9b2;try{_0xe1e9b2=await fetchAuthConfig();}catch(_0x1031e7){return _0x3beaf1?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1c6051[_0x1c18b4(0x162)],'profileName':_0x2e941d}),console['error'](_0x1c18b4(0x167)+(_0x1c6051[_0x1c18b4(0x13c)](_0x1031e7,Error)?_0x1031e7[_0x1c18b4(0x193)]:String(_0x1031e7))),![];}if((!_0xe1e9b2||!_0xe1e9b2['environments']||Object[_0x1c18b4(0x1b3)](_0xe1e9b2[_0x1c18b4(0x1a7)])['length']===0x0)&&!_0x2802c9[_0x1c18b4(0x191)]){if(_0x79ecd8)return await captureEnvLessProfile(_0x2e941d,_0x51d836,_0x2802c9,_0x3beaf1);return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051['lKcXG'],'profileName':_0x2e941d}),console['error'](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x157)](_0x1c6051[_0x1c18b4(0x181)](_0x1c6051[_0x1c18b4(0x164)],'\x0a')+_0x1c6051[_0x1c18b4(0x197)]+(_0x1c18b4(0x194)+_0x2e941d+_0x1c18b4(0x1a6)+_0x51d836+'\x20--skip-auth\x0a'),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a',_0x1c6051[_0x1c18b4(0x13a)])),![];}let _0x4d8abd;if(_0x2802c9['authEnv']){if(!_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x2802c9['authEnv']]){const _0x26f699=Object['keys'](_0xe1e9b2?.[_0x1c18b4(0x1a7)]??{});return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':_0x1c6051[_0x1c18b4(0x199)],'profileName':_0x2e941d}),console['error'](_0x1c6051['gKdwg']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x2802c9[_0x1c18b4(0x191)]+_0x1c18b4(0x185),_0x26f699['length']?_0x1c18b4(0x18d)+_0x26f699['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x4d8abd=_0x2802c9['authEnv'];}else _0x4d8abd=_0x1c6051[_0x1c18b4(0x159)](matchAuthEnvironment,_0x51d836,_0xe1e9b2);if(!_0x4d8abd)return _0x3beaf1?.[_0x1c18b4(0x19d)]('profile.add.autoRouteSkipped',{'reason':_0x1c18b4(0x1ad),'profileName':_0x2e941d}),console[_0x1c18b4(0x179)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x51d836+_0x1c18b4(0x1aa)+Object[_0x1c18b4(0x1b3)](_0xe1e9b2?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2bd03c=_0xe1e9b2?.[_0x1c18b4(0x1a7)]?.[_0x4d8abd],_0x1dede5=_0x2bd03c?.['domains']??[];if(_0x79ecd8&&!_0x2802c9[_0x1c18b4(0x154)]){const {saveToCloud:_0xede296}=await _0x42e4ef['prompt']([{'type':_0x1c6051['AAwor'],'name':'saveToCloud','message':_0x1c18b4(0x135)+_0x4d8abd+'\x27\x20matching\x20'+_0x51d836+_0x1c18b4(0x163)+_0x1dede5['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2e941d+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xede296)return _0x3beaf1?.[_0x1c18b4(0x19d)](_0x1c6051[_0x1c18b4(0x195)],{'reason':'user_declined','profileName':_0x2e941d}),console['error'](_0x1c18b4(0x134)),![];}const _0x1c4cce=_0x1dede5['some'](_0x1f5f58=>{const _0x5d30d3=_0x1c18b4;try{return new URL(_0x1f5f58)[_0x5d30d3(0x13e)]===new URL(_0x51d836)['origin'];}catch{return![];}}),_0x1c7769={};!_0x1c4cce&&(_0x1c7769['baseUrl']=_0x51d836);try{await _0x1c6051[_0x1c18b4(0x184)](createCloudProfile,_0x2e941d,_0x4d8abd,{'settings':_0x1c7769}),warnCloudProfileSharedInOrg();}catch(_0x4fd48b){if(_0x4fd48b instanceof ApiError&&_0x1c6051[_0x1c18b4(0x14f)](_0x4fd48b[_0x1c18b4(0x138)],0x199)){console[_0x1c18b4(0x179)](_0x1c18b4(0x156)+_0x2e941d+_0x1c18b4(0x13f)+(_0x1c18b4(0x1a3)+_0x2e941d));throw _0x4fd48b;}throw _0x4fd48b;}return console['log'](_0x1c6051[_0x1c18b4(0x181)]('✓\x20Profile\x20\x27'+_0x2e941d+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2e941d)),await _0x1c6051[_0x1c18b4(0x143)](sweepOrphansBestEffort,_0x2e941d),_0x3beaf1?.['trackPhaseEnd'](_0x1c18b4(0x1b4),{'envKey':_0x4d8abd,'profileName':_0x2e941d}),!![];}async function createUnconfiguredCloudProfile(_0xa33e6f,_0x1807de){const _0xf43bac=_0x16fe,_0xd60127={'iKFrx':function(_0xf6dda3,_0x8312e4,_0x544e77,_0x2650ba){return _0xf6dda3(_0x8312e4,_0x544e77,_0x2650ba);},'xHYni':function(_0x26d9ea,_0x135f57){return _0x26d9ea===_0x135f57;}};try{await _0xd60127[_0xf43bac(0x173)](createCloudProfile,_0xa33e6f,undefined,{'settings':_0x1807de}),warnCloudProfileSharedInOrg();}catch(_0x13a887){_0x13a887 instanceof ApiError&&_0xd60127['xHYni'](_0x13a887[_0xf43bac(0x138)],0x199)&&console[_0xf43bac(0x179)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xa33e6f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0xf43bac(0x1a3)+_0xa33e6f));throw _0x13a887;}}async function captureEnvLessProfile(_0x24b365,_0x499a2c,_0x1bd371,_0x14bd4d){const _0xa79aaa=_0x16fe,_0x279fc6={'VEAqd':'confirm','UBDHq':_0xa79aaa(0x14b),'phHhs':_0xa79aaa(0x161),'DPwxM':'user_declined','VNKbp':function(_0x3576a5,_0x55463f){return _0x3576a5===_0x55463f;},'KRCQf':function(_0x182d3e,_0x4127f0){return _0x182d3e+_0x4127f0;},'ThnPv':function(_0x3a088e,_0x116edf){return _0x3a088e>_0x116edf;},'KeVoz':function(_0x2a6c79,_0x535252,_0x2d44c2,_0x5b7db6){return _0x2a6c79(_0x535252,_0x2d44c2,_0x5b7db6);},'flOos':function(_0x3d8e19,_0x4d2d64){return _0x3d8e19 instanceof _0x4d2d64;},'WYtmO':function(_0x28b427,_0x252b81,_0x4257ee){return _0x28b427(_0x252b81,_0x4257ee);},'kwlnJ':function(_0x18b944,_0xf3f3c5){return _0x18b944(_0xf3f3c5);}};if(!_0x1bd371['yes']){const {capture:_0x5a424d}=await _0x42e4ef['prompt']([{'type':_0x279fc6[_0xa79aaa(0x190)],'name':'capture','message':_0x279fc6['UBDHq'],'default':!![]}]);if(!_0x5a424d)return _0x14bd4d?.['trackPhaseEnd'](_0x279fc6['phHhs'],{'reason':_0x279fc6[_0xa79aaa(0x155)],'profileName':_0x24b365}),console['error'](_0xa79aaa(0x148)+_0xa79aaa(0x18e)),![];}const _0x59a0e2={};if(_0x1bd371[_0xa79aaa(0x198)])for(const _0x77c5fd of _0x1bd371['setupHeader']){const _0xdde94c=_0x77c5fd[_0xa79aaa(0x180)](':');if(_0x279fc6['VNKbp'](_0xdde94c,-0x1))continue;_0x59a0e2[_0x77c5fd[_0xa79aaa(0x132)](0x0,_0xdde94c)[_0xa79aaa(0x12f)]()]=_0x77c5fd['slice'](_0x279fc6['KRCQf'](_0xdde94c,0x1))[_0xa79aaa(0x12f)]();}const _0x17d4ff={'baseUrl':_0x499a2c};_0x279fc6[_0xa79aaa(0x12e)](Object['keys'](_0x59a0e2)[_0xa79aaa(0x170)],0x0)&&(_0x17d4ff['setupHeaders']=_0x59a0e2);let _0x5d9c71;try{_0x5d9c71=await _0x279fc6[_0xa79aaa(0x1ab)](createCloudProfile,_0x24b365,undefined,{'settings':_0x17d4ff}),warnCloudProfileSharedInOrg();}catch(_0xd839a7){_0x279fc6[_0xa79aaa(0x165)](_0xd839a7,ApiError)&&_0xd839a7[_0xa79aaa(0x138)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x24b365+_0xa79aaa(0x13f)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x24b365));throw _0xd839a7;}return await _0x279fc6[_0xa79aaa(0x1a9)](manualBrowserLogin,_0x5d9c71,{'key':'','domains':[_0x499a2c],'setupHeaders':Object[_0xa79aaa(0x1b3)](_0x59a0e2)['length']>0x0?_0x59a0e2:undefined}),console['log'](_0xa79aaa(0x18c)+_0x24b365+_0xa79aaa(0x166)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x24b365)),await _0x279fc6['kwlnJ'](sweepOrphansBestEffort,_0x24b365),_0x14bd4d?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x24b365}),!![];}export async function addEnv(_0x1ae65c,_0x458502={},_0x33c474){const _0x2e3f25=_0x16fe,_0x3e0f7f={'tPQRV':function(_0x1a7750,_0x504001){return _0x1a7750+_0x504001;},'HTgmy':function(_0x540c6e,_0x3f11f0){return _0x540c6e+_0x3f11f0;},'NlMAp':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','PpZYD':_0x2e3f25(0x139),'jMXZn':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ciMVc':_0x2e3f25(0x15b),'MgqvO':function(_0x4bb289,_0x1a1c14){return _0x4bb289===_0x1a1c14;},'DuuNT':_0x2e3f25(0x1b2),'KwFBo':function(_0x49c67d){return _0x49c67d();},'XPNSZ':_0x2e3f25(0x17a),'pLMNu':function(_0x3b79fa,_0x250892){return _0x3b79fa>_0x250892;},'LhZYt':function(_0x30d865,_0x5bb1e1){return _0x30d865(_0x5bb1e1);},'YctTj':function(_0x41de38,_0x3115cd){return _0x41de38(_0x3115cd);},'xsFXB':function(_0x4bb3e0,_0x1ee0fc,_0x5aa63d){return _0x4bb3e0(_0x1ee0fc,_0x5aa63d);},'LOTsS':function(_0x33684b,_0x33816b){return _0x33684b(_0x33816b);},'uexPs':_0x2e3f25(0x196),'lQTER':'input','LIBjO':_0x2e3f25(0x13d),'CaTDE':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','SMITt':'What\x20would\x20you\x20like\x20to\x20do?','kDCqN':_0x2e3f25(0x142),'YyiJh':'continue'};_0x458502['ci']&&(console['error'](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f[_0x2e3f25(0x140)](_0x3e0f7f['HTgmy'](_0x3e0f7f['HTgmy'](_0x3e0f7f['NlMAp'],_0x3e0f7f[_0x2e3f25(0x189)]),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x3e0f7f['jMXZn'])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x3e0f7f[_0x2e3f25(0x1a1)])),process['exit'](0x1));const _0x5a25ef={};if(_0x458502[_0x2e3f25(0x198)])for(const _0xac1be of _0x458502['setupHeader']){const _0x211612=_0xac1be[_0x2e3f25(0x180)](':');if(_0x3e0f7f['MgqvO'](_0x211612,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xac1be+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x31113b=_0xac1be[_0x2e3f25(0x132)](0x0,_0x211612)['trim'](),_0x584f11=_0xac1be[_0x2e3f25(0x132)](_0x211612+0x1)[_0x2e3f25(0x12f)]();_0x5a25ef[_0x31113b]=_0x584f11;}if(_0x458502[_0x2e3f25(0x149)]!==undefined&&_0x458502[_0x2e3f25(0x149)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x458502[_0x2e3f25(0x149)]&&_0x458502[_0x2e3f25(0x16b)])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(_0x458502[_0x2e3f25(0x191)]&&_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x141));if(_0x458502[_0x2e3f25(0x191)]&&_0x458502['cdpEndpoint'])throw new Error(_0x3e0f7f[_0x2e3f25(0x183)]);const _0x32c05c=Boolean(_0x458502['cdpEndpoint']),_0x46a2d2=_0x3e0f7f['KwFBo'](isInteractive);if(!_0x46a2d2&&!_0x458502[_0x2e3f25(0x16b)]&&!_0x32c05c&&!_0x458502['skipAuth'])throw new Error(_0x2e3f25(0x16d));if(_0x32c05c){const _0x42116d=_0x458502['cdpEndpoint'];console['log'](_0x3e0f7f['XPNSZ']),console['log'](_0x2e3f25(0x19e)+_0x42116d);const _0x41d816={'cdpEndpoint':_0x42116d,'isElectron':!![]};_0x3e0f7f[_0x2e3f25(0x187)](Object[_0x2e3f25(0x1b3)](_0x5a25ef)['length'],0x0)&&(_0x41d816[_0x2e3f25(0x14e)]=_0x5a25ef);await createUnconfiguredCloudProfile(_0x1ae65c,_0x41d816);try{setProfileOverride(process[_0x2e3f25(0x1a8)](),_0x1ae65c,_0x2e3f25(0x149),_0x42116d),setProfileOverride(process['cwd'](),_0x1ae65c,_0x2e3f25(0x16e),!![]);}catch(_0x47ae7a){console['error'](_0x2e3f25(0x17f)+(_0x47ae7a instanceof Error?_0x47ae7a[_0x2e3f25(0x193)]:String(_0x47ae7a)));}console[_0x2e3f25(0x130)]('✓\x20Cloud\x20profile\x20\x27'+_0x1ae65c+_0x2e3f25(0x14c)),await _0x3e0f7f['LhZYt'](sweepOrphansBestEffort,_0x1ae65c),await _0x3e0f7f['YctTj'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x158)]){const _0x4a8323={};_0x458502[_0x2e3f25(0x16b)]&&(_0x4a8323['baseUrl']=_0x458502[_0x2e3f25(0x16b)]);_0x3e0f7f['pLMNu'](Object['keys'](_0x5a25ef)[_0x2e3f25(0x170)],0x0)&&(_0x4a8323[_0x2e3f25(0x14e)]=_0x5a25ef);await _0x3e0f7f[_0x2e3f25(0x1af)](createUnconfiguredCloudProfile,_0x1ae65c,_0x4a8323),console['log']('✓\x20Profile\x20\x27'+_0x1ae65c+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1ae65c+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x1ae65c),await _0x3e0f7f['LOTsS'](markActive,_0x1ae65c);return;}if(_0x458502[_0x2e3f25(0x16b)]){const _0x4f20fc=_0x458502['url'],_0x3e7cb4=await checkUrlReachability(_0x4f20fc);if(!_0x3e7cb4['ok']&&!_0x458502['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x3e7cb4['ok']&&_0x458502['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4f20fc+':\x20'+_0x3e7cb4['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x2e3f25(0x1a5)),console[_0x2e3f25(0x130)](_0x3e0f7f[_0x2e3f25(0x186)]);let _0x58e069='',_0x14af3c=![];while(!![]){const _0x4d7b31=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x3e0f7f['lQTER'],'name':'baseUrl','message':_0x14af3c?_0x3e0f7f['LIBjO']:_0x3e0f7f[_0x2e3f25(0x174)],'default':_0x58e069||'http://localhost:3000'}]);_0x58e069=_0x4d7b31[_0x2e3f25(0x151)];const _0x490fe7=await checkUrlReachability(_0x58e069);if(_0x490fe7['ok'])break;const _0x43a5f2=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x58e069),_0x132704=_0x490fe7[_0x2e3f25(0x1a2)]&&!_0x43a5f2,_0x331e11=_0x132704?_0x2e3f25(0x178)+_0x58e069:null;_0x14af3c=!![],console[_0x2e3f25(0x130)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x490fe7['error']);_0x331e11&&console[_0x2e3f25(0x130)]('\x20\x20Did\x20you\x20mean\x20'+_0x331e11+'?');const {action:_0x273c42}=await _0x42e4ef[_0x2e3f25(0x1b5)]([{'type':_0x2e3f25(0x171),'name':'action','message':_0x3e0f7f[_0x2e3f25(0x14d)],'choices':[..._0x331e11?[{'name':_0x2e3f25(0x137)+_0x331e11,'value':_0x2e3f25(0x152)}]:[],{'name':_0x3e0f7f[_0x2e3f25(0x13b)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x3e0f7f[_0x2e3f25(0x176)]}]}]);if(_0x3e0f7f[_0x2e3f25(0x146)](_0x273c42,_0x2e3f25(0x152))&&_0x331e11){_0x58e069=_0x331e11;const _0x4b3d9d=await _0x3e0f7f[_0x2e3f25(0x177)](checkUrlReachability,_0x58e069);if(_0x4b3d9d['ok'])break;console[_0x2e3f25(0x130)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x58e069+':\x20'+_0x4b3d9d['error']);}else{if(_0x273c42===_0x2e3f25(0x1ae))break;}}_0x458502={..._0x458502,'url':_0x58e069};}let _0x5951e0=![];try{_0x5951e0=await tryAutoRouteCloudProfile(_0x1ae65c,_0x458502[_0x2e3f25(0x16b)],_0x458502,_0x46a2d2,_0x33c474);}catch(_0x1d796a){console[_0x2e3f25(0x179)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1ae65c+'\x22:\x20'+(_0x1d796a instanceof Error?_0x1d796a[_0x2e3f25(0x193)]:_0x3e0f7f['YctTj'](String,_0x1d796a))),process['exit'](0x1);}!_0x5951e0&&process[_0x2e3f25(0x16f)](0x1),await _0x3e0f7f[_0x2e3f25(0x1b1)](markActive,_0x1ae65c);}
|
|
1
|
+
(function(_0x26451a,_0x591dba){const _0x15a7f7=_0x24da,_0x288265=_0x26451a();while(!![]){try{const _0x51b465=-parseInt(_0x15a7f7(0x18b))/0x1+-parseInt(_0x15a7f7(0x162))/0x2+parseInt(_0x15a7f7(0x150))/0x3+parseInt(_0x15a7f7(0x1ac))/0x4*(parseInt(_0x15a7f7(0x19d))/0x5)+-parseInt(_0x15a7f7(0x14d))/0x6+parseInt(_0x15a7f7(0x1bc))/0x7*(-parseInt(_0x15a7f7(0x16c))/0x8)+parseInt(_0x15a7f7(0x19a))/0x9;if(_0x51b465===_0x591dba)break;else _0x288265['push'](_0x288265['shift']());}catch(_0x1a2410){_0x288265['push'](_0x288265['shift']());}}}(_0x118d,0x4b872));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1cf43e 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';function _0x24da(_0xac8190,_0x3cd624){_0xac8190=_0xac8190-0x139;const _0x118d27=_0x118d();let _0x24da27=_0x118d27[_0xac8190];return _0x24da27;}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x118d(){const _0x2f7c16=['QsUFV','skipAuth','setupHeaders','HEAD','keys','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20--skip-auth\x0a','trackPhaseEnd','status','DnuaN','\x0a\x20\x20A\x20profile\x20named\x20\x22','LBjLK','153730OrryOz','http://','ekEDA','environments','uFpUx','baseUrl','iOoRt','AoJWI','Rppxi','DMhLn','stdout','\x20\x20https://docs.ranger.net/main/concepts/profiles','use_suggestion','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','Continue\x20anyway','10341819tcmSmw','exit','join','3645INXTqw','capture','env_not_found','cdpEndpoint','\x27\x20to\x20the\x20cloud?','fetch\x20failed','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','AISPe','PNAkp','xFcSB','ViZyK','umygI','Could\x20not\x20reach\x20','cwd','\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','1704ZUHuvn','✓\x20Profile\x20\x27','list','trim','indexOf','nUAPL','Sfcbd','setupHeader','Xrchi','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','`\x20again\x20without\x20--skip-auth.','message','prompt','some','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','917ffrkVk','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','ipyqG','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','hBFOy','includes','NODE_TLS_REJECT_UNAUTHORIZED','BWZSs','YlFzE','What\x20would\x20you\x20like\x20to\x20do?','log','HTTP\x20','RzhEg','\x20--url\x20','jtUqh','⚠\x20Could\x20not\x20reach\x20','JIjvs','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','OnRhl','TJQID','nlJGt','3384018BRRySH','saveToCloud','error','188559zRkhGZ','HwhiU','\x22\x20not\x20found.','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','user_declined','pXYXf','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','JCLYJ','startsWith','KBApb','rNuqT','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','BKRcZ','tyMHP','Invalid\x20--setup-header\x20format:\x20\x22','Found\x20auth\x20environment\x20\x27','origin','279738WvTnFm','manual','length','yEmbF','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','http://localhost:3000','slice','url','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20Did\x20you\x20mean\x20','21712rGhgvh','VHnFZ','profile.add.autoRouteSkipped','retry','authEnv','force','Enxsf','TzXBR','blowG','Enter\x20a\x20different\x20URL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','profile.add.autoRouted','nGsrC','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','continue','zHSgH','no_auth_config','\x20(continuing\x20with\x20--force)','env'];_0x118d=function(){return _0x2f7c16;};return _0x118d();}const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x25271e=_0x24da;if(!process[_0x25271e(0x195)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x456f82){const _0x43a2ee=_0x24da,_0x31f31b={'QmNBa':_0x43a2ee(0x163),'NJfpe':function(_0x3eb469,_0x1252eb){return _0x3eb469(_0x1252eb);},'HBceU':function(_0xe18322,_0x3b730d){return _0xe18322<_0x3b730d;},'ViZyK':function(_0x48f48a,_0x2309f9){return _0x48f48a(_0x2309f9);}};try{const _0x4dfea6=new AbortController(),_0x79384e=setTimeout(()=>_0x4dfea6['abort'](),0x1388),_0x1de996={'method':_0x43a2ee(0x182),'signal':_0x4dfea6['signal'],'redirect':_0x31f31b['QmNBa']};/^https:\/\/localhost(:\d+)?/i['test'](_0x456f82)&&(process[_0x43a2ee(0x17e)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x5414d6=await fetch(_0x456f82,_0x1de996);delete process[_0x43a2ee(0x17e)][_0x43a2ee(0x13e)],_0x31f31b['NJfpe'](clearTimeout,_0x79384e);if(_0x31f31b['HBceU'](_0x5414d6[_0x43a2ee(0x187)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x43a2ee(0x143)+_0x5414d6['status']};}catch(_0x417b39){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x30fd26=_0x417b39,_0x3d087e=_0x30fd26[_0x43a2ee(0x1b8)]||_0x31f31b[_0x43a2ee(0x1a7)](String,_0x417b39),_0x9de8c0=_0x3d087e[_0x43a2ee(0x13d)]('Invalid\x20URL')||_0x30fd26['name']==='TypeError'||_0x3d087e[_0x43a2ee(0x13d)](_0x43a2ee(0x1a2));return{'ok':![],'error':_0x3d087e,'isProtocolError':_0x9de8c0};}}async function sweepOrphanLocalProfile(_0x4bab9e,_0x2dd526,_0x50f96e){const _0x2b73b8=_0x24da,_0x35ae3e={'LBjLK':function(_0x54393a,_0x511d9d,_0x5ba33e){return _0x54393a(_0x511d9d,_0x5ba33e);},'DjTYl':function(_0x2ff15b,_0x2fd530){return _0x2ff15b(_0x2fd530);},'AISPe':function(_0x3b7cf2,_0x864cd0){return _0x3b7cf2(_0x864cd0);},'EUEHR':function(_0x1a712a,_0x290cb4,_0x40f0a){return _0x1a712a(_0x290cb4,_0x40f0a);},'SyqGl':function(_0xd36e5e,_0x2c6726){return _0xd36e5e(_0x2c6726);},'blowG':function(_0x2575e3,_0x5390c9,_0x5df90c){return _0x2575e3(_0x5390c9,_0x5df90c);}},_0x3c4d14=_0x35ae3e[_0x2b73b8(0x18a)](join,_0x2dd526,'local'),_0x2a50ce=join(_0x3c4d14,_0x4bab9e);_0x35ae3e['DjTYl'](existsSync,_0x2a50ce)&&(_0x50f96e&&await _0x35ae3e[_0x2b73b8(0x1a4)](isPathGitTracked,_0x2a50ce)?console[_0x2b73b8(0x142)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x2a50ce+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x35ae3e['EUEHR'](rm,_0x2a50ce,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2a50ce)));if(existsSync(_0x3c4d14)){let _0x135bf6=[];try{_0x135bf6=await _0x35ae3e['SyqGl'](readdir,_0x3c4d14);}catch{return;}const _0x332cb7='.tmp-'+_0x4bab9e+'-';for(const _0x2f3e60 of _0x135bf6){if(!_0x2f3e60[_0x2b73b8(0x159)](_0x332cb7))continue;const _0x34bbd5=join(_0x3c4d14,_0x2f3e60);await _0x35ae3e[_0x2b73b8(0x174)](rm,_0x34bbd5,{'recursive':!![],'force':!![]}),console['log'](_0x2b73b8(0x149)+_0x34bbd5);}}}async function sweepOrphansBestEffort(_0x1074f0){const _0x17b274=_0x24da,_0x463c43={'hBFOy':function(_0xca9147,_0x19ae5c){return _0xca9147!==_0x19ae5c;},'NwNXm':function(_0x52047f){return _0x52047f();},'ekEDA':function(_0x4e00aa,_0x339ec4,_0x1a182c,_0x4e5cc7){return _0x4e00aa(_0x339ec4,_0x1a182c,_0x4e5cc7);}};try{await sweepOrphanLocalProfile(_0x1074f0,getRangerHomeDir(),![]);const _0x178427=getRangerDir();_0x463c43[_0x17b274(0x13c)](_0x178427,_0x463c43['NwNXm'](getRangerHomeDir))&&await _0x463c43[_0x17b274(0x18d)](sweepOrphanLocalProfile,_0x1074f0,_0x178427,!![]);}catch(_0x4412c1){console[_0x17b274(0x142)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x4412c1 instanceof Error?_0x4412c1['message']:String(_0x4412c1))+').');}}async function markActive(_0x14c693){const _0x1e9ae2=_0x24da,_0x1c2b62={'DnuaN':function(_0x1b58ff,_0x19d9d0){return _0x1b58ff(_0x19d9d0);},'AoJWI':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x1c2b62[_0x1e9ae2(0x188)](writeActiveProfileName,_0x14c693),console[_0x1e9ae2(0x142)]('\x20\x20Set\x20active\x20profile:\x20'+_0x14c693);}catch{console['log'](_0x1c2b62[_0x1e9ae2(0x192)]);}}async function tryAutoRouteCloudProfile(_0x15468b,_0x25a447,_0x3d03ab,_0x32dd91,_0x9b8c99){const _0x1583a0=_0x24da,_0x914f57={'DMhLn':function(_0x525fb1){return _0x525fb1();},'RzhEg':_0x1583a0(0x16e),'QzCKm':_0x1583a0(0x17c),'JXiQn':function(_0x33fcda,_0x5e6cdd){return _0x33fcda(_0x5e6cdd);},'QsUFV':function(_0x279ae6,_0x34e5b5){return _0x279ae6===_0x34e5b5;},'lASoB':function(_0x5bde63,_0xa8e028,_0x25b053,_0x1d18aa,_0x38fe97){return _0x5bde63(_0xa8e028,_0x25b053,_0x1d18aa,_0x38fe97);},'JIjvs':function(_0x35327b,_0x12eadd){return _0x35327b+_0x12eadd;},'Rppxi':function(_0x23ea75,_0x5286b4){return _0x23ea75+_0x5286b4;},'eGzWV':_0x1583a0(0x1ab),'xFcSB':_0x1583a0(0x13b),'rTLKn':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','AHzVV':_0x1583a0(0x19f),'PNAkp':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','LmWbJ':function(_0x1598db,_0x42927a,_0x80c4db){return _0x1598db(_0x42927a,_0x80c4db);},'JCLYJ':'no_match','umygI':'confirm','Zixzw':'user_declined','jtUqh':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','WvuNe':function(_0x55de43,_0x433779){return _0x55de43+_0x433779;}};let _0x403402;try{_0x403402=await _0x914f57[_0x1583a0(0x194)](fetchAuthConfig);}catch(_0x5d525a){return _0x9b8c99?.[_0x1583a0(0x186)](_0x914f57['RzhEg'],{'reason':_0x914f57['QzCKm'],'profileName':_0x15468b}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5d525a instanceof Error?_0x5d525a['message']:_0x914f57['JXiQn'](String,_0x5d525a))),![];}if((!_0x403402||!_0x403402['environments']||_0x914f57[_0x1583a0(0x17f)](Object[_0x1583a0(0x183)](_0x403402['environments'])['length'],0x0))&&!_0x3d03ab[_0x1583a0(0x170)]){if(_0x32dd91)return await _0x914f57['lASoB'](captureEnvLessProfile,_0x15468b,_0x25a447,_0x3d03ab,_0x9b8c99);return _0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x16e),{'reason':_0x914f57['QzCKm'],'profileName':_0x15468b}),console[_0x1583a0(0x14f)](_0x914f57[_0x1583a0(0x148)](_0x914f57['JIjvs'](_0x914f57[_0x1583a0(0x193)](_0x914f57['eGzWV'],'\x0a'),_0x914f57[_0x1583a0(0x1a6)])+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x15468b+_0x1583a0(0x145)+_0x25a447+_0x1583a0(0x185))+'\x0a'+_0x1583a0(0x157),_0x914f57['rTLKn'])),![];}let _0x2f43cf;if(_0x3d03ab[_0x1583a0(0x170)]){if(!_0x403402?.['environments']?.[_0x3d03ab[_0x1583a0(0x170)]]){const _0x45f0a9=Object['keys'](_0x403402?.[_0x1583a0(0x18e)]??{});return _0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x16e),{'reason':_0x914f57['AHzVV'],'profileName':_0x15468b}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x3d03ab[_0x1583a0(0x170)]+_0x1583a0(0x152)+(_0x45f0a9['length']?'\x20Configured\x20envs:\x20'+_0x45f0a9['join'](',\x20')+'.':_0x914f57[_0x1583a0(0x1a5)])),![];}_0x2f43cf=_0x3d03ab[_0x1583a0(0x170)];}else _0x2f43cf=_0x914f57['LmWbJ'](matchAuthEnvironment,_0x25a447,_0x403402);if(!_0x2f43cf)return _0x9b8c99?.[_0x1583a0(0x186)](_0x1583a0(0x16e),{'reason':_0x914f57[_0x1583a0(0x158)],'profileName':_0x15468b}),console[_0x1583a0(0x14f)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x25a447+_0x1583a0(0x179)+Object[_0x1583a0(0x183)](_0x403402?.[_0x1583a0(0x18e)]??{})['join'](',\x20')+'.'),![];const _0x2602a9=_0x403402?.['environments']?.[_0x2f43cf],_0x4a41f4=_0x2602a9?.['domains']??[];if(_0x32dd91&&!_0x3d03ab['yes']){const {saveToCloud:_0x282abe}=await _0x1cf43e[_0x1583a0(0x1b9)]([{'type':_0x914f57[_0x1583a0(0x1a8)],'name':_0x1583a0(0x14e),'message':_0x1583a0(0x160)+_0x2f43cf+'\x27\x20matching\x20'+_0x25a447+'\x0a\x20\x20(domains:\x20'+_0x4a41f4[_0x1583a0(0x19c)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x15468b+_0x1583a0(0x1a1),'default':!![]}]);if(!_0x282abe)return _0x9b8c99?.[_0x1583a0(0x186)](_0x914f57[_0x1583a0(0x144)],{'reason':_0x914f57['Zixzw'],'profileName':_0x15468b}),console[_0x1583a0(0x14f)](_0x914f57[_0x1583a0(0x146)]),![];}const _0x21f24c=_0x4a41f4[_0x1583a0(0x1ba)](_0x2beaea=>{const _0x2f25eb=_0x1583a0;try{return new URL(_0x2beaea)[_0x2f25eb(0x161)]===new URL(_0x25a447)[_0x2f25eb(0x161)];}catch{return![];}}),_0xd71602={};!_0x21f24c&&(_0xd71602['baseUrl']=_0x25a447);try{await createCloudProfile(_0x15468b,_0x2f43cf,{'settings':_0xd71602}),warnCloudProfileSharedInOrg();}catch(_0x228b43){if(_0x228b43 instanceof ApiError&&_0x228b43['status']===0x199){console['error'](_0x914f57['WvuNe'](_0x1583a0(0x189)+_0x15468b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x1583a0(0x176)+_0x15468b));throw _0x228b43;}throw _0x228b43;}return console[_0x1583a0(0x142)]('✓\x20Profile\x20\x27'+_0x15468b+'\x27\x20created.\x0a'+(_0x1583a0(0x1a3)+_0x15468b)),await sweepOrphansBestEffort(_0x15468b),_0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x177),{'envKey':_0x2f43cf,'profileName':_0x15468b}),!![];}async function createUnconfiguredCloudProfile(_0x84dd4f,_0x177d5d){const _0x1575c4=_0x24da,_0x2df8f5={'TzXBR':function(_0x346eeb){return _0x346eeb();},'xFaha':function(_0x41501d,_0xbf2c7a){return _0x41501d===_0xbf2c7a;},'BjZHZ':function(_0x49a9e3,_0x49b370){return _0x49a9e3+_0x49b370;}};try{await createCloudProfile(_0x84dd4f,undefined,{'settings':_0x177d5d}),_0x2df8f5[_0x1575c4(0x173)](warnCloudProfileSharedInOrg);}catch(_0x2fcc5){_0x2fcc5 instanceof ApiError&&_0x2df8f5['xFaha'](_0x2fcc5['status'],0x199)&&console['error'](_0x2df8f5['BjZHZ'](_0x1575c4(0x189)+_0x84dd4f+_0x1575c4(0x198),_0x1575c4(0x176)+_0x84dd4f));throw _0x2fcc5;}}async function captureEnvLessProfile(_0x166fd4,_0x36a355,_0xd40fc0,_0x48c5d9){const _0x51ae37=_0x24da,_0x1bde73={'tApBK':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','VHnFZ':function(_0x25ba39,_0x204e53){return _0x25ba39+_0x204e53;},'BKRcZ':function(_0x43bf48,_0x6bd8f4){return _0x43bf48+_0x6bd8f4;},'fyiOW':function(_0x2a23ad){return _0x2a23ad();},'yEmbF':function(_0x10a0f7,_0x47b09a){return _0x10a0f7 instanceof _0x47b09a;},'mtgEA':function(_0x1c68c3,_0x1772a2){return _0x1c68c3===_0x1772a2;}};if(!_0xd40fc0['yes']){const {capture:_0x55964d}=await _0x1cf43e[_0x51ae37(0x1b9)]([{'type':_0x51ae37(0x139),'name':_0x51ae37(0x19e),'message':_0x1bde73['tApBK'],'default':!![]}]);if(!_0x55964d)return _0x48c5d9?.[_0x51ae37(0x186)](_0x51ae37(0x16e),{'reason':_0x51ae37(0x155),'profileName':_0x166fd4}),console[_0x51ae37(0x14f)](_0x1bde73[_0x51ae37(0x16d)]('\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 _0x4957ea={};if(_0xd40fc0[_0x51ae37(0x1b3)])for(const _0x95a2dc of _0xd40fc0[_0x51ae37(0x1b3)]){const _0x3fda67=_0x95a2dc[_0x51ae37(0x1b0)](':');if(_0x3fda67===-0x1)continue;_0x4957ea[_0x95a2dc['slice'](0x0,_0x3fda67)[_0x51ae37(0x1af)]()]=_0x95a2dc['slice'](_0x1bde73[_0x51ae37(0x15d)](_0x3fda67,0x1))['trim']();}const _0x441a43={'baseUrl':_0x36a355};Object[_0x51ae37(0x183)](_0x4957ea)[_0x51ae37(0x164)]>0x0&&(_0x441a43[_0x51ae37(0x181)]=_0x4957ea);let _0x1b2ca4;try{_0x1b2ca4=await createCloudProfile(_0x166fd4,undefined,{'settings':_0x441a43}),_0x1bde73['fyiOW'](warnCloudProfileSharedInOrg);}catch(_0x55052f){_0x1bde73[_0x51ae37(0x165)](_0x55052f,ApiError)&&_0x1bde73['mtgEA'](_0x55052f[_0x51ae37(0x187)],0x199)&&console[_0x51ae37(0x14f)](_0x1bde73['VHnFZ']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x166fd4+_0x51ae37(0x198),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x166fd4));throw _0x55052f;}return await manualBrowserLogin(_0x1b2ca4,{'key':'','domains':[_0x36a355],'setupHeaders':Object[_0x51ae37(0x183)](_0x4957ea)[_0x51ae37(0x164)]>0x0?_0x4957ea:undefined}),console[_0x51ae37(0x142)](_0x1bde73['BKRcZ']('\x0a✓\x20Profile\x20\x27'+_0x166fd4+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x166fd4)),await sweepOrphansBestEffort(_0x166fd4),_0x48c5d9?.[_0x51ae37(0x186)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x166fd4}),!![];}export async function addEnv(_0x4f23cc,_0x538e0e={},_0x2bfc80){const _0x3abad4=_0x24da,_0x89db01={'YuPEJ':function(_0x384a86,_0x8548da){return _0x384a86+_0x8548da;},'zHSgH':_0x3abad4(0x153),'OnRhl':_0x3abad4(0x184),'Enxsf':_0x3abad4(0x196),'nGsrC':function(_0x28ff3a,_0x516b4b){return _0x28ff3a===_0x516b4b;},'HwhiU':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','Xrchi':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','uFpUx':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','tnmQT':function(_0x316fe8,_0x595a4d){return _0x316fe8(_0x595a4d);},'nUAPL':function(_0x3724d7,_0x17c7c0){return _0x3724d7>_0x17c7c0;},'Sfcbd':function(_0x29f693,_0x8e547d,_0x4c6e72){return _0x29f693(_0x8e547d,_0x4c6e72);},'nlJGt':function(_0x65d2fb,_0x863456,_0x46ea4d,_0x505bac,_0x184aed){return _0x65d2fb(_0x863456,_0x46ea4d,_0x505bac,_0x184aed);},'tyMHP':_0x3abad4(0x1a0),'KBApb':'isElectron','ipyqG':function(_0x57aa89,_0x4e82dc){return _0x57aa89(_0x4e82dc);},'TJQID':function(_0x168302,_0xfe03fb,_0x5a7041){return _0x168302(_0xfe03fb,_0x5a7041);},'BWZSs':'\x0a🌐\x20Profile\x20Setup\x0a','zhDxy':_0x3abad4(0x190),'IAlxH':function(_0xff56c0,_0x2147da){return _0xff56c0(_0x2147da);},'OVssg':_0x3abad4(0x1ae),'WUTyf':'action','PUakl':_0x3abad4(0x141),'YlFzE':'use_suggestion','rNuqT':_0x3abad4(0x175),'pXYXf':_0x3abad4(0x199),'iOoRt':function(_0x12cf40,_0x45e1a0){return _0x12cf40(_0x45e1a0);},'nEhoh':function(_0x3f7ce5,_0x16d471,_0x143cbe,_0x1f7cc1,_0x3cfdb7,_0x3b98a2){return _0x3f7ce5(_0x16d471,_0x143cbe,_0x1f7cc1,_0x3cfdb7,_0x3b98a2);},'hWkZH':function(_0x26251e,_0x2308d4){return _0x26251e instanceof _0x2308d4;}};_0x538e0e['ci']&&(console['error'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ']('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x89db01[_0x3abad4(0x17b)]),'\x0a')+_0x3abad4(0x166)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x89db01[_0x3abad4(0x14a)]),_0x89db01[_0x3abad4(0x172)])),process[_0x3abad4(0x19b)](0x1));const _0x2a2c07={};if(_0x538e0e['setupHeader'])for(const _0x366fc9 of _0x538e0e['setupHeader']){const _0x53377d=_0x366fc9[_0x3abad4(0x1b0)](':');if(_0x89db01[_0x3abad4(0x178)](_0x53377d,-0x1))throw new Error(_0x3abad4(0x15f)+_0x366fc9+_0x3abad4(0x1b6));const _0x2703b1=_0x366fc9[_0x3abad4(0x168)](0x0,_0x53377d)[_0x3abad4(0x1af)](),_0x51ff81=_0x366fc9[_0x3abad4(0x168)](_0x53377d+0x1)[_0x3abad4(0x1af)]();_0x2a2c07[_0x2703b1]=_0x51ff81;}if(_0x538e0e['cdpEndpoint']!==undefined&&_0x89db01[_0x3abad4(0x178)](_0x538e0e[_0x3abad4(0x1a0)]['trim'](),''))throw new Error(_0x89db01[_0x3abad4(0x151)]);if(_0x538e0e['cdpEndpoint']&&_0x538e0e[_0x3abad4(0x169)])throw new Error(_0x89db01[_0x3abad4(0x1b4)]);if(_0x538e0e['authEnv']&&_0x538e0e[_0x3abad4(0x180)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x538e0e['authEnv']&&_0x538e0e['cdpEndpoint'])throw new Error(_0x89db01[_0x3abad4(0x18f)]);const _0x5e2ed0=_0x89db01['tnmQT'](Boolean,_0x538e0e[_0x3abad4(0x1a0)]),_0xd497c=isInteractive();if(!_0xd497c&&!_0x538e0e['url']&&!_0x5e2ed0&&!_0x538e0e[_0x3abad4(0x180)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x5e2ed0){const _0x498cf4=_0x538e0e[_0x3abad4(0x1a0)];console['log']('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x3abad4(0x142)](_0x3abad4(0x15c)+_0x498cf4);const _0x5674a3={'cdpEndpoint':_0x498cf4,'isElectron':!![]};_0x89db01[_0x3abad4(0x1b1)](Object['keys'](_0x2a2c07)['length'],0x0)&&(_0x5674a3[_0x3abad4(0x181)]=_0x2a2c07);await _0x89db01[_0x3abad4(0x1b2)](createUnconfiguredCloudProfile,_0x4f23cc,_0x5674a3);try{_0x89db01[_0x3abad4(0x14c)](setProfileOverride,process[_0x3abad4(0x1aa)](),_0x4f23cc,_0x89db01[_0x3abad4(0x15e)],_0x498cf4),setProfileOverride(process[_0x3abad4(0x1aa)](),_0x4f23cc,_0x89db01[_0x3abad4(0x15a)],!![]);}catch(_0x1b8d55){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x1b8d55 instanceof Error?_0x1b8d55[_0x3abad4(0x1b8)]:String(_0x1b8d55)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x4f23cc+'\x27\x20created\x20(CDP).'),await _0x89db01[_0x3abad4(0x13a)](sweepOrphansBestEffort,_0x4f23cc),await markActive(_0x4f23cc);return;}if(_0x538e0e['skipAuth']){const _0x464a8f={};_0x538e0e['url']&&(_0x464a8f['baseUrl']=_0x538e0e[_0x3abad4(0x169)]);Object[_0x3abad4(0x183)](_0x2a2c07)['length']>0x0&&(_0x464a8f['setupHeaders']=_0x2a2c07);await _0x89db01[_0x3abad4(0x14b)](createUnconfiguredCloudProfile,_0x4f23cc,_0x464a8f),console['log'](_0x3abad4(0x1ad)+_0x4f23cc+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4f23cc+_0x3abad4(0x1b7))),await sweepOrphansBestEffort(_0x4f23cc),await markActive(_0x4f23cc);return;}if(_0x538e0e['url']){const _0x581d51=_0x538e0e[_0x3abad4(0x169)],_0x46f2bd=await checkUrlReachability(_0x581d51);if(!_0x46f2bd['ok']&&!_0x538e0e[_0x3abad4(0x171)])throw new Error(_0x3abad4(0x1a9)+_0x581d51+':\x20'+_0x46f2bd[_0x3abad4(0x14f)]+_0x3abad4(0x154));!_0x46f2bd['ok']&&_0x538e0e['force']&&console[_0x3abad4(0x142)](_0x3abad4(0x147)+_0x581d51+':\x20'+_0x46f2bd['error']+_0x3abad4(0x17d));}else{console[_0x3abad4(0x142)](_0x89db01[_0x3abad4(0x13f)]),console['log'](_0x3abad4(0x16a)),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x342e79='',_0x5158f8=![];while(!![]){const _0xc356fd=await _0x1cf43e[_0x3abad4(0x1b9)]([{'type':'input','name':_0x89db01['zhDxy'],'message':_0x5158f8?_0x3abad4(0x1b5):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x342e79||_0x3abad4(0x167)}]);_0x342e79=_0xc356fd[_0x3abad4(0x190)];const _0x5d710d=await _0x89db01['IAlxH'](checkUrlReachability,_0x342e79);if(_0x5d710d['ok'])break;const _0x4838dc=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x342e79),_0x5cd937=_0x5d710d['isProtocolError']&&!_0x4838dc,_0xeb78ee=_0x5cd937?_0x3abad4(0x18c)+_0x342e79:null;_0x5158f8=!![],console['log'](_0x3abad4(0x1bd)+_0x342e79+':\x20'+_0x5d710d[_0x3abad4(0x14f)]);_0xeb78ee&&console['log'](_0x3abad4(0x16b)+_0xeb78ee+'?');const {action:_0x31017a}=await _0x1cf43e[_0x3abad4(0x1b9)]([{'type':_0x89db01['OVssg'],'name':_0x89db01['WUTyf'],'message':_0x89db01['PUakl'],'choices':[..._0xeb78ee?[{'name':'Use\x20'+_0xeb78ee,'value':_0x89db01[_0x3abad4(0x140)]}]:[],{'name':_0x89db01[_0x3abad4(0x15b)],'value':_0x3abad4(0x16f)},{'name':_0x89db01[_0x3abad4(0x156)],'value':_0x3abad4(0x17a)}]}]);if(_0x89db01[_0x3abad4(0x178)](_0x31017a,_0x3abad4(0x197))&&_0xeb78ee){_0x342e79=_0xeb78ee;const _0x9142b2=await _0x89db01[_0x3abad4(0x191)](checkUrlReachability,_0x342e79);if(_0x9142b2['ok'])break;console['log'](_0x3abad4(0x1bb)+_0x342e79+':\x20'+_0x9142b2['error']);}else{if(_0x31017a===_0x3abad4(0x17a))break;}}_0x538e0e={..._0x538e0e,'url':_0x342e79};}let _0x254b2b=![];try{_0x254b2b=await _0x89db01['nEhoh'](tryAutoRouteCloudProfile,_0x4f23cc,_0x538e0e[_0x3abad4(0x169)],_0x538e0e,_0xd497c,_0x2bfc80);}catch(_0x4d9a21){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4f23cc+'\x22:\x20'+(_0x89db01['hWkZH'](_0x4d9a21,Error)?_0x4d9a21['message']:String(_0x4d9a21))),process['exit'](0x1);}!_0x254b2b&&process['exit'](0x1),await markActive(_0x4f23cc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x452f(_0x5825d3,_0x589eb8){_0x5825d3=_0x5825d3-0x138;var _0x3b9bd8=_0x3b9b();var _0x452f09=_0x3b9bd8[_0x5825d3];return _0x452f09;}function _0x3b9b(){var _0x379408=['QHhiI','\x20\x20https://docs.ranger.net/main/concepts/profiles','error','1063104TADvJQ','yLxnq','1194660wxdlTj','10186EQXQoz','ITzUH','3832240mSKaFo','76ZEFUXd','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','1577720lBgJGO','exit','cAQdt','38iXIZne','7GENLSi','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','6705DMKzVM','3573960qPETji'];_0x3b9b=function(){return _0x379408;};return _0x3b9b();}(function(_0x1bda92,_0x7d2404){var _0x406ca4=_0x452f,_0x2896b2=_0x1bda92();while(!![]){try{var _0x5b64a6=parseInt(_0x406ca4(0x13a))/0x1*(-parseInt(_0x406ca4(0x145))/0x2)+parseInt(_0x406ca4(0x13d))/0x3*(-parseInt(_0x406ca4(0x148))/0x4)+-parseInt(_0x406ca4(0x14a))/0x5+-parseInt(_0x406ca4(0x142))/0x6+-parseInt(_0x406ca4(0x13b))/0x7*(-parseInt(_0x406ca4(0x147))/0x8)+parseInt(_0x406ca4(0x144))/0x9+parseInt(_0x406ca4(0x13e))/0xa;if(_0x5b64a6===_0x7d2404)break;else _0x2896b2['push'](_0x2896b2['shift']());}catch(_0xf561de){_0x2896b2['push'](_0x2896b2['shift']());}}}(_0x3b9b,0x3ab37));export async function authEncrypt(_0x1e56cd){var _0x53afa5=_0x452f,_0x4b6510={'cAQdt':function(_0x1c751d,_0x439085){return _0x1c751d+_0x439085;},'QHhiI':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','tYZQq':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','yLxnq':_0x53afa5(0x13c),'vlgZH':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','ITzUH':_0x53afa5(0x140)};console[_0x53afa5(0x141)](_0x4b6510['cAQdt'](_0x4b6510['cAQdt'](_0x4b6510[_0x53afa5(0x139)](_0x4b6510[_0x53afa5(0x13f)],_0x53afa5(0x149)),'\x0a'),_0x4b6510['tYZQq'])+_0x4b6510[_0x53afa5(0x143)]+'\x0a'+_0x4b6510['vlgZH']+_0x4b6510[_0x53afa5(0x146)]),process[_0x53afa5(0x138)](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16243c=_0x553d;(function(_0x723264,_0x2fae8f){const _0x17ddcb=_0x553d,_0x52babc=_0x723264();while(!![]){try{const _0x4ec83b=-parseInt(_0x17ddcb(0x1f4))/0x1*(parseInt(_0x17ddcb(0x1fb))/0x2)+-parseInt(_0x17ddcb(0x1e4))/0x3*(parseInt(_0x17ddcb(0x208))/0x4)+parseInt(_0x17ddcb(0x20d))/0x5*(parseInt(_0x17ddcb(0x1f7))/0x6)+-parseInt(_0x17ddcb(0x209))/0x7+parseInt(_0x17ddcb(0x205))/0x8+-parseInt(_0x17ddcb(0x1f5))/0x9+parseInt(_0x17ddcb(0x20b))/0xa*(parseInt(_0x17ddcb(0x1ec))/0xb);if(_0x4ec83b===_0x2fae8f)break;else _0x52babc['push'](_0x52babc['shift']());}catch(_0x43aceb){_0x52babc['push'](_0x52babc['shift']());}}}(_0x5acb,0x49ba3));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x553d(_0x1bec0c,_0x26a7fc){_0x1bec0c=_0x1bec0c-0x1e1;const _0x5acb21=_0x5acb();let _0x553d6d=_0x5acb21[_0x1bec0c];return _0x553d6d;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x5acb(){const _0x1e5f16=['log','49330rpvPjP','819828meHMKb','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','164046WvuvUP','ehbEf','--scope','PFKee','22Qaqzfs','XEgLK','ranger','xMiwG','Nothing\x20to\x20clean\x20up.\x0a','uninstall','rcuXT','qoUXH','replace','Abfyl','1733800RZSPXt','win32','error','8TTijXs','2245957olMWfy','kzstw','20CUHdZQ','Qfnxi','15ENOmAq','user','length','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOfyJ','GUcYx','UbPZj','nlECJ','close','ignore','mClfx','✓\x20Removed\x20project\x20skill:\x20','plugin','MELgN','fFbsT','816537qglzXo','HYMYf','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WADJn','claude','✓\x20Removed\x20.ranger/\x20directory','OaJSP','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','8261935CdkzZf','push','zJJBL','stringify','IjBvc','KFNUH','EfbEY'];_0x5acb=function(){return _0x1e5f16;};return _0x5acb();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x16243c(0x1fd),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3ab0f3){const _0x5757d0=_0x16243c,_0x51dfdc=_0x3ab0f3[_0x5757d0(0x203)](/\/\*[\s\S]*?\*\//g,''),_0x9864b1=_0x51dfdc['replace'](/^\s*\/\/.*$/gm,''),_0x3373a0=_0x9864b1[_0x5757d0(0x203)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x3373a0);}async function removeOpencodePluginConfig(_0x4aa928){const _0x223218=_0x16243c,_0x562e6c={'kYUlk':function(_0x157cbe,_0xbdceb1){return _0x157cbe!==_0xbdceb1;},'EfbEY':function(_0x429b67,_0x55c236){return _0x429b67(_0x55c236);},'xDrFu':function(_0x4f0c9f,_0x53531b){return _0x4f0c9f===_0x53531b;},'Abfyl':function(_0x24d83b,_0x3d2804,_0x53abc4){return _0x24d83b(_0x3d2804,_0x53abc4);},'IjBvc':function(_0x14b8b2,_0x2b8ff1){return _0x14b8b2+_0x2b8ff1;}};if(!_0x562e6c[_0x223218(0x1f2)](existsSync,_0x4aa928))return![];let _0x26a9c0;try{const _0xf9bb88=await readFile(_0x4aa928,'utf-8');_0x26a9c0=parseJsonc(_0xf9bb88);}catch{return![];}const _0x1c535b=Array['isArray'](_0x26a9c0[_0x223218(0x1e1)])?_0x26a9c0[_0x223218(0x1e1)]:[];if(_0x562e6c['xDrFu'](_0x1c535b[_0x223218(0x20f)],0x0))return![];const _0x5ecdc9=_0x1c535b['filter'](_0x43eb34=>{if(typeof _0x43eb34!=='string')return!![];return _0x562e6c['kYUlk'](_0x43eb34,opencodePluginName);});if(_0x562e6c['xDrFu'](_0x5ecdc9['length'],_0x1c535b['length']))return![];return _0x562e6c['xDrFu'](_0x5ecdc9[_0x223218(0x20f)],0x0)?delete _0x26a9c0['plugin']:_0x26a9c0[_0x223218(0x1e1)]=_0x5ecdc9,await _0x562e6c[_0x223218(0x204)](writeFile,_0x4aa928,_0x562e6c[_0x223218(0x1f0)](JSON[_0x223218(0x1ef)](_0x26a9c0,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3c58b1){const _0x405917=_0x16243c,_0x2e0e66={'GUcYx':'plugin','fFbsT':_0x405917(0x200),'kzstw':'ranger@trailhead','incEC':_0x405917(0x1e8),'ixcFS':_0x405917(0x216),'CFzYQ':function(_0x231655){return _0x231655();},'HYMYf':_0x405917(0x206),'knERL':_0x405917(0x215)};return new Promise(_0x43d0e3=>{const _0x5cd32c=_0x405917,_0x3c0620=[_0x2e0e66[_0x5cd32c(0x212)],_0x2e0e66[_0x5cd32c(0x1e3)],_0x2e0e66[_0x5cd32c(0x20a)]];_0x3c58b1&&_0x3c0620[_0x5cd32c(0x1ed)](_0x5cd32c(0x1f9),_0x3c58b1);const _0x1ea966=spawn(_0x2e0e66['incEC'],_0x3c0620,{'stdio':[_0x2e0e66['ixcFS'],_0x2e0e66['ixcFS'],_0x5cd32c(0x216)],'cwd':_0x3c58b1?_0x2e0e66['CFzYQ'](getProjectRoot):undefined,'shell':process['platform']===_0x2e0e66[_0x5cd32c(0x1e5)]});_0x1ea966['on'](_0x2e0e66['knERL'],_0x3bce51=>{_0x43d0e3(_0x3bce51===0x0);}),_0x1ea966['on'](_0x5cd32c(0x207),()=>{_0x43d0e3(![]);});});}async function removeMarketplace(){const _0x58896a={'OaJSP':function(_0x4dbb1b,_0x50cf6e){return _0x4dbb1b===_0x50cf6e;},'GLLvd':'claude','MELgN':'marketplace','yvbLs':'remove','KFNUH':'trailhead','hpEnt':'ignore','nlECJ':'close'};return new Promise(_0x585dbd=>{const _0x2b95fa=_0x553d,_0x32e271=spawn(_0x58896a['GLLvd'],['plugin',_0x58896a[_0x2b95fa(0x1e2)],_0x58896a['yvbLs'],_0x58896a[_0x2b95fa(0x1f1)]],{'stdio':['ignore',_0x2b95fa(0x216),_0x58896a['hpEnt']],'shell':_0x58896a['OaJSP'](process['platform'],_0x2b95fa(0x206))});_0x32e271['on'](_0x58896a[_0x2b95fa(0x214)],_0x211fd3=>{const _0x3d537b=_0x2b95fa;_0x585dbd(_0x58896a[_0x3d537b(0x1ea)](_0x211fd3,0x0));}),_0x32e271['on'](_0x2b95fa(0x207),()=>{_0x585dbd(![]);});});}export async function clean(){const _0x4c0c56=_0x16243c,_0x1ea0d8={'jUUeI':_0x4c0c56(0x1e6),'zJJBL':function(_0x51ff13){return _0x51ff13();},'Qfnxi':function(_0x1cb9e2){return _0x1cb9e2();},'ehbEf':function(_0xcdcaca,_0x37a0fe){return _0xcdcaca(_0x37a0fe);},'TOfyJ':function(_0x307f57,_0x33fa13,_0x40e84e){return _0x307f57(_0x33fa13,_0x40e84e);},'UbPZj':_0x4c0c56(0x1e9),'WADJn':function(_0x38766a,_0x4317d7,_0x24ad94){return _0x38766a(_0x4317d7,_0x24ad94);},'rcuXT':'project','tbVRC':_0x4c0c56(0x20e),'qoUXH':function(_0x4c4466,_0x600434){return _0x4c4466(_0x600434);},'QoJcD':function(_0x1d36a0,_0x430cfc,_0x44ee12){return _0x1d36a0(_0x430cfc,_0x44ee12);},'XEgLK':function(_0x3241c5,_0x3c15cb){return _0x3241c5(_0x3c15cb);},'PFKee':_0x4c0c56(0x210),'xMiwG':'opencode.json','Srjhu':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','mClfx':_0x4c0c56(0x1f6),'FyXzF':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x4c0c56(0x1f3)](_0x1ea0d8['jUUeI']);let _0x2a963f=![];try{await deleteAllCredentials(),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x2a963f=!![];}catch{}const _0x151139=_0x1ea0d8[_0x4c0c56(0x1ee)](getCacheFile);existsSync(_0x151139)&&(await rm(_0x151139),_0x2a963f=!![]);const _0x1a5b13=_0x1ea0d8[_0x4c0c56(0x20c)](getRangerDir);_0x1ea0d8[_0x4c0c56(0x1f8)](existsSync,_0x1a5b13)&&(await _0x1ea0d8['TOfyJ'](rm,_0x1a5b13,{'recursive':!![]}),console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x213)]),_0x2a963f=!![]);const _0x155707=getProjectSkillsDir();for(const _0x5107f1 of skillsToRemove){const _0x36eb61=join(_0x155707,_0x5107f1);existsSync(_0x36eb61)&&(await _0x1ea0d8[_0x4c0c56(0x1e7)](rm,_0x36eb61,{'recursive':!![]}),console['log'](_0x4c0c56(0x218)+_0x5107f1),_0x2a963f=!![]);}const _0x1a5d3c=_0x1ea0d8[_0x4c0c56(0x1ee)](getUserSkillsDir);for(const _0x5ae4e1 of skillsToRemove){const _0x1385d1=_0x1ea0d8['TOfyJ'](join,_0x1a5d3c,_0x5ae4e1);existsSync(_0x1385d1)&&(await rm(_0x1385d1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5ae4e1),_0x2a963f=!![]);}const _0x1d2d66=getOpencodeSkillsDir(_0x1ea0d8[_0x4c0c56(0x201)]);for(const _0x14ca82 of skillsToRemove){const _0x249432=_0x1ea0d8['TOfyJ'](join,_0x1d2d66,_0x14ca82);existsSync(_0x249432)&&(await rm(_0x249432,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x14ca82),_0x2a963f=!![]);}const _0x334fd0=getOpencodeSkillsDir(_0x1ea0d8['tbVRC']);for(const _0x1134f0 of skillsToRemove){const _0x2e537d=join(_0x334fd0,_0x1134f0);_0x1ea0d8[_0x4c0c56(0x202)](existsSync,_0x2e537d)&&(await _0x1ea0d8['QoJcD'](rm,_0x2e537d,{'recursive':!![]}),console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x1134f0),_0x2a963f=!![]);}const _0x2b2b5f=join(_0x1ea0d8[_0x4c0c56(0x1fc)](getOpencodeConfigDir,_0x1ea0d8['rcuXT']),'opencode.json');await _0x1ea0d8[_0x4c0c56(0x1f8)](removeOpencodePluginConfig,_0x2b2b5f)&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x1fa)]),_0x2a963f=!![]);const _0x597674=_0x1ea0d8[_0x4c0c56(0x211)](join,_0x1ea0d8['XEgLK'](getOpencodeConfigDir,_0x4c0c56(0x20e)),_0x1ea0d8[_0x4c0c56(0x1fe)]);await _0x1ea0d8['ehbEf'](removeOpencodePluginConfig,_0x597674)&&(console['log'](_0x1ea0d8['Srjhu']),_0x2a963f=!![]);const _0x47565b=await uninstallClaudePlugin();_0x47565b&&(console[_0x4c0c56(0x1f3)](_0x4c0c56(0x1eb)),_0x2a963f=!![]);const _0x301614=await uninstallClaudePlugin(_0x1ea0d8['rcuXT']);_0x301614&&(console[_0x4c0c56(0x1f3)](_0x1ea0d8[_0x4c0c56(0x217)]),_0x2a963f=!![]);const _0x1c004c=await _0x1ea0d8['zJJBL'](removeMarketplace);_0x1c004c&&(console[_0x4c0c56(0x1f3)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x2a963f=!![]),_0x2a963f?console['log'](_0x1ea0d8['FyXzF']):console['log'](_0x4c0c56(0x1ff));}
|
|
1
|
+
const _0x31fb83=_0x1788;(function(_0x3ee91b,_0x2ffa9c){const _0x1c2cfa=_0x1788,_0x210638=_0x3ee91b();while(!![]){try{const _0x14dc4a=-parseInt(_0x1c2cfa(0x17a))/0x1*(parseInt(_0x1c2cfa(0x187))/0x2)+parseInt(_0x1c2cfa(0x17d))/0x3*(-parseInt(_0x1c2cfa(0x177))/0x4)+-parseInt(_0x1c2cfa(0x16b))/0x5+parseInt(_0x1c2cfa(0x18a))/0x6+-parseInt(_0x1c2cfa(0x190))/0x7*(-parseInt(_0x1c2cfa(0x198))/0x8)+-parseInt(_0x1c2cfa(0x170))/0x9+parseInt(_0x1c2cfa(0x179))/0xa;if(_0x14dc4a===_0x2ffa9c)break;else _0x210638['push'](_0x210638['shift']());}catch(_0x18d72c){_0x210638['push'](_0x210638['shift']());}}}(_0xf24c,0xb481a));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0xf24c(){const _0x4ae201=['✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','error','tWaGP','log','xCEPt','plugin','LYCYs','push','442960zFqWhm','UrByj','FcZeL','LVBKL','marketplace','8107056UoZwcl','isArray','parse','yMeUs','e2e-test-recommender','utf-8','pvGaV','68mwIEuL','ignore','31561920vftbCP','4cagTEi','HwurT','replace','224907mfEmuM','FoqVm','✓\x20Removed\x20stored\x20credentials','close','\x0a✅\x20Cleanup\x20complete!\x0a','sQGBc','umhqF','NvRbJ','YRCcL','✓\x20Removed\x20trailhead\x20marketplace','383522qpKYBW','QvCTY','opencode.json','1867464ZiGGOl','GoFJQ','NbVWr','pbjGo','length','gCqpC','7LJehKl','ranger','KxYqB','remove','RILlR','zsDsl','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','sosTR','2422488qdiqtm','bug-bash','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','platform','--scope','trailhead'];_0xf24c=function(){return _0x4ae201;};return _0xf24c();}function _0x1788(_0x17a92c,_0x4a8f42){_0x17a92c=_0x17a92c-0x168;const _0xf24c76=_0xf24c();let _0x178875=_0xf24c76[_0x17a92c];return _0x178875;}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x31fb83(0x191),'feature-tracker',_0x31fb83(0x199),_0x31fb83(0x174)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1dee25){const _0x179ebc=_0x31fb83,_0x555065=_0x1dee25[_0x179ebc(0x17c)](/\/\*[\s\S]*?\*\//g,''),_0x3b3cb3=_0x555065['replace'](/^\s*\/\/.*$/gm,''),_0x57f09f=_0x3b3cb3[_0x179ebc(0x17c)](/,\s*([}\]])/g,'$1');return JSON[_0x179ebc(0x172)](_0x57f09f);}async function removeOpencodePluginConfig(_0x2e0332){const _0x1b365a=_0x31fb83,_0x22e976={'tWaGP':function(_0x399647,_0x297585){return _0x399647(_0x297585);},'UrByj':function(_0x26cc29,_0x2324f8,_0x471ffd){return _0x26cc29(_0x2324f8,_0x471ffd);},'LYCYs':function(_0x2abc11,_0x24ba24){return _0x2abc11===_0x24ba24;},'NcgnU':function(_0x35805f,_0x3801d6){return _0x35805f+_0x3801d6;}};if(!_0x22e976['tWaGP'](existsSync,_0x2e0332))return![];let _0x484653;try{const _0x153199=await _0x22e976[_0x1b365a(0x16c)](readFile,_0x2e0332,_0x1b365a(0x175));_0x484653=_0x22e976[_0x1b365a(0x1a0)](parseJsonc,_0x153199);}catch{return![];}const _0x2eea6f=Array[_0x1b365a(0x171)](_0x484653[_0x1b365a(0x168)])?_0x484653['plugin']:[];if(_0x2eea6f[_0x1b365a(0x18e)]===0x0)return![];const _0x3d0ff5=_0x2eea6f['filter'](_0x2ea65a=>{if(typeof _0x2ea65a!=='string')return!![];return _0x2ea65a!==opencodePluginName;});if(_0x3d0ff5['length']===_0x2eea6f[_0x1b365a(0x18e)])return![];return _0x22e976[_0x1b365a(0x169)](_0x3d0ff5[_0x1b365a(0x18e)],0x0)?delete _0x484653[_0x1b365a(0x168)]:_0x484653[_0x1b365a(0x168)]=_0x3d0ff5,await writeFile(_0x2e0332,_0x22e976['NcgnU'](JSON['stringify'](_0x484653,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x4d5f81){const _0x41a24c=_0x31fb83,_0x507e04={'KxYqB':function(_0x275c74,_0x8efc42){return _0x275c74(_0x8efc42);},'HwurT':function(_0x79bf90,_0x50017b){return _0x79bf90(_0x50017b);},'BsJdz':function(_0x4d983a,_0x4478ca){return _0x4d983a===_0x4478ca;},'hUlUy':_0x41a24c(0x19c),'Ubmjz':function(_0x45f36b,_0x339c93,_0xbb790d,_0x21e785){return _0x45f36b(_0x339c93,_0xbb790d,_0x21e785);},'PoXQC':'claude','NbVWr':_0x41a24c(0x178),'FoqVm':function(_0x2ee339,_0x3543bd){return _0x2ee339===_0x3543bd;},'lbkAi':_0x41a24c(0x19f)};return new Promise(_0x3719c3=>{const _0xf9a68b=_0x41a24c,_0x156514={'sosTR':function(_0x9e750c,_0x566ebf){const _0x19495f=_0x1788;return _0x507e04[_0x19495f(0x17b)](_0x9e750c,_0x566ebf);},'xCEPt':function(_0x4a5f8f,_0x1cbc44){return _0x507e04['BsJdz'](_0x4a5f8f,_0x1cbc44);}},_0x5c6b62=['plugin','uninstall','ranger@trailhead'];_0x4d5f81&&_0x5c6b62[_0xf9a68b(0x16a)](_0x507e04['hUlUy'],_0x4d5f81);const _0x3d831b=_0x507e04['Ubmjz'](spawn,_0x507e04['PoXQC'],_0x5c6b62,{'stdio':[_0x507e04[_0xf9a68b(0x18c)],_0x507e04['NbVWr'],_0x507e04[_0xf9a68b(0x18c)]],'cwd':_0x4d5f81?getProjectRoot():undefined,'shell':_0x507e04[_0xf9a68b(0x17e)](process[_0xf9a68b(0x19b)],'win32')});_0x3d831b['on'](_0xf9a68b(0x180),_0x3eb142=>{const _0x3ce086=_0xf9a68b;_0x156514[_0x3ce086(0x197)](_0x3719c3,_0x156514[_0x3ce086(0x1a2)](_0x3eb142,0x0));}),_0x3d831b['on'](_0x507e04['lbkAi'],()=>{const _0x3d88ee=_0xf9a68b;_0x507e04[_0x3d88ee(0x192)](_0x3719c3,![]);});});}async function removeMarketplace(){const _0x1b5ebc=_0x31fb83,_0xf07077={'GoFJQ':function(_0x3043b1,_0x3ce83b){return _0x3043b1===_0x3ce83b;},'HonKg':function(_0x69db50,_0x3fd90c,_0xb26332,_0x4160f7){return _0x69db50(_0x3fd90c,_0xb26332,_0x4160f7);},'yOEeP':'claude','zsDsl':_0x1b5ebc(0x168),'FcZeL':_0x1b5ebc(0x16f),'CXgfZ':_0x1b5ebc(0x19d),'aQkNZ':_0x1b5ebc(0x178),'mDvKQ':'win32'};return new Promise(_0x970d1a=>{const _0x1cc430=_0x1b5ebc,_0x4d4b52={'sQGBc':function(_0x447df9,_0x1d71b9){const _0x4923b0=_0x1788;return _0xf07077[_0x4923b0(0x18b)](_0x447df9,_0x1d71b9);},'ZknyF':function(_0x54c7dc,_0xa7b8a7){return _0x54c7dc(_0xa7b8a7);}},_0x25dac6=_0xf07077['HonKg'](spawn,_0xf07077['yOEeP'],[_0xf07077[_0x1cc430(0x195)],_0xf07077[_0x1cc430(0x16d)],_0x1cc430(0x193),_0xf07077['CXgfZ']],{'stdio':['ignore',_0xf07077['aQkNZ'],_0xf07077['aQkNZ']],'shell':process['platform']===_0xf07077['mDvKQ']});_0x25dac6['on']('close',_0xf9c9d7=>{const _0x145567=_0x1cc430;_0x970d1a(_0x4d4b52[_0x145567(0x182)](_0xf9c9d7,0x0));}),_0x25dac6['on'](_0x1cc430(0x19f),()=>{_0x4d4b52['ZknyF'](_0x970d1a,![]);});});}export async function clean(){const _0x196589=_0x31fb83,_0x5d17c3={'CfKzD':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PjLnQ':function(_0x19b5e2){return _0x19b5e2();},'Zhwnm':function(_0x454e8c){return _0x454e8c();},'LVBKL':function(_0x3cc402,_0x1f49fd){return _0x3cc402(_0x1f49fd);},'RILlR':function(_0x456af3){return _0x456af3();},'OIrph':function(_0x115ea5,_0x1dcb18){return _0x115ea5(_0x1dcb18);},'pbjGo':function(_0x498e93,_0x5c1193,_0x4399f0){return _0x498e93(_0x5c1193,_0x4399f0);},'YRCcL':function(_0x82c79){return _0x82c79();},'QvCTY':function(_0x54130e,_0x4847ea){return _0x54130e(_0x4847ea);},'yMeUs':'project','AHwWk':function(_0x5029fb,_0x1837cd,_0x1af90f){return _0x5029fb(_0x1837cd,_0x1af90f);},'NvRbJ':'user','umhqF':function(_0x50d52e,_0x401356){return _0x50d52e(_0x401356);},'sXkuG':function(_0x38dd21,_0xeff3b3,_0x531310){return _0x38dd21(_0xeff3b3,_0x531310);},'pvGaV':_0x196589(0x189),'fmjvo':function(_0x4c860c,_0x1cde1a,_0x39429e){return _0x4c860c(_0x1cde1a,_0x39429e);},'gCqpC':function(_0x7f33e,_0x12537b){return _0x7f33e(_0x12537b);},'GBCaF':_0x196589(0x19a),'DftHK':function(_0x44185e){return _0x44185e();}};console[_0x196589(0x1a1)](_0x5d17c3['CfKzD']);let _0x1751ca=![];try{await _0x5d17c3['PjLnQ'](deleteAllCredentials),console[_0x196589(0x1a1)](_0x196589(0x17f)),_0x1751ca=!![];}catch{}const _0x304e52=_0x5d17c3['Zhwnm'](getCacheFile);existsSync(_0x304e52)&&(await _0x5d17c3[_0x196589(0x16e)](rm,_0x304e52),_0x1751ca=!![]);const _0xbb24ae=_0x5d17c3[_0x196589(0x194)](getRangerDir);existsSync(_0xbb24ae)&&(await rm(_0xbb24ae,{'recursive':!![]}),console[_0x196589(0x1a1)]('✓\x20Removed\x20.ranger/\x20directory'),_0x1751ca=!![]);const _0x3796ab=_0x5d17c3['PjLnQ'](getProjectSkillsDir);for(const _0x1048c1 of skillsToRemove){const _0x58f801=join(_0x3796ab,_0x1048c1);_0x5d17c3['OIrph'](existsSync,_0x58f801)&&(await _0x5d17c3[_0x196589(0x18d)](rm,_0x58f801,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x1048c1),_0x1751ca=!![]);}const _0x519996=_0x5d17c3[_0x196589(0x185)](getUserSkillsDir);for(const _0x2f7200 of skillsToRemove){const _0x1b4779=_0x5d17c3[_0x196589(0x18d)](join,_0x519996,_0x2f7200);existsSync(_0x1b4779)&&(await rm(_0x1b4779,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x2f7200),_0x1751ca=!![]);}const _0x552191=_0x5d17c3[_0x196589(0x188)](getOpencodeSkillsDir,_0x5d17c3[_0x196589(0x173)]);for(const _0x4ce4d6 of skillsToRemove){const _0xf979df=_0x5d17c3['AHwWk'](join,_0x552191,_0x4ce4d6);_0x5d17c3['QvCTY'](existsSync,_0xf979df)&&(await rm(_0xf979df,{'recursive':!![]}),console[_0x196589(0x1a1)](_0x196589(0x196)+_0x4ce4d6),_0x1751ca=!![]);}const _0x2585ab=getOpencodeSkillsDir(_0x5d17c3[_0x196589(0x184)]);for(const _0x5cbf45 of skillsToRemove){const _0x1ef69f=join(_0x2585ab,_0x5cbf45);_0x5d17c3[_0x196589(0x183)](existsSync,_0x1ef69f)&&(await _0x5d17c3['sXkuG'](rm,_0x1ef69f,{'recursive':!![]}),console['log'](_0x196589(0x19e)+_0x5cbf45),_0x1751ca=!![]);}const _0x514ef4=_0x5d17c3[_0x196589(0x18d)](join,getOpencodeConfigDir('project'),_0x5d17c3[_0x196589(0x176)]);await removeOpencodePluginConfig(_0x514ef4)&&(console[_0x196589(0x1a1)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x1751ca=!![]);const _0x5c88d6=_0x5d17c3['fmjvo'](join,_0x5d17c3[_0x196589(0x18f)](getOpencodeConfigDir,_0x5d17c3['NvRbJ']),_0x5d17c3[_0x196589(0x176)]);await removeOpencodePluginConfig(_0x5c88d6)&&(console[_0x196589(0x1a1)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x1751ca=!![]);const _0x188abe=await uninstallClaudePlugin();_0x188abe&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x1751ca=!![]);const _0x71a083=await _0x5d17c3['OIrph'](uninstallClaudePlugin,_0x5d17c3[_0x196589(0x173)]);_0x71a083&&(console['log'](_0x5d17c3['GBCaF']),_0x1751ca=!![]);const _0x523d7b=await _0x5d17c3['DftHK'](removeMarketplace);_0x523d7b&&(console[_0x196589(0x1a1)](_0x196589(0x186)),_0x1751ca=!![]),_0x1751ca?console['log'](_0x196589(0x181)):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x453696=_0x2b20;(function(_0x5f00cc,_0x53835e){const _0x55fde6=_0x2b20,_0x16377e=_0x5f00cc();while(!![]){try{const _0x490d57=-parseInt(_0x55fde6(0xf0))/0x1+-parseInt(_0x55fde6(0xf8))/0x2+parseInt(_0x55fde6(0xfe))/0x3+-parseInt(_0x55fde6(0x103))/0x4*(parseInt(_0x55fde6(0xec))/0x5)+parseInt(_0x55fde6(0x101))/0x6*(-parseInt(_0x55fde6(0xee))/0x7)+-parseInt(_0x55fde6(0xf1))/0x8+parseInt(_0x55fde6(0xe0))/0x9;if(_0x490d57===_0x53835e)break;else _0x16377e['push'](_0x16377e['shift']());}catch(_0x1b485c){_0x16377e['push'](_0x16377e['shift']());}}}(_0x547e,0x58faa));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=[_0x453696(0x104),'allowInsecureLocalhost',_0x453696(0x109)];function parseLocalValue(_0x1620cb,_0x31d85b){const _0x75e49c=_0x453696,_0x2993df={'pgZTD':function(_0x5df8ab,_0x488c5f){return _0x5df8ab===_0x488c5f;},'xVASb':_0x75e49c(0xdb)};if(BOOLEAN_KEYS[_0x75e49c(0x105)](_0x1620cb)){if(_0x31d85b===_0x75e49c(0x100))return!![];if(_0x2993df['pgZTD'](_0x31d85b,_0x2993df[_0x75e49c(0xf6)]))return![];throw new Error(_0x75e49c(0xe7)+_0x1620cb+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x31d85b;}function parseOverrideValue(_0x50df2a){const _0x28f0e0=_0x453696,_0x526c79={'GWpdU':'true','CQxsa':function(_0x36de15,_0x516f70){return _0x36de15===_0x516f70;},'hZHxO':_0x28f0e0(0xeb),'jRGzM':_0x28f0e0(0xdc),'RcLor':function(_0xf7441f,_0x39b3b5){return _0xf7441f(_0x39b3b5);}};if(_0x50df2a===_0x526c79['GWpdU'])return!![];if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x28f0e0(0xdb)))return![];if(_0x50df2a===_0x526c79['hZHxO'])return null;if(_0x526c79[_0x28f0e0(0xed)](_0x50df2a,_0x526c79['jRGzM']))return undefined;if(/^-?\d+$/['test'](_0x50df2a)){const _0x27546e=_0x526c79['RcLor'](Number,_0x50df2a);if(Number[_0x28f0e0(0xe5)](_0x27546e))return _0x27546e;}if(/^-?\d+\.\d+$/[_0x28f0e0(0xef)](_0x50df2a)){const _0x4d5a0e=Number(_0x50df2a);if(!Number[_0x28f0e0(0xf2)](_0x4d5a0e))return _0x4d5a0e;}const _0x187fd7=_0x50df2a['trim']();if(_0x187fd7[_0x28f0e0(0xe2)]('{')&&_0x187fd7[_0x28f0e0(0xdd)]('}')||_0x187fd7[_0x28f0e0(0xe2)]('[')&&_0x187fd7[_0x28f0e0(0xdd)](']'))try{return JSON['parse'](_0x187fd7);}catch{}return _0x50df2a;}function _0x547e(){const _0x5b97ab=['forceLogin','Key\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x20\x20Note:\x20\x22','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','kHwNY','false','undefined','endsWith','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','22267242VDDQlb','cloud','startsWith','keys','kind','isSafeInteger','No\x20configuration\x20set\x20for\x20\x22','Invalid\x20value\x20for\x20','MYrkn','Set\x20','FizTn','null','38435hpaCxw','CQxsa','2168957fodCpg','test','686572uIEARw','1711768LzlKEr','isNaN','Profile\x20\x22','object','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','xVASb','EGvsA','728166vXtnAs','KWOFA','fyayL','tvybt','Removed\x20','local','539064tMpFXh','\x20for\x20\x22','true','6qKjieW','zvtBx','372HNEFyC','headless','includes','oYPRy','log','NwIap'];_0x547e=function(){return _0x5b97ab;};return _0x547e();}function _0x2b20(_0x3d7217,_0x4dba72){_0x3d7217=_0x3d7217-0xd9;const _0x547e58=_0x547e();let _0x2b206f=_0x547e58[_0x3d7217];return _0x2b206f;}async function resolveProfileTarget(_0x54007a){const _0x2e89f9=_0x453696,_0x2637f5={'wvIGr':function(_0x441e27,_0x301e2d){return _0x441e27(_0x301e2d);},'oYPRy':_0x2e89f9(0xe1)},_0x379b6d=_0x2637f5['wvIGr'](existsSync,getEnvDir(_0x54007a));let _0x359d6e=![];try{const _0x2ecc8c=await fetchCloudProfile(_0x54007a);_0x359d6e=Boolean(_0x2ecc8c);}catch{}if(_0x359d6e)return{'kind':_0x2637f5[_0x2e89f9(0x106)],'alsoExistsElsewhere':_0x379b6d};if(_0x379b6d)return{'kind':_0x2e89f9(0xfd),'alsoExistsElsewhere':![]};throw new Error(_0x2e89f9(0xf3)+_0x54007a+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x54007a);}function printDualExistsHint(_0x3c4fdb){const _0x5551a4=_0x453696;console[_0x5551a4(0x107)](_0x5551a4(0x10c)+_0x3c4fdb+_0x5551a4(0x10b));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3137eb){const _0x302b65=_0x453696,_0x2558c4={'NwIap':function(_0x34573e,_0xcbecf1,_0x4547a8){return _0x34573e(_0xcbecf1,_0x4547a8);}},_0x29b9d6=await fetchCloudProfile(_0x3137eb),_0x25f2b8=readProfileOverrides(getProjectPath(),_0x3137eb);return _0x2558c4[_0x302b65(0x108)](mergeCloudProfileSettings,_0x29b9d6?.['settings']??{},_0x25f2b8??undefined);}export async function configSet(_0x179fc2,_0x3b02fa,_0x33fe51){const _0x23b418=_0x453696,_0x16c426={'fyayL':function(_0x55d1b0,_0x8b020d){return _0x55d1b0(_0x8b020d);},'tvybt':function(_0x1d2acf,_0x2a02e6){return _0x1d2acf===_0x2a02e6;},'VKaaQ':'cloud','bdSJc':function(_0x544c0a,_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3){return _0x544c0a(_0x4c7a81,_0x3c274b,_0x37f16b,_0x1dd9f3);}},_0x50654e=await _0x16c426[_0x23b418(0xfa)](resolveProfileTarget,_0x179fc2);if(_0x16c426[_0x23b418(0xfb)](_0x50654e['kind'],_0x16c426['VKaaQ'])){if(_0x50654e['alsoExistsElsewhere'])printDualExistsHint(_0x179fc2);const _0x425043=parseOverrideValue(_0x33fe51);setProfileOverride(getProjectPath(),_0x179fc2,_0x3b02fa,_0x425043),console['log']('Set\x20'+_0x3b02fa+'\x20=\x20'+JSON['stringify'](_0x425043)+'\x20for\x20\x22'+_0x179fc2+'\x22');return;}const _0x198115=parseLocalValue(_0x3b02fa,_0x33fe51);_0x16c426['bdSJc'](setProfileOverride,getProjectPath(),_0x179fc2,_0x3b02fa,_0x198115),console[_0x23b418(0x107)](_0x23b418(0xe9)+_0x3b02fa+'\x20=\x20'+_0x198115+_0x23b418(0xff)+_0x179fc2+'\x22');}export async function configGet(_0x34a007,_0x5eba12){const _0x504332=_0x453696,_0x2e0073={'EGvsA':function(_0x5ebc79,_0x5df230){return _0x5ebc79===_0x5df230;},'FizTn':function(_0x3b6c03,_0x2957e0){return _0x3b6c03===_0x2957e0;},'OFtrU':_0x504332(0xf4)},_0x1dac22=await resolveProfileTarget(_0x34a007);if(_0x1dac22['kind']===_0x504332(0xe1)){const _0x2d8f81=await loadEffectiveCloudSettings(_0x34a007),_0x3497e2=getNestedValue(_0x2d8f81,_0x5eba12);if(_0x2e0073[_0x504332(0xf7)](_0x3497e2,undefined))console[_0x504332(0x107)]('(not\x20set)');else typeof _0x3497e2===_0x504332(0xf4)?console[_0x504332(0x107)](JSON[_0x504332(0xde)](_0x3497e2,null,0x2)):console[_0x504332(0x107)](_0x3497e2);return;}const _0x4e9ef1=await loadSettings(_0x34a007),_0x1f51af=getNestedValue(_0x4e9ef1,_0x5eba12);if(_0x1f51af===undefined)console['log']('(not\x20set)');else _0x2e0073[_0x504332(0xea)](typeof _0x1f51af,_0x2e0073['OFtrU'])?console['log'](JSON['stringify'](_0x1f51af,null,0x2)):console[_0x504332(0x107)](_0x1f51af);}export async function configList(_0x4d413c){const _0x24cf8e=_0x453696,_0x2f0f8d={'yXpAz':function(_0x37b1fa,_0x5c176a){return _0x37b1fa(_0x5c176a);},'KWOFA':function(_0x3595cb,_0x4f5e4a){return _0x3595cb===_0x4f5e4a;},'Fnsfb':function(_0x51202f,_0x4d0e08){return _0x51202f(_0x4d0e08);},'zvtBx':function(_0x5a1efd,_0x33f461){return _0x5a1efd(_0x33f461);}},_0x2f7eba=await _0x2f0f8d['yXpAz'](resolveProfileTarget,_0x4d413c);if(_0x2f0f8d[_0x24cf8e(0xf9)](_0x2f7eba[_0x24cf8e(0xe4)],_0x24cf8e(0xe1))){const _0x23acbd=await loadEffectiveCloudSettings(_0x4d413c);if(!_0x23acbd||Object[_0x24cf8e(0xe3)](_0x23acbd)['length']===0x0){console['log'](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}console[_0x24cf8e(0x107)](JSON[_0x24cf8e(0xde)](_0x23acbd,null,0x2));return;}const _0x46902d=_0x2f0f8d['Fnsfb'](getSettingsPath,_0x4d413c);if(!existsSync(_0x46902d)){console[_0x24cf8e(0x107)](_0x24cf8e(0xe6)+_0x4d413c+'\x22');return;}const _0x193d25=await loadSettings(_0x4d413c),_0x4901c2=_0x2f0f8d[_0x24cf8e(0x102)](formatSettings,_0x193d25);!_0x4901c2?console[_0x24cf8e(0x107)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4d413c+'\x22'):console[_0x24cf8e(0x107)](_0x4901c2);}export async function configUnset(_0x4239b3,_0x196b4b){const _0x248b2d=_0x453696,_0x24cca9={'MYrkn':function(_0x42be8a,_0x1cd2ca){return _0x42be8a(_0x1cd2ca);},'eiLZL':function(_0x3c9c7c,_0xf112e9){return _0x3c9c7c===_0xf112e9;},'TNKJw':function(_0x1458ea,_0x34b0ff,_0x26de4a,_0x365acb){return _0x1458ea(_0x34b0ff,_0x26de4a,_0x365acb);},'BRZLA':function(_0x4e05ec,_0x589a30){return _0x4e05ec(_0x589a30);}},_0x212fc7=await _0x24cca9[_0x248b2d(0xe8)](resolveProfileTarget,_0x4239b3);if(_0x24cca9['eiLZL'](_0x212fc7[_0x248b2d(0xe4)],'cloud')){if(_0x212fc7['alsoExistsElsewhere'])printDualExistsHint(_0x4239b3);const _0x16d35b=unsetProfileOverride(getProjectPath(),_0x4239b3,_0x196b4b);_0x16d35b?console[_0x248b2d(0x107)](_0x248b2d(0xfc)+_0x196b4b+'\x20for\x20\x22'+_0x4239b3+'\x22'):console['log']('Key\x20\x22'+_0x196b4b+'\x22\x20not\x20found');return;}const _0x20a117=_0x24cca9['TNKJw'](unsetProfileOverride,getProjectPath(),_0x4239b3,_0x196b4b);if(_0x20a117){console['log'](_0x248b2d(0xfc)+_0x196b4b);return;}const _0x3590bf=await _0x24cca9['BRZLA'](loadSettings,_0x4239b3),_0x47f945=deleteNestedValue(_0x3590bf,_0x196b4b);_0x47f945?console['log']('Key\x20\x22'+_0x196b4b+_0x248b2d(0xd9)+_0x4239b3+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x248b2d(0x107)](_0x248b2d(0x10a)+_0x196b4b+'\x22\x20not\x20found');}export async function configReset(_0x297138){const _0x588dc3=_0x453696,_0x3b981f={'kHwNY':function(_0x23b70f,_0x71b6bb){return _0x23b70f(_0x71b6bb);},'BEBAU':'cloud'},_0x51785=await _0x3b981f[_0x588dc3(0xda)](resolveProfileTarget,_0x297138);if(_0x51785[_0x588dc3(0xe4)]===_0x3b981f['BEBAU']){resetProfileOverrides(getProjectPath(),_0x297138),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x297138+'\x22');return;}console[_0x588dc3(0x107)]('\x22'+_0x297138+_0x588dc3(0xdf)+_0x297138+_0x588dc3(0xf5));}
|
|
1
|
+
const _0x42cd63=_0x5890;(function(_0x34b2a1,_0x2152f8){const _0x45ae41=_0x5890,_0x4f6fbd=_0x34b2a1();while(!![]){try{const _0x18c39b=parseInt(_0x45ae41(0x1fd))/0x1*(-parseInt(_0x45ae41(0x1f9))/0x2)+-parseInt(_0x45ae41(0x21a))/0x3+-parseInt(_0x45ae41(0x215))/0x4+-parseInt(_0x45ae41(0x210))/0x5+parseInt(_0x45ae41(0x20d))/0x6+-parseInt(_0x45ae41(0x1f2))/0x7+parseInt(_0x45ae41(0x1fc))/0x8;if(_0x18c39b===_0x2152f8)break;else _0x4f6fbd['push'](_0x4f6fbd['shift']());}catch(_0x28da12){_0x4f6fbd['push'](_0x4f6fbd['shift']());}}}(_0x2a58,0x6a0d6));function _0x2a58(){const _0x29176a=['alsoExistsElsewhere','lIySK','SaPkz','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','tPJAP','tMuwf','BLfCH',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','160881eZvtHr','zAOht','isSafeInteger','KOYPz','aUjgc','ivvHi','\x20=\x20','16yQubUF','lgowX','JUdeO','13515104wIQrPZ','75833yjIYnT','endsWith','startsWith','OaiMr','QsxcA','false','true','settings','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','parse','sjIyU','keys','Dbqpv','isNaN','Set\x20','wHgxQ','4012722dJzPmR','ohckB','kind','2740755EPEeKi','cloud','test','qXwao','Removed\x20','2142960vhbKHq','headless','stringify','forceLogin','NgVol','630741nrlOPS','log','YpTCl','null','udZwR','(not\x20set)','ChQct','Key\x20\x22','undefined','object'];_0x2a58=function(){return _0x29176a;};return _0x2a58();}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=[_0x42cd63(0x216),'allowInsecureLocalhost',_0x42cd63(0x218)];function parseLocalValue(_0xfd9d3f,_0x5e0acb){const _0x3d41d5=_0x42cd63,_0x4737e9={'Dbqpv':function(_0x23387b,_0x293790){return _0x23387b===_0x293790;},'tMuwf':_0x3d41d5(0x203),'YpTCl':function(_0x504177,_0x1d81b9){return _0x504177===_0x1d81b9;}};if(BOOLEAN_KEYS['includes'](_0xfd9d3f)){if(_0x4737e9[_0x3d41d5(0x209)](_0x5e0acb,_0x4737e9[_0x3d41d5(0x1ef)]))return!![];if(_0x4737e9[_0x3d41d5(0x21c)](_0x5e0acb,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0xfd9d3f+_0x3d41d5(0x1f1));}return _0x5e0acb;}function parseOverrideValue(_0x29f0e5){const _0x114957=_0x42cd63,_0x52fbc9={'qXwao':function(_0x164107,_0x5743b0){return _0x164107===_0x5743b0;},'GvpFO':_0x114957(0x203),'vOreZ':_0x114957(0x21d),'KOYPz':function(_0xf13315,_0x5504de){return _0xf13315(_0x5504de);}};if(_0x52fbc9[_0x114957(0x213)](_0x29f0e5,_0x52fbc9['GvpFO']))return!![];if(_0x29f0e5===_0x114957(0x202))return![];if(_0x29f0e5===_0x52fbc9['vOreZ'])return null;if(_0x29f0e5===_0x114957(0x222))return undefined;if(/^-?\d+$/['test'](_0x29f0e5)){const _0x550d1c=_0x52fbc9[_0x114957(0x1f5)](Number,_0x29f0e5);if(Number[_0x114957(0x1f4)](_0x550d1c))return _0x550d1c;}if(/^-?\d+\.\d+$/[_0x114957(0x212)](_0x29f0e5)){const _0x461a66=Number(_0x29f0e5);if(!Number[_0x114957(0x20a)](_0x461a66))return _0x461a66;}const _0xb8ac91=_0x29f0e5['trim']();if(_0xb8ac91[_0x114957(0x1ff)]('{')&&_0xb8ac91[_0x114957(0x1fe)]('}')||_0xb8ac91[_0x114957(0x1ff)]('[')&&_0xb8ac91['endsWith'](']'))try{return JSON[_0x114957(0x206)](_0xb8ac91);}catch{}return _0x29f0e5;}async function resolveProfileTarget(_0x4dea82){const _0x3f6201=_0x42cd63,_0x133346={'JUdeO':function(_0x32b33b,_0x241cf3){return _0x32b33b(_0x241cf3);},'bozEc':'local'},_0x5675e7=existsSync(_0x133346[_0x3f6201(0x1fb)](getEnvDir,_0x4dea82));let _0x236479=![];try{const _0x43e981=await fetchCloudProfile(_0x4dea82);_0x236479=Boolean(_0x43e981);}catch{}if(_0x236479)return{'kind':_0x3f6201(0x211),'alsoExistsElsewhere':_0x5675e7};if(_0x5675e7)return{'kind':_0x133346['bozEc'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4dea82+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4dea82);}function printDualExistsHint(_0x242983){const _0x42420f=_0x42cd63;console['log']('\x20\x20Note:\x20\x22'+_0x242983+_0x42420f(0x227));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x31c7ae){const _0x1fc93b=_0x42cd63,_0x41b14d={'lIySK':function(_0x2548a4,_0x3078a9){return _0x2548a4(_0x3078a9);},'fCUpY':function(_0x1bce2d,_0xa0c279,_0x3459f5){return _0x1bce2d(_0xa0c279,_0x3459f5);},'NgVol':function(_0x3f6670,_0x25a61b,_0x97ac44){return _0x3f6670(_0x25a61b,_0x97ac44);}},_0x1e3d10=await _0x41b14d[_0x1fc93b(0x225)](fetchCloudProfile,_0x31c7ae),_0xe9caa1=_0x41b14d['fCUpY'](readProfileOverrides,getProjectPath(),_0x31c7ae);return _0x41b14d[_0x1fc93b(0x219)](mergeCloudProfileSettings,_0x1e3d10?.[_0x1fc93b(0x204)]??{},_0xe9caa1??undefined);}export async function configSet(_0x55faad,_0x484ce6,_0x44d1e2){const _0xc2778a=_0x42cd63,_0x8db9ab={'udZwR':function(_0x1c8d72,_0x53b400){return _0x1c8d72===_0x53b400;},'EcqtK':'cloud','tPJAP':function(_0x5dd795,_0x296f7f,_0x424521,_0x55b75b,_0x51760c){return _0x5dd795(_0x296f7f,_0x424521,_0x55b75b,_0x51760c);},'ohckB':function(_0x5d76fa){return _0x5d76fa();},'LgXus':function(_0x2dc823,_0x1374bc,_0x1d0803){return _0x2dc823(_0x1374bc,_0x1d0803);}},_0x1721eb=await resolveProfileTarget(_0x55faad);if(_0x8db9ab[_0xc2778a(0x21e)](_0x1721eb[_0xc2778a(0x20f)],_0x8db9ab['EcqtK'])){if(_0x1721eb[_0xc2778a(0x224)])printDualExistsHint(_0x55faad);const _0x543865=parseOverrideValue(_0x44d1e2);_0x8db9ab[_0xc2778a(0x1ee)](setProfileOverride,_0x8db9ab[_0xc2778a(0x20e)](getProjectPath),_0x55faad,_0x484ce6,_0x543865),console[_0xc2778a(0x21b)]('Set\x20'+_0x484ce6+_0xc2778a(0x1f8)+JSON[_0xc2778a(0x217)](_0x543865)+'\x20for\x20\x22'+_0x55faad+'\x22');return;}const _0x516c4b=_0x8db9ab['LgXus'](parseLocalValue,_0x484ce6,_0x44d1e2);_0x8db9ab['tPJAP'](setProfileOverride,_0x8db9ab['ohckB'](getProjectPath),_0x55faad,_0x484ce6,_0x516c4b),console['log'](_0xc2778a(0x20b)+_0x484ce6+'\x20=\x20'+_0x516c4b+'\x20for\x20\x22'+_0x55faad+'\x22');}function _0x5890(_0x43610b,_0x3915a1){_0x43610b=_0x43610b-0x1ee;const _0x2a58dc=_0x2a58();let _0x589022=_0x2a58dc[_0x43610b];return _0x589022;}export async function configGet(_0x44eda4,_0x37fc63){const _0x1c9bcb=_0x42cd63,_0x5abf8d={'sjIyU':function(_0x40b886,_0x4d0c4f){return _0x40b886===_0x4d0c4f;},'UPhQn':_0x1c9bcb(0x211),'SaPkz':function(_0x2dab9e,_0x38fde6,_0x3ad862){return _0x2dab9e(_0x38fde6,_0x3ad862);},'aUjgc':'object','ivvHi':function(_0x3d679f,_0xfcb731){return _0x3d679f===_0xfcb731;}},_0x142d6d=await resolveProfileTarget(_0x44eda4);if(_0x5abf8d[_0x1c9bcb(0x207)](_0x142d6d[_0x1c9bcb(0x20f)],_0x5abf8d['UPhQn'])){const _0x424724=await loadEffectiveCloudSettings(_0x44eda4),_0x37358d=_0x5abf8d[_0x1c9bcb(0x226)](getNestedValue,_0x424724,_0x37fc63);if(_0x37358d===undefined)console['log']('(not\x20set)');else typeof _0x37358d===_0x5abf8d[_0x1c9bcb(0x1f6)]?console['log'](JSON['stringify'](_0x37358d,null,0x2)):console['log'](_0x37358d);return;}const _0x13bb46=await loadSettings(_0x44eda4),_0x42d947=getNestedValue(_0x13bb46,_0x37fc63);if(_0x5abf8d['ivvHi'](_0x42d947,undefined))console['log'](_0x1c9bcb(0x21f));else _0x5abf8d[_0x1c9bcb(0x1f7)](typeof _0x42d947,_0x1c9bcb(0x223))?console[_0x1c9bcb(0x21b)](JSON['stringify'](_0x42d947,null,0x2)):console['log'](_0x42d947);}export async function configList(_0x5928b5){const _0x113336=_0x42cd63,_0x39a6c2={'zAOht':function(_0x52e1f2,_0x45e8c1){return _0x52e1f2===_0x45e8c1;},'BZbsd':_0x113336(0x211),'OaiMr':function(_0x4f554a,_0x1f753b){return _0x4f554a(_0x1f753b);},'faHZK':function(_0x58a494,_0xff0953){return _0x58a494(_0xff0953);}},_0x5e657f=await resolveProfileTarget(_0x5928b5);if(_0x39a6c2[_0x113336(0x1f3)](_0x5e657f['kind'],_0x39a6c2['BZbsd'])){const _0xd98ee5=await _0x39a6c2[_0x113336(0x200)](loadEffectiveCloudSettings,_0x5928b5);if(!_0xd98ee5||Object[_0x113336(0x208)](_0xd98ee5)['length']===0x0){console[_0x113336(0x21b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22');return;}console['log'](JSON['stringify'](_0xd98ee5,null,0x2));return;}const _0x37a7e1=_0x39a6c2['OaiMr'](getSettingsPath,_0x5928b5);if(!existsSync(_0x37a7e1)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22');return;}const _0x586bb5=await loadSettings(_0x5928b5),_0x43eef0=_0x39a6c2['faHZK'](formatSettings,_0x586bb5);!_0x43eef0?console[_0x113336(0x21b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22'):console[_0x113336(0x21b)](_0x43eef0);}export async function configUnset(_0x1edba0,_0x4f584f){const _0x233b13=_0x42cd63,_0x174222={'lgowX':function(_0x5e8688,_0x19fb49){return _0x5e8688(_0x19fb49);},'wHgxQ':_0x233b13(0x211),'xNnWA':function(_0x517fbe,_0x2211d8){return _0x517fbe(_0x2211d8);},'yqDey':function(_0x55de2f,_0x36d91a,_0x1941f6,_0x57f725){return _0x55de2f(_0x36d91a,_0x1941f6,_0x57f725);},'QsxcA':function(_0xd81067){return _0xd81067();},'ChQct':function(_0x3f961d,_0x4eba1f){return _0x3f961d(_0x4eba1f);},'uxCTg':function(_0x31f0ca,_0x5dc3ba,_0xf6f02d){return _0x31f0ca(_0x5dc3ba,_0xf6f02d);}},_0x1dc2ab=await _0x174222[_0x233b13(0x1fa)](resolveProfileTarget,_0x1edba0);if(_0x1dc2ab['kind']===_0x174222[_0x233b13(0x20c)]){if(_0x1dc2ab['alsoExistsElsewhere'])_0x174222['xNnWA'](printDualExistsHint,_0x1edba0);const _0x3ced52=_0x174222['yqDey'](unsetProfileOverride,_0x174222[_0x233b13(0x201)](getProjectPath),_0x1edba0,_0x4f584f);_0x3ced52?console['log']('Removed\x20'+_0x4f584f+'\x20for\x20\x22'+_0x1edba0+'\x22'):console[_0x233b13(0x21b)]('Key\x20\x22'+_0x4f584f+'\x22\x20not\x20found');return;}const _0x28cb3d=unsetProfileOverride(getProjectPath(),_0x1edba0,_0x4f584f);if(_0x28cb3d){console[_0x233b13(0x21b)](_0x233b13(0x214)+_0x4f584f);return;}const _0x570997=await _0x174222[_0x233b13(0x220)](loadSettings,_0x1edba0),_0x397b52=_0x174222['uxCTg'](deleteNestedValue,_0x570997,_0x4f584f);_0x397b52?console[_0x233b13(0x21b)](_0x233b13(0x221)+_0x4f584f+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x1edba0+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x233b13(0x21b)]('Key\x20\x22'+_0x4f584f+'\x22\x20not\x20found');}export async function configReset(_0xa2b59d){const _0x455a43=_0x42cd63,_0x1b23ae={'BLfCH':function(_0x1be398,_0x53046e){return _0x1be398===_0x53046e;},'QVmlP':function(_0x758c1d){return _0x758c1d();}},_0x49cb76=await resolveProfileTarget(_0xa2b59d);if(_0x1b23ae[_0x455a43(0x1f0)](_0x49cb76[_0x455a43(0x20f)],'cloud')){resetProfileOverrides(_0x1b23ae['QVmlP'](getProjectPath),_0xa2b59d),console[_0x455a43(0x21b)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0xa2b59d+'\x22');return;}console[_0x455a43(0x21b)]('\x22'+_0xa2b59d+_0x455a43(0x205)+_0xa2b59d+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x491cf0,_0x1bd37a){const _0x2da2d7=_0x19e4,_0x33bf3b=_0x491cf0();while(!![]){try{const _0x43b5ce=parseInt(_0x2da2d7(0xf7))/0x1+parseInt(_0x2da2d7(0xec))/0x2+-parseInt(_0x2da2d7(0xef))/0x3+parseInt(_0x2da2d7(0xee))/0x4+parseInt(_0x2da2d7(0xed))/0x5*(parseInt(_0x2da2d7(0xf6))/0x6)+parseInt(_0x2da2d7(0xea))/0x7*(parseInt(_0x2da2d7(0xf9))/0x8)+-parseInt(_0x2da2d7(0xeb))/0x9;if(_0x43b5ce===_0x1bd37a)break;else _0x33bf3b['push'](_0x33bf3b['shift']());}catch(_0x5a0b06){_0x33bf3b['push'](_0x33bf3b['shift']());}}}(_0x10a1,0xe3b85));import _0x3acd5b from'inquirer';function _0x19e4(_0xf43d88,_0x33aa6d){_0xf43d88=_0xf43d88-0xe9;const _0x10a1c1=_0x10a1();let _0x19e4b6=_0x10a1c1[_0xf43d88];return _0x19e4b6;}function _0x10a1(){const _0x35c1bb=['\x22\x20to\x20confirm\x20deletion:','3955mbXGiq','31658931RYbyJj','1648210SQkyVO','770905SiLSzB','4131272UnuphP','1348959ufEjRN','kApGE','prompt','yes','\x22\x20not\x20found.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','log','54FsYPvv','1397296ALaYcj','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','3656CdnuBn','Cloud\x20profile\x20\x22','Type\x20\x22','iwOmx'];_0x10a1=function(){return _0x35c1bb;};return _0x10a1();}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x31a63a,_0x4017c9={}){const _0x3bcd17=_0x19e4,_0x2c6dd5={'lweHu':function(_0x1fe99f){return _0x1fe99f();},'JZAPf':'input','kApGE':'confirmation','iwOmx':function(_0x26d304,_0x1c64b7){return _0x26d304!==_0x1c64b7;},'TgAhQ':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.'},_0x279315=await fetchCloudProfile(_0x31a63a);if(!_0x279315)throw new Error(_0x3bcd17(0xfa)+_0x31a63a+_0x3bcd17(0xf3));if(!_0x4017c9[_0x3bcd17(0xf2)]&&!_0x2c6dd5['lweHu'](isInteractive))throw new Error(_0x3bcd17(0xf8));console[_0x3bcd17(0xf5)](_0x3bcd17(0xf4)+_0x31a63a+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x4017c9['yes']){const {confirmation:_0x13145f}=await _0x3acd5b[_0x3bcd17(0xf1)]([{'type':_0x2c6dd5['JZAPf'],'name':_0x2c6dd5[_0x3bcd17(0xf0)],'message':_0x3bcd17(0xfb)+_0x31a63a+_0x3bcd17(0xe9)}]);if(_0x2c6dd5[_0x3bcd17(0xfc)](_0x13145f,_0x31a63a))throw new Error(_0x2c6dd5['TgAhQ']);}await deleteCloudProfile(_0x31a63a),resetProfileOverrides(process['cwd'](),_0x31a63a),clearLastProfile(process['cwd'](),_0x31a63a),console[_0x3bcd17(0xf5)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x31a63a+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x416b38=_0x5ab7;(function(_0x3f4285,_0x3e8c31){const _0x2c9b46=_0x5ab7,_0x17812e=_0x3f4285();while(!![]){try{const _0x20b27b=parseInt(_0x2c9b46(0xb6))/0x1+parseInt(_0x2c9b46(0xc5))/0x2+-parseInt(_0x2c9b46(0xad))/0x3+parseInt(_0x2c9b46(0xc9))/0x4+-parseInt(_0x2c9b46(0xbf))/0x5*(-parseInt(_0x2c9b46(0xa6))/0x6)+-parseInt(_0x2c9b46(0xbd))/0x7+-parseInt(_0x2c9b46(0xb7))/0x8*(parseInt(_0x2c9b46(0xc4))/0x9);if(_0x20b27b===_0x3e8c31)break;else _0x17812e['push'](_0x17812e['shift']());}catch(_0x5892af){_0x17812e['push'](_0x17812e['shift']());}}}(_0x4e7e,0x4a061));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x416b38(0xa4),_0x416b38(0xb1),'ci'];function _0x4e7e(){const _0x3da397=['266226ByzXMf','291304jqYPjk','tBZhR','gfWPo','AjnDN','\x0aNo\x20profiles\x20found.','cached\x20(updated\x20','2555868WnBhON','name','8285XCitYQ','\x20\x20\x20\x20','hgwKm','environmentDetails','.txt','9aSSTVw','928930TWVpkG','get','sessionUpdatedAt','vNAWN','1292940mmKQLB','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','\x0a*\x20=\x20active\x20profile','CEdlT','\x20\x20\x20\x20Session:\x20','has','error','reports','localeCompare','186mLbOSf','profiles','LwsVc','\x0a\x20\x20','sort','odbbD','OfyVr','1201665ePEdND','message','eLItN','push','local','includes','log','gerbS','length'];_0x4e7e=function(){return _0x3da397;};return _0x4e7e();}export function shouldGroupByEnvironment(_0x319bf3){const _0x2e707e=_0x416b38;return _0x319bf3['some'](_0x5dfaaf=>_0x5dfaaf[_0x2e707e(0x9e)]);}export function groupCloudProfilesByEnvironment(_0x573b00){const _0x2cb06c=_0x416b38,_0xd0f009=new Map();for(const _0x123919 of _0x573b00){const _0x4f466e=_0x123919['environmentKey']??null,_0x793d38=_0xd0f009['get'](_0x4f466e);if(_0x793d38)_0x793d38['push'](_0x123919);else _0xd0f009['set'](_0x4f466e,[_0x123919]);}const _0x5f5c5a=[..._0xd0f009['keys']()][_0x2cb06c(0xaa)]((_0x1a68d2,_0x5ebd82)=>{if(_0x1a68d2===null)return 0x1;if(_0x5ebd82===null)return-0x1;return _0x1a68d2['localeCompare'](_0x5ebd82);});return _0x5f5c5a['map'](_0x3e78ae=>({'environmentKey':_0x3e78ae,'profiles':_0xd0f009[_0x2cb06c(0xc6)](_0x3e78ae)['sort']((_0x4b3e56,_0x4c18f6)=>_0x4b3e56['name'][_0x2cb06c(0xa5)](_0x4c18f6[_0x2cb06c(0xbe)]))}));}function _0x5ab7(_0x1a2170,_0x2cf009){_0x1a2170=_0x1a2170-0x9d;const _0x4e7e92=_0x4e7e();let _0x5ab778=_0x4e7e92[_0x1a2170];return _0x5ab778;}export async function getEnvNames(){const _0x364b00=_0x416b38,_0x33af17={'gfWPo':function(_0x10e556,_0x2f07e4){return _0x10e556(_0x2f07e4);},'PeFLZ':function(_0x3dc843){return _0x3dc843();},'odbbD':function(_0x463c8b,_0x563ac3){return _0x463c8b(_0x563ac3);},'CwTsQ':'local','CEdlT':function(_0x5a11e1,_0x652f78,_0x3bd26f){return _0x5a11e1(_0x652f78,_0x3bd26f);},'vNAWN':function(_0x1f61db,_0xe19dd3){return _0x1f61db(_0xe19dd3);},'eLItN':function(_0x1ff143,_0x3cede6,_0x6dc50){return _0x1ff143(_0x3cede6,_0x6dc50);},'LwsVc':_0x364b00(0xc3),'fbjso':'settings.json'},_0x14ccc4=getRangerDir();if(!_0x33af17['gfWPo'](existsSync,_0x14ccc4))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2dca24=await _0x33af17['PeFLZ'](readActiveProfileName),_0x2844a6=[],_0x59bbc5={},_0x49fc81=join(_0x14ccc4,_0x364b00(0xb1));if(existsSync(_0x49fc81)){const _0x524f77=await _0x33af17[_0x364b00(0xab)](readdir,_0x49fc81);for(const _0x49ebf9 of _0x524f77){const _0x381ef3=join(_0x49fc81,_0x49ebf9),_0x5078e3=await _0x33af17[_0x364b00(0xb9)](stat,_0x381ef3);_0x5078e3['isDirectory']()&&(_0x2844a6['push'](_0x49ebf9),_0x59bbc5[_0x49ebf9]=_0x33af17['CwTsQ']);}}const _0x291624=_0x33af17[_0x364b00(0xa0)](join,_0x14ccc4,'ci');if(existsSync(_0x291624)){const _0x4476fc=await _0x33af17[_0x364b00(0xc8)](readdir,_0x291624);for(const _0x2a0b53 of _0x4476fc){const _0x249ed9=_0x33af17[_0x364b00(0xaf)](join,_0x291624,_0x2a0b53),_0x24186c=await stat(_0x249ed9);_0x24186c['isDirectory']()&&(_0x2844a6[_0x364b00(0xb0)](_0x2a0b53),_0x59bbc5[_0x2a0b53]='ci');}}const _0xd777ae=await readdir(_0x14ccc4);for(const _0x50b59b of _0xd777ae){if(NON_ENV_DIRS[_0x364b00(0xb2)](_0x50b59b))continue;if(_0x50b59b['startsWith']('.'))continue;if(_0x50b59b['endsWith'](_0x33af17[_0x364b00(0xa8)]))continue;const _0x3c67bd=_0x33af17[_0x364b00(0xaf)](join,_0x14ccc4,_0x50b59b),_0x12fb87=await _0x33af17['odbbD'](stat,_0x3c67bd);_0x12fb87['isDirectory']()&&existsSync(_0x33af17[_0x364b00(0xa0)](join,_0x3c67bd,_0x33af17['fbjso']))&&(!_0x2844a6[_0x364b00(0xb2)](_0x50b59b)&&(_0x2844a6[_0x364b00(0xb0)](_0x50b59b),_0x59bbc5[_0x50b59b]='legacy'));}return{'envNames':_0x2844a6,'activeEnv':_0x2dca24,'envTypes':_0x59bbc5};}export async function envList(){const _0x56aa22=_0x416b38,_0x20d551={'dMdvg':function(_0x5e135b){return _0x5e135b();},'gerbS':function(_0x59afe0,_0x24f562){return _0x59afe0===_0x24f562;},'hgwKm':function(_0x156ec6,_0x191881){return _0x156ec6===_0x191881;},'AjnDN':_0x56aa22(0x9d),'hXsYD':function(_0x46f994,_0x3671e9){return _0x46f994>_0x3671e9;},'mMtRj':'\x0aLocal\x20Profiles\x20(legacy):','igKqU':_0x56aa22(0xb1),'MNkbi':'legacy','OfyVr':function(_0x4e6348,_0x50a647){return _0x4e6348>_0x50a647;},'IiuaF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','tBZhR':function(_0x2a2fd6,_0x58ba2c,_0x15ebe7){return _0x2a2fd6(_0x58ba2c,_0x15ebe7);},'lrweu':_0x56aa22(0xc0)},{envNames:_0x178e92,activeEnv:_0x49a849,envTypes:_0x4c1420}=await _0x20d551['dMdvg'](getEnvNames);let _0x5db0e1=[];const _0x2f8740=await getToken();if(_0x2f8740)try{_0x5db0e1=await listCloudProfiles();}catch(_0x1f8638){console[_0x56aa22(0xa3)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x1f8638 instanceof Error?_0x1f8638[_0x56aa22(0xae)]:String(_0x1f8638)));}if(_0x20d551[_0x56aa22(0xb4)](_0x178e92[_0x56aa22(0xb5)],0x0)&&_0x20d551[_0x56aa22(0xc1)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){console[_0x56aa22(0xb3)](_0x56aa22(0xbb)),console['log'](_0x20d551[_0x56aa22(0xba)]);return;}const _0x1dba54=new Set(_0x5db0e1['map'](_0x2366c1=>_0x2366c1[_0x56aa22(0xbe)]));if(_0x20d551['hXsYD'](_0x178e92['length'],0x0)){console['log'](_0x20d551['mMtRj']);for(const _0x425a4d of _0x178e92['sort']()){const _0x1559c4=_0x425a4d===_0x49a849&&!_0x1dba54[_0x56aa22(0xa2)](_0x425a4d),_0x269188=_0x4c1420[_0x425a4d]||_0x20d551['igKqU'],_0x55bf7b=await loadSettings(_0x425a4d),_0x57ba9e=_0x269188===_0x20d551['MNkbi']?'':'\x20['+_0x269188+']';console[_0x56aa22(0xb3)]('\x20\x20'+(_0x1559c4?'*\x20':'\x20\x20')+_0x425a4d+_0x57ba9e),_0x55bf7b['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x55bf7b['baseUrl']),_0x55bf7b['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55bf7b[_0x56aa22(0xc2)]);}}const _0x4d2384=(_0x542be7,_0x191403)=>{const _0x2c63ab=_0x56aa22,_0x3ca4bc=_0x542be7[_0x2c63ab(0xbe)]===_0x49a849,_0x1961f1=_0x542be7['sessionUpdatedAt']?_0x2c63ab(0xbc)+_0x542be7[_0x2c63ab(0xc7)]+')':'no\x20session';console['log'](''+_0x191403+(_0x3ca4bc?'*\x20':'\x20\x20')+_0x542be7[_0x2c63ab(0xbe)]),console['log'](_0x191403+_0x2c63ab(0xa1)+_0x1961f1);};if(_0x20d551[_0x56aa22(0xac)](_0x5db0e1[_0x56aa22(0xb5)],0x0)){if(shouldGroupByEnvironment(_0x5db0e1)){console[_0x56aa22(0xb3)]('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x563852 of groupCloudProfilesByEnvironment(_0x5db0e1)){const _0x4eab31=_0x563852['environmentKey']??_0x20d551['IiuaF'];console['log'](_0x56aa22(0xa9)+_0x4eab31);for(const _0x106a92 of _0x563852[_0x56aa22(0xa7)]){_0x20d551['tBZhR'](_0x4d2384,_0x106a92,_0x20d551['lrweu']);}}}else{console['log']('\x0aCloud\x20Profiles:');for(const _0x29bf85 of[..._0x5db0e1]['sort']((_0x47310b,_0x5a2554)=>_0x47310b[_0x56aa22(0xbe)]['localeCompare'](_0x5a2554['name']))){_0x20d551[_0x56aa22(0xb8)](_0x4d2384,_0x29bf85,'\x20\x20');}}}_0x49a849&&console['log'](_0x56aa22(0x9f));}
|
|
1
|
+
const _0x85f060=_0x2fa2;(function(_0x14a8fd,_0x2a7e98){const _0x4cedf4=_0x2fa2,_0x27badb=_0x14a8fd();while(!![]){try{const _0x1f21f4=-parseInt(_0x4cedf4(0x6f))/0x1*(parseInt(_0x4cedf4(0x87))/0x2)+-parseInt(_0x4cedf4(0x86))/0x3*(parseInt(_0x4cedf4(0xa6))/0x4)+parseInt(_0x4cedf4(0xa8))/0x5*(-parseInt(_0x4cedf4(0xa5))/0x6)+-parseInt(_0x4cedf4(0x8b))/0x7*(-parseInt(_0x4cedf4(0x88))/0x8)+-parseInt(_0x4cedf4(0x9e))/0x9*(parseInt(_0x4cedf4(0x96))/0xa)+-parseInt(_0x4cedf4(0xae))/0xb*(parseInt(_0x4cedf4(0x71))/0xc)+parseInt(_0x4cedf4(0x82))/0xd*(parseInt(_0x4cedf4(0x77))/0xe);if(_0x1f21f4===_0x2a7e98)break;else _0x27badb['push'](_0x27badb['shift']());}catch(_0x3367e3){_0x27badb['push'](_0x27badb['shift']());}}}(_0xdab4,0x18ab6));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0xdab4(){const _0x2a36e8=['.txt','13RudlCx','includes','no\x20session','UjXzJ','203331kXEzCd','194ifDZnH','14488dJfdEt','error','projectOverrides','301yZMwQb','LrPhG','name','push','\x0aLocal\x20Profiles\x20(legacy):','baseUrlSource','yJGGN','message','localeCompare','VmQKy','environmentKey','10kITZrK','sort','\x22:\x20','HebWg','length','baseUrl','map','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','1157049VIrobD','get','ipiaF','startPath','settings','RUwFg','all','77988IRNahN','4EusWbf','VhxMZ','10rbazhd','cwd','\x0aCloud\x20Profiles:','reports','\x0a*\x20=\x20active\x20profile','WxmRX','278091VqLwMi','IUxkA','log','1407TciwHU','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','84hWjsAi','sessionUpdatedAt','\x0aCloud\x20Profiles\x20(by\x20environment):','set','some','dStif','7825342wiadII','FRNGS','domains','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','UJwwa','\x20\x20\x20\x20\x20\x20URL:\x20','gvrWQ','uwTRj','sYwKk','endsWith'];_0xdab4=function(){return _0x2a36e8;};return _0xdab4();}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x85f060(0xab),'local','ci'];export function shouldGroupByEnvironment(_0x35aac6){const _0x4fac04=_0x85f060;return _0x35aac6[_0x4fac04(0x75)](_0x121ad3=>_0x121ad3['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x4e02fe){const _0x198d19=_0x85f060,_0x2e2c3f=new Map();for(const _0x34807d of _0x4e02fe){const _0x53da7f=_0x34807d[_0x198d19(0x95)]??null,_0x63a783=_0x2e2c3f['get'](_0x53da7f);if(_0x63a783)_0x63a783[_0x198d19(0x8e)](_0x34807d);else _0x2e2c3f['set'](_0x53da7f,[_0x34807d]);}const _0x1c685a=[..._0x2e2c3f['keys']()]['sort']((_0x227846,_0x24374b)=>{const _0x5dc421=_0x198d19;if(_0x227846===null)return 0x1;if(_0x24374b===null)return-0x1;return _0x227846[_0x5dc421(0x93)](_0x24374b);});return _0x1c685a['map'](_0x1e14bb=>({'environmentKey':_0x1e14bb,'profiles':_0x2e2c3f[_0x198d19(0x9f)](_0x1e14bb)['sort']((_0xb50e,_0x568fd7)=>_0xb50e['name'][_0x198d19(0x93)](_0x568fd7['name']))}));}function expandString(_0x3018cc){const _0x432169=_0x85f060,_0x3f3bf8={'WxmRX':function(_0x317b97,_0xe746e6){return _0x317b97(_0xe746e6);}};if(!_0x3018cc)return undefined;return _0x3f3bf8[_0x432169(0xad)](resolveEnvVars,_0x3018cc);}function expandProfileOverrides(_0x276602){const _0x45ec58=_0x85f060,_0x2c6a37={'ipiaF':function(_0x5a309a,_0x4df134){return _0x5a309a(_0x4df134);},'VTcYh':function(_0x2c7a75,_0x4a7649){return _0x2c7a75(_0x4a7649);}};if(!_0x276602)return null;return{..._0x276602,'baseUrl':_0x2c6a37[_0x45ec58(0xa0)](expandString,_0x276602[_0x45ec58(0x9b)]),'startPath':_0x2c6a37['VTcYh'](expandString,_0x276602[_0x45ec58(0xa1)])};}function _0x2fa2(_0x18229d,_0x56e4e6){_0x18229d=_0x18229d-0x6f;const _0xdab4be=_0xdab4();let _0x2fa203=_0xdab4be[_0x18229d];return _0x2fa203;}export function resolveCloudProfileListUrl(_0x2597da,_0x5c9877={}){const _0x421692=_0x85f060,_0x3dd239={'fptEQ':function(_0x15c004,_0x4dc4bd,_0x54b461){return _0x15c004(_0x4dc4bd,_0x54b461);},'iPzUT':function(_0x4fc0ec,_0x1c7cdf){return _0x4fc0ec(_0x1c7cdf);},'yJGGN':function(_0x56bfc2,_0x409ee5){return _0x56bfc2(_0x409ee5);},'HebWg':function(_0xd3740e,_0x62bd94){return _0xd3740e(_0x62bd94);}},_0x26ce79=_0x2597da[_0x421692(0xa2)]??{},_0x45a7c0=_0x5c9877['authConfig']?_0x3dd239['fptEQ'](resolveAuthEnvironmentLocally,_0x5c9877['authConfig'],_0x2597da[_0x421692(0x95)]):null,_0x2154d6=_0x3dd239['iPzUT'](resolveProfileUrl,{'projectOverrides':_0x3dd239[_0x421692(0x91)](expandProfileOverrides,_0x5c9877[_0x421692(0x8a)]??null),'cloudSettings':{'baseUrl':_0x3dd239[_0x421692(0x99)](expandString,_0x26ce79['baseUrl']),'startPath':expandString(_0x26ce79[_0x421692(0xa1)])},'authEnvironmentDomain':_0x45a7c0?.[_0x421692(0x79)]?.[0x0]});return{'baseUrl':_0x2154d6[_0x421692(0x9b)],'source':_0x2154d6[_0x421692(0x90)]};}async function loadCloudProfileListUrls(_0x41f7d5){const _0x201aa4=_0x85f060,_0x35482c={'HFNnt':function(_0x5b8663,_0x118623,_0x2895e1){return _0x5b8663(_0x118623,_0x2895e1);}},_0x2da81a=new Map();if(_0x41f7d5['length']===0x0)return _0x2da81a;const _0x319bea=await fetchAuthConfig();return await Promise[_0x201aa4(0xa4)](_0x41f7d5[_0x201aa4(0x9c)](async _0x308a3c=>{const _0x1c2acf=_0x201aa4;try{const _0x458e71=await fetchCloudProfile(_0x308a3c[_0x1c2acf(0x8d)]);if(!_0x458e71)return;_0x2da81a[_0x1c2acf(0x74)](_0x308a3c['name'],_0x35482c['HFNnt'](resolveCloudProfileListUrl,_0x458e71,{'authConfig':_0x319bea,'projectOverrides':readProfileOverrides(process[_0x1c2acf(0xa9)](),_0x308a3c['name'])}));}catch(_0x761c33){console[_0x1c2acf(0x89)](_0x1c2acf(0x70)+_0x308a3c['name']+_0x1c2acf(0x98)+(_0x761c33 instanceof Error?_0x761c33[_0x1c2acf(0x92)]:String(_0x761c33)));}})),_0x2da81a;}export async function getEnvNames(){const _0x3155f6=_0x85f060,_0x3921bb={'RUwFg':function(_0xdbb672,_0x23909e){return _0xdbb672(_0x23909e);},'UaPms':'local','gvrWQ':function(_0x341867,_0x297981){return _0x341867(_0x297981);},'hzArJ':function(_0x51e90a,_0xb9eef6,_0x448307){return _0x51e90a(_0xb9eef6,_0x448307);},'uwTRj':function(_0x22cde,_0x3886b8,_0x4bd74c){return _0x22cde(_0x3886b8,_0x4bd74c);},'VhxMZ':function(_0x39e26d,_0x467807){return _0x39e26d(_0x467807);}},_0x8ff431=getRangerDir();if(!_0x3921bb[_0x3155f6(0xa3)](existsSync,_0x8ff431))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x430f60=await readActiveProfileName(),_0x3ad951=[],_0x461211={},_0x19fce8=join(_0x8ff431,_0x3921bb['UaPms']);if(_0x3921bb[_0x3155f6(0xa3)](existsSync,_0x19fce8)){const _0x41b494=await _0x3921bb[_0x3155f6(0x7d)](readdir,_0x19fce8);for(const _0x5b40d8 of _0x41b494){const _0x145ca9=_0x3921bb['hzArJ'](join,_0x19fce8,_0x5b40d8),_0x4fb8bc=await stat(_0x145ca9);_0x4fb8bc['isDirectory']()&&(_0x3ad951[_0x3155f6(0x8e)](_0x5b40d8),_0x461211[_0x5b40d8]=_0x3921bb['UaPms']);}}const _0x598916=join(_0x8ff431,'ci');if(existsSync(_0x598916)){const _0x45f109=await _0x3921bb['RUwFg'](readdir,_0x598916);for(const _0x5b6d5e of _0x45f109){const _0x1b47b2=_0x3921bb[_0x3155f6(0x7e)](join,_0x598916,_0x5b6d5e),_0x571352=await _0x3921bb[_0x3155f6(0x7d)](stat,_0x1b47b2);_0x571352['isDirectory']()&&(_0x3ad951[_0x3155f6(0x8e)](_0x5b6d5e),_0x461211[_0x5b6d5e]='ci');}}const _0x70e222=await _0x3921bb[_0x3155f6(0xa3)](readdir,_0x8ff431);for(const _0xe518a1 of _0x70e222){if(NON_ENV_DIRS[_0x3155f6(0x83)](_0xe518a1))continue;if(_0xe518a1['startsWith']('.'))continue;if(_0xe518a1[_0x3155f6(0x80)](_0x3155f6(0x81)))continue;const _0x4c823e=join(_0x8ff431,_0xe518a1),_0x303993=await stat(_0x4c823e);_0x303993['isDirectory']()&&_0x3921bb[_0x3155f6(0xa7)](existsSync,join(_0x4c823e,'settings.json'))&&(!_0x3ad951['includes'](_0xe518a1)&&(_0x3ad951[_0x3155f6(0x8e)](_0xe518a1),_0x461211[_0xe518a1]='legacy'));}return{'envNames':_0x3ad951,'activeEnv':_0x430f60,'envTypes':_0x461211};}export async function envList(){const _0x591388=_0x85f060,_0x159ad0={'awaQD':function(_0x491690,_0x11965c){return _0x491690===_0x11965c;},'sYwKk':_0x591388(0x84),'WaMFx':function(_0x51ee75){return _0x51ee75();},'YsDta':function(_0x145514,_0x3c6fe7){return _0x145514 instanceof _0x3c6fe7;},'wIDlr':function(_0x53b93f,_0x314e9c){return _0x53b93f===_0x314e9c;},'LrPhG':function(_0x354ee5,_0x527bc1){return _0x354ee5===_0x527bc1;},'dStif':'\x0aNo\x20profiles\x20found.','VmQKy':function(_0x1bfdba,_0x57daab){return _0x1bfdba>_0x57daab;},'UjXzJ':_0x591388(0x8f),'vVWxk':function(_0x7f13e1,_0x1941f0){return _0x7f13e1(_0x1941f0);},'qUwBb':function(_0x16ce99,_0x3964b3){return _0x16ce99===_0x3964b3;},'FRNGS':'legacy','UyCNU':function(_0x533276,_0x4f0b7d){return _0x533276(_0x4f0b7d);},'IUxkA':function(_0x4809a7,_0x4db822,_0x34d011){return _0x4809a7(_0x4db822,_0x34d011);},'BJTwr':'\x20\x20\x20\x20','UJwwa':_0x591388(0xaa),'GBRBZ':function(_0x3de9fa,_0x370835,_0x32cc63){return _0x3de9fa(_0x370835,_0x32cc63);}},{envNames:_0x19ee58,activeEnv:_0xfc44e2,envTypes:_0x5d2ead}=await getEnvNames();let _0x325df3=[],_0x5b86f9=new Map();const _0x305943=await _0x159ad0['WaMFx'](getToken);if(_0x305943)try{_0x325df3=await listCloudProfiles(),_0x5b86f9=await loadCloudProfileListUrls(_0x325df3);}catch(_0x5915af){console['error'](_0x591388(0x7a)+(_0x159ad0['YsDta'](_0x5915af,Error)?_0x5915af['message']:String(_0x5915af)));}if(_0x159ad0['wIDlr'](_0x19ee58[_0x591388(0x9a)],0x0)&&_0x159ad0[_0x591388(0x8c)](_0x325df3['length'],0x0)){console['log'](_0x159ad0[_0x591388(0x76)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x55a37a=new Set(_0x325df3['map'](_0x42b24c=>_0x42b24c[_0x591388(0x8d)]));if(_0x159ad0[_0x591388(0x94)](_0x19ee58[_0x591388(0x9a)],0x0)){console[_0x591388(0xb0)](_0x159ad0[_0x591388(0x85)]);for(const _0x28f537 of _0x19ee58['sort']()){const _0x3caa6c=_0x28f537===_0xfc44e2&&!_0x55a37a['has'](_0x28f537),_0x39dd5b=_0x5d2ead[_0x28f537]||'local',_0x5cdbd7=await loadSettings(_0x28f537),_0x414b49=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x5cdbd7[_0x591388(0x9b)]),'projectOverrides':_0x159ad0['vVWxk'](expandProfileOverrides,readProfileOverrides(process['cwd'](),_0x28f537))}),_0x30074c=_0x159ad0['qUwBb'](_0x39dd5b,_0x159ad0[_0x591388(0x78)])?'':'\x20['+_0x39dd5b+']';console[_0x591388(0xb0)]('\x20\x20'+(_0x3caa6c?'*\x20':'\x20\x20')+_0x28f537+_0x30074c),_0x414b49['baseUrl']&&console[_0x591388(0xb0)](_0x591388(0x7c)+_0x414b49['baseUrl']),_0x5cdbd7['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x5cdbd7['environmentDetails']);}}const _0x189601=(_0x379cdf,_0x34e33e)=>{const _0x127687=_0x591388,_0xc55308=_0x159ad0['awaQD'](_0x379cdf[_0x127687(0x8d)],_0xfc44e2),_0x201d33=_0x379cdf['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x379cdf[_0x127687(0x72)]+')':_0x159ad0[_0x127687(0x7f)],_0x1b94c2=_0x5b86f9[_0x127687(0x9f)](_0x379cdf['name']);console[_0x127687(0xb0)](''+_0x34e33e+(_0xc55308?'*\x20':'\x20\x20')+_0x379cdf[_0x127687(0x8d)]),_0x1b94c2?.[_0x127687(0x9b)]&&console['log'](_0x34e33e+'\x20\x20\x20\x20URL:\x20'+_0x1b94c2[_0x127687(0x9b)]),console['log'](_0x34e33e+'\x20\x20\x20\x20Session:\x20'+_0x201d33);};if(_0x159ad0['VmQKy'](_0x325df3['length'],0x0)){if(shouldGroupByEnvironment(_0x325df3)){console[_0x591388(0xb0)](_0x591388(0x73));for(const _0x228ddf of _0x159ad0['UyCNU'](groupCloudProfilesByEnvironment,_0x325df3)){const _0x58d8b0=_0x228ddf['environmentKey']??_0x591388(0x9d);console[_0x591388(0xb0)]('\x0a\x20\x20'+_0x58d8b0);for(const _0x5c364e of _0x228ddf['profiles']){_0x159ad0[_0x591388(0xaf)](_0x189601,_0x5c364e,_0x159ad0['BJTwr']);}}}else{console['log'](_0x159ad0[_0x591388(0x7b)]);for(const _0x4d216b of[..._0x325df3][_0x591388(0x97)]((_0x1004e1,_0x379a9e)=>_0x1004e1[_0x591388(0x8d)][_0x591388(0x93)](_0x379a9e[_0x591388(0x8d)]))){_0x159ad0['GBRBZ'](_0x189601,_0x4d216b,'\x20\x20');}}}_0xfc44e2&&console['log'](_0x591388(0xac));}
|