@ranger-testing/ranger-cli 3.1.6-alpha.cbf7608-55 → 3.1.7-alpha.34400c2-56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +6 -18
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x291f8f=_0x3bb8;(function(_0x7a8304,_0x146abc){const _0x2eced4=_0x3bb8,_0x4a0ab6=_0x7a8304();while(!![]){try{const _0x272bbe=-parseInt(_0x2eced4(0x1a0))/0x1+parseInt(_0x2eced4(0x1a9))/0x2+-parseInt(_0x2eced4(0x1ef))/0x3+-parseInt(_0x2eced4(0x208))/0x4+-parseInt(_0x2eced4(0x1c9))/0x5*(-parseInt(_0x2eced4(0x192))/0x6)+-parseInt(_0x2eced4(0x1a8))/0x7*(parseInt(_0x2eced4(0x1cb))/0x8)+parseInt(_0x2eced4(0x1ed))/0x9;if(_0x272bbe===_0x146abc)break;else _0x4a0ab6['push'](_0x4a0ab6['shift']());}catch(_0x5beebb){_0x4a0ab6['push'](_0x4a0ab6['shift']());}}}(_0x1a99,0xe4a06));import{readdir,rm}from'fs/promises';function _0x3bb8(_0x5a7230,_0x634641){_0x5a7230=_0x5a7230-0x188;const _0x1a995b=_0x1a99();let _0x3bb8ed=_0x1a995b[_0x5a7230];return _0x3bb8ed;}function _0x1a99(){const _0x4131a3=['1174016uJGLEf','action','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20(domains:\x20','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','qiGWi','retry','\x20\x20Did\x20you\x20mean\x20','8967luubRd','338948SYEwXT','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','dXWvv','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','Enter\x20a\x20different\x20URL','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','Could\x20not\x20reach\x20','\x27\x20to\x20the\x20cloud?','mSFil','\x20Configured\x20envs:\x20','\x20--url\x20','message','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','zNYan','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','HTTP\x20','tOUIm','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','JTFHO','skipAuth','What\x20would\x20you\x20like\x20to\x20do?','Ktfwf','indexOf','TFLvL','yHCXk','length','\x0a\x20\x20Could\x20not\x20reach\x20','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','error','\x22\x20not\x20found.','200630kstqGA','authEnv','5136NglVxE','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','input','name','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','EyDRp','ncaxP','trackPhaseEnd','env','YLZOl','profile.add.autoRouted','keys','JgsfR','IEPWe','capture','exit','`\x20again\x20without\x20--skip-auth.','rxaGb','rtHVU','qezAn','mhcCj','nZUbF','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','prompt','unRSo','join','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','dYPkL','adLqY','yes','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20\x20Set\x20active\x20profile:\x20','xtcyu','39903939eApLai','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','5426247prwHRK','baseUrl','url','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Pzaix','\x27\x20matching\x20','confirm','\x27\x20created.\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','log','Jldtd','saveToCloud','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','eSESg','uOiLC','JfAxO','jdcmk','HEAD','setupHeader','.tmp-','abort','Use\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','no_auth_config','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6508672jzrIQO','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','local','includes','fetch\x20failed','http://localhost:3000','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','profile.add.autoRouteSkipped','cwd','LtMBO','isTTY','cdpEndpoint','Found\x20auth\x20environment\x20\x27','kRzNr','setupHeaders','domains','✓\x20Profile\x20\x27','264vqvmAc','environments','trim','OedeB','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20A\x20profile\x20named\x20\x22','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','slice','continue','✓\x20Cloud\x20profile\x20\x27','cjPXo','ktWIR','\x0a\x20\x20Auth\x20environment\x20\x22','status'];_0x1a99=function(){return _0x4131a3;};return _0x1a99();}import{join}from'path';import{existsSync}from'fs';import _0x474d25 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=_0x291f8f(0x1cf);function warnCloudProfileSharedInOrg(){const _0x1e06f8=_0x291f8f;if(!process['stdout'][_0x1e06f8(0x18b)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x519e35){const _0x3fce2a=_0x291f8f,_0x2dd9a1={'IMCEn':function(_0x1acffb,_0xbe5bd,_0x2f6f1d){return _0x1acffb(_0xbe5bd,_0x2f6f1d);},'dbbtG':'manual','SPgoO':function(_0x2fb95b,_0x26549d,_0x33bc67){return _0x2fb95b(_0x26549d,_0x33bc67);},'McIuO':function(_0x4c213b,_0x192408){return _0x4c213b(_0x192408);},'HnkXC':'Invalid\x20URL','SuHzh':function(_0x56a460,_0x5f08b6){return _0x56a460===_0x5f08b6;},'BdWsi':_0x3fce2a(0x20c)};try{const _0x1d229a=new AbortController(),_0x1d52d1=_0x2dd9a1['IMCEn'](setTimeout,()=>_0x1d229a[_0x3fce2a(0x203)](),0x1388),_0x25be4f={'method':_0x3fce2a(0x200),'signal':_0x1d229a['signal'],'redirect':_0x2dd9a1['dbbtG']};/^https:\/\/localhost(:\d+)?/i['test'](_0x519e35)&&(process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)]='0');const _0x44c88c=await _0x2dd9a1['SPgoO'](fetch,_0x519e35,_0x25be4f);delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)],_0x2dd9a1['McIuO'](clearTimeout,_0x1d52d1);if(_0x44c88c[_0x3fce2a(0x19f)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3fce2a(0x1b9)+_0x44c88c[_0x3fce2a(0x19f)]};}catch(_0x2797b9){delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)];const _0x1ab042=_0x2797b9,_0x309043=_0x1ab042[_0x3fce2a(0x1b5)]||_0x2dd9a1['McIuO'](String,_0x2797b9),_0x282f77=_0x309043['includes'](_0x2dd9a1['HnkXC'])||_0x2dd9a1['SuHzh'](_0x1ab042[_0x3fce2a(0x1ce)],'TypeError')||_0x309043[_0x3fce2a(0x20b)](_0x2dd9a1['BdWsi']);return{'ok':![],'error':_0x309043,'isProtocolError':_0x282f77};}}async function sweepOrphanLocalProfile(_0x33a2fe,_0x22714e,_0x1437f8){const _0x423ea0=_0x291f8f,_0x4fb2cf={'qezAn':function(_0x5cf4cb,_0x590dd1,_0x1fa07e){return _0x5cf4cb(_0x590dd1,_0x1fa07e);},'JfAxO':_0x423ea0(0x20a),'OWXGc':function(_0x12808b,_0x328e50){return _0x12808b(_0x328e50);},'Jldtd':function(_0x192883,_0x186916){return _0x192883(_0x186916);}},_0x41df12=_0x4fb2cf[_0x423ea0(0x1de)](join,_0x22714e,_0x4fb2cf[_0x423ea0(0x1fe)]),_0x5e3826=join(_0x41df12,_0x33a2fe);existsSync(_0x5e3826)&&(_0x1437f8&&await _0x4fb2cf['OWXGc'](isPathGitTracked,_0x5e3826)?console[_0x423ea0(0x1f8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x5e3826+_0x423ea0(0x1c6)):(await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0x5e3826,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5e3826)));if(_0x4fb2cf[_0x423ea0(0x1f9)](existsSync,_0x41df12)){let _0x51e6b6=[];try{_0x51e6b6=await readdir(_0x41df12);}catch{return;}const _0x3172ce=_0x423ea0(0x202)+_0x33a2fe+'-';for(const _0x3c937f of _0x51e6b6){if(!_0x3c937f['startsWith'](_0x3172ce))continue;const _0xeceb41=join(_0x41df12,_0x3c937f);await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0xeceb41,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xeceb41);}}}async function sweepOrphansBestEffort(_0x2614dc){const _0x598e59=_0x291f8f,_0x2e1f21={'jdcmk':function(_0x362808,_0x39c514){return _0x362808 instanceof _0x39c514;}};try{await sweepOrphanLocalProfile(_0x2614dc,getRangerHomeDir(),![]);const _0x2e6804=getRangerDir();_0x2e6804!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x2614dc,_0x2e6804,!![]);}catch(_0x3019f9){console[_0x598e59(0x1f8)](_0x598e59(0x1ae)+(_0x2e1f21[_0x598e59(0x1ff)](_0x3019f9,Error)?_0x3019f9[_0x598e59(0x1b5)]:String(_0x3019f9))+').');}}async function markActive(_0x333274){const _0x5da9d2=_0x291f8f,_0x2252d2={'tOUIm':_0x5da9d2(0x1f7)};try{await writeActiveProfileName(_0x333274),console['log'](_0x5da9d2(0x1eb)+_0x333274);}catch{console[_0x5da9d2(0x1f8)](_0x2252d2[_0x5da9d2(0x1ba)]);}}async function tryAutoRouteCloudProfile(_0x34750f,_0x37b928,_0x2bedc0,_0x39164d,_0xf1d95b){const _0x606e68=_0x291f8f,_0xf014d0={'OedeB':function(_0x1eb6bf,_0x4eab68){return _0x1eb6bf===_0x4eab68;},'JgsfR':'profile.add.autoRouteSkipped','TAoHC':function(_0x7881a0,_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974){return _0x7881a0(_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974);},'xvqTA':'no_auth_config','eSESg':function(_0x584515,_0x1a4b33){return _0x584515+_0x1a4b33;},'qiGWi':_0x606e68(0x1bb),'zNYan':_0x606e68(0x1e1),'cjPXo':'env_not_found','yHCXk':_0x606e68(0x1a4),'ycDmw':_0x606e68(0x1fa),'EyDRp':_0x606e68(0x1f2),'xtcyu':function(_0x2a07aa,_0x7f93f5,_0x1fcbe2,_0x57ebe2){return _0x2a07aa(_0x7f93f5,_0x1fcbe2,_0x57ebe2);},'kRzNr':function(_0x461437,_0xa8f5ac){return _0x461437 instanceof _0xa8f5ac;},'IEPWe':function(_0x13a57f,_0x318760){return _0x13a57f===_0x318760;},'OahXI':function(_0x2452b2,_0x4caed1){return _0x2452b2+_0x4caed1;},'TCNsq':function(_0x22b50e,_0x4aa9d5){return _0x22b50e(_0x4aa9d5);}};let _0x38c6af;try{_0x38c6af=await fetchAuthConfig();}catch(_0x4713d7){return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0[_0x606e68(0x1d7)],{'reason':_0x606e68(0x206),'profileName':_0x34750f}),console[_0x606e68(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4713d7 instanceof Error?_0x4713d7[_0x606e68(0x1b5)]:String(_0x4713d7))),![];}if((!_0x38c6af||!_0x38c6af['environments']||Object[_0x606e68(0x1d6)](_0x38c6af['environments'])['length']===0x0)&&!_0x2bedc0['authEnv']){if(_0x39164d)return await _0xf014d0['TAoHC'](captureEnvLessProfile,_0x34750f,_0x37b928,_0x2bedc0,_0xf1d95b);return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0['xvqTA'],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0xf014d0[_0x606e68(0x1fc)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a')+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x34750f+_0x606e68(0x1b4)+_0x37b928+'\x20--skip-auth\x0a')+'\x0a'+_0xf014d0[_0x606e68(0x1a5)],_0xf014d0[_0x606e68(0x1b7)])),![];}let _0x2f9ade;if(_0x2bedc0[_0x606e68(0x1ca)]){if(!_0x38c6af?.[_0x606e68(0x193)]?.[_0x2bedc0[_0x606e68(0x1ca)]]){const _0x2d51d7=Object[_0x606e68(0x1d6)](_0x38c6af?.['environments']??{});return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0[_0x606e68(0x19c)],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0x606e68(0x19e)+_0x2bedc0[_0x606e68(0x1ca)]+_0x606e68(0x1c8),_0x2d51d7[_0x606e68(0x1c3)]?_0x606e68(0x1b3)+_0x2d51d7['join'](',\x20')+'.':_0xf014d0[_0x606e68(0x1c2)])),![];}_0x2f9ade=_0x2bedc0['authEnv'];}else _0x2f9ade=matchAuthEnvironment(_0x37b928,_0x38c6af);if(!_0x2f9ade)return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0['JgsfR'],{'reason':'no_match','profileName':_0x34750f}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x37b928+_0x606e68(0x20e)+Object[_0x606e68(0x1d6)](_0x38c6af?.[_0x606e68(0x193)]??{})[_0x606e68(0x1e4)](',\x20')+'.'),![];const _0x2564dc=_0x38c6af?.[_0x606e68(0x193)]?.[_0x2f9ade],_0x333b89=_0x2564dc?.[_0x606e68(0x190)]??[];if(_0x39164d&&!_0x2bedc0[_0x606e68(0x1e9)]){const {saveToCloud:_0x54d385}=await _0x474d25['prompt']([{'type':'confirm','name':_0xf014d0['ycDmw'],'message':_0x606e68(0x18d)+_0x2f9ade+_0x606e68(0x1f4)+_0x37b928+_0x606e68(0x1a3)+_0x333b89[_0x606e68(0x1e4)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x34750f+_0x606e68(0x1b1),'default':!![]}]);if(!_0x54d385)return _0xf1d95b?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0[_0x606e68(0x1d0)]),![];}const _0x1ad065=_0x333b89['some'](_0x1e875b=>{const _0x177b70=_0x606e68;try{return _0xf014d0[_0x177b70(0x195)](new URL(_0x1e875b)['origin'],new URL(_0x37b928)['origin']);}catch{return![];}}),_0x4876be={};!_0x1ad065&&(_0x4876be['baseUrl']=_0x37b928);try{await _0xf014d0[_0x606e68(0x1ec)](createCloudProfile,_0x34750f,_0x2f9ade,{'settings':_0x4876be}),warnCloudProfileSharedInOrg();}catch(_0x78e449){if(_0xf014d0[_0x606e68(0x18e)](_0x78e449,ApiError)&&_0xf014d0[_0x606e68(0x1d8)](_0x78e449[_0x606e68(0x19f)],0x199)){console['error'](_0xf014d0[_0x606e68(0x1fc)](_0x606e68(0x197)+_0x34750f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x34750f));throw _0x78e449;}throw _0x78e449;}return console['log'](_0xf014d0['OahXI'](_0x606e68(0x191)+_0x34750f+_0x606e68(0x1f6),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x34750f)),await _0xf014d0['TCNsq'](sweepOrphansBestEffort,_0x34750f),_0xf1d95b?.['trackPhaseEnd'](_0x606e68(0x1d5),{'envKey':_0x2f9ade,'profileName':_0x34750f}),!![];}async function createUnconfiguredCloudProfile(_0x1c5e96,_0x295cc6){const _0x20a15a=_0x291f8f,_0x155119={'nZUbF':function(_0x57cd55){return _0x57cd55();},'dXWvv':function(_0x3ffc3e,_0x3948eb){return _0x3ffc3e+_0x3948eb;}};try{await createCloudProfile(_0x1c5e96,undefined,{'settings':_0x295cc6}),_0x155119[_0x20a15a(0x1e0)](warnCloudProfileSharedInOrg);}catch(_0x1c1323){_0x1c1323 instanceof ApiError&&_0x1c1323['status']===0x199&&console['error'](_0x155119[_0x20a15a(0x1ab)](_0x20a15a(0x197)+_0x1c5e96+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x20a15a(0x1cc)+_0x1c5e96));throw _0x1c1323;}}async function captureEnvLessProfile(_0x564c3b,_0x1222af,_0x27b5a7,_0x3518ae){const _0x4e2664=_0x291f8f,_0x3508c5={'rtHVU':_0x4e2664(0x1d9),'afmKq':_0x4e2664(0x209),'ffyZv':_0x4e2664(0x188),'JqXYn':function(_0x47c9e4,_0x1b9294){return _0x47c9e4===_0x1b9294;},'gJmGa':function(_0x399b4f,_0x4db029){return _0x399b4f+_0x4db029;},'iWaGW':function(_0x2cae1a){return _0x2cae1a();},'RtSbV':_0x4e2664(0x1d5)};if(!_0x27b5a7['yes']){const {capture:_0x270634}=await _0x474d25['prompt']([{'type':_0x4e2664(0x1f5),'name':_0x3508c5[_0x4e2664(0x1dd)],'message':_0x3508c5['afmKq'],'default':!![]}]);if(!_0x270634)return _0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['ffyZv'],{'reason':'user_declined','profileName':_0x564c3b}),console[_0x4e2664(0x1c7)](_0x4e2664(0x1e5)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x4a5020={};if(_0x27b5a7[_0x4e2664(0x201)])for(const _0x52c14e of _0x27b5a7[_0x4e2664(0x201)]){const _0x3c5593=_0x52c14e[_0x4e2664(0x1c0)](':');if(_0x3508c5['JqXYn'](_0x3c5593,-0x1))continue;_0x4a5020[_0x52c14e[_0x4e2664(0x199)](0x0,_0x3c5593)['trim']()]=_0x52c14e['slice'](_0x3508c5['gJmGa'](_0x3c5593,0x1))[_0x4e2664(0x194)]();}const _0x4d5935={'baseUrl':_0x1222af};Object[_0x4e2664(0x1d6)](_0x4a5020)['length']>0x0&&(_0x4d5935['setupHeaders']=_0x4a5020);let _0x13a056;try{_0x13a056=await createCloudProfile(_0x564c3b,undefined,{'settings':_0x4d5935}),_0x3508c5['iWaGW'](warnCloudProfileSharedInOrg);}catch(_0x13538e){_0x13538e instanceof ApiError&&_0x13538e[_0x4e2664(0x19f)]===0x199&&console['error'](_0x4e2664(0x197)+_0x564c3b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4e2664(0x1cc)+_0x564c3b));throw _0x13538e;}return await manualBrowserLogin(_0x13a056,{'key':'','domains':[_0x1222af],'setupHeaders':Object['keys'](_0x4a5020)['length']>0x0?_0x4a5020:undefined}),console[_0x4e2664(0x1f8)]('\x0a✓\x20Profile\x20\x27'+_0x564c3b+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x564c3b)),await sweepOrphansBestEffort(_0x564c3b),_0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['RtSbV'],{'envKey':null,'profileName':_0x564c3b}),!![];}export async function addEnv(_0x1c2670,_0x1118b0={},_0x4a692d){const _0x4e05a9=_0x291f8f,_0x438549={'ncaxP':function(_0x110fbd,_0x22512a){return _0x110fbd+_0x22512a;},'uHJaR':_0x4e05a9(0x1ee),'NlLbG':_0x4e05a9(0x207),'unRSo':_0x4e05a9(0x1a2),'WOrOn':function(_0x1f99e2,_0x17b414){return _0x1f99e2===_0x17b414;},'mhcCj':function(_0x44ed8d,_0x36052c){return _0x44ed8d!==_0x36052c;},'ktWIR':_0x4e05a9(0x1af),'JTFHO':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','JlcCW':_0x4e05a9(0x1aa),'Ktfwf':function(_0x11a5bb,_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff){return _0x11a5bb(_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff);},'AUSdu':'isElectron','uOiLC':function(_0x407fdf,_0x4dbaa3){return _0x407fdf(_0x4dbaa3);},'sFYOB':function(_0x4284fa,_0x2304da){return _0x4284fa(_0x2304da);},'YLZOl':function(_0x42eb3a,_0x39b5ac,_0x44af6f){return _0x42eb3a(_0x39b5ac,_0x44af6f);},'NkzbG':function(_0x1936a5,_0x4953fe){return _0x1936a5(_0x4953fe);},'LtMBO':'\x0a🌐\x20Profile\x20Setup\x0a','Pzaix':_0x4e05a9(0x205),'sZUbt':_0x4e05a9(0x1f0),'mSFil':_0x4e05a9(0x198),'rxaGb':function(_0x5d9cab,_0x23dcf1){return _0x5d9cab||_0x23dcf1;},'dYPkL':_0x4e05a9(0x1ad),'adLqY':'Continue\x20anyway','OYvzL':function(_0x382247,_0x169731){return _0x382247===_0x169731;},'WWiNt':_0x4e05a9(0x19a),'woFfy':function(_0x3792a6,_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48){return _0x3792a6(_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48);},'TFLvL':function(_0x47245b,_0x3fe4e2){return _0x47245b(_0x3fe4e2);}};_0x1118b0['ci']&&(console[_0x4e05a9(0x1c7)](_0x438549[_0x4e05a9(0x1d1)](_0x438549['ncaxP'](_0x438549[_0x4e05a9(0x1d1)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x4e05a9(0x1c5),'\x0a')+_0x438549['uHJaR']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x438549['NlLbG']),_0x438549[_0x4e05a9(0x1e3)])),process[_0x4e05a9(0x1da)](0x1));const _0x2ec69a={};if(_0x1118b0[_0x4e05a9(0x201)])for(const _0x143c71 of _0x1118b0['setupHeader']){const _0x11ab23=_0x143c71['indexOf'](':');if(_0x438549['WOrOn'](_0x11ab23,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x143c71+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x4b00ee=_0x143c71['slice'](0x0,_0x11ab23)[_0x4e05a9(0x194)](),_0x279bbe=_0x143c71[_0x4e05a9(0x199)](_0x438549['ncaxP'](_0x11ab23,0x1))['trim']();_0x2ec69a[_0x4b00ee]=_0x279bbe;}if(_0x438549[_0x4e05a9(0x1df)](_0x1118b0['cdpEndpoint'],undefined)&&_0x1118b0['cdpEndpoint']['trim']()==='')throw new Error(_0x438549[_0x4e05a9(0x19d)]);if(_0x1118b0[_0x4e05a9(0x18c)]&&_0x1118b0['url'])throw new Error(_0x438549[_0x4e05a9(0x1bc)]);if(_0x1118b0[_0x4e05a9(0x1ca)]&&_0x1118b0[_0x4e05a9(0x1bd)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x1118b0['authEnv']&&_0x1118b0['cdpEndpoint'])throw new Error(_0x4e05a9(0x1ac));const _0x238b30=Boolean(_0x1118b0['cdpEndpoint']),_0x57dfc1=isInteractive();if(!_0x57dfc1&&!_0x1118b0['url']&&!_0x238b30&&!_0x1118b0[_0x4e05a9(0x1bd)])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(_0x238b30){const _0x4435cb=_0x1118b0['cdpEndpoint'];console[_0x4e05a9(0x1f8)](_0x438549['JlcCW']),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1ea)+_0x4435cb);const _0x217ed9={'cdpEndpoint':_0x4435cb,'isElectron':!![]};Object['keys'](_0x2ec69a)['length']>0x0&&(_0x217ed9[_0x4e05a9(0x18f)]=_0x2ec69a);await createUnconfiguredCloudProfile(_0x1c2670,_0x217ed9);try{_0x438549[_0x4e05a9(0x1bf)](setProfileOverride,process[_0x4e05a9(0x189)](),_0x1c2670,_0x4e05a9(0x18c),_0x4435cb),_0x438549['Ktfwf'](setProfileOverride,process['cwd'](),_0x1c2670,_0x438549['AUSdu'],!![]);}catch(_0x1b0655){console[_0x4e05a9(0x1c7)](_0x4e05a9(0x1b8)+(_0x1b0655 instanceof Error?_0x1b0655[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1fd)](String,_0x1b0655)));}console[_0x4e05a9(0x1f8)](_0x4e05a9(0x19b)+_0x1c2670+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x1c2670),await _0x438549['sFYOB'](markActive,_0x1c2670);return;}if(_0x1118b0['skipAuth']){const _0x426c94={};_0x1118b0['url']&&(_0x426c94[_0x4e05a9(0x1f0)]=_0x1118b0[_0x4e05a9(0x1f1)]);Object[_0x4e05a9(0x1d6)](_0x2ec69a)['length']>0x0&&(_0x426c94[_0x4e05a9(0x18f)]=_0x2ec69a);await _0x438549[_0x4e05a9(0x1d4)](createUnconfiguredCloudProfile,_0x1c2670,_0x426c94),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x191)+_0x1c2670+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1c2670+_0x4e05a9(0x1db))),await sweepOrphansBestEffort(_0x1c2670),await markActive(_0x1c2670);return;}if(_0x1118b0[_0x4e05a9(0x1f1)]){const _0x138b26=_0x1118b0['url'],_0x14a8fa=await _0x438549['NkzbG'](checkUrlReachability,_0x138b26);if(!_0x14a8fa['ok']&&!_0x1118b0['force'])throw new Error(_0x4e05a9(0x1b0)+_0x138b26+':\x20'+_0x14a8fa['error']+_0x4e05a9(0x1b6));!_0x14a8fa['ok']&&_0x1118b0['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x138b26+':\x20'+_0x14a8fa['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x4e05a9(0x1f8)](_0x438549[_0x4e05a9(0x18a)]),console['log'](_0x438549[_0x4e05a9(0x1f3)]),console[_0x4e05a9(0x1f8)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5b1979='',_0xe2518=![];while(!![]){const _0x6e83d9=await _0x474d25[_0x4e05a9(0x1e2)]([{'type':_0x4e05a9(0x1cd),'name':_0x438549['sZUbt'],'message':_0xe2518?_0x4e05a9(0x1fb):_0x438549[_0x4e05a9(0x1b2)],'default':_0x438549[_0x4e05a9(0x1dc)](_0x5b1979,_0x4e05a9(0x20d))}]);_0x5b1979=_0x6e83d9['baseUrl'];const _0x484917=await checkUrlReachability(_0x5b1979);if(_0x484917['ok'])break;const _0x34f2b3=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5b1979),_0x2bf5d5=_0x484917['isProtocolError']&&!_0x34f2b3,_0x36a9f0=_0x2bf5d5?'http://'+_0x5b1979:null;_0xe2518=!![],console['log'](_0x4e05a9(0x1c4)+_0x5b1979+':\x20'+_0x484917['error']);_0x36a9f0&&console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1a7)+_0x36a9f0+'?');const {action:_0x38965e}=await _0x474d25['prompt']([{'type':'list','name':_0x4e05a9(0x1a1),'message':_0x4e05a9(0x1be),'choices':[..._0x36a9f0?[{'name':_0x4e05a9(0x204)+_0x36a9f0,'value':_0x4e05a9(0x1e6)}]:[],{'name':_0x438549[_0x4e05a9(0x1e7)],'value':_0x4e05a9(0x1a6)},{'name':_0x438549[_0x4e05a9(0x1e8)],'value':'continue'}]}]);if(_0x38965e==='use_suggestion'&&_0x36a9f0){_0x5b1979=_0x36a9f0;const _0x447329=await _0x438549['NkzbG'](checkUrlReachability,_0x5b1979);if(_0x447329['ok'])break;console[_0x4e05a9(0x1f8)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5b1979+':\x20'+_0x447329['error']);}else{if(_0x438549['OYvzL'](_0x38965e,_0x438549['WWiNt']))break;}}_0x1118b0={..._0x1118b0,'url':_0x5b1979};}let _0x5d5c50=![];try{_0x5d5c50=await _0x438549['woFfy'](tryAutoRouteCloudProfile,_0x1c2670,_0x1118b0['url'],_0x1118b0,_0x57dfc1,_0x4a692d);}catch(_0x3e452d){console[_0x4e05a9(0x1c7)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1c2670+'\x22:\x20'+(_0x3e452d instanceof Error?_0x3e452d[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1c1)](String,_0x3e452d))),process[_0x4e05a9(0x1da)](0x1);}!_0x5d5c50&&process['exit'](0x1),await markActive(_0x1c2670);}
|
|
1
|
+
function _0x52cc(_0x20aea0,_0x14087){_0x20aea0=_0x20aea0-0x7a;const _0xbb0ca1=_0xbb0c();let _0x52cc67=_0xbb0ca1[_0x20aea0];return _0x52cc67;}const _0x18c33c=_0x52cc;(function(_0x42d565,_0x548cdb){const _0xf7975d=_0x52cc,_0x102ce9=_0x42d565();while(!![]){try{const _0x5b0355=parseInt(_0xf7975d(0xe8))/0x1+-parseInt(_0xf7975d(0xc7))/0x2*(-parseInt(_0xf7975d(0xe1))/0x3)+parseInt(_0xf7975d(0x8a))/0x4*(parseInt(_0xf7975d(0xeb))/0x5)+parseInt(_0xf7975d(0xe2))/0x6*(-parseInt(_0xf7975d(0x95))/0x7)+-parseInt(_0xf7975d(0xa6))/0x8+parseInt(_0xf7975d(0xb9))/0x9+-parseInt(_0xf7975d(0x88))/0xa;if(_0x5b0355===_0x548cdb)break;else _0x102ce9['push'](_0x102ce9['shift']());}catch(_0x232cbf){_0x102ce9['push'](_0x102ce9['shift']());}}}(_0xbb0c,0xeda3e));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x44c9a0 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x18c33c(0x9a);function warnCloudProfileSharedInOrg(){const _0x24e429=_0x18c33c;if(!process[_0x24e429(0x80)]['isTTY'])return;console[_0x24e429(0xc9)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x1a1867){const _0x5c070c=_0x18c33c,_0x1f0a03={'NZyLI':_0x5c070c(0xc4),'XzAJs':function(_0x1b7598,_0x4f9e00,_0x421378){return _0x1b7598(_0x4f9e00,_0x421378);},'ZIBZa':function(_0x412dc3,_0x2f4f9d){return _0x412dc3(_0x2f4f9d);},'pyDmm':function(_0x15683d,_0x5033eb){return _0x15683d<_0x5033eb;},'GLUmw':'fetch\x20failed'};try{const _0x262de5=new AbortController(),_0x539745=setTimeout(()=>_0x262de5['abort'](),0x1388),_0x186dd5={'method':'HEAD','signal':_0x262de5['signal'],'redirect':_0x1f0a03['NZyLI']};/^https:\/\/localhost(:\d+)?/i['test'](_0x1a1867)&&(process['env'][_0x5c070c(0xf3)]='0');const _0x58a498=await _0x1f0a03['XzAJs'](fetch,_0x1a1867,_0x186dd5);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f0a03['ZIBZa'](clearTimeout,_0x539745);if(_0x1f0a03[_0x5c070c(0x9f)](_0x58a498[_0x5c070c(0x98)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x5c070c(0xe3)+_0x58a498['status']};}catch(_0xcc756){delete process[_0x5c070c(0x84)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xd04d85=_0xcc756,_0xf5f46e=_0xd04d85['message']||String(_0xcc756),_0x173143=_0xf5f46e['includes']('Invalid\x20URL')||_0xd04d85['name']==='TypeError'||_0xf5f46e['includes'](_0x1f0a03[_0x5c070c(0xb6)]);return{'ok':![],'error':_0xf5f46e,'isProtocolError':_0x173143};}}async function sweepOrphanLocalProfile(_0x2394d1,_0x30d02a,_0x76e168){const _0x2ec91e=_0x18c33c,_0x141de3={'McxVP':'local','NpwQm':function(_0xa908bd,_0x167591,_0xce43f1){return _0xa908bd(_0x167591,_0xce43f1);},'GNAHW':function(_0x9245ae,_0x4cfb2a){return _0x9245ae(_0x4cfb2a);},'cYfGR':function(_0x21fe66,_0x177f37){return _0x21fe66(_0x177f37);},'skiTD':function(_0x11014a,_0x2cfa57,_0x4a5b59){return _0x11014a(_0x2cfa57,_0x4a5b59);}},_0x5a1a24=join(_0x30d02a,_0x141de3[_0x2ec91e(0x81)]),_0x3e29c2=_0x141de3[_0x2ec91e(0xcf)](join,_0x5a1a24,_0x2394d1);_0x141de3['GNAHW'](existsSync,_0x3e29c2)&&(_0x76e168&&await _0x141de3[_0x2ec91e(0xb0)](isPathGitTracked,_0x3e29c2)?console[_0x2ec91e(0x7e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3e29c2+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x3e29c2,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3e29c2)));if(existsSync(_0x5a1a24)){let _0x5eb6ef=[];try{_0x5eb6ef=await _0x141de3[_0x2ec91e(0x85)](readdir,_0x5a1a24);}catch{return;}const _0x4683f6='.tmp-'+_0x2394d1+'-';for(const _0x5c5f01 of _0x5eb6ef){if(!_0x5c5f01['startsWith'](_0x4683f6))continue;const _0x12140f=join(_0x5a1a24,_0x5c5f01);await _0x141de3['skiTD'](rm,_0x12140f,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x12140f);}}}function _0xbb0c(){const _0x25c839=['profile.add.autoRouted','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x22\x20not\x20found.','manual','input','prompt','2578546CgVrsQ','\x27\x20created.\x0a','warn','HoLiN','eGTWA','zQDVT','error','baseUrl','NpwQm','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','Enter\x20a\x20different\x20URL','\x22:\x20','setupHeaders','continue','use_suggestion','\x0a\x20\x20(domains:\x20','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','ImtCp','trim','✓\x20Cloud\x20profile\x20\x27','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','test','YqBwE','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','3Kpcdaf','2658ojXbJw','HTTP\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','some','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','1353538AcrEUO','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isElectron','15UKoKsi','yes','\x20(continuing\x20with\x20--force)','env_not_found','What\x20would\x20you\x20like\x20to\x20do?','LUost','BBiKh','authEnv','NODE_TLS_REJECT_UNAUTHORIZED','list','\x27\x20created\x20(no\x20session).\x0a','PQfUP','`\x20again\x20without\x20--skip-auth.','length','dVCox','tkFRx','force','log','NOIZv','stdout','McxVP','slice','uhGny','env','cYfGR','keys','rinWG','14878140BCBzNY','XovCP','384708fvgQOZ','uLapI','wDziJ','no_auth_config','NQwkw','\x27\x20created\x20(CDP).','no_match','qtgoH','exit','http://localhost:3000','skipAuth','7504UtMknG','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','TSpXX','status','cwd','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20\x20Did\x20you\x20mean\x20','setupHeader','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a🌐\x20Profile\x20Setup\x0a','pyDmm','message','\x20Configured\x20envs:\x20','pIwfP','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','7233752vOeMui','trackPhaseEnd','profile.add.autoRouteSkipped','dZmlt','HFxDS','cdpEndpoint','indexOf','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','rHEvH','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','GNAHW','✓\x20Profile\x20\x27','url','CmzjY','isProtocolError','environments','GLUmw','\x0a\x20\x20Could\x20not\x20reach\x20','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','8180649jBecwY','nBWOt','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','kmUTK','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','origin','vNnYO'];_0xbb0c=function(){return _0x25c839;};return _0xbb0c();}async function sweepOrphansBestEffort(_0x4b16cb){const _0x42938f=_0x18c33c,_0x1b9fca={'ieATx':function(_0xa62038){return _0xa62038();},'CmzjY':function(_0x829e00,_0x3c5b1b){return _0x829e00!==_0x3c5b1b;},'HqcHA':function(_0x37f109){return _0x37f109();},'pIwfP':function(_0x41012f,_0x4c1a85,_0x459918,_0x3bb3f6){return _0x41012f(_0x4c1a85,_0x459918,_0x3bb3f6);}};try{await sweepOrphanLocalProfile(_0x4b16cb,getRangerHomeDir(),![]);const _0x56c760=_0x1b9fca['ieATx'](getRangerDir);_0x1b9fca[_0x42938f(0xb3)](_0x56c760,_0x1b9fca['HqcHA'](getRangerHomeDir))&&await _0x1b9fca[_0x42938f(0xa2)](sweepOrphanLocalProfile,_0x4b16cb,_0x56c760,!![]);}catch(_0x2fe2e3){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x2fe2e3 instanceof Error?_0x2fe2e3['message']:String(_0x2fe2e3))+').');}}async function markActive(_0x36ed37){const _0x4ecbeb=_0x18c33c;try{await writeActiveProfileName(_0x36ed37),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x36ed37);}catch{console['log'](_0x4ecbeb(0x96));}}async function tryAutoRouteCloudProfile(_0x21b7b7,_0x199956,_0x34ee2b,_0x387980,_0x247027){const _0xaaa9a7=_0x18c33c,_0x4716f3={'tkFRx':'profile.add.autoRouteSkipped','ITdFW':function(_0x791864,_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67){return _0x791864(_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67);},'xUmZx':_0xaaa9a7(0x8d),'qzLHB':_0xaaa9a7(0xe0),'joapH':_0xaaa9a7(0xad),'uhGny':_0xaaa9a7(0xc2),'NQwkw':_0xaaa9a7(0xd0),'vNnYO':'user_declined','rwzvw':_0xaaa9a7(0xa3),'HoLiN':function(_0x2e9e6b,_0x40693b,_0x3d13d7,_0x249518){return _0x2e9e6b(_0x40693b,_0x3d13d7,_0x249518);},'DKQxg':function(_0x83bf5c){return _0x83bf5c();},'wDziJ':function(_0x3553d4,_0x5abb8e){return _0x3553d4+_0x5abb8e;},'qtgoH':function(_0x39c7d8,_0x2ed04c){return _0x39c7d8(_0x2ed04c);}};let _0x361f86;try{_0x361f86=await fetchAuthConfig();}catch(_0x23e014){return _0x247027?.['trackPhaseEnd'](_0x4716f3[_0xaaa9a7(0x7c)],{'reason':_0xaaa9a7(0x8d),'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0xaaa9a7(0xbd)+(_0x23e014 instanceof Error?_0x23e014[_0xaaa9a7(0xa0)]:String(_0x23e014))),![];}if((!_0x361f86||!_0x361f86[_0xaaa9a7(0xb5)]||Object[_0xaaa9a7(0x86)](_0x361f86[_0xaaa9a7(0xb5)])[_0xaaa9a7(0x7a)]===0x0)&&!_0x34ee2b['authEnv']){if(_0x387980)return await _0x4716f3['ITdFW'](captureEnvLessProfile,_0x21b7b7,_0x199956,_0x34ee2b,_0x247027);return _0x247027?.[_0xaaa9a7(0xa7)]('profile.add.autoRouteSkipped',{'reason':_0x4716f3['xUmZx'],'profileName':_0x21b7b7}),console['error'](_0x4716f3['qzLHB']+'\x0a'+_0x4716f3['joapH']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b7b7+'\x20--url\x20'+_0x199956+'\x20--skip-auth\x0a')+'\x0a'+_0x4716f3[_0xaaa9a7(0x83)]+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}let _0x34c080;if(_0x34ee2b[_0xaaa9a7(0xf2)]){if(!_0x361f86?.['environments']?.[_0x34ee2b['authEnv']]){const _0xfee778=Object[_0xaaa9a7(0x86)](_0x361f86?.[_0xaaa9a7(0xb5)]??{});return _0x247027?.[_0xaaa9a7(0xa7)](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0xee),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x34ee2b[_0xaaa9a7(0xf2)]+_0xaaa9a7(0xc3)+(_0xfee778['length']?_0xaaa9a7(0xa1)+_0xfee778['join'](',\x20')+'.':_0x4716f3[_0xaaa9a7(0x8e)])),![];}_0x34c080=_0x34ee2b[_0xaaa9a7(0xf2)];}else _0x34c080=matchAuthEnvironment(_0x199956,_0x361f86);if(!_0x34c080)return _0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0x90),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x199956+_0xaaa9a7(0xd9)+Object['keys'](_0x361f86?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2ec8ac=_0x361f86?.[_0xaaa9a7(0xb5)]?.[_0x34c080],_0x1b6316=_0x2ec8ac?.['domains']??[];if(_0x387980&&!_0x34ee2b['yes']){const {saveToCloud:_0x196d0e}=await _0x44c9a0[_0xaaa9a7(0xc6)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x34c080+'\x27\x20matching\x20'+_0x199956+_0xaaa9a7(0xd7)+_0x1b6316['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b7b7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x196d0e)return _0x247027?.[_0xaaa9a7(0xa7)](_0x4716f3['tkFRx'],{'reason':_0x4716f3[_0xaaa9a7(0xbf)],'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0x4716f3['rwzvw']),![];}const _0x291a6b=_0x1b6316[_0xaaa9a7(0xe5)](_0x4d9316=>{const _0x2cb6f0=_0xaaa9a7;try{return new URL(_0x4d9316)[_0x2cb6f0(0xbe)]===new URL(_0x199956)['origin'];}catch{return![];}}),_0x4d4b59={};!_0x291a6b&&(_0x4d4b59['baseUrl']=_0x199956);try{await _0x4716f3[_0xaaa9a7(0xca)](createCloudProfile,_0x21b7b7,_0x34c080,{'settings':_0x4d4b59}),_0x4716f3['DKQxg'](warnCloudProfileSharedInOrg);}catch(_0x1d42bc){if(_0x1d42bc instanceof ApiError&&_0x1d42bc['status']===0x199){console['error'](_0x4716f3[_0xaaa9a7(0x8c)](_0xaaa9a7(0xa4)+_0x21b7b7+_0xaaa9a7(0xa5),_0xaaa9a7(0xaf)+_0x21b7b7));throw _0x1d42bc;}throw _0x1d42bc;}return console['log'](_0xaaa9a7(0xb1)+_0x21b7b7+_0xaaa9a7(0xc8)+(_0xaaa9a7(0xd1)+_0x21b7b7)),await _0x4716f3[_0xaaa9a7(0x91)](sweepOrphansBestEffort,_0x21b7b7),_0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xc0),{'envKey':_0x34c080,'profileName':_0x21b7b7}),!![];}async function createUnconfiguredCloudProfile(_0x5c2291,_0x27032e){const _0x5a1111=_0x18c33c,_0x4e36b0={'wpBJx':function(_0x1328c0,_0x43e6db,_0x2ac7d8,_0x4299f8){return _0x1328c0(_0x43e6db,_0x2ac7d8,_0x4299f8);}};try{await _0x4e36b0['wpBJx'](createCloudProfile,_0x5c2291,undefined,{'settings':_0x27032e}),warnCloudProfileSharedInOrg();}catch(_0x471207){_0x471207 instanceof ApiError&&_0x471207[_0x5a1111(0x98)]===0x199&&console['error'](_0x5a1111(0xa4)+_0x5c2291+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x5a1111(0xaf)+_0x5c2291));throw _0x471207;}}async function captureEnvLessProfile(_0x225c34,_0x4a93a3,_0x5a4cd7,_0x75abc1){const _0x224aae=_0x18c33c,_0x122566={'gEqWa':'confirm','JsYNa':'capture','UZyyZ':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','eGTWA':'user_declined','NOIZv':function(_0x20cd89,_0x1dde6b){return _0x20cd89+_0x1dde6b;},'YUgLh':function(_0x5b368c,_0x148cb8,_0x220034,_0x12f550){return _0x5b368c(_0x148cb8,_0x220034,_0x12f550);},'rHEvH':function(_0x2ded60,_0x53bc0e){return _0x2ded60===_0x53bc0e;},'CFzVe':function(_0x5a0a59,_0x2becf2,_0x5bba0d){return _0x5a0a59(_0x2becf2,_0x5bba0d);},'eJhfM':function(_0x1fda23,_0x4ea5b6){return _0x1fda23>_0x4ea5b6;}};if(!_0x5a4cd7[_0x224aae(0xec)]){const {capture:_0x3917d3}=await _0x44c9a0['prompt']([{'type':_0x122566['gEqWa'],'name':_0x122566['JsYNa'],'message':_0x122566['UZyyZ'],'default':!![]}]);if(!_0x3917d3)return _0x75abc1?.[_0x224aae(0xa7)](_0x224aae(0xa8),{'reason':_0x122566[_0x224aae(0xcb)],'profileName':_0x225c34}),console['error'](_0x122566[_0x224aae(0x7f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x2d39f3={};if(_0x5a4cd7[_0x224aae(0x9c)])for(const _0xb43326 of _0x5a4cd7[_0x224aae(0x9c)]){const _0x4ac1d7=_0xb43326[_0x224aae(0xac)](':');if(_0x4ac1d7===-0x1)continue;_0x2d39f3[_0xb43326[_0x224aae(0x82)](0x0,_0x4ac1d7)['trim']()]=_0xb43326['slice'](_0x4ac1d7+0x1)[_0x224aae(0xdb)]();}const _0x456742={'baseUrl':_0x4a93a3};Object[_0x224aae(0x86)](_0x2d39f3)[_0x224aae(0x7a)]>0x0&&(_0x456742[_0x224aae(0xd4)]=_0x2d39f3);let _0x3d8630;try{_0x3d8630=await _0x122566['YUgLh'](createCloudProfile,_0x225c34,undefined,{'settings':_0x456742}),warnCloudProfileSharedInOrg();}catch(_0x28cf7f){_0x28cf7f instanceof ApiError&&_0x122566[_0x224aae(0xae)](_0x28cf7f['status'],0x199)&&console['error'](_0x122566['NOIZv'](_0x224aae(0xa4)+_0x225c34+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x225c34));throw _0x28cf7f;}return await _0x122566['CFzVe'](manualBrowserLogin,_0x3d8630,{'key':'','domains':[_0x4a93a3],'setupHeaders':_0x122566['eJhfM'](Object['keys'](_0x2d39f3)[_0x224aae(0x7a)],0x0)?_0x2d39f3:undefined}),console[_0x224aae(0x7e)]('\x0a✓\x20Profile\x20\x27'+_0x225c34+_0x224aae(0xe4)+(_0x224aae(0xd1)+_0x225c34)),await sweepOrphansBestEffort(_0x225c34),_0x75abc1?.['trackPhaseEnd'](_0x224aae(0xc0),{'envKey':null,'profileName':_0x225c34}),!![];}export async function addEnv(_0x5e8845,_0x3123d5={},_0x4b0e09){const _0x1f79da=_0x18c33c,_0x1a2158={'HFxDS':function(_0x1ae53a,_0x2bdb45){return _0x1ae53a+_0x2bdb45;},'dVCox':function(_0x494063,_0xc1763b){return _0x494063+_0xc1763b;},'NDwTh':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ImtCp':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','wCyts':function(_0x548ea8,_0x1bc251){return _0x548ea8===_0x1bc251;},'YqBwE':_0x1f79da(0xbb),'rinWG':_0x1f79da(0xc1),'zJkaL':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','tcCvl':function(_0x1958ec,_0x25ae49){return _0x1958ec(_0x25ae49);},'uLapI':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','LUost':function(_0x314326,_0x597285){return _0x314326>_0x597285;},'vMiAW':'cdpEndpoint','TSpXX':function(_0x541d67,_0x214cc3){return _0x541d67(_0x214cc3);},'tCdaZ':function(_0x580030,_0x5c698c,_0x46ffb1){return _0x580030(_0x5c698c,_0x46ffb1);},'BBiKh':_0x1f79da(0xc5),'dZmlt':_0x1f79da(0xce),'SEPGs':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','PQfUP':'action','zQDVT':_0x1f79da(0xd6),'kmUTK':'retry','XovCP':_0x1f79da(0xd5),'nBWOt':function(_0x58073b,_0xcdd50a){return _0x58073b(_0xcdd50a);},'uISnZ':function(_0x477658,_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf){return _0x477658(_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf);}};_0x3123d5['ci']&&(console['error'](_0x1a2158[_0x1f79da(0xaa)](_0x1a2158['HFxDS'](_0x1a2158['HFxDS'](_0x1a2158[_0x1f79da(0x7b)](_0x1a2158['HFxDS'](_0x1f79da(0xe9),'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+_0x1a2158['NDwTh'],'\x0a'),_0x1a2158[_0x1f79da(0xda)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x1f79da(0x92)](0x1));const _0x1764a0={};if(_0x3123d5['setupHeader'])for(const _0x252998 of _0x3123d5['setupHeader']){const _0x32d887=_0x252998['indexOf'](':');if(_0x1a2158['wCyts'](_0x32d887,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x252998+_0x1f79da(0x9d));const _0x56c9b2=_0x252998[_0x1f79da(0x82)](0x0,_0x32d887)[_0x1f79da(0xdb)](),_0x17170d=_0x252998['slice'](_0x32d887+0x1)[_0x1f79da(0xdb)]();_0x1764a0[_0x56c9b2]=_0x17170d;}if(_0x3123d5['cdpEndpoint']!==undefined&&_0x3123d5[_0x1f79da(0xab)][_0x1f79da(0xdb)]()==='')throw new Error(_0x1a2158[_0x1f79da(0xdf)]);if(_0x3123d5[_0x1f79da(0xab)]&&_0x3123d5['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x3123d5['authEnv']&&_0x3123d5[_0x1f79da(0x94)])throw new Error(_0x1a2158[_0x1f79da(0x87)]);if(_0x3123d5['authEnv']&&_0x3123d5['cdpEndpoint'])throw new Error(_0x1a2158['zJkaL']);const _0x3d559f=_0x1a2158['tcCvl'](Boolean,_0x3123d5[_0x1f79da(0xab)]),_0x49190f=isInteractive();if(!_0x49190f&&!_0x3123d5[_0x1f79da(0xb2)]&&!_0x3d559f&&!_0x3123d5['skipAuth'])throw new Error(_0x1f79da(0xb8));if(_0x3d559f){const _0x49139=_0x3123d5[_0x1f79da(0xab)];console['log'](_0x1a2158[_0x1f79da(0x8b)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x49139);const _0x41053f={'cdpEndpoint':_0x49139,'isElectron':!![]};_0x1a2158['LUost'](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x41053f['setupHeaders']=_0x1764a0);await createUnconfiguredCloudProfile(_0x5e8845,_0x41053f);try{setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1a2158['vMiAW'],_0x49139),setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1f79da(0xea),!![]);}catch(_0x248338){console[_0x1f79da(0xcd)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x248338 instanceof Error?_0x248338[_0x1f79da(0xa0)]:String(_0x248338)));}console[_0x1f79da(0x7e)](_0x1f79da(0xdc)+_0x5e8845+_0x1f79da(0x8f)),await sweepOrphansBestEffort(_0x5e8845),await _0x1a2158['TSpXX'](markActive,_0x5e8845);return;}if(_0x3123d5[_0x1f79da(0x94)]){const _0x50ce4c={};_0x3123d5[_0x1f79da(0xb2)]&&(_0x50ce4c[_0x1f79da(0xce)]=_0x3123d5['url']);_0x1a2158[_0x1f79da(0xf0)](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x50ce4c['setupHeaders']=_0x1764a0);await _0x1a2158['tCdaZ'](createUnconfiguredCloudProfile,_0x5e8845,_0x50ce4c),console['log'](_0x1a2158['dVCox']('✓\x20Profile\x20\x27'+_0x5e8845+_0x1f79da(0xf5),'\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5e8845+_0x1f79da(0xf7))),await _0x1a2158[_0x1f79da(0x97)](sweepOrphansBestEffort,_0x5e8845),await markActive(_0x5e8845);return;}if(_0x3123d5['url']){const _0x278f7f=_0x3123d5[_0x1f79da(0xb2)],_0x573fca=await _0x1a2158['TSpXX'](checkUrlReachability,_0x278f7f);if(!_0x573fca['ok']&&!_0x3123d5[_0x1f79da(0x7d)])throw new Error('Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca[_0x1f79da(0xcd)]+_0x1f79da(0xd8));!_0x573fca['ok']&&_0x3123d5[_0x1f79da(0x7d)]&&console[_0x1f79da(0x7e)]('⚠\x20Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca['error']+_0x1f79da(0xed));}else{console[_0x1f79da(0x7e)](_0x1f79da(0x9e)),console[_0x1f79da(0x7e)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x1f79da(0x7e)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5675dd='',_0x54bb74=![];while(!![]){const _0x1c3f22=await _0x44c9a0['prompt']([{'type':_0x1a2158[_0x1f79da(0xf1)],'name':_0x1a2158[_0x1f79da(0xa9)],'message':_0x54bb74?_0x1f79da(0xe7):_0x1a2158['SEPGs'],'default':_0x5675dd||_0x1f79da(0x93)}]);_0x5675dd=_0x1c3f22['baseUrl'];const _0x11043f=await _0x1a2158['TSpXX'](checkUrlReachability,_0x5675dd);if(_0x11043f['ok'])break;const _0x204ee2=/^[a-zA-Z][\w+.-]*:\/\//[_0x1f79da(0xde)](_0x5675dd),_0x51e4e4=_0x11043f[_0x1f79da(0xb4)]&&!_0x204ee2,_0x515291=_0x51e4e4?'http://'+_0x5675dd:null;_0x54bb74=!![],console[_0x1f79da(0x7e)](_0x1f79da(0xb7)+_0x5675dd+':\x20'+_0x11043f['error']);_0x515291&&console[_0x1f79da(0x7e)](_0x1f79da(0x9b)+_0x515291+'?');const {action:_0x365bed}=await _0x44c9a0['prompt']([{'type':_0x1f79da(0xf4),'name':_0x1a2158[_0x1f79da(0xf6)],'message':_0x1f79da(0xef),'choices':[..._0x515291?[{'name':'Use\x20'+_0x515291,'value':_0x1a2158[_0x1f79da(0xcc)]}]:[],{'name':_0x1f79da(0xd2),'value':_0x1a2158[_0x1f79da(0xbc)]},{'name':'Continue\x20anyway','value':_0x1a2158['XovCP']}]}]);if(_0x365bed===_0x1a2158[_0x1f79da(0xcc)]&&_0x515291){_0x5675dd=_0x515291;const _0x46fadc=await _0x1a2158[_0x1f79da(0xba)](checkUrlReachability,_0x5675dd);if(_0x46fadc['ok'])break;console[_0x1f79da(0x7e)](_0x1f79da(0xdd)+_0x5675dd+':\x20'+_0x46fadc[_0x1f79da(0xcd)]);}else{if(_0x365bed===_0x1a2158[_0x1f79da(0x89)])break;}}_0x3123d5={..._0x3123d5,'url':_0x5675dd};}let _0x21503c=![];try{_0x21503c=await _0x1a2158['uISnZ'](tryAutoRouteCloudProfile,_0x5e8845,_0x3123d5['url'],_0x3123d5,_0x49190f,_0x4b0e09);}catch(_0xc84b27){console['error'](_0x1f79da(0xe6)+_0x5e8845+_0x1f79da(0xd3)+(_0xc84b27 instanceof Error?_0xc84b27['message']:_0x1a2158[_0x1f79da(0x97)](String,_0xc84b27))),process['exit'](0x1);}!_0x21503c&&process[_0x1f79da(0x92)](0x1),await markActive(_0x5e8845);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c01fb,_0x36eaaf){var _0x2d4940=_0x1988,_0x5bbab3=_0x3c01fb();while(!![]){try{var _0x56f5c6=-parseInt(_0x2d4940(0x17e))/0x1+parseInt(_0x2d4940(0x17f))/0x2*(parseInt(_0x2d4940(0x17c))/0x3)+parseInt(_0x2d4940(0x182))/0x4*(parseInt(_0x2d4940(0x179))/0x5)+-parseInt(_0x2d4940(0x184))/0x6*(-parseInt(_0x2d4940(0x18a))/0x7)+-parseInt(_0x2d4940(0x180))/0x8+-parseInt(_0x2d4940(0x187))/0x9*(parseInt(_0x2d4940(0x17a))/0xa)+-parseInt(_0x2d4940(0x188))/0xb;if(_0x56f5c6===_0x36eaaf)break;else _0x5bbab3['push'](_0x5bbab3['shift']());}catch(_0x40679a){_0x5bbab3['push'](_0x5bbab3['shift']());}}}(_0x36d7,0x3c5ff));function _0x1988(_0x5cf506,_0x447387){_0x5cf506=_0x5cf506-0x179;var _0x36d7f9=_0x36d7();var _0x1988e5=_0x36d7f9[_0x5cf506];return _0x1988e5;}function _0x36d7(){var _0x3b9ba6=['3991504GCgOKJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6937pGEoig','15bJSqEV','30SbqVsl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','777EFaOzU','WUmKX','10146kkULCb','2570rJZkXQ','399528zFAcaW','error','378212VVOdNz','hcXRl','2124bREujn','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','TPvZi','891126izesLv'];_0x36d7=function(){return _0x3b9ba6;};return _0x36d7();}export async function authEncrypt(_0x213a0a){var _0x3b442c=_0x1988,_0x96229a={'WUmKX':function(_0x3d2905,_0x3d5866){return _0x3d2905+_0x3d5866;},'xYsxu':function(_0x270c45,_0x156ba1){return _0x270c45+_0x156ba1;},'hcXRl':function(_0x282000,_0x4fac23){return _0x282000+_0x4fac23;},'TPvZi':function(_0x4af8c1,_0x3dea15){return _0x4af8c1+_0x3dea15;},'tcwLW':_0x3b442c(0x189),'yfBbw':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x3b442c(0x181)](_0x96229a[_0x3b442c(0x17d)](_0x96229a['xYsxu'](_0x96229a[_0x3b442c(0x183)](_0x96229a[_0x3b442c(0x186)](_0x96229a['hcXRl'](_0x3b442c(0x17b),_0x3b442c(0x185)),'\x0a')+_0x96229a['tcwLW'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x96229a['yfBbw'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x562198=_0x19ea;(function(_0x3bc797,_0x4b42c8){const _0x5cbd66=_0x19ea,_0x9f4dbe=_0x3bc797();while(!![]){try{const _0x599ed0=-parseInt(_0x5cbd66(0xfa))/0x1*(-parseInt(_0x5cbd66(0xea))/0x2)+-parseInt(_0x5cbd66(0xef))/0x3+parseInt(_0x5cbd66(0xf6))/0x4*(parseInt(_0x5cbd66(0x10a))/0x5)+parseInt(_0x5cbd66(0xf2))/0x6*(parseInt(_0x5cbd66(0x101))/0x7)+-parseInt(_0x5cbd66(0xeb))/0x8+parseInt(_0x5cbd66(0x10b))/0x9*(parseInt(_0x5cbd66(0x102))/0xa)+parseInt(_0x5cbd66(0xee))/0xb*(-parseInt(_0x5cbd66(0xf3))/0xc);if(_0x599ed0===_0x4b42c8)break;else _0x9f4dbe['push'](_0x9f4dbe['shift']());}catch(_0x382f3f){_0x9f4dbe['push'](_0x9f4dbe['shift']());}}}(_0x23ce,0xaec82));import{rm,readFile,writeFile}from'fs/promises';function _0x19ea(_0x1b6920,_0x2ddaab){_0x1b6920=_0x1b6920-0xde;const _0x23ce58=_0x23ce();let _0x19ead0=_0x23ce58[_0x1b6920];return _0x19ead0;}function _0x23ce(){const _0x4dac1b=['✓\x20Removed\x20stored\x20credentials','parse','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','BSHxD','✓\x20Removed\x20trailhead\x20marketplace','replace','xRczR','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','user','platform','pdLxA','utf-8','2vplnGe','10596392SnhXVl','jRfqy','--scope','33LXapIa','1981842DgKpDG','EqyOO','cRcPB','4686YSkyQG','1849452EYCRGB','rWGfI','tWGca','4184ZXCZQV','string','plugin','stringify','649429rvSwZZ','fJiWm','ZLjuZ','close','GAFge','RjLxj','@ranger-testing/opencode-plugin','4739GRQdFz','213260vByKCF','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','ignore','VuQVx','project','✓\x20Removed\x20.ranger/\x20directory','GvAda','GTDHT','3985zHKsvc','486yDissN','gVABw','pNQTD','LUVbG','XWWrR','feature-tracker','log','error','e2e-test-recommender'];_0x23ce=function(){return _0x4dac1b;};return _0x23ce();}import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x562198(0x110),'bug-bash',_0x562198(0x113)],opencodePluginName=_0x562198(0x100);function parseJsonc(_0x31008a){const _0x46343f=_0x562198,_0x425663=_0x31008a['replace'](/\/\*[\s\S]*?\*\//g,''),_0x53f50=_0x425663['replace'](/^\s*\/\/.*$/gm,''),_0x500c1f=_0x53f50[_0x46343f(0xe3)](/,\s*([}\]])/g,'$1');return JSON[_0x46343f(0xde)](_0x500c1f);}async function removeOpencodePluginConfig(_0xa4316a){const _0x12bc55=_0x562198,_0x3af322={'GvAda':_0x12bc55(0xf7),'qjjGZ':function(_0x4f45dc,_0x27b95d){return _0x4f45dc!==_0x27b95d;},'GAFge':function(_0x485ce1,_0x114e26){return _0x485ce1(_0x114e26);}};if(!existsSync(_0xa4316a))return![];let _0x26bf7f;try{const _0x436e0e=await readFile(_0xa4316a,_0x12bc55(0xe9));_0x26bf7f=_0x3af322[_0x12bc55(0xfe)](parseJsonc,_0x436e0e);}catch{return![];}const _0x2210c7=Array['isArray'](_0x26bf7f['plugin'])?_0x26bf7f[_0x12bc55(0xf8)]:[];if(_0x2210c7['length']===0x0)return![];const _0x2008e1=_0x2210c7['filter'](_0x1fa309=>{const _0x1c7e0f=_0x12bc55;if(typeof _0x1fa309!==_0x3af322[_0x1c7e0f(0x108)])return!![];return _0x3af322['qjjGZ'](_0x1fa309,opencodePluginName);});if(_0x2008e1['length']===_0x2210c7['length'])return![];return _0x2008e1['length']===0x0?delete _0x26bf7f[_0x12bc55(0xf8)]:_0x26bf7f[_0x12bc55(0xf8)]=_0x2008e1,await writeFile(_0xa4316a,JSON[_0x12bc55(0xf9)](_0x26bf7f,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x33c4c7){const _0xcab7c8=_0x562198,_0x56e10c={'VZVeb':'uninstall','GTDHT':'ranger@trailhead','GRNmW':_0xcab7c8(0xed),'WoKlM':_0xcab7c8(0xfd)};return new Promise(_0x3f6eda=>{const _0x24bea4=_0xcab7c8,_0x4bb28d={'Rlzpb':function(_0x57f41f,_0x446da0){return _0x57f41f(_0x446da0);},'KwihW':function(_0x47698c,_0x533ad6){return _0x47698c===_0x533ad6;}},_0x3c77d1=[_0x24bea4(0xf8),_0x56e10c['VZVeb'],_0x56e10c[_0x24bea4(0x109)]];_0x33c4c7&&_0x3c77d1['push'](_0x56e10c['GRNmW'],_0x33c4c7);const _0x5c4043=spawn('claude',_0x3c77d1,{'stdio':[_0x24bea4(0x104),'ignore','ignore'],'cwd':_0x33c4c7?getProjectRoot():undefined,'shell':process[_0x24bea4(0xe7)]==='win32'});_0x5c4043['on'](_0x56e10c['WoKlM'],_0x9aa182=>{_0x4bb28d['Rlzpb'](_0x3f6eda,_0x4bb28d['KwihW'](_0x9aa182,0x0));}),_0x5c4043['on']('error',()=>{_0x3f6eda(![]);});});}async function removeMarketplace(){const _0x250d64=_0x562198,_0x2d4659={'xQcWS':function(_0x1605a6,_0x41c975){return _0x1605a6(_0x41c975);},'zOsPa':'plugin','XWWrR':'remove','lXaiX':'trailhead','xRczR':_0x250d64(0x104),'fJiWm':_0x250d64(0xfd)};return new Promise(_0x4c9077=>{const _0x1b4555=_0x250d64,_0x714687=spawn('claude',[_0x2d4659['zOsPa'],'marketplace',_0x2d4659[_0x1b4555(0x10f)],_0x2d4659['lXaiX']],{'stdio':[_0x2d4659['xRczR'],_0x1b4555(0x104),_0x2d4659[_0x1b4555(0xe4)]],'shell':process['platform']==='win32'});_0x714687['on'](_0x2d4659[_0x1b4555(0xfb)],_0x4281e3=>{_0x4c9077(_0x4281e3===0x0);}),_0x714687['on'](_0x1b4555(0x112),()=>{_0x2d4659['xQcWS'](_0x4c9077,![]);});});}export async function clean(){const _0xacf4da=_0x562198,_0x4721ff={'EqyOO':_0xacf4da(0x103),'gVABw':function(_0x53922d){return _0x53922d();},'LUVbG':_0xacf4da(0x114),'pNQTD':function(_0x383888){return _0x383888();},'jnNqh':function(_0x1816a6,_0x427a0d,_0x28fcfb){return _0x1816a6(_0x427a0d,_0x28fcfb);},'ZLjuZ':function(_0x5b5005){return _0x5b5005();},'gERpV':function(_0x961786,_0x3b74d3,_0x49a677){return _0x961786(_0x3b74d3,_0x49a677);},'pdLxA':function(_0xb5f289){return _0xb5f289();},'VuQVx':function(_0x106079,_0x34ed9a){return _0x106079(_0x34ed9a);},'rWGfI':function(_0x4aef6b,_0x1a4723,_0x570b7b){return _0x4aef6b(_0x1a4723,_0x570b7b);},'cRcPB':_0xacf4da(0xe6),'RjLxj':'opencode.json','PSXMH':_0xacf4da(0xe5),'jRfqy':function(_0x24e8aa,_0x24e184,_0x361349){return _0x24e8aa(_0x24e184,_0x361349);},'fGBvC':_0xacf4da(0xe0),'BSHxD':function(_0x5c17b6,_0x50e4bd){return _0x5c17b6(_0x50e4bd);},'tWGca':_0xacf4da(0xe2),'GjSHO':'\x0a✅\x20Cleanup\x20complete!\x0a'};console['log'](_0x4721ff[_0xacf4da(0xf0)]);let _0x1aa5ac=![];try{await _0x4721ff[_0xacf4da(0x10c)](deleteAllCredentials),console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0x10e)]),_0x1aa5ac=!![];}catch{}const _0x5d21a1=_0x4721ff['gVABw'](getCacheFile);existsSync(_0x5d21a1)&&(await rm(_0x5d21a1),_0x1aa5ac=!![]);const _0x55f75d=_0x4721ff[_0xacf4da(0x10d)](getRangerDir);existsSync(_0x55f75d)&&(await _0x4721ff['jnNqh'](rm,_0x55f75d,{'recursive':!![]}),console['log'](_0xacf4da(0x107)),_0x1aa5ac=!![]);const _0x244702=_0x4721ff[_0xacf4da(0xfc)](getProjectSkillsDir);for(const _0x248b45 of skillsToRemove){const _0xb31d86=join(_0x244702,_0x248b45);existsSync(_0xb31d86)&&(await _0x4721ff['gERpV'](rm,_0xb31d86,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x248b45),_0x1aa5ac=!![]);}const _0x1d2983=_0x4721ff[_0xacf4da(0xe8)](getUserSkillsDir);for(const _0x5500bb of skillsToRemove){const _0x480a5f=join(_0x1d2983,_0x5500bb);_0x4721ff['VuQVx'](existsSync,_0x480a5f)&&(await rm(_0x480a5f,{'recursive':!![]}),console[_0xacf4da(0x111)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5500bb),_0x1aa5ac=!![]);}const _0x2a423b=getOpencodeSkillsDir(_0xacf4da(0x106));for(const _0x1a0a08 of skillsToRemove){const _0x47e203=_0x4721ff['rWGfI'](join,_0x2a423b,_0x1a0a08);existsSync(_0x47e203)&&(await _0x4721ff['gERpV'](rm,_0x47e203,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1a0a08),_0x1aa5ac=!![]);}const _0x5640c0=getOpencodeSkillsDir(_0x4721ff[_0xacf4da(0xf1)]);for(const _0x1f0f77 of skillsToRemove){const _0x2fdb9e=_0x4721ff[_0xacf4da(0xf4)](join,_0x5640c0,_0x1f0f77);_0x4721ff[_0xacf4da(0x105)](existsSync,_0x2fdb9e)&&(await rm(_0x2fdb9e,{'recursive':!![]}),console[_0xacf4da(0x111)](_0xacf4da(0xdf)+_0x1f0f77),_0x1aa5ac=!![]);}const _0x2f5a48=join(getOpencodeConfigDir('project'),_0x4721ff[_0xacf4da(0xff)]);await removeOpencodePluginConfig(_0x2f5a48)&&(console['log'](_0x4721ff['PSXMH']),_0x1aa5ac=!![]);const _0x104f7d=_0x4721ff[_0xacf4da(0xec)](join,_0x4721ff['VuQVx'](getOpencodeConfigDir,_0x4721ff['cRcPB']),_0x4721ff['RjLxj']);await _0x4721ff[_0xacf4da(0x105)](removeOpencodePluginConfig,_0x104f7d)&&(console[_0xacf4da(0x111)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x1aa5ac=!![]);const _0x31e5d4=await uninstallClaudePlugin();_0x31e5d4&&(console[_0xacf4da(0x111)](_0x4721ff['fGBvC']),_0x1aa5ac=!![]);const _0x543106=await _0x4721ff[_0xacf4da(0xe1)](uninstallClaudePlugin,_0xacf4da(0x106));_0x543106&&(console[_0xacf4da(0x111)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x1aa5ac=!![]);const _0x38556e=await removeMarketplace();_0x38556e&&(console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0xf5)]),_0x1aa5ac=!![]),_0x1aa5ac?console['log'](_0x4721ff['GjSHO']):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x59d069=_0x2e89;function _0x2e89(_0x29e18c,_0x5e5d40){_0x29e18c=_0x29e18c-0x12c;const _0x213c2e=_0x213c();let _0x2e891f=_0x213c2e[_0x29e18c];return _0x2e891f;}(function(_0xc47005,_0x1102c8){const _0x45f7fa=_0x2e89,_0x19828b=_0xc47005();while(!![]){try{const _0x5972f6=parseInt(_0x45f7fa(0x13a))/0x1*(parseInt(_0x45f7fa(0x15a))/0x2)+parseInt(_0x45f7fa(0x143))/0x3*(-parseInt(_0x45f7fa(0x134))/0x4)+-parseInt(_0x45f7fa(0x148))/0x5*(parseInt(_0x45f7fa(0x152))/0x6)+-parseInt(_0x45f7fa(0x157))/0x7+parseInt(_0x45f7fa(0x151))/0x8+parseInt(_0x45f7fa(0x15f))/0x9+parseInt(_0x45f7fa(0x153))/0xa;if(_0x5972f6===_0x1102c8)break;else _0x19828b['push'](_0x19828b['shift']());}catch(_0x1e2fba){_0x19828b['push'](_0x19828b['shift']());}}}(_0x213c,0xc004c));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x213c(){const _0x4306ad=['5298704SaTVUB','329694lNjuZG','13021030sUVefq','YEzEd','keys','stringify','1903853bzJzTg','Key\x20\x22','gvbJz','136mqDzZO','undefined','cloud','fKwQd','NqAjP','3818016toLPFT','rsKyP','cqKVL','true','Removed\x20','(not\x20set)','tIKsT','log','HfgXo','\x20=\x20','Cleared\x20local\x20overrides\x20for\x20\x22','alsoExistsElsewhere','bQQLt','68iAjBnB','ctwSu','Invalid\x20value\x20for\x20','ZYjbA','isSafeInteger','ichAt','6565pLRVIz','test','No\x20configuration\x20set\x20for\x20\x22','FXdhE','false','headless','null','includes','kind','90489stIdOR','isNaN','\x20for\x20\x22','QDggf','EjFXx','115fJWTYD','sdLvW','\x20\x20Note:\x20\x22','PreBI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','XCdyA','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','forceLogin','iSQAQ'];_0x213c=function(){return _0x4306ad;};return _0x213c();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x59d069(0x13f),'allowInsecureLocalhost',_0x59d069(0x14f)];function parseLocalValue(_0x50e7fa,_0x26a0c6){const _0x2e4baa=_0x59d069;if(BOOLEAN_KEYS[_0x2e4baa(0x141)](_0x50e7fa)){if(_0x26a0c6===_0x2e4baa(0x162))return!![];if(_0x26a0c6===_0x2e4baa(0x13e))return![];throw new Error(_0x2e4baa(0x136)+_0x50e7fa+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x26a0c6;}function parseOverrideValue(_0x3c1c42){const _0x497f9f=_0x59d069,_0x1068b8={'ctwSu':function(_0x4d7bc6,_0x167139){return _0x4d7bc6===_0x167139;},'OQPLK':function(_0x3a78b2,_0x1a6adb){return _0x3a78b2===_0x1a6adb;},'bQQLt':function(_0x1032bf,_0x1304f5){return _0x1032bf(_0x1304f5);}};if(_0x1068b8['ctwSu'](_0x3c1c42,'true'))return!![];if(_0x1068b8[_0x497f9f(0x135)](_0x3c1c42,_0x497f9f(0x13e)))return![];if(_0x1068b8['OQPLK'](_0x3c1c42,_0x497f9f(0x140)))return null;if(_0x3c1c42===_0x497f9f(0x15b))return undefined;if(/^-?\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x381977=Number(_0x3c1c42);if(Number[_0x497f9f(0x138)](_0x381977))return _0x381977;}if(/^-?\d+\.\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x443273=_0x1068b8[_0x497f9f(0x133)](Number,_0x3c1c42);if(!Number[_0x497f9f(0x144)](_0x443273))return _0x443273;}const _0xfbace2=_0x3c1c42['trim']();if(_0xfbace2['startsWith']('{')&&_0xfbace2['endsWith']('}')||_0xfbace2['startsWith']('[')&&_0xfbace2['endsWith'](']'))try{return JSON['parse'](_0xfbace2);}catch{}return _0x3c1c42;}async function resolveProfileTarget(_0x5a7c9f){const _0x57f706=_0x59d069,_0x32f045={'iSQAQ':function(_0x3ced10,_0x3475c9){return _0x3ced10(_0x3475c9);},'mpdwR':function(_0x35c11f,_0xd709de){return _0x35c11f(_0xd709de);},'SXCUe':'cloud'},_0x137230=_0x32f045[_0x57f706(0x150)](existsSync,_0x32f045['mpdwR'](getEnvDir,_0x5a7c9f));let _0x1c3c83=![];try{const _0x157724=await fetchCloudProfile(_0x5a7c9f);_0x1c3c83=Boolean(_0x157724);}catch{}if(_0x1c3c83)return{'kind':_0x32f045['SXCUe'],'alsoExistsElsewhere':_0x137230};if(_0x137230)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5a7c9f+_0x57f706(0x14c)+_0x5a7c9f);}function printDualExistsHint(_0x1102d6){const _0x32bb6e=_0x59d069;console['log'](_0x32bb6e(0x14a)+_0x1102d6+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3b6430){const _0x41f55a=_0x59d069,_0x1e074e={'FXdhE':function(_0x19eb20,_0x52cd20){return _0x19eb20(_0x52cd20);},'iFlOb':function(_0x37ed51){return _0x37ed51();},'QDggf':function(_0x39601,_0x164f72){return _0x39601??_0x164f72;}},_0xde29a9=await _0x1e074e[_0x41f55a(0x13d)](fetchCloudProfile,_0x3b6430),_0x1033c4=readProfileOverrides(_0x1e074e['iFlOb'](getProjectPath),_0x3b6430);return mergeCloudProfileSettings(_0xde29a9?.['settings']??{},_0x1e074e[_0x41f55a(0x146)](_0x1033c4,undefined));}export async function configSet(_0x42f3b8,_0x39bc22,_0x13b92c){const _0x3f7414=_0x59d069,_0x4497d7={'YEzEd':function(_0x31fd31,_0x366542){return _0x31fd31(_0x366542);},'EjFXx':function(_0x49e179,_0xd4f559){return _0x49e179===_0xd4f559;},'tIKsT':function(_0x36c1e1,_0x221590){return _0x36c1e1(_0x221590);},'sdLvW':function(_0x1e8b2a){return _0x1e8b2a();},'PreBI':function(_0x731072,_0x365fae,_0x2258fc){return _0x731072(_0x365fae,_0x2258fc);}},_0x35b38a=await _0x4497d7[_0x3f7414(0x154)](resolveProfileTarget,_0x42f3b8);if(_0x4497d7[_0x3f7414(0x147)](_0x35b38a['kind'],'cloud')){if(_0x35b38a['alsoExistsElsewhere'])printDualExistsHint(_0x42f3b8);const _0x2543a6=_0x4497d7[_0x3f7414(0x12d)](parseOverrideValue,_0x13b92c);setProfileOverride(_0x4497d7[_0x3f7414(0x149)](getProjectPath),_0x42f3b8,_0x39bc22,_0x2543a6),console[_0x3f7414(0x12e)]('Set\x20'+_0x39bc22+_0x3f7414(0x130)+JSON['stringify'](_0x2543a6)+'\x20for\x20\x22'+_0x42f3b8+'\x22');return;}const _0x1c9f1b=_0x4497d7[_0x3f7414(0x14b)](parseLocalValue,_0x39bc22,_0x13b92c);setProfileOverride(_0x4497d7['sdLvW'](getProjectPath),_0x42f3b8,_0x39bc22,_0x1c9f1b),console['log']('Set\x20'+_0x39bc22+'\x20=\x20'+_0x1c9f1b+_0x3f7414(0x145)+_0x42f3b8+'\x22');}export async function configGet(_0x5ac288,_0x3ae5a4){const _0x42c701=_0x59d069,_0x5e861c={'FEdKV':function(_0x1fadd2,_0xc08e71){return _0x1fadd2(_0xc08e71);},'JMuwr':_0x42c701(0x15c),'NqAjP':function(_0x648ce2,_0x22d602,_0x38d156){return _0x648ce2(_0x22d602,_0x38d156);},'HfgXo':function(_0x59cc24,_0x5f54cb){return _0x59cc24===_0x5f54cb;},'fKwQd':'object'},_0x4c85be=await _0x5e861c['FEdKV'](resolveProfileTarget,_0x5ac288);if(_0x4c85be['kind']===_0x5e861c['JMuwr']){const _0x2f7130=await loadEffectiveCloudSettings(_0x5ac288),_0x4f1c3b=_0x5e861c[_0x42c701(0x15e)](getNestedValue,_0x2f7130,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x4f1c3b,undefined))console['log'](_0x42c701(0x12c));else _0x5e861c[_0x42c701(0x12f)](typeof _0x4f1c3b,_0x5e861c[_0x42c701(0x15d)])?console['log'](JSON['stringify'](_0x4f1c3b,null,0x2)):console[_0x42c701(0x12e)](_0x4f1c3b);return;}const _0x5f215d=await loadSettings(_0x5ac288),_0x1da07a=getNestedValue(_0x5f215d,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x1da07a,undefined))console['log'](_0x42c701(0x12c));else typeof _0x1da07a==='object'?console['log'](JSON[_0x42c701(0x156)](_0x1da07a,null,0x2)):console[_0x42c701(0x12e)](_0x1da07a);}export async function configList(_0x1773a5){const _0x479856=_0x59d069,_0x18084f={'ichAt':function(_0x4b64e2,_0x149c6f){return _0x4b64e2(_0x149c6f);},'cqKVL':'cloud','gvbJz':function(_0x4638b6,_0x46b1f5){return _0x4638b6(_0x46b1f5);},'FHrAW':function(_0x282d48,_0x4cd596){return _0x282d48(_0x4cd596);}},_0x45bb6e=await _0x18084f[_0x479856(0x139)](resolveProfileTarget,_0x1773a5);if(_0x45bb6e[_0x479856(0x142)]===_0x18084f[_0x479856(0x161)]){const _0x557b46=await loadEffectiveCloudSettings(_0x1773a5);if(!_0x557b46||Object[_0x479856(0x155)](_0x557b46)['length']===0x0){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}console['log'](JSON['stringify'](_0x557b46,null,0x2));return;}const _0x3eb336=getSettingsPath(_0x1773a5);if(!_0x18084f[_0x479856(0x159)](existsSync,_0x3eb336)){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}const _0x131653=await _0x18084f['FHrAW'](loadSettings,_0x1773a5),_0x46d1cc=formatSettings(_0x131653);!_0x46d1cc?console['log'](_0x479856(0x13c)+_0x1773a5+'\x22'):console['log'](_0x46d1cc);}export async function configUnset(_0x31ef6c,_0x3aa139){const _0x1c1753=_0x59d069,_0x356ae9={'uDBcx':function(_0x1a9a79,_0x3545d5){return _0x1a9a79(_0x3545d5);},'BomwP':function(_0x5bf314,_0x1d6145){return _0x5bf314===_0x1d6145;},'oPUmZ':'cloud','iBKhs':function(_0xe4c370){return _0xe4c370();},'ZYjbA':function(_0x548253,_0x4f39a9,_0x5e02a1,_0x864fb3){return _0x548253(_0x4f39a9,_0x5e02a1,_0x864fb3);},'rsKyP':function(_0x4fa473){return _0x4fa473();},'KwwYz':function(_0x24ddae,_0x367b79,_0x445cb6){return _0x24ddae(_0x367b79,_0x445cb6);}},_0x3a2582=await _0x356ae9['uDBcx'](resolveProfileTarget,_0x31ef6c);if(_0x356ae9['BomwP'](_0x3a2582[_0x1c1753(0x142)],_0x356ae9['oPUmZ'])){if(_0x3a2582[_0x1c1753(0x132)])printDualExistsHint(_0x31ef6c);const _0xd6b51c=unsetProfileOverride(_0x356ae9['iBKhs'](getProjectPath),_0x31ef6c,_0x3aa139);_0xd6b51c?console['log']('Removed\x20'+_0x3aa139+_0x1c1753(0x145)+_0x31ef6c+'\x22'):console[_0x1c1753(0x12e)]('Key\x20\x22'+_0x3aa139+'\x22\x20not\x20found');return;}const _0x243c1a=_0x356ae9[_0x1c1753(0x137)](unsetProfileOverride,_0x356ae9[_0x1c1753(0x160)](getProjectPath),_0x31ef6c,_0x3aa139);if(_0x243c1a){console['log'](_0x1c1753(0x163)+_0x3aa139);return;}const _0x35ec8e=await loadSettings(_0x31ef6c),_0x7f23ae=_0x356ae9['KwwYz'](deleteNestedValue,_0x35ec8e,_0x3aa139);_0x7f23ae?console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x31ef6c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20not\x20found');}export async function configReset(_0x4dc06f){const _0x24c204=_0x59d069,_0x4b1d3c={'zYPJX':function(_0x42d0c3,_0x3a6545){return _0x42d0c3===_0x3a6545;},'XCdyA':function(_0x5767e8){return _0x5767e8();}},_0x42e1c3=await resolveProfileTarget(_0x4dc06f);if(_0x4b1d3c['zYPJX'](_0x42e1c3[_0x24c204(0x142)],_0x24c204(0x15c))){resetProfileOverrides(_0x4b1d3c[_0x24c204(0x14d)](getProjectPath),_0x4dc06f),console[_0x24c204(0x12e)](_0x24c204(0x131)+_0x4dc06f+'\x22');return;}console['log']('\x22'+_0x4dc06f+_0x24c204(0x14e)+_0x4dc06f+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
(function(_0x51954d,_0x3a18ed){const _0x49c9f2=_0x5450,_0x5e3908=_0x51954d();while(!![]){try{const _0x50fa5b=-parseInt(_0x49c9f2(0x11e))/0x1+-parseInt(_0x49c9f2(0xfd))/0x2*(parseInt(_0x49c9f2(0x10c))/0x3)+parseInt(_0x49c9f2(0x10a))/0x4+-parseInt(_0x49c9f2(0x10e))/0x5*(parseInt(_0x49c9f2(0xfa))/0x6)+parseInt(_0x49c9f2(0x106))/0x7+-parseInt(_0x49c9f2(0x12b))/0x8*(-parseInt(_0x49c9f2(0x107))/0x9)+-parseInt(_0x49c9f2(0x12a))/0xa*(-parseInt(_0x49c9f2(0xfb))/0xb);if(_0x50fa5b===_0x3a18ed)break;else _0x5e3908['push'](_0x5e3908['shift']());}catch(_0x3f0d6c){_0x5e3908['push'](_0x5e3908['shift']());}}}(_0x2658,0x40ebb));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x278bc2,_0x3d7f8f){const _0x560944=_0x5450,_0x3b6839={'EZxxV':'false'};if(BOOLEAN_KEYS['includes'](_0x278bc2)){if(_0x3d7f8f===_0x560944(0x128))return!![];if(_0x3d7f8f===_0x3b6839['EZxxV'])return![];throw new Error(_0x560944(0x119)+_0x278bc2+_0x560944(0x117));}return _0x3d7f8f;}function parseOverrideValue(_0x17642d){const _0x35c2ca=_0x5450,_0x1d8178={'qKspA':function(_0x37f2da,_0x485905){return _0x37f2da===_0x485905;},'voVvA':_0x35c2ca(0x10b),'jsFIr':_0x35c2ca(0x11c),'pdBCM':function(_0x3c14d0,_0x3562e9){return _0x3c14d0(_0x3562e9);}};if(_0x17642d===_0x35c2ca(0x128))return!![];if(_0x1d8178[_0x35c2ca(0x12d)](_0x17642d,_0x1d8178['voVvA']))return![];if(_0x1d8178['qKspA'](_0x17642d,'null'))return null;if(_0x17642d===_0x1d8178[_0x35c2ca(0x132)])return undefined;if(/^-?\d+$/[_0x35c2ca(0x116)](_0x17642d)){const _0x3dd280=_0x1d8178[_0x35c2ca(0x112)](Number,_0x17642d);if(Number['isSafeInteger'](_0x3dd280))return _0x3dd280;}if(/^-?\d+\.\d+$/['test'](_0x17642d)){const _0x23c3ac=Number(_0x17642d);if(!Number['isNaN'](_0x23c3ac))return _0x23c3ac;}const _0x3c5a74=_0x17642d[_0x35c2ca(0x127)]();if(_0x3c5a74[_0x35c2ca(0x113)]('{')&&_0x3c5a74[_0x35c2ca(0x101)]('}')||_0x3c5a74['startsWith']('[')&&_0x3c5a74['endsWith'](']'))try{return JSON['parse'](_0x3c5a74);}catch{}return _0x17642d;}async function resolveProfileTarget(_0x3ba72d){const _0x50a76c=_0x5450,_0x63117={'gBznH':function(_0xe1f252,_0x44dc13){return _0xe1f252(_0x44dc13);},'oYdYJ':'cloud','zoInX':'local'},_0x1ca4a8=existsSync(_0x63117['gBznH'](getEnvDir,_0x3ba72d));let _0x40fc52=![];try{const _0x3edc25=await _0x63117['gBznH'](fetchCloudProfile,_0x3ba72d);_0x40fc52=_0x63117[_0x50a76c(0x122)](Boolean,_0x3edc25);}catch{}if(_0x40fc52)return{'kind':_0x63117[_0x50a76c(0xfc)],'alsoExistsElsewhere':_0x1ca4a8};if(_0x1ca4a8)return{'kind':_0x63117[_0x50a76c(0xf9)],'alsoExistsElsewhere':![]};throw new Error(_0x50a76c(0xff)+_0x3ba72d+_0x50a76c(0x11b)+_0x3ba72d);}function printDualExistsHint(_0x107836){const _0x282a9e=_0x5450;console[_0x282a9e(0x125)](_0x282a9e(0x103)+_0x107836+_0x282a9e(0x10d));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3e1ec2){const _0x3b9587=_0x5450,_0x5d0418={'HaYwr':function(_0x50f7d0,_0x28f676){return _0x50f7d0(_0x28f676);},'TKgZy':function(_0x1f2156,_0x3260db,_0x89fe4c){return _0x1f2156(_0x3260db,_0x89fe4c);},'fsWhK':function(_0x2fb4b3,_0x6ecad0){return _0x2fb4b3??_0x6ecad0;}},_0x28ce3f=await _0x5d0418[_0x3b9587(0xf8)](fetchCloudProfile,_0x3e1ec2),_0x1783c8=_0x5d0418['TKgZy'](readProfileOverrides,getProjectPath(),_0x3e1ec2);return mergeCloudProfileSettings(_0x28ce3f?.['settings']??{},_0x5d0418['fsWhK'](_0x1783c8,undefined));}export async function configSet(_0xf22639,_0x160d34,_0x5d170b){const _0x4e93c6=_0x5450,_0x53755d={'LWoec':function(_0x1e2c2e,_0x54813d){return _0x1e2c2e===_0x54813d;},'qWwZS':'cloud','HiVUF':function(_0x4ce920,_0x3f4049){return _0x4ce920(_0x3f4049);},'wbqtV':function(_0x1d73e5){return _0x1d73e5();},'hYXce':function(_0x63a0c5,_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9){return _0x63a0c5(_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9);},'fyLVF':function(_0x57e725){return _0x57e725();}},_0x22a905=await resolveProfileTarget(_0xf22639);if(_0x53755d[_0x4e93c6(0x129)](_0x22a905[_0x4e93c6(0x121)],_0x53755d[_0x4e93c6(0x105)])){if(_0x22a905['alsoExistsElsewhere'])_0x53755d[_0x4e93c6(0x133)](printDualExistsHint,_0xf22639);const _0x4792aa=parseOverrideValue(_0x5d170b);setProfileOverride(_0x53755d[_0x4e93c6(0x126)](getProjectPath),_0xf22639,_0x160d34,_0x4792aa),console['log']('Set\x20'+_0x160d34+_0x4e93c6(0x118)+JSON[_0x4e93c6(0x100)](_0x4792aa)+_0x4e93c6(0x123)+_0xf22639+'\x22');return;}const _0x712161=parseLocalValue(_0x160d34,_0x5d170b);_0x53755d[_0x4e93c6(0x11f)](setProfileOverride,_0x53755d[_0x4e93c6(0x111)](getProjectPath),_0xf22639,_0x160d34,_0x712161),console['log'](_0x4e93c6(0x108)+_0x160d34+_0x4e93c6(0x118)+_0x712161+_0x4e93c6(0x123)+_0xf22639+'\x22');}export async function configGet(_0x4edfd0,_0x52500c){const _0x1bfce7=_0x5450,_0x506211={'pEkPk':function(_0x4f04cc,_0x5c38c7){return _0x4f04cc===_0x5c38c7;},'BbQOI':function(_0x5abaf4,_0x2da7a0){return _0x5abaf4(_0x2da7a0);}},_0x1fe0d8=await resolveProfileTarget(_0x4edfd0);if(_0x506211[_0x1bfce7(0x115)](_0x1fe0d8['kind'],_0x1bfce7(0x104))){const _0x24b97f=await loadEffectiveCloudSettings(_0x4edfd0),_0x55a65c=getNestedValue(_0x24b97f,_0x52500c);if(_0x55a65c===undefined)console['log'](_0x1bfce7(0x130));else _0x506211[_0x1bfce7(0x115)](typeof _0x55a65c,'object')?console[_0x1bfce7(0x125)](JSON['stringify'](_0x55a65c,null,0x2)):console[_0x1bfce7(0x125)](_0x55a65c);return;}const _0x34607c=await _0x506211[_0x1bfce7(0x11a)](loadSettings,_0x4edfd0),_0x1d7ea5=getNestedValue(_0x34607c,_0x52500c);if(_0x1d7ea5===undefined)console['log'](_0x1bfce7(0x130));else _0x506211['pEkPk'](typeof _0x1d7ea5,_0x1bfce7(0x110))?console[_0x1bfce7(0x125)](JSON[_0x1bfce7(0x100)](_0x1d7ea5,null,0x2)):console['log'](_0x1d7ea5);}function _0x5450(_0x372a9c,_0x5b9d29){_0x372a9c=_0x372a9c-0xf8;const _0x2658ea=_0x2658();let _0x54502c=_0x2658ea[_0x372a9c];return _0x54502c;}export async function configList(_0x398b3c){const _0x2461ca=_0x5450,_0x29b1b7={'dfxbr':function(_0x35ce37,_0x37d74e){return _0x35ce37(_0x37d74e);}},_0x1e3471=await _0x29b1b7[_0x2461ca(0x10f)](resolveProfileTarget,_0x398b3c);if(_0x1e3471[_0x2461ca(0x121)]==='cloud'){const _0x4ad38e=await _0x29b1b7['dfxbr'](loadEffectiveCloudSettings,_0x398b3c);if(!_0x4ad38e||Object['keys'](_0x4ad38e)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x398b3c+'\x22');return;}console[_0x2461ca(0x125)](JSON[_0x2461ca(0x100)](_0x4ad38e,null,0x2));return;}const _0x1301cd=getSettingsPath(_0x398b3c);if(!existsSync(_0x1301cd)){console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22');return;}const _0x4bcfd8=await loadSettings(_0x398b3c),_0x59187b=formatSettings(_0x4bcfd8);!_0x59187b?console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22'):console['log'](_0x59187b);}function _0x2658(){const _0x419c95=['poggq','qKspA','ZihRi','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','(not\x20set)','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','jsFIr','HiVUF','HaYwr','zoInX','6agIKWr','60269RjqjLj','oYdYJ','509254daznxk','Removed\x20','Profile\x20\x22','stringify','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x20\x20Note:\x20\x22','cloud','qWwZS','2747066NtzLOZ','18AEYDra','Set\x20','alsoExistsElsewhere','1113076bGOGIJ','false','3COXmqa','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','588515dyPTON','dfxbr','object','fyLVF','pdBCM','startsWith','eMLEY','pEkPk','test',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','Invalid\x20value\x20for\x20','BbQOI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','undefined','No\x20configuration\x20set\x20for\x20\x22','89601sXykRI','hYXce','CorHW','kind','gBznH','\x20for\x20\x22','Key\x20\x22','log','wbqtV','trim','true','LWoec','30zkiCFM','162808kHIZeT'];_0x2658=function(){return _0x419c95;};return _0x2658();}export async function configUnset(_0x2b1bcb,_0xbb406c){const _0x49e38a=_0x5450,_0x4b889d={'poggq':function(_0x785e53,_0x190034){return _0x785e53===_0x190034;},'cnYZh':_0x49e38a(0x104),'CorHW':function(_0x3754e3,_0x41e803){return _0x3754e3(_0x41e803);},'ZihRi':function(_0x7f8d4c,_0x2eb407,_0x2b124b,_0x271c06){return _0x7f8d4c(_0x2eb407,_0x2b124b,_0x271c06);},'eMLEY':function(_0x3457d6,_0x585673,_0x39a23e){return _0x3457d6(_0x585673,_0x39a23e);}},_0x21e4fd=await resolveProfileTarget(_0x2b1bcb);if(_0x4b889d[_0x49e38a(0x12c)](_0x21e4fd['kind'],_0x4b889d['cnYZh'])){if(_0x21e4fd[_0x49e38a(0x109)])_0x4b889d[_0x49e38a(0x120)](printDualExistsHint,_0x2b1bcb);const _0x4ab226=_0x4b889d[_0x49e38a(0x12e)](unsetProfileOverride,getProjectPath(),_0x2b1bcb,_0xbb406c);_0x4ab226?console[_0x49e38a(0x125)]('Removed\x20'+_0xbb406c+'\x20for\x20\x22'+_0x2b1bcb+'\x22'):console[_0x49e38a(0x125)](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');return;}const _0x5dace2=unsetProfileOverride(getProjectPath(),_0x2b1bcb,_0xbb406c);if(_0x5dace2){console['log'](_0x49e38a(0xfe)+_0xbb406c);return;}const _0x5279c2=await loadSettings(_0x2b1bcb),_0xfd5b18=_0x4b889d[_0x49e38a(0x114)](deleteNestedValue,_0x5279c2,_0xbb406c);_0xfd5b18?console['log']('Key\x20\x22'+_0xbb406c+_0x49e38a(0x131)+_0x2b1bcb+_0x49e38a(0x102)):console['log'](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');}export async function configReset(_0x453178){const _0x1f3337=_0x5450,_0x518b22=await resolveProfileTarget(_0x453178);if(_0x518b22[_0x1f3337(0x121)]==='cloud'){resetProfileOverrides(getProjectPath(),_0x453178),console[_0x1f3337(0x125)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x453178+'\x22');return;}console[_0x1f3337(0x125)]('\x22'+_0x453178+_0x1f3337(0x12f)+_0x453178+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2451(){const _0x429ba2=['7Tgvfwc','\x22\x20for\x20everyone\x20in\x20your\x20organization.','48414ziruNi','4737978przuQJ','3071070eBsBVX','\x22\x20not\x20found.','33RiYNYd','confirmation','235769hcgjqU','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','24iOJZev','aIhCe','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','input','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','758585cTjRIv','Cloud\x20profile\x20\x22','80MAvztU','1658304xaCCcZ','4036144YCbSFq','cwd'];_0x2451=function(){return _0x429ba2;};return _0x2451();}(function(_0x5154ab,_0x3dc7eb){const _0x10e629=_0x40a1,_0x2e4ccc=_0x5154ab();while(!![]){try{const _0x34883a=-parseInt(_0x10e629(0x10f))/0x1+parseInt(_0x10e629(0x11b))/0x2+-parseInt(_0x10e629(0x120))/0x3*(parseInt(_0x10e629(0x11a))/0x4)+-parseInt(_0x10e629(0x118))/0x5*(parseInt(_0x10e629(0x111))/0x6)+-parseInt(_0x10e629(0x11e))/0x7*(parseInt(_0x10e629(0x11c))/0x8)+parseInt(_0x10e629(0x121))/0x9+parseInt(_0x10e629(0x10b))/0xa*(parseInt(_0x10e629(0x10d))/0xb);if(_0x34883a===_0x3dc7eb)break;else _0x2e4ccc['push'](_0x2e4ccc['shift']());}catch(_0xe041ae){_0x2e4ccc['push'](_0x2e4ccc['shift']());}}}(_0x2451,0x94318));import _0x2919b8 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x40a1(_0x3ba408,_0x3066c9){_0x3ba408=_0x3ba408-0x10b;const _0x245116=_0x2451();let _0x40a1ed=_0x245116[_0x3ba408];return _0x40a1ed;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x38f2c4,_0x2687ab={}){const _0x3e0b93=_0x40a1,_0x302584={'fVSzt':function(_0x3fbb1b){return _0x3fbb1b();},'RVzYN':_0x3e0b93(0x115),'aIhCe':_0x3e0b93(0x10e),'JHrRA':function(_0x4dcd34,_0x197882,_0x489f2c){return _0x4dcd34(_0x197882,_0x489f2c);}},_0x393452=await fetchCloudProfile(_0x38f2c4);if(!_0x393452)throw new Error(_0x3e0b93(0x119)+_0x38f2c4+_0x3e0b93(0x10c));if(!_0x2687ab['yes']&&!_0x302584['fVSzt'](isInteractive))throw new Error(_0x3e0b93(0x110));console['log'](_0x3e0b93(0x114)+_0x38f2c4+_0x3e0b93(0x11f));if(!_0x2687ab['yes']){const {confirmation:_0x1ff472}=await _0x2919b8['prompt']([{'type':_0x302584['RVzYN'],'name':_0x302584[_0x3e0b93(0x112)],'message':_0x3e0b93(0x116)+_0x38f2c4+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x1ff472!==_0x38f2c4)throw new Error(_0x3e0b93(0x113));}await deleteCloudProfile(_0x38f2c4),_0x302584['JHrRA'](resetProfileOverrides,process[_0x3e0b93(0x11d)](),_0x38f2c4),clearLastProfile(process['cwd'](),_0x38f2c4),console['log'](_0x3e0b93(0x117)+_0x38f2c4+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x30bb1f=_0x2d17;(function(_0x26bf2b,_0x3e324e){const _0x27d66c=_0x2d17,_0x199b0a=_0x26bf2b();while(!![]){try{const _0x3bbf22=-parseInt(_0x27d66c(0x126))/0x1*(-parseInt(_0x27d66c(0x132))/0x2)+parseInt(_0x27d66c(0x134))/0x3*(-parseInt(_0x27d66c(0x123))/0x4)+-parseInt(_0x27d66c(0x144))/0x5+parseInt(_0x27d66c(0x124))/0x6*(parseInt(_0x27d66c(0x11f))/0x7)+parseInt(_0x27d66c(0x11d))/0x8+parseInt(_0x27d66c(0x147))/0x9+parseInt(_0x27d66c(0x13a))/0xa*(parseInt(_0x27d66c(0x141))/0xb);if(_0x3bbf22===_0x3e324e)break;else _0x199b0a['push'](_0x199b0a['shift']());}catch(_0x4eba3c){_0x199b0a['push'](_0x199b0a['shift']());}}}(_0x462e,0xee21b));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x2d17(_0x54e261,_0x17ea76){_0x54e261=_0x54e261-0x11d;const _0x462e76=_0x462e();let _0x2d1742=_0x462e76[_0x54e261];return _0x2d1742;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x30bb1f(0x12e),'reports',_0x30bb1f(0x13b),'ci'];export function shouldGroupByEnvironment(_0x39808b){return _0x39808b['some'](_0x30a7df=>_0x30a7df['environmentKey']);}function _0x462e(){const _0x417b14=['\x0aLocal\x20Profiles\x20(legacy):','1994625AblFNr','pymSL','Run:\x20ranger\x20profile\x20add\x20<profile-name>','14978968RtgRkf','qgGFD','2507162ebHUVF','set','name','settings.json','24KUkdIr','6cbOJet','sessionUpdatedAt','2sBkOhS','\x0aCloud\x20Profiles:','\x0aCloud\x20Profiles\x20(by\x20environment):','qmmGG','TVKZb','no\x20session','log','BiyCN','bug-bashes','tnlgB','localeCompare','\x20\x20\x20\x20','1022396EEgoGe','message','919497oRehFA','RSJUz','includes','\x20\x20\x20\x20Session:\x20','environmentKey','xtNeR','10ylhbud','local','profiles','sort','isDirectory','length','JFZJu','5015516ECVXbE','get','map','5580665hcytUL','legacy'];_0x462e=function(){return _0x417b14;};return _0x462e();}export function groupCloudProfilesByEnvironment(_0x39f0a6){const _0x498419=_0x30bb1f,_0x109c93={'WsLcd':function(_0x4cf6c1,_0x1900e2){return _0x4cf6c1===_0x1900e2;}},_0x605950=new Map();for(const _0x18f7c6 of _0x39f0a6){const _0x41ccfa=_0x18f7c6[_0x498419(0x138)]??null,_0x3daf38=_0x605950['get'](_0x41ccfa);if(_0x3daf38)_0x3daf38['push'](_0x18f7c6);else _0x605950[_0x498419(0x120)](_0x41ccfa,[_0x18f7c6]);}const _0x5d5e81=[..._0x605950['keys']()][_0x498419(0x13d)]((_0x1b6b55,_0x3a4224)=>{if(_0x109c93['WsLcd'](_0x1b6b55,null))return 0x1;if(_0x109c93['WsLcd'](_0x3a4224,null))return-0x1;return _0x1b6b55['localeCompare'](_0x3a4224);});return _0x5d5e81[_0x498419(0x143)](_0x334306=>({'environmentKey':_0x334306,'profiles':_0x605950[_0x498419(0x142)](_0x334306)['sort']((_0x59aefb,_0x4fb2ec)=>_0x59aefb['name'][_0x498419(0x130)](_0x4fb2ec['name']))}));}export async function getEnvNames(){const _0x2e9989=_0x30bb1f,_0x4f5901={'aKGBT':function(_0x45bec4){return _0x45bec4();},'cfbXl':function(_0x16cedd,_0x3326c8){return _0x16cedd(_0x3326c8);},'JVcPS':_0x2e9989(0x13b),'qmmGG':function(_0x4ab9ee,_0x37f9cd){return _0x4ab9ee(_0x37f9cd);},'BiyCN':function(_0x3188d6,_0x5a34f8){return _0x3188d6(_0x5a34f8);},'jojtO':'.txt','JFZJu':function(_0x1dd44d,_0x467f3b,_0x217592){return _0x1dd44d(_0x467f3b,_0x217592);},'xtNeR':function(_0x5cfac5,_0x4a74b6){return _0x5cfac5(_0x4a74b6);},'riHWR':_0x2e9989(0x122),'EdDSA':_0x2e9989(0x145)},_0x11ab7c=getRangerDir();if(!existsSync(_0x11ab7c))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x176617=await _0x4f5901['aKGBT'](readActiveProfileName),_0x1b23d0=[],_0x13eb8c={},_0xa3c300=join(_0x11ab7c,_0x2e9989(0x13b));if(_0x4f5901['cfbXl'](existsSync,_0xa3c300)){const _0x4fef47=await readdir(_0xa3c300);for(const _0x270d16 of _0x4fef47){const _0x5202f8=join(_0xa3c300,_0x270d16),_0x39f142=await stat(_0x5202f8);_0x39f142['isDirectory']()&&(_0x1b23d0['push'](_0x270d16),_0x13eb8c[_0x270d16]=_0x4f5901['JVcPS']);}}const _0xca044a=join(_0x11ab7c,'ci');if(_0x4f5901['qmmGG'](existsSync,_0xca044a)){const _0x825a35=await _0x4f5901[_0x2e9989(0x129)](readdir,_0xca044a);for(const _0x1918a0 of _0x825a35){const _0x4ae8f7=join(_0xca044a,_0x1918a0),_0x25890f=await stat(_0x4ae8f7);_0x25890f['isDirectory']()&&(_0x1b23d0['push'](_0x1918a0),_0x13eb8c[_0x1918a0]='ci');}}const _0x35ca6e=await _0x4f5901[_0x2e9989(0x12d)](readdir,_0x11ab7c);for(const _0x1f3a9e of _0x35ca6e){if(NON_ENV_DIRS[_0x2e9989(0x136)](_0x1f3a9e))continue;if(_0x1f3a9e['startsWith']('.'))continue;if(_0x1f3a9e['endsWith'](_0x4f5901['jojtO']))continue;const _0x535c64=_0x4f5901[_0x2e9989(0x140)](join,_0x11ab7c,_0x1f3a9e),_0x4e8352=await _0x4f5901[_0x2e9989(0x139)](stat,_0x535c64);_0x4e8352[_0x2e9989(0x13e)]()&&existsSync(join(_0x535c64,_0x4f5901['riHWR']))&&(!_0x1b23d0['includes'](_0x1f3a9e)&&(_0x1b23d0['push'](_0x1f3a9e),_0x13eb8c[_0x1f3a9e]=_0x4f5901['EdDSA']));}return{'envNames':_0x1b23d0,'activeEnv':_0x176617,'envTypes':_0x13eb8c};}export async function envList(){const _0x33fd44=_0x30bb1f,_0x10dc64={'qgGFD':function(_0x22aa34,_0x2404fc){return _0x22aa34===_0x2404fc;},'pymSL':function(_0x4d43fc){return _0x4d43fc();},'lOvQB':function(_0x2c097e,_0x2372bc){return _0x2c097e instanceof _0x2372bc;},'TVKZb':function(_0x1a27b9,_0x21a698){return _0x1a27b9(_0x21a698);},'sfsUw':'\x0aNo\x20profiles\x20found.','RSJUz':_0x33fd44(0x149),'UrJuQ':_0x33fd44(0x13b),'tnlgB':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','bHYGo':_0x33fd44(0x131)},{envNames:_0x29c0a5,activeEnv:_0x2657a9,envTypes:_0x19365b}=await getEnvNames();let _0x2b0151=[];const _0x444829=await getToken();if(_0x444829)try{_0x2b0151=await _0x10dc64[_0x33fd44(0x148)](listCloudProfiles);}catch(_0x125deb){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x10dc64['lOvQB'](_0x125deb,Error)?_0x125deb[_0x33fd44(0x133)]:_0x10dc64[_0x33fd44(0x12a)](String,_0x125deb)));}if(_0x10dc64['qgGFD'](_0x29c0a5[_0x33fd44(0x13f)],0x0)&&_0x10dc64[_0x33fd44(0x11e)](_0x2b0151['length'],0x0)){console['log'](_0x10dc64['sfsUw']),console[_0x33fd44(0x12c)](_0x10dc64[_0x33fd44(0x135)]);return;}const _0x1e9ef1=new Set(_0x2b0151['map'](_0x387909=>_0x387909[_0x33fd44(0x121)]));if(_0x29c0a5[_0x33fd44(0x13f)]>0x0){console['log'](_0x33fd44(0x146));for(const _0x175916 of _0x29c0a5['sort']()){const _0x384b8e=_0x175916===_0x2657a9&&!_0x1e9ef1['has'](_0x175916),_0x444384=_0x19365b[_0x175916]||_0x10dc64['UrJuQ'],_0xc8a89f=await loadSettings(_0x175916),_0x42c2fb=_0x10dc64[_0x33fd44(0x11e)](_0x444384,'legacy')?'':'\x20['+_0x444384+']';console[_0x33fd44(0x12c)]('\x20\x20'+(_0x384b8e?'*\x20':'\x20\x20')+_0x175916+_0x42c2fb),_0xc8a89f['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xc8a89f['baseUrl']),_0xc8a89f['environmentDetails']&&console[_0x33fd44(0x12c)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xc8a89f['environmentDetails']);}}const _0x5c20a1=(_0x101624,_0x5e8632)=>{const _0x3072c1=_0x33fd44,_0x4d155f=_0x10dc64[_0x3072c1(0x11e)](_0x101624['name'],_0x2657a9),_0x126976=_0x101624[_0x3072c1(0x125)]?'cached\x20(updated\x20'+_0x101624[_0x3072c1(0x125)]+')':_0x3072c1(0x12b);console['log'](''+_0x5e8632+(_0x4d155f?'*\x20':'\x20\x20')+_0x101624[_0x3072c1(0x121)]),console['log'](_0x5e8632+_0x3072c1(0x137)+_0x126976);};if(_0x2b0151['length']>0x0){if(shouldGroupByEnvironment(_0x2b0151)){console['log'](_0x33fd44(0x128));for(const _0x44fdf7 of groupCloudProfilesByEnvironment(_0x2b0151)){const _0x2adb68=_0x44fdf7[_0x33fd44(0x138)]??_0x10dc64[_0x33fd44(0x12f)];console[_0x33fd44(0x12c)]('\x0a\x20\x20'+_0x2adb68);for(const _0x3aa9ba of _0x44fdf7[_0x33fd44(0x13c)]){_0x5c20a1(_0x3aa9ba,_0x10dc64['bHYGo']);}}}else{console[_0x33fd44(0x12c)](_0x33fd44(0x127));for(const _0x4e6056 of[..._0x2b0151]['sort']((_0x44a012,_0xb2f70b)=>_0x44a012['name'][_0x33fd44(0x130)](_0xb2f70b['name']))){_0x5c20a1(_0x4e6056,'\x20\x20');}}}_0x2657a9&&console['log']('\x0a*\x20=\x20active\x20profile');}
|