@ranger-testing/ranger-cli 3.1.2-alpha.059c7a3-40 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/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(_0x1ff9d2,_0x157a08){const _0x4b6721=_0x1a80,_0x48b9b9=_0x1ff9d2();while(!![]){try{const _0x338b99=parseInt(_0x4b6721(0x1e6))/0x1*(parseInt(_0x4b6721(0x1e5))/0x2)+parseInt(_0x4b6721(0x1f9))/0x3*(parseInt(_0x4b6721(0x236))/0x4)+-parseInt(_0x4b6721(0x254))/0x5+-parseInt(_0x4b6721(0x1ce))/0x6+parseInt(_0x4b6721(0x1f6))/0x7*(-parseInt(_0x4b6721(0x1d5))/0x8)+parseInt(_0x4b6721(0x1fd))/0x9*(-parseInt(_0x4b6721(0x238))/0xa)+-parseInt(_0x4b6721(0x224))/0xb*(-parseInt(_0x4b6721(0x1fc))/0xc);if(_0x338b99===_0x157a08)break;else _0x48b9b9['push'](_0x48b9b9['shift']());}catch(_0x46bb46){_0x48b9b9['push'](_0x48b9b9['shift']());}}}(_0x2cfc,0x352d2));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x345a71 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function _0x2cfc(){const _0xa35185=['tKgMi','MkBkr','http://','action','vkUkV','rwNdn','UmTiR','indexOf','ZChpA','QPKxs','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','glYeF','\x0a\x20\x20(domains:\x20','yfZZg','\x0a\x20\x20Could\x20not\x20reach\x20','http://localhost:3000','696980PcxINe','Xibvf','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','cwd','LMeuw','prompt','1550952gwmaJe','environments','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','eDfzZ','Enter\x20a\x20different\x20URL','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','8KCYoDz','retry','status','warn','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','XyZZT','xFcgN','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','IhgXb','\x27\x20created\x20(no\x20session).\x0a','profile.add.autoRouted','\x0a\x20\x20A\x20profile\x20named\x20\x22','JxsmY','NxgLf','slice','Could\x20not\x20reach\x20','2MbhJqG','311033rhbDhb','profile.add.autoRouteSkipped','QNTzZ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','ljUqS','url','pRblV','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','yes','exit','HEAD','nnmSq','trim','tHZtl','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','skipAuth','2636130AnhHfn','CIjIQ','PvTOt','2727IfAiOQ','confirm','vpzLT','182604rGxLHO','1892610Djrjfr','ycxbf','.tmp-','env','GEgaa','FKfFF','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','guwVs','list','ciyFF','Qqrwf','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','GukFo','DDFeH','TypeError','no_match','length','ZFOzH','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','capture','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','use_suggestion','xijqq','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','isElectron','setupHeader','no_auth_config','continue','message','.\x20Configured\x20envs:\x20','Use\x20','setupHeaders','sDaRn','zlsTp','`\x20again\x20without\x20--skip-auth.','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','517VpqAVw','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','error','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','user_declined','QJhNv','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','\x20\x20Set\x20active\x20profile:\x20','\x20\x20Did\x20you\x20mean\x20','QIKZe','Continue\x20anyway','BCuUe','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Invalid\x20URL','Dkdbi','log','ojbnW','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','776GHVbjr','force','10cuNivf','startsWith','zfQtA','cdpEndpoint','trackPhaseEnd','tOXpI','name','✓\x20Profile\x20\x27','keys','baseUrl','stdout','Invalid\x20--setup-header\x20format:\x20\x22'];_0x2cfc=function(){return _0xa35185;};return _0x2cfc();}function warnCloudProfileSharedInOrg(){const _0x4d6d5c=_0x1a80;if(!process[_0x4d6d5c(0x242)]['isTTY'])return;console[_0x4d6d5c(0x1d8)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x56c840){const _0x35c659=_0x1a80,_0x237835={'guwVs':'manual','nnmSq':function(_0x172cb6,_0x988a0e){return _0x172cb6<_0x988a0e;},'YKLJZ':_0x35c659(0x231),'zlsTp':_0x35c659(0x20c),'DDFeH':'fetch\x20failed'};try{const _0x27e7de=new AbortController(),_0x5154a8=setTimeout(()=>_0x27e7de['abort'](),0x1388),_0x163b9b={'method':_0x35c659(0x1f0),'signal':_0x27e7de['signal'],'redirect':_0x237835[_0x35c659(0x205)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x56c840)&&(process['env'][_0x35c659(0x222)]='0');const _0x49ecb4=await fetch(_0x56c840,_0x163b9b);delete process[_0x35c659(0x200)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x5154a8);if(_0x237835[_0x35c659(0x1f1)](_0x49ecb4[_0x35c659(0x1d7)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x49ecb4[_0x35c659(0x1d7)]};}catch(_0x1b994c){delete process[_0x35c659(0x200)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x458f94=_0x1b994c,_0x42de1f=_0x458f94['message']||String(_0x1b994c),_0x80ccfc=_0x42de1f['includes'](_0x237835['YKLJZ'])||_0x458f94[_0x35c659(0x23e)]===_0x237835[_0x35c659(0x220)]||_0x42de1f['includes'](_0x237835[_0x35c659(0x20b)]);return{'ok':![],'error':_0x42de1f,'isProtocolError':_0x80ccfc};}}async function sweepOrphanLocalProfile(_0x606666,_0x559edb,_0x2b347f){const _0x1e95ef=_0x1a80,_0x38fbb9={'yfZZg':'local','xFcgN':function(_0x446fae,_0x251d97){return _0x446fae(_0x251d97);},'vkUkV':function(_0x239a49,_0x5dadba,_0x511114){return _0x239a49(_0x5dadba,_0x511114);},'ycxbf':function(_0x3bc547,_0x5e8688){return _0x3bc547(_0x5e8688);}},_0x435d91=join(_0x559edb,_0x38fbb9[_0x1e95ef(0x251)]),_0x849f2d=join(_0x435d91,_0x606666);_0x38fbb9[_0x1e95ef(0x1db)](existsSync,_0x849f2d)&&(_0x2b347f&&await isPathGitTracked(_0x849f2d)?console[_0x1e95ef(0x233)](_0x1e95ef(0x22a)+_0x849f2d+_0x1e95ef(0x1f4)):(await _0x38fbb9[_0x1e95ef(0x248)](rm,_0x849f2d,{'recursive':!![],'force':!![]}),console[_0x1e95ef(0x233)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x849f2d)));if(existsSync(_0x435d91)){let _0x4a0a29=[];try{_0x4a0a29=await _0x38fbb9[_0x1e95ef(0x1fe)](readdir,_0x435d91);}catch{return;}const _0x47be66=_0x1e95ef(0x1ff)+_0x606666+'-';for(const _0x382e8a of _0x4a0a29){if(!_0x382e8a[_0x1e95ef(0x239)](_0x47be66))continue;const _0x136314=_0x38fbb9['vkUkV'](join,_0x435d91,_0x382e8a);await rm(_0x136314,{'recursive':!![],'force':!![]}),console[_0x1e95ef(0x233)](_0x1e95ef(0x203)+_0x136314);}}}async function sweepOrphansBestEffort(_0x1e45b8){const _0x21b573=_0x1a80,_0x5eca99={'zfQtA':function(_0x111cd0,_0x1ea769,_0x346ed0,_0x2d1b34){return _0x111cd0(_0x1ea769,_0x346ed0,_0x2d1b34);},'ljUqS':function(_0x2b6905){return _0x2b6905();},'xGWjb':function(_0x5394eb,_0x1a0b36){return _0x5394eb!==_0x1a0b36;},'JxsmY':function(_0x5cb6c4){return _0x5cb6c4();},'ehGtK':function(_0x4a1eda,_0x484938,_0x906702,_0x15a4f7){return _0x4a1eda(_0x484938,_0x906702,_0x15a4f7);},'Qqrwf':function(_0x4470ca,_0x33cfdf){return _0x4470ca instanceof _0x33cfdf;}};try{await _0x5eca99[_0x21b573(0x23a)](sweepOrphanLocalProfile,_0x1e45b8,_0x5eca99['ljUqS'](getRangerHomeDir),![]);const _0x453465=_0x5eca99[_0x21b573(0x1ea)](getRangerDir);_0x5eca99['xGWjb'](_0x453465,_0x5eca99[_0x21b573(0x1e1)](getRangerHomeDir))&&await _0x5eca99['ehGtK'](sweepOrphanLocalProfile,_0x1e45b8,_0x453465,!![]);}catch(_0x282dd9){console[_0x21b573(0x233)](_0x21b573(0x230)+(_0x5eca99[_0x21b573(0x208)](_0x282dd9,Error)?_0x282dd9['message']:String(_0x282dd9))+').');}}async function markActive(_0x2a8a31){const _0x1ae32f=_0x1a80;try{await writeActiveProfileName(_0x2a8a31),console[_0x1ae32f(0x233)](_0x1ae32f(0x22b)+_0x2a8a31);}catch{console[_0x1ae32f(0x233)](_0x1ae32f(0x1d0));}}async function tryAutoRouteCloudProfile(_0x473fce,_0x46dcee,_0x3df741,_0x42bb5f,_0x37c9c0){const _0x364b52=_0x1a80,_0x3930bd={'GukFo':_0x364b52(0x1e7),'JXNKO':function(_0x11f17e,_0x4a2dc3,_0x44c81e,_0x5d86b3,_0x5d0f4e){return _0x11f17e(_0x4a2dc3,_0x44c81e,_0x5d86b3,_0x5d0f4e);},'Xibvf':'no_auth_config','ojbnW':function(_0x3ba485,_0x6e91f6){return _0x3ba485+_0x6e91f6;},'HHAcU':function(_0xa30223,_0x943e59){return _0xa30223+_0x943e59;},'ciyFF':function(_0x240b88,_0x5e9694){return _0x240b88+_0x5e9694;},'QNTzZ':function(_0x35641d,_0x2b5b30){return _0x35641d+_0x2b5b30;},'vpzLT':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','PvTOt':_0x364b52(0x210),'glYeF':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','tHZtl':_0x364b52(0x1fa),'FKfFF':_0x364b52(0x228),'MkBkr':_0x364b52(0x24e),'QJhNv':function(_0x1419fc,_0x45dcc8){return _0x1419fc instanceof _0x45dcc8;}};let _0x4afc13;try{_0x4afc13=await fetchAuthConfig();}catch(_0x180058){return _0x37c9c0?.[_0x364b52(0x23c)](_0x3930bd['GukFo'],{'reason':_0x364b52(0x219),'profileName':_0x473fce}),console['error'](_0x364b52(0x1d3)+(_0x180058 instanceof Error?_0x180058['message']:String(_0x180058))),![];}if(!_0x4afc13||!_0x4afc13[_0x364b52(0x1cf)]||Object[_0x364b52(0x240)](_0x4afc13['environments'])[_0x364b52(0x20e)]===0x0){if(_0x42bb5f)return await _0x3930bd['JXNKO'](captureEnvLessProfile,_0x473fce,_0x46dcee,_0x3df741,_0x37c9c0);return _0x37c9c0?.[_0x364b52(0x23c)](_0x364b52(0x1e7),{'reason':_0x3930bd[_0x364b52(0x255)],'profileName':_0x473fce}),console[_0x364b52(0x226)](_0x3930bd[_0x364b52(0x234)](_0x3930bd['HHAcU'](_0x3930bd[_0x364b52(0x207)](_0x3930bd[_0x364b52(0x1e8)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a',_0x3930bd[_0x364b52(0x1fb)]),_0x364b52(0x213)+_0x473fce+'\x20--url\x20'+_0x46dcee+'\x20--skip-auth\x0a')+'\x0a',_0x3930bd[_0x364b52(0x1f8)]),_0x3930bd[_0x364b52(0x24f)])),![];}const _0x30a602=matchAuthEnvironment(_0x46dcee,_0x4afc13);if(!_0x30a602)return _0x37c9c0?.['trackPhaseEnd'](_0x3930bd[_0x364b52(0x20a)],{'reason':_0x364b52(0x20d),'profileName':_0x473fce}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x46dcee+_0x364b52(0x21c)+Object['keys'](_0x4afc13['environments'])['join'](',\x20')+'.'),![];const _0x4f9a7f=_0x4afc13[_0x364b52(0x1cf)][_0x30a602],_0x4eb1a0=_0x4f9a7f?.['domains']??[];if(_0x42bb5f&&!_0x3df741[_0x364b52(0x1ee)]){const {saveToCloud:_0x5520e1}=await _0x345a71[_0x364b52(0x1cd)]([{'type':_0x3930bd[_0x364b52(0x1f3)],'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x30a602+'\x27\x20matching\x20'+_0x46dcee+_0x364b52(0x250)+_0x4eb1a0['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x473fce+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5520e1)return _0x37c9c0?.[_0x364b52(0x23c)](_0x3930bd['GukFo'],{'reason':_0x3930bd[_0x364b52(0x202)],'profileName':_0x473fce}),console['error'](_0x3930bd[_0x364b52(0x245)]),![];}const _0x49d968=_0x4eb1a0['some'](_0x1dd8ca=>{try{return new URL(_0x1dd8ca)['origin']===new URL(_0x46dcee)['origin'];}catch{return![];}}),_0x24c440={};!_0x49d968&&(_0x24c440[_0x364b52(0x241)]=_0x46dcee);try{await createCloudProfile(_0x473fce,_0x30a602,{'settings':_0x24c440}),warnCloudProfileSharedInOrg();}catch(_0x40764d){if(_0x3930bd[_0x364b52(0x229)](_0x40764d,ApiError)&&_0x40764d['status']===0x199){console[_0x364b52(0x226)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x473fce+_0x364b52(0x227)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x473fce));throw _0x40764d;}throw _0x40764d;}return console['log'](_0x364b52(0x23f)+_0x473fce+'\x27\x20created.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x473fce)),await sweepOrphansBestEffort(_0x473fce),_0x37c9c0?.[_0x364b52(0x23c)](_0x364b52(0x1df),{'envKey':_0x30a602,'profileName':_0x473fce}),!![];}async function createUnconfiguredCloudProfile(_0x36716b,_0x44538e){const _0x5bea23=_0x1a80,_0x5595a2={'XyZZT':function(_0x4a8cc4,_0x2e9de0,_0x580f54,_0x539a9d){return _0x4a8cc4(_0x2e9de0,_0x580f54,_0x539a9d);},'hgjFL':function(_0x3f4ae9,_0x734acd){return _0x3f4ae9 instanceof _0x734acd;},'YIuWp':function(_0x41e30,_0x1f1627){return _0x41e30===_0x1f1627;},'cPNXm':function(_0x2346b9,_0x249366){return _0x2346b9+_0x249366;}};try{await _0x5595a2[_0x5bea23(0x1da)](createCloudProfile,_0x36716b,undefined,{'settings':_0x44538e}),warnCloudProfileSharedInOrg();}catch(_0x3ce1b5){_0x5595a2['hgjFL'](_0x3ce1b5,ApiError)&&_0x5595a2['YIuWp'](_0x3ce1b5['status'],0x199)&&console[_0x5bea23(0x226)](_0x5595a2['cPNXm'](_0x5bea23(0x1e0)+_0x36716b+_0x5bea23(0x227),_0x5bea23(0x216)+_0x36716b));throw _0x3ce1b5;}}function _0x1a80(_0x104822,_0x3b72be){_0x104822=_0x104822-0x1cd;const _0x2cfc6d=_0x2cfc();let _0x1a8094=_0x2cfc6d[_0x104822];return _0x1a8094;}async function captureEnvLessProfile(_0x6fc146,_0x565cc0,_0x410ad1,_0x5b8e53){const _0x160487=_0x1a80,_0x2c61b5={'kYmzh':_0x160487(0x211),'CIjIQ':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','QIKZe':function(_0x554b1f,_0x6f7f5d){return _0x554b1f>_0x6f7f5d;},'ULMRC':function(_0x149bd0,_0x3f792d,_0x3f3d75,_0x322f8c){return _0x149bd0(_0x3f792d,_0x3f3d75,_0x322f8c);},'UmTiR':function(_0xfcf0f8){return _0xfcf0f8();},'EOUIc':function(_0x131e03,_0x1ef1f9){return _0x131e03 instanceof _0x1ef1f9;},'rTTSi':function(_0x4b2abc,_0x1cac81){return _0x4b2abc+_0x1cac81;},'GEgaa':function(_0x2c345e,_0x626b14,_0x2ce3f5){return _0x2c345e(_0x626b14,_0x2ce3f5);}};if(!_0x410ad1['yes']){const {capture:_0x1cdd97}=await _0x345a71[_0x160487(0x1cd)]([{'type':'confirm','name':_0x2c61b5['kYmzh'],'message':_0x2c61b5[_0x160487(0x1f7)],'default':!![]}]);if(!_0x1cdd97)return _0x5b8e53?.['trackPhaseEnd'](_0x160487(0x1e7),{'reason':_0x160487(0x228),'profileName':_0x6fc146}),console['error']('\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 _0x284e73={};if(_0x410ad1[_0x160487(0x218)])for(const _0x8aa1e2 of _0x410ad1[_0x160487(0x218)]){const _0x4be5ad=_0x8aa1e2['indexOf'](':');if(_0x4be5ad===-0x1)continue;_0x284e73[_0x8aa1e2[_0x160487(0x1e3)](0x0,_0x4be5ad)[_0x160487(0x1f2)]()]=_0x8aa1e2[_0x160487(0x1e3)](_0x4be5ad+0x1)['trim']();}const _0xdef58b={'baseUrl':_0x565cc0};_0x2c61b5[_0x160487(0x22d)](Object[_0x160487(0x240)](_0x284e73)[_0x160487(0x20e)],0x0)&&(_0xdef58b['setupHeaders']=_0x284e73);let _0x5e2a12;try{_0x5e2a12=await _0x2c61b5['ULMRC'](createCloudProfile,_0x6fc146,undefined,{'settings':_0xdef58b}),_0x2c61b5[_0x160487(0x24a)](warnCloudProfileSharedInOrg);}catch(_0x1cb6da){_0x2c61b5['EOUIc'](_0x1cb6da,ApiError)&&_0x1cb6da['status']===0x199&&console['error'](_0x2c61b5['rTTSi'](_0x160487(0x1e0)+_0x6fc146+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x6fc146));throw _0x1cb6da;}return await _0x2c61b5[_0x160487(0x201)](manualBrowserLogin,_0x5e2a12,{'key':'','domains':[_0x565cc0],'setupHeaders':Object['keys'](_0x284e73)['length']>0x0?_0x284e73:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x6fc146+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x160487(0x209)+_0x6fc146)),await sweepOrphansBestEffort(_0x6fc146),_0x5b8e53?.['trackPhaseEnd'](_0x160487(0x1df),{'envKey':null,'profileName':_0x6fc146}),!![];}export async function addEnv(_0x99dc57,_0x569a6c={},_0x4f7eed){const _0x8c5a4=_0x1a80,_0x58dfee={'QPKxs':function(_0x5c0555,_0x2caf4f){return _0x5c0555+_0x2caf4f;},'TMmPj':function(_0xe18f0e,_0x374d54){return _0xe18f0e+_0x374d54;},'bCCAd':function(_0x5c2ad7,_0xe18ae7){return _0x5c2ad7+_0xe18ae7;},'LMeuw':function(_0x2aca2a,_0x9bf2b9){return _0x2aca2a+_0x9bf2b9;},'NxgLf':_0x8c5a4(0x1d4),'rwNdn':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','CCsTM':function(_0x344ef2,_0x1d8f25){return _0x344ef2===_0x1d8f25;},'Dkdbi':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','ADGvL':function(_0x4fcf1d,_0x59147c){return _0x4fcf1d(_0x59147c);},'zYRJn':function(_0x23a3a1){return _0x23a3a1();},'ajzNa':function(_0x4f96d6,_0xbfea97){return _0x4f96d6>_0xbfea97;},'tKgMi':function(_0x241747,_0x563db5,_0x3285db,_0x552e93,_0x8e3310){return _0x241747(_0x563db5,_0x3285db,_0x552e93,_0x8e3310);},'IhgXb':function(_0x13a46c,_0x5ba758){return _0x13a46c instanceof _0x5ba758;},'hjaoe':function(_0x232255,_0x148c5b){return _0x232255(_0x148c5b);},'ctuLO':function(_0x8fc9a,_0x522185){return _0x8fc9a>_0x522185;},'ZChpA':function(_0x5f44cd,_0xbf213d,_0x4e389d){return _0x5f44cd(_0xbf213d,_0x4e389d);},'jLxAc':function(_0x340533,_0x4f410e){return _0x340533(_0x4f410e);},'eDfzZ':_0x8c5a4(0x1dc),'pRblV':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','moukd':function(_0x4f4b74,_0x3aaf46){return _0x4f4b74||_0x3aaf46;},'sDaRn':'What\x20would\x20you\x20like\x20to\x20do?','xijqq':'use_suggestion','ZFOzH':_0x8c5a4(0x1d6),'BCuUe':_0x8c5a4(0x22e),'tOXpI':_0x8c5a4(0x21a),'YqkzT':function(_0x1bcefa,_0x35438a){return _0x1bcefa===_0x35438a;},'nSRCV':function(_0x1fcded,_0x37dea4,_0x46c0b6,_0x36686d,_0x5ce200,_0x178187){return _0x1fcded(_0x37dea4,_0x46c0b6,_0x36686d,_0x5ce200,_0x178187);},'TWBOx':function(_0x49d2c7,_0x36510c){return _0x49d2c7 instanceof _0x36510c;}};_0x569a6c['ci']&&(console[_0x8c5a4(0x226)](_0x58dfee[_0x8c5a4(0x24d)](_0x58dfee['TMmPj'](_0x58dfee['bCCAd'](_0x58dfee[_0x8c5a4(0x258)](_0x58dfee['TMmPj'](_0x58dfee[_0x8c5a4(0x1e2)],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a'),_0x8c5a4(0x256))+_0x58dfee[_0x8c5a4(0x249)],'\x0a'),_0x8c5a4(0x1e9))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x8c5a4(0x1ef)](0x1));const _0x9f92c8={};if(_0x569a6c[_0x8c5a4(0x218)])for(const _0x9ff44 of _0x569a6c['setupHeader']){const _0x4f202c=_0x9ff44[_0x8c5a4(0x24b)](':');if(_0x4f202c===-0x1)throw new Error(_0x8c5a4(0x243)+_0x9ff44+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x276e73=_0x9ff44[_0x8c5a4(0x1e3)](0x0,_0x4f202c)['trim'](),_0x184243=_0x9ff44[_0x8c5a4(0x1e3)](_0x4f202c+0x1)[_0x8c5a4(0x1f2)]();_0x9f92c8[_0x276e73]=_0x184243;}if(_0x569a6c['cdpEndpoint']!==undefined&&_0x58dfee['CCsTM'](_0x569a6c[_0x8c5a4(0x23b)]['trim'](),''))throw new Error(_0x58dfee[_0x8c5a4(0x232)]);if(_0x569a6c['cdpEndpoint']&&_0x569a6c[_0x8c5a4(0x1eb)])throw new Error(_0x8c5a4(0x235));const _0x362080=_0x58dfee['ADGvL'](Boolean,_0x569a6c['cdpEndpoint']),_0x4a18f8=_0x58dfee['zYRJn'](isInteractive);if(!_0x4a18f8&&!_0x569a6c['url']&&!_0x362080&&!_0x569a6c[_0x8c5a4(0x1f5)])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(_0x362080){const _0x5a9302=_0x569a6c['cdpEndpoint'];console[_0x8c5a4(0x233)](_0x8c5a4(0x204)),console['log'](_0x8c5a4(0x1ed)+_0x5a9302);const _0x3fa262={'cdpEndpoint':_0x5a9302,'isElectron':!![]};_0x58dfee['ajzNa'](Object['keys'](_0x9f92c8)[_0x8c5a4(0x20e)],0x0)&&(_0x3fa262[_0x8c5a4(0x21e)]=_0x9f92c8);await createUnconfiguredCloudProfile(_0x99dc57,_0x3fa262);try{_0x58dfee[_0x8c5a4(0x244)](setProfileOverride,process['cwd'](),_0x99dc57,_0x8c5a4(0x23b),_0x5a9302),setProfileOverride(process[_0x8c5a4(0x257)](),_0x99dc57,_0x8c5a4(0x217),!![]);}catch(_0x477dd0){console['error'](_0x8c5a4(0x223)+(_0x58dfee[_0x8c5a4(0x1dd)](_0x477dd0,Error)?_0x477dd0[_0x8c5a4(0x21b)]:_0x58dfee['ADGvL'](String,_0x477dd0)));}console[_0x8c5a4(0x233)]('✓\x20Cloud\x20profile\x20\x27'+_0x99dc57+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x99dc57),await _0x58dfee['hjaoe'](markActive,_0x99dc57);return;}if(_0x569a6c['skipAuth']){const _0xa457dd={};_0x569a6c['url']&&(_0xa457dd['baseUrl']=_0x569a6c['url']);_0x58dfee['ctuLO'](Object[_0x8c5a4(0x240)](_0x9f92c8)[_0x8c5a4(0x20e)],0x0)&&(_0xa457dd[_0x8c5a4(0x21e)]=_0x9f92c8);await _0x58dfee[_0x8c5a4(0x24c)](createUnconfiguredCloudProfile,_0x99dc57,_0xa457dd),console['log']('✓\x20Profile\x20\x27'+_0x99dc57+_0x8c5a4(0x1de)+(_0x8c5a4(0x212)+_0x99dc57+_0x8c5a4(0x221))),await sweepOrphansBestEffort(_0x99dc57),await _0x58dfee['jLxAc'](markActive,_0x99dc57);return;}if(_0x569a6c[_0x8c5a4(0x1eb)]){const _0x48e11e=_0x569a6c['url'],_0x144b63=await checkUrlReachability(_0x48e11e);if(!_0x144b63['ok']&&!_0x569a6c[_0x8c5a4(0x237)])throw new Error(_0x8c5a4(0x1e4)+_0x48e11e+':\x20'+_0x144b63[_0x8c5a4(0x226)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x144b63['ok']&&_0x569a6c[_0x8c5a4(0x237)]&&console[_0x8c5a4(0x233)]('⚠\x20Could\x20not\x20reach\x20'+_0x48e11e+':\x20'+_0x144b63[_0x8c5a4(0x226)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x8c5a4(0x233)]('\x0a🌐\x20Profile\x20Setup\x0a'),console[_0x8c5a4(0x233)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console['log'](_0x8c5a4(0x225));let _0x3d91e4='',_0x191f38=![];while(!![]){const _0xbe5ff4=await _0x345a71['prompt']([{'type':'input','name':_0x8c5a4(0x241),'message':_0x191f38?_0x58dfee[_0x8c5a4(0x1d1)]:_0x58dfee[_0x8c5a4(0x1ec)],'default':_0x58dfee['moukd'](_0x3d91e4,_0x8c5a4(0x253))}]);_0x3d91e4=_0xbe5ff4['baseUrl'];const _0x154f2f=await checkUrlReachability(_0x3d91e4);if(_0x154f2f['ok'])break;const _0x4032d2=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x3d91e4),_0x119818=_0x154f2f['isProtocolError']&&!_0x4032d2,_0x178a48=_0x119818?_0x8c5a4(0x246)+_0x3d91e4:null;_0x191f38=!![],console[_0x8c5a4(0x233)](_0x8c5a4(0x252)+_0x3d91e4+':\x20'+_0x154f2f[_0x8c5a4(0x226)]);_0x178a48&&console[_0x8c5a4(0x233)](_0x8c5a4(0x22c)+_0x178a48+'?');const {action:_0x3dbe38}=await _0x345a71['prompt']([{'type':_0x8c5a4(0x206),'name':_0x8c5a4(0x247),'message':_0x58dfee[_0x8c5a4(0x21f)],'choices':[..._0x178a48?[{'name':_0x8c5a4(0x21d)+_0x178a48,'value':_0x58dfee[_0x8c5a4(0x215)]}]:[],{'name':_0x8c5a4(0x1d2),'value':_0x58dfee[_0x8c5a4(0x20f)]},{'name':_0x58dfee[_0x8c5a4(0x22f)],'value':_0x58dfee[_0x8c5a4(0x23d)]}]}]);if(_0x58dfee['YqkzT'](_0x3dbe38,_0x8c5a4(0x214))&&_0x178a48){_0x3d91e4=_0x178a48;const _0xddfd16=await checkUrlReachability(_0x3d91e4);if(_0xddfd16['ok'])break;console[_0x8c5a4(0x233)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x3d91e4+':\x20'+_0xddfd16['error']);}else{if(_0x3dbe38===_0x8c5a4(0x21a))break;}}_0x569a6c={..._0x569a6c,'url':_0x3d91e4};}let _0x4b6896=![];try{_0x4b6896=await _0x58dfee['nSRCV'](tryAutoRouteCloudProfile,_0x99dc57,_0x569a6c[_0x8c5a4(0x1eb)],_0x569a6c,_0x4a18f8,_0x4f7eed);}catch(_0x10a87b){console['error'](_0x8c5a4(0x1d9)+_0x99dc57+'\x22:\x20'+(_0x58dfee['TWBOx'](_0x10a87b,Error)?_0x10a87b[_0x8c5a4(0x21b)]:String(_0x10a87b))),process['exit'](0x1);}!_0x4b6896&&process['exit'](0x1),await markActive(_0x99dc57);}
|
|
1
|
+
(function(_0x1a93df,_0x308fd5){const _0x18e0cd=_0x18cd,_0x1f5aba=_0x1a93df();while(!![]){try{const _0x31f058=parseInt(_0x18e0cd(0xb8))/0x1+parseInt(_0x18e0cd(0xeb))/0x2+parseInt(_0x18e0cd(0x78))/0x3*(parseInt(_0x18e0cd(0xbc))/0x4)+parseInt(_0x18e0cd(0xc6))/0x5+-parseInt(_0x18e0cd(0x8e))/0x6*(parseInt(_0x18e0cd(0xde))/0x7)+parseInt(_0x18e0cd(0xd8))/0x8+parseInt(_0x18e0cd(0xdb))/0x9*(-parseInt(_0x18e0cd(0xab))/0xa);if(_0x31f058===_0x308fd5)break;else _0x1f5aba['push'](_0x1f5aba['shift']());}catch(_0x11047f){_0x1f5aba['push'](_0x1f5aba['shift']());}}}(_0x3ab6,0x516ff));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x18cd(_0x518fd7,_0x567559){_0x518fd7=_0x518fd7-0x74;const _0x3ab68d=_0x3ab6();let _0x18cda5=_0x3ab68d[_0x518fd7];return _0x18cda5;}import _0x4f5ff4 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 _0x3ab6(){const _0x3e02d3=['sTcCX','4766280rtJIBB','force','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','175581hplxPt','env','abort','1369837CoGMgI','YWpSF','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','TypeError','PDAqq','What\x20would\x20you\x20like\x20to\x20do?','skipAuth','SVGve','cMTzA','user_declined','join','\x27\x20created\x20(CDP).','240610YALril','✓\x20Cloud\x20profile\x20\x27','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','origin','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','47127lwHlpx','Invalid\x20URL','KtjyR','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','prompt','Could\x20not\x20reach\x20','tPFfQ','trim','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','TeLMq','log','UjfqU','\x20\x20Set\x20active\x20profile:\x20','indexOf','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','setupHeader','url','environments','error','profile.add.autoRouteSkipped','NcXWU','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','12lyPRvK','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','confirm','keys','QKHft','LNccU','eKGgi','yXXQW','\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','trackPhaseEnd','nvzqE','RicgP','yes','NkMPA','setupHeaders','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','.\x20Configured\x20envs:\x20','test','wNZgN','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','isProtocolError','\x27\x20to\x20the\x20cloud?','\x0a\x20\x20A\x20profile\x20named\x20\x22','UVoPH','saveToCloud','domains','220BbOFER','uIHMJ','⚠\x20Could\x20not\x20reach\x20','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','message','nccvO','cdpEndpoint','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','YyQCV','33241FXRleX','GLlzy','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','nurEz','56Cdjpht','exit','slice','iZPSh','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','VaOde','GngKm','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','warn','http://','924450EfZbiy','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','.tmp-','\x0a✓\x20Profile\x20\x27','UlkSq','HTTP\x20','Afpqr','list','retry','OCAEm','no_auth_config','RAUrO','length','status','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','KLmsW'];_0x3ab6=function(){return _0x3e02d3;};return _0x3ab6();}import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x1453e1=_0x18cd;if(!process['stdout']['isTTY'])return;console[_0x1453e1(0xc4)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4ba79d){const _0x3755cc=_0x18cd,_0x30a1f6={'GIUvd':function(_0x418ad5,_0x3c0b28,_0x41056){return _0x418ad5(_0x3c0b28,_0x41056);},'cqdqo':'manual','RAUrO':function(_0xb70aca,_0x242320){return _0xb70aca(_0x242320);},'eKGgi':function(_0x2b9102,_0x4ffbb4){return _0x2b9102<_0x4ffbb4;},'KtjyR':_0x3755cc(0x79)};try{const _0x32234b=new AbortController(),_0x488538=_0x30a1f6['GIUvd'](setTimeout,()=>_0x32234b[_0x3755cc(0xdd)](),0x1388),_0x16444b={'method':'HEAD','signal':_0x32234b['signal'],'redirect':_0x30a1f6['cqdqo']};/^https:\/\/localhost(:\d+)?/i[_0x3755cc(0xa0)](_0x4ba79d)&&(process[_0x3755cc(0xdc)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x1cf3a7=await fetch(_0x4ba79d,_0x16444b);delete process[_0x3755cc(0xdc)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x30a1f6['RAUrO'](clearTimeout,_0x488538);if(_0x30a1f6[_0x3755cc(0x94)](_0x1cf3a7[_0x3755cc(0xd3)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x3755cc(0xcb)+_0x1cf3a7['status']};}catch(_0x24a40d){delete process['env'][_0x3755cc(0xa3)];const _0x1c201c=_0x24a40d,_0x4a1400=_0x1c201c['message']||_0x30a1f6[_0x3755cc(0xd1)](String,_0x24a40d),_0x3c6173=_0x4a1400['includes'](_0x30a1f6[_0x3755cc(0x7a)])||_0x1c201c['name']===_0x3755cc(0xe2)||_0x4a1400['includes']('fetch\x20failed');return{'ok':![],'error':_0x4a1400,'isProtocolError':_0x3c6173};}}async function sweepOrphanLocalProfile(_0xafb753,_0x3868eb,_0x58ef6c){const _0x5d5f42=_0x18cd,_0x13d9e2={'KLmsW':function(_0x47492c,_0x4514d1,_0x493c02){return _0x47492c(_0x4514d1,_0x493c02);},'RicgP':'local','Afpqr':function(_0x34c72c,_0x487cf7){return _0x34c72c(_0x487cf7);},'wuqLK':function(_0x19ac06,_0x218637){return _0x19ac06(_0x218637);},'SVGve':function(_0x36163a,_0x5d6e2f,_0x582bfd){return _0x36163a(_0x5d6e2f,_0x582bfd);}},_0x1efc46=_0x13d9e2['KLmsW'](join,_0x3868eb,_0x13d9e2[_0x5d5f42(0x99)]),_0x5a2e42=join(_0x1efc46,_0xafb753);existsSync(_0x5a2e42)&&(_0x58ef6c&&await _0x13d9e2[_0x5d5f42(0xcc)](isPathGitTracked,_0x5a2e42)?console[_0x5d5f42(0x82)](_0x5d5f42(0xb3)+_0x5a2e42+_0x5d5f42(0x75)):(await _0x13d9e2[_0x5d5f42(0xd6)](rm,_0x5a2e42,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5a2e42)));if(_0x13d9e2['wuqLK'](existsSync,_0x1efc46)){let _0x10b81e=[];try{_0x10b81e=await readdir(_0x1efc46);}catch{return;}const _0x2a812b=_0x5d5f42(0xc8)+_0xafb753+'-';for(const _0x403718 of _0x10b81e){if(!_0x403718['startsWith'](_0x2a812b))continue;const _0x5cb86a=join(_0x1efc46,_0x403718);await _0x13d9e2[_0x5d5f42(0xe6)](rm,_0x5cb86a,{'recursive':!![],'force':!![]}),console[_0x5d5f42(0x82)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5cb86a);}}}async function sweepOrphansBestEffort(_0x4190ed){const _0x34d66a=_0x18cd,_0x5db3bf={'GLlzy':function(_0x4eed7b){return _0x4eed7b();},'UVoPH':function(_0x532951,_0x5c5e44){return _0x532951!==_0x5c5e44;},'nvzqE':function(_0x5df958,_0x24e913,_0x1d6334,_0x431dfb){return _0x5df958(_0x24e913,_0x1d6334,_0x431dfb);},'WvgJs':function(_0x362ba8,_0x46169b){return _0x362ba8 instanceof _0x46169b;},'suCcm':function(_0x3e132e,_0x6ffd00){return _0x3e132e(_0x6ffd00);}};try{await sweepOrphanLocalProfile(_0x4190ed,_0x5db3bf['GLlzy'](getRangerHomeDir),![]);const _0x121fdf=getRangerDir();_0x5db3bf[_0x34d66a(0xa8)](_0x121fdf,_0x5db3bf[_0x34d66a(0xb9)](getRangerHomeDir))&&await _0x5db3bf[_0x34d66a(0x98)](sweepOrphanLocalProfile,_0x4190ed,_0x121fdf,!![]);}catch(_0x26cee6){console[_0x34d66a(0x82)](_0x34d66a(0xa2)+(_0x5db3bf['WvgJs'](_0x26cee6,Error)?_0x26cee6['message']:_0x5db3bf['suCcm'](String,_0x26cee6))+').');}}async function markActive(_0xbc1d1b){const _0x11b6fa=_0x18cd,_0x416d5f={'NcXWU':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0xbc1d1b),console[_0x11b6fa(0x82)](_0x11b6fa(0x84)+_0xbc1d1b);}catch{console['log'](_0x416d5f[_0x11b6fa(0x8c)]);}}async function tryAutoRouteCloudProfile(_0x1d720d,_0x8c98e0,_0x2bcf57,_0x4cc292,_0x302e37){const _0x2cd2d3=_0x18cd,_0xdcecd7={'OCAEm':function(_0x10cdd5,_0x315527){return _0x10cdd5 instanceof _0x315527;},'lCpmx':function(_0x7556a1,_0x3bfec1){return _0x7556a1(_0x3bfec1);},'nrmTs':'no_auth_config','UlkSq':function(_0xaefc00,_0x2aeaf2){return _0xaefc00+_0x2aeaf2;},'FEtYw':function(_0x517672,_0x26d49b,_0x4e5426){return _0x517672(_0x26d49b,_0x4e5426);},'cMTzA':'user_declined','GngKm':function(_0x165912,_0x2dc5f0,_0x24cd5a,_0x37b975){return _0x165912(_0x2dc5f0,_0x24cd5a,_0x37b975);},'wNZgN':'profile.add.autoRouted'};let _0x1c7710;try{_0x1c7710=await fetchAuthConfig();}catch(_0x21709e){return _0x302e37?.[_0x2cd2d3(0x97)](_0x2cd2d3(0x8b),{'reason':_0x2cd2d3(0xd0),'profileName':_0x1d720d}),console['error'](_0x2cd2d3(0xa4)+(_0xdcecd7[_0x2cd2d3(0xcf)](_0x21709e,Error)?_0x21709e['message']:_0xdcecd7['lCpmx'](String,_0x21709e))),![];}if(!_0x1c7710||!_0x1c7710[_0x2cd2d3(0x89)]||Object[_0x2cd2d3(0x91)](_0x1c7710['environments'])[_0x2cd2d3(0xd2)]===0x0){if(_0x4cc292)return await captureEnvLessProfile(_0x1d720d,_0x8c98e0,_0x2bcf57,_0x302e37);return _0x302e37?.[_0x2cd2d3(0x97)]('profile.add.autoRouteSkipped',{'reason':_0xdcecd7['nrmTs'],'profileName':_0x1d720d}),console['error'](_0xdcecd7['UlkSq'](_0xdcecd7[_0x2cd2d3(0xca)](_0x2cd2d3(0x96)+'\x0a'+_0x2cd2d3(0xd5)+(_0x2cd2d3(0xb6)+_0x1d720d+'\x20--url\x20'+_0x8c98e0+'\x20--skip-auth\x0a'),'\x0a'),_0x2cd2d3(0xe0))+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x4d351c=_0xdcecd7['FEtYw'](matchAuthEnvironment,_0x8c98e0,_0x1c7710);if(!_0x4d351c)return _0x302e37?.[_0x2cd2d3(0x97)](_0x2cd2d3(0x8b),{'reason':'no_match','profileName':_0x1d720d}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x8c98e0+_0x2cd2d3(0x9f)+Object['keys'](_0x1c7710[_0x2cd2d3(0x89)])[_0x2cd2d3(0xe9)](',\x20')+'.'),![];const _0x26763=_0x1c7710[_0x2cd2d3(0x89)][_0x4d351c],_0x17a903=_0x26763?.[_0x2cd2d3(0xaa)]??[];if(_0x4cc292&&!_0x2bcf57[_0x2cd2d3(0x9a)]){const {saveToCloud:_0x2eb967}=await _0x4f5ff4[_0x2cd2d3(0x7c)]([{'type':_0x2cd2d3(0x90),'name':_0x2cd2d3(0xa9),'message':'Found\x20auth\x20environment\x20\x27'+_0x4d351c+'\x27\x20matching\x20'+_0x8c98e0+'\x0a\x20\x20(domains:\x20'+_0x17a903[_0x2cd2d3(0xe9)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1d720d+_0x2cd2d3(0xa6),'default':!![]}]);if(!_0x2eb967)return _0x302e37?.[_0x2cd2d3(0x97)](_0x2cd2d3(0x8b),{'reason':_0xdcecd7[_0x2cd2d3(0xe7)],'profileName':_0x1d720d}),console[_0x2cd2d3(0x8a)](_0x2cd2d3(0xba)),![];}const _0x5e2e57=_0x17a903['some'](_0x14654c=>{const _0x40b8ed=_0x2cd2d3;try{return new URL(_0x14654c)[_0x40b8ed(0x76)]===new URL(_0x8c98e0)[_0x40b8ed(0x76)];}catch{return![];}}),_0x4b3c0d={};!_0x5e2e57&&(_0x4b3c0d['baseUrl']=_0x8c98e0);try{await _0xdcecd7[_0x2cd2d3(0xc2)](createCloudProfile,_0x1d720d,_0x4d351c,{'settings':_0x4b3c0d}),warnCloudProfileSharedInOrg();}catch(_0x2c52f9){if(_0x2c52f9 instanceof ApiError&&_0x2c52f9[_0x2cd2d3(0xd3)]===0x199){console[_0x2cd2d3(0x8a)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1d720d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1d720d));throw _0x2c52f9;}throw _0x2c52f9;}return console['log'](_0xdcecd7['UlkSq']('✓\x20Profile\x20\x27'+_0x1d720d+'\x27\x20created.\x0a',_0x2cd2d3(0xda)+_0x1d720d)),await _0xdcecd7['lCpmx'](sweepOrphansBestEffort,_0x1d720d),_0x302e37?.[_0x2cd2d3(0x97)](_0xdcecd7[_0x2cd2d3(0xa1)],{'envKey':_0x4d351c,'profileName':_0x1d720d}),!![];}async function createUnconfiguredCloudProfile(_0x4c8488,_0x3a40db){const _0x268bf6=_0x18cd,_0x3afa88={'TeLMq':function(_0x559d69,_0x1b122c){return _0x559d69 instanceof _0x1b122c;},'PdEhF':function(_0x980648,_0x5a85d9){return _0x980648===_0x5a85d9;}};try{await createCloudProfile(_0x4c8488,undefined,{'settings':_0x3a40db}),warnCloudProfileSharedInOrg();}catch(_0x859266){_0x3afa88[_0x268bf6(0x81)](_0x859266,ApiError)&&_0x3afa88['PdEhF'](_0x859266['status'],0x199)&&console[_0x268bf6(0x8a)](_0x268bf6(0xa7)+_0x4c8488+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x268bf6(0x9e)+_0x4c8488));throw _0x859266;}}async function captureEnvLessProfile(_0x4f8f16,_0x3e0ee1,_0x15876f,_0x5f3e60){const _0x5c39d3=_0x18cd,_0x4a2018={'PDAqq':'confirm','aPhkE':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','bQtdi':_0x5c39d3(0xe8),'uIHMJ':function(_0x5213f2,_0x1a6f51){return _0x5213f2+_0x1a6f51;},'VaOde':function(_0x2deb9a,_0x4d20fe){return _0x2deb9a===_0x4d20fe;},'nTqRb':function(_0x559b2d,_0x33d197,_0x45ff33,_0x5a1352){return _0x559b2d(_0x33d197,_0x45ff33,_0x5a1352);},'nurEz':function(_0x486a74,_0x334564){return _0x486a74>_0x334564;},'iZPSh':function(_0x52f39c,_0xfe813d){return _0x52f39c+_0xfe813d;},'jzqsc':'profile.add.autoRouted'};if(!_0x15876f['yes']){const {capture:_0x15181}=await _0x4f5ff4[_0x5c39d3(0x7c)]([{'type':_0x4a2018[_0x5c39d3(0xe3)],'name':'capture','message':_0x4a2018['aPhkE'],'default':!![]}]);if(!_0x15181)return _0x5f3e60?.[_0x5c39d3(0x97)](_0x5c39d3(0x8b),{'reason':_0x4a2018['bQtdi'],'profileName':_0x4f8f16}),console[_0x5c39d3(0x8a)](_0x4a2018[_0x5c39d3(0xac)](_0x5c39d3(0x8f),_0x5c39d3(0xae))),![];}const _0x4fec4e={};if(_0x15876f[_0x5c39d3(0x87)])for(const _0x5a28ce of _0x15876f[_0x5c39d3(0x87)]){const _0x313f1b=_0x5a28ce[_0x5c39d3(0x85)](':');if(_0x4a2018[_0x5c39d3(0xc1)](_0x313f1b,-0x1))continue;_0x4fec4e[_0x5a28ce['slice'](0x0,_0x313f1b)['trim']()]=_0x5a28ce[_0x5c39d3(0xbe)](_0x4a2018[_0x5c39d3(0xac)](_0x313f1b,0x1))[_0x5c39d3(0x7f)]();}const _0x7bd710={'baseUrl':_0x3e0ee1};Object[_0x5c39d3(0x91)](_0x4fec4e)['length']>0x0&&(_0x7bd710[_0x5c39d3(0x9c)]=_0x4fec4e);let _0x1ac7ea;try{_0x1ac7ea=await _0x4a2018['nTqRb'](createCloudProfile,_0x4f8f16,undefined,{'settings':_0x7bd710}),warnCloudProfileSharedInOrg();}catch(_0x31f1fe){_0x31f1fe instanceof ApiError&&_0x31f1fe[_0x5c39d3(0xd3)]===0x199&&console['error'](_0x4a2018[_0x5c39d3(0xac)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x4f8f16+_0x5c39d3(0x7b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4f8f16));throw _0x31f1fe;}return await manualBrowserLogin(_0x1ac7ea,{'key':'','domains':[_0x3e0ee1],'setupHeaders':_0x4a2018[_0x5c39d3(0xbb)](Object['keys'](_0x4fec4e)['length'],0x0)?_0x4fec4e:undefined}),console[_0x5c39d3(0x82)](_0x4a2018[_0x5c39d3(0xbf)](_0x5c39d3(0xc9)+_0x4f8f16+_0x5c39d3(0xd4),_0x5c39d3(0xda)+_0x4f8f16)),await sweepOrphansBestEffort(_0x4f8f16),_0x5f3e60?.['trackPhaseEnd'](_0x4a2018['jzqsc'],{'envKey':null,'profileName':_0x4f8f16}),!![];}export async function addEnv(_0x3e0a9a,_0x3b94d4={},_0x3b7a04){const _0x779f66=_0x18cd,_0x4e2b2d={'YyQCV':function(_0x28d673,_0x287ec1){return _0x28d673+_0x287ec1;},'DUtuZ':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','qzpuE':_0x779f66(0xaf),'UjfqU':_0x779f66(0xc3),'xzeot':_0x779f66(0xb5),'rgJwB':function(_0x5deb42,_0x816964){return _0x5deb42===_0x816964;},'LNccU':function(_0x5a0830,_0x8a6d4){return _0x5a0830(_0x8a6d4);},'INFjX':function(_0x9a4580){return _0x9a4580();},'yXXQW':_0x779f66(0x77),'QKHft':function(_0x2e9e69,_0x2a5d94,_0x46af37,_0x3bbf72,_0x12475d){return _0x2e9e69(_0x2a5d94,_0x46af37,_0x3bbf72,_0x12475d);},'tPFfQ':'cdpEndpoint','ZSbxT':'isElectron','XUuWJ':function(_0x25c657,_0x592617){return _0x25c657 instanceof _0x592617;},'YWpSF':function(_0xee69a2,_0xa1faf1){return _0xee69a2>_0xa1faf1;},'zrLYc':function(_0x1239f8,_0x2b3fa9){return _0x1239f8+_0x2b3fa9;},'vVRac':'\x0a🌐\x20Profile\x20Setup\x0a','mrKpn':_0x779f66(0xe1),'CMBRF':'input','PyrqH':function(_0x102b50,_0x1e6c42){return _0x102b50||_0x1e6c42;},'NkMPA':'action','TvHzz':'continue','nccvO':function(_0x114263,_0x168bbe){return _0x114263===_0x168bbe;},'sTcCX':function(_0x3b48df,_0x3bd2c3){return _0x3b48df(_0x3bd2c3);}};_0x3b94d4['ci']&&(console['error'](_0x4e2b2d[_0x779f66(0xb7)](_0x4e2b2d[_0x779f66(0xb7)](_0x779f66(0x86)+_0x779f66(0xb4)+'\x0a'+_0x4e2b2d['DUtuZ']+_0x4e2b2d['qzpuE']+'\x0a',_0x4e2b2d[_0x779f66(0x83)]),_0x4e2b2d['xzeot'])),process[_0x779f66(0xbd)](0x1));const _0x366b78={};if(_0x3b94d4[_0x779f66(0x87)])for(const _0x12e7ed of _0x3b94d4['setupHeader']){const _0x348bda=_0x12e7ed['indexOf'](':');if(_0x348bda===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x12e7ed+_0x779f66(0x9d));const _0x27a27f=_0x12e7ed['slice'](0x0,_0x348bda)['trim'](),_0x66b3a3=_0x12e7ed[_0x779f66(0xbe)](_0x4e2b2d[_0x779f66(0xb7)](_0x348bda,0x1))['trim']();_0x366b78[_0x27a27f]=_0x66b3a3;}if(_0x3b94d4['cdpEndpoint']!==undefined&&_0x4e2b2d['rgJwB'](_0x3b94d4[_0x779f66(0xb2)]['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x3b94d4['cdpEndpoint']&&_0x3b94d4['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x1dd266=_0x4e2b2d['LNccU'](Boolean,_0x3b94d4['cdpEndpoint']),_0x3f03f0=_0x4e2b2d['INFjX'](isInteractive);if(!_0x3f03f0&&!_0x3b94d4['url']&&!_0x1dd266&&!_0x3b94d4[_0x779f66(0xe5)])throw new Error(_0x4e2b2d[_0x779f66(0x95)]);if(_0x1dd266){const _0x13aa21=_0x3b94d4['cdpEndpoint'];console[_0x779f66(0x82)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console['log'](_0x779f66(0x80)+_0x13aa21);const _0x5bc1b6={'cdpEndpoint':_0x13aa21,'isElectron':!![]};Object[_0x779f66(0x91)](_0x366b78)[_0x779f66(0xd2)]>0x0&&(_0x5bc1b6['setupHeaders']=_0x366b78);await createUnconfiguredCloudProfile(_0x3e0a9a,_0x5bc1b6);try{_0x4e2b2d[_0x779f66(0x92)](setProfileOverride,process['cwd'](),_0x3e0a9a,_0x4e2b2d[_0x779f66(0x7e)],_0x13aa21),setProfileOverride(process['cwd'](),_0x3e0a9a,_0x4e2b2d['ZSbxT'],!![]);}catch(_0x509f69){console[_0x779f66(0x8a)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x4e2b2d['XUuWJ'](_0x509f69,Error)?_0x509f69[_0x779f66(0xb0)]:String(_0x509f69)));}console[_0x779f66(0x82)](_0x779f66(0x74)+_0x3e0a9a+_0x779f66(0xea)),await _0x4e2b2d[_0x779f66(0x93)](sweepOrphansBestEffort,_0x3e0a9a),await _0x4e2b2d[_0x779f66(0x93)](markActive,_0x3e0a9a);return;}if(_0x3b94d4[_0x779f66(0xe5)]){const _0xe5c50={};_0x3b94d4['url']&&(_0xe5c50['baseUrl']=_0x3b94d4[_0x779f66(0x88)]);_0x4e2b2d[_0x779f66(0xdf)](Object['keys'](_0x366b78)[_0x779f66(0xd2)],0x0)&&(_0xe5c50[_0x779f66(0x9c)]=_0x366b78);await createUnconfiguredCloudProfile(_0x3e0a9a,_0xe5c50),console['log'](_0x4e2b2d['zrLYc']('✓\x20Profile\x20\x27'+_0x3e0a9a+'\x27\x20created\x20(no\x20session).\x0a',_0x779f66(0x8d)+_0x3e0a9a+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3e0a9a),await markActive(_0x3e0a9a);return;}if(_0x3b94d4['url']){const _0x1c622c=_0x3b94d4[_0x779f66(0x88)],_0x330aec=await _0x4e2b2d['LNccU'](checkUrlReachability,_0x1c622c);if(!_0x330aec['ok']&&!_0x3b94d4[_0x779f66(0xd9)])throw new Error(_0x779f66(0x7d)+_0x1c622c+':\x20'+_0x330aec['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x330aec['ok']&&_0x3b94d4['force']&&console['log'](_0x779f66(0xad)+_0x1c622c+':\x20'+_0x330aec[_0x779f66(0x8a)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x779f66(0x82)](_0x4e2b2d['vVRac']),console['log'](_0x4e2b2d['mrKpn']),console[_0x779f66(0x82)](_0x779f66(0xc0));let _0x35943a='',_0x235bcc=![];while(!![]){const _0xfd9ee3=await _0x4f5ff4['prompt']([{'type':_0x4e2b2d['CMBRF'],'name':'baseUrl','message':_0x235bcc?_0x779f66(0xc7):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x4e2b2d['PyrqH'](_0x35943a,'http://localhost:3000')}]);_0x35943a=_0xfd9ee3['baseUrl'];const _0x2b8620=await _0x4e2b2d[_0x779f66(0x93)](checkUrlReachability,_0x35943a);if(_0x2b8620['ok'])break;const _0x2693ae=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x35943a),_0x137e47=_0x2b8620[_0x779f66(0xa5)]&&!_0x2693ae,_0x4b0be0=_0x137e47?_0x779f66(0xc5)+_0x35943a:null;_0x235bcc=!![],console[_0x779f66(0x82)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x35943a+':\x20'+_0x2b8620['error']);_0x4b0be0&&console[_0x779f66(0x82)]('\x20\x20Did\x20you\x20mean\x20'+_0x4b0be0+'?');const {action:_0x14014c}=await _0x4f5ff4[_0x779f66(0x7c)]([{'type':_0x779f66(0xcd),'name':_0x4e2b2d[_0x779f66(0x9b)],'message':_0x779f66(0xe4),'choices':[..._0x4b0be0?[{'name':'Use\x20'+_0x4b0be0,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x779f66(0xce)},{'name':'Continue\x20anyway','value':_0x4e2b2d['TvHzz']}]}]);if(_0x4e2b2d[_0x779f66(0xb1)](_0x14014c,'use_suggestion')&&_0x4b0be0){_0x35943a=_0x4b0be0;const _0x1e7fa1=await _0x4e2b2d[_0x779f66(0xd7)](checkUrlReachability,_0x35943a);if(_0x1e7fa1['ok'])break;console[_0x779f66(0x82)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x35943a+':\x20'+_0x1e7fa1['error']);}else{if(_0x14014c===_0x4e2b2d['TvHzz'])break;}}_0x3b94d4={..._0x3b94d4,'url':_0x35943a};}let _0x23fcfb=![];try{_0x23fcfb=await tryAutoRouteCloudProfile(_0x3e0a9a,_0x3b94d4[_0x779f66(0x88)],_0x3b94d4,_0x3f03f0,_0x3b7a04);}catch(_0x444106){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x3e0a9a+'\x22:\x20'+(_0x444106 instanceof Error?_0x444106['message']:String(_0x444106))),process[_0x779f66(0xbd)](0x1);}!_0x23fcfb&&process['exit'](0x1),await _0x4e2b2d['sTcCX'](markActive,_0x3e0a9a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2880c5,_0x446c37){var _0x552bf6=_0x4929,_0x5ccabb=_0x2880c5();while(!![]){try{var _0x23d852=parseInt(_0x552bf6(0x1e8))/0x1*(-parseInt(_0x552bf6(0x1ee))/0x2)+parseInt(_0x552bf6(0x1ea))/0x3*(-parseInt(_0x552bf6(0x1e6))/0x4)+parseInt(_0x552bf6(0x1f0))/0x5+parseInt(_0x552bf6(0x1ec))/0x6*(parseInt(_0x552bf6(0x1e5))/0x7)+-parseInt(_0x552bf6(0x1f3))/0x8*(parseInt(_0x552bf6(0x1e7))/0x9)+parseInt(_0x552bf6(0x1e4))/0xa+parseInt(_0x552bf6(0x1ed))/0xb;if(_0x23d852===_0x446c37)break;else _0x5ccabb['push'](_0x5ccabb['shift']());}catch(_0x25da38){_0x5ccabb['push'](_0x5ccabb['shift']());}}}(_0x2fe7,0x62159));function _0x4929(_0x4401bd,_0x1f6a05){_0x4401bd=_0x4401bd-0x1e4;var _0x2fe704=_0x2fe7();var _0x49293e=_0x2fe704[_0x4401bd];return _0x49293e;}export async function authEncrypt(_0x5e10c9){var _0x40522a=_0x4929,_0x4c2964={'MkPBm':function(_0x269ff4,_0xdc675d){return _0x269ff4+_0xdc675d;},'TtNOV':function(_0x52220b,_0x6e2f80){return _0x52220b+_0x6e2f80;},'xnKtO':function(_0x2a85f7,_0x4cb096){return _0x2a85f7+_0x4cb096;},'LwbRy':_0x40522a(0x1ef),'VZqma':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console['error'](_0x4c2964['MkPBm'](_0x4c2964['TtNOV'](_0x4c2964['xnKtO'](_0x40522a(0x1eb)+_0x4c2964[_0x40522a(0x1f2)]+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x4c2964['VZqma'])+'\x0a',_0x40522a(0x1e9)),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x40522a(0x1f1)](0x1);}function _0x2fe7(){var _0x2da679=['3895570fTajmt','exit','LwbRy','1048ERhudO','1492520uOfZKE','35qkPhuL','4sNRCVD','5391KkgkxG','1aAeVBs','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','1440501KMkNxq','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','337494YpuUyG','4504566RAlmZe','1317456HhVIgs','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'];_0x2fe7=function(){return _0x2da679;};return _0x2fe7();}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3a0954=_0x2438;(function(_0x4212a8,_0x1cda0f){const _0x262667=_0x2438,_0x3bc36e=_0x4212a8();while(!![]){try{const _0x484dee=-parseInt(_0x262667(0x13f))/0x1*(-parseInt(_0x262667(0x13a))/0x2)+parseInt(_0x262667(0x125))/0x3*(-parseInt(_0x262667(0x130))/0x4)+-parseInt(_0x262667(0x12c))/0x5+-parseInt(_0x262667(0x138))/0x6+parseInt(_0x262667(0x120))/0x7+-parseInt(_0x262667(0x11e))/0x8*(-parseInt(_0x262667(0x12b))/0x9)+parseInt(_0x262667(0x139))/0xa;if(_0x484dee===_0x1cda0f)break;else _0x3bc36e['push'](_0x3bc36e['shift']());}catch(_0x2e49d4){_0x3bc36e['push'](_0x3bc36e['shift']());}}}(_0x146a,0x4dda7));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2438(_0x579244,_0x956c2d){_0x579244=_0x579244-0x118;const _0x146af8=_0x146a();let _0x24388f=_0x146af8[_0x579244];return _0x24388f;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';function _0x146a(){const _0x13daea=['e2e-test-recommender','gYfPW','uninstall','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','219320LtddIe','zDWID','ignore','stcgg','utf-8','plugin','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','platform','uAMQF','oLwxx','bug-bash','hjLUR','8KyJxGM','error','2618763JCEyKw','dtTyS','length','isArray','@ranger-testing/opencode-plugin','12NlqiFK','close','ranger@trailhead','replace','cSdcV','sIMqb','3175173LjvRmt','2645475jgnJoZ','ihpVP','aFZSc','bjsfy','536348yWcZQo','filter','aKNQy','eOjaU','ZkYMc','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','log','user','2149932hdpcvi','5771060TAAjdu','4bqxYis'];_0x146a=function(){return _0x13daea;};return _0x146a();}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','feature-tracker',_0x3a0954(0x11c),_0x3a0954(0x13b)],opencodePluginName=_0x3a0954(0x124);function parseJsonc(_0x235821){const _0x9c9f3d=_0x3a0954,_0x429e33=_0x235821[_0x9c9f3d(0x128)](/\/\*[\s\S]*?\*\//g,''),_0x47a9c5=_0x429e33[_0x9c9f3d(0x128)](/^\s*\/\/.*$/gm,''),_0x2c2230=_0x47a9c5['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x2c2230);}async function removeOpencodePluginConfig(_0x93ce21){const _0x2f748e=_0x3a0954,_0x4ccaff={'oLwxx':'string','zDWID':_0x2f748e(0x143),'hCJKQ':function(_0x3a7636,_0x4118c8){return _0x3a7636(_0x4118c8);},'dtTyS':function(_0xed9555,_0x5ddafd){return _0xed9555===_0x5ddafd;},'aKNQy':function(_0x1817e8,_0x5620b6,_0x8062e0){return _0x1817e8(_0x5620b6,_0x8062e0);},'ZOkGz':function(_0x1bf73d,_0x50caab){return _0x1bf73d+_0x50caab;}};if(!existsSync(_0x93ce21))return![];let _0x2c50a4;try{const _0xc945b1=await readFile(_0x93ce21,_0x4ccaff[_0x2f748e(0x140)]);_0x2c50a4=_0x4ccaff['hCJKQ'](parseJsonc,_0xc945b1);}catch{return![];}const _0x5338dc=Array[_0x2f748e(0x123)](_0x2c50a4[_0x2f748e(0x144)])?_0x2c50a4['plugin']:[];if(_0x4ccaff[_0x2f748e(0x121)](_0x5338dc[_0x2f748e(0x122)],0x0))return![];const _0x149986=_0x5338dc[_0x2f748e(0x131)](_0x42b690=>{const _0x377a58=_0x2f748e;if(typeof _0x42b690!==_0x4ccaff[_0x377a58(0x11b)])return!![];return _0x42b690!==opencodePluginName;});if(_0x149986[_0x2f748e(0x122)]===_0x5338dc[_0x2f748e(0x122)])return![];return _0x149986[_0x2f748e(0x122)]===0x0?delete _0x2c50a4[_0x2f748e(0x144)]:_0x2c50a4[_0x2f748e(0x144)]=_0x149986,await _0x4ccaff[_0x2f748e(0x132)](writeFile,_0x93ce21,_0x4ccaff['ZOkGz'](JSON['stringify'](_0x2c50a4,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x8b8fa1){const _0x8a323d=_0x3a0954,_0x1df004={'cSdcV':'plugin','uAMQF':_0x8a323d(0x127),'gYfPW':function(_0x10e603,_0x2f76dc,_0x50a7bf,_0x295f0b){return _0x10e603(_0x2f76dc,_0x50a7bf,_0x295f0b);},'BbHPV':'claude','bHtyf':function(_0x197994){return _0x197994();},'sIMqb':function(_0x58b820,_0x1f303b){return _0x58b820===_0x1f303b;},'PrOGd':'win32','oTOdq':_0x8a323d(0x126),'WJccF':_0x8a323d(0x11f)};return new Promise(_0x425502=>{const _0x439d8a=_0x8a323d,_0x3c9f5b=[_0x1df004[_0x439d8a(0x129)],_0x439d8a(0x13d),_0x1df004[_0x439d8a(0x11a)]];_0x8b8fa1&&_0x3c9f5b['push']('--scope',_0x8b8fa1);const _0x16f0d6=_0x1df004[_0x439d8a(0x13c)](spawn,_0x1df004['BbHPV'],_0x3c9f5b,{'stdio':['ignore','ignore','ignore'],'cwd':_0x8b8fa1?_0x1df004['bHtyf'](getProjectRoot):undefined,'shell':_0x1df004[_0x439d8a(0x12a)](process[_0x439d8a(0x119)],_0x1df004['PrOGd'])});_0x16f0d6['on'](_0x1df004['oTOdq'],_0x492637=>{_0x425502(_0x492637===0x0);}),_0x16f0d6['on'](_0x1df004['WJccF'],()=>{_0x425502(![]);});});}async function removeMarketplace(){const _0x2cb8d6=_0x3a0954,_0x59e2ce={'XDjXU':function(_0x174894,_0x8fc3df){return _0x174894===_0x8fc3df;},'GzMDS':'claude','eOjaU':_0x2cb8d6(0x144),'OGuDo':'win32','ZGOpD':_0x2cb8d6(0x126),'tdxgE':_0x2cb8d6(0x11f)};return new Promise(_0x3949a6=>{const _0x5317dd=_0x2cb8d6,_0x1a3819={'hjLUR':function(_0x5d1bcd,_0x168d25){return _0x59e2ce['XDjXU'](_0x5d1bcd,_0x168d25);}},_0x19594a=spawn(_0x59e2ce['GzMDS'],[_0x59e2ce[_0x5317dd(0x133)],'marketplace','remove','trailhead'],{'stdio':['ignore',_0x5317dd(0x141),_0x5317dd(0x141)],'shell':process['platform']===_0x59e2ce['OGuDo']});_0x19594a['on'](_0x59e2ce['ZGOpD'],_0x1efc23=>{const _0x1f1281=_0x5317dd;_0x3949a6(_0x1a3819[_0x1f1281(0x11d)](_0x1efc23,0x0));}),_0x19594a['on'](_0x59e2ce['tdxgE'],()=>{_0x3949a6(![]);});});}export async function clean(){const _0x41684f=_0x3a0954,_0x425be={'aFZSc':function(_0x26f8e8){return _0x26f8e8();},'tyLSp':'✓\x20Removed\x20stored\x20credentials','bjsfy':function(_0x4afef0,_0x475570){return _0x4afef0(_0x475570);},'XGtTc':function(_0x27bb8c,_0x31592c,_0x7f8a14){return _0x27bb8c(_0x31592c,_0x7f8a14);},'IeijF':function(_0x5764ea,_0xe795ae,_0xf5373c){return _0x5764ea(_0xe795ae,_0xf5373c);},'eREfO':function(_0xc583ae,_0x1bfb4a){return _0xc583ae(_0x1bfb4a);},'KXaqD':function(_0x56f124,_0x116552,_0x35fce6){return _0x56f124(_0x116552,_0x35fce6);},'ihpVP':_0x41684f(0x137),'HfSXy':function(_0x2f4ed8,_0x2eb4df,_0x26040e){return _0x2f4ed8(_0x2eb4df,_0x26040e);},'qFhOK':'project','ZkYMc':'opencode.json','stcgg':_0x41684f(0x135),'rRVpj':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','GdjfL':'✓\x20Removed\x20trailhead\x20marketplace','tvrtq':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x41684f(0x136)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x2d318b=![];try{await _0x425be[_0x41684f(0x12e)](deleteAllCredentials),console[_0x41684f(0x136)](_0x425be['tyLSp']),_0x2d318b=!![];}catch{}const _0x11a609=getCacheFile();existsSync(_0x11a609)&&(await _0x425be[_0x41684f(0x12f)](rm,_0x11a609),_0x2d318b=!![]);const _0x227a1c=_0x425be[_0x41684f(0x12e)](getRangerDir);existsSync(_0x227a1c)&&(await rm(_0x227a1c,{'recursive':!![]}),console[_0x41684f(0x136)]('✓\x20Removed\x20.ranger/\x20directory'),_0x2d318b=!![]);const _0x252ac4=getProjectSkillsDir();for(const _0x54844f of skillsToRemove){const _0x13c145=_0x425be['XGtTc'](join,_0x252ac4,_0x54844f);_0x425be['bjsfy'](existsSync,_0x13c145)&&(await _0x425be['IeijF'](rm,_0x13c145,{'recursive':!![]}),console[_0x41684f(0x136)]('✓\x20Removed\x20project\x20skill:\x20'+_0x54844f),_0x2d318b=!![]);}const _0x3f047b=getUserSkillsDir();for(const _0x4d0178 of skillsToRemove){const _0x2969ed=join(_0x3f047b,_0x4d0178);_0x425be['eREfO'](existsSync,_0x2969ed)&&(await _0x425be['KXaqD'](rm,_0x2969ed,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x4d0178),_0x2d318b=!![]);}const _0x5be7db=_0x425be[_0x41684f(0x12f)](getOpencodeSkillsDir,'project');for(const _0x54b21f of skillsToRemove){const _0x4986d1=join(_0x5be7db,_0x54b21f);existsSync(_0x4986d1)&&(await rm(_0x4986d1,{'recursive':!![]}),console[_0x41684f(0x136)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x54b21f),_0x2d318b=!![]);}const _0xc9c041=_0x425be['eREfO'](getOpencodeSkillsDir,_0x425be[_0x41684f(0x12d)]);for(const _0x44b40f of skillsToRemove){const _0x4a2098=join(_0xc9c041,_0x44b40f);existsSync(_0x4a2098)&&(await _0x425be['HfSXy'](rm,_0x4a2098,{'recursive':!![]}),console[_0x41684f(0x136)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x44b40f),_0x2d318b=!![]);}const _0x549438=join(_0x425be['eREfO'](getOpencodeConfigDir,_0x425be['qFhOK']),_0x425be[_0x41684f(0x134)]);await removeOpencodePluginConfig(_0x549438)&&(console[_0x41684f(0x136)](_0x41684f(0x118)),_0x2d318b=!![]);const _0x187e04=join(getOpencodeConfigDir('user'),_0x425be[_0x41684f(0x134)]);await _0x425be['bjsfy'](removeOpencodePluginConfig,_0x187e04)&&(console[_0x41684f(0x136)](_0x425be[_0x41684f(0x142)]),_0x2d318b=!![]);const _0x461ddd=await uninstallClaudePlugin();_0x461ddd&&(console['log'](_0x41684f(0x13e)),_0x2d318b=!![]);const _0x5f4e75=await uninstallClaudePlugin('project');_0x5f4e75&&(console['log'](_0x425be['rRVpj']),_0x2d318b=!![]);const _0x2307ec=await _0x425be[_0x41684f(0x12e)](removeMarketplace);_0x2307ec&&(console[_0x41684f(0x136)](_0x425be['GdjfL']),_0x2d318b=!![]),_0x2d318b?console[_0x41684f(0x136)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0x41684f(0x136)](_0x425be['tvrtq']);}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x29f87a=_0x1905;(function(_0x19fa68,_0x1d311a){const _0x2e1b09=_0x1905,_0x2f3337=_0x19fa68();while(!![]){try{const _0x3b3a60=parseInt(_0x2e1b09(0xc1))/0x1+parseInt(_0x2e1b09(0xd5))/0x2+-parseInt(_0x2e1b09(0xe1))/0x3*(parseInt(_0x2e1b09(0xbc))/0x4)+-parseInt(_0x2e1b09(0xba))/0x5*(-parseInt(_0x2e1b09(0xd6))/0x6)+-parseInt(_0x2e1b09(0xe6))/0x7*(-parseInt(_0x2e1b09(0xcc))/0x8)+-parseInt(_0x2e1b09(0xdc))/0x9*(parseInt(_0x2e1b09(0xc8))/0xa)+-parseInt(_0x2e1b09(0xb8))/0xb;if(_0x3b3a60===_0x1d311a)break;else _0x2f3337['push'](_0x2f3337['shift']());}catch(_0x561a0e){_0x2f3337['push'](_0x2f3337['shift']());}}}(_0x9c7c,0xea551));function _0x9c7c(){const _0x401865=['cXVEe','3tifjZR','OILCk','object','cloud','Set\x20','13001289txMtiU','\x20=\x20','true','headless','parse','20063032mhGYuw','gWirq','2239585AfjGBZ','undefined','7438156MGmGnj','kind','tdoBI','trim','endsWith','1109744WTTkVI','stringify','startsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x22\x20not\x20found','No\x20configuration\x20set\x20for\x20\x22','vcJBP','310WKdPtV','efODO','local','OpzQq','8WkCKzp','EZnnJ','bfCCD','log','Cleared\x20local\x20overrides\x20for\x20\x22','test','Ohnrp','TLwGp','Key\x20\x22','3588088qlJtqP','24CUsOJZ','Removed\x20','mEIxx','RXeBc','(not\x20set)','false','554373aMPOMX','settings','ExAQW','allowInsecureLocalhost'];_0x9c7c=function(){return _0x401865;};return _0x9c7c();}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=[_0x29f87a(0xb6),_0x29f87a(0xdf),'forceLogin'];function parseLocalValue(_0xc6dcb1,_0x22149b){const _0x586f66=_0x29f87a,_0x5be7d4={'mEIxx':function(_0x5e7cbc,_0x12d0e1){return _0x5e7cbc===_0x12d0e1;},'ExAQW':_0x586f66(0xb5)};if(BOOLEAN_KEYS['includes'](_0xc6dcb1)){if(_0x5be7d4[_0x586f66(0xd8)](_0x22149b,_0x5be7d4[_0x586f66(0xde)]))return!![];if(_0x5be7d4[_0x586f66(0xd8)](_0x22149b,_0x586f66(0xdb)))return![];throw new Error('Invalid\x20value\x20for\x20'+_0xc6dcb1+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x22149b;}function parseOverrideValue(_0x10834f){const _0x10ef02=_0x29f87a,_0x2e01f8={'yuWLD':function(_0x12e143,_0x5641e3){return _0x12e143===_0x5641e3;},'NSbSY':_0x10ef02(0xbb),'bfCCD':function(_0x12d40d,_0x31715a){return _0x12d40d(_0x31715a);}};if(_0x2e01f8['yuWLD'](_0x10834f,_0x10ef02(0xb5)))return!![];if(_0x10834f===_0x10ef02(0xdb))return![];if(_0x2e01f8['yuWLD'](_0x10834f,'null'))return null;if(_0x10834f===_0x2e01f8['NSbSY'])return undefined;if(/^-?\d+$/['test'](_0x10834f)){const _0x4bb9b2=_0x2e01f8[_0x10ef02(0xce)](Number,_0x10834f);if(Number['isSafeInteger'](_0x4bb9b2))return _0x4bb9b2;}if(/^-?\d+\.\d+$/[_0x10ef02(0xd1)](_0x10834f)){const _0x19faab=Number(_0x10834f);if(!Number['isNaN'](_0x19faab))return _0x19faab;}const _0x20d178=_0x10834f[_0x10ef02(0xbf)]();if(_0x20d178[_0x10ef02(0xc3)]('{')&&_0x20d178[_0x10ef02(0xc0)]('}')||_0x20d178[_0x10ef02(0xc3)]('[')&&_0x20d178[_0x10ef02(0xc0)](']'))try{return JSON[_0x10ef02(0xb7)](_0x20d178);}catch{}return _0x10834f;}function _0x1905(_0x5f379d,_0x20690b){_0x5f379d=_0x5f379d-0xb5;const _0x9c7c96=_0x9c7c();let _0x190579=_0x9c7c96[_0x5f379d];return _0x190579;}async function resolveProfileTarget(_0x532ac8){const _0x378bef=_0x29f87a,_0x53b92a={'TLwGp':function(_0x219e6a,_0x1cabcb){return _0x219e6a(_0x1cabcb);},'KsuKB':_0x378bef(0xca)},_0x1aeaca=existsSync(getEnvDir(_0x532ac8));let _0x59d2fa=![];try{const _0x335ae8=await _0x53b92a[_0x378bef(0xd3)](fetchCloudProfile,_0x532ac8);_0x59d2fa=Boolean(_0x335ae8);}catch{}if(_0x59d2fa)return{'kind':'cloud','alsoExistsElsewhere':_0x1aeaca};if(_0x1aeaca)return{'kind':_0x53b92a['KsuKB'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x532ac8+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x532ac8);}function printDualExistsHint(_0xdebf24){console['log']('\x20\x20Note:\x20\x22'+_0xdebf24+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3f96e5){const _0x25eb24=_0x29f87a,_0x508cd4={'OpzQq':function(_0x552b6f,_0x401cd5){return _0x552b6f(_0x401cd5);},'GKxzr':function(_0xa63c2a,_0x4ec7fe){return _0xa63c2a??_0x4ec7fe;}},_0x3d1cd3=await _0x508cd4[_0x25eb24(0xcb)](fetchCloudProfile,_0x3f96e5),_0x30d040=readProfileOverrides(getProjectPath(),_0x3f96e5);return mergeCloudProfileSettings(_0x3d1cd3?.[_0x25eb24(0xdd)]??{},_0x508cd4['GKxzr'](_0x30d040,undefined));}export async function configSet(_0x1850c1,_0x45278f,_0x19efb7){const _0x52b3fc=_0x29f87a,_0x35c084={'EZnnJ':function(_0x555749,_0xf778fe){return _0x555749===_0xf778fe;},'Gywqi':function(_0x3f3d24,_0x32adaf){return _0x3f3d24(_0x32adaf);},'Ohnrp':function(_0x32c729){return _0x32c729();}},_0x401ee0=await resolveProfileTarget(_0x1850c1);if(_0x35c084[_0x52b3fc(0xcd)](_0x401ee0['kind'],_0x52b3fc(0xe4))){if(_0x401ee0['alsoExistsElsewhere'])_0x35c084['Gywqi'](printDualExistsHint,_0x1850c1);const _0x4c184d=parseOverrideValue(_0x19efb7);setProfileOverride(_0x35c084['Ohnrp'](getProjectPath),_0x1850c1,_0x45278f,_0x4c184d),console['log']('Set\x20'+_0x45278f+_0x52b3fc(0xe7)+JSON['stringify'](_0x4c184d)+'\x20for\x20\x22'+_0x1850c1+'\x22');return;}const _0x4944a8=parseLocalValue(_0x45278f,_0x19efb7);setProfileOverride(_0x35c084[_0x52b3fc(0xd2)](getProjectPath),_0x1850c1,_0x45278f,_0x4944a8),console['log'](_0x52b3fc(0xe5)+_0x45278f+'\x20=\x20'+_0x4944a8+'\x20for\x20\x22'+_0x1850c1+'\x22');}export async function configGet(_0x24a74f,_0x11ba9d){const _0x47d9ba=_0x29f87a,_0x276be7={'gWirq':function(_0x52ba1d,_0x33dd67){return _0x52ba1d(_0x33dd67);},'owpQz':function(_0x2b4745,_0x5ba910){return _0x2b4745===_0x5ba910;},'hnJaE':_0x47d9ba(0xe3),'TyHfX':function(_0x658571,_0x11c8b9,_0xbd5207){return _0x658571(_0x11c8b9,_0xbd5207);}},_0x4ef692=await _0x276be7[_0x47d9ba(0xb9)](resolveProfileTarget,_0x24a74f);if(_0x276be7['owpQz'](_0x4ef692[_0x47d9ba(0xbd)],'cloud')){const _0x3cf158=await loadEffectiveCloudSettings(_0x24a74f),_0x75adca=getNestedValue(_0x3cf158,_0x11ba9d);if(_0x276be7['owpQz'](_0x75adca,undefined))console[_0x47d9ba(0xcf)](_0x47d9ba(0xda));else typeof _0x75adca===_0x276be7['hnJaE']?console[_0x47d9ba(0xcf)](JSON[_0x47d9ba(0xc2)](_0x75adca,null,0x2)):console[_0x47d9ba(0xcf)](_0x75adca);return;}const _0x4cc4c6=await _0x276be7['gWirq'](loadSettings,_0x24a74f),_0x3b5b87=_0x276be7['TyHfX'](getNestedValue,_0x4cc4c6,_0x11ba9d);if(_0x3b5b87===undefined)console['log']('(not\x20set)');else _0x276be7['owpQz'](typeof _0x3b5b87,_0x276be7['hnJaE'])?console[_0x47d9ba(0xcf)](JSON['stringify'](_0x3b5b87,null,0x2)):console[_0x47d9ba(0xcf)](_0x3b5b87);}export async function configList(_0x581492){const _0xadf9eb=_0x29f87a,_0x5ccfec={'FrTGM':function(_0x4e30e5,_0x3add56){return _0x4e30e5===_0x3add56;},'iJtxc':_0xadf9eb(0xe4),'Mvijj':function(_0x28e08d,_0x434814){return _0x28e08d(_0x434814);}},_0x2ea448=await resolveProfileTarget(_0x581492);if(_0x5ccfec['FrTGM'](_0x2ea448['kind'],_0x5ccfec['iJtxc'])){const _0x3a7c9f=await loadEffectiveCloudSettings(_0x581492);if(!_0x3a7c9f||_0x5ccfec['FrTGM'](Object['keys'](_0x3a7c9f)['length'],0x0)){console[_0xadf9eb(0xcf)]('No\x20configuration\x20set\x20for\x20\x22'+_0x581492+'\x22');return;}console[_0xadf9eb(0xcf)](JSON[_0xadf9eb(0xc2)](_0x3a7c9f,null,0x2));return;}const _0x8127f9=getSettingsPath(_0x581492);if(!existsSync(_0x8127f9)){console[_0xadf9eb(0xcf)](_0xadf9eb(0xc6)+_0x581492+'\x22');return;}const _0x4a928f=await _0x5ccfec['Mvijj'](loadSettings,_0x581492),_0x2c91b6=formatSettings(_0x4a928f);!_0x2c91b6?console['log'](_0xadf9eb(0xc6)+_0x581492+'\x22'):console['log'](_0x2c91b6);}export async function configUnset(_0x4fe1b5,_0x1ae665){const _0x29f25b=_0x29f87a,_0x4914fa={'OILCk':function(_0x47a187,_0x418ec5){return _0x47a187(_0x418ec5);},'tdoBI':function(_0x26780f,_0x487ec2){return _0x26780f(_0x487ec2);},'mZAeq':function(_0x20f2e6){return _0x20f2e6();},'cXVEe':function(_0x68dea1,_0x13e2fb,_0x3e9b75,_0x455bb3){return _0x68dea1(_0x13e2fb,_0x3e9b75,_0x455bb3);},'XQQaM':function(_0x1ee757){return _0x1ee757();},'efODO':function(_0x539300,_0x3fb1ff,_0x12611b){return _0x539300(_0x3fb1ff,_0x12611b);}},_0x34266c=await _0x4914fa[_0x29f25b(0xe2)](resolveProfileTarget,_0x4fe1b5);if(_0x34266c['kind']===_0x29f25b(0xe4)){if(_0x34266c['alsoExistsElsewhere'])_0x4914fa[_0x29f25b(0xbe)](printDualExistsHint,_0x4fe1b5);const _0x13c9f4=unsetProfileOverride(_0x4914fa['mZAeq'](getProjectPath),_0x4fe1b5,_0x1ae665);_0x13c9f4?console['log'](_0x29f25b(0xd7)+_0x1ae665+'\x20for\x20\x22'+_0x4fe1b5+'\x22'):console[_0x29f25b(0xcf)](_0x29f25b(0xd4)+_0x1ae665+'\x22\x20not\x20found');return;}const _0x184f11=_0x4914fa[_0x29f25b(0xe0)](unsetProfileOverride,_0x4914fa['XQQaM'](getProjectPath),_0x4fe1b5,_0x1ae665);if(_0x184f11){console['log']('Removed\x20'+_0x1ae665);return;}const _0xbc7a0f=await loadSettings(_0x4fe1b5),_0x2260f5=_0x4914fa[_0x29f25b(0xc9)](deleteNestedValue,_0xbc7a0f,_0x1ae665);_0x2260f5?console[_0x29f25b(0xcf)](_0x29f25b(0xd4)+_0x1ae665+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4fe1b5+_0x29f25b(0xc4)):console['log'](_0x29f25b(0xd4)+_0x1ae665+_0x29f25b(0xc5));}export async function configReset(_0x3d825c){const _0x5542e8=_0x29f87a,_0x5681ff={'Ubkae':function(_0xc82d73,_0x5d9823){return _0xc82d73===_0x5d9823;},'RXeBc':function(_0x41880b,_0x460959,_0x522a21){return _0x41880b(_0x460959,_0x522a21);},'vcJBP':function(_0x5995e6){return _0x5995e6();}},_0x26151a=await resolveProfileTarget(_0x3d825c);if(_0x5681ff['Ubkae'](_0x26151a[_0x5542e8(0xbd)],'cloud')){_0x5681ff[_0x5542e8(0xd9)](resetProfileOverrides,_0x5681ff[_0x5542e8(0xc7)](getProjectPath),_0x3d825c),console['log'](_0x5542e8(0xd0)+_0x3d825c+'\x22');return;}console['log']('\x22'+_0x3d825c+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x3d825c+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
const _0x4a948e=_0x38d0;(function(_0x3fdfa3,_0x48f419){const _0x539992=_0x38d0,_0x5cef93=_0x3fdfa3();while(!![]){try{const _0x1223d1=parseInt(_0x539992(0xad))/0x1*(-parseInt(_0x539992(0xb3))/0x2)+parseInt(_0x539992(0xb7))/0x3+-parseInt(_0x539992(0xb6))/0x4*(-parseInt(_0x539992(0xb1))/0x5)+parseInt(_0x539992(0xa3))/0x6*(-parseInt(_0x539992(0xce))/0x7)+-parseInt(_0x539992(0xb5))/0x8+parseInt(_0x539992(0xc6))/0x9+-parseInt(_0x539992(0xcd))/0xa*(-parseInt(_0x539992(0xcf))/0xb);if(_0x1223d1===_0x48f419)break;else _0x5cef93['push'](_0x5cef93['shift']());}catch(_0x4411b7){_0x5cef93['push'](_0x5cef93['shift']());}}}(_0xc77a,0x4554d));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0xc77a(){const _0x2657d9=['Removed\x20','kind','FTHgx','\x20for\x20\x22','settings','\x20=\x20','Evzmj','startsWith','WHlws','279704TDfIPy','zBXAh','No\x20configuration\x20set\x20for\x20\x22','length','73210cpjWEH','KXLTo','2BZIPGs','iIJJf','2716600LFxsyE','60lXKjWX','330750MgxWXv','parse','alsoExistsElsewhere','Key\x20\x22','log',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','OhaIh','allowInsecureLocalhost','(not\x20set)','cloud','\x22\x20not\x20found','trim','forceLogin','mTHSu','object','2750958Obteby','Set\x20','EIdbe','test','null','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','snAFp','90DyRMbM','7woMiNy','520113dqeWmV','Invalid\x20value\x20for\x20','tptxa','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','stringify','OGplr','946974WCblmk'];_0xc77a=function(){return _0x2657d9;};return _0xc77a();}const BOOLEAN_KEYS=['headless',_0x4a948e(0xbe),_0x4a948e(0xc3)];function parseLocalValue(_0x172676,_0x3275c0){const _0x4f4212=_0x4a948e,_0x8c228c={'tptxa':'true'};if(BOOLEAN_KEYS['includes'](_0x172676)){if(_0x3275c0===_0x8c228c[_0x4f4212(0xd1)])return!![];if(_0x3275c0==='false')return![];throw new Error(_0x4f4212(0xd0)+_0x172676+_0x4f4212(0xbc));}return _0x3275c0;}function _0x38d0(_0x3c7b88,_0x38e120){_0x3c7b88=_0x3c7b88-0xa0;const _0xc77a36=_0xc77a();let _0x38d05f=_0xc77a36[_0x3c7b88];return _0x38d05f;}function parseOverrideValue(_0x3c0604){const _0x3eb3e9=_0x4a948e,_0x3da50f={'sFQqF':function(_0x3fc16b,_0x10e3eb){return _0x3fc16b===_0x10e3eb;},'IioNB':'true','STGZY':'false','EGvnk':function(_0x4f0851,_0x2b9cb9){return _0x4f0851===_0x2b9cb9;},'Evzmj':_0x3eb3e9(0xca),'jgRQR':function(_0x33e4a6,_0x2e343e){return _0x33e4a6(_0x2e343e);}};if(_0x3da50f['sFQqF'](_0x3c0604,_0x3da50f['IioNB']))return!![];if(_0x3c0604===_0x3da50f['STGZY'])return![];if(_0x3da50f['EGvnk'](_0x3c0604,_0x3da50f[_0x3eb3e9(0xaa)]))return null;if(_0x3c0604==='undefined')return undefined;if(/^-?\d+$/['test'](_0x3c0604)){const _0x3e8bf4=_0x3da50f['jgRQR'](Number,_0x3c0604);if(Number['isSafeInteger'](_0x3e8bf4))return _0x3e8bf4;}if(/^-?\d+\.\d+$/[_0x3eb3e9(0xc9)](_0x3c0604)){const _0x4def64=Number(_0x3c0604);if(!Number['isNaN'](_0x4def64))return _0x4def64;}const _0x5ae854=_0x3c0604[_0x3eb3e9(0xc2)]();if(_0x5ae854[_0x3eb3e9(0xab)]('{')&&_0x5ae854['endsWith']('}')||_0x5ae854['startsWith']('[')&&_0x5ae854['endsWith'](']'))try{return JSON[_0x3eb3e9(0xb8)](_0x5ae854);}catch{}return _0x3c0604;}async function resolveProfileTarget(_0x3fd410){const _0x4bcb24=_0x4a948e,_0x50bc8c={'OhaIh':function(_0x2d7977,_0x58fead){return _0x2d7977(_0x58fead);},'VDIgw':'cloud','mTHSu':'local'},_0xf0df9f=existsSync(getEnvDir(_0x3fd410));let _0x1d37f5=![];try{const _0x51f9b8=await _0x50bc8c[_0x4bcb24(0xbd)](fetchCloudProfile,_0x3fd410);_0x1d37f5=_0x50bc8c[_0x4bcb24(0xbd)](Boolean,_0x51f9b8);}catch{}if(_0x1d37f5)return{'kind':_0x50bc8c['VDIgw'],'alsoExistsElsewhere':_0xf0df9f};if(_0xf0df9f)return{'kind':_0x50bc8c[_0x4bcb24(0xc4)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x3fd410+_0x4bcb24(0xcb)+_0x3fd410);}function printDualExistsHint(_0x45942e){console['log']('\x20\x20Note:\x20\x22'+_0x45942e+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2a4177){const _0x2e0be4=_0x4a948e,_0x5e7ebf={'iIJJf':function(_0x410998,_0x493970){return _0x410998(_0x493970);},'wqnHN':function(_0x3fc5af,_0x552d71,_0x1e4f0b){return _0x3fc5af(_0x552d71,_0x1e4f0b);},'BYJUZ':function(_0x1b4841){return _0x1b4841();},'lUmYA':function(_0x1d14b0,_0x35d4ea,_0x2f4dee){return _0x1d14b0(_0x35d4ea,_0x2f4dee);},'ezOMc':function(_0x37de0f,_0x57b44a){return _0x37de0f??_0x57b44a;}},_0x32ad59=await _0x5e7ebf[_0x2e0be4(0xb4)](fetchCloudProfile,_0x2a4177),_0x402782=_0x5e7ebf['wqnHN'](readProfileOverrides,_0x5e7ebf['BYJUZ'](getProjectPath),_0x2a4177);return _0x5e7ebf['lUmYA'](mergeCloudProfileSettings,_0x32ad59?.[_0x2e0be4(0xa8)]??{},_0x5e7ebf['ezOMc'](_0x402782,undefined));}export async function configSet(_0xa1c221,_0x3a10a0,_0x1f442e){const _0x147f39=_0x4a948e,_0x569a56={'zBXAh':'cloud','PInmg':function(_0xac3f16,_0x1318f1){return _0xac3f16(_0x1318f1);},'oeaBZ':function(_0x40cdf0,_0x1515ab){return _0x40cdf0(_0x1515ab);},'hSRgi':function(_0x5e32a0,_0x1379ec,_0x3b7bee,_0xf5a007,_0x28e2bc){return _0x5e32a0(_0x1379ec,_0x3b7bee,_0xf5a007,_0x28e2bc);},'hrWoC':function(_0x5bdb4e){return _0x5bdb4e();}},_0x43648a=await resolveProfileTarget(_0xa1c221);if(_0x43648a[_0x147f39(0xa5)]===_0x569a56[_0x147f39(0xae)]){if(_0x43648a[_0x147f39(0xb9)])_0x569a56['PInmg'](printDualExistsHint,_0xa1c221);const _0x1fbeb6=_0x569a56['oeaBZ'](parseOverrideValue,_0x1f442e);_0x569a56['hSRgi'](setProfileOverride,getProjectPath(),_0xa1c221,_0x3a10a0,_0x1fbeb6),console['log'](_0x147f39(0xc7)+_0x3a10a0+'\x20=\x20'+JSON['stringify'](_0x1fbeb6)+'\x20for\x20\x22'+_0xa1c221+'\x22');return;}const _0x4162fc=parseLocalValue(_0x3a10a0,_0x1f442e);setProfileOverride(_0x569a56['hrWoC'](getProjectPath),_0xa1c221,_0x3a10a0,_0x4162fc),console['log']('Set\x20'+_0x3a10a0+_0x147f39(0xa9)+_0x4162fc+'\x20for\x20\x22'+_0xa1c221+'\x22');}export async function configGet(_0x27322f,_0x2421c2){const _0x4984f4=_0x4a948e,_0x4280de={'WHlws':function(_0xb9de24,_0x241932){return _0xb9de24(_0x241932);},'KXLTo':'cloud','OUgeW':function(_0x38075e,_0x3df882){return _0x38075e(_0x3df882);},'EIdbe':_0x4984f4(0xc5),'cpevL':function(_0x48c7cb,_0x150940){return _0x48c7cb===_0x150940;},'snAFp':function(_0x46cbb7,_0x55b6d3){return _0x46cbb7===_0x55b6d3;}},_0x2a4bf1=await _0x4280de[_0x4984f4(0xac)](resolveProfileTarget,_0x27322f);if(_0x2a4bf1[_0x4984f4(0xa5)]===_0x4280de[_0x4984f4(0xb2)]){const _0x3e4b03=await _0x4280de['OUgeW'](loadEffectiveCloudSettings,_0x27322f),_0x3c10a2=getNestedValue(_0x3e4b03,_0x2421c2);if(_0x3c10a2===undefined)console[_0x4984f4(0xbb)](_0x4984f4(0xbf));else typeof _0x3c10a2===_0x4280de[_0x4984f4(0xc8)]?console['log'](JSON[_0x4984f4(0xa1)](_0x3c10a2,null,0x2)):console['log'](_0x3c10a2);return;}const _0x39e54e=await loadSettings(_0x27322f),_0x2d29d9=getNestedValue(_0x39e54e,_0x2421c2);if(_0x4280de['cpevL'](_0x2d29d9,undefined))console['log'](_0x4984f4(0xbf));else _0x4280de[_0x4984f4(0xcc)](typeof _0x2d29d9,_0x4280de[_0x4984f4(0xc8)])?console[_0x4984f4(0xbb)](JSON['stringify'](_0x2d29d9,null,0x2)):console['log'](_0x2d29d9);}export async function configList(_0x508c0a){const _0x43e1c1=_0x4a948e,_0x5b5c6f={'xoHNQ':function(_0x2b42d8,_0x42c83f){return _0x2b42d8(_0x42c83f);}},_0x9ba02d=await resolveProfileTarget(_0x508c0a);if(_0x9ba02d['kind']==='cloud'){const _0x7433c3=await loadEffectiveCloudSettings(_0x508c0a);if(!_0x7433c3||Object['keys'](_0x7433c3)[_0x43e1c1(0xb0)]===0x0){console[_0x43e1c1(0xbb)](_0x43e1c1(0xaf)+_0x508c0a+'\x22');return;}console[_0x43e1c1(0xbb)](JSON[_0x43e1c1(0xa1)](_0x7433c3,null,0x2));return;}const _0xa7fd6d=_0x5b5c6f['xoHNQ'](getSettingsPath,_0x508c0a);if(!existsSync(_0xa7fd6d)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x508c0a+'\x22');return;}const _0x2e4d0f=await loadSettings(_0x508c0a),_0x242b3d=_0x5b5c6f['xoHNQ'](formatSettings,_0x2e4d0f);!_0x242b3d?console['log'](_0x43e1c1(0xaf)+_0x508c0a+'\x22'):console[_0x43e1c1(0xbb)](_0x242b3d);}export async function configUnset(_0x1b3d2d,_0x415997){const _0xa32cda=_0x4a948e,_0x4bab11={'sharE':function(_0x36a8a9,_0x5c0d9b){return _0x36a8a9(_0x5c0d9b);},'WqgBn':function(_0x119e5c,_0x20c3ee){return _0x119e5c===_0x20c3ee;},'YxLep':_0xa32cda(0xc0),'JuPMt':function(_0x579981,_0x5751ef,_0x8acf16,_0x3da5f0){return _0x579981(_0x5751ef,_0x8acf16,_0x3da5f0);},'OGplr':function(_0x5cdb93){return _0x5cdb93();},'QfxPo':function(_0x54332a,_0x336e82){return _0x54332a(_0x336e82);}},_0x541a46=await _0x4bab11['sharE'](resolveProfileTarget,_0x1b3d2d);if(_0x4bab11['WqgBn'](_0x541a46['kind'],_0x4bab11['YxLep'])){if(_0x541a46['alsoExistsElsewhere'])printDualExistsHint(_0x1b3d2d);const _0x4bd95b=_0x4bab11['JuPMt'](unsetProfileOverride,_0x4bab11[_0xa32cda(0xa2)](getProjectPath),_0x1b3d2d,_0x415997);_0x4bd95b?console[_0xa32cda(0xbb)](_0xa32cda(0xa4)+_0x415997+_0xa32cda(0xa7)+_0x1b3d2d+'\x22'):console['log']('Key\x20\x22'+_0x415997+_0xa32cda(0xc1));return;}const _0x3424e6=unsetProfileOverride(getProjectPath(),_0x1b3d2d,_0x415997);if(_0x3424e6){console[_0xa32cda(0xbb)]('Removed\x20'+_0x415997);return;}const _0x12668d=await _0x4bab11['QfxPo'](loadSettings,_0x1b3d2d),_0x5612a6=deleteNestedValue(_0x12668d,_0x415997);_0x5612a6?console['log'](_0xa32cda(0xba)+_0x415997+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x1b3d2d+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0xa32cda(0xba)+_0x415997+'\x22\x20not\x20found');}export async function configReset(_0x46f045){const _0x599bc2=_0x4a948e,_0x273fbe={'EYJtI':function(_0x349769,_0x588f3e){return _0x349769===_0x588f3e;},'clcOP':_0x599bc2(0xc0),'FTHgx':function(_0x16bf93,_0x2f82d9,_0x405c9c){return _0x16bf93(_0x2f82d9,_0x405c9c);}},_0x3b190e=await resolveProfileTarget(_0x46f045);if(_0x273fbe['EYJtI'](_0x3b190e[_0x599bc2(0xa5)],_0x273fbe['clcOP'])){_0x273fbe[_0x599bc2(0xa6)](resetProfileOverrides,getProjectPath(),_0x46f045),console[_0x599bc2(0xbb)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x46f045+'\x22');return;}console['log']('\x22'+_0x46f045+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x46f045+_0x599bc2(0xa0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2beac6,_0x5de1be){const _0xd30535=_0x4c7c,_0x58d82b=_0x2beac6();while(!![]){try{const _0x5b5e92=-parseInt(_0xd30535(0xe6))/0x1+-parseInt(_0xd30535(0xeb))/0x2+parseInt(_0xd30535(0xef))/0x3+-parseInt(_0xd30535(0xf3))/0x4+-parseInt(_0xd30535(0xed))/0x5*(-parseInt(_0xd30535(0xe5))/0x6)+-parseInt(_0xd30535(0xf2))/0x7*(parseInt(_0xd30535(0xf5))/0x8)+parseInt(_0xd30535(0xf1))/0x9*(parseInt(_0xd30535(0xe3))/0xa);if(_0x5b5e92===_0x5de1be)break;else _0x58d82b['push'](_0x58d82b['shift']());}catch(_0x512866){_0x58d82b['push'](_0x58d82b['shift']());}}}(_0x30e4,0x4da7c));import _0x2ef3ec from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x2e7b0b,_0x247bf7={}){const _0x541e80=_0x4c7c,_0x191f6b={'tfTdq':function(_0x30f126,_0x3a3506){return _0x30f126(_0x3a3506);},'oIDis':function(_0x49b612){return _0x49b612();},'wkIAu':function(_0x287ba6,_0x54d301,_0x5447f6){return _0x287ba6(_0x54d301,_0x5447f6);}},_0x486be3=await _0x191f6b['tfTdq'](fetchCloudProfile,_0x2e7b0b);if(!_0x486be3)throw new Error('Cloud\x20profile\x20\x22'+_0x2e7b0b+'\x22\x20not\x20found.');if(!_0x247bf7['yes']&&!_0x191f6b[_0x541e80(0xe2)](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[_0x541e80(0xe4)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x2e7b0b+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x247bf7[_0x541e80(0xee)]){const {confirmation:_0x4cad89}=await _0x2ef3ec[_0x541e80(0xe1)]([{'type':_0x541e80(0xe7),'name':_0x541e80(0xea),'message':_0x541e80(0xe8)+_0x2e7b0b+_0x541e80(0xf4)}]);if(_0x4cad89!==_0x2e7b0b)throw new Error(_0x541e80(0xf6));}await _0x191f6b[_0x541e80(0xf0)](deleteCloudProfile,_0x2e7b0b),resetProfileOverrides(process['cwd'](),_0x2e7b0b),_0x191f6b[_0x541e80(0xe9)](clearLastProfile,process[_0x541e80(0xec)](),_0x2e7b0b),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x2e7b0b+'\x22.');}function _0x4c7c(_0x2e6bfc,_0x52b918){_0x2e6bfc=_0x2e6bfc-0xe1;const _0x30e43a=_0x30e4();let _0x4c7ccd=_0x30e43a[_0x2e6bfc];return _0x4c7ccd;}function _0x30e4(){const _0x18dfb7=['confirmation','1258160dmoTVG','cwd','250JrHZjJ','yes','902697pYAZpa','tfTdq','135BjJhTx','2342585fvzuVC','689360pGMGid','\x22\x20to\x20confirm\x20deletion:','8zzNaWc','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','prompt','oIDis','892400ZvqIHe','log','21000vOpOCz','360348rJzuZU','input','Type\x20\x22','wkIAu'];_0x30e4=function(){return _0x18dfb7;};return _0x30e4();}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1c50a6=_0x2013;(function(_0x56b63c,_0x25f459){const _0x2900ea=_0x2013,_0x346806=_0x56b63c();while(!![]){try{const _0x3631df=parseInt(_0x2900ea(0x20d))/0x1*(-parseInt(_0x2900ea(0x20b))/0x2)+-parseInt(_0x2900ea(0x205))/0x3+parseInt(_0x2900ea(0x21a))/0x4+parseInt(_0x2900ea(0x1f7))/0x5*(parseInt(_0x2900ea(0x1ef))/0x6)+-parseInt(_0x2900ea(0x1ee))/0x7*(-parseInt(_0x2900ea(0x21b))/0x8)+-parseInt(_0x2900ea(0x209))/0x9*(parseInt(_0x2900ea(0x207))/0xa)+-parseInt(_0x2900ea(0x1ed))/0xb*(parseInt(_0x2900ea(0x212))/0xc);if(_0x3631df===_0x25f459)break;else _0x346806['push'](_0x346806['shift']());}catch(_0x5d8bd3){_0x346806['push'](_0x346806['shift']());}}}(_0x5212,0x7a743));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';function _0x5212(){const _0x5d4ad3=['yaLQY','AfsGm','has','environmentKey','isDirectory','push','localeCompare','Suixb','1175283tAfWhp','.txt','1139690QWCyHH','environmentDetails','9AoMjHw','ikgmu','2EGVdcq','dxkZM','146921hvnvyU','bug-bashes','CjgLB','fuUJC','mxtXl','60NZkWFN','local','log','tNlOO','\x20\x20\x20\x20\x20\x20Details:\x20','map','dXibv','no\x20session','3551460rquxVj','29008TgjEvr','message','error','baseUrl','\x0aCloud\x20Profiles:','name','Run:\x20ranger\x20profile\x20add\x20<profile-name>','1022769VwlCkL','7bNejgm','36kAGsgT','HOvqB','includes','\x20[cloud]','endsWith','sort','cached\x20(updated\x20','startsWith','606355WBglUe','\x20\x20\x20\x20\x20\x20Session:\x20','qkzxy','ZYNde','length','sessions'];_0x5212=function(){return _0x5d4ad3;};return _0x5212();}function _0x2013(_0x1b0995,_0x37301c){_0x1b0995=_0x1b0995-0x1e7;const _0x52125f=_0x5212();let _0x20132e=_0x52125f[_0x1b0995];return _0x20132e;}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x1c50a6(0x1fc),_0x1c50a6(0x20e),'reports',_0x1c50a6(0x213),'ci'];export async function getEnvNames(){const _0x43ec7b=_0x1c50a6,_0x31f728={'ZSfJt':function(_0x13301c){return _0x13301c();},'ehDaO':function(_0x28da19,_0xa77b3c,_0x415cf9){return _0x28da19(_0xa77b3c,_0x415cf9);},'yaLQY':_0x43ec7b(0x213),'qkzxy':function(_0x134f73,_0x34cd28,_0x452e5e){return _0x134f73(_0x34cd28,_0x452e5e);},'Suixb':function(_0x3c7561,_0x4fb36c){return _0x3c7561(_0x4fb36c);},'dxkZM':function(_0x3fed28,_0x2bf874,_0x540cf6){return _0x3fed28(_0x2bf874,_0x540cf6);},'AfsGm':_0x43ec7b(0x206),'ikgmu':function(_0x272c2e,_0x4256d8,_0x4c1f5a){return _0x272c2e(_0x4256d8,_0x4c1f5a);},'HOvqB':'settings.json','fuUJC':'legacy'},_0x6ffac8=getRangerDir();if(!existsSync(_0x6ffac8))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x41d223=await _0x31f728['ZSfJt'](readActiveProfileName),_0xf601e5=[],_0x1d10d9={},_0xa0344e=_0x31f728['ehDaO'](join,_0x6ffac8,_0x31f728['yaLQY']);if(existsSync(_0xa0344e)){const _0x14c599=await readdir(_0xa0344e);for(const _0x355f45 of _0x14c599){const _0x153f62=_0x31f728[_0x43ec7b(0x1f9)](join,_0xa0344e,_0x355f45),_0x503411=await stat(_0x153f62);_0x503411['isDirectory']()&&(_0xf601e5[_0x43ec7b(0x202)](_0x355f45),_0x1d10d9[_0x355f45]=_0x31f728[_0x43ec7b(0x1fd)]);}}const _0xeca460=join(_0x6ffac8,'ci');if(existsSync(_0xeca460)){const _0x93ffb3=await _0x31f728[_0x43ec7b(0x204)](readdir,_0xeca460);for(const _0x16aa1e of _0x93ffb3){const _0x4fb19a=_0x31f728[_0x43ec7b(0x20c)](join,_0xeca460,_0x16aa1e),_0x35a2c7=await stat(_0x4fb19a);_0x35a2c7[_0x43ec7b(0x201)]()&&(_0xf601e5['push'](_0x16aa1e),_0x1d10d9[_0x16aa1e]='ci');}}const _0x3024af=await readdir(_0x6ffac8);for(const _0xa6d04c of _0x3024af){if(NON_ENV_DIRS[_0x43ec7b(0x1f1)](_0xa6d04c))continue;if(_0xa6d04c[_0x43ec7b(0x1f6)]('.'))continue;if(_0xa6d04c[_0x43ec7b(0x1f3)](_0x31f728[_0x43ec7b(0x1fe)]))continue;const _0x5d93e9=join(_0x6ffac8,_0xa6d04c),_0x5a49bc=await stat(_0x5d93e9);_0x5a49bc[_0x43ec7b(0x201)]()&&existsSync(_0x31f728[_0x43ec7b(0x20a)](join,_0x5d93e9,_0x31f728[_0x43ec7b(0x1f0)]))&&(!_0xf601e5[_0x43ec7b(0x1f1)](_0xa6d04c)&&(_0xf601e5['push'](_0xa6d04c),_0x1d10d9[_0xa6d04c]=_0x31f728[_0x43ec7b(0x210)]));}return{'envNames':_0xf601e5,'activeEnv':_0x41d223,'envTypes':_0x1d10d9};}export async function envList(){const _0xaa8f45=_0x1c50a6,_0x2e5183={'PCLDB':function(_0x47ae56){return _0x47ae56();},'dXibv':function(_0xb2c23a,_0x400dec){return _0xb2c23a instanceof _0x400dec;},'CjgLB':function(_0x4d9d7d,_0x3e1399){return _0x4d9d7d===_0x3e1399;},'mxtXl':'\x0aNo\x20profiles\x20found.','sHqgw':function(_0x25e939,_0x1a04fa){return _0x25e939>_0x1a04fa;},'OtJFw':_0xaa8f45(0x213),'ZYNde':function(_0x16ffc4,_0x1df53c){return _0x16ffc4(_0x1df53c);},'tNlOO':function(_0x2c4458,_0x4f005b){return _0x2c4458===_0x4f005b;},'NtnZP':'legacy','ENnCv':function(_0x1ed509,_0x4938be){return _0x1ed509>_0x4938be;},'JqgLp':_0xaa8f45(0x219)},{envNames:_0x3a5d3b,activeEnv:_0x4e73b5,envTypes:_0x21f8e3}=await getEnvNames();let _0x374a47=[];const _0x4a2088=await getToken();if(_0x4a2088)try{_0x374a47=await _0x2e5183['PCLDB'](listCloudProfiles);}catch(_0x2185c1){console[_0xaa8f45(0x1e8)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x2e5183[_0xaa8f45(0x218)](_0x2185c1,Error)?_0x2185c1[_0xaa8f45(0x1e7)]:String(_0x2185c1)));}if(_0x2e5183['CjgLB'](_0x3a5d3b[_0xaa8f45(0x1fb)],0x0)&&_0x374a47['length']===0x0){console[_0xaa8f45(0x214)](_0x2e5183[_0xaa8f45(0x211)]),console['log'](_0xaa8f45(0x1ec));return;}const _0x19366a=new Set(_0x374a47[_0xaa8f45(0x217)](_0x283e33=>_0x283e33[_0xaa8f45(0x1eb)]));if(_0x2e5183['sHqgw'](_0x3a5d3b['length'],0x0)){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x46c9f8 of _0x3a5d3b[_0xaa8f45(0x1f4)]()){const _0x4ff344=_0x46c9f8===_0x4e73b5&&!_0x19366a[_0xaa8f45(0x1ff)](_0x46c9f8),_0x22acc1=_0x21f8e3[_0x46c9f8]||_0x2e5183['OtJFw'],_0x382861=await _0x2e5183[_0xaa8f45(0x1fa)](loadSettings,_0x46c9f8),_0x45834d=_0x2e5183[_0xaa8f45(0x215)](_0x22acc1,_0x2e5183['NtnZP'])?'':'\x20['+_0x22acc1+']';console['log']('\x20\x20'+(_0x4ff344?'*\x20':'\x20\x20')+_0x46c9f8+_0x45834d),_0x382861[_0xaa8f45(0x1e9)]&&console[_0xaa8f45(0x214)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x382861['baseUrl']),_0x382861[_0xaa8f45(0x208)]&&console[_0xaa8f45(0x214)](_0xaa8f45(0x216)+_0x382861['environmentDetails']);}}if(_0x2e5183['ENnCv'](_0x374a47[_0xaa8f45(0x1fb)],0x0)){console['log'](_0xaa8f45(0x1ea));for(const _0x1460c5 of _0x374a47['sort']((_0x3b50d8,_0x4ebc1a)=>_0x3b50d8[_0xaa8f45(0x1eb)][_0xaa8f45(0x203)](_0x4ebc1a[_0xaa8f45(0x1eb)]))){const _0x530182=_0x2e5183[_0xaa8f45(0x20f)](_0x1460c5['name'],_0x4e73b5),_0x2c1622=_0x1460c5['environmentKey']?'\x20('+_0x1460c5[_0xaa8f45(0x200)]+')':'',_0x4a64b1=_0x1460c5['sessionUpdatedAt']?_0xaa8f45(0x1f5)+_0x1460c5['sessionUpdatedAt']+')':_0x2e5183['JqgLp'];console[_0xaa8f45(0x214)]('\x20\x20'+(_0x530182?'*\x20':'\x20\x20')+_0x1460c5[_0xaa8f45(0x1eb)]+_0xaa8f45(0x1f2)+_0x2c1622),console[_0xaa8f45(0x214)](_0xaa8f45(0x1f8)+_0x4a64b1);}}_0x4e73b5&&console[_0xaa8f45(0x214)]('\x0a*\x20=\x20active\x20profile');}
|