@ranger-testing/ranger-cli 3.1.7-alpha.9ed0a8d-59 → 3.1.7-alpha.9f8e190-62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/actors.js +1 -0
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x26451a,_0x591dba){const _0x15a7f7=_0x24da,_0x288265=_0x26451a();while(!![]){try{const _0x51b465=-parseInt(_0x15a7f7(0x18b))/0x1+-parseInt(_0x15a7f7(0x162))/0x2+parseInt(_0x15a7f7(0x150))/0x3+parseInt(_0x15a7f7(0x1ac))/0x4*(parseInt(_0x15a7f7(0x19d))/0x5)+-parseInt(_0x15a7f7(0x14d))/0x6+parseInt(_0x15a7f7(0x1bc))/0x7*(-parseInt(_0x15a7f7(0x16c))/0x8)+parseInt(_0x15a7f7(0x19a))/0x9;if(_0x51b465===_0x591dba)break;else _0x288265['push'](_0x288265['shift']());}catch(_0x1a2410){_0x288265['push'](_0x288265['shift']());}}}(_0x118d,0x4b872));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1cf43e from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x24da(_0xac8190,_0x3cd624){_0xac8190=_0xac8190-0x139;const _0x118d27=_0x118d();let _0x24da27=_0x118d27[_0xac8190];return _0x24da27;}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x118d(){const _0x2f7c16=['QsUFV','skipAuth','setupHeaders','HEAD','keys','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20--skip-auth\x0a','trackPhaseEnd','status','DnuaN','\x0a\x20\x20A\x20profile\x20named\x20\x22','LBjLK','153730OrryOz','http://','ekEDA','environments','uFpUx','baseUrl','iOoRt','AoJWI','Rppxi','DMhLn','stdout','\x20\x20https://docs.ranger.net/main/concepts/profiles','use_suggestion','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','Continue\x20anyway','10341819tcmSmw','exit','join','3645INXTqw','capture','env_not_found','cdpEndpoint','\x27\x20to\x20the\x20cloud?','fetch\x20failed','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','AISPe','PNAkp','xFcSB','ViZyK','umygI','Could\x20not\x20reach\x20','cwd','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','1704ZUHuvn','✓\x20Profile\x20\x27','list','trim','indexOf','nUAPL','Sfcbd','setupHeader','Xrchi','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','`\x20again\x20without\x20--skip-auth.','message','prompt','some','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','917ffrkVk','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','ipyqG','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','hBFOy','includes','NODE_TLS_REJECT_UNAUTHORIZED','BWZSs','YlFzE','What\x20would\x20you\x20like\x20to\x20do?','log','HTTP\x20','RzhEg','\x20--url\x20','jtUqh','⚠\x20Could\x20not\x20reach\x20','JIjvs','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','OnRhl','TJQID','nlJGt','3384018BRRySH','saveToCloud','error','188559zRkhGZ','HwhiU','\x22\x20not\x20found.','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','user_declined','pXYXf','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','JCLYJ','startsWith','KBApb','rNuqT','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','BKRcZ','tyMHP','Invalid\x20--setup-header\x20format:\x20\x22','Found\x20auth\x20environment\x20\x27','origin','279738WvTnFm','manual','length','yEmbF','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','http://localhost:3000','slice','url','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20Did\x20you\x20mean\x20','21712rGhgvh','VHnFZ','profile.add.autoRouteSkipped','retry','authEnv','force','Enxsf','TzXBR','blowG','Enter\x20a\x20different\x20URL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','profile.add.autoRouted','nGsrC','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','continue','zHSgH','no_auth_config','\x20(continuing\x20with\x20--force)','env'];_0x118d=function(){return _0x2f7c16;};return _0x118d();}const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x25271e=_0x24da;if(!process[_0x25271e(0x195)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x456f82){const _0x43a2ee=_0x24da,_0x31f31b={'QmNBa':_0x43a2ee(0x163),'NJfpe':function(_0x3eb469,_0x1252eb){return _0x3eb469(_0x1252eb);},'HBceU':function(_0xe18322,_0x3b730d){return _0xe18322<_0x3b730d;},'ViZyK':function(_0x48f48a,_0x2309f9){return _0x48f48a(_0x2309f9);}};try{const _0x4dfea6=new AbortController(),_0x79384e=setTimeout(()=>_0x4dfea6['abort'](),0x1388),_0x1de996={'method':_0x43a2ee(0x182),'signal':_0x4dfea6['signal'],'redirect':_0x31f31b['QmNBa']};/^https:\/\/localhost(:\d+)?/i['test'](_0x456f82)&&(process[_0x43a2ee(0x17e)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x5414d6=await fetch(_0x456f82,_0x1de996);delete process[_0x43a2ee(0x17e)][_0x43a2ee(0x13e)],_0x31f31b['NJfpe'](clearTimeout,_0x79384e);if(_0x31f31b['HBceU'](_0x5414d6[_0x43a2ee(0x187)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x43a2ee(0x143)+_0x5414d6['status']};}catch(_0x417b39){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x30fd26=_0x417b39,_0x3d087e=_0x30fd26[_0x43a2ee(0x1b8)]||_0x31f31b[_0x43a2ee(0x1a7)](String,_0x417b39),_0x9de8c0=_0x3d087e[_0x43a2ee(0x13d)]('Invalid\x20URL')||_0x30fd26['name']==='TypeError'||_0x3d087e[_0x43a2ee(0x13d)](_0x43a2ee(0x1a2));return{'ok':![],'error':_0x3d087e,'isProtocolError':_0x9de8c0};}}async function sweepOrphanLocalProfile(_0x4bab9e,_0x2dd526,_0x50f96e){const _0x2b73b8=_0x24da,_0x35ae3e={'LBjLK':function(_0x54393a,_0x511d9d,_0x5ba33e){return _0x54393a(_0x511d9d,_0x5ba33e);},'DjTYl':function(_0x2ff15b,_0x2fd530){return _0x2ff15b(_0x2fd530);},'AISPe':function(_0x3b7cf2,_0x864cd0){return _0x3b7cf2(_0x864cd0);},'EUEHR':function(_0x1a712a,_0x290cb4,_0x40f0a){return _0x1a712a(_0x290cb4,_0x40f0a);},'SyqGl':function(_0xd36e5e,_0x2c6726){return _0xd36e5e(_0x2c6726);},'blowG':function(_0x2575e3,_0x5390c9,_0x5df90c){return _0x2575e3(_0x5390c9,_0x5df90c);}},_0x3c4d14=_0x35ae3e[_0x2b73b8(0x18a)](join,_0x2dd526,'local'),_0x2a50ce=join(_0x3c4d14,_0x4bab9e);_0x35ae3e['DjTYl'](existsSync,_0x2a50ce)&&(_0x50f96e&&await _0x35ae3e[_0x2b73b8(0x1a4)](isPathGitTracked,_0x2a50ce)?console[_0x2b73b8(0x142)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x2a50ce+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x35ae3e['EUEHR'](rm,_0x2a50ce,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2a50ce)));if(existsSync(_0x3c4d14)){let _0x135bf6=[];try{_0x135bf6=await _0x35ae3e['SyqGl'](readdir,_0x3c4d14);}catch{return;}const _0x332cb7='.tmp-'+_0x4bab9e+'-';for(const _0x2f3e60 of _0x135bf6){if(!_0x2f3e60[_0x2b73b8(0x159)](_0x332cb7))continue;const _0x34bbd5=join(_0x3c4d14,_0x2f3e60);await _0x35ae3e[_0x2b73b8(0x174)](rm,_0x34bbd5,{'recursive':!![],'force':!![]}),console['log'](_0x2b73b8(0x149)+_0x34bbd5);}}}async function sweepOrphansBestEffort(_0x1074f0){const _0x17b274=_0x24da,_0x463c43={'hBFOy':function(_0xca9147,_0x19ae5c){return _0xca9147!==_0x19ae5c;},'NwNXm':function(_0x52047f){return _0x52047f();},'ekEDA':function(_0x4e00aa,_0x339ec4,_0x1a182c,_0x4e5cc7){return _0x4e00aa(_0x339ec4,_0x1a182c,_0x4e5cc7);}};try{await sweepOrphanLocalProfile(_0x1074f0,getRangerHomeDir(),![]);const _0x178427=getRangerDir();_0x463c43[_0x17b274(0x13c)](_0x178427,_0x463c43['NwNXm'](getRangerHomeDir))&&await _0x463c43[_0x17b274(0x18d)](sweepOrphanLocalProfile,_0x1074f0,_0x178427,!![]);}catch(_0x4412c1){console[_0x17b274(0x142)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x4412c1 instanceof Error?_0x4412c1['message']:String(_0x4412c1))+').');}}async function markActive(_0x14c693){const _0x1e9ae2=_0x24da,_0x1c2b62={'DnuaN':function(_0x1b58ff,_0x19d9d0){return _0x1b58ff(_0x19d9d0);},'AoJWI':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x1c2b62[_0x1e9ae2(0x188)](writeActiveProfileName,_0x14c693),console[_0x1e9ae2(0x142)]('\x20\x20Set\x20active\x20profile:\x20'+_0x14c693);}catch{console['log'](_0x1c2b62[_0x1e9ae2(0x192)]);}}async function tryAutoRouteCloudProfile(_0x15468b,_0x25a447,_0x3d03ab,_0x32dd91,_0x9b8c99){const _0x1583a0=_0x24da,_0x914f57={'DMhLn':function(_0x525fb1){return _0x525fb1();},'RzhEg':_0x1583a0(0x16e),'QzCKm':_0x1583a0(0x17c),'JXiQn':function(_0x33fcda,_0x5e6cdd){return _0x33fcda(_0x5e6cdd);},'QsUFV':function(_0x279ae6,_0x34e5b5){return _0x279ae6===_0x34e5b5;},'lASoB':function(_0x5bde63,_0xa8e028,_0x25b053,_0x1d18aa,_0x38fe97){return _0x5bde63(_0xa8e028,_0x25b053,_0x1d18aa,_0x38fe97);},'JIjvs':function(_0x35327b,_0x12eadd){return _0x35327b+_0x12eadd;},'Rppxi':function(_0x23ea75,_0x5286b4){return _0x23ea75+_0x5286b4;},'eGzWV':_0x1583a0(0x1ab),'xFcSB':_0x1583a0(0x13b),'rTLKn':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','AHzVV':_0x1583a0(0x19f),'PNAkp':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','LmWbJ':function(_0x1598db,_0x42927a,_0x80c4db){return _0x1598db(_0x42927a,_0x80c4db);},'JCLYJ':'no_match','umygI':'confirm','Zixzw':'user_declined','jtUqh':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','WvuNe':function(_0x55de43,_0x433779){return _0x55de43+_0x433779;}};let _0x403402;try{_0x403402=await _0x914f57[_0x1583a0(0x194)](fetchAuthConfig);}catch(_0x5d525a){return _0x9b8c99?.[_0x1583a0(0x186)](_0x914f57['RzhEg'],{'reason':_0x914f57['QzCKm'],'profileName':_0x15468b}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5d525a instanceof Error?_0x5d525a['message']:_0x914f57['JXiQn'](String,_0x5d525a))),![];}if((!_0x403402||!_0x403402['environments']||_0x914f57[_0x1583a0(0x17f)](Object[_0x1583a0(0x183)](_0x403402['environments'])['length'],0x0))&&!_0x3d03ab[_0x1583a0(0x170)]){if(_0x32dd91)return await _0x914f57['lASoB'](captureEnvLessProfile,_0x15468b,_0x25a447,_0x3d03ab,_0x9b8c99);return _0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x16e),{'reason':_0x914f57['QzCKm'],'profileName':_0x15468b}),console[_0x1583a0(0x14f)](_0x914f57[_0x1583a0(0x148)](_0x914f57['JIjvs'](_0x914f57[_0x1583a0(0x193)](_0x914f57['eGzWV'],'\x0a'),_0x914f57[_0x1583a0(0x1a6)])+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x15468b+_0x1583a0(0x145)+_0x25a447+_0x1583a0(0x185))+'\x0a'+_0x1583a0(0x157),_0x914f57['rTLKn'])),![];}let _0x2f43cf;if(_0x3d03ab[_0x1583a0(0x170)]){if(!_0x403402?.['environments']?.[_0x3d03ab[_0x1583a0(0x170)]]){const _0x45f0a9=Object['keys'](_0x403402?.[_0x1583a0(0x18e)]??{});return _0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x16e),{'reason':_0x914f57['AHzVV'],'profileName':_0x15468b}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x3d03ab[_0x1583a0(0x170)]+_0x1583a0(0x152)+(_0x45f0a9['length']?'\x20Configured\x20envs:\x20'+_0x45f0a9['join'](',\x20')+'.':_0x914f57[_0x1583a0(0x1a5)])),![];}_0x2f43cf=_0x3d03ab[_0x1583a0(0x170)];}else _0x2f43cf=_0x914f57['LmWbJ'](matchAuthEnvironment,_0x25a447,_0x403402);if(!_0x2f43cf)return _0x9b8c99?.[_0x1583a0(0x186)](_0x1583a0(0x16e),{'reason':_0x914f57[_0x1583a0(0x158)],'profileName':_0x15468b}),console[_0x1583a0(0x14f)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x25a447+_0x1583a0(0x179)+Object[_0x1583a0(0x183)](_0x403402?.[_0x1583a0(0x18e)]??{})['join'](',\x20')+'.'),![];const _0x2602a9=_0x403402?.['environments']?.[_0x2f43cf],_0x4a41f4=_0x2602a9?.['domains']??[];if(_0x32dd91&&!_0x3d03ab['yes']){const {saveToCloud:_0x282abe}=await _0x1cf43e[_0x1583a0(0x1b9)]([{'type':_0x914f57[_0x1583a0(0x1a8)],'name':_0x1583a0(0x14e),'message':_0x1583a0(0x160)+_0x2f43cf+'\x27\x20matching\x20'+_0x25a447+'\x0a\x20\x20(domains:\x20'+_0x4a41f4[_0x1583a0(0x19c)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x15468b+_0x1583a0(0x1a1),'default':!![]}]);if(!_0x282abe)return _0x9b8c99?.[_0x1583a0(0x186)](_0x914f57[_0x1583a0(0x144)],{'reason':_0x914f57['Zixzw'],'profileName':_0x15468b}),console[_0x1583a0(0x14f)](_0x914f57[_0x1583a0(0x146)]),![];}const _0x21f24c=_0x4a41f4[_0x1583a0(0x1ba)](_0x2beaea=>{const _0x2f25eb=_0x1583a0;try{return new URL(_0x2beaea)[_0x2f25eb(0x161)]===new URL(_0x25a447)[_0x2f25eb(0x161)];}catch{return![];}}),_0xd71602={};!_0x21f24c&&(_0xd71602['baseUrl']=_0x25a447);try{await createCloudProfile(_0x15468b,_0x2f43cf,{'settings':_0xd71602}),warnCloudProfileSharedInOrg();}catch(_0x228b43){if(_0x228b43 instanceof ApiError&&_0x228b43['status']===0x199){console['error'](_0x914f57['WvuNe'](_0x1583a0(0x189)+_0x15468b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x1583a0(0x176)+_0x15468b));throw _0x228b43;}throw _0x228b43;}return console[_0x1583a0(0x142)]('✓\x20Profile\x20\x27'+_0x15468b+'\x27\x20created.\x0a'+(_0x1583a0(0x1a3)+_0x15468b)),await sweepOrphansBestEffort(_0x15468b),_0x9b8c99?.['trackPhaseEnd'](_0x1583a0(0x177),{'envKey':_0x2f43cf,'profileName':_0x15468b}),!![];}async function createUnconfiguredCloudProfile(_0x84dd4f,_0x177d5d){const _0x1575c4=_0x24da,_0x2df8f5={'TzXBR':function(_0x346eeb){return _0x346eeb();},'xFaha':function(_0x41501d,_0xbf2c7a){return _0x41501d===_0xbf2c7a;},'BjZHZ':function(_0x49a9e3,_0x49b370){return _0x49a9e3+_0x49b370;}};try{await createCloudProfile(_0x84dd4f,undefined,{'settings':_0x177d5d}),_0x2df8f5[_0x1575c4(0x173)](warnCloudProfileSharedInOrg);}catch(_0x2fcc5){_0x2fcc5 instanceof ApiError&&_0x2df8f5['xFaha'](_0x2fcc5['status'],0x199)&&console['error'](_0x2df8f5['BjZHZ'](_0x1575c4(0x189)+_0x84dd4f+_0x1575c4(0x198),_0x1575c4(0x176)+_0x84dd4f));throw _0x2fcc5;}}async function captureEnvLessProfile(_0x166fd4,_0x36a355,_0xd40fc0,_0x48c5d9){const _0x51ae37=_0x24da,_0x1bde73={'tApBK':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','VHnFZ':function(_0x25ba39,_0x204e53){return _0x25ba39+_0x204e53;},'BKRcZ':function(_0x43bf48,_0x6bd8f4){return _0x43bf48+_0x6bd8f4;},'fyiOW':function(_0x2a23ad){return _0x2a23ad();},'yEmbF':function(_0x10a0f7,_0x47b09a){return _0x10a0f7 instanceof _0x47b09a;},'mtgEA':function(_0x1c68c3,_0x1772a2){return _0x1c68c3===_0x1772a2;}};if(!_0xd40fc0['yes']){const {capture:_0x55964d}=await _0x1cf43e[_0x51ae37(0x1b9)]([{'type':_0x51ae37(0x139),'name':_0x51ae37(0x19e),'message':_0x1bde73['tApBK'],'default':!![]}]);if(!_0x55964d)return _0x48c5d9?.[_0x51ae37(0x186)](_0x51ae37(0x16e),{'reason':_0x51ae37(0x155),'profileName':_0x166fd4}),console[_0x51ae37(0x14f)](_0x1bde73[_0x51ae37(0x16d)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x4957ea={};if(_0xd40fc0[_0x51ae37(0x1b3)])for(const _0x95a2dc of _0xd40fc0[_0x51ae37(0x1b3)]){const _0x3fda67=_0x95a2dc[_0x51ae37(0x1b0)](':');if(_0x3fda67===-0x1)continue;_0x4957ea[_0x95a2dc['slice'](0x0,_0x3fda67)[_0x51ae37(0x1af)]()]=_0x95a2dc['slice'](_0x1bde73[_0x51ae37(0x15d)](_0x3fda67,0x1))['trim']();}const _0x441a43={'baseUrl':_0x36a355};Object[_0x51ae37(0x183)](_0x4957ea)[_0x51ae37(0x164)]>0x0&&(_0x441a43[_0x51ae37(0x181)]=_0x4957ea);let _0x1b2ca4;try{_0x1b2ca4=await createCloudProfile(_0x166fd4,undefined,{'settings':_0x441a43}),_0x1bde73['fyiOW'](warnCloudProfileSharedInOrg);}catch(_0x55052f){_0x1bde73[_0x51ae37(0x165)](_0x55052f,ApiError)&&_0x1bde73['mtgEA'](_0x55052f[_0x51ae37(0x187)],0x199)&&console[_0x51ae37(0x14f)](_0x1bde73['VHnFZ']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x166fd4+_0x51ae37(0x198),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x166fd4));throw _0x55052f;}return await manualBrowserLogin(_0x1b2ca4,{'key':'','domains':[_0x36a355],'setupHeaders':Object[_0x51ae37(0x183)](_0x4957ea)[_0x51ae37(0x164)]>0x0?_0x4957ea:undefined}),console[_0x51ae37(0x142)](_0x1bde73['BKRcZ']('\x0a✓\x20Profile\x20\x27'+_0x166fd4+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x166fd4)),await sweepOrphansBestEffort(_0x166fd4),_0x48c5d9?.[_0x51ae37(0x186)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x166fd4}),!![];}export async function addEnv(_0x4f23cc,_0x538e0e={},_0x2bfc80){const _0x3abad4=_0x24da,_0x89db01={'YuPEJ':function(_0x384a86,_0x8548da){return _0x384a86+_0x8548da;},'zHSgH':_0x3abad4(0x153),'OnRhl':_0x3abad4(0x184),'Enxsf':_0x3abad4(0x196),'nGsrC':function(_0x28ff3a,_0x516b4b){return _0x28ff3a===_0x516b4b;},'HwhiU':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','Xrchi':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','uFpUx':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','tnmQT':function(_0x316fe8,_0x595a4d){return _0x316fe8(_0x595a4d);},'nUAPL':function(_0x3724d7,_0x17c7c0){return _0x3724d7>_0x17c7c0;},'Sfcbd':function(_0x29f693,_0x8e547d,_0x4c6e72){return _0x29f693(_0x8e547d,_0x4c6e72);},'nlJGt':function(_0x65d2fb,_0x863456,_0x46ea4d,_0x505bac,_0x184aed){return _0x65d2fb(_0x863456,_0x46ea4d,_0x505bac,_0x184aed);},'tyMHP':_0x3abad4(0x1a0),'KBApb':'isElectron','ipyqG':function(_0x57aa89,_0x4e82dc){return _0x57aa89(_0x4e82dc);},'TJQID':function(_0x168302,_0xfe03fb,_0x5a7041){return _0x168302(_0xfe03fb,_0x5a7041);},'BWZSs':'\x0a🌐\x20Profile\x20Setup\x0a','zhDxy':_0x3abad4(0x190),'IAlxH':function(_0xff56c0,_0x2147da){return _0xff56c0(_0x2147da);},'OVssg':_0x3abad4(0x1ae),'WUTyf':'action','PUakl':_0x3abad4(0x141),'YlFzE':'use_suggestion','rNuqT':_0x3abad4(0x175),'pXYXf':_0x3abad4(0x199),'iOoRt':function(_0x12cf40,_0x45e1a0){return _0x12cf40(_0x45e1a0);},'nEhoh':function(_0x3f7ce5,_0x16d471,_0x143cbe,_0x1f7cc1,_0x3cfdb7,_0x3b98a2){return _0x3f7ce5(_0x16d471,_0x143cbe,_0x1f7cc1,_0x3cfdb7,_0x3b98a2);},'hWkZH':function(_0x26251e,_0x2308d4){return _0x26251e instanceof _0x2308d4;}};_0x538e0e['ci']&&(console['error'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ'](_0x89db01['YuPEJ']('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x89db01[_0x3abad4(0x17b)]),'\x0a')+_0x3abad4(0x166)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x89db01[_0x3abad4(0x14a)]),_0x89db01[_0x3abad4(0x172)])),process[_0x3abad4(0x19b)](0x1));const _0x2a2c07={};if(_0x538e0e['setupHeader'])for(const _0x366fc9 of _0x538e0e['setupHeader']){const _0x53377d=_0x366fc9[_0x3abad4(0x1b0)](':');if(_0x89db01[_0x3abad4(0x178)](_0x53377d,-0x1))throw new Error(_0x3abad4(0x15f)+_0x366fc9+_0x3abad4(0x1b6));const _0x2703b1=_0x366fc9[_0x3abad4(0x168)](0x0,_0x53377d)[_0x3abad4(0x1af)](),_0x51ff81=_0x366fc9[_0x3abad4(0x168)](_0x53377d+0x1)[_0x3abad4(0x1af)]();_0x2a2c07[_0x2703b1]=_0x51ff81;}if(_0x538e0e['cdpEndpoint']!==undefined&&_0x89db01[_0x3abad4(0x178)](_0x538e0e[_0x3abad4(0x1a0)]['trim'](),''))throw new Error(_0x89db01[_0x3abad4(0x151)]);if(_0x538e0e['cdpEndpoint']&&_0x538e0e[_0x3abad4(0x169)])throw new Error(_0x89db01[_0x3abad4(0x1b4)]);if(_0x538e0e['authEnv']&&_0x538e0e[_0x3abad4(0x180)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x538e0e['authEnv']&&_0x538e0e['cdpEndpoint'])throw new Error(_0x89db01[_0x3abad4(0x18f)]);const _0x5e2ed0=_0x89db01['tnmQT'](Boolean,_0x538e0e[_0x3abad4(0x1a0)]),_0xd497c=isInteractive();if(!_0xd497c&&!_0x538e0e['url']&&!_0x5e2ed0&&!_0x538e0e[_0x3abad4(0x180)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x5e2ed0){const _0x498cf4=_0x538e0e[_0x3abad4(0x1a0)];console['log']('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x3abad4(0x142)](_0x3abad4(0x15c)+_0x498cf4);const _0x5674a3={'cdpEndpoint':_0x498cf4,'isElectron':!![]};_0x89db01[_0x3abad4(0x1b1)](Object['keys'](_0x2a2c07)['length'],0x0)&&(_0x5674a3[_0x3abad4(0x181)]=_0x2a2c07);await _0x89db01[_0x3abad4(0x1b2)](createUnconfiguredCloudProfile,_0x4f23cc,_0x5674a3);try{_0x89db01[_0x3abad4(0x14c)](setProfileOverride,process[_0x3abad4(0x1aa)](),_0x4f23cc,_0x89db01[_0x3abad4(0x15e)],_0x498cf4),setProfileOverride(process[_0x3abad4(0x1aa)](),_0x4f23cc,_0x89db01[_0x3abad4(0x15a)],!![]);}catch(_0x1b8d55){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x1b8d55 instanceof Error?_0x1b8d55[_0x3abad4(0x1b8)]:String(_0x1b8d55)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x4f23cc+'\x27\x20created\x20(CDP).'),await _0x89db01[_0x3abad4(0x13a)](sweepOrphansBestEffort,_0x4f23cc),await markActive(_0x4f23cc);return;}if(_0x538e0e['skipAuth']){const _0x464a8f={};_0x538e0e['url']&&(_0x464a8f['baseUrl']=_0x538e0e[_0x3abad4(0x169)]);Object[_0x3abad4(0x183)](_0x2a2c07)['length']>0x0&&(_0x464a8f['setupHeaders']=_0x2a2c07);await _0x89db01[_0x3abad4(0x14b)](createUnconfiguredCloudProfile,_0x4f23cc,_0x464a8f),console['log'](_0x3abad4(0x1ad)+_0x4f23cc+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4f23cc+_0x3abad4(0x1b7))),await sweepOrphansBestEffort(_0x4f23cc),await markActive(_0x4f23cc);return;}if(_0x538e0e['url']){const _0x581d51=_0x538e0e[_0x3abad4(0x169)],_0x46f2bd=await checkUrlReachability(_0x581d51);if(!_0x46f2bd['ok']&&!_0x538e0e[_0x3abad4(0x171)])throw new Error(_0x3abad4(0x1a9)+_0x581d51+':\x20'+_0x46f2bd[_0x3abad4(0x14f)]+_0x3abad4(0x154));!_0x46f2bd['ok']&&_0x538e0e['force']&&console[_0x3abad4(0x142)](_0x3abad4(0x147)+_0x581d51+':\x20'+_0x46f2bd['error']+_0x3abad4(0x17d));}else{console[_0x3abad4(0x142)](_0x89db01[_0x3abad4(0x13f)]),console['log'](_0x3abad4(0x16a)),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x342e79='',_0x5158f8=![];while(!![]){const _0xc356fd=await _0x1cf43e[_0x3abad4(0x1b9)]([{'type':'input','name':_0x89db01['zhDxy'],'message':_0x5158f8?_0x3abad4(0x1b5):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x342e79||_0x3abad4(0x167)}]);_0x342e79=_0xc356fd[_0x3abad4(0x190)];const _0x5d710d=await _0x89db01['IAlxH'](checkUrlReachability,_0x342e79);if(_0x5d710d['ok'])break;const _0x4838dc=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x342e79),_0x5cd937=_0x5d710d['isProtocolError']&&!_0x4838dc,_0xeb78ee=_0x5cd937?_0x3abad4(0x18c)+_0x342e79:null;_0x5158f8=!![],console['log'](_0x3abad4(0x1bd)+_0x342e79+':\x20'+_0x5d710d[_0x3abad4(0x14f)]);_0xeb78ee&&console['log'](_0x3abad4(0x16b)+_0xeb78ee+'?');const {action:_0x31017a}=await _0x1cf43e[_0x3abad4(0x1b9)]([{'type':_0x89db01['OVssg'],'name':_0x89db01['WUTyf'],'message':_0x89db01['PUakl'],'choices':[..._0xeb78ee?[{'name':'Use\x20'+_0xeb78ee,'value':_0x89db01[_0x3abad4(0x140)]}]:[],{'name':_0x89db01[_0x3abad4(0x15b)],'value':_0x3abad4(0x16f)},{'name':_0x89db01[_0x3abad4(0x156)],'value':_0x3abad4(0x17a)}]}]);if(_0x89db01[_0x3abad4(0x178)](_0x31017a,_0x3abad4(0x197))&&_0xeb78ee){_0x342e79=_0xeb78ee;const _0x9142b2=await _0x89db01[_0x3abad4(0x191)](checkUrlReachability,_0x342e79);if(_0x9142b2['ok'])break;console['log'](_0x3abad4(0x1bb)+_0x342e79+':\x20'+_0x9142b2['error']);}else{if(_0x31017a===_0x3abad4(0x17a))break;}}_0x538e0e={..._0x538e0e,'url':_0x342e79};}let _0x254b2b=![];try{_0x254b2b=await _0x89db01['nEhoh'](tryAutoRouteCloudProfile,_0x4f23cc,_0x538e0e[_0x3abad4(0x169)],_0x538e0e,_0xd497c,_0x2bfc80);}catch(_0x4d9a21){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4f23cc+'\x22:\x20'+(_0x89db01['hWkZH'](_0x4d9a21,Error)?_0x4d9a21['message']:String(_0x4d9a21))),process['exit'](0x1);}!_0x254b2b&&process['exit'](0x1),await markActive(_0x4f23cc);}
|
|
1
|
+
(function(_0x20f7d7,_0x2be8db){const _0x20de62=_0x3aa3,_0x496ba8=_0x20f7d7();while(!![]){try{const _0x5c9200=parseInt(_0x20de62(0x1b3))/0x1*(-parseInt(_0x20de62(0x1a3))/0x2)+parseInt(_0x20de62(0x1cd))/0x3+parseInt(_0x20de62(0x206))/0x4*(parseInt(_0x20de62(0x1de))/0x5)+parseInt(_0x20de62(0x1ef))/0x6+parseInt(_0x20de62(0x1ac))/0x7+-parseInt(_0x20de62(0x1aa))/0x8*(parseInt(_0x20de62(0x18e))/0x9)+-parseInt(_0x20de62(0x1e4))/0xa*(parseInt(_0x20de62(0x1ca))/0xb);if(_0x5c9200===_0x2be8db)break;else _0x496ba8['push'](_0x496ba8['shift']());}catch(_0x4815fb){_0x496ba8['push'](_0x496ba8['shift']());}}}(_0x2d18,0xae39f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1b2fad from'inquirer';function _0x3aa3(_0x4c6e81,_0x3e6089){_0x4c6e81=_0x4c6e81-0x186;const _0x2d180a=_0x2d18();let _0x3aa3f3=_0x2d180a[_0x4c6e81];return _0x3aa3f3;}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';function _0x2d18(){const _0x19c14f=['saveToCloud','profile.add.autoRouted','length','1818ozwPhh','no_match','✓\x20Profile\x20\x27','lJMmT','JRtwf','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','.tmp-','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','retry','HEAD','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','name','join','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','rGAUf','\x0a\x20\x20Could\x20not\x20reach\x20','nGAJm','tfxKQ','error','signal','1606282otbVzB','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','isProtocolError','use_suggestion','JLgHw','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','confirm','31352gkJmLq','profile.add.autoRouteSkipped','6693078oihXzs','keys','abort','list','\x22\x20not\x20found.','ZJBLb','origin','1WuGelp','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','manual','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','bOJkt','trackPhaseEnd','trim','baseUrl','RiIoL','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isTTY','\x27\x20created.\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','TgmKR','setupHeader','skipAuth','zJRut','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','url','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','\x27\x20created\x20(CDP).','GxvVF','904585PHMsPf','Enter\x20a\x20different\x20URL','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','3535245ENYxaH','Invalid\x20--setup-header\x20format:\x20\x22','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','WVxCZ','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x0a\x20\x20A\x20profile\x20named\x20\x22','HZGqi','KpsJa','startsWith','nRvjC','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','log','\x27\x20matching\x20','env','bESKF','pqTWY','stdout','10QjQGGT','RUPCs','indexOf','environments','nkVMc','kbrLw','120vnCzzn','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','pqqbW','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x27\x20created\x20(no\x20session).\x0a','yes','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','message','\x22:\x20','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','1949154IkwHzz','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x20\x20Did\x20you\x20mean\x20','LQbjY','lBNZD','cdpEndpoint','slice','RhJDV','LGTpF','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','authEnv','prompt','eSfka','YQusU','JiJRz','\x20--skip-auth\x0a','action','xetVF','gZgtK','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','status','rHEWb','1671604DLSbJa','eBFbH','YsJMJ','exit','user_declined','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','LvWsp','yyWjO','RARcT','lzqUp'];_0x2d18=function(){return _0x19c14f;};return _0x2d18();}import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x131e09=_0x3aa3;if(!process[_0x131e09(0x1dd)][_0x131e09(0x1bd)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x3201f3){const _0xfffc33=_0x3aa3,_0x51f9bb={'bpyQC':_0xfffc33(0x1b5),'lFWrY':function(_0x7d5061,_0x3a43cd){return _0x7d5061(_0x3a43cd);},'GxvVF':function(_0x1c1317,_0x3c44cc){return _0x1c1317<_0x3c44cc;}};try{const _0x5450c9=new AbortController(),_0x1815d1=setTimeout(()=>_0x5450c9[_0xfffc33(0x1ae)](),0x1388),_0xb767aa={'method':_0xfffc33(0x198),'signal':_0x5450c9[_0xfffc33(0x1a2)],'redirect':_0x51f9bb['bpyQC']};/^https:\/\/localhost(:\d+)?/i['test'](_0x3201f3)&&(process[_0xfffc33(0x1da)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4395eb=await fetch(_0x3201f3,_0xb767aa);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x51f9bb['lFWrY'](clearTimeout,_0x1815d1);if(_0x51f9bb[_0xfffc33(0x1c9)](_0x4395eb['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x4395eb['status']};}catch(_0x284d5f){delete process[_0xfffc33(0x1da)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x34559a=_0x284d5f,_0x3b5126=_0x34559a['message']||_0x51f9bb['lFWrY'](String,_0x284d5f),_0x265964=_0x3b5126['includes']('Invalid\x20URL')||_0x34559a[_0xfffc33(0x19a)]==='TypeError'||_0x3b5126['includes']('fetch\x20failed');return{'ok':![],'error':_0x3b5126,'isProtocolError':_0x265964};}}async function sweepOrphanLocalProfile(_0x54c685,_0xf9a2ad,_0x12f9d1){const _0x204279=_0x3aa3,_0x23561b={'pqqbW':function(_0x238c26,_0xd42f15,_0x36da72){return _0x238c26(_0xd42f15,_0x36da72);},'LvWsp':'local','cBjLd':function(_0x224c32,_0x5995b9){return _0x224c32(_0x5995b9);}},_0x386ad9=_0x23561b[_0x204279(0x1e6)](join,_0xf9a2ad,_0x23561b[_0x204279(0x187)]),_0x2fe7c4=_0x23561b[_0x204279(0x1e6)](join,_0x386ad9,_0x54c685);existsSync(_0x2fe7c4)&&(_0x12f9d1&&await isPathGitTracked(_0x2fe7c4)?console['log'](_0x204279(0x1d7)+_0x2fe7c4+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x2fe7c4,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2fe7c4)));if(_0x23561b['cBjLd'](existsSync,_0x386ad9)){let _0x12eacb=[];try{_0x12eacb=await readdir(_0x386ad9);}catch{return;}const _0x4e69a2=_0x204279(0x194)+_0x54c685+'-';for(const _0x559f4b of _0x12eacb){if(!_0x559f4b[_0x204279(0x1d5)](_0x4e69a2))continue;const _0x588004=_0x23561b[_0x204279(0x1e6)](join,_0x386ad9,_0x559f4b);await _0x23561b[_0x204279(0x1e6)](rm,_0x588004,{'recursive':!![],'force':!![]}),console[_0x204279(0x1d8)](_0x204279(0x1e7)+_0x588004);}}}async function sweepOrphansBestEffort(_0x3d9ae9){const _0x712e12=_0x3aa3,_0x275d13={'lzqUp':function(_0x5a95be,_0x15dc53){return _0x5a95be!==_0x15dc53;},'LUIGg':function(_0x127906,_0x538cee,_0x57f954,_0x366efd){return _0x127906(_0x538cee,_0x57f954,_0x366efd);},'uLiCs':function(_0x53d887,_0x3a86ae){return _0x53d887(_0x3a86ae);}};try{await sweepOrphanLocalProfile(_0x3d9ae9,getRangerHomeDir(),![]);const _0x3a2b20=getRangerDir();_0x275d13[_0x712e12(0x18a)](_0x3a2b20,getRangerHomeDir())&&await _0x275d13['LUIGg'](sweepOrphanLocalProfile,_0x3d9ae9,_0x3a2b20,!![]);}catch(_0x240969){console[_0x712e12(0x1d8)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x240969 instanceof Error?_0x240969[_0x712e12(0x1ec)]:_0x275d13['uLiCs'](String,_0x240969))+').');}}async function markActive(_0x2ba40c){const _0x2fde6f=_0x3aa3,_0x49dff1={'eXCln':function(_0x2299ff,_0x102268){return _0x2299ff(_0x102268);},'zRRzq':_0x2fde6f(0x1bf)};try{await _0x49dff1['eXCln'](writeActiveProfileName,_0x2ba40c),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x2ba40c);}catch{console['log'](_0x49dff1['zRRzq']);}}async function tryAutoRouteCloudProfile(_0x1a08fd,_0x3977fa,_0x1dfacf,_0x274cff,_0x359bab){const _0x4e334b=_0x3aa3,_0x1dc62d={'rGAUf':'no_auth_config','ncBwA':function(_0x4f98c7,_0x4fea7d){return _0x4f98c7 instanceof _0x4fea7d;},'lBNZD':function(_0x174744,_0x3587ad){return _0x174744(_0x3587ad);},'ZJBLb':function(_0x5eaaad,_0x3b717b){return _0x5eaaad===_0x3b717b;},'nRvjC':'profile.add.autoRouteSkipped','eBFbH':function(_0x4e0e89,_0x406484){return _0x4e0e89+_0x406484;},'NLlwp':function(_0x3db472,_0x327153){return _0x3db472+_0x327153;},'VNUPI':'\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','qdhjW':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','jAcaN':_0x4e334b(0x1cc),'nkVMc':function(_0x49334e,_0x4bcb37,_0x4bb035){return _0x49334e(_0x4bcb37,_0x4bb035);},'yyWjO':'confirm','JyVwb':_0x4e334b(0x18b),'pEvBv':_0x4e334b(0x1e8),'JLgHw':function(_0x14d54c,_0x577fa9,_0x5051ba,_0x6881f6){return _0x14d54c(_0x577fa9,_0x5051ba,_0x6881f6);},'gZgtK':function(_0xa2ff7c){return _0xa2ff7c();},'bOJkt':function(_0x772f24,_0xcd4a0c){return _0x772f24===_0xcd4a0c;},'ZAKJs':function(_0x11e8cc,_0x208dcd){return _0x11e8cc+_0x208dcd;}};let _0x25f818;try{_0x25f818=await fetchAuthConfig();}catch(_0x236918){return _0x359bab?.['trackPhaseEnd'](_0x4e334b(0x1ab),{'reason':_0x1dc62d[_0x4e334b(0x19d)],'profileName':_0x1a08fd}),console[_0x4e334b(0x1a1)](_0x4e334b(0x199)+(_0x1dc62d['ncBwA'](_0x236918,Error)?_0x236918[_0x4e334b(0x1ec)]:_0x1dc62d[_0x4e334b(0x1f3)](String,_0x236918))),![];}if((!_0x25f818||!_0x25f818['environments']||_0x1dc62d[_0x4e334b(0x1b1)](Object[_0x4e334b(0x1ad)](_0x25f818[_0x4e334b(0x1e1)])[_0x4e334b(0x18d)],0x0))&&!_0x1dfacf['authEnv']){if(_0x274cff)return await captureEnvLessProfile(_0x1a08fd,_0x3977fa,_0x1dfacf,_0x359bab);return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d['nRvjC'],{'reason':_0x1dc62d[_0x4e334b(0x19d)],'profileName':_0x1a08fd}),console['error'](_0x1dc62d[_0x4e334b(0x207)](_0x1dc62d['NLlwp'](_0x1dc62d['VNUPI'],'\x0a')+_0x1dc62d['qdhjW'],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1a08fd+'\x20--url\x20'+_0x3977fa+_0x4e334b(0x1fe))+'\x0a'+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'+_0x1dc62d['jAcaN']),![];}let _0x287c3e;if(_0x1dfacf['authEnv']){if(!_0x25f818?.[_0x4e334b(0x1e1)]?.[_0x1dfacf['authEnv']]){const _0x13b908=Object[_0x4e334b(0x1ad)](_0x25f818?.['environments']??{});return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d[_0x4e334b(0x1d6)],{'reason':'env_not_found','profileName':_0x1a08fd}),console[_0x4e334b(0x1a1)](_0x1dc62d['NLlwp']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x1dfacf[_0x4e334b(0x1f9)]+_0x4e334b(0x1b0),_0x13b908['length']?'\x20Configured\x20envs:\x20'+_0x13b908[_0x4e334b(0x19b)](',\x20')+'.':_0x4e334b(0x1f8))),![];}_0x287c3e=_0x1dfacf[_0x4e334b(0x1f9)];}else _0x287c3e=_0x1dc62d[_0x4e334b(0x1e2)](matchAuthEnvironment,_0x3977fa,_0x25f818);if(!_0x287c3e)return _0x359bab?.[_0x4e334b(0x1b8)](_0x4e334b(0x1ab),{'reason':_0x4e334b(0x18f),'profileName':_0x1a08fd}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x3977fa+_0x4e334b(0x193)+Object[_0x4e334b(0x1ad)](_0x25f818?.[_0x4e334b(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x892aa0=_0x25f818?.['environments']?.[_0x287c3e],_0x46a1dd=_0x892aa0?.['domains']??[];if(_0x274cff&&!_0x1dfacf[_0x4e334b(0x1ea)]){const {saveToCloud:_0x4f9b5a}=await _0x1b2fad[_0x4e334b(0x1fa)]([{'type':_0x1dc62d[_0x4e334b(0x188)],'name':_0x1dc62d['JyVwb'],'message':'Found\x20auth\x20environment\x20\x27'+_0x287c3e+_0x4e334b(0x1d9)+_0x3977fa+'\x0a\x20\x20(domains:\x20'+_0x46a1dd[_0x4e334b(0x19b)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1a08fd+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4f9b5a)return _0x359bab?.[_0x4e334b(0x1b8)](_0x1dc62d[_0x4e334b(0x1d6)],{'reason':'user_declined','profileName':_0x1a08fd}),console['error'](_0x1dc62d['pEvBv']),![];}const _0x24253c=_0x46a1dd['some'](_0x7a50d8=>{const _0x7de898=_0x4e334b;try{return new URL(_0x7a50d8)[_0x7de898(0x1b2)]===new URL(_0x3977fa)['origin'];}catch{return![];}}),_0x51f88c={};!_0x24253c&&(_0x51f88c['baseUrl']=_0x3977fa);try{await _0x1dc62d[_0x4e334b(0x1a7)](createCloudProfile,_0x1a08fd,_0x287c3e,{'settings':_0x51f88c}),_0x1dc62d[_0x4e334b(0x201)](warnCloudProfileSharedInOrg);}catch(_0xada6c5){if(_0xada6c5 instanceof ApiError&&_0x1dc62d[_0x4e334b(0x1b7)](_0xada6c5['status'],0x199)){console['error'](_0x1dc62d['ZAKJs'](_0x4e334b(0x1d2)+_0x1a08fd+_0x4e334b(0x1a4),_0x4e334b(0x186)+_0x1a08fd));throw _0xada6c5;}throw _0xada6c5;}return console[_0x4e334b(0x1d8)](_0x1dc62d['NLlwp']('✓\x20Profile\x20\x27'+_0x1a08fd+_0x4e334b(0x1be),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x1a08fd)),await sweepOrphansBestEffort(_0x1a08fd),_0x359bab?.[_0x4e334b(0x1b8)](_0x4e334b(0x18c),{'envKey':_0x287c3e,'profileName':_0x1a08fd}),!![];}async function createUnconfiguredCloudProfile(_0x5cdcef,_0xb6a7ee){const _0x3f0dc2=_0x3aa3,_0x3008c8={'RUPCs':function(_0x27c835,_0x2e0aaa,_0x2415ac,_0xf644d2){return _0x27c835(_0x2e0aaa,_0x2415ac,_0xf644d2);},'fGtuz':function(_0x45ca3f){return _0x45ca3f();},'bQBFV':function(_0x64c190,_0x29aded){return _0x64c190 instanceof _0x29aded;},'bESKF':function(_0x31d806,_0x37e3f1){return _0x31d806+_0x37e3f1;}};try{await _0x3008c8[_0x3f0dc2(0x1df)](createCloudProfile,_0x5cdcef,undefined,{'settings':_0xb6a7ee}),_0x3008c8['fGtuz'](warnCloudProfileSharedInOrg);}catch(_0xe4186){_0x3008c8['bQBFV'](_0xe4186,ApiError)&&_0xe4186[_0x3f0dc2(0x204)]===0x199&&console[_0x3f0dc2(0x1a1)](_0x3008c8[_0x3f0dc2(0x1db)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5cdcef+_0x3f0dc2(0x1a4),_0x3f0dc2(0x186)+_0x5cdcef));throw _0xe4186;}}async function captureEnvLessProfile(_0x523f13,_0x12d8a4,_0xd0f4b2,_0x436957){const _0x685db6=_0x3aa3,_0x14be16={'LGTpF':'capture','HZGqi':_0x685db6(0x19c),'eSfka':_0x685db6(0x20a),'TgmKR':function(_0x51b447,_0x45f569){return _0x51b447+_0x45f569;},'ZoOIU':function(_0x4907a8,_0x303087){return _0x4907a8===_0x303087;},'aVaur':function(_0x5c6dac,_0x1de19f,_0x774787,_0x448cb5){return _0x5c6dac(_0x1de19f,_0x774787,_0x448cb5);},'LQbjY':function(_0x567a36,_0x19ce1a){return _0x567a36 instanceof _0x19ce1a;},'GXduX':function(_0x4409da,_0x151ced){return _0x4409da+_0x151ced;},'iJBDL':_0x685db6(0x18c)};if(!_0xd0f4b2['yes']){const {capture:_0xa431a6}=await _0x1b2fad['prompt']([{'type':_0x685db6(0x1a9),'name':_0x14be16[_0x685db6(0x1f7)],'message':_0x14be16[_0x685db6(0x1d3)],'default':!![]}]);if(!_0xa431a6)return _0x436957?.[_0x685db6(0x1b8)](_0x685db6(0x1ab),{'reason':_0x14be16[_0x685db6(0x1fb)],'profileName':_0x523f13}),console['error'](_0x14be16[_0x685db6(0x1c1)](_0x685db6(0x1e5),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0xf09a3b={};if(_0xd0f4b2[_0x685db6(0x1c2)])for(const _0xe6df4f of _0xd0f4b2[_0x685db6(0x1c2)]){const _0x2b70d1=_0xe6df4f[_0x685db6(0x1e0)](':');if(_0x14be16['ZoOIU'](_0x2b70d1,-0x1))continue;_0xf09a3b[_0xe6df4f[_0x685db6(0x1f5)](0x0,_0x2b70d1)[_0x685db6(0x1b9)]()]=_0xe6df4f[_0x685db6(0x1f5)](_0x2b70d1+0x1)[_0x685db6(0x1b9)]();}const _0x345f8c={'baseUrl':_0x12d8a4};Object[_0x685db6(0x1ad)](_0xf09a3b)['length']>0x0&&(_0x345f8c['setupHeaders']=_0xf09a3b);let _0x1721e0;try{_0x1721e0=await _0x14be16['aVaur'](createCloudProfile,_0x523f13,undefined,{'settings':_0x345f8c}),warnCloudProfileSharedInOrg();}catch(_0x408dbd){_0x14be16[_0x685db6(0x1f2)](_0x408dbd,ApiError)&&_0x408dbd[_0x685db6(0x204)]===0x199&&console['error'](_0x685db6(0x1d2)+_0x523f13+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x685db6(0x186)+_0x523f13));throw _0x408dbd;}return await manualBrowserLogin(_0x1721e0,{'key':'','domains':[_0x12d8a4],'setupHeaders':Object[_0x685db6(0x1ad)](_0xf09a3b)[_0x685db6(0x18d)]>0x0?_0xf09a3b:undefined}),console['log'](_0x14be16['GXduX']('\x0a✓\x20Profile\x20\x27'+_0x523f13+_0x685db6(0x1eb),_0x685db6(0x1cf)+_0x523f13)),await sweepOrphansBestEffort(_0x523f13),_0x436957?.['trackPhaseEnd'](_0x14be16['iJBDL'],{'envKey':null,'profileName':_0x523f13}),!![];}export async function addEnv(_0x47ff45,_0x50b235={},_0x36b3cc){const _0x2131db=_0x3aa3,_0x5985e5={'tfxKQ':function(_0x5ab758,_0x57a5c9){return _0x5ab758+_0x57a5c9;},'CjxnA':function(_0xc7d83,_0x1b3004){return _0xc7d83+_0x1b3004;},'ZiyRB':function(_0x58b6ef,_0x4bac01){return _0x58b6ef+_0x4bac01;},'JiJRz':function(_0x152d92,_0x1034f2){return _0x152d92+_0x1034f2;},'RhJDV':_0x2131db(0x1bc),'wUuba':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','vgxbd':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','xetVF':_0x2131db(0x1b6),'RiIoL':function(_0x4d8635){return _0x4d8635();},'kbrLw':function(_0xf410df,_0x2eda15){return _0xf410df>_0x2eda15;},'XMMnv':function(_0x20843e,_0x15bebe,_0x1131ce){return _0x20843e(_0x15bebe,_0x1131ce);},'YsJMJ':function(_0x1f4948,_0x40401c,_0x2f10e0,_0x4eb797,_0x579a5b){return _0x1f4948(_0x40401c,_0x2f10e0,_0x4eb797,_0x579a5b);},'qAEIh':'isElectron','pqTWY':function(_0x443ca9,_0x1809f8){return _0x443ca9 instanceof _0x1809f8;},'fMYCf':function(_0x58c34c,_0x4a94a0){return _0x58c34c(_0x4a94a0);},'RARcT':function(_0x3ce53b,_0xea022d){return _0x3ce53b(_0xea022d);},'lJMmT':function(_0x35768b,_0x3973b9){return _0x35768b(_0x3973b9);},'nGAJm':function(_0xe8fef3,_0x33c3e1){return _0xe8fef3(_0x33c3e1);},'JRtwf':_0x2131db(0x1a8),'LCpMC':_0x2131db(0x1c0),'hMRLQ':_0x2131db(0x1ba),'zJRut':_0x2131db(0x1c5),'wMsJI':_0x2131db(0x1af),'kUrgm':_0x2131db(0x1ff),'rHEWb':'What\x20would\x20you\x20like\x20to\x20do?','WVxCZ':'continue','KpsJa':_0x2131db(0x1a6),'YQusU':function(_0xad59a5,_0x54874d,_0x1d6dcd,_0x5bf600,_0x285476,_0x11978e){return _0xad59a5(_0x54874d,_0x1d6dcd,_0x5bf600,_0x285476,_0x11978e);}};_0x50b235['ci']&&(console[_0x2131db(0x1a1)](_0x5985e5['tfxKQ'](_0x5985e5['CjxnA'](_0x5985e5['ZiyRB'](_0x5985e5[_0x2131db(0x1a0)](_0x5985e5[_0x2131db(0x1fd)](_0x5985e5[_0x2131db(0x1f6)],_0x5985e5['wUuba']),'\x0a')+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'+_0x5985e5['vgxbd'],'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1));const _0x5e3bac={};if(_0x50b235['setupHeader'])for(const _0x344cb5 of _0x50b235[_0x2131db(0x1c2)]){const _0x47ceb4=_0x344cb5[_0x2131db(0x1e0)](':');if(_0x47ceb4===-0x1)throw new Error(_0x2131db(0x1ce)+_0x344cb5+_0x2131db(0x202));const _0x5cc6db=_0x344cb5[_0x2131db(0x1f5)](0x0,_0x47ceb4)['trim'](),_0x1e052b=_0x344cb5[_0x2131db(0x1f5)](_0x5985e5[_0x2131db(0x1fd)](_0x47ceb4,0x1))[_0x2131db(0x1b9)]();_0x5e3bac[_0x5cc6db]=_0x1e052b;}if(_0x50b235[_0x2131db(0x1f4)]!==undefined&&_0x50b235[_0x2131db(0x1f4)][_0x2131db(0x1b9)]()==='')throw new Error(_0x2131db(0x1d1));if(_0x50b235['cdpEndpoint']&&_0x50b235['url'])throw new Error(_0x2131db(0x1f0));if(_0x50b235[_0x2131db(0x1f9)]&&_0x50b235['skipAuth'])throw new Error(_0x2131db(0x1b4));if(_0x50b235[_0x2131db(0x1f9)]&&_0x50b235[_0x2131db(0x1f4)])throw new Error(_0x5985e5[_0x2131db(0x200)]);const _0x51418f=Boolean(_0x50b235[_0x2131db(0x1f4)]),_0x43e494=_0x5985e5[_0x2131db(0x1bb)](isInteractive);if(!_0x43e494&&!_0x50b235[_0x2131db(0x1c6)]&&!_0x51418f&&!_0x50b235[_0x2131db(0x1c3)])throw new Error(_0x2131db(0x1c7));if(_0x51418f){const _0x6f9fa6=_0x50b235[_0x2131db(0x1f4)];console['log'](_0x2131db(0x1ee)),console[_0x2131db(0x1d8)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x6f9fa6);const _0x3f3d63={'cdpEndpoint':_0x6f9fa6,'isElectron':!![]};_0x5985e5[_0x2131db(0x1e3)](Object['keys'](_0x5e3bac)['length'],0x0)&&(_0x3f3d63['setupHeaders']=_0x5e3bac);await _0x5985e5['XMMnv'](createUnconfiguredCloudProfile,_0x47ff45,_0x3f3d63);try{_0x5985e5[_0x2131db(0x208)](setProfileOverride,process['cwd'](),_0x47ff45,'cdpEndpoint',_0x6f9fa6),setProfileOverride(process['cwd'](),_0x47ff45,_0x5985e5['qAEIh'],!![]);}catch(_0x358e43){console[_0x2131db(0x1a1)](_0x2131db(0x203)+(_0x5985e5[_0x2131db(0x1dc)](_0x358e43,Error)?_0x358e43[_0x2131db(0x1ec)]:_0x5985e5['fMYCf'](String,_0x358e43)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x47ff45+_0x2131db(0x1c8)),await _0x5985e5[_0x2131db(0x189)](sweepOrphansBestEffort,_0x47ff45),await _0x5985e5['RARcT'](markActive,_0x47ff45);return;}if(_0x50b235[_0x2131db(0x1c3)]){const _0x47f165={};_0x50b235[_0x2131db(0x1c6)]&&(_0x47f165[_0x2131db(0x1ba)]=_0x50b235['url']);_0x5985e5['kbrLw'](Object[_0x2131db(0x1ad)](_0x5e3bac)['length'],0x0)&&(_0x47f165['setupHeaders']=_0x5e3bac);await createUnconfiguredCloudProfile(_0x47ff45,_0x47f165),console[_0x2131db(0x1d8)](_0x2131db(0x190)+_0x47ff45+_0x2131db(0x1e9)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x47ff45+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x47ff45),await _0x5985e5[_0x2131db(0x191)](markActive,_0x47ff45);return;}if(_0x50b235['url']){const _0x44ede0=_0x50b235[_0x2131db(0x1c6)],_0x59e6ac=await _0x5985e5[_0x2131db(0x19f)](checkUrlReachability,_0x44ede0);if(!_0x59e6ac['ok']&&!_0x50b235['force'])throw new Error('Could\x20not\x20reach\x20'+_0x44ede0+':\x20'+_0x59e6ac['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x59e6ac['ok']&&_0x50b235['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x44ede0+':\x20'+_0x59e6ac['error']+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console[_0x2131db(0x1d8)](_0x5985e5[_0x2131db(0x192)]),console['log'](_0x5985e5['LCpMC']);let _0x50165a='',_0x4a8e87=![];while(!![]){const _0x445480=await _0x1b2fad['prompt']([{'type':'input','name':_0x5985e5['hMRLQ'],'message':_0x4a8e87?_0x5985e5[_0x2131db(0x1c4)]:_0x2131db(0x195),'default':_0x50165a||'http://localhost:3000'}]);_0x50165a=_0x445480['baseUrl'];const _0x20204c=await checkUrlReachability(_0x50165a);if(_0x20204c['ok'])break;const _0x3a4b29=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x50165a),_0x1f4c66=_0x20204c[_0x2131db(0x1a5)]&&!_0x3a4b29,_0x52fa28=_0x1f4c66?'http://'+_0x50165a:null;_0x4a8e87=!![],console[_0x2131db(0x1d8)](_0x2131db(0x19e)+_0x50165a+':\x20'+_0x20204c[_0x2131db(0x1a1)]);_0x52fa28&&console['log'](_0x2131db(0x1f1)+_0x52fa28+'?');const {action:_0x54e0d7}=await _0x1b2fad[_0x2131db(0x1fa)]([{'type':_0x5985e5['wMsJI'],'name':_0x5985e5['kUrgm'],'message':_0x5985e5[_0x2131db(0x205)],'choices':[..._0x52fa28?[{'name':'Use\x20'+_0x52fa28,'value':'use_suggestion'}]:[],{'name':_0x2131db(0x1cb),'value':_0x2131db(0x197)},{'name':'Continue\x20anyway','value':_0x5985e5['WVxCZ']}]}]);if(_0x54e0d7===_0x5985e5[_0x2131db(0x1d4)]&&_0x52fa28){_0x50165a=_0x52fa28;const _0x3296c9=await checkUrlReachability(_0x50165a);if(_0x3296c9['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x50165a+':\x20'+_0x3296c9[_0x2131db(0x1a1)]);}else{if(_0x54e0d7===_0x5985e5[_0x2131db(0x1d0)])break;}}_0x50b235={..._0x50b235,'url':_0x50165a};}let _0x1875c4=![];try{_0x1875c4=await _0x5985e5[_0x2131db(0x1fc)](tryAutoRouteCloudProfile,_0x47ff45,_0x50b235[_0x2131db(0x1c6)],_0x50b235,_0x43e494,_0x36b3cc);}catch(_0x1312ab){console['error'](_0x2131db(0x196)+_0x47ff45+_0x2131db(0x1ed)+(_0x1312ab instanceof Error?_0x1312ab['message']:_0x5985e5[_0x2131db(0x191)](String,_0x1312ab))),process[_0x2131db(0x209)](0x1);}!_0x1875c4&&process['exit'](0x1),await _0x5985e5['RARcT'](markActive,_0x47ff45);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5c18(_0x3ba274,_0x3ee209){_0x3ba274=_0x3ba274-0x154;var _0x1b0c50=_0x1b0c();var _0x5c18e0=_0x1b0c50[_0x3ba274];return _0x5c18e0;}(function(_0x3661fa,_0x9df942){var _0x33849b=_0x5c18,_0x1a35bb=_0x3661fa();while(!![]){try{var _0x1a3a36=-parseInt(_0x33849b(0x15f))/0x1+parseInt(_0x33849b(0x15c))/0x2*(-parseInt(_0x33849b(0x166))/0x3)+-parseInt(_0x33849b(0x158))/0x4*(parseInt(_0x33849b(0x155))/0x5)+-parseInt(_0x33849b(0x164))/0x6*(parseInt(_0x33849b(0x160))/0x7)+parseInt(_0x33849b(0x163))/0x8+-parseInt(_0x33849b(0x15e))/0x9*(-parseInt(_0x33849b(0x159))/0xa)+parseInt(_0x33849b(0x162))/0xb;if(_0x1a3a36===_0x9df942)break;else _0x1a35bb['push'](_0x1a35bb['shift']());}catch(_0xab94e4){_0x1a35bb['push'](_0x1a35bb['shift']());}}}(_0x1b0c,0x73c9a));export async function authEncrypt(_0x290d3c){var _0x498dc9=_0x5c18,_0x2ae6ac={'OZyJN':function(_0x4c656e,_0x41fa45){return _0x4c656e+_0x41fa45;},'taXSI':function(_0x4e1586,_0x273a1b){return _0x4e1586+_0x273a1b;},'wqMDE':_0x498dc9(0x15a),'jUnaB':_0x498dc9(0x167),'LWPSW':_0x498dc9(0x156),'MqDCl':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ziLQW':_0x498dc9(0x165)};console['error'](_0x2ae6ac[_0x498dc9(0x161)](_0x2ae6ac[_0x498dc9(0x15d)](_0x2ae6ac['OZyJN'](_0x2ae6ac['wqMDE'],_0x2ae6ac[_0x498dc9(0x15b)])+'\x0a'+_0x2ae6ac[_0x498dc9(0x154)]+_0x2ae6ac['MqDCl'],'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x2ae6ac[_0x498dc9(0x157)])),process['exit'](0x1);}function _0x1b0c(){var _0x1317db=['590682iGsDpH','taXSI','9xDHYEN','434774RAhfpo','5184809tRugaV','OZyJN','27508602KidxhF','275152ElGlkk','6KKXJDL','\x20\x20https://docs.ranger.net/main/concepts/profiles','3QvPTzv','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','LWPSW','1003095hnWTmG','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ziLQW','12zOTMcI','117490jZTEKg','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','jUnaB'];_0x1b0c=function(){return _0x1317db;};return _0x1b0c();}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x31fb83=_0x1788;(function(_0x3ee91b,_0x2ffa9c){const _0x1c2cfa=_0x1788,_0x210638=_0x3ee91b();while(!![]){try{const _0x14dc4a=-parseInt(_0x1c2cfa(0x17a))/0x1*(parseInt(_0x1c2cfa(0x187))/0x2)+parseInt(_0x1c2cfa(0x17d))/0x3*(-parseInt(_0x1c2cfa(0x177))/0x4)+-parseInt(_0x1c2cfa(0x16b))/0x5+parseInt(_0x1c2cfa(0x18a))/0x6+-parseInt(_0x1c2cfa(0x190))/0x7*(-parseInt(_0x1c2cfa(0x198))/0x8)+-parseInt(_0x1c2cfa(0x170))/0x9+parseInt(_0x1c2cfa(0x179))/0xa;if(_0x14dc4a===_0x2ffa9c)break;else _0x210638['push'](_0x210638['shift']());}catch(_0x18d72c){_0x210638['push'](_0x210638['shift']());}}}(_0xf24c,0xb481a));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0xf24c(){const _0x4ae201=['✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','error','tWaGP','log','xCEPt','plugin','LYCYs','push','442960zFqWhm','UrByj','FcZeL','LVBKL','marketplace','8107056UoZwcl','isArray','parse','yMeUs','e2e-test-recommender','utf-8','pvGaV','68mwIEuL','ignore','31561920vftbCP','4cagTEi','HwurT','replace','224907mfEmuM','FoqVm','✓\x20Removed\x20stored\x20credentials','close','\x0a✅\x20Cleanup\x20complete!\x0a','sQGBc','umhqF','NvRbJ','YRCcL','✓\x20Removed\x20trailhead\x20marketplace','383522qpKYBW','QvCTY','opencode.json','1867464ZiGGOl','GoFJQ','NbVWr','pbjGo','length','gCqpC','7LJehKl','ranger','KxYqB','remove','RILlR','zsDsl','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','sosTR','2422488qdiqtm','bug-bash','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','platform','--scope','trailhead'];_0xf24c=function(){return _0x4ae201;};return _0xf24c();}function _0x1788(_0x17a92c,_0x4a8f42){_0x17a92c=_0x17a92c-0x168;const _0xf24c76=_0xf24c();let _0x178875=_0xf24c76[_0x17a92c];return _0x178875;}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x31fb83(0x191),'feature-tracker',_0x31fb83(0x199),_0x31fb83(0x174)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1dee25){const _0x179ebc=_0x31fb83,_0x555065=_0x1dee25[_0x179ebc(0x17c)](/\/\*[\s\S]*?\*\//g,''),_0x3b3cb3=_0x555065['replace'](/^\s*\/\/.*$/gm,''),_0x57f09f=_0x3b3cb3[_0x179ebc(0x17c)](/,\s*([}\]])/g,'$1');return JSON[_0x179ebc(0x172)](_0x57f09f);}async function removeOpencodePluginConfig(_0x2e0332){const _0x1b365a=_0x31fb83,_0x22e976={'tWaGP':function(_0x399647,_0x297585){return _0x399647(_0x297585);},'UrByj':function(_0x26cc29,_0x2324f8,_0x471ffd){return _0x26cc29(_0x2324f8,_0x471ffd);},'LYCYs':function(_0x2abc11,_0x24ba24){return _0x2abc11===_0x24ba24;},'NcgnU':function(_0x35805f,_0x3801d6){return _0x35805f+_0x3801d6;}};if(!_0x22e976['tWaGP'](existsSync,_0x2e0332))return![];let _0x484653;try{const _0x153199=await _0x22e976[_0x1b365a(0x16c)](readFile,_0x2e0332,_0x1b365a(0x175));_0x484653=_0x22e976[_0x1b365a(0x1a0)](parseJsonc,_0x153199);}catch{return![];}const _0x2eea6f=Array[_0x1b365a(0x171)](_0x484653[_0x1b365a(0x168)])?_0x484653['plugin']:[];if(_0x2eea6f[_0x1b365a(0x18e)]===0x0)return![];const _0x3d0ff5=_0x2eea6f['filter'](_0x2ea65a=>{if(typeof _0x2ea65a!=='string')return!![];return _0x2ea65a!==opencodePluginName;});if(_0x3d0ff5['length']===_0x2eea6f[_0x1b365a(0x18e)])return![];return _0x22e976[_0x1b365a(0x169)](_0x3d0ff5[_0x1b365a(0x18e)],0x0)?delete _0x484653[_0x1b365a(0x168)]:_0x484653[_0x1b365a(0x168)]=_0x3d0ff5,await writeFile(_0x2e0332,_0x22e976['NcgnU'](JSON['stringify'](_0x484653,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x4d5f81){const _0x41a24c=_0x31fb83,_0x507e04={'KxYqB':function(_0x275c74,_0x8efc42){return _0x275c74(_0x8efc42);},'HwurT':function(_0x79bf90,_0x50017b){return _0x79bf90(_0x50017b);},'BsJdz':function(_0x4d983a,_0x4478ca){return _0x4d983a===_0x4478ca;},'hUlUy':_0x41a24c(0x19c),'Ubmjz':function(_0x45f36b,_0x339c93,_0xbb790d,_0x21e785){return _0x45f36b(_0x339c93,_0xbb790d,_0x21e785);},'PoXQC':'claude','NbVWr':_0x41a24c(0x178),'FoqVm':function(_0x2ee339,_0x3543bd){return _0x2ee339===_0x3543bd;},'lbkAi':_0x41a24c(0x19f)};return new Promise(_0x3719c3=>{const _0xf9a68b=_0x41a24c,_0x156514={'sosTR':function(_0x9e750c,_0x566ebf){const _0x19495f=_0x1788;return _0x507e04[_0x19495f(0x17b)](_0x9e750c,_0x566ebf);},'xCEPt':function(_0x4a5f8f,_0x1cbc44){return _0x507e04['BsJdz'](_0x4a5f8f,_0x1cbc44);}},_0x5c6b62=['plugin','uninstall','ranger@trailhead'];_0x4d5f81&&_0x5c6b62[_0xf9a68b(0x16a)](_0x507e04['hUlUy'],_0x4d5f81);const _0x3d831b=_0x507e04['Ubmjz'](spawn,_0x507e04['PoXQC'],_0x5c6b62,{'stdio':[_0x507e04[_0xf9a68b(0x18c)],_0x507e04['NbVWr'],_0x507e04[_0xf9a68b(0x18c)]],'cwd':_0x4d5f81?getProjectRoot():undefined,'shell':_0x507e04[_0xf9a68b(0x17e)](process[_0xf9a68b(0x19b)],'win32')});_0x3d831b['on'](_0xf9a68b(0x180),_0x3eb142=>{const _0x3ce086=_0xf9a68b;_0x156514[_0x3ce086(0x197)](_0x3719c3,_0x156514[_0x3ce086(0x1a2)](_0x3eb142,0x0));}),_0x3d831b['on'](_0x507e04['lbkAi'],()=>{const _0x3d88ee=_0xf9a68b;_0x507e04[_0x3d88ee(0x192)](_0x3719c3,![]);});});}async function removeMarketplace(){const _0x1b5ebc=_0x31fb83,_0xf07077={'GoFJQ':function(_0x3043b1,_0x3ce83b){return _0x3043b1===_0x3ce83b;},'HonKg':function(_0x69db50,_0x3fd90c,_0xb26332,_0x4160f7){return _0x69db50(_0x3fd90c,_0xb26332,_0x4160f7);},'yOEeP':'claude','zsDsl':_0x1b5ebc(0x168),'FcZeL':_0x1b5ebc(0x16f),'CXgfZ':_0x1b5ebc(0x19d),'aQkNZ':_0x1b5ebc(0x178),'mDvKQ':'win32'};return new Promise(_0x970d1a=>{const _0x1cc430=_0x1b5ebc,_0x4d4b52={'sQGBc':function(_0x447df9,_0x1d71b9){const _0x4923b0=_0x1788;return _0xf07077[_0x4923b0(0x18b)](_0x447df9,_0x1d71b9);},'ZknyF':function(_0x54c7dc,_0xa7b8a7){return _0x54c7dc(_0xa7b8a7);}},_0x25dac6=_0xf07077['HonKg'](spawn,_0xf07077['yOEeP'],[_0xf07077[_0x1cc430(0x195)],_0xf07077[_0x1cc430(0x16d)],_0x1cc430(0x193),_0xf07077['CXgfZ']],{'stdio':['ignore',_0xf07077['aQkNZ'],_0xf07077['aQkNZ']],'shell':process['platform']===_0xf07077['mDvKQ']});_0x25dac6['on']('close',_0xf9c9d7=>{const _0x145567=_0x1cc430;_0x970d1a(_0x4d4b52[_0x145567(0x182)](_0xf9c9d7,0x0));}),_0x25dac6['on'](_0x1cc430(0x19f),()=>{_0x4d4b52['ZknyF'](_0x970d1a,![]);});});}export async function clean(){const _0x196589=_0x31fb83,_0x5d17c3={'CfKzD':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PjLnQ':function(_0x19b5e2){return _0x19b5e2();},'Zhwnm':function(_0x454e8c){return _0x454e8c();},'LVBKL':function(_0x3cc402,_0x1f49fd){return _0x3cc402(_0x1f49fd);},'RILlR':function(_0x456af3){return _0x456af3();},'OIrph':function(_0x115ea5,_0x1dcb18){return _0x115ea5(_0x1dcb18);},'pbjGo':function(_0x498e93,_0x5c1193,_0x4399f0){return _0x498e93(_0x5c1193,_0x4399f0);},'YRCcL':function(_0x82c79){return _0x82c79();},'QvCTY':function(_0x54130e,_0x4847ea){return _0x54130e(_0x4847ea);},'yMeUs':'project','AHwWk':function(_0x5029fb,_0x1837cd,_0x1af90f){return _0x5029fb(_0x1837cd,_0x1af90f);},'NvRbJ':'user','umhqF':function(_0x50d52e,_0x401356){return _0x50d52e(_0x401356);},'sXkuG':function(_0x38dd21,_0xeff3b3,_0x531310){return _0x38dd21(_0xeff3b3,_0x531310);},'pvGaV':_0x196589(0x189),'fmjvo':function(_0x4c860c,_0x1cde1a,_0x39429e){return _0x4c860c(_0x1cde1a,_0x39429e);},'gCqpC':function(_0x7f33e,_0x12537b){return _0x7f33e(_0x12537b);},'GBCaF':_0x196589(0x19a),'DftHK':function(_0x44185e){return _0x44185e();}};console[_0x196589(0x1a1)](_0x5d17c3['CfKzD']);let _0x1751ca=![];try{await _0x5d17c3['PjLnQ'](deleteAllCredentials),console[_0x196589(0x1a1)](_0x196589(0x17f)),_0x1751ca=!![];}catch{}const _0x304e52=_0x5d17c3['Zhwnm'](getCacheFile);existsSync(_0x304e52)&&(await _0x5d17c3[_0x196589(0x16e)](rm,_0x304e52),_0x1751ca=!![]);const _0xbb24ae=_0x5d17c3[_0x196589(0x194)](getRangerDir);existsSync(_0xbb24ae)&&(await rm(_0xbb24ae,{'recursive':!![]}),console[_0x196589(0x1a1)]('✓\x20Removed\x20.ranger/\x20directory'),_0x1751ca=!![]);const _0x3796ab=_0x5d17c3['PjLnQ'](getProjectSkillsDir);for(const _0x1048c1 of skillsToRemove){const _0x58f801=join(_0x3796ab,_0x1048c1);_0x5d17c3['OIrph'](existsSync,_0x58f801)&&(await _0x5d17c3[_0x196589(0x18d)](rm,_0x58f801,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x1048c1),_0x1751ca=!![]);}const _0x519996=_0x5d17c3[_0x196589(0x185)](getUserSkillsDir);for(const _0x2f7200 of skillsToRemove){const _0x1b4779=_0x5d17c3[_0x196589(0x18d)](join,_0x519996,_0x2f7200);existsSync(_0x1b4779)&&(await rm(_0x1b4779,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x2f7200),_0x1751ca=!![]);}const _0x552191=_0x5d17c3[_0x196589(0x188)](getOpencodeSkillsDir,_0x5d17c3[_0x196589(0x173)]);for(const _0x4ce4d6 of skillsToRemove){const _0xf979df=_0x5d17c3['AHwWk'](join,_0x552191,_0x4ce4d6);_0x5d17c3['QvCTY'](existsSync,_0xf979df)&&(await rm(_0xf979df,{'recursive':!![]}),console[_0x196589(0x1a1)](_0x196589(0x196)+_0x4ce4d6),_0x1751ca=!![]);}const _0x2585ab=getOpencodeSkillsDir(_0x5d17c3[_0x196589(0x184)]);for(const _0x5cbf45 of skillsToRemove){const _0x1ef69f=join(_0x2585ab,_0x5cbf45);_0x5d17c3[_0x196589(0x183)](existsSync,_0x1ef69f)&&(await _0x5d17c3['sXkuG'](rm,_0x1ef69f,{'recursive':!![]}),console['log'](_0x196589(0x19e)+_0x5cbf45),_0x1751ca=!![]);}const _0x514ef4=_0x5d17c3[_0x196589(0x18d)](join,getOpencodeConfigDir('project'),_0x5d17c3[_0x196589(0x176)]);await removeOpencodePluginConfig(_0x514ef4)&&(console[_0x196589(0x1a1)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x1751ca=!![]);const _0x5c88d6=_0x5d17c3['fmjvo'](join,_0x5d17c3[_0x196589(0x18f)](getOpencodeConfigDir,_0x5d17c3['NvRbJ']),_0x5d17c3[_0x196589(0x176)]);await removeOpencodePluginConfig(_0x5c88d6)&&(console[_0x196589(0x1a1)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x1751ca=!![]);const _0x188abe=await uninstallClaudePlugin();_0x188abe&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x1751ca=!![]);const _0x71a083=await _0x5d17c3['OIrph'](uninstallClaudePlugin,_0x5d17c3[_0x196589(0x173)]);_0x71a083&&(console['log'](_0x5d17c3['GBCaF']),_0x1751ca=!![]);const _0x523d7b=await _0x5d17c3['DftHK'](removeMarketplace);_0x523d7b&&(console[_0x196589(0x1a1)](_0x196589(0x186)),_0x1751ca=!![]),_0x1751ca?console['log'](_0x196589(0x181)):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
|
|
1
|
+
const _0x21a125=_0x365f;(function(_0x54bfe5,_0x588d3b){const _0x37491e=_0x365f,_0x353c4a=_0x54bfe5();while(!![]){try{const _0x4c321a=parseInt(_0x37491e(0xca))/0x1*(parseInt(_0x37491e(0xcc))/0x2)+-parseInt(_0x37491e(0xee))/0x3*(-parseInt(_0x37491e(0xf9))/0x4)+parseInt(_0x37491e(0xd9))/0x5+parseInt(_0x37491e(0xf6))/0x6*(-parseInt(_0x37491e(0xe2))/0x7)+parseInt(_0x37491e(0xe8))/0x8*(-parseInt(_0x37491e(0xc8))/0x9)+parseInt(_0x37491e(0xce))/0xa+parseInt(_0x37491e(0xfc))/0xb*(parseInt(_0x37491e(0xfa))/0xc);if(_0x4c321a===_0x588d3b)break;else _0x353c4a['push'](_0x353c4a['shift']());}catch(_0x553515){_0x353c4a['push'](_0x353c4a['shift']());}}}(_0x5856,0x45912));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x5856(){const _0x1710f7=['XUAxM','uninstall','yIahp','RBEhY','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','952AYhzFc','feature-tracker','replace','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','user','win32','48qzIfDW','\x0a✅\x20Cleanup\x20complete!\x0a','rsgQj','GsiBd','cUhDr','claude','386031ouvKID','utf-8','SWoTv','GVbXQ','mEEXg','pkuDb','kMtBP','string','9294nPtsPU','log','close','4aUbFZp','12168qzKULl','project','4576SVAtPH','length','806958bwhJXc','plugin','254BxBhJk','marketplace','1654KIfMGq','error','1208420ORqkLL','EuQXu','platform','tBirp','McHhB','MKheO','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','remove','JmiMd','jBbQR','trailhead','760905ISCbjd','push','ranger@trailhead','hDtCN'];_0x5856=function(){return _0x1710f7;};return _0x5856();}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x21a125(0xe3),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x13c98a){const _0x252e9f=_0x21a125,_0xc286d2=_0x13c98a[_0x252e9f(0xe4)](/\/\*[\s\S]*?\*\//g,''),_0x45fc07=_0xc286d2[_0x252e9f(0xe4)](/^\s*\/\/.*$/gm,''),_0x345b2b=_0x45fc07['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x345b2b);}async function removeOpencodePluginConfig(_0x1577e3){const _0x58a144=_0x21a125,_0x236891={'TaBnG':function(_0x431f30,_0x29f124){return _0x431f30!==_0x29f124;},'GQlvE':function(_0x5bd874,_0x2a714d,_0x3f09a4){return _0x5bd874(_0x2a714d,_0x3f09a4);},'gzjoj':_0x58a144(0xef),'XUAxM':function(_0x3cfcaf,_0x2b06fb){return _0x3cfcaf(_0x2b06fb);}};if(!existsSync(_0x1577e3))return![];let _0x410816;try{const _0x204226=await _0x236891['GQlvE'](readFile,_0x1577e3,_0x236891['gzjoj']);_0x410816=_0x236891[_0x58a144(0xdd)](parseJsonc,_0x204226);}catch{return![];}const _0x1ac2e2=Array['isArray'](_0x410816['plugin'])?_0x410816['plugin']:[];if(_0x1ac2e2[_0x58a144(0xfd)]===0x0)return![];const _0x5f5344=_0x1ac2e2['filter'](_0xeacc84=>{const _0x5c6012=_0x58a144;if(_0x236891['TaBnG'](typeof _0xeacc84,_0x5c6012(0xf5)))return!![];return _0xeacc84!==opencodePluginName;});if(_0x5f5344['length']===_0x1ac2e2['length'])return![];return _0x5f5344[_0x58a144(0xfd)]===0x0?delete _0x410816['plugin']:_0x410816['plugin']=_0x5f5344,await writeFile(_0x1577e3,JSON['stringify'](_0x410816,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xf2c4bb){const _0x3303f3={'tBirp':function(_0x138b5f,_0x6310da){return _0x138b5f(_0x6310da);},'APknR':'--scope','MKheO':function(_0x1711ef){return _0x1711ef();},'JmiMd':function(_0x333ddb,_0x13aca5){return _0x333ddb===_0x13aca5;}};return new Promise(_0x59f8d7=>{const _0x387a13=_0x365f,_0x4a99a1=[_0x387a13(0xc9),_0x387a13(0xde),_0x387a13(0xdb)];_0xf2c4bb&&_0x4a99a1[_0x387a13(0xda)](_0x3303f3['APknR'],_0xf2c4bb);const _0x14a453=spawn(_0x387a13(0xed),_0x4a99a1,{'stdio':['ignore','ignore','ignore'],'cwd':_0xf2c4bb?_0x3303f3[_0x387a13(0xd3)](getProjectRoot):undefined,'shell':_0x3303f3[_0x387a13(0xd6)](process[_0x387a13(0xd0)],_0x387a13(0xe7))});_0x14a453['on'](_0x387a13(0xf8),_0x186743=>{const _0x45c2e9=_0x387a13;_0x3303f3[_0x45c2e9(0xd1)](_0x59f8d7,_0x186743===0x0);}),_0x14a453['on'](_0x387a13(0xcd),()=>{_0x59f8d7(![]);});});}function _0x365f(_0x406673,_0x51e59d){_0x406673=_0x406673-0xc8;const _0x58560e=_0x5856();let _0x365fe7=_0x58560e[_0x406673];return _0x365fe7;}async function removeMarketplace(){const _0x232d1b=_0x21a125,_0x151f1e={'pkuDb':function(_0x1a60da,_0x5418b9){return _0x1a60da(_0x5418b9);},'jBbQR':function(_0x5f578d,_0x1fc103){return _0x5f578d===_0x1fc103;},'LPDDq':_0x232d1b(0xcb),'OEiBL':_0x232d1b(0xd5),'ZXFPe':_0x232d1b(0xd8),'EuQXu':'ignore','yIahp':'close'};return new Promise(_0x3f11cc=>{const _0x3947ef=_0x232d1b,_0x3f799f=spawn('claude',[_0x3947ef(0xc9),_0x151f1e['LPDDq'],_0x151f1e['OEiBL'],_0x151f1e['ZXFPe']],{'stdio':[_0x151f1e[_0x3947ef(0xcf)],_0x151f1e[_0x3947ef(0xcf)],_0x151f1e['EuQXu']],'shell':process['platform']==='win32'});_0x3f799f['on'](_0x151f1e[_0x3947ef(0xdf)],_0x32f0cf=>{const _0x349df4=_0x3947ef;_0x151f1e[_0x349df4(0xf3)](_0x3f11cc,_0x151f1e[_0x349df4(0xd7)](_0x32f0cf,0x0));}),_0x3f799f['on']('error',()=>{_0x3f11cc(![]);});});}export async function clean(){const _0x5acbc1=_0x21a125,_0x5e0bc4={'FrEAQ':_0x5acbc1(0xe5),'mEEXg':function(_0x4acb09){return _0x4acb09();},'SWoTv':function(_0x3ad758,_0x3806f1){return _0x3ad758(_0x3806f1);},'McHhB':function(_0x21bfa0,_0x37dc2f){return _0x21bfa0(_0x37dc2f);},'kMtBP':function(_0x467167,_0x370be6,_0x1663b9){return _0x467167(_0x370be6,_0x1663b9);},'ljqmL':function(_0xe07773,_0x346d91,_0x218af6){return _0xe07773(_0x346d91,_0x218af6);},'GsiBd':function(_0x225421,_0x139527){return _0x225421(_0x139527);},'cUhDr':_0x5acbc1(0xfb),'RBEhY':_0x5acbc1(0xe6),'GVbXQ':'opencode.json','rsgQj':function(_0x55a4fa,_0x847ead){return _0x55a4fa(_0x847ead);},'dbESo':_0x5acbc1(0xd4),'JtUEX':_0x5acbc1(0xe1),'hDtCN':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ZSUkL':function(_0x13389c,_0x401c42){return _0x13389c(_0x401c42);},'xPVyG':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'};console['log'](_0x5e0bc4['FrEAQ']);let _0x1d301d=![];try{await _0x5e0bc4[_0x5acbc1(0xf2)](deleteAllCredentials),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20stored\x20credentials'),_0x1d301d=!![];}catch{}const _0x3b5b47=getCacheFile();_0x5e0bc4[_0x5acbc1(0xf0)](existsSync,_0x3b5b47)&&(await _0x5e0bc4['McHhB'](rm,_0x3b5b47),_0x1d301d=!![]);const _0x5cc920=getRangerDir();existsSync(_0x5cc920)&&(await rm(_0x5cc920,{'recursive':!![]}),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20.ranger/\x20directory'),_0x1d301d=!![]);const _0x3dcfd5=getProjectSkillsDir();for(const _0x2ac53f of skillsToRemove){const _0x2e6623=_0x5e0bc4[_0x5acbc1(0xf4)](join,_0x3dcfd5,_0x2ac53f);existsSync(_0x2e6623)&&(await _0x5e0bc4['ljqmL'](rm,_0x2e6623,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x2ac53f),_0x1d301d=!![]);}const _0x445721=getUserSkillsDir();for(const _0xc7c762 of skillsToRemove){const _0x2c417c=join(_0x445721,_0xc7c762);_0x5e0bc4[_0x5acbc1(0xeb)](existsSync,_0x2c417c)&&(await _0x5e0bc4['ljqmL'](rm,_0x2c417c,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0xc7c762),_0x1d301d=!![]);}const _0x2a5db8=getOpencodeSkillsDir(_0x5e0bc4[_0x5acbc1(0xec)]);for(const _0x5331f0 of skillsToRemove){const _0x112148=_0x5e0bc4[_0x5acbc1(0xf4)](join,_0x2a5db8,_0x5331f0);existsSync(_0x112148)&&(await rm(_0x112148,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5331f0),_0x1d301d=!![]);}const _0x2a16f3=_0x5e0bc4[_0x5acbc1(0xd2)](getOpencodeSkillsDir,_0x5e0bc4[_0x5acbc1(0xe0)]);for(const _0x5054cd of skillsToRemove){const _0x1fc48b=join(_0x2a16f3,_0x5054cd);_0x5e0bc4['SWoTv'](existsSync,_0x1fc48b)&&(await rm(_0x1fc48b,{'recursive':!![]}),console[_0x5acbc1(0xf7)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x5054cd),_0x1d301d=!![]);}const _0x33e5f2=join(getOpencodeConfigDir(_0x5e0bc4['cUhDr']),_0x5e0bc4[_0x5acbc1(0xf1)]);await _0x5e0bc4[_0x5acbc1(0xea)](removeOpencodePluginConfig,_0x33e5f2)&&(console['log'](_0x5e0bc4['dbESo']),_0x1d301d=!![]);const _0x12c062=join(getOpencodeConfigDir(_0x5e0bc4['RBEhY']),_0x5e0bc4[_0x5acbc1(0xf1)]);await removeOpencodePluginConfig(_0x12c062)&&(console['log'](_0x5e0bc4['JtUEX']),_0x1d301d=!![]);const _0x3b743e=await _0x5e0bc4['mEEXg'](uninstallClaudePlugin);_0x3b743e&&(console['log'](_0x5e0bc4[_0x5acbc1(0xdc)]),_0x1d301d=!![]);const _0x5ef28f=await _0x5e0bc4['ZSUkL'](uninstallClaudePlugin,_0x5e0bc4[_0x5acbc1(0xec)]);_0x5ef28f&&(console['log'](_0x5e0bc4['xPVyG']),_0x1d301d=!![]);const _0x4e0153=await removeMarketplace();_0x4e0153&&(console[_0x5acbc1(0xf7)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x1d301d=!![]),_0x1d301d?console['log'](_0x5acbc1(0xe9)):console[_0x5acbc1(0xf7)]('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x42cd63=_0x5890;(function(_0x34b2a1,_0x2152f8){const _0x45ae41=_0x5890,_0x4f6fbd=_0x34b2a1();while(!![]){try{const _0x18c39b=parseInt(_0x45ae41(0x1fd))/0x1*(-parseInt(_0x45ae41(0x1f9))/0x2)+-parseInt(_0x45ae41(0x21a))/0x3+-parseInt(_0x45ae41(0x215))/0x4+-parseInt(_0x45ae41(0x210))/0x5+parseInt(_0x45ae41(0x20d))/0x6+-parseInt(_0x45ae41(0x1f2))/0x7+parseInt(_0x45ae41(0x1fc))/0x8;if(_0x18c39b===_0x2152f8)break;else _0x4f6fbd['push'](_0x4f6fbd['shift']());}catch(_0x28da12){_0x4f6fbd['push'](_0x4f6fbd['shift']());}}}(_0x2a58,0x6a0d6));function _0x2a58(){const _0x29176a=['alsoExistsElsewhere','lIySK','SaPkz','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','tPJAP','tMuwf','BLfCH',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','160881eZvtHr','zAOht','isSafeInteger','KOYPz','aUjgc','ivvHi','\x20=\x20','16yQubUF','lgowX','JUdeO','13515104wIQrPZ','75833yjIYnT','endsWith','startsWith','OaiMr','QsxcA','false','true','settings','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','parse','sjIyU','keys','Dbqpv','isNaN','Set\x20','wHgxQ','4012722dJzPmR','ohckB','kind','2740755EPEeKi','cloud','test','qXwao','Removed\x20','2142960vhbKHq','headless','stringify','forceLogin','NgVol','630741nrlOPS','log','YpTCl','null','udZwR','(not\x20set)','ChQct','Key\x20\x22','undefined','object'];_0x2a58=function(){return _0x29176a;};return _0x2a58();}import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x42cd63(0x216),'allowInsecureLocalhost',_0x42cd63(0x218)];function parseLocalValue(_0xfd9d3f,_0x5e0acb){const _0x3d41d5=_0x42cd63,_0x4737e9={'Dbqpv':function(_0x23387b,_0x293790){return _0x23387b===_0x293790;},'tMuwf':_0x3d41d5(0x203),'YpTCl':function(_0x504177,_0x1d81b9){return _0x504177===_0x1d81b9;}};if(BOOLEAN_KEYS['includes'](_0xfd9d3f)){if(_0x4737e9[_0x3d41d5(0x209)](_0x5e0acb,_0x4737e9[_0x3d41d5(0x1ef)]))return!![];if(_0x4737e9[_0x3d41d5(0x21c)](_0x5e0acb,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0xfd9d3f+_0x3d41d5(0x1f1));}return _0x5e0acb;}function parseOverrideValue(_0x29f0e5){const _0x114957=_0x42cd63,_0x52fbc9={'qXwao':function(_0x164107,_0x5743b0){return _0x164107===_0x5743b0;},'GvpFO':_0x114957(0x203),'vOreZ':_0x114957(0x21d),'KOYPz':function(_0xf13315,_0x5504de){return _0xf13315(_0x5504de);}};if(_0x52fbc9[_0x114957(0x213)](_0x29f0e5,_0x52fbc9['GvpFO']))return!![];if(_0x29f0e5===_0x114957(0x202))return![];if(_0x29f0e5===_0x52fbc9['vOreZ'])return null;if(_0x29f0e5===_0x114957(0x222))return undefined;if(/^-?\d+$/['test'](_0x29f0e5)){const _0x550d1c=_0x52fbc9[_0x114957(0x1f5)](Number,_0x29f0e5);if(Number[_0x114957(0x1f4)](_0x550d1c))return _0x550d1c;}if(/^-?\d+\.\d+$/[_0x114957(0x212)](_0x29f0e5)){const _0x461a66=Number(_0x29f0e5);if(!Number[_0x114957(0x20a)](_0x461a66))return _0x461a66;}const _0xb8ac91=_0x29f0e5['trim']();if(_0xb8ac91[_0x114957(0x1ff)]('{')&&_0xb8ac91[_0x114957(0x1fe)]('}')||_0xb8ac91[_0x114957(0x1ff)]('[')&&_0xb8ac91['endsWith'](']'))try{return JSON[_0x114957(0x206)](_0xb8ac91);}catch{}return _0x29f0e5;}async function resolveProfileTarget(_0x4dea82){const _0x3f6201=_0x42cd63,_0x133346={'JUdeO':function(_0x32b33b,_0x241cf3){return _0x32b33b(_0x241cf3);},'bozEc':'local'},_0x5675e7=existsSync(_0x133346[_0x3f6201(0x1fb)](getEnvDir,_0x4dea82));let _0x236479=![];try{const _0x43e981=await fetchCloudProfile(_0x4dea82);_0x236479=Boolean(_0x43e981);}catch{}if(_0x236479)return{'kind':_0x3f6201(0x211),'alsoExistsElsewhere':_0x5675e7};if(_0x5675e7)return{'kind':_0x133346['bozEc'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4dea82+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4dea82);}function printDualExistsHint(_0x242983){const _0x42420f=_0x42cd63;console['log']('\x20\x20Note:\x20\x22'+_0x242983+_0x42420f(0x227));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x31c7ae){const _0x1fc93b=_0x42cd63,_0x41b14d={'lIySK':function(_0x2548a4,_0x3078a9){return _0x2548a4(_0x3078a9);},'fCUpY':function(_0x1bce2d,_0xa0c279,_0x3459f5){return _0x1bce2d(_0xa0c279,_0x3459f5);},'NgVol':function(_0x3f6670,_0x25a61b,_0x97ac44){return _0x3f6670(_0x25a61b,_0x97ac44);}},_0x1e3d10=await _0x41b14d[_0x1fc93b(0x225)](fetchCloudProfile,_0x31c7ae),_0xe9caa1=_0x41b14d['fCUpY'](readProfileOverrides,getProjectPath(),_0x31c7ae);return _0x41b14d[_0x1fc93b(0x219)](mergeCloudProfileSettings,_0x1e3d10?.[_0x1fc93b(0x204)]??{},_0xe9caa1??undefined);}export async function configSet(_0x55faad,_0x484ce6,_0x44d1e2){const _0xc2778a=_0x42cd63,_0x8db9ab={'udZwR':function(_0x1c8d72,_0x53b400){return _0x1c8d72===_0x53b400;},'EcqtK':'cloud','tPJAP':function(_0x5dd795,_0x296f7f,_0x424521,_0x55b75b,_0x51760c){return _0x5dd795(_0x296f7f,_0x424521,_0x55b75b,_0x51760c);},'ohckB':function(_0x5d76fa){return _0x5d76fa();},'LgXus':function(_0x2dc823,_0x1374bc,_0x1d0803){return _0x2dc823(_0x1374bc,_0x1d0803);}},_0x1721eb=await resolveProfileTarget(_0x55faad);if(_0x8db9ab[_0xc2778a(0x21e)](_0x1721eb[_0xc2778a(0x20f)],_0x8db9ab['EcqtK'])){if(_0x1721eb[_0xc2778a(0x224)])printDualExistsHint(_0x55faad);const _0x543865=parseOverrideValue(_0x44d1e2);_0x8db9ab[_0xc2778a(0x1ee)](setProfileOverride,_0x8db9ab[_0xc2778a(0x20e)](getProjectPath),_0x55faad,_0x484ce6,_0x543865),console[_0xc2778a(0x21b)]('Set\x20'+_0x484ce6+_0xc2778a(0x1f8)+JSON[_0xc2778a(0x217)](_0x543865)+'\x20for\x20\x22'+_0x55faad+'\x22');return;}const _0x516c4b=_0x8db9ab['LgXus'](parseLocalValue,_0x484ce6,_0x44d1e2);_0x8db9ab['tPJAP'](setProfileOverride,_0x8db9ab['ohckB'](getProjectPath),_0x55faad,_0x484ce6,_0x516c4b),console['log'](_0xc2778a(0x20b)+_0x484ce6+'\x20=\x20'+_0x516c4b+'\x20for\x20\x22'+_0x55faad+'\x22');}function _0x5890(_0x43610b,_0x3915a1){_0x43610b=_0x43610b-0x1ee;const _0x2a58dc=_0x2a58();let _0x589022=_0x2a58dc[_0x43610b];return _0x589022;}export async function configGet(_0x44eda4,_0x37fc63){const _0x1c9bcb=_0x42cd63,_0x5abf8d={'sjIyU':function(_0x40b886,_0x4d0c4f){return _0x40b886===_0x4d0c4f;},'UPhQn':_0x1c9bcb(0x211),'SaPkz':function(_0x2dab9e,_0x38fde6,_0x3ad862){return _0x2dab9e(_0x38fde6,_0x3ad862);},'aUjgc':'object','ivvHi':function(_0x3d679f,_0xfcb731){return _0x3d679f===_0xfcb731;}},_0x142d6d=await resolveProfileTarget(_0x44eda4);if(_0x5abf8d[_0x1c9bcb(0x207)](_0x142d6d[_0x1c9bcb(0x20f)],_0x5abf8d['UPhQn'])){const _0x424724=await loadEffectiveCloudSettings(_0x44eda4),_0x37358d=_0x5abf8d[_0x1c9bcb(0x226)](getNestedValue,_0x424724,_0x37fc63);if(_0x37358d===undefined)console['log']('(not\x20set)');else typeof _0x37358d===_0x5abf8d[_0x1c9bcb(0x1f6)]?console['log'](JSON['stringify'](_0x37358d,null,0x2)):console['log'](_0x37358d);return;}const _0x13bb46=await loadSettings(_0x44eda4),_0x42d947=getNestedValue(_0x13bb46,_0x37fc63);if(_0x5abf8d['ivvHi'](_0x42d947,undefined))console['log'](_0x1c9bcb(0x21f));else _0x5abf8d[_0x1c9bcb(0x1f7)](typeof _0x42d947,_0x1c9bcb(0x223))?console[_0x1c9bcb(0x21b)](JSON['stringify'](_0x42d947,null,0x2)):console['log'](_0x42d947);}export async function configList(_0x5928b5){const _0x113336=_0x42cd63,_0x39a6c2={'zAOht':function(_0x52e1f2,_0x45e8c1){return _0x52e1f2===_0x45e8c1;},'BZbsd':_0x113336(0x211),'OaiMr':function(_0x4f554a,_0x1f753b){return _0x4f554a(_0x1f753b);},'faHZK':function(_0x58a494,_0xff0953){return _0x58a494(_0xff0953);}},_0x5e657f=await resolveProfileTarget(_0x5928b5);if(_0x39a6c2[_0x113336(0x1f3)](_0x5e657f['kind'],_0x39a6c2['BZbsd'])){const _0xd98ee5=await _0x39a6c2[_0x113336(0x200)](loadEffectiveCloudSettings,_0x5928b5);if(!_0xd98ee5||Object[_0x113336(0x208)](_0xd98ee5)['length']===0x0){console[_0x113336(0x21b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22');return;}console['log'](JSON['stringify'](_0xd98ee5,null,0x2));return;}const _0x37a7e1=_0x39a6c2['OaiMr'](getSettingsPath,_0x5928b5);if(!existsSync(_0x37a7e1)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22');return;}const _0x586bb5=await loadSettings(_0x5928b5),_0x43eef0=_0x39a6c2['faHZK'](formatSettings,_0x586bb5);!_0x43eef0?console[_0x113336(0x21b)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5928b5+'\x22'):console[_0x113336(0x21b)](_0x43eef0);}export async function configUnset(_0x1edba0,_0x4f584f){const _0x233b13=_0x42cd63,_0x174222={'lgowX':function(_0x5e8688,_0x19fb49){return _0x5e8688(_0x19fb49);},'wHgxQ':_0x233b13(0x211),'xNnWA':function(_0x517fbe,_0x2211d8){return _0x517fbe(_0x2211d8);},'yqDey':function(_0x55de2f,_0x36d91a,_0x1941f6,_0x57f725){return _0x55de2f(_0x36d91a,_0x1941f6,_0x57f725);},'QsxcA':function(_0xd81067){return _0xd81067();},'ChQct':function(_0x3f961d,_0x4eba1f){return _0x3f961d(_0x4eba1f);},'uxCTg':function(_0x31f0ca,_0x5dc3ba,_0xf6f02d){return _0x31f0ca(_0x5dc3ba,_0xf6f02d);}},_0x1dc2ab=await _0x174222[_0x233b13(0x1fa)](resolveProfileTarget,_0x1edba0);if(_0x1dc2ab['kind']===_0x174222[_0x233b13(0x20c)]){if(_0x1dc2ab['alsoExistsElsewhere'])_0x174222['xNnWA'](printDualExistsHint,_0x1edba0);const _0x3ced52=_0x174222['yqDey'](unsetProfileOverride,_0x174222[_0x233b13(0x201)](getProjectPath),_0x1edba0,_0x4f584f);_0x3ced52?console['log']('Removed\x20'+_0x4f584f+'\x20for\x20\x22'+_0x1edba0+'\x22'):console[_0x233b13(0x21b)]('Key\x20\x22'+_0x4f584f+'\x22\x20not\x20found');return;}const _0x28cb3d=unsetProfileOverride(getProjectPath(),_0x1edba0,_0x4f584f);if(_0x28cb3d){console[_0x233b13(0x21b)](_0x233b13(0x214)+_0x4f584f);return;}const _0x570997=await _0x174222[_0x233b13(0x220)](loadSettings,_0x1edba0),_0x397b52=_0x174222['uxCTg'](deleteNestedValue,_0x570997,_0x4f584f);_0x397b52?console[_0x233b13(0x21b)](_0x233b13(0x221)+_0x4f584f+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x1edba0+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x233b13(0x21b)]('Key\x20\x22'+_0x4f584f+'\x22\x20not\x20found');}export async function configReset(_0xa2b59d){const _0x455a43=_0x42cd63,_0x1b23ae={'BLfCH':function(_0x1be398,_0x53046e){return _0x1be398===_0x53046e;},'QVmlP':function(_0x758c1d){return _0x758c1d();}},_0x49cb76=await resolveProfileTarget(_0xa2b59d);if(_0x1b23ae[_0x455a43(0x1f0)](_0x49cb76[_0x455a43(0x20f)],'cloud')){resetProfileOverrides(_0x1b23ae['QVmlP'](getProjectPath),_0xa2b59d),console[_0x455a43(0x21b)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0xa2b59d+'\x22');return;}console[_0x455a43(0x21b)]('\x22'+_0xa2b59d+_0x455a43(0x205)+_0xa2b59d+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
const _0x620c5=_0x56f4;(function(_0xf950d,_0x21c85e){const _0x5e2570=_0x56f4,_0xe7cdb8=_0xf950d();while(!![]){try{const _0x2bd804=-parseInt(_0x5e2570(0x11a))/0x1+-parseInt(_0x5e2570(0x10a))/0x2+parseInt(_0x5e2570(0x10b))/0x3+parseInt(_0x5e2570(0x11e))/0x4*(-parseInt(_0x5e2570(0x128))/0x5)+parseInt(_0x5e2570(0x124))/0x6+parseInt(_0x5e2570(0xfe))/0x7*(parseInt(_0x5e2570(0x102))/0x8)+parseInt(_0x5e2570(0xfa))/0x9*(parseInt(_0x5e2570(0xfd))/0xa);if(_0x2bd804===_0x21c85e)break;else _0xe7cdb8['push'](_0xe7cdb8['shift']());}catch(_0x551b46){_0xe7cdb8['push'](_0xe7cdb8['shift']());}}}(_0x2ded,0x77703));import{existsSync}from'fs';function _0x2ded(){const _0x46a59a=['forceLogin','isSafeInteger','dbOuU','XZFTE','alsoExistsElsewhere','isNaN','parse','uaAnR','object','166977ocgOKz','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','kind','310kWvvvA','7tAEDGu','vEYRE','Key\x20\x22','KCkoA','7024440MJhdNp','\x22\x20not\x20found','uZGLK','undefined','headless','PnwiL','keys','ddMPI','1318450FlClen','1130865mzOoHZ','bDTAS','false','\x20=\x20','No\x20configuration\x20set\x20for\x20\x22','test','log','QeZdS','YvsYm','(not\x20set)','gwEoM','cwd','gidpY','true','endsWith','621645FihNuT','WDrKt','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','HHyHP','19664rykKjA','dRWGh','cloud','Profile\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','LcoAE','3385608zqXnGS','nmIKx','Invalid\x20value\x20for\x20','yVNOY','635iargYZ','\x20for\x20\x22','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'];_0x2ded=function(){return _0x46a59a;};return _0x2ded();}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=[_0x620c5(0x106),'allowInsecureLocalhost',_0x620c5(0x12b)];function _0x56f4(_0x378003,_0x511c45){_0x378003=_0x378003-0xf3;const _0x2dedf7=_0x2ded();let _0x56f419=_0x2dedf7[_0x378003];return _0x56f419;}function parseLocalValue(_0x532997,_0x54fb03){const _0x22b943=_0x620c5,_0x1c4069={'wCtdZ':_0x22b943(0x118),'bDTAS':_0x22b943(0x10d)};if(BOOLEAN_KEYS['includes'](_0x532997)){if(_0x54fb03===_0x1c4069['wCtdZ'])return!![];if(_0x54fb03===_0x1c4069[_0x22b943(0x10c)])return![];throw new Error(_0x22b943(0x126)+_0x532997+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x54fb03;}function parseOverrideValue(_0x28e7c0){const _0x2bc242=_0x620c5,_0x50a9b7={'bThfd':'true','YvsYm':'null','PTrYs':function(_0x456c0b,_0x154aa5){return _0x456c0b===_0x154aa5;},'gwEoM':function(_0x57d58c,_0x37aeb6){return _0x57d58c(_0x37aeb6);}};if(_0x28e7c0===_0x50a9b7['bThfd'])return!![];if(_0x28e7c0===_0x2bc242(0x10d))return![];if(_0x28e7c0===_0x50a9b7[_0x2bc242(0x113)])return null;if(_0x50a9b7['PTrYs'](_0x28e7c0,_0x2bc242(0x105)))return undefined;if(/^-?\d+$/[_0x2bc242(0x110)](_0x28e7c0)){const _0x3c13bd=_0x50a9b7[_0x2bc242(0x115)](Number,_0x28e7c0);if(Number[_0x2bc242(0x12c)](_0x3c13bd))return _0x3c13bd;}if(/^-?\d+\.\d+$/[_0x2bc242(0x110)](_0x28e7c0)){const _0x3c1df2=_0x50a9b7[_0x2bc242(0x115)](Number,_0x28e7c0);if(!Number[_0x2bc242(0xf6)](_0x3c1df2))return _0x3c1df2;}const _0x33e37c=_0x28e7c0['trim']();if(_0x33e37c['startsWith']('{')&&_0x33e37c['endsWith']('}')||_0x33e37c['startsWith']('[')&&_0x33e37c[_0x2bc242(0x119)](']'))try{return JSON[_0x2bc242(0xf7)](_0x33e37c);}catch{}return _0x28e7c0;}async function resolveProfileTarget(_0x1773ad){const _0x161601=_0x620c5,_0x19ee9c={'uZGLK':function(_0x24461b,_0x262b24){return _0x24461b(_0x262b24);}},_0x598649=_0x19ee9c[_0x161601(0x104)](existsSync,getEnvDir(_0x1773ad));let _0x5b3822=![];try{const _0x4e4223=await fetchCloudProfile(_0x1773ad);_0x5b3822=Boolean(_0x4e4223);}catch{}if(_0x5b3822)return{'kind':'cloud','alsoExistsElsewhere':_0x598649};if(_0x598649)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x161601(0x121)+_0x1773ad+_0x161601(0x12a)+_0x1773ad);}function printDualExistsHint(_0x3e795e){const _0x264500=_0x620c5;console[_0x264500(0x111)]('\x20\x20Note:\x20\x22'+_0x3e795e+_0x264500(0xfb));}function getProjectPath(){const _0x4f57e2=_0x620c5;return process[_0x4f57e2(0x116)]();}async function loadEffectiveCloudSettings(_0x2343b7){const _0x316fc7=_0x620c5,_0x4dad9e={'dbOuU':function(_0x1cba8b,_0xadce7b,_0x1301c7){return _0x1cba8b(_0xadce7b,_0x1301c7);},'iTpeB':function(_0x2ea835){return _0x2ea835();}},_0xa57349=await fetchCloudProfile(_0x2343b7),_0x1c326f=_0x4dad9e[_0x316fc7(0xf3)](readProfileOverrides,_0x4dad9e['iTpeB'](getProjectPath),_0x2343b7);return _0x4dad9e[_0x316fc7(0xf3)](mergeCloudProfileSettings,_0xa57349?.['settings']??{},_0x1c326f??undefined);}export async function configSet(_0x56de46,_0x7cc54a,_0x4b2697){const _0x557a38=_0x620c5,_0x443d25={'QeZdS':function(_0x1962b4,_0x168b86){return _0x1962b4(_0x168b86);},'abNKQ':function(_0x171e45,_0x1a2ff4){return _0x171e45(_0x1a2ff4);},'dKlui':function(_0x240e93,_0x59aaa0){return _0x240e93(_0x59aaa0);},'CULbL':function(_0x5d1e6f){return _0x5d1e6f();},'WNLno':function(_0x2ecdb5,_0x25fb7,_0x5788a8,_0x2859e4,_0x2801f4){return _0x2ecdb5(_0x25fb7,_0x5788a8,_0x2859e4,_0x2801f4);},'KCkoA':function(_0x2119b7){return _0x2119b7();}},_0x37c660=await _0x443d25[_0x557a38(0x112)](resolveProfileTarget,_0x56de46);if(_0x37c660[_0x557a38(0xfc)]===_0x557a38(0x120)){if(_0x37c660[_0x557a38(0xf5)])_0x443d25['abNKQ'](printDualExistsHint,_0x56de46);const _0xce3f9b=_0x443d25['dKlui'](parseOverrideValue,_0x4b2697);setProfileOverride(_0x443d25['CULbL'](getProjectPath),_0x56de46,_0x7cc54a,_0xce3f9b),console[_0x557a38(0x111)]('Set\x20'+_0x7cc54a+_0x557a38(0x10e)+JSON['stringify'](_0xce3f9b)+'\x20for\x20\x22'+_0x56de46+'\x22');return;}const _0x49f1ed=parseLocalValue(_0x7cc54a,_0x4b2697);_0x443d25['WNLno'](setProfileOverride,_0x443d25[_0x557a38(0x101)](getProjectPath),_0x56de46,_0x7cc54a,_0x49f1ed),console['log']('Set\x20'+_0x7cc54a+'\x20=\x20'+_0x49f1ed+_0x557a38(0x129)+_0x56de46+'\x22');}export async function configGet(_0xb90a67,_0x30bebe){const _0xb791eb=_0x620c5,_0x436d62={'IlOxq':function(_0x5eea77,_0x40f3e1){return _0x5eea77===_0x40f3e1;},'XZFTE':function(_0x2d4789,_0x3de57a){return _0x2d4789(_0x3de57a);},'dRWGh':function(_0x2965a2,_0x2519bd,_0x40f9ef){return _0x2965a2(_0x2519bd,_0x40f9ef);},'nmIKx':function(_0x3366c1,_0x4db041){return _0x3366c1===_0x4db041;},'jBveF':_0xb791eb(0xf9),'PnwiL':function(_0x547baf,_0x4f1685){return _0x547baf===_0x4f1685;},'gidpY':function(_0x3d9e0f,_0x15505c){return _0x3d9e0f===_0x15505c;}},_0x8b7934=await resolveProfileTarget(_0xb90a67);if(_0x436d62['IlOxq'](_0x8b7934['kind'],'cloud')){const _0x5ce9bf=await _0x436d62[_0xb791eb(0xf4)](loadEffectiveCloudSettings,_0xb90a67),_0x512eb6=_0x436d62[_0xb791eb(0x11f)](getNestedValue,_0x5ce9bf,_0x30bebe);if(_0x512eb6===undefined)console['log'](_0xb791eb(0x114));else _0x436d62[_0xb791eb(0x125)](typeof _0x512eb6,_0x436d62['jBveF'])?console['log'](JSON['stringify'](_0x512eb6,null,0x2)):console[_0xb791eb(0x111)](_0x512eb6);return;}const _0x36aba3=await loadSettings(_0xb90a67),_0x3a3ea7=_0x436d62['dRWGh'](getNestedValue,_0x36aba3,_0x30bebe);if(_0x436d62[_0xb791eb(0x107)](_0x3a3ea7,undefined))console['log']('(not\x20set)');else _0x436d62[_0xb791eb(0x117)](typeof _0x3a3ea7,'object')?console[_0xb791eb(0x111)](JSON['stringify'](_0x3a3ea7,null,0x2)):console[_0xb791eb(0x111)](_0x3a3ea7);}export async function configList(_0x549386){const _0x4abeca=_0x620c5,_0x8e7813={'ddMPI':function(_0x5aafcc,_0x3d4fcf){return _0x5aafcc(_0x3d4fcf);},'WDrKt':function(_0x175d83,_0x105953){return _0x175d83(_0x105953);},'HHyHP':function(_0xc6dac9,_0x841488){return _0xc6dac9(_0x841488);}},_0x85beef=await resolveProfileTarget(_0x549386);if(_0x85beef['kind']==='cloud'){const _0x28df39=await _0x8e7813[_0x4abeca(0x109)](loadEffectiveCloudSettings,_0x549386);if(!_0x28df39||Object[_0x4abeca(0x108)](_0x28df39)['length']===0x0){console['log'](_0x4abeca(0x10f)+_0x549386+'\x22');return;}console['log'](JSON['stringify'](_0x28df39,null,0x2));return;}const _0x528550=_0x8e7813[_0x4abeca(0x11b)](getSettingsPath,_0x549386);if(!_0x8e7813['WDrKt'](existsSync,_0x528550)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x549386+'\x22');return;}const _0x1337db=await _0x8e7813[_0x4abeca(0x11d)](loadSettings,_0x549386),_0x55f86f=formatSettings(_0x1337db);!_0x55f86f?console[_0x4abeca(0x111)](_0x4abeca(0x10f)+_0x549386+'\x22'):console[_0x4abeca(0x111)](_0x55f86f);}export async function configUnset(_0xbe02a4,_0x45801b){const _0x29c499=_0x620c5,_0x1c5f5c={'LcoAE':'cloud','tYfdY':function(_0x1e3675,_0x175076){return _0x1e3675(_0x175076);},'uaAnR':function(_0x1fd39f,_0x372806,_0xff52ba,_0x235ab8){return _0x1fd39f(_0x372806,_0xff52ba,_0x235ab8);},'akHGi':function(_0x52b782){return _0x52b782();},'dFUhV':function(_0x386221,_0x26b9c3,_0x336a98,_0x26ad89){return _0x386221(_0x26b9c3,_0x336a98,_0x26ad89);},'vEYRE':function(_0x3eea51,_0x24282f){return _0x3eea51(_0x24282f);}},_0x1c5732=await resolveProfileTarget(_0xbe02a4);if(_0x1c5732['kind']===_0x1c5f5c[_0x29c499(0x123)]){if(_0x1c5732['alsoExistsElsewhere'])_0x1c5f5c['tYfdY'](printDualExistsHint,_0xbe02a4);const _0x4b7f6a=_0x1c5f5c[_0x29c499(0xf8)](unsetProfileOverride,_0x1c5f5c['akHGi'](getProjectPath),_0xbe02a4,_0x45801b);_0x4b7f6a?console[_0x29c499(0x111)]('Removed\x20'+_0x45801b+'\x20for\x20\x22'+_0xbe02a4+'\x22'):console['log']('Key\x20\x22'+_0x45801b+_0x29c499(0x103));return;}const _0x208edd=_0x1c5f5c['dFUhV'](unsetProfileOverride,getProjectPath(),_0xbe02a4,_0x45801b);if(_0x208edd){console[_0x29c499(0x111)]('Removed\x20'+_0x45801b);return;}const _0x265f07=await _0x1c5f5c[_0x29c499(0xff)](loadSettings,_0xbe02a4),_0x4a185d=deleteNestedValue(_0x265f07,_0x45801b);_0x4a185d?console['log'](_0x29c499(0x100)+_0x45801b+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0xbe02a4+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x29c499(0x111)]('Key\x20\x22'+_0x45801b+'\x22\x20not\x20found');}export async function configReset(_0x59519a){const _0x3c1e=_0x620c5,_0x40b99f={'fUZld':function(_0x3471fc,_0x2b919d){return _0x3471fc(_0x2b919d);},'yVNOY':function(_0x284f6f,_0x416a1c){return _0x284f6f===_0x416a1c;}},_0x4d8c88=await _0x40b99f['fUZld'](resolveProfileTarget,_0x59519a);if(_0x40b99f[_0x3c1e(0x127)](_0x4d8c88['kind'],'cloud')){resetProfileOverrides(getProjectPath(),_0x59519a),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x59519a+'\x22');return;}console[_0x3c1e(0x111)]('\x22'+_0x59519a+_0x3c1e(0x11c)+_0x59519a+_0x3c1e(0x122));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe89603,_0x13c85f){const _0x571c41=_0x4122,_0x4d1f46=_0xe89603();while(!![]){try{const _0xf48ca4=-parseInt(_0x571c41(0x18f))/0x1+parseInt(_0x571c41(0x19e))/0x2*(-parseInt(_0x571c41(0x191))/0x3)+parseInt(_0x571c41(0x1a3))/0x4*(-parseInt(_0x571c41(0x19c))/0x5)+parseInt(_0x571c41(0x19a))/0x6+-parseInt(_0x571c41(0x196))/0x7*(-parseInt(_0x571c41(0x193))/0x8)+parseInt(_0x571c41(0x197))/0x9+parseInt(_0x571c41(0x19b))/0xa*(parseInt(_0x571c41(0x1a5))/0xb);if(_0xf48ca4===_0x13c85f)break;else _0x4d1f46['push'](_0x4d1f46['shift']());}catch(_0x5e3bc5){_0x4d1f46['push'](_0x4d1f46['shift']());}}}(_0x32bc,0x7778d));import _0x410736 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x32bc(){const _0x63a267=['259osPhLT','4540950eOSAUq','SXVcK','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','2608998gBBgUe','4873270nyxIkL','1629965QwHjDR','yes','2jILdRJ','\x22\x20for\x20everyone\x20in\x20your\x20organization.','Type\x20\x22','confirmation','Cloud\x20profile\x20\x22','4kvhIID','vMzQK','11eEmanR','187312Fhcgsc','\x22\x20not\x20found.','1334637JMvEuD','log','4504FXLmFn','cwd','prompt'];_0x32bc=function(){return _0x63a267;};return _0x32bc();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x4122(_0x45577e,_0x192dd4){_0x45577e=_0x45577e-0x18f;const _0x32bc78=_0x32bc();let _0x412224=_0x32bc78[_0x45577e];return _0x412224;}export async function deleteProfile(_0x371ae2,_0x5b081a={}){const _0x4de0bc=_0x4122,_0x57f20e={'XylkQ':function(_0x4f9888){return _0x4f9888();},'vMzQK':'input','SXVcK':function(_0x2db5cc,_0x1ab25e){return _0x2db5cc!==_0x1ab25e;},'TphSs':function(_0x23d47a,_0x3c8134,_0x3e8ebf){return _0x23d47a(_0x3c8134,_0x3e8ebf);}},_0x398c58=await fetchCloudProfile(_0x371ae2);if(!_0x398c58)throw new Error(_0x4de0bc(0x1a2)+_0x371ae2+_0x4de0bc(0x190));if(!_0x5b081a[_0x4de0bc(0x19d)]&&!_0x57f20e['XylkQ'](isInteractive))throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x371ae2+_0x4de0bc(0x19f));if(!_0x5b081a[_0x4de0bc(0x19d)]){const {confirmation:_0x5be819}=await _0x410736[_0x4de0bc(0x195)]([{'type':_0x57f20e[_0x4de0bc(0x1a4)],'name':_0x4de0bc(0x1a1),'message':_0x4de0bc(0x1a0)+_0x371ae2+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x57f20e[_0x4de0bc(0x198)](_0x5be819,_0x371ae2))throw new Error(_0x4de0bc(0x199));}await deleteCloudProfile(_0x371ae2),_0x57f20e['TphSs'](resetProfileOverrides,process['cwd'](),_0x371ae2),_0x57f20e['TphSs'](clearLastProfile,process[_0x4de0bc(0x194)](),_0x371ae2),console[_0x4de0bc(0x192)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x371ae2+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x85f060=_0x2fa2;(function(_0x14a8fd,_0x2a7e98){const _0x4cedf4=_0x2fa2,_0x27badb=_0x14a8fd();while(!![]){try{const _0x1f21f4=-parseInt(_0x4cedf4(0x6f))/0x1*(parseInt(_0x4cedf4(0x87))/0x2)+-parseInt(_0x4cedf4(0x86))/0x3*(parseInt(_0x4cedf4(0xa6))/0x4)+parseInt(_0x4cedf4(0xa8))/0x5*(-parseInt(_0x4cedf4(0xa5))/0x6)+-parseInt(_0x4cedf4(0x8b))/0x7*(-parseInt(_0x4cedf4(0x88))/0x8)+-parseInt(_0x4cedf4(0x9e))/0x9*(parseInt(_0x4cedf4(0x96))/0xa)+-parseInt(_0x4cedf4(0xae))/0xb*(parseInt(_0x4cedf4(0x71))/0xc)+parseInt(_0x4cedf4(0x82))/0xd*(parseInt(_0x4cedf4(0x77))/0xe);if(_0x1f21f4===_0x2a7e98)break;else _0x27badb['push'](_0x27badb['shift']());}catch(_0x3367e3){_0x27badb['push'](_0x27badb['shift']());}}}(_0xdab4,0x18ab6));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0xdab4(){const _0x2a36e8=['.txt','13RudlCx','includes','no\x20session','UjXzJ','203331kXEzCd','194ifDZnH','14488dJfdEt','error','projectOverrides','301yZMwQb','LrPhG','name','push','\x0aLocal\x20Profiles\x20(legacy):','baseUrlSource','yJGGN','message','localeCompare','VmQKy','environmentKey','10kITZrK','sort','\x22:\x20','HebWg','length','baseUrl','map','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','1157049VIrobD','get','ipiaF','startPath','settings','RUwFg','all','77988IRNahN','4EusWbf','VhxMZ','10rbazhd','cwd','\x0aCloud\x20Profiles:','reports','\x0a*\x20=\x20active\x20profile','WxmRX','278091VqLwMi','IUxkA','log','1407TciwHU','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','84hWjsAi','sessionUpdatedAt','\x0aCloud\x20Profiles\x20(by\x20environment):','set','some','dStif','7825342wiadII','FRNGS','domains','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','UJwwa','\x20\x20\x20\x20\x20\x20URL:\x20','gvrWQ','uwTRj','sYwKk','endsWith'];_0xdab4=function(){return _0x2a36e8;};return _0xdab4();}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x85f060(0xab),'local','ci'];export function shouldGroupByEnvironment(_0x35aac6){const _0x4fac04=_0x85f060;return _0x35aac6[_0x4fac04(0x75)](_0x121ad3=>_0x121ad3['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x4e02fe){const _0x198d19=_0x85f060,_0x2e2c3f=new Map();for(const _0x34807d of _0x4e02fe){const _0x53da7f=_0x34807d[_0x198d19(0x95)]??null,_0x63a783=_0x2e2c3f['get'](_0x53da7f);if(_0x63a783)_0x63a783[_0x198d19(0x8e)](_0x34807d);else _0x2e2c3f['set'](_0x53da7f,[_0x34807d]);}const _0x1c685a=[..._0x2e2c3f['keys']()]['sort']((_0x227846,_0x24374b)=>{const _0x5dc421=_0x198d19;if(_0x227846===null)return 0x1;if(_0x24374b===null)return-0x1;return _0x227846[_0x5dc421(0x93)](_0x24374b);});return _0x1c685a['map'](_0x1e14bb=>({'environmentKey':_0x1e14bb,'profiles':_0x2e2c3f[_0x198d19(0x9f)](_0x1e14bb)['sort']((_0xb50e,_0x568fd7)=>_0xb50e['name'][_0x198d19(0x93)](_0x568fd7['name']))}));}function expandString(_0x3018cc){const _0x432169=_0x85f060,_0x3f3bf8={'WxmRX':function(_0x317b97,_0xe746e6){return _0x317b97(_0xe746e6);}};if(!_0x3018cc)return undefined;return _0x3f3bf8[_0x432169(0xad)](resolveEnvVars,_0x3018cc);}function expandProfileOverrides(_0x276602){const _0x45ec58=_0x85f060,_0x2c6a37={'ipiaF':function(_0x5a309a,_0x4df134){return _0x5a309a(_0x4df134);},'VTcYh':function(_0x2c7a75,_0x4a7649){return _0x2c7a75(_0x4a7649);}};if(!_0x276602)return null;return{..._0x276602,'baseUrl':_0x2c6a37[_0x45ec58(0xa0)](expandString,_0x276602[_0x45ec58(0x9b)]),'startPath':_0x2c6a37['VTcYh'](expandString,_0x276602[_0x45ec58(0xa1)])};}function _0x2fa2(_0x18229d,_0x56e4e6){_0x18229d=_0x18229d-0x6f;const _0xdab4be=_0xdab4();let _0x2fa203=_0xdab4be[_0x18229d];return _0x2fa203;}export function resolveCloudProfileListUrl(_0x2597da,_0x5c9877={}){const _0x421692=_0x85f060,_0x3dd239={'fptEQ':function(_0x15c004,_0x4dc4bd,_0x54b461){return _0x15c004(_0x4dc4bd,_0x54b461);},'iPzUT':function(_0x4fc0ec,_0x1c7cdf){return _0x4fc0ec(_0x1c7cdf);},'yJGGN':function(_0x56bfc2,_0x409ee5){return _0x56bfc2(_0x409ee5);},'HebWg':function(_0xd3740e,_0x62bd94){return _0xd3740e(_0x62bd94);}},_0x26ce79=_0x2597da[_0x421692(0xa2)]??{},_0x45a7c0=_0x5c9877['authConfig']?_0x3dd239['fptEQ'](resolveAuthEnvironmentLocally,_0x5c9877['authConfig'],_0x2597da[_0x421692(0x95)]):null,_0x2154d6=_0x3dd239['iPzUT'](resolveProfileUrl,{'projectOverrides':_0x3dd239[_0x421692(0x91)](expandProfileOverrides,_0x5c9877[_0x421692(0x8a)]??null),'cloudSettings':{'baseUrl':_0x3dd239[_0x421692(0x99)](expandString,_0x26ce79['baseUrl']),'startPath':expandString(_0x26ce79[_0x421692(0xa1)])},'authEnvironmentDomain':_0x45a7c0?.[_0x421692(0x79)]?.[0x0]});return{'baseUrl':_0x2154d6[_0x421692(0x9b)],'source':_0x2154d6[_0x421692(0x90)]};}async function loadCloudProfileListUrls(_0x41f7d5){const _0x201aa4=_0x85f060,_0x35482c={'HFNnt':function(_0x5b8663,_0x118623,_0x2895e1){return _0x5b8663(_0x118623,_0x2895e1);}},_0x2da81a=new Map();if(_0x41f7d5['length']===0x0)return _0x2da81a;const _0x319bea=await fetchAuthConfig();return await Promise[_0x201aa4(0xa4)](_0x41f7d5[_0x201aa4(0x9c)](async _0x308a3c=>{const _0x1c2acf=_0x201aa4;try{const _0x458e71=await fetchCloudProfile(_0x308a3c[_0x1c2acf(0x8d)]);if(!_0x458e71)return;_0x2da81a[_0x1c2acf(0x74)](_0x308a3c['name'],_0x35482c['HFNnt'](resolveCloudProfileListUrl,_0x458e71,{'authConfig':_0x319bea,'projectOverrides':readProfileOverrides(process[_0x1c2acf(0xa9)](),_0x308a3c['name'])}));}catch(_0x761c33){console[_0x1c2acf(0x89)](_0x1c2acf(0x70)+_0x308a3c['name']+_0x1c2acf(0x98)+(_0x761c33 instanceof Error?_0x761c33[_0x1c2acf(0x92)]:String(_0x761c33)));}})),_0x2da81a;}export async function getEnvNames(){const _0x3155f6=_0x85f060,_0x3921bb={'RUwFg':function(_0xdbb672,_0x23909e){return _0xdbb672(_0x23909e);},'UaPms':'local','gvrWQ':function(_0x341867,_0x297981){return _0x341867(_0x297981);},'hzArJ':function(_0x51e90a,_0xb9eef6,_0x448307){return _0x51e90a(_0xb9eef6,_0x448307);},'uwTRj':function(_0x22cde,_0x3886b8,_0x4bd74c){return _0x22cde(_0x3886b8,_0x4bd74c);},'VhxMZ':function(_0x39e26d,_0x467807){return _0x39e26d(_0x467807);}},_0x8ff431=getRangerDir();if(!_0x3921bb[_0x3155f6(0xa3)](existsSync,_0x8ff431))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x430f60=await readActiveProfileName(),_0x3ad951=[],_0x461211={},_0x19fce8=join(_0x8ff431,_0x3921bb['UaPms']);if(_0x3921bb[_0x3155f6(0xa3)](existsSync,_0x19fce8)){const _0x41b494=await _0x3921bb[_0x3155f6(0x7d)](readdir,_0x19fce8);for(const _0x5b40d8 of _0x41b494){const _0x145ca9=_0x3921bb['hzArJ'](join,_0x19fce8,_0x5b40d8),_0x4fb8bc=await stat(_0x145ca9);_0x4fb8bc['isDirectory']()&&(_0x3ad951[_0x3155f6(0x8e)](_0x5b40d8),_0x461211[_0x5b40d8]=_0x3921bb['UaPms']);}}const _0x598916=join(_0x8ff431,'ci');if(existsSync(_0x598916)){const _0x45f109=await _0x3921bb['RUwFg'](readdir,_0x598916);for(const _0x5b6d5e of _0x45f109){const _0x1b47b2=_0x3921bb[_0x3155f6(0x7e)](join,_0x598916,_0x5b6d5e),_0x571352=await _0x3921bb[_0x3155f6(0x7d)](stat,_0x1b47b2);_0x571352['isDirectory']()&&(_0x3ad951[_0x3155f6(0x8e)](_0x5b6d5e),_0x461211[_0x5b6d5e]='ci');}}const _0x70e222=await _0x3921bb[_0x3155f6(0xa3)](readdir,_0x8ff431);for(const _0xe518a1 of _0x70e222){if(NON_ENV_DIRS[_0x3155f6(0x83)](_0xe518a1))continue;if(_0xe518a1['startsWith']('.'))continue;if(_0xe518a1[_0x3155f6(0x80)](_0x3155f6(0x81)))continue;const _0x4c823e=join(_0x8ff431,_0xe518a1),_0x303993=await stat(_0x4c823e);_0x303993['isDirectory']()&&_0x3921bb[_0x3155f6(0xa7)](existsSync,join(_0x4c823e,'settings.json'))&&(!_0x3ad951['includes'](_0xe518a1)&&(_0x3ad951[_0x3155f6(0x8e)](_0xe518a1),_0x461211[_0xe518a1]='legacy'));}return{'envNames':_0x3ad951,'activeEnv':_0x430f60,'envTypes':_0x461211};}export async function envList(){const _0x591388=_0x85f060,_0x159ad0={'awaQD':function(_0x491690,_0x11965c){return _0x491690===_0x11965c;},'sYwKk':_0x591388(0x84),'WaMFx':function(_0x51ee75){return _0x51ee75();},'YsDta':function(_0x145514,_0x3c6fe7){return _0x145514 instanceof _0x3c6fe7;},'wIDlr':function(_0x53b93f,_0x314e9c){return _0x53b93f===_0x314e9c;},'LrPhG':function(_0x354ee5,_0x527bc1){return _0x354ee5===_0x527bc1;},'dStif':'\x0aNo\x20profiles\x20found.','VmQKy':function(_0x1bfdba,_0x57daab){return _0x1bfdba>_0x57daab;},'UjXzJ':_0x591388(0x8f),'vVWxk':function(_0x7f13e1,_0x1941f0){return _0x7f13e1(_0x1941f0);},'qUwBb':function(_0x16ce99,_0x3964b3){return _0x16ce99===_0x3964b3;},'FRNGS':'legacy','UyCNU':function(_0x533276,_0x4f0b7d){return _0x533276(_0x4f0b7d);},'IUxkA':function(_0x4809a7,_0x4db822,_0x34d011){return _0x4809a7(_0x4db822,_0x34d011);},'BJTwr':'\x20\x20\x20\x20','UJwwa':_0x591388(0xaa),'GBRBZ':function(_0x3de9fa,_0x370835,_0x32cc63){return _0x3de9fa(_0x370835,_0x32cc63);}},{envNames:_0x19ee58,activeEnv:_0xfc44e2,envTypes:_0x5d2ead}=await getEnvNames();let _0x325df3=[],_0x5b86f9=new Map();const _0x305943=await _0x159ad0['WaMFx'](getToken);if(_0x305943)try{_0x325df3=await listCloudProfiles(),_0x5b86f9=await loadCloudProfileListUrls(_0x325df3);}catch(_0x5915af){console['error'](_0x591388(0x7a)+(_0x159ad0['YsDta'](_0x5915af,Error)?_0x5915af['message']:String(_0x5915af)));}if(_0x159ad0['wIDlr'](_0x19ee58[_0x591388(0x9a)],0x0)&&_0x159ad0[_0x591388(0x8c)](_0x325df3['length'],0x0)){console['log'](_0x159ad0[_0x591388(0x76)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x55a37a=new Set(_0x325df3['map'](_0x42b24c=>_0x42b24c[_0x591388(0x8d)]));if(_0x159ad0[_0x591388(0x94)](_0x19ee58[_0x591388(0x9a)],0x0)){console[_0x591388(0xb0)](_0x159ad0[_0x591388(0x85)]);for(const _0x28f537 of _0x19ee58['sort']()){const _0x3caa6c=_0x28f537===_0xfc44e2&&!_0x55a37a['has'](_0x28f537),_0x39dd5b=_0x5d2ead[_0x28f537]||'local',_0x5cdbd7=await loadSettings(_0x28f537),_0x414b49=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x5cdbd7[_0x591388(0x9b)]),'projectOverrides':_0x159ad0['vVWxk'](expandProfileOverrides,readProfileOverrides(process['cwd'](),_0x28f537))}),_0x30074c=_0x159ad0['qUwBb'](_0x39dd5b,_0x159ad0[_0x591388(0x78)])?'':'\x20['+_0x39dd5b+']';console[_0x591388(0xb0)]('\x20\x20'+(_0x3caa6c?'*\x20':'\x20\x20')+_0x28f537+_0x30074c),_0x414b49['baseUrl']&&console[_0x591388(0xb0)](_0x591388(0x7c)+_0x414b49['baseUrl']),_0x5cdbd7['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x5cdbd7['environmentDetails']);}}const _0x189601=(_0x379cdf,_0x34e33e)=>{const _0x127687=_0x591388,_0xc55308=_0x159ad0['awaQD'](_0x379cdf[_0x127687(0x8d)],_0xfc44e2),_0x201d33=_0x379cdf['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x379cdf[_0x127687(0x72)]+')':_0x159ad0[_0x127687(0x7f)],_0x1b94c2=_0x5b86f9[_0x127687(0x9f)](_0x379cdf['name']);console[_0x127687(0xb0)](''+_0x34e33e+(_0xc55308?'*\x20':'\x20\x20')+_0x379cdf[_0x127687(0x8d)]),_0x1b94c2?.[_0x127687(0x9b)]&&console['log'](_0x34e33e+'\x20\x20\x20\x20URL:\x20'+_0x1b94c2[_0x127687(0x9b)]),console['log'](_0x34e33e+'\x20\x20\x20\x20Session:\x20'+_0x201d33);};if(_0x159ad0['VmQKy'](_0x325df3['length'],0x0)){if(shouldGroupByEnvironment(_0x325df3)){console[_0x591388(0xb0)](_0x591388(0x73));for(const _0x228ddf of _0x159ad0['UyCNU'](groupCloudProfilesByEnvironment,_0x325df3)){const _0x58d8b0=_0x228ddf['environmentKey']??_0x591388(0x9d);console[_0x591388(0xb0)]('\x0a\x20\x20'+_0x58d8b0);for(const _0x5c364e of _0x228ddf['profiles']){_0x159ad0[_0x591388(0xaf)](_0x189601,_0x5c364e,_0x159ad0['BJTwr']);}}}else{console['log'](_0x159ad0[_0x591388(0x7b)]);for(const _0x4d216b of[..._0x325df3][_0x591388(0x97)]((_0x1004e1,_0x379a9e)=>_0x1004e1[_0x591388(0x8d)][_0x591388(0x93)](_0x379a9e[_0x591388(0x8d)]))){_0x159ad0['GBRBZ'](_0x189601,_0x4d216b,'\x20\x20');}}}_0xfc44e2&&console['log'](_0x591388(0xac));}
|
|
1
|
+
(function(_0x146f45,_0xc47d9){const _0xce5b56=_0xe91e,_0x47bd32=_0x146f45();while(!![]){try{const _0x20b4d0=-parseInt(_0xce5b56(0xa5))/0x1+parseInt(_0xce5b56(0x7b))/0x2*(parseInt(_0xce5b56(0x81))/0x3)+parseInt(_0xce5b56(0x9e))/0x4+parseInt(_0xce5b56(0x9a))/0x5+-parseInt(_0xce5b56(0x76))/0x6*(parseInt(_0xce5b56(0x89))/0x7)+parseInt(_0xce5b56(0x91))/0x8*(-parseInt(_0xce5b56(0x80))/0x9)+parseInt(_0xce5b56(0x92))/0xa;if(_0x20b4d0===_0xc47d9)break;else _0x47bd32['push'](_0x47bd32['shift']());}catch(_0x1a4ab9){_0x47bd32['push'](_0x47bd32['shift']());}}}(_0x4475,0x536d0));function _0xe91e(_0x54f83a,_0x2e2cd3){_0x54f83a=_0x54f83a-0x75;const _0x447582=_0x4475();let _0xe91ea5=_0x447582[_0x54f83a];return _0xe91ea5;}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports','local','ci'];export function shouldGroupByEnvironment(_0xf1d224){return _0xf1d224['some'](_0x4fcf47=>_0x4fcf47['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x8c1180){const _0x5160b7=_0xe91e,_0x1f2307=new Map();for(const _0x5f6e19 of _0x8c1180){const _0x51bd36=_0x5f6e19[_0x5160b7(0x7c)]??null,_0x4c4ab3=_0x1f2307['get'](_0x51bd36);if(_0x4c4ab3)_0x4c4ab3[_0x5160b7(0x88)](_0x5f6e19);else _0x1f2307[_0x5160b7(0x8c)](_0x51bd36,[_0x5f6e19]);}const _0x221b09=[..._0x1f2307['keys']()][_0x5160b7(0xae)]((_0xf591e5,_0x417efe)=>{const _0x3efa18=_0x5160b7;if(_0xf591e5===null)return 0x1;if(_0x417efe===null)return-0x1;return _0xf591e5[_0x3efa18(0x75)](_0x417efe);});return _0x221b09['map'](_0x5e0b44=>({'environmentKey':_0x5e0b44,'profiles':_0x1f2307['get'](_0x5e0b44)[_0x5160b7(0xae)]((_0x4296cd,_0x1e6cd3)=>_0x4296cd[_0x5160b7(0x78)]['localeCompare'](_0x1e6cd3['name']))}));}function expandString(_0x440486){const _0x2d0ea5=_0xe91e,_0x537823={'iKuER':function(_0x5bc827,_0x460637){return _0x5bc827(_0x460637);}};if(!_0x440486)return undefined;return _0x537823[_0x2d0ea5(0x83)](resolveEnvVars,_0x440486);}function _0x4475(){const _0x2b8ab7=['\x20\x20\x20\x20','projectOverrides','no\x20session','includes','kdrEy','sort','isDirectory','hTpKj','\x20\x20\x20\x20URL:\x20','\x20\x20\x20\x20\x20\x20URL:\x20','environmentDetails','localeCompare','48JEXdjU','Run:\x20ranger\x20profile\x20add\x20<profile-name>','name','TvYss','\x22:\x20','22yhdMpt','environmentKey','ecZSA','SvBkZ','hNhhn','259317shXGFB','29481BhXRud','has','iKuER','juSim','map','baseUrl','ETamS','push','538370iJGxWN','LRuZe','neXrX','set','error','cached\x20(updated\x20','sessionUpdatedAt','rjDgv','112DCejFt','15648680fveMOD','cwd','UplxV','ocQjn','huEOc','\x0aCloud\x20Profiles:','UQSBC','\x0aCloud\x20Profiles\x20(by\x20environment):','992240XGJUIH','legacy','\x0aNo\x20profiles\x20found.','message','435308QocUFg','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','BTNtW','AwcyV','log','uusDI','JUoal','619866YLBboG','nChxw','length','ydcEG'];_0x4475=function(){return _0x2b8ab7;};return _0x4475();}function expandProfileOverrides(_0x2337c9){const _0x57bcff=_0xe91e,_0x2364f8={'hTpKj':function(_0x15353f,_0x323cc5){return _0x15353f(_0x323cc5);}};if(!_0x2337c9)return null;return{..._0x2337c9,'baseUrl':expandString(_0x2337c9['baseUrl']),'startPath':_0x2364f8[_0x57bcff(0xb0)](expandString,_0x2337c9['startPath'])};}export function resolveCloudProfileListUrl(_0x285696,_0x23f97f={}){const _0x27ce41=_0xe91e,_0xbd20d9={'nChxw':function(_0x4a914b,_0x1dbff1,_0x1bf971){return _0x4a914b(_0x1dbff1,_0x1bf971);},'mOVxV':function(_0x267b47,_0x9c92b0){return _0x267b47(_0x9c92b0);},'gwKib':function(_0x38b17a,_0x76254a){return _0x38b17a(_0x76254a);}},_0x14c312=_0x285696['settings']??{},_0x4dc8ae=_0x23f97f['authConfig']?_0xbd20d9[_0x27ce41(0xa6)](resolveAuthEnvironmentLocally,_0x23f97f['authConfig'],_0x285696['environmentKey']):null,_0x1b51c7=_0xbd20d9['mOVxV'](resolveProfileUrl,{'projectOverrides':expandProfileOverrides(_0x23f97f[_0x27ce41(0xaa)]??null),'cloudSettings':{'baseUrl':expandString(_0x14c312[_0x27ce41(0x86)]),'startPath':_0xbd20d9['gwKib'](expandString,_0x14c312['startPath'])},'authEnvironmentDomain':_0x4dc8ae?.['domains']?.[0x0]});return{'baseUrl':_0x1b51c7[_0x27ce41(0x86)],'source':_0x1b51c7['baseUrlSource']};}async function loadCloudProfileListUrls(_0x540da9){const _0x2757f9=_0xe91e,_0xd4ab84={'UplxV':function(_0x290ffa,_0x10e03b){return _0x290ffa instanceof _0x10e03b;},'BTNtW':function(_0x18f604,_0x1e24dc){return _0x18f604(_0x1e24dc);},'SvBkZ':function(_0x59e8b8,_0x292bba){return _0x59e8b8===_0x292bba;}},_0x5cef1e=new Map();if(_0xd4ab84[_0x2757f9(0x7e)](_0x540da9['length'],0x0))return _0x5cef1e;const _0x784f38=await fetchAuthConfig();return await Promise['all'](_0x540da9[_0x2757f9(0x85)](async _0x3ddbd9=>{const _0x2344e0=_0x2757f9;try{const _0x42440d=await fetchCloudProfile(_0x3ddbd9[_0x2344e0(0x78)]);if(!_0x42440d)return;_0x5cef1e['set'](_0x3ddbd9['name'],resolveCloudProfileListUrl(_0x42440d,{'authConfig':_0x784f38,'projectOverrides':readProfileOverrides(process['cwd'](),_0x3ddbd9['name'])}));}catch(_0x279041){console[_0x2344e0(0x8d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22'+_0x3ddbd9[_0x2344e0(0x78)]+_0x2344e0(0x7a)+(_0xd4ab84[_0x2344e0(0x94)](_0x279041,Error)?_0x279041['message']:_0xd4ab84[_0x2344e0(0xa0)](String,_0x279041)));}})),_0x5cef1e;}export async function getEnvNames(){const _0x2faed5=_0xe91e,_0x2665eb={'vSjsC':function(_0x353748,_0x28bf1a){return _0x353748(_0x28bf1a);},'juSim':function(_0x127eb2,_0x31aec5){return _0x127eb2(_0x31aec5);},'AwcyV':'local','VPnwg':function(_0xc5a361,_0x2184ac){return _0xc5a361(_0x2184ac);},'TvYss':function(_0x438e2b,_0x2bcd45,_0x27082c){return _0x438e2b(_0x2bcd45,_0x27082c);},'TIRAI':function(_0x103789,_0x30eb75){return _0x103789(_0x30eb75);},'GexCK':'.txt','HkArT':function(_0x1a83d5,_0x36779b,_0x252f0a){return _0x1a83d5(_0x36779b,_0x252f0a);},'ocQjn':function(_0x482da5,_0x569257){return _0x482da5(_0x569257);},'rjDgv':'legacy'},_0x4e3298=getRangerDir();if(!_0x2665eb['vSjsC'](existsSync,_0x4e3298))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4eff68=await readActiveProfileName(),_0x156109=[],_0x1cc691={},_0x53719b=join(_0x4e3298,'local');if(existsSync(_0x53719b)){const _0x428337=await readdir(_0x53719b);for(const _0xe42057 of _0x428337){const _0x19cfa4=join(_0x53719b,_0xe42057),_0xac64b9=await _0x2665eb[_0x2faed5(0x84)](stat,_0x19cfa4);_0xac64b9['isDirectory']()&&(_0x156109['push'](_0xe42057),_0x1cc691[_0xe42057]=_0x2665eb[_0x2faed5(0xa1)]);}}const _0x3d0bfa=join(_0x4e3298,'ci');if(existsSync(_0x3d0bfa)){const _0x1248b1=await _0x2665eb['VPnwg'](readdir,_0x3d0bfa);for(const _0x28b953 of _0x1248b1){const _0x5af09d=_0x2665eb[_0x2faed5(0x79)](join,_0x3d0bfa,_0x28b953),_0x402049=await _0x2665eb['TIRAI'](stat,_0x5af09d);_0x402049[_0x2faed5(0xaf)]()&&(_0x156109[_0x2faed5(0x88)](_0x28b953),_0x1cc691[_0x28b953]='ci');}}const _0x1695ac=await _0x2665eb['VPnwg'](readdir,_0x4e3298);for(const _0x419e19 of _0x1695ac){if(NON_ENV_DIRS[_0x2faed5(0xac)](_0x419e19))continue;if(_0x419e19['startsWith']('.'))continue;if(_0x419e19['endsWith'](_0x2665eb['GexCK']))continue;const _0x26bd47=_0x2665eb['HkArT'](join,_0x4e3298,_0x419e19),_0x3073ae=await stat(_0x26bd47);_0x3073ae[_0x2faed5(0xaf)]()&&_0x2665eb[_0x2faed5(0x95)](existsSync,_0x2665eb[_0x2faed5(0x79)](join,_0x26bd47,'settings.json'))&&(!_0x156109['includes'](_0x419e19)&&(_0x156109[_0x2faed5(0x88)](_0x419e19),_0x1cc691[_0x419e19]=_0x2665eb[_0x2faed5(0x90)]));}return{'envNames':_0x156109,'activeEnv':_0x4eff68,'envTypes':_0x1cc691};}export async function envList(){const _0x267f45=_0xe91e,_0x22ee4d={'paqLW':function(_0x5a9ca3,_0xb925f2){return _0x5a9ca3===_0xb925f2;},'UQSBC':function(_0x419648){return _0x419648();},'LRuZe':function(_0x1f50d5){return _0x1f50d5();},'hNhhn':function(_0x2f0052){return _0x2f0052();},'neXrX':function(_0x292539,_0x27320e){return _0x292539(_0x27320e);},'KNYjS':function(_0x16c84e,_0x59a041){return _0x16c84e instanceof _0x59a041;},'ydcEG':_0x267f45(0x9c),'bVrjL':_0x267f45(0x77),'uusDI':function(_0x44b2ee,_0x2eebd4){return _0x44b2ee>_0x2eebd4;},'fQcRF':'\x0aLocal\x20Profiles\x20(legacy):','huEOc':_0x267f45(0x9b),'kdrEy':function(_0x1d340d,_0x1de9cb){return _0x1d340d(_0x1de9cb);},'ecZSA':_0x267f45(0x99),'ETamS':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','cdjsz':function(_0x492c33,_0xcd0199,_0x3467d6){return _0x492c33(_0xcd0199,_0x3467d6);},'JUoal':_0x267f45(0xa9),'IxmzV':_0x267f45(0x97)},{envNames:_0x4fa202,activeEnv:_0x14bcfb,envTypes:_0x3078ff}=await _0x22ee4d[_0x267f45(0x98)](getEnvNames);let _0xa80edd=[],_0x29b69c=new Map();const _0x168ce8=await _0x22ee4d[_0x267f45(0x8a)](getToken);if(_0x168ce8)try{_0xa80edd=await _0x22ee4d[_0x267f45(0x7f)](listCloudProfiles),_0x29b69c=await _0x22ee4d[_0x267f45(0x8b)](loadCloudProfileListUrls,_0xa80edd);}catch(_0xf00617){console[_0x267f45(0x8d)](_0x267f45(0x9f)+(_0x22ee4d['KNYjS'](_0xf00617,Error)?_0xf00617[_0x267f45(0x9d)]:_0x22ee4d['neXrX'](String,_0xf00617)));}if(_0x4fa202[_0x267f45(0xa7)]===0x0&&_0x22ee4d['paqLW'](_0xa80edd[_0x267f45(0xa7)],0x0)){console['log'](_0x22ee4d[_0x267f45(0xa8)]),console['log'](_0x22ee4d['bVrjL']);return;}const _0x518060=new Set(_0xa80edd[_0x267f45(0x85)](_0x3dde8d=>_0x3dde8d[_0x267f45(0x78)]));if(_0x22ee4d[_0x267f45(0xa3)](_0x4fa202['length'],0x0)){console[_0x267f45(0xa2)](_0x22ee4d['fQcRF']);for(const _0x53512a of _0x4fa202['sort']()){const _0x166909=_0x53512a===_0x14bcfb&&!_0x518060[_0x267f45(0x82)](_0x53512a),_0x2d93cc=_0x3078ff[_0x53512a]||'local',_0x3bca55=await _0x22ee4d['neXrX'](loadSettings,_0x53512a),_0x8547b3=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x3bca55['baseUrl']),'projectOverrides':expandProfileOverrides(readProfileOverrides(process[_0x267f45(0x93)](),_0x53512a))}),_0x3c0fa3=_0x2d93cc===_0x22ee4d[_0x267f45(0x96)]?'':'\x20['+_0x2d93cc+']';console[_0x267f45(0xa2)]('\x20\x20'+(_0x166909?'*\x20':'\x20\x20')+_0x53512a+_0x3c0fa3),_0x8547b3[_0x267f45(0x86)]&&console[_0x267f45(0xa2)](_0x267f45(0xb2)+_0x8547b3[_0x267f45(0x86)]),_0x3bca55['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x3bca55[_0x267f45(0xb3)]);}}const _0x1343e3=(_0x411bd6,_0x39133a)=>{const _0x53d4b7=_0x267f45,_0x226ae9=_0x22ee4d['paqLW'](_0x411bd6[_0x53d4b7(0x78)],_0x14bcfb),_0x23d227=_0x411bd6[_0x53d4b7(0x8f)]?_0x53d4b7(0x8e)+_0x411bd6[_0x53d4b7(0x8f)]+')':_0x53d4b7(0xab),_0x41b69f=_0x29b69c['get'](_0x411bd6['name']);console[_0x53d4b7(0xa2)](''+_0x39133a+(_0x226ae9?'*\x20':'\x20\x20')+_0x411bd6['name']),_0x41b69f?.['baseUrl']&&console[_0x53d4b7(0xa2)](_0x39133a+_0x53d4b7(0xb1)+_0x41b69f[_0x53d4b7(0x86)]),console[_0x53d4b7(0xa2)](_0x39133a+'\x20\x20\x20\x20Session:\x20'+_0x23d227);};if(_0xa80edd[_0x267f45(0xa7)]>0x0){if(_0x22ee4d[_0x267f45(0xad)](shouldGroupByEnvironment,_0xa80edd)){console[_0x267f45(0xa2)](_0x22ee4d[_0x267f45(0x7d)]);for(const _0x98d58a of _0x22ee4d[_0x267f45(0xad)](groupCloudProfilesByEnvironment,_0xa80edd)){const _0x1cdb7d=_0x98d58a['environmentKey']??_0x22ee4d[_0x267f45(0x87)];console[_0x267f45(0xa2)]('\x0a\x20\x20'+_0x1cdb7d);for(const _0x3f1a28 of _0x98d58a['profiles']){_0x22ee4d['cdjsz'](_0x1343e3,_0x3f1a28,_0x22ee4d[_0x267f45(0xa4)]);}}}else{console['log'](_0x22ee4d['IxmzV']);for(const _0x239980 of[..._0xa80edd]['sort']((_0x551e18,_0xe9b109)=>_0x551e18[_0x267f45(0x78)]['localeCompare'](_0xe9b109[_0x267f45(0x78)]))){_0x22ee4d['cdjsz'](_0x1343e3,_0x239980,'\x20\x20');}}}_0x14bcfb&&console['log']('\x0a*\x20=\x20active\x20profile');}
|