@ranger-testing/ranger-cli 2.5.4-alpha.152f635-21 → 2.5.4-alpha.1b80607-25
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 -0
- 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 -0
- package/build/commands/utils/opencodeConfig.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/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.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/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 -0
- package/build/skills/ranger/SKILL.md +1 -1
- package/package.json +1 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1902cd=_0x4764;(function(_0x1ccd48,_0x106cda){const _0x42d1c1=_0x4764,_0x590154=_0x1ccd48();while(!![]){try{const _0x5dea7d=parseInt(_0x42d1c1(0x1e5))/0x1*(-parseInt(_0x42d1c1(0x1b8))/0x2)+parseInt(_0x42d1c1(0x1d5))/0x3+-parseInt(_0x42d1c1(0x1bb))/0x4*(parseInt(_0x42d1c1(0x17e))/0x5)+parseInt(_0x42d1c1(0x174))/0x6+-parseInt(_0x42d1c1(0x173))/0x7*(parseInt(_0x42d1c1(0x1e8))/0x8)+-parseInt(_0x42d1c1(0x1be))/0x9+parseInt(_0x42d1c1(0x180))/0xa*(parseInt(_0x42d1c1(0x1c9))/0xb);if(_0x5dea7d===_0x106cda)break;else _0x590154['push'](_0x590154['shift']());}catch(_0x1b99ce){_0x590154['push'](_0x590154['shift']());}}}(_0x193c,0x1e4ee));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x2412c 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{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x1902cd(0x1c3);function warnCloudProfileSharedInOrg(){const _0x2fcd0b=_0x1902cd;if(!process['stdout']['isTTY'])return;console[_0x2fcd0b(0x1cc)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x206fda){const _0x39bd97=_0x1902cd,_0x23c67a={'eqbPM':function(_0x330b78,_0x25e6cd,_0x703755){return _0x330b78(_0x25e6cd,_0x703755);},'RYMvq':_0x39bd97(0x1bd),'mwXvZ':function(_0x16db7e,_0x2866b6){return _0x16db7e===_0x2866b6;},'yBtOg':_0x39bd97(0x1ac)};try{const _0x5668da=new AbortController(),_0x4df2f9=_0x23c67a[_0x39bd97(0x1bf)](setTimeout,()=>_0x5668da[_0x39bd97(0x1b6)](),0x1388),_0x2ca6ef={'method':'HEAD','signal':_0x5668da[_0x39bd97(0x1cb)],'redirect':_0x23c67a[_0x39bd97(0x1ce)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x206fda)&&(process[_0x39bd97(0x1ec)][_0x39bd97(0x1ad)]='0');const _0x43ffd8=await fetch(_0x206fda,_0x2ca6ef);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4df2f9);if(_0x43ffd8[_0x39bd97(0x171)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x39bd97(0x1e3)+_0x43ffd8['status']};}catch(_0x41a856){delete process[_0x39bd97(0x1ec)][_0x39bd97(0x1ad)];const _0x2ee9da=_0x41a856,_0x37c7f9=_0x2ee9da[_0x39bd97(0x1d1)]||String(_0x41a856),_0x264df9=_0x37c7f9['includes']('Invalid\x20URL')||_0x23c67a['mwXvZ'](_0x2ee9da['name'],_0x39bd97(0x1ab))||_0x37c7f9['includes'](_0x23c67a[_0x39bd97(0x1ba)]);return{'ok':![],'error':_0x37c7f9,'isProtocolError':_0x264df9};}}async function sweepOrphanLocalProfile(_0x5d88ef,_0x7ce59b,_0x59551c){const _0x3bba2b=_0x1902cd,_0x1caadd={'yprdz':function(_0x2f1dfb,_0x48806d,_0x1a825a){return _0x2f1dfb(_0x48806d,_0x1a825a);},'zTGAH':function(_0x16e2d5,_0x1a70a7){return _0x16e2d5(_0x1a70a7);}},_0x376fa0=join(_0x7ce59b,_0x3bba2b(0x196)),_0x2839bf=_0x1caadd[_0x3bba2b(0x19d)](join,_0x376fa0,_0x5d88ef);existsSync(_0x2839bf)&&(_0x59551c&&await _0x1caadd[_0x3bba2b(0x1f2)](isPathGitTracked,_0x2839bf)?console[_0x3bba2b(0x1e6)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x2839bf+_0x3bba2b(0x1c7)):(await rm(_0x2839bf,{'recursive':!![],'force':!![]}),console['log'](_0x3bba2b(0x1a8)+_0x2839bf)));if(_0x1caadd[_0x3bba2b(0x1f2)](existsSync,_0x376fa0)){let _0x56cf6d=[];try{_0x56cf6d=await _0x1caadd[_0x3bba2b(0x1f2)](readdir,_0x376fa0);}catch{return;}const _0x15d582=_0x3bba2b(0x1d6)+_0x5d88ef+'-';for(const _0x3edc5c of _0x56cf6d){if(!_0x3edc5c['startsWith'](_0x15d582))continue;const _0x51d200=join(_0x376fa0,_0x3edc5c);await rm(_0x51d200,{'recursive':!![],'force':!![]}),console[_0x3bba2b(0x1e6)](_0x3bba2b(0x1a8)+_0x51d200);}}}async function sweepOrphansBestEffort(_0x15a67c){const _0x5a0ed0=_0x1902cd,_0x2d0394={'STxnR':function(_0x3f396b,_0x4ffd56,_0x40ccf7,_0x4a2cc7){return _0x3f396b(_0x4ffd56,_0x40ccf7,_0x4a2cc7);}};try{await sweepOrphanLocalProfile(_0x15a67c,getRangerHomeDir(),![]);const _0x4ce0f1=getRangerDir();_0x4ce0f1!==getRangerHomeDir()&&await _0x2d0394[_0x5a0ed0(0x178)](sweepOrphanLocalProfile,_0x15a67c,_0x4ce0f1,!![]);}catch(_0x3962e3){console[_0x5a0ed0(0x1e6)](_0x5a0ed0(0x1b9)+(_0x3962e3 instanceof Error?_0x3962e3['message']:String(_0x3962e3))+').');}}function _0x193c(){const _0x36dcc1=['\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','5VBrCEQ','KVWXP','30210ttIcAh','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','skipAuth','setupHeaders','BoHvB','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','Use\x20','OLpGB','join','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','`\x20again\x20without\x20--skip-auth.','no_auth_config','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','TAtHw',')\x0a\x20\x20Save\x20\x27','profile.add.autoRouted','trackPhaseEnd','SWVAU','cwd','\x27\x20created.\x0a','stdout','\x0a🌐\x20Profile\x20Setup\x0a','local','YRiGy','isTTY','sCOsm','TBTUA','Could\x20not\x20reach\x20','\x20\x20Did\x20you\x20mean\x20','yprdz','kYZIN','InGZb','MHyka','origin','slice','prompt','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','Enter\x20a\x20different\x20URL','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','error','setupHeader','TypeError','fetch\x20failed','NODE_TLS_REJECT_UNAUTHORIZED','ykNnv','✓\x20Profile\x20\x27','list','user_declined','WtEXC','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','baseUrl','JUVYG','abort','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','334QFRWIi','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','yBtOg','824812fnAXNH','http://','manual','1434123tHNjjM','eqbPM','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20https://docs.ranger.net/main/concepts/profiles','VbYtH','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','tgyDE','fjXSw','HaDSk','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','exit','1342PmClhs','capture','signal','warn','indexOf','RYMvq','isElectron','\x20(continuing\x20with\x20--force)','message','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','mkJfw','Invalid\x20--setup-header\x20format:\x20\x22','561129aLFnKf','.tmp-','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','test','length','CBSIB','yes','\x20--url\x20','trim','.\x20Configured\x20envs:\x20','url','no_match','yzHgv','\x0a\x20\x20A\x20profile\x20named\x20\x22','HTTP\x20','profile.add.autoRouteSkipped','471BzhWcv','log','action','32968QXYFeh','pKdWY','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','dQkiX','env','\x0a✓\x20Profile\x20\x27','JoWVV','hNfOO','⚠\x20Could\x20not\x20reach\x20','cdpEndpoint','zTGAH','bcatX','keys','retry','status','FWmrI','392lifmyp','1461120ehkooD','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','continue','\x20--skip-auth\x0a','STxnR','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','KoTiJ','hgBML','environments'];_0x193c=function(){return _0x36dcc1;};return _0x193c();}async function markActive(_0x29ed9a){const _0x293a79=_0x1902cd,_0x5c55b3={'yWdAx':_0x293a79(0x189)};try{await writeActiveProfileName(_0x29ed9a),console[_0x293a79(0x1e6)]('\x20\x20Set\x20active\x20profile:\x20'+_0x29ed9a);}catch{console[_0x293a79(0x1e6)](_0x5c55b3['yWdAx']);}}async function tryAutoRouteCloudProfile(_0x53c350,_0x233b70,_0x13cfb0,_0x21a5dd,_0xd298d){const _0x37ae2d=_0x1902cd,_0x44a09a={'sCOsm':function(_0x30e0aa){return _0x30e0aa();},'OLBKu':function(_0x7d486c,_0x4c67a0){return _0x7d486c instanceof _0x4c67a0;},'JoWVV':function(_0x406f83,_0x379f3e,_0x44b93c,_0x54f2b9,_0x50cab8){return _0x406f83(_0x379f3e,_0x44b93c,_0x54f2b9,_0x50cab8);},'EluzQ':_0x37ae2d(0x1e4),'GtPmR':function(_0x46806e,_0x558066){return _0x46806e+_0x558066;},'bcatX':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','InGZb':function(_0x53cdb8,_0x3a96c9,_0x2e6dfe,_0x3ab806){return _0x53cdb8(_0x3a96c9,_0x2e6dfe,_0x3ab806);},'dzYOC':function(_0x34153c){return _0x34153c();},'WMJgB':function(_0x29543f,_0x2c0a86){return _0x29543f instanceof _0x2c0a86;},'YRiGy':function(_0x218322,_0x3b5ba2){return _0x218322===_0x3b5ba2;},'OLpGB':function(_0x5d20b7,_0x4f7b06){return _0x5d20b7+_0x4f7b06;},'PmMdX':function(_0x10a32a,_0x515f95){return _0x10a32a(_0x515f95);}};let _0x52db5d;try{_0x52db5d=await _0x44a09a[_0x37ae2d(0x199)](fetchAuthConfig);}catch(_0x4d4c82){return _0xd298d?.[_0x37ae2d(0x190)](_0x37ae2d(0x1e4),{'reason':_0x37ae2d(0x18b),'profileName':_0x53c350}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x44a09a['OLBKu'](_0x4d4c82,Error)?_0x4d4c82[_0x37ae2d(0x1d1)]:String(_0x4d4c82))),![];}if(!_0x52db5d||!_0x52db5d[_0x37ae2d(0x17c)]||Object[_0x37ae2d(0x1f4)](_0x52db5d[_0x37ae2d(0x17c)])['length']===0x0){if(_0x21a5dd)return await _0x44a09a[_0x37ae2d(0x1ee)](captureEnvLessProfile,_0x53c350,_0x233b70,_0x13cfb0,_0xd298d);return _0xd298d?.['trackPhaseEnd'](_0x44a09a['EluzQ'],{'reason':_0x37ae2d(0x18b),'profileName':_0x53c350}),console['error'](_0x44a09a['GtPmR'](_0x44a09a['GtPmR']('\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'+_0x44a09a[_0x37ae2d(0x1f3)],_0x37ae2d(0x18c)+_0x53c350+_0x37ae2d(0x1dc)+_0x233b70+_0x37ae2d(0x177))+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a')+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x5b99ad=matchAuthEnvironment(_0x233b70,_0x52db5d);if(!_0x5b99ad)return _0xd298d?.['trackPhaseEnd'](_0x37ae2d(0x1e4),{'reason':_0x37ae2d(0x1e0),'profileName':_0x53c350}),console[_0x37ae2d(0x1a9)](_0x37ae2d(0x1a7)+_0x233b70+_0x37ae2d(0x1de)+Object['keys'](_0x52db5d['environments'])['join'](',\x20')+'.'),![];const _0x1847a5=_0x52db5d[_0x37ae2d(0x17c)][_0x5b99ad],_0x5a0c7e=_0x1847a5?.['domains']??[];if(_0x21a5dd&&!_0x13cfb0[_0x37ae2d(0x1db)]){const {saveToCloud:_0x2e20fc}=await _0x2412c['prompt']([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x5b99ad+'\x27\x20matching\x20'+_0x233b70+'\x0a\x20\x20(domains:\x20'+_0x5a0c7e[_0x37ae2d(0x188)](',\x20')+_0x37ae2d(0x18e)+_0x53c350+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2e20fc)return _0xd298d?.['trackPhaseEnd'](_0x44a09a['EluzQ'],{'reason':_0x37ae2d(0x1b1),'profileName':_0x53c350}),console['error'](_0x37ae2d(0x17d)),![];}const _0x4dd82f=_0x5a0c7e['some'](_0x327905=>{const _0x2c55fa=_0x37ae2d;try{return new URL(_0x327905)[_0x2c55fa(0x1a1)]===new URL(_0x233b70)['origin'];}catch{return![];}}),_0x1de2d1={};!_0x4dd82f&&(_0x1de2d1[_0x37ae2d(0x1b4)]=_0x233b70);try{await _0x44a09a[_0x37ae2d(0x19f)](createCloudProfile,_0x53c350,_0x5b99ad,{'settings':_0x1de2d1}),_0x44a09a['dzYOC'](warnCloudProfileSharedInOrg);}catch(_0x2261ce){if(_0x44a09a['WMJgB'](_0x2261ce,ApiError)&&_0x44a09a[_0x37ae2d(0x197)](_0x2261ce['status'],0x199)){console['error'](_0x44a09a[_0x37ae2d(0x187)](_0x37ae2d(0x1e2)+_0x53c350+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x37ae2d(0x1a4)+_0x53c350));throw _0x2261ce;}throw _0x2261ce;}return console['log'](_0x44a09a['OLpGB']('✓\x20Profile\x20\x27'+_0x53c350+_0x37ae2d(0x193),_0x37ae2d(0x1d7)+_0x53c350)),await _0x44a09a['PmMdX'](sweepOrphansBestEffort,_0x53c350),_0xd298d?.[_0x37ae2d(0x190)](_0x37ae2d(0x18f),{'envKey':_0x5b99ad,'profileName':_0x53c350}),!![];}async function createUnconfiguredCloudProfile(_0x185a01,_0x561c3f){const _0x363cdd=_0x1902cd,_0x23833f={'gdJnc':function(_0x4c8e7c,_0x4abe62,_0x36cf03,_0x25331d){return _0x4c8e7c(_0x4abe62,_0x36cf03,_0x25331d);},'KoTiJ':function(_0x46e277){return _0x46e277();}};try{await _0x23833f['gdJnc'](createCloudProfile,_0x185a01,undefined,{'settings':_0x561c3f}),_0x23833f[_0x363cdd(0x17a)](warnCloudProfileSharedInOrg);}catch(_0xde022a){_0xde022a instanceof ApiError&&_0xde022a['status']===0x199&&console[_0x363cdd(0x1a9)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x185a01+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x185a01));throw _0xde022a;}}function _0x4764(_0x43c729,_0x5f176e){_0x43c729=_0x43c729-0x170;const _0x193c4c=_0x193c();let _0x47644=_0x193c4c[_0x43c729];return _0x47644;}async function captureEnvLessProfile(_0x1829f2,_0x15caf3,_0x215710,_0x2428f6){const _0x126df8=_0x1902cd,_0x473334={'KVWXP':_0x126df8(0x1a5),'mkJfw':function(_0x4d8644,_0x31823e){return _0x4d8644===_0x31823e;},'hgBML':function(_0x2193fd,_0x1084cd){return _0x2193fd+_0x1084cd;},'JUVYG':function(_0x115271,_0x23b02e){return _0x115271>_0x23b02e;},'cpJCQ':function(_0x52e3af,_0x421775,_0x47aacf,_0x2e9dc0){return _0x52e3af(_0x421775,_0x47aacf,_0x2e9dc0);},'lsPNp':function(_0x118164){return _0x118164();},'kYZIN':function(_0x541293,_0x2baf5e){return _0x541293+_0x2baf5e;},'SWVAU':function(_0x125fb8,_0xd0746c,_0x466c16){return _0x125fb8(_0xd0746c,_0x466c16);},'dQkiX':function(_0x150d19,_0x356033){return _0x150d19(_0x356033);},'gsckp':'profile.add.autoRouted'};if(!_0x215710[_0x126df8(0x1db)]){const {capture:_0x3af564}=await _0x2412c['prompt']([{'type':'confirm','name':_0x126df8(0x1ca),'message':_0x473334[_0x126df8(0x17f)],'default':!![]}]);if(!_0x3af564)return _0x2428f6?.[_0x126df8(0x190)]('profile.add.autoRouteSkipped',{'reason':_0x126df8(0x1b1),'profileName':_0x1829f2}),console[_0x126df8(0x1a9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x126df8(0x175)),![];}const _0x35fac0={};if(_0x215710[_0x126df8(0x1aa)])for(const _0x1805b2 of _0x215710['setupHeader']){const _0x4f31f6=_0x1805b2[_0x126df8(0x1cd)](':');if(_0x473334[_0x126df8(0x1d3)](_0x4f31f6,-0x1))continue;_0x35fac0[_0x1805b2[_0x126df8(0x1a2)](0x0,_0x4f31f6)[_0x126df8(0x1dd)]()]=_0x1805b2['slice'](_0x473334[_0x126df8(0x17b)](_0x4f31f6,0x1))[_0x126df8(0x1dd)]();}const _0xa4a2ca={'baseUrl':_0x15caf3};_0x473334['JUVYG'](Object['keys'](_0x35fac0)[_0x126df8(0x1d9)],0x0)&&(_0xa4a2ca['setupHeaders']=_0x35fac0);let _0x1e3d15;try{_0x1e3d15=await _0x473334['cpJCQ'](createCloudProfile,_0x1829f2,undefined,{'settings':_0xa4a2ca}),_0x473334['lsPNp'](warnCloudProfileSharedInOrg);}catch(_0x239679){_0x239679 instanceof ApiError&&_0x239679[_0x126df8(0x171)]===0x199&&console[_0x126df8(0x1a9)](_0x473334[_0x126df8(0x19e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1829f2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x126df8(0x1a4)+_0x1829f2));throw _0x239679;}return await _0x473334[_0x126df8(0x191)](manualBrowserLogin,_0x1e3d15,{'key':'','domains':[_0x15caf3],'setupHeaders':_0x473334[_0x126df8(0x1b5)](Object['keys'](_0x35fac0)[_0x126df8(0x1d9)],0x0)?_0x35fac0:undefined}),console[_0x126df8(0x1e6)](_0x126df8(0x1ed)+_0x1829f2+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x126df8(0x1d7)+_0x1829f2)),await _0x473334[_0x126df8(0x1eb)](sweepOrphansBestEffort,_0x1829f2),_0x2428f6?.[_0x126df8(0x190)](_0x473334['gsckp'],{'envKey':null,'profileName':_0x1829f2}),!![];}export async function addEnv(_0x428740,_0x45d965={},_0x2775bc){const _0x29993c=_0x1902cd,_0x59bf47={'TAtHw':function(_0x5e27f7,_0x4b5e7d){return _0x5e27f7+_0x4b5e7d;},'CBSIB':function(_0x95a9a6,_0x260d2d){return _0x95a9a6+_0x260d2d;},'ZwBRS':_0x29993c(0x1ea),'hNfOO':_0x29993c(0x1b7),'qbuwQ':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','TBTUA':'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','BoHvB':function(_0x469fa8,_0x556b59){return _0x469fa8>_0x556b59;},'FWmrI':function(_0x5dea46,_0xfd5ee9,_0x6e7999){return _0x5dea46(_0xfd5ee9,_0x6e7999);},'zJXqt':function(_0xbca5e4,_0x11eb1e,_0x311fa4,_0x138c1d,_0x24427a){return _0xbca5e4(_0x11eb1e,_0x311fa4,_0x138c1d,_0x24427a);},'yzHgv':'cdpEndpoint','utZUP':function(_0x3e72b1,_0x332d5e){return _0x3e72b1 instanceof _0x332d5e;},'tgyDE':function(_0x372e20,_0x12c2ea){return _0x372e20(_0x12c2ea);},'WtEXC':function(_0x39f5fd,_0x2f700b){return _0x39f5fd(_0x2f700b);},'ystwN':function(_0x9b282b,_0x1bb02a){return _0x9b282b>_0x1bb02a;},'AxAhE':_0x29993c(0x1c0),'MZRYG':'input','ykNnv':'baseUrl','zxYQD':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','VbYtH':'http://localhost:3000','HaDSk':_0x29993c(0x1e7),'pKdWY':'What\x20would\x20you\x20like\x20to\x20do?','MHyka':function(_0x299b16,_0x26b9d9){return _0x299b16===_0x26b9d9;},'fjXSw':function(_0x146708,_0x35f190){return _0x146708(_0x35f190);}};_0x45d965['ci']&&(console[_0x29993c(0x1a9)](_0x59bf47[_0x29993c(0x18d)](_0x59bf47[_0x29993c(0x1da)](_0x59bf47[_0x29993c(0x1da)](_0x59bf47['ZwBRS']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a')+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a',_0x59bf47[_0x29993c(0x1ef)])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x29993c(0x1c1))),process['exit'](0x1));const _0x5089c9={};if(_0x45d965['setupHeader'])for(const _0x669221 of _0x45d965['setupHeader']){const _0x237450=_0x669221['indexOf'](':');if(_0x237450===-0x1)throw new Error(_0x29993c(0x1d4)+_0x669221+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x1749bb=_0x669221[_0x29993c(0x1a2)](0x0,_0x237450)['trim'](),_0xf9813a=_0x669221['slice'](_0x59bf47['CBSIB'](_0x237450,0x1))[_0x29993c(0x1dd)]();_0x5089c9[_0x1749bb]=_0xf9813a;}if(_0x45d965['cdpEndpoint']!==undefined&&_0x45d965[_0x29993c(0x1f1)]['trim']()==='')throw new Error(_0x29993c(0x1b3));if(_0x45d965[_0x29993c(0x1f1)]&&_0x45d965[_0x29993c(0x1df)])throw new Error(_0x59bf47['qbuwQ']);const _0x5469cd=Boolean(_0x45d965['cdpEndpoint']),_0x2281ec=process['stdin'][_0x29993c(0x198)]&&process[_0x29993c(0x194)]['isTTY'];if(!_0x2281ec&&!_0x45d965['url']&&!_0x5469cd&&!_0x45d965[_0x29993c(0x182)])throw new Error(_0x59bf47[_0x29993c(0x19a)]);if(_0x5469cd){const _0x387e91=_0x45d965[_0x29993c(0x1f1)];console[_0x29993c(0x1e6)](_0x29993c(0x181)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x387e91);const _0x18cccf={'cdpEndpoint':_0x387e91,'isElectron':!![]};_0x59bf47[_0x29993c(0x184)](Object[_0x29993c(0x1f4)](_0x5089c9)['length'],0x0)&&(_0x18cccf[_0x29993c(0x183)]=_0x5089c9);await _0x59bf47[_0x29993c(0x172)](createUnconfiguredCloudProfile,_0x428740,_0x18cccf);try{_0x59bf47['zJXqt'](setProfileOverride,process[_0x29993c(0x192)](),_0x428740,_0x59bf47[_0x29993c(0x1e1)],_0x387e91),_0x59bf47['zJXqt'](setProfileOverride,process['cwd'](),_0x428740,_0x29993c(0x1cf),!![]);}catch(_0x158669){console[_0x29993c(0x1a9)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x59bf47['utZUP'](_0x158669,Error)?_0x158669['message']:String(_0x158669)));}console[_0x29993c(0x1e6)]('✓\x20Cloud\x20profile\x20\x27'+_0x428740+'\x27\x20created\x20(CDP).'),await _0x59bf47[_0x29993c(0x1c4)](sweepOrphansBestEffort,_0x428740),await _0x59bf47[_0x29993c(0x1b2)](markActive,_0x428740);return;}if(_0x45d965['skipAuth']){const _0x4268c4={};_0x45d965['url']&&(_0x4268c4[_0x29993c(0x1b4)]=_0x45d965[_0x29993c(0x1df)]);_0x59bf47['ystwN'](Object['keys'](_0x5089c9)['length'],0x0)&&(_0x4268c4[_0x29993c(0x183)]=_0x5089c9);await _0x59bf47[_0x29993c(0x172)](createUnconfiguredCloudProfile,_0x428740,_0x4268c4),console['log'](_0x29993c(0x1af)+_0x428740+'\x27\x20created\x20(no\x20session).\x0a'+(_0x29993c(0x179)+_0x428740+_0x29993c(0x18a))),await sweepOrphansBestEffort(_0x428740),await _0x59bf47['tgyDE'](markActive,_0x428740);return;}if(_0x45d965[_0x29993c(0x1df)]){const _0x3b3f77=_0x45d965[_0x29993c(0x1df)],_0x358a38=await _0x59bf47[_0x29993c(0x1c4)](checkUrlReachability,_0x3b3f77);if(!_0x358a38['ok']&&!_0x45d965['force'])throw new Error(_0x29993c(0x19b)+_0x3b3f77+':\x20'+_0x358a38['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x358a38['ok']&&_0x45d965['force']&&console[_0x29993c(0x1e6)](_0x29993c(0x1f0)+_0x3b3f77+':\x20'+_0x358a38['error']+_0x29993c(0x1d0));}else{console['log'](_0x29993c(0x195)),console[_0x29993c(0x1e6)](_0x59bf47['AxAhE']),console[_0x29993c(0x1e6)](_0x29993c(0x185));let _0x18563e='',_0x2cf923=![];while(!![]){const _0x352084=await _0x2412c[_0x29993c(0x1a3)]([{'type':_0x59bf47['MZRYG'],'name':_0x59bf47[_0x29993c(0x1ae)],'message':_0x2cf923?_0x59bf47['zxYQD']:_0x29993c(0x1d2),'default':_0x18563e||_0x59bf47[_0x29993c(0x1c2)]}]);_0x18563e=_0x352084[_0x29993c(0x1b4)];const _0x4728ba=await checkUrlReachability(_0x18563e);if(_0x4728ba['ok'])break;const _0x64888f=/^[a-zA-Z][\w+.-]*:\/\//[_0x29993c(0x1d8)](_0x18563e),_0x22fd85=_0x4728ba['isProtocolError']&&!_0x64888f,_0x574a2f=_0x22fd85?_0x29993c(0x1bc)+_0x18563e:null;_0x2cf923=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x18563e+':\x20'+_0x4728ba[_0x29993c(0x1a9)]);_0x574a2f&&console[_0x29993c(0x1e6)](_0x29993c(0x19c)+_0x574a2f+'?');const {action:_0x52bbec}=await _0x2412c['prompt']([{'type':_0x29993c(0x1b0),'name':_0x59bf47[_0x29993c(0x1c6)],'message':_0x59bf47[_0x29993c(0x1e9)],'choices':[..._0x574a2f?[{'name':_0x29993c(0x186)+_0x574a2f,'value':'use_suggestion'}]:[],{'name':_0x29993c(0x1a6),'value':_0x29993c(0x170)},{'name':'Continue\x20anyway','value':_0x29993c(0x176)}]}]);if(_0x52bbec==='use_suggestion'&&_0x574a2f){_0x18563e=_0x574a2f;const _0xa7f3db=await _0x59bf47['tgyDE'](checkUrlReachability,_0x18563e);if(_0xa7f3db['ok'])break;console[_0x29993c(0x1e6)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x18563e+':\x20'+_0xa7f3db['error']);}else{if(_0x59bf47[_0x29993c(0x1a0)](_0x52bbec,_0x29993c(0x176)))break;}}_0x45d965={..._0x45d965,'url':_0x18563e};}let _0x1dec5d=![];try{_0x1dec5d=await tryAutoRouteCloudProfile(_0x428740,_0x45d965[_0x29993c(0x1df)],_0x45d965,_0x2281ec,_0x2775bc);}catch(_0x4dbb81){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x428740+'\x22:\x20'+(_0x4dbb81 instanceof Error?_0x4dbb81[_0x29993c(0x1d1)]:String(_0x4dbb81))),process[_0x29993c(0x1c8)](0x1);}!_0x1dec5d&&process['exit'](0x1),await _0x59bf47[_0x29993c(0x1c5)](markActive,_0x428740);}
|
|
1
|
+
(function(_0x3f6e34,_0x3f2072){const _0x2b837f=_0x1c00,_0x52accb=_0x3f6e34();while(!![]){try{const _0x1a6036=parseInt(_0x2b837f(0xf0))/0x1+-parseInt(_0x2b837f(0xcb))/0x2*(-parseInt(_0x2b837f(0xeb))/0x3)+-parseInt(_0x2b837f(0xf6))/0x4*(parseInt(_0x2b837f(0x101))/0x5)+parseInt(_0x2b837f(0x10b))/0x6*(-parseInt(_0x2b837f(0xfa))/0x7)+parseInt(_0x2b837f(0xf4))/0x8+parseInt(_0x2b837f(0x112))/0x9+parseInt(_0x2b837f(0x139))/0xa*(parseInt(_0x2b837f(0x121))/0xb);if(_0x1a6036===_0x3f2072)break;else _0x52accb['push'](_0x52accb['shift']());}catch(_0x4ca3a9){_0x52accb['push'](_0x52accb['shift']());}}}(_0x2a26,0xddf8e));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5f15cb from'inquirer';function _0x2a26(){const _0x3f25d2=['eTStz','warn','HoQuG','use_suggestion','trim','skipAuth','isElectron','no_match','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','yes','3UIIZiL','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','DTluw','Gckqc','avSNb','481237aDlqgp','Aqooy','gKyXX','keys','3997232sgiGcQ','fwuLq','184oZJBzB','error','Could\x20not\x20reach\x20','trackPhaseEnd','7sHmltQ','capture','isProtocolError','WYCVL','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','join','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','138715Nvuihu','origin','lhWiq','PYGVV','ugTWU','status','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','ZdJuf','cwd','lSOeT','769854iaVZYo','\x27\x20created\x20(no\x20session).\x0a','HEAD','log','OaJAY','cdpEndpoint','message','6367554OpPFfL','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','fetch\x20failed','MlTeQ','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','exit','Invalid\x20--setup-header\x20format:\x20\x22','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','length','\x27\x20matching\x20','uyYzW','\x20(continuing\x20with\x20--force)','jVeSd','profile.add.autoRouteSkipped','\x0a\x20\x20A\x20profile\x20named\x20\x22','50809oXrRft','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','name','kNCKF','vDSCe','What\x20would\x20you\x20like\x20to\x20do?','PHvUE','environments','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20--url\x20','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','YIyCK','url','signal','isTTY','NODE_TLS_REJECT_UNAUTHORIZED','BfEuG','startsWith','gOhXC','UmWzH','FyFoM','force','sfUJP','HTTP\x20','1210DNNqiR','prompt','\x20--skip-auth\x0a','setupHeaders','Found\x20auth\x20environment\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','hSMxU','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','uvUAi','\x27\x20to\x20the\x20cloud?','132778PWYbCI','xHZZY','✓\x20Cloud\x20profile\x20\x27','\x0a✓\x20Profile\x20\x27','\x27\x20created\x20(CDP).','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','uxHgv','RKsJj','env','slice','OqDtT','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','pyXYm','domains','yVWHW','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','Vhrvz','confirm','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','setupHeader','JtNxe','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'];_0x2a26=function(){return _0x3f25d2;};return _0x2a26();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x38df9f=_0x1c00;if(!process['stdout'][_0x38df9f(0x12f)])return;console[_0x38df9f(0xe2)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x25f666){const _0x1da87a=_0x1c00,_0x4cc8be={'BfEuG':function(_0x54bb52,_0x242f1e,_0x52ab57){return _0x54bb52(_0x242f1e,_0x52ab57);},'jzSbZ':_0x1da87a(0x10d),'YZxWX':'manual','Gckqc':function(_0x587caa,_0x4adb97){return _0x587caa(_0x4adb97);},'FyFoM':function(_0x41e468,_0x57f55d){return _0x41e468<_0x57f55d;},'OqDtT':function(_0x479575,_0x4c4648){return _0x479575===_0x4c4648;},'qEeKg':_0x1da87a(0x114)};try{const _0x109179=new AbortController(),_0x336c7c=_0x4cc8be[_0x1da87a(0x131)](setTimeout,()=>_0x109179['abort'](),0x1388),_0x9fe0b7={'method':_0x4cc8be['jzSbZ'],'signal':_0x109179[_0x1da87a(0x12e)],'redirect':_0x4cc8be['YZxWX']};/^https:\/\/localhost(:\d+)?/i['test'](_0x25f666)&&(process[_0x1da87a(0xd3)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x2872b6=await fetch(_0x25f666,_0x9fe0b7);delete process[_0x1da87a(0xd3)][_0x1da87a(0x130)],_0x4cc8be[_0x1da87a(0xee)](clearTimeout,_0x336c7c);if(_0x4cc8be[_0x1da87a(0x135)](_0x2872b6[_0x1da87a(0x106)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x1da87a(0x138)+_0x2872b6['status']};}catch(_0x55eaf6){delete process[_0x1da87a(0xd3)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x48f425=_0x55eaf6,_0x4e97b3=_0x48f425[_0x1da87a(0x111)]||String(_0x55eaf6),_0x38b363=_0x4e97b3['includes']('Invalid\x20URL')||_0x4cc8be[_0x1da87a(0xd5)](_0x48f425[_0x1da87a(0x123)],'TypeError')||_0x4e97b3['includes'](_0x4cc8be['qEeKg']);return{'ok':![],'error':_0x4e97b3,'isProtocolError':_0x38b363};}}async function sweepOrphanLocalProfile(_0x15cce9,_0x4d66af,_0x27d18e){const _0x973b33=_0x1c00,_0x27def4={'mOzqb':function(_0x1c30ec,_0x25d354,_0x50ec4f){return _0x1c30ec(_0x25d354,_0x50ec4f);},'YIyCK':function(_0x2db020,_0x40d8e5,_0x1696dc){return _0x2db020(_0x40d8e5,_0x1696dc);},'ZtvBD':function(_0x5e73f7,_0xfc23d7){return _0x5e73f7(_0xfc23d7);},'uyYzW':function(_0x1c42be,_0x54377f,_0x449f57){return _0x1c42be(_0x54377f,_0x449f57);}},_0x4eed14=_0x27def4['mOzqb'](join,_0x4d66af,'local'),_0xf04e77=_0x27def4[_0x973b33(0x12c)](join,_0x4eed14,_0x15cce9);_0x27def4['ZtvBD'](existsSync,_0xf04e77)&&(_0x27d18e&&await isPathGitTracked(_0xf04e77)?console[_0x973b33(0x10e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xf04e77+_0x973b33(0x107)):(await _0x27def4[_0x973b33(0x11c)](rm,_0xf04e77,{'recursive':!![],'force':!![]}),console[_0x973b33(0x10e)](_0x973b33(0xe0)+_0xf04e77)));if(existsSync(_0x4eed14)){let _0x4b6a30=[];try{_0x4b6a30=await readdir(_0x4eed14);}catch{return;}const _0x4d5adc='.tmp-'+_0x15cce9+'-';for(const _0x19736d of _0x4b6a30){if(!_0x19736d[_0x973b33(0x132)](_0x4d5adc))continue;const _0x3e0b6f=join(_0x4eed14,_0x19736d);await rm(_0x3e0b6f,{'recursive':!![],'force':!![]}),console['log'](_0x973b33(0xe0)+_0x3e0b6f);}}}async function sweepOrphansBestEffort(_0x14d28f){const _0x1b1ace=_0x1c00,_0x2d0602={'eEZjH':function(_0x291512){return _0x291512();},'cRkdC':function(_0x3fc46a,_0x68a4d6){return _0x3fc46a!==_0x68a4d6;},'dRQCQ':function(_0x4f7acf){return _0x4f7acf();},'YBDyt':function(_0x5dd946,_0x53b8e2){return _0x5dd946 instanceof _0x53b8e2;},'eYaRY':function(_0x2ab3c5,_0x26ddb8){return _0x2ab3c5(_0x26ddb8);}};try{await sweepOrphanLocalProfile(_0x14d28f,_0x2d0602['eEZjH'](getRangerHomeDir),![]);const _0x1823ae=_0x2d0602['eEZjH'](getRangerDir);_0x2d0602['cRkdC'](_0x1823ae,_0x2d0602['dRQCQ'](getRangerHomeDir))&&await sweepOrphanLocalProfile(_0x14d28f,_0x1823ae,!![]);}catch(_0x37c8fe){console['log'](_0x1b1ace(0xdd)+(_0x2d0602['YBDyt'](_0x37c8fe,Error)?_0x37c8fe[_0x1b1ace(0x111)]:_0x2d0602['eYaRY'](String,_0x37c8fe))+').');}}async function markActive(_0x1e9879){const _0x5d0f94=_0x1c00,_0x41b9d0={'MlTeQ':function(_0x2a674b,_0x15ea9d){return _0x2a674b(_0x15ea9d);},'hfFSY':_0x5d0f94(0x12b)};try{await _0x41b9d0[_0x5d0f94(0x115)](writeActiveProfileName,_0x1e9879),console[_0x5d0f94(0x10e)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1e9879);}catch{console['log'](_0x41b9d0['hfFSY']);}}async function tryAutoRouteCloudProfile(_0x543b1d,_0x40be54,_0x3a4789,_0x281f72,_0x269641){const _0x44f477=_0x1c00,_0x446667={'ilCOb':function(_0x1199f6,_0x471d5e){return _0x1199f6===_0x471d5e;},'UmWzH':_0x44f477(0x11f),'gOhXC':'no_auth_config','pyXYm':function(_0x30732c,_0xea0cc4){return _0x30732c+_0xea0cc4;},'OaJAY':function(_0x208db4,_0x461578){return _0x208db4+_0x461578;},'UZJcH':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','EfFbf':_0x44f477(0xe8),'uxHgv':function(_0x278922){return _0x278922();},'PYGVV':function(_0x26996f,_0x2b9285){return _0x26996f+_0x2b9285;},'frsFP':function(_0x4a6762,_0x202e0b){return _0x4a6762(_0x202e0b);},'BlwLY':'profile.add.autoRouted'};let _0x183323;try{_0x183323=await fetchAuthConfig();}catch(_0x12186f){return _0x269641?.[_0x44f477(0xf9)]('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x543b1d}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x12186f instanceof Error?_0x12186f[_0x44f477(0x111)]:String(_0x12186f))),![];}if(!_0x183323||!_0x183323[_0x44f477(0x128)]||_0x446667['ilCOb'](Object['keys'](_0x183323['environments'])['length'],0x0)){if(_0x281f72)return await captureEnvLessProfile(_0x543b1d,_0x40be54,_0x3a4789,_0x269641);return _0x269641?.[_0x44f477(0xf9)](_0x446667[_0x44f477(0x134)],{'reason':_0x446667[_0x44f477(0x133)],'profileName':_0x543b1d}),console['error'](_0x446667[_0x44f477(0xd7)](_0x446667['pyXYm'](_0x446667[_0x44f477(0x10f)]('\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')+_0x446667['UZJcH']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x543b1d+_0x44f477(0x12a)+_0x40be54+_0x44f477(0x13b))+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x44f477(0x113))),![];}const _0x343bd8=matchAuthEnvironment(_0x40be54,_0x183323);if(!_0x343bd8)return _0x269641?.[_0x44f477(0xf9)](_0x446667['UmWzH'],{'reason':_0x446667['EfFbf'],'profileName':_0x543b1d}),console['error'](_0x44f477(0xec)+_0x40be54+'.\x20Configured\x20envs:\x20'+Object[_0x44f477(0xf3)](_0x183323['environments'])[_0x44f477(0xff)](',\x20')+'.'),![];const _0xd2989d=_0x183323[_0x44f477(0x128)][_0x343bd8],_0x1b0502=_0xd2989d?.[_0x44f477(0xd8)]??[];if(_0x281f72&&!_0x3a4789[_0x44f477(0xea)]){const {saveToCloud:_0x179a94}=await _0x5f15cb['prompt']([{'type':'confirm','name':'saveToCloud','message':_0x44f477(0x13d)+_0x343bd8+_0x44f477(0x11b)+_0x40be54+'\x0a\x20\x20(domains:\x20'+_0x1b0502[_0x44f477(0xff)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x543b1d+_0x44f477(0x142),'default':!![]}]);if(!_0x179a94)return _0x269641?.['trackPhaseEnd'](_0x446667['UmWzH'],{'reason':'user_declined','profileName':_0x543b1d}),console[_0x44f477(0xf7)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x5eecad=_0x1b0502['some'](_0x21a174=>{const _0x24fc31=_0x44f477;try{return new URL(_0x21a174)[_0x24fc31(0x102)]===new URL(_0x40be54)['origin'];}catch{return![];}}),_0x5da8a1={};!_0x5eecad&&(_0x5da8a1['baseUrl']=_0x40be54);try{await createCloudProfile(_0x543b1d,_0x343bd8,{'settings':_0x5da8a1}),_0x446667[_0x44f477(0xd1)](warnCloudProfileSharedInOrg);}catch(_0x11639d){if(_0x11639d instanceof ApiError&&_0x11639d[_0x44f477(0x106)]===0x199){console['error'](_0x44f477(0x120)+_0x543b1d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x543b1d));throw _0x11639d;}throw _0x11639d;}return console['log'](_0x446667[_0x44f477(0x104)]('✓\x20Profile\x20\x27'+_0x543b1d+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x543b1d)),await _0x446667['frsFP'](sweepOrphansBestEffort,_0x543b1d),_0x269641?.['trackPhaseEnd'](_0x446667['BlwLY'],{'envKey':_0x343bd8,'profileName':_0x543b1d}),!![];}function _0x1c00(_0x5b573c,_0x48a88d){_0x5b573c=_0x5b573c-0xcb;const _0x2a26e0=_0x2a26();let _0x1c00d8=_0x2a26e0[_0x5b573c];return _0x1c00d8;}async function createUnconfiguredCloudProfile(_0x448ee3,_0x3f05fa){const _0x247d82=_0x1c00,_0x5c08c0={'OFpmf':function(_0x18dbf0,_0x1bbb18,_0x5c3521,_0x381f59){return _0x18dbf0(_0x1bbb18,_0x5c3521,_0x381f59);},'kmETs':function(_0x1f005b,_0x485898){return _0x1f005b instanceof _0x485898;},'jVeSd':function(_0x40defd,_0x463e35){return _0x40defd===_0x463e35;}};try{await _0x5c08c0['OFpmf'](createCloudProfile,_0x448ee3,undefined,{'settings':_0x3f05fa}),warnCloudProfileSharedInOrg();}catch(_0x441639){_0x5c08c0['kmETs'](_0x441639,ApiError)&&_0x5c08c0[_0x247d82(0x11e)](_0x441639['status'],0x199)&&console[_0x247d82(0xf7)](_0x247d82(0x120)+_0x448ee3+_0x247d82(0x13e)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x448ee3));throw _0x441639;}}async function captureEnvLessProfile(_0x418fca,_0x39a54c,_0x1ee5b6,_0x47ad6c){const _0x3bf10c=_0x1c00,_0xc02794={'TUjcM':_0x3bf10c(0xdc),'Vhrvz':_0x3bf10c(0xfb),'Imylq':'profile.add.autoRouteSkipped','uvUAi':'user_declined','eTStz':function(_0x1685d7,_0x840cdd){return _0x1685d7+_0x840cdd;},'KTSJO':function(_0x24e2a4,_0x2492b6){return _0x24e2a4===_0x2492b6;},'lSOeT':function(_0x3ca4e3,_0x4e0fbe){return _0x3ca4e3>_0x4e0fbe;},'DTluw':function(_0x4c2f34,_0x55f13b){return _0x4c2f34 instanceof _0x55f13b;},'yVWHW':function(_0x3e2c5f,_0x4ecf0d,_0x505afc){return _0x3e2c5f(_0x4ecf0d,_0x505afc);},'EufnM':function(_0x53f8d8,_0x35a669){return _0x53f8d8(_0x35a669);}};if(!_0x1ee5b6['yes']){const {capture:_0x2af969}=await _0x5f15cb[_0x3bf10c(0x13a)]([{'type':_0xc02794['TUjcM'],'name':_0xc02794[_0x3bf10c(0xdb)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x2af969)return _0x47ad6c?.['trackPhaseEnd'](_0xc02794['Imylq'],{'reason':_0xc02794[_0x3bf10c(0x141)],'profileName':_0x418fca}),console[_0x3bf10c(0xf7)](_0xc02794['eTStz']('\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 _0x278151={};if(_0x1ee5b6[_0x3bf10c(0xde)])for(const _0x559cec of _0x1ee5b6['setupHeader']){const _0x30b33d=_0x559cec['indexOf'](':');if(_0xc02794['KTSJO'](_0x30b33d,-0x1))continue;_0x278151[_0x559cec[_0x3bf10c(0xd4)](0x0,_0x30b33d)[_0x3bf10c(0xe5)]()]=_0x559cec[_0x3bf10c(0xd4)](_0xc02794[_0x3bf10c(0xe1)](_0x30b33d,0x1))['trim']();}const _0x2a59a6={'baseUrl':_0x39a54c};_0xc02794[_0x3bf10c(0x10a)](Object[_0x3bf10c(0xf3)](_0x278151)[_0x3bf10c(0x11a)],0x0)&&(_0x2a59a6[_0x3bf10c(0x13c)]=_0x278151);let _0x4eb7e8;try{_0x4eb7e8=await createCloudProfile(_0x418fca,undefined,{'settings':_0x2a59a6}),warnCloudProfileSharedInOrg();}catch(_0x362049){_0xc02794[_0x3bf10c(0xed)](_0x362049,ApiError)&&_0x362049['status']===0x199&&console[_0x3bf10c(0xf7)](_0x3bf10c(0x120)+_0x418fca+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x418fca));throw _0x362049;}return await _0xc02794[_0x3bf10c(0xd9)](manualBrowserLogin,_0x4eb7e8,{'key':'','domains':[_0x39a54c],'setupHeaders':_0xc02794['lSOeT'](Object[_0x3bf10c(0xf3)](_0x278151)[_0x3bf10c(0x11a)],0x0)?_0x278151:undefined}),console[_0x3bf10c(0x10e)](_0xc02794[_0x3bf10c(0xe1)](_0x3bf10c(0xce)+_0x418fca+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x3bf10c(0x129)+_0x418fca)),await _0xc02794['EufnM'](sweepOrphansBestEffort,_0x418fca),_0x47ad6c?.[_0x3bf10c(0xf9)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x418fca}),!![];}export async function addEnv(_0x3dedfe,_0x386fc8={},_0x5e30cf){const _0x4e09be=_0x1c00,_0x30ad6d={'JtNxe':function(_0x5a6685,_0x10584c){return _0x5a6685+_0x10584c;},'MQPVh':function(_0xf30161,_0x2360cb){return _0xf30161+_0x2360cb;},'KkwwF':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','Aqooy':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','hcjZi':_0x4e09be(0x116),'WYCVL':function(_0x19c64d,_0x15da5b){return _0x19c64d!==_0x15da5b;},'wHqwB':function(_0x4dd9fe,_0x253d68){return _0x4dd9fe===_0x253d68;},'FDYqn':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','HoQuG':function(_0x4e5201,_0x24f242){return _0x4e5201(_0x24f242);},'PHvUE':function(_0x432318){return _0x432318();},'gKyXX':_0x4e09be(0x140),'xHZZY':function(_0x51df96,_0x5b24c9){return _0x51df96>_0x5b24c9;},'JUcDU':function(_0x657f68,_0x57da53,_0x3d3f27){return _0x657f68(_0x57da53,_0x3d3f27);},'kNCKF':function(_0x5d4301,_0x33f620,_0x223f8c,_0x23d7cd,_0xd5f4e9){return _0x5d4301(_0x33f620,_0x223f8c,_0x23d7cd,_0xd5f4e9);},'zbBMG':_0x4e09be(0x110),'BCTgq':_0x4e09be(0xe7),'qHVpT':function(_0x2a5f48,_0x10949d){return _0x2a5f48 instanceof _0x10949d;},'ZdJuf':function(_0x6a8dc6,_0x15a694){return _0x6a8dc6(_0x15a694);},'TEPEA':'\x0a🌐\x20Profile\x20Setup\x0a','pvbTw':'input','lhWiq':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','kbfzj':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','ALOCP':'http://localhost:3000','ugTWU':'list','sfUJP':'use_suggestion','avSNb':'retry','hSMxU':'Continue\x20anyway','RKsJj':'continue','vDSCe':function(_0x4e9f22,_0x5aa428){return _0x4e9f22===_0x5aa428;},'fwuLq':function(_0x184beb,_0x54a45e){return _0x184beb instanceof _0x54a45e;}};_0x386fc8['ci']&&(console[_0x4e09be(0xf7)](_0x30ad6d[_0x4e09be(0xdf)](_0x30ad6d['MQPVh'](_0x30ad6d['KkwwF'],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a')+'\x0a',_0x30ad6d[_0x4e09be(0xf1)])+_0x30ad6d['hcjZi']+'\x0a'+_0x4e09be(0xd0)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x268520={};if(_0x386fc8[_0x4e09be(0xde)])for(const _0x45e680 of _0x386fc8[_0x4e09be(0xde)]){const _0x5717e1=_0x45e680['indexOf'](':');if(_0x5717e1===-0x1)throw new Error(_0x4e09be(0x118)+_0x45e680+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x3f42ea=_0x45e680[_0x4e09be(0xd4)](0x0,_0x5717e1)[_0x4e09be(0xe5)](),_0x148e22=_0x45e680['slice'](_0x5717e1+0x1)[_0x4e09be(0xe5)]();_0x268520[_0x3f42ea]=_0x148e22;}if(_0x30ad6d[_0x4e09be(0xfd)](_0x386fc8[_0x4e09be(0x110)],undefined)&&_0x30ad6d['wHqwB'](_0x386fc8[_0x4e09be(0x110)][_0x4e09be(0xe5)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x386fc8[_0x4e09be(0x110)]&&_0x386fc8[_0x4e09be(0x12d)])throw new Error(_0x30ad6d['FDYqn']);const _0xd56088=_0x30ad6d['HoQuG'](Boolean,_0x386fc8['cdpEndpoint']),_0xe6ac60=_0x30ad6d[_0x4e09be(0x127)](isInteractive);if(!_0xe6ac60&&!_0x386fc8['url']&&!_0xd56088&&!_0x386fc8['skipAuth'])throw new Error(_0x30ad6d[_0x4e09be(0xf2)]);if(_0xd56088){const _0x8ed838=_0x386fc8[_0x4e09be(0x110)];console['log'](_0x4e09be(0x100)),console['log'](_0x4e09be(0xda)+_0x8ed838);const _0x31494a={'cdpEndpoint':_0x8ed838,'isElectron':!![]};_0x30ad6d['xHZZY'](Object['keys'](_0x268520)['length'],0x0)&&(_0x31494a['setupHeaders']=_0x268520);await _0x30ad6d['JUcDU'](createUnconfiguredCloudProfile,_0x3dedfe,_0x31494a);try{_0x30ad6d['kNCKF'](setProfileOverride,process[_0x4e09be(0x109)](),_0x3dedfe,_0x30ad6d['zbBMG'],_0x8ed838),_0x30ad6d[_0x4e09be(0x124)](setProfileOverride,process[_0x4e09be(0x109)](),_0x3dedfe,_0x30ad6d['BCTgq'],!![]);}catch(_0x3c8cf0){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x30ad6d['qHVpT'](_0x3c8cf0,Error)?_0x3c8cf0[_0x4e09be(0x111)]:_0x30ad6d[_0x4e09be(0xe3)](String,_0x3c8cf0)));}console['log'](_0x4e09be(0xcd)+_0x3dedfe+_0x4e09be(0xcf)),await _0x30ad6d['ZdJuf'](sweepOrphansBestEffort,_0x3dedfe),await markActive(_0x3dedfe);return;}if(_0x386fc8[_0x4e09be(0xe6)]){const _0x1e0ef1={};_0x386fc8['url']&&(_0x1e0ef1['baseUrl']=_0x386fc8[_0x4e09be(0x12d)]);_0x30ad6d[_0x4e09be(0xcc)](Object['keys'](_0x268520)[_0x4e09be(0x11a)],0x0)&&(_0x1e0ef1['setupHeaders']=_0x268520);await _0x30ad6d['JUcDU'](createUnconfiguredCloudProfile,_0x3dedfe,_0x1e0ef1),console['log']('✓\x20Profile\x20\x27'+_0x3dedfe+_0x4e09be(0x10c)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x3dedfe+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3dedfe),await _0x30ad6d[_0x4e09be(0x108)](markActive,_0x3dedfe);return;}if(_0x386fc8[_0x4e09be(0x12d)]){const _0x521df1=_0x386fc8['url'],_0x3938f3=await _0x30ad6d['ZdJuf'](checkUrlReachability,_0x521df1);if(!_0x3938f3['ok']&&!_0x386fc8[_0x4e09be(0x136)])throw new Error(_0x4e09be(0xf8)+_0x521df1+':\x20'+_0x3938f3['error']+_0x4e09be(0xfe));!_0x3938f3['ok']&&_0x386fc8[_0x4e09be(0x136)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x521df1+':\x20'+_0x3938f3['error']+_0x4e09be(0x11d));}else{console[_0x4e09be(0x10e)](_0x30ad6d['TEPEA']),console[_0x4e09be(0x10e)](_0x4e09be(0x119)),console['log'](_0x4e09be(0xd6));let _0x4401da='',_0x387c22=![];while(!![]){const _0x1439b0=await _0x5f15cb[_0x4e09be(0x13a)]([{'type':_0x30ad6d['pvbTw'],'name':'baseUrl','message':_0x387c22?_0x30ad6d[_0x4e09be(0x103)]:_0x30ad6d['kbfzj'],'default':_0x4401da||_0x30ad6d['ALOCP']}]);_0x4401da=_0x1439b0['baseUrl'];const _0x211c93=await checkUrlReachability(_0x4401da);if(_0x211c93['ok'])break;const _0x4d1d00=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x4401da),_0x41d648=_0x211c93[_0x4e09be(0xfc)]&&!_0x4d1d00,_0x3e4b95=_0x41d648?'http://'+_0x4401da:null;_0x387c22=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x4401da+':\x20'+_0x211c93[_0x4e09be(0xf7)]);_0x3e4b95&&console[_0x4e09be(0x10e)]('\x20\x20Did\x20you\x20mean\x20'+_0x3e4b95+'?');const {action:_0x2d7111}=await _0x5f15cb[_0x4e09be(0x13a)]([{'type':_0x30ad6d[_0x4e09be(0x105)],'name':'action','message':_0x4e09be(0x126),'choices':[..._0x3e4b95?[{'name':'Use\x20'+_0x3e4b95,'value':_0x30ad6d[_0x4e09be(0x137)]}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x30ad6d[_0x4e09be(0xef)]},{'name':_0x30ad6d[_0x4e09be(0x13f)],'value':_0x30ad6d[_0x4e09be(0xd2)]}]}]);if(_0x2d7111===_0x4e09be(0xe4)&&_0x3e4b95){_0x4401da=_0x3e4b95;const _0x1f6015=await checkUrlReachability(_0x4401da);if(_0x1f6015['ok'])break;console[_0x4e09be(0x10e)](_0x4e09be(0x122)+_0x4401da+':\x20'+_0x1f6015[_0x4e09be(0xf7)]);}else{if(_0x30ad6d[_0x4e09be(0x125)](_0x2d7111,_0x30ad6d[_0x4e09be(0xd2)]))break;}}_0x386fc8={..._0x386fc8,'url':_0x4401da};}let _0x561a87=![];try{_0x561a87=await tryAutoRouteCloudProfile(_0x3dedfe,_0x386fc8['url'],_0x386fc8,_0xe6ac60,_0x5e30cf);}catch(_0xcb458c){console['error'](_0x4e09be(0xe9)+_0x3dedfe+'\x22:\x20'+(_0x30ad6d[_0x4e09be(0xf5)](_0xcb458c,Error)?_0xcb458c[_0x4e09be(0x111)]:String(_0xcb458c))),process[_0x4e09be(0x117)](0x1);}!_0x561a87&&process[_0x4e09be(0x117)](0x1),await markActive(_0x3dedfe);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a6b06,_0x37b0b6){var _0x43c44b=_0x44fa,_0x95ac06=_0x1a6b06();while(!![]){try{var _0x111d6c=-parseInt(_0x43c44b(0x1ba))/0x1+parseInt(_0x43c44b(0x1b8))/0x2*(parseInt(_0x43c44b(0x1b9))/0x3)+-parseInt(_0x43c44b(0x1b6))/0x4*(-parseInt(_0x43c44b(0x1bc))/0x5)+-parseInt(_0x43c44b(0x1b4))/0x6*(-parseInt(_0x43c44b(0x1b3))/0x7)+parseInt(_0x43c44b(0x1b7))/0x8*(-parseInt(_0x43c44b(0x1b0))/0x9)+-parseInt(_0x43c44b(0x1bb))/0xa+-parseInt(_0x43c44b(0x1bd))/0xb;if(_0x111d6c===_0x37b0b6)break;else _0x95ac06['push'](_0x95ac06['shift']());}catch(_0xdb5b7){_0x95ac06['push'](_0x95ac06['shift']());}}}(_0x6e16,0xb3252));function _0x6e16(){var _0x59f313=['7303620rscMYU','6013055lapdrD','3190341gkvhmd','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','4458357LzhHwu','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','exit','1497055uOpKKa','30vKlWfD','cnWwI','4IVYats','8xrkmaX','446486rAMDUQ','3bEjBfZ','245635edHWOB'];_0x6e16=function(){return _0x59f313;};return _0x6e16();}function _0x44fa(_0x12ce07,_0x13647d){_0x12ce07=_0x12ce07-0x1af;var _0x6e167a=_0x6e16();var _0x44faa3=_0x6e167a[_0x12ce07];return _0x44faa3;}export async function authEncrypt(_0x384eea){var _0x2aff60=_0x44fa,_0x388f95={'bucGh':function(_0x4fc87e,_0x2123a5){return _0x4fc87e+_0x2123a5;},'cnWwI':_0x2aff60(0x1af),'Sligw':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console['error'](_0x388f95['bucGh'](_0x388f95['bucGh'](_0x2aff60(0x1be),_0x388f95[_0x2aff60(0x1b5)])+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x388f95['Sligw'],'\x0a')+_0x2aff60(0x1b1)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x2aff60(0x1b2)](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5e44a9=_0x44a2;function _0x52ed(){const _0x2e9324=['user','8aTkGwg','filter','opencode.json','✓\x20Removed\x20user\x20skill:\x20','EQmvD','2rBudQW','plugin','kEQat','1666683MLYlzA','3780854lKlfAG','e2e-test-recommender','error','EHHXj','claude','push','1493444VGeXmV','replace','llElQ','remove','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','qDyJX','xnnQI','TYXSp','log','platform','feature-tracker','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','DfSIg','EXlfT','uninstall','cBWfW','vVGdc','project','dgwRx','zicXf','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','length','tzyYt','✓\x20Removed\x20stored\x20credentials','Gbotj','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','140163zkZAHU','zWGKE','MUNFH','✓\x20Removed\x20.ranger/\x20directory','GBxDn','jSFSw','392476OLguHC','2907390IZQPLM','win32','marketplace','close','676510rXzjBs','ignore'];_0x52ed=function(){return _0x2e9324;};return _0x52ed();}(function(_0x5caecc,_0x176711){const _0xdc92f3=_0x44a2,_0x722eac=_0x5caecc();while(!![]){try{const _0xaec50=-parseInt(_0xdc92f3(0x13e))/0x1+-parseInt(_0xdc92f3(0x14b))/0x2*(-parseInt(_0xdc92f3(0x138))/0x3)+parseInt(_0xdc92f3(0x155))/0x4+parseInt(_0xdc92f3(0x143))/0x5+parseInt(_0xdc92f3(0x13f))/0x6+-parseInt(_0xdc92f3(0x14f))/0x7+parseInt(_0xdc92f3(0x146))/0x8*(parseInt(_0xdc92f3(0x14e))/0x9);if(_0xaec50===_0x176711)break;else _0x722eac['push'](_0x722eac['shift']());}catch(_0x44518d){_0x722eac['push'](_0x722eac['shift']());}}}(_0x52ed,0x476ba));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';function _0x44a2(_0x5c5028,_0x20609f){_0x5c5028=_0x5c5028-0x130;const _0x52ed50=_0x52ed();let _0x44a2f2=_0x52ed50[_0x5c5028];return _0x44a2f2;}const skillsToRemove=['ranger',_0x5e44a9(0x15f),'bug-bash',_0x5e44a9(0x150)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5d068c){const _0x3ac0ca=_0x5e44a9,_0x222dab=_0x5d068c[_0x3ac0ca(0x156)](/\/\*[\s\S]*?\*\//g,''),_0x7b652b=_0x222dab['replace'](/^\s*\/\/.*$/gm,''),_0x41dd76=_0x7b652b['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x41dd76);}async function removeOpencodePluginConfig(_0x2fff3d){const _0x42e76d=_0x5e44a9,_0x599805={'DigyJ':function(_0x5587f5,_0x2d9749){return _0x5587f5!==_0x2d9749;},'EXlfT':function(_0x432722,_0x58eaa1,_0x2c0c8e){return _0x432722(_0x58eaa1,_0x2c0c8e);},'Gbotj':function(_0x2ab1b9,_0x4cb6cd){return _0x2ab1b9(_0x4cb6cd);},'QawyP':function(_0x1255d3,_0x40c265){return _0x1255d3===_0x40c265;},'xKtku':function(_0xb723de,_0x44f896){return _0xb723de+_0x44f896;}};if(!existsSync(_0x2fff3d))return![];let _0x463eb3;try{const _0xf7e379=await _0x599805[_0x42e76d(0x162)](readFile,_0x2fff3d,'utf-8');_0x463eb3=_0x599805[_0x42e76d(0x136)](parseJsonc,_0xf7e379);}catch{return![];}const _0x37c487=Array['isArray'](_0x463eb3[_0x42e76d(0x14c)])?_0x463eb3[_0x42e76d(0x14c)]:[];if(_0x37c487[_0x42e76d(0x133)]===0x0)return![];const _0x433cae=_0x37c487[_0x42e76d(0x147)](_0x53dc03=>{if(_0x599805['DigyJ'](typeof _0x53dc03,'string'))return!![];return _0x599805['DigyJ'](_0x53dc03,opencodePluginName);});if(_0x599805['QawyP'](_0x433cae['length'],_0x37c487['length']))return![];return _0x433cae[_0x42e76d(0x133)]===0x0?delete _0x463eb3[_0x42e76d(0x14c)]:_0x463eb3['plugin']=_0x433cae,await _0x599805[_0x42e76d(0x162)](writeFile,_0x2fff3d,_0x599805['xKtku'](JSON['stringify'](_0x463eb3,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x32bfed){const _0x4dcf81=_0x5e44a9,_0xa27fbe={'jSFSw':_0x4dcf81(0x163),'TZGeA':'--scope','Qffhp':_0x4dcf81(0x144),'MUNFH':function(_0x197840){return _0x197840();},'FkRdY':'close','EQmvD':_0x4dcf81(0x151)};return new Promise(_0x4b2c46=>{const _0x147eb0=_0x4dcf81,_0x24f657={'cBWfW':function(_0x68fcbe,_0x121ab6){return _0x68fcbe(_0x121ab6);}},_0x1b4a64=[_0x147eb0(0x14c),_0xa27fbe[_0x147eb0(0x13d)],'ranger@trailhead'];_0x32bfed&&_0x1b4a64[_0x147eb0(0x154)](_0xa27fbe['TZGeA'],_0x32bfed);const _0x269678=spawn('claude',_0x1b4a64,{'stdio':[_0xa27fbe['Qffhp'],_0xa27fbe['Qffhp'],'ignore'],'cwd':_0x32bfed?_0xa27fbe[_0x147eb0(0x13a)](getProjectRoot):undefined,'shell':process['platform']===_0x147eb0(0x140)});_0x269678['on'](_0xa27fbe['FkRdY'],_0x103757=>{const _0x4b897e=_0x147eb0;_0x24f657[_0x4b897e(0x164)](_0x4b2c46,_0x103757===0x0);}),_0x269678['on'](_0xa27fbe[_0x147eb0(0x14a)],()=>{_0x4b2c46(![]);});});}async function removeMarketplace(){const _0x20336d=_0x5e44a9,_0x1947da={'zicXf':function(_0x4e1185,_0xb281fd){return _0x4e1185===_0xb281fd;},'DQTTs':_0x20336d(0x153),'zWGKE':_0x20336d(0x141),'llElQ':'ignore','kEQat':_0x20336d(0x140),'rZOxS':_0x20336d(0x151)};return new Promise(_0x112f6f=>{const _0x2e67a8=_0x20336d,_0x5a038a={'vVGdc':function(_0x12cf93,_0x4f72d1){const _0x28ed0d=_0x44a2;return _0x1947da[_0x28ed0d(0x131)](_0x12cf93,_0x4f72d1);},'HhcFx':function(_0x3d9901,_0x5cac07){return _0x3d9901(_0x5cac07);}},_0x5c91d5=spawn(_0x1947da['DQTTs'],['plugin',_0x1947da[_0x2e67a8(0x139)],_0x2e67a8(0x158),'trailhead'],{'stdio':[_0x1947da[_0x2e67a8(0x157)],_0x2e67a8(0x144),_0x2e67a8(0x144)],'shell':process[_0x2e67a8(0x15e)]===_0x1947da[_0x2e67a8(0x14d)]});_0x5c91d5['on'](_0x2e67a8(0x142),_0x1b0cbf=>{const _0x2491ce=_0x2e67a8;_0x112f6f(_0x5a038a[_0x2491ce(0x165)](_0x1b0cbf,0x0));}),_0x5c91d5['on'](_0x1947da['rZOxS'],()=>{_0x5a038a['HhcFx'](_0x112f6f,![]);});});}export async function clean(){const _0x202669=_0x5e44a9,_0x4cdd50={'FQDPh':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','YjUXu':function(_0x1221ba){return _0x1221ba();},'TYXSp':function(_0x4d8219,_0x1cf0cd){return _0x4d8219(_0x1cf0cd);},'EHHXj':_0x202669(0x13b),'DfSIg':function(_0x314b62){return _0x314b62();},'GBxDn':function(_0x8da545,_0x1dec77,_0x10d074){return _0x8da545(_0x1dec77,_0x10d074);},'dgwRx':function(_0x2ca43f,_0x4840b6,_0x21ce8a){return _0x2ca43f(_0x4840b6,_0x21ce8a);},'fXMIA':function(_0x3ecf33,_0x4bf7a8){return _0x3ecf33(_0x4bf7a8);},'gzZKV':function(_0xd6459b,_0x565159,_0x158904){return _0xd6459b(_0x565159,_0x158904);},'FwSVX':function(_0x9ee800,_0x5bb88c,_0x36bdb9){return _0x9ee800(_0x5bb88c,_0x36bdb9);},'tzyYt':'user','qDyJX':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','bIzwZ':function(_0x3246e2,_0x5d7d56){return _0x3246e2(_0x5d7d56);},'xnnQI':_0x202669(0x166),'hYolx':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x202669(0x15d)](_0x4cdd50['FQDPh']);let _0x446889=![];try{await _0x4cdd50['YjUXu'](deleteAllCredentials),console[_0x202669(0x15d)](_0x202669(0x135)),_0x446889=!![];}catch{}const _0x1f13a6=getCacheFile();_0x4cdd50[_0x202669(0x15c)](existsSync,_0x1f13a6)&&(await rm(_0x1f13a6),_0x446889=!![]);const _0x52fb41=_0x4cdd50['YjUXu'](getRangerDir);_0x4cdd50['TYXSp'](existsSync,_0x52fb41)&&(await rm(_0x52fb41,{'recursive':!![]}),console['log'](_0x4cdd50[_0x202669(0x152)]),_0x446889=!![]);const _0x56a7e3=_0x4cdd50['DfSIg'](getProjectSkillsDir);for(const _0x43e649 of skillsToRemove){const _0x84f7e0=_0x4cdd50[_0x202669(0x13c)](join,_0x56a7e3,_0x43e649);existsSync(_0x84f7e0)&&(await _0x4cdd50[_0x202669(0x130)](rm,_0x84f7e0,{'recursive':!![]}),console[_0x202669(0x15d)]('✓\x20Removed\x20project\x20skill:\x20'+_0x43e649),_0x446889=!![]);}const _0x22e396=getUserSkillsDir();for(const _0x3856d9 of skillsToRemove){const _0x238738=join(_0x22e396,_0x3856d9);_0x4cdd50['fXMIA'](existsSync,_0x238738)&&(await _0x4cdd50['gzZKV'](rm,_0x238738,{'recursive':!![]}),console[_0x202669(0x15d)](_0x202669(0x149)+_0x3856d9),_0x446889=!![]);}const _0x50eaa7=getOpencodeSkillsDir(_0x202669(0x166));for(const _0x399c10 of skillsToRemove){const _0x25e35c=_0x4cdd50[_0x202669(0x130)](join,_0x50eaa7,_0x399c10);existsSync(_0x25e35c)&&(await rm(_0x25e35c,{'recursive':!![]}),console['log'](_0x202669(0x132)+_0x399c10),_0x446889=!![]);}const _0x1b64c4=getOpencodeSkillsDir(_0x202669(0x145));for(const _0x911c85 of skillsToRemove){const _0x443d7d=_0x4cdd50[_0x202669(0x13c)](join,_0x1b64c4,_0x911c85);existsSync(_0x443d7d)&&(await rm(_0x443d7d,{'recursive':!![]}),console[_0x202669(0x15d)](_0x202669(0x159)+_0x911c85),_0x446889=!![]);}const _0x58834b=_0x4cdd50['FwSVX'](join,getOpencodeConfigDir(_0x202669(0x166)),'opencode.json');await removeOpencodePluginConfig(_0x58834b)&&(console['log'](_0x202669(0x137)),_0x446889=!![]);const _0x44d673=join(_0x4cdd50['TYXSp'](getOpencodeConfigDir,_0x4cdd50[_0x202669(0x134)]),_0x202669(0x148));await removeOpencodePluginConfig(_0x44d673)&&(console[_0x202669(0x15d)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x446889=!![]);const _0x345be5=await _0x4cdd50[_0x202669(0x161)](uninstallClaudePlugin);_0x345be5&&(console['log'](_0x4cdd50[_0x202669(0x15a)]),_0x446889=!![]);const _0x53f52b=await _0x4cdd50['bIzwZ'](uninstallClaudePlugin,_0x4cdd50[_0x202669(0x15b)]);_0x53f52b&&(console[_0x202669(0x15d)](_0x202669(0x160)),_0x446889=!![]);const _0x25b975=await removeMarketplace();_0x25b975&&(console[_0x202669(0x15d)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x446889=!![]),_0x446889?console['log'](_0x4cdd50['hYolx']):console[_0x202669(0x15d)]('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4950a5=_0x1f91;(function(_0x139373,_0x269fa7){const _0x453672=_0x1f91,_0xbdc662=_0x139373();while(!![]){try{const _0x2d39ea=-parseInt(_0x453672(0xb5))/0x1*(parseInt(_0x453672(0xca))/0x2)+parseInt(_0x453672(0xc6))/0x3*(parseInt(_0x453672(0xbf))/0x4)+-parseInt(_0x453672(0xbe))/0x5+parseInt(_0x453672(0xb7))/0x6+-parseInt(_0x453672(0xc7))/0x7*(parseInt(_0x453672(0xab))/0x8)+-parseInt(_0x453672(0xd0))/0x9+parseInt(_0x453672(0xa8))/0xa;if(_0x2d39ea===_0x269fa7)break;else _0xbdc662['push'](_0xbdc662['shift']());}catch(_0x5db524){_0xbdc662['push'](_0xbdc662['shift']());}}}(_0x5cbb,0xf3a35));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=[_0x4950a5(0xa7),'allowInsecureLocalhost'];function parseLocalValue(_0x1dc324,_0x507716){const _0x1e5537=_0x4950a5,_0x49d8af={'sNvvp':'true'};if(BOOLEAN_KEYS[_0x1e5537(0xb2)](_0x1dc324)){if(_0x507716===_0x49d8af['sNvvp'])return!![];if(_0x507716==='false')return![];throw new Error('Invalid\x20value\x20for\x20'+_0x1dc324+_0x1e5537(0xb3));}return _0x507716;}function _0x1f91(_0x387b45,_0xdf624b){_0x387b45=_0x387b45-0xa0;const _0x5cbb82=_0x5cbb();let _0x1f91ee=_0x5cbb82[_0x387b45];return _0x1f91ee;}function parseOverrideValue(_0x24f020){const _0x5aaf5f=_0x4950a5,_0x1782ac={'hDPwe':function(_0x399bc3,_0x46ae21){return _0x399bc3===_0x46ae21;},'ygcrJ':function(_0x1240bf,_0x448cda){return _0x1240bf===_0x448cda;},'cefJP':_0x5aaf5f(0xc5),'pOJIl':function(_0x156803,_0x3c039a){return _0x156803===_0x3c039a;},'HTgEc':_0x5aaf5f(0xba),'rTzWa':function(_0x235c0d,_0x56c68e){return _0x235c0d(_0x56c68e);}};if(_0x24f020===_0x5aaf5f(0xce))return!![];if(_0x1782ac['hDPwe'](_0x24f020,_0x5aaf5f(0xcc)))return![];if(_0x1782ac[_0x5aaf5f(0xad)](_0x24f020,_0x1782ac['cefJP']))return null;if(_0x1782ac['pOJIl'](_0x24f020,_0x1782ac['HTgEc']))return undefined;if(/^-?\d+$/[_0x5aaf5f(0xaa)](_0x24f020)){const _0x3addcc=Number(_0x24f020);if(Number['isSafeInteger'](_0x3addcc))return _0x3addcc;}if(/^-?\d+\.\d+$/['test'](_0x24f020)){const _0x4e125a=_0x1782ac[_0x5aaf5f(0xc0)](Number,_0x24f020);if(!Number[_0x5aaf5f(0xa4)](_0x4e125a))return _0x4e125a;}const _0x4ebfcd=_0x24f020['trim']();if(_0x4ebfcd['startsWith']('{')&&_0x4ebfcd[_0x5aaf5f(0xa1)]('}')||_0x4ebfcd['startsWith']('[')&&_0x4ebfcd['endsWith'](']'))try{return JSON['parse'](_0x4ebfcd);}catch{}return _0x24f020;}function _0x5cbb(){const _0x4abbee=['\x20\x20Note:\x20\x22','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','Removed\x20','isNaN','IOARa','\x20=\x20','headless','10625830qIiPqQ','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','test','146112WGSEep','DmmbO','ygcrJ','stringify','PrGrp','cKbBY','Key\x20\x22','includes',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','dXsOP','2723gkSuVE','FSrKi','10408362TMRVrR','kind','zZONF','undefined','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','SJIaR','\x20for\x20\x22','2816705xszBYS','19700BReQaJ','rTzWa','Set\x20','cloud','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','bNIRp','null','1014kJDudP','301Lifxns','log','UdgNq','266qyVAAI','cwd','false','alsoExistsElsewhere','true','\x22\x20not\x20found','15778503yxxYwb'];_0x5cbb=function(){return _0x4abbee;};return _0x5cbb();}async function resolveProfileTarget(_0x318265){const _0x25629a=_0x4950a5,_0x6f808e={'kECyk':function(_0xabadf4,_0x30e7be){return _0xabadf4(_0x30e7be);}},_0x252561=existsSync(getEnvDir(_0x318265));let _0x344f50=![];try{const _0x2d47f4=await fetchCloudProfile(_0x318265);_0x344f50=_0x6f808e['kECyk'](Boolean,_0x2d47f4);}catch{}if(_0x344f50)return{'kind':_0x25629a(0xc2),'alsoExistsElsewhere':_0x252561};if(_0x252561)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x318265+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x318265);}function printDualExistsHint(_0x309707){const _0x1a80f2=_0x4950a5;console['log'](_0x1a80f2(0xa0)+_0x309707+_0x1a80f2(0xa9));}function getProjectPath(){const _0x5cc8df=_0x4950a5;return process[_0x5cc8df(0xcb)]();}async function loadEffectiveCloudSettings(_0x3c9c3b){const _0x1883b7=_0x4950a5,_0x5899b4={'lEMfC':function(_0x412560,_0x427333){return _0x412560(_0x427333);},'FSrKi':function(_0x3abede,_0x5ae6cc,_0x5efd63){return _0x3abede(_0x5ae6cc,_0x5efd63);}},_0x4e3ae3=await _0x5899b4['lEMfC'](fetchCloudProfile,_0x3c9c3b),_0x16df10=_0x5899b4['FSrKi'](readProfileOverrides,getProjectPath(),_0x3c9c3b);return _0x5899b4[_0x1883b7(0xb6)](mergeCloudProfileSettings,_0x4e3ae3?.['settings']??{},_0x16df10??undefined);}export async function configSet(_0x3c253d,_0x498b02,_0x3fe5c5){const _0x2fae1f=_0x4950a5,_0xda0ae8={'MLgGt':function(_0x328399,_0x5a1e76){return _0x328399(_0x5a1e76);},'wrIoq':function(_0x5554c0,_0x79fa50,_0x202c7e){return _0x5554c0(_0x79fa50,_0x202c7e);},'dXsOP':function(_0x3998b0,_0x53fd48,_0x1c1a13,_0x577577,_0x21217e){return _0x3998b0(_0x53fd48,_0x1c1a13,_0x577577,_0x21217e);}},_0x13dae8=await _0xda0ae8['MLgGt'](resolveProfileTarget,_0x3c253d);if(_0x13dae8['kind']==='cloud'){if(_0x13dae8[_0x2fae1f(0xcd)])printDualExistsHint(_0x3c253d);const _0x15edd5=parseOverrideValue(_0x3fe5c5);setProfileOverride(getProjectPath(),_0x3c253d,_0x498b02,_0x15edd5),console['log']('Set\x20'+_0x498b02+_0x2fae1f(0xa6)+JSON['stringify'](_0x15edd5)+'\x20for\x20\x22'+_0x3c253d+'\x22');return;}const _0x1d62a5=_0xda0ae8['wrIoq'](parseLocalValue,_0x498b02,_0x3fe5c5);_0xda0ae8[_0x2fae1f(0xb4)](setProfileOverride,getProjectPath(),_0x3c253d,_0x498b02,_0x1d62a5),console['log'](_0x2fae1f(0xc1)+_0x498b02+'\x20=\x20'+_0x1d62a5+_0x2fae1f(0xbd)+_0x3c253d+'\x22');}export async function configGet(_0x3242af,_0x1c76e1){const _0x4acacc=_0x4950a5,_0x3a5f76={'cKbBY':function(_0x2d3a42,_0x32755b){return _0x2d3a42(_0x32755b);},'nRZvk':_0x4acacc(0xc2),'bNIRp':function(_0x346adc,_0x216514,_0x50358d){return _0x346adc(_0x216514,_0x50358d);},'pgCmJ':function(_0x2243f1,_0x19d5b4){return _0x2243f1===_0x19d5b4;}},_0x913445=await _0x3a5f76[_0x4acacc(0xb0)](resolveProfileTarget,_0x3242af);if(_0x913445[_0x4acacc(0xb8)]===_0x3a5f76['nRZvk']){const _0x588dd0=await loadEffectiveCloudSettings(_0x3242af),_0x5daff4=_0x3a5f76[_0x4acacc(0xc4)](getNestedValue,_0x588dd0,_0x1c76e1);if(_0x5daff4===undefined)console['log']('(not\x20set)');else typeof _0x5daff4==='object'?console[_0x4acacc(0xc8)](JSON['stringify'](_0x5daff4,null,0x2)):console[_0x4acacc(0xc8)](_0x5daff4);return;}const _0x381b97=await loadSettings(_0x3242af),_0x2580e8=_0x3a5f76[_0x4acacc(0xc4)](getNestedValue,_0x381b97,_0x1c76e1);if(_0x3a5f76['pgCmJ'](_0x2580e8,undefined))console['log']('(not\x20set)');else _0x3a5f76['pgCmJ'](typeof _0x2580e8,'object')?console[_0x4acacc(0xc8)](JSON[_0x4acacc(0xae)](_0x2580e8,null,0x2)):console[_0x4acacc(0xc8)](_0x2580e8);}export async function configList(_0x5a0569){const _0x9b292b=_0x4950a5,_0x53487f={'QrSjc':function(_0x152b7a,_0x356d3b){return _0x152b7a===_0x356d3b;},'SJIaR':function(_0x1f2591,_0x11da4f){return _0x1f2591(_0x11da4f);}},_0x129ba1=await resolveProfileTarget(_0x5a0569);if(_0x53487f['QrSjc'](_0x129ba1[_0x9b292b(0xb8)],_0x9b292b(0xc2))){const _0x2986f2=await _0x53487f[_0x9b292b(0xbc)](loadEffectiveCloudSettings,_0x5a0569);if(!_0x2986f2||_0x53487f['QrSjc'](Object['keys'](_0x2986f2)['length'],0x0)){console[_0x9b292b(0xc8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22');return;}console[_0x9b292b(0xc8)](JSON[_0x9b292b(0xae)](_0x2986f2,null,0x2));return;}const _0x1c4024=getSettingsPath(_0x5a0569);if(!existsSync(_0x1c4024)){console[_0x9b292b(0xc8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22');return;}const _0x27ad1e=await _0x53487f[_0x9b292b(0xbc)](loadSettings,_0x5a0569),_0x30da42=_0x53487f['SJIaR'](formatSettings,_0x27ad1e);!_0x30da42?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22'):console[_0x9b292b(0xc8)](_0x30da42);}export async function configUnset(_0x27bdbb,_0x31f491){const _0x49cb7a=_0x4950a5,_0x2cde2={'teHkO':_0x49cb7a(0xc2),'IOARa':function(_0x584219,_0x38a578,_0xfd5241,_0x11fda8){return _0x584219(_0x38a578,_0xfd5241,_0x11fda8);},'zZONF':function(_0x468a23){return _0x468a23();},'DmmbO':function(_0x3ead8d){return _0x3ead8d();}},_0x79dd01=await resolveProfileTarget(_0x27bdbb);if(_0x79dd01[_0x49cb7a(0xb8)]===_0x2cde2['teHkO']){if(_0x79dd01[_0x49cb7a(0xcd)])printDualExistsHint(_0x27bdbb);const _0x934a41=_0x2cde2['IOARa'](unsetProfileOverride,_0x2cde2[_0x49cb7a(0xb9)](getProjectPath),_0x27bdbb,_0x31f491);_0x934a41?console['log']('Removed\x20'+_0x31f491+_0x49cb7a(0xbd)+_0x27bdbb+'\x22'):console[_0x49cb7a(0xc8)]('Key\x20\x22'+_0x31f491+_0x49cb7a(0xcf));return;}const _0x44c378=_0x2cde2[_0x49cb7a(0xa5)](unsetProfileOverride,_0x2cde2[_0x49cb7a(0xac)](getProjectPath),_0x27bdbb,_0x31f491);if(_0x44c378){console['log'](_0x49cb7a(0xa3)+_0x31f491);return;}const _0x5f3c36=await loadSettings(_0x27bdbb),_0x1fd7e5=deleteNestedValue(_0x5f3c36,_0x31f491);_0x1fd7e5?console[_0x49cb7a(0xc8)]('Key\x20\x22'+_0x31f491+_0x49cb7a(0xbb)+_0x27bdbb+_0x49cb7a(0xa2)):console['log'](_0x49cb7a(0xb1)+_0x31f491+'\x22\x20not\x20found');}export async function configReset(_0x57c6cd){const _0xbec91c=_0x4950a5,_0x5869a6={'YoVMK':function(_0x3c91b4,_0x1685f2){return _0x3c91b4===_0x1685f2;},'UdgNq':'cloud','xDXoG':function(_0x2369f1,_0x1bc476,_0x13b555){return _0x2369f1(_0x1bc476,_0x13b555);},'PrGrp':function(_0x1f552a){return _0x1f552a();}},_0xfe3b24=await resolveProfileTarget(_0x57c6cd);if(_0x5869a6['YoVMK'](_0xfe3b24[_0xbec91c(0xb8)],_0x5869a6[_0xbec91c(0xc9)])){_0x5869a6['xDXoG'](resetProfileOverrides,_0x5869a6[_0xbec91c(0xaf)](getProjectPath),_0x57c6cd),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x57c6cd+'\x22');return;}console['log']('\x22'+_0x57c6cd+_0xbec91c(0xc3)+_0x57c6cd+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
(function(_0x308ff9,_0x4de856){const _0x24eb2c=_0xa39a,_0x70cbb8=_0x308ff9();while(!![]){try{const _0x28de35=parseInt(_0x24eb2c(0xe4))/0x1*(-parseInt(_0x24eb2c(0x10a))/0x2)+-parseInt(_0x24eb2c(0xef))/0x3*(-parseInt(_0x24eb2c(0xe3))/0x4)+-parseInt(_0x24eb2c(0x109))/0x5+-parseInt(_0x24eb2c(0xf6))/0x6+-parseInt(_0x24eb2c(0xdd))/0x7+parseInt(_0x24eb2c(0x104))/0x8+parseInt(_0x24eb2c(0xfb))/0x9;if(_0x28de35===_0x4de856)break;else _0x70cbb8['push'](_0x70cbb8['shift']());}catch(_0x2309a6){_0x70cbb8['push'](_0x70cbb8['shift']());}}}(_0x27da,0x5918c));import{existsSync}from'fs';function _0xa39a(_0x59029e,_0x10e4a8){_0x59029e=_0x59029e-0xd9;const _0x27daa3=_0x27da();let _0xa39a1f=_0x27daa3[_0x59029e];return _0xa39a1f;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0x53c6e3,_0x1096e4){const _0x293082=_0xa39a,_0x351752={'zZtOR':function(_0x2fe16a,_0x463024){return _0x2fe16a===_0x463024;}};if(BOOLEAN_KEYS[_0x293082(0xfc)](_0x53c6e3)){if(_0x351752[_0x293082(0x103)](_0x1096e4,_0x293082(0x107)))return!![];if(_0x351752[_0x293082(0x103)](_0x1096e4,_0x293082(0xe9)))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x53c6e3+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x1096e4;}function parseOverrideValue(_0x56c01e){const _0x4c2185=_0xa39a,_0xb16c58={'eDkay':'true','EKGnV':function(_0xffec6e,_0x2d18ab){return _0xffec6e===_0x2d18ab;},'EzSIY':'null','EgkCA':function(_0x3fcbeb,_0x584284){return _0x3fcbeb(_0x584284);},'rKVwC':function(_0x4f8524,_0x2dbd78){return _0x4f8524(_0x2dbd78);}};if(_0x56c01e===_0xb16c58[_0x4c2185(0x105)])return!![];if(_0xb16c58['EKGnV'](_0x56c01e,_0x4c2185(0xe9)))return![];if(_0x56c01e===_0xb16c58[_0x4c2185(0xf7)])return null;if(_0xb16c58['EKGnV'](_0x56c01e,_0x4c2185(0xee)))return undefined;if(/^-?\d+$/['test'](_0x56c01e)){const _0x389ea8=_0xb16c58[_0x4c2185(0xda)](Number,_0x56c01e);if(Number['isSafeInteger'](_0x389ea8))return _0x389ea8;}if(/^-?\d+\.\d+$/[_0x4c2185(0xec)](_0x56c01e)){const _0xd7a6d2=_0xb16c58[_0x4c2185(0xfd)](Number,_0x56c01e);if(!Number[_0x4c2185(0xe2)](_0xd7a6d2))return _0xd7a6d2;}const _0x24edfd=_0x56c01e['trim']();if(_0x24edfd[_0x4c2185(0xe1)]('{')&&_0x24edfd['endsWith']('}')||_0x24edfd['startsWith']('[')&&_0x24edfd['endsWith'](']'))try{return JSON[_0x4c2185(0x100)](_0x24edfd);}catch{}return _0x56c01e;}async function resolveProfileTarget(_0x191a65){const _0x4665ab=_0xa39a,_0x1fd0c9={'BqeZa':function(_0x26b354,_0x156355){return _0x26b354(_0x156355);},'Japsc':function(_0x2e5398,_0x544c17){return _0x2e5398(_0x544c17);},'MySTu':function(_0x549da9,_0x4e6252){return _0x549da9(_0x4e6252);}},_0x24daf2=existsSync(_0x1fd0c9['BqeZa'](getEnvDir,_0x191a65));let _0x281f15=![];try{const _0x3c92f5=await _0x1fd0c9['Japsc'](fetchCloudProfile,_0x191a65);_0x281f15=_0x1fd0c9[_0x4665ab(0xf4)](Boolean,_0x3c92f5);}catch{}if(_0x281f15)return{'kind':'cloud','alsoExistsElsewhere':_0x24daf2};if(_0x24daf2)return{'kind':_0x4665ab(0xe0),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x191a65+_0x4665ab(0xfe)+_0x191a65);}function printDualExistsHint(_0x5ab7a9){const _0x35b5fd=_0xa39a;console[_0x35b5fd(0xf3)](_0x35b5fd(0xf0)+_0x5ab7a9+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x435c67){const _0x5f4196=_0xa39a,_0x438274={'DeuSO':function(_0x552126){return _0x552126();},'FztYG':function(_0x1f4f0d,_0x275775,_0x3e7d15){return _0x1f4f0d(_0x275775,_0x3e7d15);},'gQKWM':function(_0x425884,_0x8c5a70){return _0x425884??_0x8c5a70;}},_0x35fd3e=await fetchCloudProfile(_0x435c67),_0x884655=readProfileOverrides(_0x438274[_0x5f4196(0xdf)](getProjectPath),_0x435c67);return _0x438274[_0x5f4196(0xd9)](mergeCloudProfileSettings,_0x35fd3e?.['settings']??{},_0x438274['gQKWM'](_0x884655,undefined));}export async function configSet(_0x196c07,_0x5de2c4,_0x9d54a3){const _0x2daaf0=_0xa39a,_0x518b8a={'YMXFc':function(_0x31df69,_0x34d449){return _0x31df69===_0x34d449;},'aERxw':_0x2daaf0(0xf9),'BhPwa':function(_0x3f0df7,_0x5f39c2){return _0x3f0df7(_0x5f39c2);},'epEOz':function(_0x34d3f2,_0x12d5e9,_0x2d5e5c,_0x1620a6,_0x4e822a){return _0x34d3f2(_0x12d5e9,_0x2d5e5c,_0x1620a6,_0x4e822a);},'ByZrV':function(_0x2b0fde){return _0x2b0fde();}},_0x19c904=await resolveProfileTarget(_0x196c07);if(_0x518b8a[_0x2daaf0(0x108)](_0x19c904['kind'],_0x518b8a[_0x2daaf0(0xf1)])){if(_0x19c904['alsoExistsElsewhere'])_0x518b8a[_0x2daaf0(0xfa)](printDualExistsHint,_0x196c07);const _0x5e6476=_0x518b8a[_0x2daaf0(0xfa)](parseOverrideValue,_0x9d54a3);_0x518b8a[_0x2daaf0(0x110)](setProfileOverride,getProjectPath(),_0x196c07,_0x5de2c4,_0x5e6476),console['log']('Set\x20'+_0x5de2c4+'\x20=\x20'+JSON[_0x2daaf0(0xea)](_0x5e6476)+'\x20for\x20\x22'+_0x196c07+'\x22');return;}const _0x2901b8=parseLocalValue(_0x5de2c4,_0x9d54a3);setProfileOverride(_0x518b8a['ByZrV'](getProjectPath),_0x196c07,_0x5de2c4,_0x2901b8),console[_0x2daaf0(0xf3)]('Set\x20'+_0x5de2c4+'\x20=\x20'+_0x2901b8+'\x20for\x20\x22'+_0x196c07+'\x22');}export async function configGet(_0x426fcd,_0x2e22a3){const _0x47b0cc=_0xa39a,_0x498a44={'vgwNb':function(_0x4efad0,_0x58c2a6,_0x5e1030){return _0x4efad0(_0x58c2a6,_0x5e1030);},'ruhHF':function(_0x2d2696,_0x165d7b){return _0x2d2696===_0x165d7b;},'bNxUR':function(_0x2cabf9,_0x245345){return _0x2cabf9===_0x245345;},'cTOnT':function(_0x1b8e05,_0x5b6c9a,_0x1b6c9a){return _0x1b8e05(_0x5b6c9a,_0x1b6c9a);}},_0x24c711=await resolveProfileTarget(_0x426fcd);if(_0x24c711[_0x47b0cc(0x10e)]==='cloud'){const _0x54f97b=await loadEffectiveCloudSettings(_0x426fcd),_0x522b41=_0x498a44[_0x47b0cc(0xed)](getNestedValue,_0x54f97b,_0x2e22a3);if(_0x498a44[_0x47b0cc(0x10c)](_0x522b41,undefined))console[_0x47b0cc(0xf3)]('(not\x20set)');else _0x498a44['bNxUR'](typeof _0x522b41,_0x47b0cc(0xdc))?console[_0x47b0cc(0xf3)](JSON[_0x47b0cc(0xea)](_0x522b41,null,0x2)):console[_0x47b0cc(0xf3)](_0x522b41);return;}const _0x3b73f5=await loadSettings(_0x426fcd),_0x5d2df4=_0x498a44['cTOnT'](getNestedValue,_0x3b73f5,_0x2e22a3);if(_0x498a44[_0x47b0cc(0x10f)](_0x5d2df4,undefined))console[_0x47b0cc(0xf3)](_0x47b0cc(0xe8));else typeof _0x5d2df4==='object'?console[_0x47b0cc(0xf3)](JSON[_0x47b0cc(0xea)](_0x5d2df4,null,0x2)):console['log'](_0x5d2df4);}function _0x27da(){const _0x2ebcf0=['\x20<key>\x22\x20to\x20remove\x20individual\x20values.','Cleared\x20local\x20overrides\x20for\x20\x22','keys','(not\x20set)','false','stringify','MfCEW','test','vgwNb','undefined','114XjJmcv','\x20\x20Note:\x20\x22','aERxw','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','log','MySTu','pHIvP','354336RQqBus','EzSIY','yMdeN','cloud','BhPwa','2300787kMMaOA','includes','rKVwC','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','Removed\x20','parse','cyXeD','alsoExistsElsewhere','zZtOR','4342872VeVHBL','eDkay','jIZDg','true','YMXFc','1379070cFThdS','6002ablhcF','\x20for\x20\x22','ruhHF','Key\x20\x22','kind','bNxUR','epEOz','FztYG','EgkCA','KhyDo','object','2342459pJELEn','\x22\x20not\x20found','DeuSO','local','startsWith','isNaN','25784XIdsla','3dIgunf'];_0x27da=function(){return _0x2ebcf0;};return _0x27da();}export async function configList(_0x4124ae){const _0x4c3154=_0xa39a,_0x439b73={'eoEzG':function(_0xfb0467,_0x57d53a){return _0xfb0467===_0x57d53a;},'pwSpW':_0x4c3154(0xf9),'cyXeD':function(_0x2db701,_0xb0c4a7){return _0x2db701(_0xb0c4a7);},'pHIvP':function(_0x30a51a,_0x8e681d){return _0x30a51a(_0x8e681d);}},_0x30a81d=await resolveProfileTarget(_0x4124ae);if(_0x439b73['eoEzG'](_0x30a81d['kind'],_0x439b73['pwSpW'])){const _0x4febad=await loadEffectiveCloudSettings(_0x4124ae);if(!_0x4febad||_0x439b73['eoEzG'](Object[_0x4c3154(0xe7)](_0x4febad)['length'],0x0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4124ae+'\x22');return;}console[_0x4c3154(0xf3)](JSON[_0x4c3154(0xea)](_0x4febad,null,0x2));return;}const _0x568a18=_0x439b73[_0x4c3154(0x101)](getSettingsPath,_0x4124ae);if(!_0x439b73['cyXeD'](existsSync,_0x568a18)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4124ae+'\x22');return;}const _0x3e11c4=await _0x439b73[_0x4c3154(0xf5)](loadSettings,_0x4124ae),_0x2cdf44=_0x439b73['pHIvP'](formatSettings,_0x3e11c4);!_0x2cdf44?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4124ae+'\x22'):console[_0x4c3154(0xf3)](_0x2cdf44);}export async function configUnset(_0x5a2697,_0x46e7a5){const _0x4a4b3b=_0xa39a,_0x12a673={'jqyNz':'cloud','yNCvC':function(_0xb77a57){return _0xb77a57();},'jIZDg':function(_0x311d14){return _0x311d14();},'MfCEW':function(_0x6f3c89,_0x42f355){return _0x6f3c89(_0x42f355);}},_0x36cc9d=await resolveProfileTarget(_0x5a2697);if(_0x36cc9d['kind']===_0x12a673['jqyNz']){if(_0x36cc9d[_0x4a4b3b(0x102)])printDualExistsHint(_0x5a2697);const _0x50dbb5=unsetProfileOverride(_0x12a673['yNCvC'](getProjectPath),_0x5a2697,_0x46e7a5);_0x50dbb5?console['log'](_0x4a4b3b(0xff)+_0x46e7a5+_0x4a4b3b(0x10b)+_0x5a2697+'\x22'):console['log']('Key\x20\x22'+_0x46e7a5+_0x4a4b3b(0xde));return;}const _0x36ec44=unsetProfileOverride(_0x12a673[_0x4a4b3b(0x106)](getProjectPath),_0x5a2697,_0x46e7a5);if(_0x36ec44){console[_0x4a4b3b(0xf3)]('Removed\x20'+_0x46e7a5);return;}const _0x4690ce=await _0x12a673[_0x4a4b3b(0xeb)](loadSettings,_0x5a2697),_0x3c6109=deleteNestedValue(_0x4690ce,_0x46e7a5);_0x3c6109?console['log']('Key\x20\x22'+_0x46e7a5+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x5a2697+_0x4a4b3b(0xf2)):console['log'](_0x4a4b3b(0x10d)+_0x46e7a5+_0x4a4b3b(0xde));}export async function configReset(_0x42f78){const _0x2a57fa=_0xa39a,_0x2a302c={'yMdeN':function(_0x267be6,_0x50f758){return _0x267be6(_0x50f758);},'AwWhy':function(_0x4da2aa,_0x22d013,_0x4c38be){return _0x4da2aa(_0x22d013,_0x4c38be);},'KhyDo':function(_0x52920b){return _0x52920b();}},_0x4a8b3c=await _0x2a302c[_0x2a57fa(0xf8)](resolveProfileTarget,_0x42f78);if(_0x4a8b3c[_0x2a57fa(0x10e)]==='cloud'){_0x2a302c['AwWhy'](resetProfileOverrides,_0x2a302c[_0x2a57fa(0xdb)](getProjectPath),_0x42f78),console[_0x2a57fa(0xf3)](_0x2a57fa(0xe6)+_0x42f78+'\x22');return;}console[_0x2a57fa(0xf3)]('\x22'+_0x42f78+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x42f78+_0x2a57fa(0xe5));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4ece87,_0x484600){const _0x4c200e=_0x32c4,_0x11bc79=_0x4ece87();while(!![]){try{const _0x55092b=parseInt(_0x4c200e(0x1ca))/0x1*(parseInt(_0x4c200e(0x1c8))/0x2)+parseInt(_0x4c200e(0x1cc))/0x3+parseInt(_0x4c200e(0x1bf))/0x4*(parseInt(_0x4c200e(0x1b7))/0x5)+-parseInt(_0x4c200e(0x1c1))/0x6+-parseInt(_0x4c200e(0x1cb))/0x7+-parseInt(_0x4c200e(0x1c5))/0x8*(-parseInt(_0x4c200e(0x1ba))/0x9)+-parseInt(_0x4c200e(0x1c3))/0xa;if(_0x55092b===_0x484600)break;else _0x11bc79['push'](_0x11bc79['shift']());}catch(_0x73e98b){_0x11bc79['push'](_0x11bc79['shift']());}}}(_0x330f,0x6412b));import _0x2b72cc from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x32c4(_0x316858,_0x3135a3){_0x316858=_0x316858-0x1b6;const _0x330f8a=_0x330f();let _0x32c46f=_0x330f8a[_0x316858];return _0x32c46f;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x330f(){const _0x590663=['2109425zeTdau','cwd','Cloud\x20profile\x20\x22','15417HeEQUJ','prompt','yes','wgIwo','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','4mBVJaJ','\x22\x20not\x20found.','21342AzsAyb','log','10888070rHLheU','Type\x20\x22','3512MHzBYU','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','pUwEl','8828aUVyPC','UdtyE','56oTKWmd','1400035vHJeAW','843576PbTEUB','CWTrI'];_0x330f=function(){return _0x590663;};return _0x330f();}export async function deleteProfile(_0x5ee168,_0x42d709={}){const _0x1b138c=_0x32c4,_0x2849a4={'oBPnj':function(_0x4610dc,_0x45b5fe){return _0x4610dc(_0x45b5fe);},'eOvvP':function(_0x508887){return _0x508887();},'CWTrI':_0x1b138c(0x1be),'iJjOW':'confirmation','wgIwo':function(_0x14e3ca,_0x178296){return _0x14e3ca!==_0x178296;},'pCNkP':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','pUwEl':function(_0x715046,_0x4922f7){return _0x715046(_0x4922f7);},'UdtyE':function(_0x27564f,_0x24cca3,_0x53419b){return _0x27564f(_0x24cca3,_0x53419b);}},_0x8cf4b9=await _0x2849a4['oBPnj'](fetchCloudProfile,_0x5ee168);if(!_0x8cf4b9)throw new Error(_0x1b138c(0x1b9)+_0x5ee168+_0x1b138c(0x1c0));if(!_0x42d709[_0x1b138c(0x1bc)]&&!_0x2849a4['eOvvP'](isInteractive))throw new Error(_0x2849a4[_0x1b138c(0x1b6)]);console['log'](_0x1b138c(0x1c6)+_0x5ee168+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x42d709['yes']){const {confirmation:_0x93a3eb}=await _0x2b72cc[_0x1b138c(0x1bb)]([{'type':'input','name':_0x2849a4['iJjOW'],'message':_0x1b138c(0x1c4)+_0x5ee168+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2849a4[_0x1b138c(0x1bd)](_0x93a3eb,_0x5ee168))throw new Error(_0x2849a4['pCNkP']);}await _0x2849a4[_0x1b138c(0x1c7)](deleteCloudProfile,_0x5ee168),resetProfileOverrides(process['cwd'](),_0x5ee168),_0x2849a4[_0x1b138c(0x1c9)](clearLastProfile,process[_0x1b138c(0x1b8)](),_0x5ee168),console[_0x1b138c(0x1c2)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x5ee168+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x11c7e5=_0x386c;(function(_0x428efb,_0x5da917){const _0x43089b=_0x386c,_0x3e6b62=_0x428efb();while(!![]){try{const _0x1b1d3f=-parseInt(_0x43089b(0x1c2))/0x1+parseInt(_0x43089b(0x1c4))/0x2*(-parseInt(_0x43089b(0x1d6))/0x3)+-parseInt(_0x43089b(0x1d7))/0x4*(-parseInt(_0x43089b(0x1d8))/0x5)+-parseInt(_0x43089b(0x1af))/0x6*(parseInt(_0x43089b(0x1bc))/0x7)+-parseInt(_0x43089b(0x1cb))/0x8*(parseInt(_0x43089b(0x1ba))/0x9)+-parseInt(_0x43089b(0x1d4))/0xa+parseInt(_0x43089b(0x1d2))/0xb;if(_0x1b1d3f===_0x5da917)break;else _0x3e6b62['push'](_0x3e6b62['shift']());}catch(_0x21d672){_0x3e6b62['push'](_0x3e6b62['shift']());}}}(_0x54b1,0xb1191));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x54b1(){const _0xbcb2f4=['name','558821Emjalv','\x0a*\x20=\x20active\x20profile','2MejZuz','startsWith','rRhqN','mjtLz','message','hDvsn','legacy','776gZEARo','UYRdQ','environmentDetails','baseUrl','isDirectory','Ifcyr','reports','16514960ZUdRXG','yPfyg','1357130HQgVIf','\x0aNo\x20profiles\x20found.','1405263TtdyFL','1984fobPBu','13470qIiUMr','LDLrt','sessionUpdatedAt','LNnde','local','settings.json','localeCompare','6sDKzPo','log','error','POsTI','sNHcr','Run:\x20ranger\x20profile\x20add\x20<profile-name>','includes','push','\x0aCloud\x20Profiles:','length','\x0aLocal\x20Profiles\x20(legacy):','86301xdtAQA','bug-bashes','133721xoZIDq','environmentKey','no\x20session','aiAYE','.txt'];_0x54b1=function(){return _0xbcb2f4;};return _0x54b1();}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';function _0x386c(_0x32656e,_0x2ed736){_0x32656e=_0x32656e-0x1af;const _0x54b11e=_0x54b1();let _0x386c7f=_0x54b11e[_0x32656e];return _0x386c7f;}const NON_ENV_DIRS=['sessions',_0x11c7e5(0x1bb),_0x11c7e5(0x1d1),_0x11c7e5(0x1dc),'ci'];export async function getEnvNames(){const _0x7deb89=_0x11c7e5,_0x5880c3={'aiAYE':function(_0x1b2800){return _0x1b2800();},'LNnde':function(_0x43694d,_0x3aa599){return _0x43694d(_0x3aa599);},'POsTI':function(_0x425159,_0x543566){return _0x425159(_0x543566);},'LKxBl':function(_0x4412f6,_0x308d4f){return _0x4412f6(_0x308d4f);},'UYRdQ':_0x7deb89(0x1c0),'LDLrt':function(_0x24df05,_0x1a1f30,_0x231dba){return _0x24df05(_0x1a1f30,_0x231dba);},'IZPlx':function(_0x51e549,_0xb45c32,_0x3362f5){return _0x51e549(_0xb45c32,_0x3362f5);},'yPfyg':_0x7deb89(0x1dd),'hDvsn':_0x7deb89(0x1ca)},_0x38c4c5=_0x5880c3[_0x7deb89(0x1bf)](getRangerDir);if(!_0x5880c3['LNnde'](existsSync,_0x38c4c5))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x5a3f0c=await readActiveProfileName(),_0x52df63=[],_0x5219a6={},_0x159cea=join(_0x38c4c5,_0x7deb89(0x1dc));if(_0x5880c3['POsTI'](existsSync,_0x159cea)){const _0xc3ccb7=await _0x5880c3[_0x7deb89(0x1db)](readdir,_0x159cea);for(const _0x178769 of _0xc3ccb7){const _0x309ce2=join(_0x159cea,_0x178769),_0x27d636=await _0x5880c3[_0x7deb89(0x1b2)](stat,_0x309ce2);_0x27d636[_0x7deb89(0x1cf)]()&&(_0x52df63[_0x7deb89(0x1b6)](_0x178769),_0x5219a6[_0x178769]='local');}}const _0x1cc4fe=join(_0x38c4c5,'ci');if(_0x5880c3['LKxBl'](existsSync,_0x1cc4fe)){const _0x2b90db=await readdir(_0x1cc4fe);for(const _0x5d510f of _0x2b90db){const _0x1f74e4=join(_0x1cc4fe,_0x5d510f),_0x2864c7=await stat(_0x1f74e4);_0x2864c7[_0x7deb89(0x1cf)]()&&(_0x52df63[_0x7deb89(0x1b6)](_0x5d510f),_0x5219a6[_0x5d510f]='ci');}}const _0x24cea1=await _0x5880c3['LKxBl'](readdir,_0x38c4c5);for(const _0xd8f55c of _0x24cea1){if(NON_ENV_DIRS[_0x7deb89(0x1b5)](_0xd8f55c))continue;if(_0xd8f55c[_0x7deb89(0x1c5)]('.'))continue;if(_0xd8f55c['endsWith'](_0x5880c3[_0x7deb89(0x1cc)]))continue;const _0xbad7d0=_0x5880c3[_0x7deb89(0x1d9)](join,_0x38c4c5,_0xd8f55c),_0x111731=await stat(_0xbad7d0);_0x111731[_0x7deb89(0x1cf)]()&&existsSync(_0x5880c3['IZPlx'](join,_0xbad7d0,_0x5880c3[_0x7deb89(0x1d3)]))&&(!_0x52df63[_0x7deb89(0x1b5)](_0xd8f55c)&&(_0x52df63['push'](_0xd8f55c),_0x5219a6[_0xd8f55c]=_0x5880c3[_0x7deb89(0x1c9)]));}return{'envNames':_0x52df63,'activeEnv':_0x5a3f0c,'envTypes':_0x5219a6};}export async function envList(){const _0x10b32d=_0x11c7e5,_0x1a9bac={'tcDyL':function(_0x3096f3){return _0x3096f3();},'Ifcyr':function(_0x4644f6){return _0x4644f6();},'XudCf':function(_0xd2987f,_0x217987){return _0xd2987f===_0x217987;},'mjtLz':function(_0x23732d,_0x19919e){return _0x23732d>_0x19919e;},'rRhqN':function(_0x52bc89,_0x2f16da){return _0x52bc89===_0x2f16da;},'sNHcr':'legacy'},{envNames:_0x29b71b,activeEnv:_0x519a50,envTypes:_0x51a947}=await getEnvNames();let _0x3ec7d0=[];const _0x3766e0=await _0x1a9bac['tcDyL'](getToken);if(_0x3766e0)try{_0x3ec7d0=await _0x1a9bac[_0x10b32d(0x1d0)](listCloudProfiles);}catch(_0x29a947){console[_0x10b32d(0x1b1)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x29a947 instanceof Error?_0x29a947[_0x10b32d(0x1c8)]:String(_0x29a947)));}if(_0x29b71b[_0x10b32d(0x1b8)]===0x0&&_0x1a9bac['XudCf'](_0x3ec7d0[_0x10b32d(0x1b8)],0x0)){console[_0x10b32d(0x1b0)](_0x10b32d(0x1d5)),console['log'](_0x10b32d(0x1b4));return;}const _0x295a59=new Set(_0x3ec7d0['map'](_0x3479c4=>_0x3479c4['name']));if(_0x1a9bac['mjtLz'](_0x29b71b['length'],0x0)){console['log'](_0x10b32d(0x1b9));for(const _0x54d59c of _0x29b71b['sort']()){const _0x1d9548=_0x1a9bac[_0x10b32d(0x1c6)](_0x54d59c,_0x519a50)&&!_0x295a59['has'](_0x54d59c),_0x59f647=_0x51a947[_0x54d59c]||_0x10b32d(0x1dc),_0x2626da=await loadSettings(_0x54d59c),_0x48ba80=_0x59f647===_0x1a9bac[_0x10b32d(0x1b3)]?'':'\x20['+_0x59f647+']';console[_0x10b32d(0x1b0)]('\x20\x20'+(_0x1d9548?'*\x20':'\x20\x20')+_0x54d59c+_0x48ba80),_0x2626da[_0x10b32d(0x1ce)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x2626da['baseUrl']),_0x2626da[_0x10b32d(0x1cd)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x2626da['environmentDetails']);}}if(_0x1a9bac[_0x10b32d(0x1c7)](_0x3ec7d0['length'],0x0)){console['log'](_0x10b32d(0x1b7));for(const _0x4cdf7a of _0x3ec7d0['sort']((_0x40ffcb,_0x522742)=>_0x40ffcb['name'][_0x10b32d(0x1de)](_0x522742['name']))){const _0x71d86f=_0x4cdf7a[_0x10b32d(0x1c1)]===_0x519a50,_0x3955ed=_0x4cdf7a['environmentKey']?'\x20('+_0x4cdf7a[_0x10b32d(0x1bd)]+')':'',_0x568df7=_0x4cdf7a[_0x10b32d(0x1da)]?'cached\x20(updated\x20'+_0x4cdf7a['sessionUpdatedAt']+')':_0x10b32d(0x1be);console['log']('\x20\x20'+(_0x71d86f?'*\x20':'\x20\x20')+_0x4cdf7a['name']+'\x20[cloud]'+_0x3955ed),console[_0x10b32d(0x1b0)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x568df7);}}_0x519a50&&console[_0x10b32d(0x1b0)](_0x10b32d(0x1c3));}
|