@ranger-testing/ranger-cli 3.1.6-alpha.4287155-52 → 3.1.6-alpha.aca5f9c-53
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/build/skills/ranger/SKILL.md +1 -0
- package/package.json +1 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ef848,_0x54fb6f){const _0x471b32=_0x267c,_0xe20aef=_0x2ef848();while(!![]){try{const _0x3011ff=parseInt(_0x471b32(0x91))/0x1*(parseInt(_0x471b32(0xb4))/0x2)+parseInt(_0x471b32(0x70))/0x3+parseInt(_0x471b32(0xd5))/0x4+-parseInt(_0x471b32(0x9f))/0x5*(-parseInt(_0x471b32(0xcf))/0x6)+-parseInt(_0x471b32(0x80))/0x7*(parseInt(_0x471b32(0xd8))/0x8)+-parseInt(_0x471b32(0xda))/0x9*(parseInt(_0x471b32(0xd1))/0xa)+-parseInt(_0x471b32(0x74))/0xb;if(_0x3011ff===_0x54fb6f)break;else _0xe20aef['push'](_0xe20aef['shift']());}catch(_0xb18f83){_0xe20aef['push'](_0xe20aef['shift']());}}}(_0x5281,0x682e6));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x24f4bb from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x5281(){const _0x558397=['2186244SEqMuv','\x20\x20Set\x20active\x20profile:\x20','trackPhaseEnd','startsWith','11636174SKhXXw','IPCGF',')\x0a\x20\x20Save\x20\x27','FcbJu','prompt','environments','PLSFw','manual','env','NODE_TLS_REJECT_UNAUTHORIZED','isProtocolError','EtgsQ','7XDOdej','local','rrtVt','yNUOt','DJIJT','FebZR','leGeZ','cdpEndpoint','\x27\x20created\x20(no\x20session).\x0a','signal','✓\x20Cloud\x20profile\x20\x27','ThAph','skipAuth','cwd','GkbSP','origin','lTyxr','340528VxPYNB','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','dKKXW','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','saveToCloud','Invalid\x20URL','BnaOk','`\x20again\x20without\x20--skip-auth.','user_declined','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','sNCLw','profile.add.autoRouted','\x27\x20matching\x20','log','495ZrYSZg','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','IyhUC','tQxRU','\x22\x20not\x20found.','error','abort','some','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','no_auth_config','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','retry','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','setupHeaders','DwQXL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','Cjuqh','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','trim','4ZPtpOx','test','sbSJB','gpZjm','fetch\x20failed','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','\x0a\x20\x20Auth\x20environment\x20\x22','Enter\x20a\x20different\x20URL','RUZSl','lxiIP','indexOf','LKBFZ','baseUrl','ZidiP','authEnv','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','url','continue','keys','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','TRcGd','fDmvv','isTTY','join','PTKpa','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','status','5190PurXHQ','uEnyk','42910dRtNff','setupHeader','iKkSR','length','1112972bQXvGZ','message','slice','2072680NIOsbh','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','63Vptwjh','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','TwMIb','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','dcaQO','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a\x20\x20(domains:\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','http://localhost:3000','aOlad','CLvRV','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x20--url\x20','ssfPY','RFWSa'];_0x5281=function(){return _0x558397;};return _0x5281();}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x1c9c49=_0x267c;if(!process['stdout'][_0x1c9c49(0xca)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}function _0x267c(_0xa89593,_0x6351dd){_0xa89593=_0xa89593-0x6c;const _0x52815a=_0x5281();let _0x267c38=_0x52815a[_0xa89593];return _0x267c38;}async function checkUrlReachability(_0x646e9a){const _0x4ad29c=_0x267c,_0x537c59={'rrtVt':function(_0x2f6ade,_0x20e0a4){return _0x2f6ade<_0x20e0a4;},'IPCGF':_0x4ad29c(0xb8)};try{const _0x553027=new AbortController(),_0x651c18=setTimeout(()=>_0x553027[_0x4ad29c(0xa5)](),0x1388),_0x3c80e6={'method':'HEAD','signal':_0x553027[_0x4ad29c(0x89)],'redirect':_0x4ad29c(0x7b)};/^https:\/\/localhost(:\d+)?/i[_0x4ad29c(0xb5)](_0x646e9a)&&(process[_0x4ad29c(0x7c)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x32c54b=await fetch(_0x646e9a,_0x3c80e6);delete process[_0x4ad29c(0x7c)][_0x4ad29c(0x7d)],clearTimeout(_0x651c18);if(_0x537c59[_0x4ad29c(0x82)](_0x32c54b['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x32c54b['status']};}catch(_0x265f0a){delete process[_0x4ad29c(0x7c)][_0x4ad29c(0x7d)];const _0x3187fb=_0x265f0a,_0x54883a=_0x3187fb[_0x4ad29c(0xd6)]||String(_0x265f0a),_0x3ca68c=_0x54883a['includes'](_0x4ad29c(0x96))||_0x3187fb['name']==='TypeError'||_0x54883a['includes'](_0x537c59[_0x4ad29c(0x75)]);return{'ok':![],'error':_0x54883a,'isProtocolError':_0x3ca68c};}}async function sweepOrphanLocalProfile(_0x1cff0d,_0x5e922e,_0x5509e5){const _0x3d8fbf=_0x267c,_0xcd841b={'TRcGd':function(_0x144716,_0x1c7fa7){return _0x144716(_0x1c7fa7);},'hoQwa':function(_0x30678a,_0xd7d1dc,_0x487e2a){return _0x30678a(_0xd7d1dc,_0x487e2a);},'ZMnwR':function(_0x3f241b,_0x252e3e){return _0x3f241b(_0x252e3e);}},_0x1e2f5d=join(_0x5e922e,_0x3d8fbf(0x81)),_0x747a7a=join(_0x1e2f5d,_0x1cff0d);existsSync(_0x747a7a)&&(_0x5509e5&&await _0xcd841b[_0x3d8fbf(0xc8)](isPathGitTracked,_0x747a7a)?console['log'](_0x3d8fbf(0xb9)+_0x747a7a+_0x3d8fbf(0xad)):(await _0xcd841b['hoQwa'](rm,_0x747a7a,{'recursive':!![],'force':!![]}),console[_0x3d8fbf(0x9e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x747a7a)));if(_0xcd841b[_0x3d8fbf(0xc8)](existsSync,_0x1e2f5d)){let _0x5e8c89=[];try{_0x5e8c89=await _0xcd841b['ZMnwR'](readdir,_0x1e2f5d);}catch{return;}const _0xa9a26='.tmp-'+_0x1cff0d+'-';for(const _0x39386e of _0x5e8c89){if(!_0x39386e[_0x3d8fbf(0x73)](_0xa9a26))continue;const _0x55ce60=join(_0x1e2f5d,_0x39386e);await rm(_0x55ce60,{'recursive':!![],'force':!![]}),console[_0x3d8fbf(0x9e)](_0x3d8fbf(0xdd)+_0x55ce60);}}}async function sweepOrphansBestEffort(_0x36498e){const _0x20cb57=_0x267c,_0x1728cf={'iKkSR':function(_0xd665b4){return _0xd665b4();},'FebZR':function(_0x758a47,_0x20bac8){return _0x758a47!==_0x20bac8;},'GkbSP':function(_0x4922d2,_0x309667){return _0x4922d2(_0x309667);}};try{await sweepOrphanLocalProfile(_0x36498e,_0x1728cf[_0x20cb57(0xd3)](getRangerHomeDir),![]);const _0x400dc1=_0x1728cf['iKkSR'](getRangerDir);_0x1728cf[_0x20cb57(0x85)](_0x400dc1,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x36498e,_0x400dc1,!![]);}catch(_0x196681){console[_0x20cb57(0x9e)](_0x20cb57(0xa9)+(_0x196681 instanceof Error?_0x196681['message']:_0x1728cf[_0x20cb57(0x8e)](String,_0x196681))+').');}}async function markActive(_0x596afa){const _0x3b27e9=_0x267c,_0xee8b63={'IyhUC':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x596afa),console[_0x3b27e9(0x9e)](_0x3b27e9(0x71)+_0x596afa);}catch{console['log'](_0xee8b63[_0x3b27e9(0xa1)]);}}async function tryAutoRouteCloudProfile(_0x306edc,_0x5566e2,_0x122768,_0x4b1840,_0x5b1949){const _0x16846f=_0x267c,_0x1835bf={'lHMRA':function(_0x5b01fc,_0x34d259){return _0x5b01fc===_0x34d259;},'DJIJT':function(_0x248e04){return _0x248e04();},'lTyxr':function(_0x2c6406,_0x34880e){return _0x2c6406===_0x34880e;},'RUZSl':function(_0x4376ef,_0x548917,_0x1418e5,_0xe95c87,_0x381de4){return _0x4376ef(_0x548917,_0x1418e5,_0xe95c87,_0x381de4);},'sbSJB':'profile.add.autoRouteSkipped','fDmvv':_0x16846f(0xa8),'RJfrh':function(_0x57c7ca,_0x1fbac3){return _0x57c7ca+_0x1fbac3;},'wuyfd':function(_0x41d08f,_0x594d0b){return _0x41d08f+_0x594d0b;},'aOlad':'\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','CIllq':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','LKBFZ':'env_not_found','ftBUL':function(_0x526e09,_0xfd47fe){return _0x526e09+_0xfd47fe;},'ThAph':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','vJAKy':'no_match','tQxRU':_0x16846f(0x95),'pPxbG':_0x16846f(0x99),'gSvka':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','drGzf':function(_0x2cbc5d,_0x589d6d,_0x3dba45,_0x18ac4a){return _0x2cbc5d(_0x589d6d,_0x3dba45,_0x18ac4a);}};let _0x44a1c9;try{_0x44a1c9=await _0x1835bf[_0x16846f(0x84)](fetchAuthConfig);}catch(_0xa959e7){return _0x5b1949?.[_0x16846f(0x72)]('profile.add.autoRouteSkipped',{'reason':_0x16846f(0xa8),'profileName':_0x306edc}),console['error'](_0x16846f(0xb2)+(_0xa959e7 instanceof Error?_0xa959e7['message']:String(_0xa959e7))),![];}if((!_0x44a1c9||!_0x44a1c9['environments']||_0x1835bf[_0x16846f(0x90)](Object[_0x16846f(0xc6)](_0x44a1c9[_0x16846f(0x79)])[_0x16846f(0xd4)],0x0))&&!_0x122768['authEnv']){if(_0x4b1840)return await _0x1835bf[_0x16846f(0xbc)](captureEnvLessProfile,_0x306edc,_0x5566e2,_0x122768,_0x5b1949);return _0x5b1949?.['trackPhaseEnd'](_0x1835bf['sbSJB'],{'reason':_0x1835bf[_0x16846f(0xc9)],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['RJfrh'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf[_0x16846f(0xe4)]+'\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'+_0x306edc+_0x16846f(0x6d)+_0x5566e2+'\x20--skip-auth\x0a'),'\x0a'),'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x1835bf['CIllq'])),![];}let _0xb2b843;if(_0x122768[_0x16846f(0xc2)]){if(!_0x44a1c9?.[_0x16846f(0x79)]?.[_0x122768['authEnv']]){const _0x242984=Object['keys'](_0x44a1c9?.[_0x16846f(0x79)]??{});return _0x5b1949?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1835bf[_0x16846f(0xbf)],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['ftBUL'](_0x16846f(0xba)+_0x122768[_0x16846f(0xc2)]+_0x16846f(0xa3),_0x242984[_0x16846f(0xd4)]?'\x20Configured\x20envs:\x20'+_0x242984[_0x16846f(0xcb)](',\x20')+'.':_0x1835bf[_0x16846f(0x8b)])),![];}_0xb2b843=_0x122768[_0x16846f(0xc2)];}else _0xb2b843=matchAuthEnvironment(_0x5566e2,_0x44a1c9);if(!_0xb2b843)return _0x5b1949?.['trackPhaseEnd'](_0x1835bf[_0x16846f(0xb6)],{'reason':_0x1835bf['vJAKy'],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x16846f(0xa7)+_0x5566e2+_0x16846f(0x92)+Object['keys'](_0x44a1c9?.[_0x16846f(0x79)]??{})[_0x16846f(0xcb)](',\x20')+'.'),![];const _0x53d77a=_0x44a1c9?.['environments']?.[_0xb2b843],_0x21803a=_0x53d77a?.['domains']??[];if(_0x4b1840&&!_0x122768['yes']){const {saveToCloud:_0x4e365f}=await _0x24f4bb['prompt']([{'type':'confirm','name':_0x1835bf[_0x16846f(0xa2)],'message':'Found\x20auth\x20environment\x20\x27'+_0xb2b843+_0x16846f(0x9d)+_0x5566e2+_0x16846f(0xe1)+_0x21803a[_0x16846f(0xcb)](',\x20')+_0x16846f(0x76)+_0x306edc+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4e365f)return _0x5b1949?.[_0x16846f(0x72)](_0x1835bf['sbSJB'],{'reason':_0x1835bf['pPxbG'],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['gSvka']),![];}const _0x5e47d0=_0x21803a[_0x16846f(0xa6)](_0x391f42=>{const _0xdfb877=_0x16846f;try{return _0x1835bf['lHMRA'](new URL(_0x391f42)['origin'],new URL(_0x5566e2)[_0xdfb877(0x8f)]);}catch{return![];}}),_0xc50694={};!_0x5e47d0&&(_0xc50694[_0x16846f(0xc0)]=_0x5566e2);try{await _0x1835bf['drGzf'](createCloudProfile,_0x306edc,_0xb2b843,{'settings':_0xc50694}),warnCloudProfileSharedInOrg();}catch(_0x26fa62){if(_0x26fa62 instanceof ApiError&&_0x1835bf[_0x16846f(0x90)](_0x26fa62[_0x16846f(0xce)],0x199)){console[_0x16846f(0xa4)](_0x16846f(0x6c)+_0x306edc+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x16846f(0xc7)+_0x306edc));throw _0x26fa62;}throw _0x26fa62;}return console['log'](_0x1835bf['wuyfd']('✓\x20Profile\x20\x27'+_0x306edc+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x306edc)),await sweepOrphansBestEffort(_0x306edc),_0x5b1949?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':_0xb2b843,'profileName':_0x306edc}),!![];}async function createUnconfiguredCloudProfile(_0x5e4a66,_0x1c3580){const _0x221abb=_0x267c,_0x25e9e0={'lxiIP':function(_0x15a2af){return _0x15a2af();},'FJJyK':function(_0x1a06b8,_0x47fde3){return _0x1a06b8 instanceof _0x47fde3;},'leGeZ':function(_0x1bd6d0,_0x4f52fa){return _0x1bd6d0===_0x4f52fa;}};try{await createCloudProfile(_0x5e4a66,undefined,{'settings':_0x1c3580}),_0x25e9e0[_0x221abb(0xbd)](warnCloudProfileSharedInOrg);}catch(_0x5e086f){_0x25e9e0['FJJyK'](_0x5e086f,ApiError)&&_0x25e9e0[_0x221abb(0x86)](_0x5e086f[_0x221abb(0xce)],0x199)&&console[_0x221abb(0xa4)](_0x221abb(0x6c)+_0x5e4a66+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5e4a66));throw _0x5e086f;}}async function captureEnvLessProfile(_0xe380d2,_0x4d2462,_0x426ab5,_0x11c6b1){const _0x19909c=_0x267c,_0x2600b8={'jxiXI':_0x19909c(0xac),'kTZeT':'capture','gJeYw':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sNCLw':'profile.add.autoRouteSkipped','bfnJE':'user_declined','gpZjm':function(_0x35902b,_0x5aadae){return _0x35902b===_0x5aadae;},'BnaOk':function(_0x503801,_0x276576){return _0x503801>_0x276576;},'jyhWm':function(_0x116dcf,_0x2ee2ce,_0xac9499,_0x389011){return _0x116dcf(_0x2ee2ce,_0xac9499,_0x389011);},'TwMIb':function(_0x480173){return _0x480173();},'FGKPr':function(_0x145131,_0x49b2a1){return _0x145131 instanceof _0x49b2a1;},'uEnyk':function(_0x4d4c4c,_0x36e872){return _0x4d4c4c===_0x36e872;},'dKKXW':function(_0x166df9,_0xd87f77){return _0x166df9+_0xd87f77;},'Htcwm':function(_0x264d31,_0x2c9652,_0xe1427a){return _0x264d31(_0x2c9652,_0xe1427a);}};if(!_0x426ab5['yes']){const {capture:_0x34d0ce}=await _0x24f4bb[_0x19909c(0x78)]([{'type':_0x2600b8['jxiXI'],'name':_0x2600b8['kTZeT'],'message':_0x2600b8['gJeYw'],'default':!![]}]);if(!_0x34d0ce)return _0x11c6b1?.[_0x19909c(0x72)](_0x2600b8[_0x19909c(0x9b)],{'reason':_0x2600b8['bfnJE'],'profileName':_0xe380d2}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x21cdfa={};if(_0x426ab5['setupHeader'])for(const _0xb9b766 of _0x426ab5['setupHeader']){const _0x34f1bd=_0xb9b766['indexOf'](':');if(_0x2600b8[_0x19909c(0xb7)](_0x34f1bd,-0x1))continue;_0x21cdfa[_0xb9b766[_0x19909c(0xd7)](0x0,_0x34f1bd)['trim']()]=_0xb9b766['slice'](_0x34f1bd+0x1)[_0x19909c(0xb3)]();}const _0x2cd38f={'baseUrl':_0x4d2462};_0x2600b8[_0x19909c(0x97)](Object['keys'](_0x21cdfa)['length'],0x0)&&(_0x2cd38f['setupHeaders']=_0x21cdfa);let _0x397df8;try{_0x397df8=await _0x2600b8['jyhWm'](createCloudProfile,_0xe380d2,undefined,{'settings':_0x2cd38f}),_0x2600b8[_0x19909c(0xdc)](warnCloudProfileSharedInOrg);}catch(_0x1e76c9){_0x2600b8['FGKPr'](_0x1e76c9,ApiError)&&_0x2600b8[_0x19909c(0xd0)](_0x1e76c9[_0x19909c(0xce)],0x199)&&console[_0x19909c(0xa4)](_0x2600b8[_0x19909c(0x93)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xe380d2+_0x19909c(0xdb),_0x19909c(0xc7)+_0xe380d2));throw _0x1e76c9;}return await _0x2600b8['Htcwm'](manualBrowserLogin,_0x397df8,{'key':'','domains':[_0x4d2462],'setupHeaders':_0x2600b8['BnaOk'](Object[_0x19909c(0xc6)](_0x21cdfa)['length'],0x0)?_0x21cdfa:undefined}),console['log'](_0x2600b8[_0x19909c(0x93)]('\x0a✓\x20Profile\x20\x27'+_0xe380d2+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0xe380d2)),await sweepOrphansBestEffort(_0xe380d2),_0x11c6b1?.[_0x19909c(0x72)](_0x19909c(0x9c),{'envKey':null,'profileName':_0xe380d2}),!![];}export async function addEnv(_0x4d7bb5,_0x31de7a={},_0x17a994){const _0x595080=_0x267c,_0x505d6b={'PTKpa':function(_0x4c0edc,_0x4c7585){return _0x4c0edc+_0x4c7585;},'CLvRV':function(_0x4579dd,_0x4be16c){return _0x4579dd+_0x4be16c;},'DwQXL':function(_0x4373a7,_0x2d1cbb){return _0x4373a7+_0x2d1cbb;},'ssfPY':function(_0x4d3110,_0x3aefc0){return _0x4d3110+_0x3aefc0;},'XUeDz':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','ONtkx':function(_0x3befd7,_0x3088d1){return _0x3befd7===_0x3088d1;},'XiNbU':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','dKKcP':_0x595080(0xa0),'FcbJu':_0x595080(0x94),'IzGCi':function(_0x286717,_0x23905f){return _0x286717(_0x23905f);},'kzYBk':function(_0x58be00){return _0x58be00();},'yNUOt':_0x595080(0xe2),'KWQMs':function(_0x60a33e,_0x44339f,_0x308178){return _0x60a33e(_0x44339f,_0x308178);},'PLSFw':'cdpEndpoint','xseXN':function(_0x3d2d12,_0x39fdb9){return _0x3d2d12 instanceof _0x39fdb9;},'csCpr':function(_0x430af0,_0x1771e0){return _0x430af0(_0x1771e0);},'fIQAz':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','xWzUR':'input','EtgsQ':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','dcaQO':function(_0x40e837,_0x4d2325){return _0x40e837||_0x4d2325;},'QPgvT':_0x595080(0xe3),'yZUXS':'action','Cjuqh':'use_suggestion','ZidiP':_0x595080(0xbb),'RFWSa':function(_0x235218,_0x1ff1ef){return _0x235218 instanceof _0x1ff1ef;},'oZDoI':function(_0x460ff9,_0x2b3dda){return _0x460ff9(_0x2b3dda);},'WxuGx':function(_0x1dc98f,_0x440cbd){return _0x1dc98f(_0x440cbd);}};_0x31de7a['ci']&&(console[_0x595080(0xa4)](_0x505d6b[_0x595080(0xcc)](_0x505d6b['PTKpa'](_0x505d6b[_0x595080(0xe5)](_0x505d6b[_0x595080(0xaf)](_0x505d6b[_0x595080(0x6e)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x505d6b['XUeDz']),'\x0a'),_0x595080(0xc3))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1));const _0x545dd0={};if(_0x31de7a['setupHeader'])for(const _0x5dd7ab of _0x31de7a[_0x595080(0xd2)]){const _0x3e1b0d=_0x5dd7ab[_0x595080(0xbe)](':');if(_0x3e1b0d===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x5dd7ab+_0x595080(0xe0));const _0x4cbf56=_0x5dd7ab[_0x595080(0xd7)](0x0,_0x3e1b0d)[_0x595080(0xb3)](),_0xcc49fd=_0x5dd7ab['slice'](_0x505d6b[_0x595080(0xe5)](_0x3e1b0d,0x1))[_0x595080(0xb3)]();_0x545dd0[_0x4cbf56]=_0xcc49fd;}if(_0x31de7a[_0x595080(0x87)]!==undefined&&_0x505d6b['ONtkx'](_0x31de7a['cdpEndpoint'][_0x595080(0xb3)](),''))throw new Error(_0x505d6b['XiNbU']);if(_0x31de7a[_0x595080(0x87)]&&_0x31de7a[_0x595080(0xc4)])throw new Error(_0x505d6b['dKKcP']);if(_0x31de7a[_0x595080(0xc2)]&&_0x31de7a[_0x595080(0x8c)])throw new Error(_0x505d6b[_0x595080(0x77)]);if(_0x31de7a['authEnv']&&_0x31de7a[_0x595080(0x87)])throw new Error(_0x595080(0x9a));const _0x3cf622=_0x505d6b['IzGCi'](Boolean,_0x31de7a[_0x595080(0x87)]),_0x4e88a1=_0x505d6b['kzYBk'](isInteractive);if(!_0x4e88a1&&!_0x31de7a['url']&&!_0x3cf622&&!_0x31de7a['skipAuth'])throw new Error(_0x505d6b[_0x595080(0x83)]);if(_0x3cf622){const _0x5868b4=_0x31de7a[_0x595080(0x87)];console[_0x595080(0x9e)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x595080(0x9e)](_0x595080(0xdf)+_0x5868b4);const _0x111739={'cdpEndpoint':_0x5868b4,'isElectron':!![]};Object[_0x595080(0xc6)](_0x545dd0)['length']>0x0&&(_0x111739['setupHeaders']=_0x545dd0);await _0x505d6b['KWQMs'](createUnconfiguredCloudProfile,_0x4d7bb5,_0x111739);try{setProfileOverride(process[_0x595080(0x8d)](),_0x4d7bb5,_0x505d6b[_0x595080(0x7a)],_0x5868b4),setProfileOverride(process[_0x595080(0x8d)](),_0x4d7bb5,'isElectron',!![]);}catch(_0x33d087){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x505d6b['xseXN'](_0x33d087,Error)?_0x33d087['message']:String(_0x33d087)));}console[_0x595080(0x9e)](_0x595080(0x8a)+_0x4d7bb5+'\x27\x20created\x20(CDP).'),await _0x505d6b['csCpr'](sweepOrphansBestEffort,_0x4d7bb5),await markActive(_0x4d7bb5);return;}if(_0x31de7a['skipAuth']){const _0x2279f7={};_0x31de7a[_0x595080(0xc4)]&&(_0x2279f7['baseUrl']=_0x31de7a[_0x595080(0xc4)]);Object['keys'](_0x545dd0)[_0x595080(0xd4)]>0x0&&(_0x2279f7[_0x595080(0xae)]=_0x545dd0);await createUnconfiguredCloudProfile(_0x4d7bb5,_0x2279f7),console['log']('✓\x20Profile\x20\x27'+_0x4d7bb5+_0x595080(0x88)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4d7bb5+_0x595080(0x98))),await _0x505d6b['csCpr'](sweepOrphansBestEffort,_0x4d7bb5),await markActive(_0x4d7bb5);return;}if(_0x31de7a[_0x595080(0xc4)]){const _0xf475c9=_0x31de7a[_0x595080(0xc4)],_0x5005b1=await checkUrlReachability(_0xf475c9);if(!_0x5005b1['ok']&&!_0x31de7a['force'])throw new Error('Could\x20not\x20reach\x20'+_0xf475c9+':\x20'+_0x5005b1[_0x595080(0xa4)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x5005b1['ok']&&_0x31de7a['force']&&console[_0x595080(0x9e)]('⚠\x20Could\x20not\x20reach\x20'+_0xf475c9+':\x20'+_0x5005b1['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x595080(0x9e)]('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x505d6b['fIQAz']),console['log'](_0x595080(0xcd));let _0x2f0baa='',_0x460593=![];while(!![]){const _0x3e8b3b=await _0x24f4bb['prompt']([{'type':_0x505d6b['xWzUR'],'name':_0x595080(0xc0),'message':_0x460593?_0x595080(0xd9):_0x505d6b[_0x595080(0x7f)],'default':_0x505d6b[_0x595080(0xde)](_0x2f0baa,_0x505d6b['QPgvT'])}]);_0x2f0baa=_0x3e8b3b['baseUrl'];const _0x4b6205=await checkUrlReachability(_0x2f0baa);if(_0x4b6205['ok'])break;const _0x19b335=/^[a-zA-Z][\w+.-]*:\/\//[_0x595080(0xb5)](_0x2f0baa),_0x288988=_0x4b6205[_0x595080(0x7e)]&&!_0x19b335,_0x335e99=_0x288988?'http://'+_0x2f0baa:null;_0x460593=!![],console[_0x595080(0x9e)](_0x595080(0xab)+_0x2f0baa+':\x20'+_0x4b6205['error']);_0x335e99&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x335e99+'?');const {action:_0x50b89a}=await _0x24f4bb['prompt']([{'type':'list','name':_0x505d6b['yZUXS'],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x335e99?[{'name':'Use\x20'+_0x335e99,'value':_0x505d6b[_0x595080(0xb1)]}]:[],{'name':_0x505d6b[_0x595080(0xc1)],'value':_0x595080(0xaa)},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x50b89a==='use_suggestion'&&_0x335e99){_0x2f0baa=_0x335e99;const _0x1b01d7=await checkUrlReachability(_0x2f0baa);if(_0x1b01d7['ok'])break;console['log'](_0x595080(0xb0)+_0x2f0baa+':\x20'+_0x1b01d7['error']);}else{if(_0x50b89a===_0x595080(0xc5))break;}}_0x31de7a={..._0x31de7a,'url':_0x2f0baa};}let _0x5a587e=![];try{_0x5a587e=await tryAutoRouteCloudProfile(_0x4d7bb5,_0x31de7a['url'],_0x31de7a,_0x4e88a1,_0x17a994);}catch(_0x71e8bb){console[_0x595080(0xa4)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4d7bb5+'\x22:\x20'+(_0x505d6b[_0x595080(0x6f)](_0x71e8bb,Error)?_0x71e8bb['message']:_0x505d6b['oZDoI'](String,_0x71e8bb))),process['exit'](0x1);}!_0x5a587e&&process['exit'](0x1),await _0x505d6b['WxuGx'](markActive,_0x4d7bb5);}
|
|
1
|
+
(function(_0xe4ce29,_0x3d7cf3){const _0xa3da43=_0x2836,_0x475f0a=_0xe4ce29();while(!![]){try{const _0x144c88=parseInt(_0xa3da43(0x1c3))/0x1*(parseInt(_0xa3da43(0x212))/0x2)+parseInt(_0xa3da43(0x1e9))/0x3+parseInt(_0xa3da43(0x1fe))/0x4+parseInt(_0xa3da43(0x1d6))/0x5+parseInt(_0xa3da43(0x22a))/0x6*(-parseInt(_0xa3da43(0x21f))/0x7)+-parseInt(_0xa3da43(0x1bb))/0x8+-parseInt(_0xa3da43(0x235))/0x9;if(_0x144c88===_0x3d7cf3)break;else _0x475f0a['push'](_0x475f0a['shift']());}catch(_0x12359d){_0x475f0a['push'](_0x475f0a['shift']());}}}(_0x1a7b,0xf1c22));import{readdir,rm}from'fs/promises';function _0x2836(_0x35f9fc,_0x5a6160){_0x35f9fc=_0x35f9fc-0x1ac;const _0x1a7bc2=_0x1a7b();let _0x2836ea=_0x1a7bc2[_0x35f9fc];return _0x2836ea;}import{join}from'path';import{existsSync}from'fs';import _0x2b71a3 from'inquirer';function _0x1a7b(){const _0x4413df=['AFaIS','list','retry','TrHlR','log','DlRZh','yTxyZ','HEAD','name','6054388VVbbXu','xqbUp','profile.add.autoRouted','input','DeVfr','\x20\x20Did\x20you\x20mean\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','prompt','trackPhaseEnd','\x0a✓\x20Profile\x20\x27','ERkpX','error','✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lajQo','some','Found\x20auth\x20environment\x20\x27','isTTY','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YIxyV','50822SArXNS','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','profile.add.autoRouteSkipped','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','url','TypeError','SSGEk','cdpEndpoint','startsWith','http://','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','pwfCf','42fBGeXF','ZmMvG','test','\x20--url\x20','QTdrF','JFivS','khMGp','\x0a\x20\x20Auth\x20environment\x20\x22','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','TzoMP','exit','911622GQikwB','ixoPh','VJYlH','RAnEi','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Use\x20','XRmUP','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20Configured\x20envs:\x20','14320134njbmsn','XSNhz','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','\x27\x20to\x20the\x20cloud?','\x27\x20matching\x20','isElectron','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','message','\x22:\x20','boTnm','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x27\x20created\x20(no\x20session).\x0a','egKqa','no_auth_config','\x20--skip-auth\x0a','skipAuth','indexOf','\x27\x20created.\x0a','7055544MDwAJd','status','beREe','hUeCB','trim','BKmsG','xDRBN','zTsai','69WQZgGY','\x0a🌐\x20Profile\x20Setup\x0a','stdout','kEilj','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','DZarU','isProtocolError','✓\x20Cloud\x20profile\x20\x27','KWEAc','gDhkw','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','cwd','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','no_match','\x20\x20Set\x20active\x20profile:\x20','2917980urbejO','Continue\x20anyway','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','env_not_found','Ryljw','setupHeader','length','authEnv','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','environments','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20https://docs.ranger.net/main/concepts/profiles','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','fetch\x20failed','YAZOo','rbjYD','1573143qIkxBo','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','includes','saveToCloud','setupHeaders','EZePF','origin','action','force','What\x20would\x20you\x20like\x20to\x20do?','join','http://localhost:3000'];_0x1a7b=function(){return _0x4413df;};return _0x1a7b();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x299297=_0x2836;if(!process[_0x299297(0x1c5)][_0x299297(0x20f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x529afd){const _0x12a9a1=_0x2836,_0x5585ef={'tQwDO':function(_0xd0565c,_0x41a45d){return _0xd0565c<_0x41a45d;},'TrHlR':function(_0x441b57,_0xcfbb12){return _0x441b57===_0xcfbb12;},'KWEAc':_0x12a9a1(0x218),'qgxmu':_0x12a9a1(0x1e6)};try{const _0xe5a2c8=new AbortController(),_0x59bfa5=setTimeout(()=>_0xe5a2c8['abort'](),0x1388),_0x5592bc={'method':_0x12a9a1(0x1fc),'signal':_0xe5a2c8['signal'],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x529afd)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3b918a=await fetch(_0x529afd,_0x5592bc);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x59bfa5);if(_0x5585ef['tQwDO'](_0x3b918a[_0x12a9a1(0x1bc)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x3b918a[_0x12a9a1(0x1bc)]};}catch(_0x198b15){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4e8a04=_0x198b15,_0xabd8b4=_0x4e8a04['message']||String(_0x198b15),_0x1d0e36=_0xabd8b4['includes']('Invalid\x20URL')||_0x5585ef[_0x12a9a1(0x1f8)](_0x4e8a04[_0x12a9a1(0x1fd)],_0x5585ef[_0x12a9a1(0x1cd)])||_0xabd8b4[_0x12a9a1(0x1eb)](_0x5585ef['qgxmu']);return{'ok':![],'error':_0xabd8b4,'isProtocolError':_0x1d0e36};}}async function sweepOrphanLocalProfile(_0x17939c,_0x1c4f04,_0x34d8ae){const _0x13bad1=_0x2836,_0x288f01={'AYehI':function(_0xf57b5a,_0x53f042){return _0xf57b5a(_0x53f042);},'boTnm':function(_0x985d73,_0x3c4d8a,_0x1ed60f){return _0x985d73(_0x3c4d8a,_0x1ed60f);}},_0x9fcfd0=join(_0x1c4f04,'local'),_0x311a1d=join(_0x9fcfd0,_0x17939c);existsSync(_0x311a1d)&&(_0x34d8ae&&await isPathGitTracked(_0x311a1d)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x311a1d+_0x13bad1(0x21d)):(await rm(_0x311a1d,{'recursive':!![],'force':!![]}),console[_0x13bad1(0x1f9)](_0x13bad1(0x1e3)+_0x311a1d)));if(existsSync(_0x9fcfd0)){let _0x7eea84=[];try{_0x7eea84=await _0x288f01['AYehI'](readdir,_0x9fcfd0);}catch{return;}const _0xe059c0='.tmp-'+_0x17939c+'-';for(const _0x454ad9 of _0x7eea84){if(!_0x454ad9[_0x13bad1(0x21b)](_0xe059c0))continue;const _0x82f2e0=join(_0x9fcfd0,_0x454ad9);await _0x288f01[_0x13bad1(0x1b2)](rm,_0x82f2e0,{'recursive':!![],'force':!![]}),console['log'](_0x13bad1(0x1e3)+_0x82f2e0);}}}async function sweepOrphansBestEffort(_0x45bf32){const _0x36ee55=_0x2836,_0xa8178={'DVtKr':function(_0x3c8c29,_0x4c4a4e,_0x526e86,_0x407195){return _0x3c8c29(_0x4c4a4e,_0x526e86,_0x407195);},'UBRke':function(_0x3fa05f){return _0x3fa05f();},'GlMqZ':function(_0x2f64f0){return _0x2f64f0();},'JFivS':function(_0x3e962d,_0x498bf8,_0x1faaeb,_0x31ced9){return _0x3e962d(_0x498bf8,_0x1faaeb,_0x31ced9);},'kEilj':function(_0x502815,_0x1a0d8a){return _0x502815 instanceof _0x1a0d8a;}};try{await _0xa8178['DVtKr'](sweepOrphanLocalProfile,_0x45bf32,_0xa8178['UBRke'](getRangerHomeDir),![]);const _0x25c294=_0xa8178['GlMqZ'](getRangerDir);_0x25c294!==getRangerHomeDir()&&await _0xa8178[_0x36ee55(0x224)](sweepOrphanLocalProfile,_0x45bf32,_0x25c294,!![]);}catch(_0x36d6ef){console[_0x36ee55(0x1f9)](_0x36ee55(0x230)+(_0xa8178[_0x36ee55(0x1c6)](_0x36d6ef,Error)?_0x36d6ef[_0x36ee55(0x1b0)]:String(_0x36d6ef))+').');}}async function markActive(_0xf73eed){const _0x37c922=_0x2836;try{await writeActiveProfileName(_0xf73eed),console[_0x37c922(0x1f9)](_0x37c922(0x1d5)+_0xf73eed);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x5365c3,_0x405dd7){const _0x153200=_0x2836,_0x29344f={'bxrFR':function(_0x12b55c,_0x3f9679){return _0x12b55c instanceof _0x3f9679;},'gDhkw':function(_0x425aad,_0x1ec39c){return _0x425aad===_0x1ec39c;},'nUOqi':_0x153200(0x215),'PSRIU':_0x153200(0x1b6),'DZarU':function(_0x30f99,_0x508235){return _0x30f99+_0x508235;},'YAZOo':_0x153200(0x204),'ZmMvG':_0x153200(0x1da),'ixoPh':_0x153200(0x1d4),'egKqa':'confirm','pwfCf':_0x153200(0x227),'RtslG':function(_0x4825fc,_0x2d232c,_0x2efe85,_0x5daf0e){return _0x4825fc(_0x2d232c,_0x2efe85,_0x5daf0e);},'owyDT':_0x153200(0x200)};let _0x20ce71;try{_0x20ce71=await fetchAuthConfig();}catch(_0x58a94c){return _0x405dd7?.[_0x153200(0x206)](_0x153200(0x215),{'reason':_0x153200(0x1b6),'profileName':_0xd3209e}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x29344f['bxrFR'](_0x58a94c,Error)?_0x58a94c['message']:String(_0x58a94c))),![];}if((!_0x20ce71||!_0x20ce71['environments']||_0x29344f[_0x153200(0x1ce)](Object['keys'](_0x20ce71[_0x153200(0x1e1)])[_0x153200(0x1dd)],0x0))&&!_0x317fba[_0x153200(0x1de)]){if(_0x5365c3)return await captureEnvLessProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x405dd7);return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f['PSRIU'],'profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x1ca)](_0x29344f['DZarU'](_0x29344f[_0x153200(0x1ca)](_0x29344f[_0x153200(0x1ca)]('\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'+(_0x153200(0x216)+_0xd3209e+_0x153200(0x222)+_0x55afb4+_0x153200(0x1b7)),'\x0a'),_0x29344f[_0x153200(0x1e7)]),_0x153200(0x210))),![];}let _0x5d79a4;if(_0x317fba[_0x153200(0x1de)]){if(!_0x20ce71?.['environments']?.[_0x317fba['authEnv']]){const _0x59d5ef=Object['keys'](_0x20ce71?.[_0x153200(0x1e1)]??{});return _0x405dd7?.[_0x153200(0x206)](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x220)],'profileName':_0xd3209e}),console[_0x153200(0x209)](_0x153200(0x226)+_0x317fba[_0x153200(0x1de)]+'\x22\x20not\x20found.'+(_0x59d5ef['length']?_0x153200(0x234)+_0x59d5ef[_0x153200(0x1f3)](',\x20')+'.':_0x153200(0x1ae))),![];}_0x5d79a4=_0x317fba['authEnv'];}else _0x5d79a4=matchAuthEnvironment(_0x55afb4,_0x20ce71);if(!_0x5d79a4)return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x22b)],'profileName':_0xd3209e}),console['error'](_0x153200(0x1e2)+_0x55afb4+_0x153200(0x1b3)+Object[_0x153200(0x1d9)](_0x20ce71?.[_0x153200(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x286eba=_0x20ce71?.[_0x153200(0x1e1)]?.[_0x5d79a4],_0x1d56ca=_0x286eba?.['domains']??[];if(_0x5365c3&&!_0x317fba[_0x153200(0x22f)]){const {saveToCloud:_0x42de8b}=await _0x2b71a3[_0x153200(0x205)]([{'type':_0x29344f[_0x153200(0x1b5)],'name':_0x153200(0x1ec),'message':_0x153200(0x20e)+_0x5d79a4+_0x153200(0x1ac)+_0x55afb4+'\x0a\x20\x20(domains:\x20'+_0x1d56ca['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xd3209e+_0x153200(0x239),'default':!![]}]);if(!_0x42de8b)return _0x405dd7?.['trackPhaseEnd'](_0x153200(0x215),{'reason':'user_declined','profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x21e)]),![];}const _0x30cea3=_0x1d56ca[_0x153200(0x20d)](_0x1ded45=>{const _0x586f32=_0x153200;try{return new URL(_0x1ded45)[_0x586f32(0x1ef)]===new URL(_0x55afb4)['origin'];}catch{return![];}}),_0x491d50={};!_0x30cea3&&(_0x491d50[_0x153200(0x238)]=_0x55afb4);try{await _0x29344f['RtslG'](createCloudProfile,_0xd3209e,_0x5d79a4,{'settings':_0x491d50}),warnCloudProfileSharedInOrg();}catch(_0x31ec3e){if(_0x31ec3e instanceof ApiError&&_0x31ec3e[_0x153200(0x1bc)]===0x199){console[_0x153200(0x209)](_0x29344f['DZarU']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xd3209e+_0x153200(0x20b),_0x153200(0x1af)+_0xd3209e));throw _0x31ec3e;}throw _0x31ec3e;}return console[_0x153200(0x1f9)](_0x29344f[_0x153200(0x1ca)]('✓\x20Profile\x20\x27'+_0xd3209e+_0x153200(0x1ba),_0x153200(0x237)+_0xd3209e)),await sweepOrphansBestEffort(_0xd3209e),_0x405dd7?.['trackPhaseEnd'](_0x29344f['owyDT'],{'envKey':_0x5d79a4,'profileName':_0xd3209e}),!![];}async function createUnconfiguredCloudProfile(_0x368974,_0xb6a6c1){const _0x18b54a=_0x2836,_0x46f4c7={'qmNxE':function(_0x2480d5,_0x136566){return _0x2480d5 instanceof _0x136566;},'HYwCU':function(_0x25058e,_0x92fd3e){return _0x25058e===_0x92fd3e;},'rbjYD':function(_0x286ce5,_0x2d5112){return _0x286ce5+_0x2d5112;}};try{await createCloudProfile(_0x368974,undefined,{'settings':_0xb6a6c1}),warnCloudProfileSharedInOrg();}catch(_0x978fa){_0x46f4c7['qmNxE'](_0x978fa,ApiError)&&_0x46f4c7['HYwCU'](_0x978fa[_0x18b54a(0x1bc)],0x199)&&console['error'](_0x46f4c7[_0x18b54a(0x1e8)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x368974+_0x18b54a(0x20b),_0x18b54a(0x1af)+_0x368974));throw _0x978fa;}}async function captureEnvLessProfile(_0x270470,_0x40f13a,_0x51ce11,_0x103469){const _0x209869=_0x2836,_0x5b44cd={'KyBhX':'confirm','mGoou':'capture','XRmUP':'user_declined','XSNhz':function(_0x885a17,_0x207f68){return _0x885a17+_0x207f68;},'VUcXA':function(_0x5e8f9a,_0x58544b){return _0x5e8f9a>_0x58544b;},'DlRZh':function(_0x28c002,_0x47342a,_0x4ae56f){return _0x28c002(_0x47342a,_0x4ae56f);},'iUSJQ':function(_0x58c237,_0x179595){return _0x58c237>_0x179595;},'YIxyV':function(_0x454241,_0x2b3360){return _0x454241(_0x2b3360);}};if(!_0x51ce11[_0x209869(0x22f)]){const {capture:_0x101764}=await _0x2b71a3['prompt']([{'type':_0x5b44cd['KyBhX'],'name':_0x5b44cd['mGoou'],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x101764)return _0x103469?.[_0x209869(0x206)](_0x209869(0x215),{'reason':_0x5b44cd[_0x209869(0x232)],'profileName':_0x270470}),console[_0x209869(0x209)](_0x5b44cd[_0x209869(0x236)](_0x209869(0x1cf),_0x209869(0x22e))),![];}const _0xd19664={};if(_0x51ce11['setupHeader'])for(const _0x8a2089 of _0x51ce11['setupHeader']){const _0x298e3c=_0x8a2089[_0x209869(0x1b9)](':');if(_0x298e3c===-0x1)continue;_0xd19664[_0x8a2089['slice'](0x0,_0x298e3c)['trim']()]=_0x8a2089['slice'](_0x298e3c+0x1)[_0x209869(0x1bf)]();}const _0x491abf={'baseUrl':_0x40f13a};_0x5b44cd['VUcXA'](Object[_0x209869(0x1d9)](_0xd19664)[_0x209869(0x1dd)],0x0)&&(_0x491abf[_0x209869(0x1ed)]=_0xd19664);let _0x20d192;try{_0x20d192=await createCloudProfile(_0x270470,undefined,{'settings':_0x491abf}),warnCloudProfileSharedInOrg();}catch(_0x10a886){_0x10a886 instanceof ApiError&&_0x10a886[_0x209869(0x1bc)]===0x199&&console['error'](_0x5b44cd[_0x209869(0x236)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x270470+_0x209869(0x20b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x270470));throw _0x10a886;}return await _0x5b44cd[_0x209869(0x1fa)](manualBrowserLogin,_0x20d192,{'key':'','domains':[_0x40f13a],'setupHeaders':_0x5b44cd['iUSJQ'](Object[_0x209869(0x1d9)](_0xd19664)['length'],0x0)?_0xd19664:undefined}),console['log'](_0x209869(0x207)+_0x270470+_0x209869(0x213)+(_0x209869(0x237)+_0x270470)),await _0x5b44cd[_0x209869(0x211)](sweepOrphansBestEffort,_0x270470),_0x103469?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x270470}),!![];}export async function addEnv(_0x3783a6,_0x556e73={},_0x3c7251){const _0x4b8bf5=_0x2836,_0x24b971={'lajQo':function(_0xe26bbb,_0x4326b3){return _0xe26bbb+_0x4326b3;},'EZePF':function(_0x469158,_0x452501){return _0x469158+_0x452501;},'KgcgA':function(_0x3c59c1,_0x204c52){return _0x3c59c1+_0x204c52;},'RAnEi':_0x4b8bf5(0x1c9),'cyhvG':_0x4b8bf5(0x1e4),'TzoMP':function(_0x575170,_0x165614){return _0x575170===_0x165614;},'TEAMD':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','beREe':_0x4b8bf5(0x1ea),'MsFIY':function(_0x348b61){return _0x348b61();},'VJYlH':_0x4b8bf5(0x1e5),'Ryljw':function(_0xebb997,_0x294895,_0x307a17,_0x26a95b,_0x32dbe3){return _0xebb997(_0x294895,_0x307a17,_0x26a95b,_0x32dbe3);},'yfpLs':_0x4b8bf5(0x21a),'AFaIS':_0x4b8bf5(0x1ad),'SSGEk':function(_0x29c1e8,_0x56697c){return _0x29c1e8 instanceof _0x56697c;},'QTdrF':function(_0x191f7f,_0xaea797){return _0x191f7f(_0xaea797);},'KXpYW':function(_0x210667,_0x33a49d){return _0x210667>_0x33a49d;},'yTxyZ':function(_0x4d8d55,_0x5c39d5,_0x20292a){return _0x4d8d55(_0x5c39d5,_0x20292a);},'DeVfr':function(_0x3e308f,_0x4965d2){return _0x3e308f+_0x4965d2;},'BKmsG':_0x4b8bf5(0x1c4),'ppwMI':_0x4b8bf5(0x1c8),'mRnvQ':_0x4b8bf5(0x201),'xqbUp':_0x4b8bf5(0x214),'khMGp':_0x4b8bf5(0x1f6),'ryQBB':_0x4b8bf5(0x1f2),'hUeCB':_0x4b8bf5(0x1d7),'zTsai':'continue','xDRBN':'use_suggestion','IpngU':function(_0x5a0f40,_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8){return _0x5a0f40(_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8);},'ERkpX':function(_0x41910d,_0x151860){return _0x41910d(_0x151860);}};_0x556e73['ci']&&(console['error'](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x1ee)](_0x24b971['KgcgA'](_0x24b971[_0x4b8bf5(0x1ee)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x24b971[_0x4b8bf5(0x22d)]),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x24b971['cyhvG'])),process[_0x4b8bf5(0x229)](0x1));const _0x1d908b={};if(_0x556e73[_0x4b8bf5(0x1dc)])for(const _0x223f83 of _0x556e73['setupHeader']){const _0x4d5d89=_0x223f83['indexOf'](':');if(_0x4d5d89===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x223f83+_0x4b8bf5(0x1d3));const _0x51b33a=_0x223f83['slice'](0x0,_0x4d5d89)['trim'](),_0x1ba71b=_0x223f83['slice'](_0x4d5d89+0x1)[_0x4b8bf5(0x1bf)]();_0x1d908b[_0x51b33a]=_0x1ba71b;}if(_0x556e73[_0x4b8bf5(0x21a)]!==undefined&&_0x24b971[_0x4b8bf5(0x228)](_0x556e73[_0x4b8bf5(0x21a)][_0x4b8bf5(0x1bf)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x556e73['cdpEndpoint']&&_0x556e73['url'])throw new Error(_0x24b971['TEAMD']);if(_0x556e73[_0x4b8bf5(0x1de)]&&_0x556e73['skipAuth'])throw new Error(_0x24b971[_0x4b8bf5(0x1bd)]);if(_0x556e73['authEnv']&&_0x556e73[_0x4b8bf5(0x21a)])throw new Error(_0x4b8bf5(0x1d8));const _0x46347d=Boolean(_0x556e73[_0x4b8bf5(0x21a)]),_0x307f93=_0x24b971['MsFIY'](isInteractive);if(!_0x307f93&&!_0x556e73[_0x4b8bf5(0x217)]&&!_0x46347d&&!_0x556e73[_0x4b8bf5(0x1b8)])throw new Error(_0x24b971[_0x4b8bf5(0x22c)]);if(_0x46347d){const _0x1a6bfa=_0x556e73[_0x4b8bf5(0x21a)];console[_0x4b8bf5(0x1f9)](_0x4b8bf5(0x1df)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1a6bfa);const _0x3cda6e={'cdpEndpoint':_0x1a6bfa,'isElectron':!![]};Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length']>0x0&&(_0x3cda6e[_0x4b8bf5(0x1ed)]=_0x1d908b);await createUnconfiguredCloudProfile(_0x3783a6,_0x3cda6e);try{_0x24b971[_0x4b8bf5(0x1db)](setProfileOverride,process['cwd'](),_0x3783a6,_0x24b971['yfpLs'],_0x1a6bfa),setProfileOverride(process[_0x4b8bf5(0x1d1)](),_0x3783a6,_0x24b971[_0x4b8bf5(0x1f5)],!![]);}catch(_0x422ecc){console[_0x4b8bf5(0x209)](_0x4b8bf5(0x1c7)+(_0x24b971[_0x4b8bf5(0x219)](_0x422ecc,Error)?_0x422ecc[_0x4b8bf5(0x1b0)]:String(_0x422ecc)));}console['log'](_0x4b8bf5(0x1cc)+_0x3783a6+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['skipAuth']){const _0x490f01={};_0x556e73[_0x4b8bf5(0x217)]&&(_0x490f01['baseUrl']=_0x556e73[_0x4b8bf5(0x217)]);_0x24b971['KXpYW'](Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length'],0x0)&&(_0x490f01['setupHeaders']=_0x1d908b);await _0x24b971[_0x4b8bf5(0x1fb)](createUnconfiguredCloudProfile,_0x3783a6,_0x490f01),console[_0x4b8bf5(0x1f9)](_0x24b971[_0x4b8bf5(0x202)](_0x4b8bf5(0x20a)+_0x3783a6+_0x4b8bf5(0x1b4),_0x4b8bf5(0x233)+_0x3783a6+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['url']){const _0x841424=_0x556e73[_0x4b8bf5(0x217)],_0x3caff3=await _0x24b971['QTdrF'](checkUrlReachability,_0x841424);if(!_0x3caff3['ok']&&!_0x556e73[_0x4b8bf5(0x1f1)])throw new Error('Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3['error']+_0x4b8bf5(0x1d2));!_0x3caff3['ok']&&_0x556e73[_0x4b8bf5(0x1f1)]&&console[_0x4b8bf5(0x1f9)]('⚠\x20Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3[_0x4b8bf5(0x209)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x24b971[_0x4b8bf5(0x1c0)]),console[_0x4b8bf5(0x1f9)](_0x24b971['ppwMI']),console['log'](_0x4b8bf5(0x1e0));let _0xe55f16='',_0x5fd7a7=![];while(!![]){const _0x164608=await _0x2b71a3[_0x4b8bf5(0x205)]([{'type':_0x24b971['mRnvQ'],'name':'baseUrl','message':_0x5fd7a7?_0x24b971[_0x4b8bf5(0x1ff)]:_0x4b8bf5(0x1d0),'default':_0xe55f16||_0x4b8bf5(0x1f4)}]);_0xe55f16=_0x164608[_0x4b8bf5(0x238)];const _0x2e85c7=await checkUrlReachability(_0xe55f16);if(_0x2e85c7['ok'])break;const _0x1c3162=/^[a-zA-Z][\w+.-]*:\/\//[_0x4b8bf5(0x221)](_0xe55f16),_0x261ff9=_0x2e85c7[_0x4b8bf5(0x1cb)]&&!_0x1c3162,_0x567573=_0x261ff9?_0x4b8bf5(0x21c)+_0xe55f16:null;_0x5fd7a7=!![],console[_0x4b8bf5(0x1f9)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x2e85c7[_0x4b8bf5(0x209)]);_0x567573&&console['log'](_0x4b8bf5(0x203)+_0x567573+'?');const {action:_0x589e10}=await _0x2b71a3['prompt']([{'type':_0x24b971[_0x4b8bf5(0x225)],'name':_0x4b8bf5(0x1f0),'message':_0x24b971['ryQBB'],'choices':[..._0x567573?[{'name':_0x4b8bf5(0x231)+_0x567573,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x4b8bf5(0x1f7)},{'name':_0x24b971[_0x4b8bf5(0x1be)],'value':_0x24b971[_0x4b8bf5(0x1c2)]}]}]);if(_0x589e10===_0x24b971[_0x4b8bf5(0x1c1)]&&_0x567573){_0xe55f16=_0x567573;const _0x476e7b=await _0x24b971[_0x4b8bf5(0x223)](checkUrlReachability,_0xe55f16);if(_0x476e7b['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x476e7b[_0x4b8bf5(0x209)]);}else{if(_0x24b971['TzoMP'](_0x589e10,_0x24b971['zTsai']))break;}}_0x556e73={..._0x556e73,'url':_0xe55f16};}let _0x1bb654=![];try{_0x1bb654=await _0x24b971['IpngU'](tryAutoRouteCloudProfile,_0x3783a6,_0x556e73[_0x4b8bf5(0x217)],_0x556e73,_0x307f93,_0x3c7251);}catch(_0x5b7569){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x3783a6+_0x4b8bf5(0x1b1)+(_0x5b7569 instanceof Error?_0x5b7569['message']:String(_0x5b7569))),process['exit'](0x1);}!_0x1bb654&&process[_0x4b8bf5(0x229)](0x1),await _0x24b971[_0x4b8bf5(0x208)](markActive,_0x3783a6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x386b(){var _0x5ee645=['5110260DBHeuA','8745219zNXLDU','493788xEbdxd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EzvIg','13294CKvlGK','exit','318UsZTBg','40QZNNxx','418732upHyBg','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','zsBcy','\x20\x20https://docs.ranger.net/main/concepts/profiles','989244VUpUkI','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5186237EeYAMW','8BavNrV','CSkRm','qBxuj'];_0x386b=function(){return _0x5ee645;};return _0x386b();}function _0x8cb0(_0x4e7c1d,_0x588548){_0x4e7c1d=_0x4e7c1d-0xc8;var _0x386b18=_0x386b();var _0x8cb01e=_0x386b18[_0x4e7c1d];return _0x8cb01e;}(function(_0x596e2f,_0x4d90bc){var _0x11589c=_0x8cb0,_0x16d8d6=_0x596e2f();while(!![]){try{var _0xc1ed2f=parseInt(_0x11589c(0xd8))/0x1+-parseInt(_0x11589c(0xd4))/0x2*(-parseInt(_0x11589c(0xd6))/0x3)+-parseInt(_0x11589c(0xd1))/0x4*(parseInt(_0x11589c(0xd7))/0x5)+parseInt(_0x11589c(0xc9))/0x6+-parseInt(_0x11589c(0xcb))/0x7*(-parseInt(_0x11589c(0xcc))/0x8)+-parseInt(_0x11589c(0xd0))/0x9+parseInt(_0x11589c(0xcf))/0xa;if(_0xc1ed2f===_0x4d90bc)break;else _0x16d8d6['push'](_0x16d8d6['shift']());}catch(_0x1784e6){_0x16d8d6['push'](_0x16d8d6['shift']());}}}(_0x386b,0x8dce6));export async function authEncrypt(_0x436b7f){var _0x132da8=_0x8cb0,_0x8d7e63={'CSkRm':function(_0x3e01cc,_0x5c685c){return _0x3e01cc+_0x5c685c;},'qBxuj':function(_0x248c2c,_0x3ad4b4){return _0x248c2c+_0x3ad4b4;},'EzvIg':_0x132da8(0xd2),'BfHin':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','zsBcy':_0x132da8(0xc8)};console['error'](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63['qBxuj'](_0x8d7e63[_0x132da8(0xce)](_0x8d7e63[_0x132da8(0xce)](_0x132da8(0xca)+_0x132da8(0xd9),'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x8d7e63[_0x132da8(0xd3)]),'\x0a'),_0x8d7e63['BfHin']),_0x8d7e63[_0x132da8(0xda)])),process[_0x132da8(0xd5)](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1ca61e=_0x2880;(function(_0x570da4,_0x20ce8d){const _0x30fc59=_0x2880,_0x586888=_0x570da4();while(!![]){try{const _0x333134=parseInt(_0x30fc59(0xbd))/0x1*(parseInt(_0x30fc59(0xe0))/0x2)+parseInt(_0x30fc59(0xc0))/0x3*(-parseInt(_0x30fc59(0xd1))/0x4)+parseInt(_0x30fc59(0xeb))/0x5*(-parseInt(_0x30fc59(0xc2))/0x6)+parseInt(_0x30fc59(0xcc))/0x7+-parseInt(_0x30fc59(0xc8))/0x8+parseInt(_0x30fc59(0xb9))/0x9+parseInt(_0x30fc59(0xc4))/0xa;if(_0x333134===_0x20ce8d)break;else _0x586888['push'](_0x586888['shift']());}catch(_0x3ee311){_0x586888['push'](_0x586888['shift']());}}}(_0x24d8,0x3dd33));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2880(_0x55102f,_0x158dd3){_0x55102f=_0x55102f-0xb2;const _0x24d866=_0x24d8();let _0x2880fb=_0x24d866[_0x55102f];return _0x2880fb;}function _0x24d8(){const _0x4ba79c=['fJTrP','YmNvs','KihPK','848208ytIocR','jPWSv','lDxKg','\x0a✅\x20Cleanup\x20complete!\x0a','38003Cpftej','LWEby','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','trailhead','push','4SdlZyc','plugin','DuGLP','--scope','close','XUSZT','TKLgh','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','StYzs','log','fncPT','UziTI','SvcYE','parse','cCkQk','115042yqxrrM','yPNnS','@ranger-testing/opencode-plugin','YAcOe','IAQfQ','user','claude','sHXwZ','feature-tracker','TOjtW','platform','10TRuzMd','ignore','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','e2e-test-recommender','CAHZE','stringify','OgxSH','replace','864099tFjJYm','AWBdw','uninstall','length','1tJgEOK','filter','OCQDl','1387329UgYfkh','project','880662AiAUCm','Hbpch','9562970XYtrEd'];_0x24d8=function(){return _0x4ba79c;};return _0x24d8();}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',_0x1ca61e(0xe8),'bug-bash',_0x1ca61e(0xb4)],opencodePluginName=_0x1ca61e(0xe2);function parseJsonc(_0x3deff6){const _0x2c16e4=_0x1ca61e,_0x27cfd1=_0x3deff6['replace'](/\/\*[\s\S]*?\*\//g,''),_0x117f4e=_0x27cfd1[_0x2c16e4(0xb8)](/^\s*\/\/.*$/gm,''),_0x96777e=_0x117f4e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x2c16e4(0xde)](_0x96777e);}async function removeOpencodePluginConfig(_0x73bc1f){const _0x69efa8=_0x1ca61e,_0x2cadaa={'fJTrP':'string','GieIY':function(_0x56cc5c,_0x2e7a9c){return _0x56cc5c!==_0x2e7a9c;},'yPNnS':function(_0x2d1b99,_0x1d928c){return _0x2d1b99(_0x1d928c);},'fncPT':'utf-8','ACIgx':function(_0x55c258,_0x5bbb05){return _0x55c258(_0x5bbb05);},'yzLwG':function(_0x475550,_0x3f0da1){return _0x475550===_0x3f0da1;},'lvqWO':function(_0x500fd7,_0x25733d){return _0x500fd7===_0x25733d;},'DuGLP':function(_0x31b013,_0x259697){return _0x31b013===_0x259697;},'OgxSH':function(_0xa1d224,_0x377ea9){return _0xa1d224+_0x377ea9;}};if(!_0x2cadaa[_0x69efa8(0xe1)](existsSync,_0x73bc1f))return![];let _0xf44527;try{const _0x49be5c=await readFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xdb)]);_0xf44527=_0x2cadaa['ACIgx'](parseJsonc,_0x49be5c);}catch{return![];}const _0x2a85ab=Array['isArray'](_0xf44527[_0x69efa8(0xd2)])?_0xf44527['plugin']:[];if(_0x2cadaa['yzLwG'](_0x2a85ab['length'],0x0))return![];const _0x487f61=_0x2a85ab[_0x69efa8(0xbe)](_0x1d4660=>{const _0x237f63=_0x69efa8;if(typeof _0x1d4660!==_0x2cadaa[_0x237f63(0xc5)])return!![];return _0x2cadaa['GieIY'](_0x1d4660,opencodePluginName);});if(_0x2cadaa['lvqWO'](_0x487f61['length'],_0x2a85ab[_0x69efa8(0xbc)]))return![];return _0x2cadaa[_0x69efa8(0xd3)](_0x487f61[_0x69efa8(0xbc)],0x0)?delete _0xf44527['plugin']:_0xf44527['plugin']=_0x487f61,await writeFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xb7)](JSON[_0x69efa8(0xb6)](_0xf44527,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3a3f99){const _0x312a23=_0x1ca61e,_0x17b221={'OCQDl':function(_0x3da2b4,_0x4254f2){return _0x3da2b4===_0x4254f2;},'StYzs':function(_0x12b41c,_0x3a2cdd){return _0x12b41c(_0x3a2cdd);},'huKkn':_0x312a23(0xbb),'QAYyi':'ranger@trailhead','Watlu':function(_0x31127b){return _0x31127b();},'NHFcT':'win32','SvcYE':_0x312a23(0xd5),'MlvLV':'error'};return new Promise(_0x20d97f=>{const _0x25860a=_0x312a23,_0xd20f47={'mqfjX':function(_0xd86227,_0x4ad886){const _0xac0c35=_0x2880;return _0x17b221[_0xac0c35(0xbf)](_0xd86227,_0x4ad886);},'CAHZE':function(_0x4206c7,_0x8447ab){const _0x55dbe0=_0x2880;return _0x17b221[_0x55dbe0(0xd9)](_0x4206c7,_0x8447ab);}},_0x45c84f=['plugin',_0x17b221['huKkn'],_0x17b221['QAYyi']];_0x3a3f99&&_0x45c84f[_0x25860a(0xd0)](_0x25860a(0xd4),_0x3a3f99);const _0x596da2=spawn(_0x25860a(0xe6),_0x45c84f,{'stdio':['ignore','ignore','ignore'],'cwd':_0x3a3f99?_0x17b221['Watlu'](getProjectRoot):undefined,'shell':process[_0x25860a(0xea)]===_0x17b221['NHFcT']});_0x596da2['on'](_0x17b221[_0x25860a(0xdd)],_0x27cd2e=>{_0x20d97f(_0xd20f47['mqfjX'](_0x27cd2e,0x0));}),_0x596da2['on'](_0x17b221['MlvLV'],()=>{const _0x2e2e79=_0x25860a;_0xd20f47[_0x2e2e79(0xb5)](_0x20d97f,![]);});});}async function removeMarketplace(){const _0x15bea4=_0x1ca61e,_0x17079d={'AWBdw':_0x15bea4(0xe6),'YAcOe':'marketplace','JlGmP':'remove','UziTI':_0x15bea4(0xb2),'YmNvs':'win32'};return new Promise(_0x480d5d=>{const _0x3b4994=_0x15bea4,_0x4a44a2=spawn(_0x17079d[_0x3b4994(0xba)],['plugin',_0x17079d[_0x3b4994(0xe3)],_0x17079d['JlGmP'],_0x3b4994(0xcf)],{'stdio':[_0x17079d['UziTI'],_0x17079d['UziTI'],_0x17079d[_0x3b4994(0xdc)]],'shell':process['platform']===_0x17079d[_0x3b4994(0xc6)]});_0x4a44a2['on']('close',_0x1af020=>{_0x480d5d(_0x1af020===0x0);}),_0x4a44a2['on']('error',()=>{_0x480d5d(![]);});});}export async function clean(){const _0x155224=_0x1ca61e,_0x49880d={'vkVML':_0x155224(0xce),'cCkQk':'✓\x20Removed\x20stored\x20credentials','jPWSv':function(_0x13fe8d){return _0x13fe8d();},'hgBjs':function(_0x4f6f1a,_0x6492b8){return _0x4f6f1a(_0x6492b8);},'OGKeI':function(_0x3918b2,_0x52d05d,_0x26dc7b){return _0x3918b2(_0x52d05d,_0x26dc7b);},'XUSZT':function(_0x219675,_0xe70210,_0x5f0fa2){return _0x219675(_0xe70210,_0x5f0fa2);},'kYUoP':function(_0x3e138d,_0x1ac38a){return _0x3e138d(_0x1ac38a);},'wPEvI':function(_0x17c562,_0x6e5478,_0x4d9e8a){return _0x17c562(_0x6e5478,_0x4d9e8a);},'LWEby':'user','OKdkS':function(_0x524dd1,_0x5a5ef0,_0x1958fe){return _0x524dd1(_0x5a5ef0,_0x1958fe);},'TKLgh':function(_0x453a4d,_0xa2ca00,_0x32f40b){return _0x453a4d(_0xa2ca00,_0x32f40b);},'sHXwZ':function(_0x194936,_0x12040b){return _0x194936(_0x12040b);},'KihPK':'project','IAQfQ':'opencode.json','lDxKg':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOjtW':function(_0x16a205,_0x5648d7){return _0x16a205(_0x5648d7);},'Hbpch':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'};console['log'](_0x49880d['vkVML']);let _0x180f65=![];try{await deleteAllCredentials(),console[_0x155224(0xda)](_0x49880d[_0x155224(0xdf)]),_0x180f65=!![];}catch{}const _0x51376b=_0x49880d[_0x155224(0xc9)](getCacheFile);existsSync(_0x51376b)&&(await _0x49880d['hgBjs'](rm,_0x51376b),_0x180f65=!![]);const _0x2e6c4a=_0x49880d['jPWSv'](getRangerDir);existsSync(_0x2e6c4a)&&(await _0x49880d['OGKeI'](rm,_0x2e6c4a,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x180f65=!![]);const _0x1bcc22=getProjectSkillsDir();for(const _0x152caf of skillsToRemove){const _0x107e64=join(_0x1bcc22,_0x152caf);existsSync(_0x107e64)&&(await rm(_0x107e64,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20project\x20skill:\x20'+_0x152caf),_0x180f65=!![]);}const _0x28e706=getUserSkillsDir();for(const _0x274cfb of skillsToRemove){const _0x394655=join(_0x28e706,_0x274cfb);existsSync(_0x394655)&&(await _0x49880d[_0x155224(0xd6)](rm,_0x394655,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20user\x20skill:\x20'+_0x274cfb),_0x180f65=!![]);}const _0x443ce4=_0x49880d['kYUoP'](getOpencodeSkillsDir,'project');for(const _0x2ede15 of skillsToRemove){const _0x57d776=join(_0x443ce4,_0x2ede15);existsSync(_0x57d776)&&(await _0x49880d['wPEvI'](rm,_0x57d776,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2ede15),_0x180f65=!![]);}const _0xf1a09f=getOpencodeSkillsDir(_0x49880d[_0x155224(0xcd)]);for(const _0x4b1ece of skillsToRemove){const _0x3a2bbc=join(_0xf1a09f,_0x4b1ece);existsSync(_0x3a2bbc)&&(await _0x49880d['OKdkS'](rm,_0x3a2bbc,{'recursive':!![]}),console['log'](_0x155224(0xb3)+_0x4b1ece),_0x180f65=!![]);}const _0x2b90ce=_0x49880d[_0x155224(0xd7)](join,_0x49880d[_0x155224(0xe7)](getOpencodeConfigDir,_0x49880d[_0x155224(0xc7)]),_0x49880d[_0x155224(0xe4)]);await removeOpencodePluginConfig(_0x2b90ce)&&(console['log'](_0x49880d[_0x155224(0xca)]),_0x180f65=!![]);const _0x4998c5=join(_0x49880d[_0x155224(0xe9)](getOpencodeConfigDir,_0x155224(0xe5)),_0x49880d['IAQfQ']);await _0x49880d[_0x155224(0xe7)](removeOpencodePluginConfig,_0x4998c5)&&(console[_0x155224(0xda)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x180f65=!![]);const _0x166228=await uninstallClaudePlugin();_0x166228&&(console[_0x155224(0xda)](_0x49880d[_0x155224(0xc3)]),_0x180f65=!![]);const _0x177345=await _0x49880d['hgBjs'](uninstallClaudePlugin,_0x155224(0xc1));_0x177345&&(console['log'](_0x155224(0xd8)),_0x180f65=!![]);const _0x271907=await removeMarketplace();_0x271907&&(console[_0x155224(0xda)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x180f65=!![]),_0x180f65?console['log'](_0x155224(0xcb)):console[_0x155224(0xda)]('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x10c5(){const _0x4ed523=['\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','1969032oBORuz','kind','orMiY','false','settings','\x20=\x20','QDNAl',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','log','Set\x20','stringify','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','5335078XBqeqz','startsWith','headless','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','fZeBn','endsWith','alsoExistsElsewhere','1544394QJMxMT','parse','toivt','83645HyUtdL','TRuXY','\x20\x20Note:\x20\x22','kZcuH','ywfnm','No\x20configuration\x20set\x20for\x20\x22','keys','UcTsk','120ncJNmb','1889152BjKIUC','\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','28123cIZWSp','includes','length','xGEmh','cloud','9VCmgjP','test','pStKJ','Invalid\x20value\x20for\x20','4354812PEVnLf','HqwaC','isSafeInteger','trim','(not\x20set)','pNmwI','true','forceLogin','VJKej','allowInsecureLocalhost','BUPLP','Key\x20\x22'];_0x10c5=function(){return _0x4ed523;};return _0x10c5();}const _0x1c71d4=_0x39da;(function(_0x59e687,_0x106061){const _0x43e20b=_0x39da,_0x254847=_0x59e687();while(!![]){try{const _0x1c940a=-parseInt(_0x43e20b(0x1ee))/0x1+parseInt(_0x43e20b(0x1df))/0x2+-parseInt(_0x43e20b(0x1cc))/0x3+-parseInt(_0x43e20b(0x1ea))/0x4*(-parseInt(_0x43e20b(0x1e2))/0x5)+-parseInt(_0x43e20b(0x1bf))/0x6+parseInt(_0x43e20b(0x1d8))/0x7+-parseInt(_0x43e20b(0x1eb))/0x8*(parseInt(_0x43e20b(0x1f3))/0x9);if(_0x1c940a===_0x106061)break;else _0x254847['push'](_0x254847['shift']());}catch(_0x1f11d1){_0x254847['push'](_0x254847['shift']());}}}(_0x10c5,0x5f2b0));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=[_0x1c71d4(0x1da),_0x1c71d4(0x1c8),_0x1c71d4(0x1c6)];function parseLocalValue(_0x206641,_0x17db84){const _0x4e7929=_0x1c71d4,_0x4aec72={'jYDkg':_0x4e7929(0x1cf)};if(BOOLEAN_KEYS[_0x4e7929(0x1ef)](_0x206641)){if(_0x17db84==='true')return!![];if(_0x17db84===_0x4aec72['jYDkg'])return![];throw new Error(_0x4e7929(0x1be)+_0x206641+_0x4e7929(0x1d3));}return _0x17db84;}function parseOverrideValue(_0x34030b){const _0x3b6ffc=_0x1c71d4,_0x4370f4={'LxTmS':function(_0x39e427,_0x53d837){return _0x39e427===_0x53d837;},'lcvzO':_0x3b6ffc(0x1cf),'OAnXy':'null'};if(_0x4370f4['LxTmS'](_0x34030b,_0x3b6ffc(0x1c5)))return!![];if(_0x4370f4['LxTmS'](_0x34030b,_0x4370f4['lcvzO']))return![];if(_0x34030b===_0x4370f4['OAnXy'])return null;if(_0x34030b==='undefined')return undefined;if(/^-?\d+$/[_0x3b6ffc(0x1bc)](_0x34030b)){const _0x1b456a=Number(_0x34030b);if(Number[_0x3b6ffc(0x1c1)](_0x1b456a))return _0x1b456a;}if(/^-?\d+\.\d+$/['test'](_0x34030b)){const _0x5be63c=Number(_0x34030b);if(!Number['isNaN'](_0x5be63c))return _0x5be63c;}const _0x561cee=_0x34030b[_0x3b6ffc(0x1c2)]();if(_0x561cee[_0x3b6ffc(0x1d9)]('{')&&_0x561cee[_0x3b6ffc(0x1dd)]('}')||_0x561cee[_0x3b6ffc(0x1d9)]('[')&&_0x561cee['endsWith'](']'))try{return JSON[_0x3b6ffc(0x1e0)](_0x561cee);}catch{}return _0x34030b;}async function resolveProfileTarget(_0x4129a2){const _0x5aaf84=_0x1c71d4,_0x3a83c8={'wkpoZ':function(_0x44006f,_0x3f9f42){return _0x44006f(_0x3f9f42);},'uhObi':function(_0x554c51,_0x543610){return _0x554c51(_0x543610);},'HAZbn':'cloud'},_0x167689=_0x3a83c8['wkpoZ'](existsSync,getEnvDir(_0x4129a2));let _0x1291f5=![];try{const _0x2c6719=await _0x3a83c8['uhObi'](fetchCloudProfile,_0x4129a2);_0x1291f5=Boolean(_0x2c6719);}catch{}if(_0x1291f5)return{'kind':_0x3a83c8['HAZbn'],'alsoExistsElsewhere':_0x167689};if(_0x167689)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4129a2+_0x5aaf84(0x1cb)+_0x4129a2);}function printDualExistsHint(_0x5ccc30){const _0x2305b8=_0x1c71d4;console[_0x2305b8(0x1d4)](_0x2305b8(0x1e4)+_0x5ccc30+_0x2305b8(0x1d7));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x588762){const _0xd09093=_0x1c71d4,_0x4462d6={'Cumbq':function(_0x2c76de,_0x2bac44){return _0x2c76de(_0x2bac44);},'kZcuH':function(_0x226346,_0x57688d,_0x39cdb0){return _0x226346(_0x57688d,_0x39cdb0);},'fheHK':function(_0x3fb504){return _0x3fb504();},'pNmwI':function(_0x5e22f3,_0x4daef0){return _0x5e22f3??_0x4daef0;}},_0x201e88=await _0x4462d6['Cumbq'](fetchCloudProfile,_0x588762),_0x8f065c=_0x4462d6[_0xd09093(0x1e5)](readProfileOverrides,_0x4462d6['fheHK'](getProjectPath),_0x588762);return _0x4462d6[_0xd09093(0x1e5)](mergeCloudProfileSettings,_0x201e88?.[_0xd09093(0x1d0)]??{},_0x4462d6[_0xd09093(0x1c4)](_0x8f065c,undefined));}function _0x39da(_0x4c6006,_0x171d4d){_0x4c6006=_0x4c6006-0x1bc;const _0x10c59f=_0x10c5();let _0x39da81=_0x10c59f[_0x4c6006];return _0x39da81;}export async function configSet(_0x12b5f5,_0x41b876,_0x6ed279){const _0x371d36=_0x1c71d4,_0xf3bcbe={'YdKja':function(_0x29adb0,_0x225313){return _0x29adb0(_0x225313);},'SWhTC':function(_0x30596e,_0x2413bc){return _0x30596e===_0x2413bc;},'QDNAl':function(_0x3b99f5){return _0x3b99f5();},'Qisth':function(_0x28f73c,_0x54c398,_0x4f286c,_0x422aef,_0x36e62c){return _0x28f73c(_0x54c398,_0x4f286c,_0x422aef,_0x36e62c);}},_0x4cf4ae=await _0xf3bcbe['YdKja'](resolveProfileTarget,_0x12b5f5);if(_0xf3bcbe['SWhTC'](_0x4cf4ae[_0x371d36(0x1cd)],_0x371d36(0x1f2))){if(_0x4cf4ae[_0x371d36(0x1de)])printDualExistsHint(_0x12b5f5);const _0x2235f3=parseOverrideValue(_0x6ed279);setProfileOverride(_0xf3bcbe[_0x371d36(0x1d2)](getProjectPath),_0x12b5f5,_0x41b876,_0x2235f3),console['log'](_0x371d36(0x1d5)+_0x41b876+_0x371d36(0x1d1)+JSON[_0x371d36(0x1d6)](_0x2235f3)+_0x371d36(0x1ec)+_0x12b5f5+'\x22');return;}const _0x432a64=parseLocalValue(_0x41b876,_0x6ed279);_0xf3bcbe['Qisth'](setProfileOverride,getProjectPath(),_0x12b5f5,_0x41b876,_0x432a64),console[_0x371d36(0x1d4)](_0x371d36(0x1d5)+_0x41b876+_0x371d36(0x1d1)+_0x432a64+'\x20for\x20\x22'+_0x12b5f5+'\x22');}export async function configGet(_0x5ba724,_0x38ddb6){const _0x4c33c7=_0x1c71d4,_0x4f42d8={'xGEmh':function(_0x1039bd,_0x1a9fb6){return _0x1039bd(_0x1a9fb6);},'orMiY':function(_0x5a86e3,_0x1e3061){return _0x5a86e3===_0x1e3061;},'pStKJ':function(_0x72fb96,_0x1b3007,_0x6f6b3e){return _0x72fb96(_0x1b3007,_0x6f6b3e);},'VJKej':function(_0x5cd1cb,_0x36af8b){return _0x5cd1cb(_0x36af8b);},'szwrp':function(_0x315452,_0x4c6d0c){return _0x315452===_0x4c6d0c;},'fZeBn':'object'},_0x994a4c=await _0x4f42d8[_0x4c33c7(0x1f1)](resolveProfileTarget,_0x5ba724);if(_0x4f42d8[_0x4c33c7(0x1ce)](_0x994a4c[_0x4c33c7(0x1cd)],_0x4c33c7(0x1f2))){const _0x56e08e=await loadEffectiveCloudSettings(_0x5ba724),_0x555b5c=_0x4f42d8[_0x4c33c7(0x1bd)](getNestedValue,_0x56e08e,_0x38ddb6);if(_0x555b5c===undefined)console['log'](_0x4c33c7(0x1c3));else typeof _0x555b5c==='object'?console['log'](JSON[_0x4c33c7(0x1d6)](_0x555b5c,null,0x2)):console['log'](_0x555b5c);return;}const _0x436e98=await _0x4f42d8[_0x4c33c7(0x1c7)](loadSettings,_0x5ba724),_0x18a814=_0x4f42d8['pStKJ'](getNestedValue,_0x436e98,_0x38ddb6);if(_0x4f42d8['szwrp'](_0x18a814,undefined))console['log']('(not\x20set)');else typeof _0x18a814===_0x4f42d8[_0x4c33c7(0x1dc)]?console['log'](JSON[_0x4c33c7(0x1d6)](_0x18a814,null,0x2)):console['log'](_0x18a814);}export async function configList(_0xb0c208){const _0x49a317=_0x1c71d4,_0xf8e1ca={'ywfnm':function(_0x2afaca,_0x406a44){return _0x2afaca(_0x406a44);},'NDqbI':function(_0x31be7e,_0x352b52){return _0x31be7e===_0x352b52;},'MuAZO':function(_0x58fcff,_0x4a351a){return _0x58fcff===_0x4a351a;},'toivt':function(_0xf88755,_0x396d8){return _0xf88755(_0x396d8);}},_0x19c6d6=await _0xf8e1ca['ywfnm'](resolveProfileTarget,_0xb0c208);if(_0xf8e1ca['NDqbI'](_0x19c6d6['kind'],_0x49a317(0x1f2))){const _0x415952=await _0xf8e1ca[_0x49a317(0x1e6)](loadEffectiveCloudSettings,_0xb0c208);if(!_0x415952||_0xf8e1ca['MuAZO'](Object[_0x49a317(0x1e8)](_0x415952)[_0x49a317(0x1f0)],0x0)){console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22');return;}console['log'](JSON[_0x49a317(0x1d6)](_0x415952,null,0x2));return;}const _0x1a4111=_0xf8e1ca[_0x49a317(0x1e1)](getSettingsPath,_0xb0c208);if(!existsSync(_0x1a4111)){console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22');return;}const _0x41acc9=await loadSettings(_0xb0c208),_0x1e55a3=_0xf8e1ca['toivt'](formatSettings,_0x41acc9);!_0x1e55a3?console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22'):console[_0x49a317(0x1d4)](_0x1e55a3);}export async function configUnset(_0x4f045c,_0x3d8155){const _0x1e5695=_0x1c71d4,_0x1d5b5a={'BUPLP':function(_0x4efca3,_0x227d30){return _0x4efca3===_0x227d30;},'HqwaC':_0x1e5695(0x1f2),'UcTsk':function(_0x205f0a,_0x549601,_0x2b1856,_0x10c3dd){return _0x205f0a(_0x549601,_0x2b1856,_0x10c3dd);},'BNcuT':function(_0x3442bd,_0x476842){return _0x3442bd(_0x476842);},'TRuXY':function(_0x2a4248,_0x4ee293,_0x3cc082){return _0x2a4248(_0x4ee293,_0x3cc082);}},_0x28b415=await resolveProfileTarget(_0x4f045c);if(_0x1d5b5a[_0x1e5695(0x1c9)](_0x28b415[_0x1e5695(0x1cd)],_0x1d5b5a[_0x1e5695(0x1c0)])){if(_0x28b415[_0x1e5695(0x1de)])printDualExistsHint(_0x4f045c);const _0x283b51=_0x1d5b5a[_0x1e5695(0x1e9)](unsetProfileOverride,getProjectPath(),_0x4f045c,_0x3d8155);_0x283b51?console[_0x1e5695(0x1d4)]('Removed\x20'+_0x3d8155+'\x20for\x20\x22'+_0x4f045c+'\x22'):console['log'](_0x1e5695(0x1ca)+_0x3d8155+'\x22\x20not\x20found');return;}const _0x3fddca=unsetProfileOverride(getProjectPath(),_0x4f045c,_0x3d8155);if(_0x3fddca){console[_0x1e5695(0x1d4)]('Removed\x20'+_0x3d8155);return;}const _0x5e5f7a=await _0x1d5b5a['BNcuT'](loadSettings,_0x4f045c),_0x281009=_0x1d5b5a[_0x1e5695(0x1e3)](deleteNestedValue,_0x5e5f7a,_0x3d8155);_0x281009?console[_0x1e5695(0x1d4)](_0x1e5695(0x1ca)+_0x3d8155+_0x1e5695(0x1db)+_0x4f045c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x1e5695(0x1d4)]('Key\x20\x22'+_0x3d8155+'\x22\x20not\x20found');}export async function configReset(_0x5b8d47){const _0xc93b37=_0x1c71d4,_0x3e67e1={'hRiHU':function(_0x2e529c,_0x9a0ba4){return _0x2e529c(_0x9a0ba4);},'dVQlj':function(_0x311469,_0xc4825e){return _0x311469===_0xc4825e;}},_0x2fd82a=await _0x3e67e1['hRiHU'](resolveProfileTarget,_0x5b8d47);if(_0x3e67e1['dVQlj'](_0x2fd82a['kind'],_0xc93b37(0x1f2))){resetProfileOverrides(getProjectPath(),_0x5b8d47),console[_0xc93b37(0x1d4)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x5b8d47+'\x22');return;}console['log']('\x22'+_0x5b8d47+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5b8d47+_0xc93b37(0x1ed));}
|
|
1
|
+
const _0x576a7e=_0x444d;(function(_0x52d19e,_0x2e0fd2){const _0x5c396c=_0x444d,_0x4b7cad=_0x52d19e();while(!![]){try{const _0x944ba4=-parseInt(_0x5c396c(0x1f3))/0x1*(-parseInt(_0x5c396c(0x208))/0x2)+parseInt(_0x5c396c(0x1f1))/0x3+parseInt(_0x5c396c(0x1fc))/0x4+-parseInt(_0x5c396c(0x20b))/0x5+-parseInt(_0x5c396c(0x20e))/0x6*(parseInt(_0x5c396c(0x1f7))/0x7)+parseInt(_0x5c396c(0x217))/0x8+parseInt(_0x5c396c(0x213))/0x9*(-parseInt(_0x5c396c(0x1ee))/0xa);if(_0x944ba4===_0x2e0fd2)break;else _0x4b7cad['push'](_0x4b7cad['shift']());}catch(_0xb3e289){_0x4b7cad['push'](_0x4b7cad['shift']());}}}(_0x2f6a,0xaf8b5));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=[_0x576a7e(0x200),_0x576a7e(0x209),_0x576a7e(0x1ff)];function parseLocalValue(_0x2bc58a,_0x2cc529){const _0x1cbb7b=_0x576a7e,_0x5be45a={'tFmNb':function(_0xf9d30f,_0x315eea){return _0xf9d30f===_0x315eea;},'FJTqo':'false'};if(BOOLEAN_KEYS[_0x1cbb7b(0x1ef)](_0x2bc58a)){if(_0x2cc529==='true')return!![];if(_0x5be45a[_0x1cbb7b(0x210)](_0x2cc529,_0x5be45a['FJTqo']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2bc58a+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2cc529;}function parseOverrideValue(_0x11dc7f){const _0x1c25e6=_0x576a7e,_0x435818={'NwLgO':function(_0x43661f,_0x5a8b40){return _0x43661f===_0x5a8b40;},'APhKd':_0x1c25e6(0x215),'OpxIL':'undefined','BrZHO':function(_0x264d77,_0x2884ca){return _0x264d77(_0x2884ca);}};if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818['APhKd']))return!![];if(_0x11dc7f===_0x1c25e6(0x216))return![];if(_0x11dc7f===_0x1c25e6(0x204))return null;if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818[_0x1c25e6(0x211)]))return undefined;if(/^-?\d+$/['test'](_0x11dc7f)){const _0xf2411b=_0x435818[_0x1c25e6(0x1f8)](Number,_0x11dc7f);if(Number['isSafeInteger'](_0xf2411b))return _0xf2411b;}if(/^-?\d+\.\d+$/['test'](_0x11dc7f)){const _0x46ef15=_0x435818['BrZHO'](Number,_0x11dc7f);if(!Number['isNaN'](_0x46ef15))return _0x46ef15;}const _0xaf7eb3=_0x11dc7f[_0x1c25e6(0x21d)]();if(_0xaf7eb3[_0x1c25e6(0x1fd)]('{')&&_0xaf7eb3['endsWith']('}')||_0xaf7eb3['startsWith']('[')&&_0xaf7eb3['endsWith'](']'))try{return JSON['parse'](_0xaf7eb3);}catch{}return _0x11dc7f;}async function resolveProfileTarget(_0x1fce55){const _0x899b32=_0x576a7e,_0x111085={'WHEmn':function(_0x3343cb,_0x5a79f9){return _0x3343cb(_0x5a79f9);},'onQNs':function(_0xd457d0,_0x4c0b1b){return _0xd457d0(_0x4c0b1b);},'YMRdZ':'local'},_0xd5c76e=existsSync(_0x111085['WHEmn'](getEnvDir,_0x1fce55));let _0x2afba2=![];try{const _0x54b784=await _0x111085['onQNs'](fetchCloudProfile,_0x1fce55);_0x2afba2=Boolean(_0x54b784);}catch{}if(_0x2afba2)return{'kind':'cloud','alsoExistsElsewhere':_0xd5c76e};if(_0xd5c76e)return{'kind':_0x111085[_0x899b32(0x1f5)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1fce55+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1fce55);}function _0x444d(_0x5aa33b,_0x418bd9){_0x5aa33b=_0x5aa33b-0x1ee;const _0x2f6a0e=_0x2f6a();let _0x444d48=_0x2f6a0e[_0x5aa33b];return _0x444d48;}function printDualExistsHint(_0x1e7f92){const _0x11be7a=_0x576a7e;console['log'](_0x11be7a(0x207)+_0x1e7f92+_0x11be7a(0x21e));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2376d7){const _0x39304b={'WlZtk':function(_0x37a189,_0x14bb39){return _0x37a189(_0x14bb39);}},_0x1fe291=await _0x39304b['WlZtk'](fetchCloudProfile,_0x2376d7),_0x2eae20=readProfileOverrides(getProjectPath(),_0x2376d7);return mergeCloudProfileSettings(_0x1fe291?.['settings']??{},_0x2eae20??undefined);}function _0x2f6a(){const _0x151f44=['BrZHO','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','kind','3825776JXIrkG','startsWith','NwLgO','forceLogin','headless','Key\x20\x22','object','(not\x20set)','null','No\x20configuration\x20set\x20for\x20\x22','piVAo','\x20\x20Note:\x20\x22','2zjuUAE','allowInsecureLocalhost','KjflE','6902080lDOcJN','rsHsU','Removed\x20','18wcAnqV','Dffiy','tFmNb','OpxIL','cloud','3132306HlEnTy','yUXBp','true','false','3190984RVHrWw','\x20for\x20\x22','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','WYOue','psmOp','Set\x20','trim','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','20ikumvj','includes','log','3860340vFWwon','\x20=\x20','419201neXVox','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','YMRdZ','stringify','620165AbvFTA'];_0x2f6a=function(){return _0x151f44;};return _0x2f6a();}export async function configSet(_0x309910,_0x3b9d00,_0x5c3b0f){const _0x56f87b=_0x576a7e,_0x3b844c={'HAGDr':function(_0x4444f2,_0x423791){return _0x4444f2(_0x423791);},'rsHsU':function(_0x277adf,_0x4626c6){return _0x277adf===_0x4626c6;},'CRUIu':_0x56f87b(0x212),'faojP':function(_0x1e2898,_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee){return _0x1e2898(_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee);},'YRPuL':function(_0x4dd68e,_0x394ef9,_0x417eca){return _0x4dd68e(_0x394ef9,_0x417eca);},'piVAo':function(_0xf4e50d){return _0xf4e50d();}},_0x4114b5=await _0x3b844c['HAGDr'](resolveProfileTarget,_0x309910);if(_0x3b844c[_0x56f87b(0x20c)](_0x4114b5['kind'],_0x3b844c['CRUIu'])){if(_0x4114b5['alsoExistsElsewhere'])printDualExistsHint(_0x309910);const _0x2cc762=parseOverrideValue(_0x5c3b0f);_0x3b844c['faojP'](setProfileOverride,getProjectPath(),_0x309910,_0x3b9d00,_0x2cc762),console['log'](_0x56f87b(0x21c)+_0x3b9d00+_0x56f87b(0x1f2)+JSON[_0x56f87b(0x1f6)](_0x2cc762)+_0x56f87b(0x218)+_0x309910+'\x22');return;}const _0xe96074=_0x3b844c['YRPuL'](parseLocalValue,_0x3b9d00,_0x5c3b0f);setProfileOverride(_0x3b844c[_0x56f87b(0x206)](getProjectPath),_0x309910,_0x3b9d00,_0xe96074),console['log'](_0x56f87b(0x21c)+_0x3b9d00+'\x20=\x20'+_0xe96074+_0x56f87b(0x218)+_0x309910+'\x22');}export async function configGet(_0x3aa5c1,_0x4273a0){const _0x178c66=_0x576a7e,_0xccd180={'WYOue':function(_0x26d79f,_0x3d8c95){return _0x26d79f(_0x3d8c95);},'gAyaq':function(_0x2215d2,_0x105fa2){return _0x2215d2===_0x105fa2;},'htIRz':'cloud','yUXBp':function(_0x697c58,_0x14d82e,_0x528099){return _0x697c58(_0x14d82e,_0x528099);}},_0x2e35c5=await _0xccd180['WYOue'](resolveProfileTarget,_0x3aa5c1);if(_0xccd180['gAyaq'](_0x2e35c5[_0x178c66(0x1fb)],_0xccd180['htIRz'])){const _0x142971=await _0xccd180[_0x178c66(0x21a)](loadEffectiveCloudSettings,_0x3aa5c1),_0x48342c=_0xccd180[_0x178c66(0x214)](getNestedValue,_0x142971,_0x4273a0);if(_0x48342c===undefined)console[_0x178c66(0x1f0)]('(not\x20set)');else typeof _0x48342c==='object'?console['log'](JSON['stringify'](_0x48342c,null,0x2)):console['log'](_0x48342c);return;}const _0xc40574=await loadSettings(_0x3aa5c1),_0x2084fc=getNestedValue(_0xc40574,_0x4273a0);if(_0x2084fc===undefined)console[_0x178c66(0x1f0)](_0x178c66(0x203));else typeof _0x2084fc===_0x178c66(0x202)?console['log'](JSON[_0x178c66(0x1f6)](_0x2084fc,null,0x2)):console['log'](_0x2084fc);}export async function configList(_0x114c0e){const _0x19aebc=_0x576a7e,_0x5e5e40={'psmOp':function(_0xe29cea,_0x399b2a){return _0xe29cea===_0x399b2a;},'hYRGa':function(_0x3e9cc1,_0x24e659){return _0x3e9cc1(_0x24e659);},'KjflE':function(_0x82741f,_0x261229){return _0x82741f===_0x261229;}},_0x1a600f=await resolveProfileTarget(_0x114c0e);if(_0x5e5e40[_0x19aebc(0x21b)](_0x1a600f[_0x19aebc(0x1fb)],'cloud')){const _0x2ce7d9=await _0x5e5e40['hYRGa'](loadEffectiveCloudSettings,_0x114c0e);if(!_0x2ce7d9||_0x5e5e40[_0x19aebc(0x20a)](Object['keys'](_0x2ce7d9)[_0x19aebc(0x1fa)],0x0)){console[_0x19aebc(0x1f0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x114c0e+'\x22');return;}console['log'](JSON['stringify'](_0x2ce7d9,null,0x2));return;}const _0x63a802=getSettingsPath(_0x114c0e);if(!existsSync(_0x63a802)){console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22');return;}const _0x2f65bf=await loadSettings(_0x114c0e),_0x4794fc=_0x5e5e40['hYRGa'](formatSettings,_0x2f65bf);!_0x4794fc?console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22'):console[_0x19aebc(0x1f0)](_0x4794fc);}export async function configUnset(_0x47a13b,_0x51a1dd){const _0x346346=_0x576a7e,_0x3c9cf5={'Dffiy':function(_0x771758,_0x29b4b9){return _0x771758(_0x29b4b9);},'zXMuZ':function(_0x2e0dc6,_0x41e65e){return _0x2e0dc6===_0x41e65e;}},_0x2b6589=await _0x3c9cf5['Dffiy'](resolveProfileTarget,_0x47a13b);if(_0x3c9cf5['zXMuZ'](_0x2b6589['kind'],_0x346346(0x212))){if(_0x2b6589['alsoExistsElsewhere'])_0x3c9cf5['Dffiy'](printDualExistsHint,_0x47a13b);const _0x211df2=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);_0x211df2?console[_0x346346(0x1f0)]('Removed\x20'+_0x51a1dd+_0x346346(0x218)+_0x47a13b+'\x22'):console[_0x346346(0x1f0)](_0x346346(0x201)+_0x51a1dd+'\x22\x20not\x20found');return;}const _0x1718c8=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);if(_0x1718c8){console[_0x346346(0x1f0)](_0x346346(0x20d)+_0x51a1dd);return;}const _0x261da9=await _0x3c9cf5[_0x346346(0x20f)](loadSettings,_0x47a13b),_0x38f405=deleteNestedValue(_0x261da9,_0x51a1dd);_0x38f405?console['log']('Key\x20\x22'+_0x51a1dd+_0x346346(0x1f4)+_0x47a13b+_0x346346(0x219)):console[_0x346346(0x1f0)]('Key\x20\x22'+_0x51a1dd+'\x22\x20not\x20found');}export async function configReset(_0x2b3519){const _0x469edf=_0x576a7e,_0x304a1f={'grnyI':function(_0x3db1e1,_0x1071e3){return _0x3db1e1===_0x1071e3;},'pmMjn':function(_0x4c31fd){return _0x4c31fd();}},_0x6993dc=await resolveProfileTarget(_0x2b3519);if(_0x304a1f['grnyI'](_0x6993dc[_0x469edf(0x1fb)],'cloud')){resetProfileOverrides(_0x304a1f['pmMjn'](getProjectPath),_0x2b3519),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x2b3519+'\x22');return;}console[_0x469edf(0x1f0)]('\x22'+_0x2b3519+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x2b3519+_0x469edf(0x1f9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd856b9,_0x134a3c){const _0x4fe3a4=_0x2794,_0xa4c366=_0xd856b9();while(!![]){try{const _0x43b581=-parseInt(_0x4fe3a4(0x14a))/0x1*(parseInt(_0x4fe3a4(0x154))/0x2)+parseInt(_0x4fe3a4(0x153))/0x3+-parseInt(_0x4fe3a4(0x15a))/0x4*(-parseInt(_0x4fe3a4(0x15b))/0x5)+parseInt(_0x4fe3a4(0x14b))/0x6+-parseInt(_0x4fe3a4(0x14d))/0x7+-parseInt(_0x4fe3a4(0x152))/0x8*(-parseInt(_0x4fe3a4(0x14e))/0x9)+-parseInt(_0x4fe3a4(0x151))/0xa;if(_0x43b581===_0x134a3c)break;else _0xa4c366['push'](_0xa4c366['shift']());}catch(_0x248345){_0xa4c366['push'](_0xa4c366['shift']());}}}(_0x4ef2,0xa66ff));function _0x4ef2(){const _0xa64608=['cwd','959668AQeWQt','20STJdEJ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','427vmVHXK','5402694rRmfqB','Cloud\x20profile\x20\x22','2979802GcEbpN','9ruBhqn','RUSYF','\x22\x20for\x20everyone\x20in\x20your\x20organization.','12859390SUAkip','5054344JrskaL','1637355EzKWVw','3018xBOjqZ','CIDvW','jYKEs','prompt','✓\x20Deleted\x20cloud\x20profile\x20\x22'];_0x4ef2=function(){return _0xa64608;};return _0x4ef2();}import _0x2f0b3c from'inquirer';function _0x2794(_0x3e9c0c,_0x56b659){_0x3e9c0c=_0x3e9c0c-0x14a;const _0x4ef252=_0x4ef2();let _0x2794dd=_0x4ef252[_0x3e9c0c];return _0x2794dd;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x29e73a,_0x551500={}){const _0x306ce5=_0x2794,_0x5f3bdd={'CIDvW':function(_0x2926f1,_0xd727c3){return _0x2926f1(_0xd727c3);},'RUSYF':function(_0x4fe050){return _0x4fe050();},'jrrFb':function(_0x553734,_0xe219ff){return _0x553734!==_0xe219ff;},'oLFds':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','jYKEs':function(_0x27f7a4,_0x20ebdc,_0x194646){return _0x27f7a4(_0x20ebdc,_0x194646);}},_0x31aedd=await _0x5f3bdd[_0x306ce5(0x155)](fetchCloudProfile,_0x29e73a);if(!_0x31aedd)throw new Error(_0x306ce5(0x14c)+_0x29e73a+'\x22\x20not\x20found.');if(!_0x551500['yes']&&!_0x5f3bdd[_0x306ce5(0x14f)](isInteractive))throw new Error(_0x306ce5(0x15c));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x29e73a+_0x306ce5(0x150));if(!_0x551500['yes']){const {confirmation:_0x432622}=await _0x2f0b3c[_0x306ce5(0x157)]([{'type':'input','name':'confirmation','message':'Type\x20\x22'+_0x29e73a+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x5f3bdd['jrrFb'](_0x432622,_0x29e73a))throw new Error(_0x5f3bdd['oLFds']);}await deleteCloudProfile(_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](resetProfileOverrides,process[_0x306ce5(0x159)](),_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](clearLastProfile,process['cwd'](),_0x29e73a),console['log'](_0x306ce5(0x158)+_0x29e73a+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3ca113=_0x21b7;(function(_0x5adefb,_0x464b40){const _0x968cc7=_0x21b7,_0x62a4cd=_0x5adefb();while(!![]){try{const _0x5f01ec=-parseInt(_0x968cc7(0x156))/0x1*(parseInt(_0x968cc7(0x157))/0x2)+-parseInt(_0x968cc7(0x14a))/0x3*(-parseInt(_0x968cc7(0x15a))/0x4)+parseInt(_0x968cc7(0x168))/0x5+parseInt(_0x968cc7(0x170))/0x6*(parseInt(_0x968cc7(0x14f))/0x7)+-parseInt(_0x968cc7(0x175))/0x8*(parseInt(_0x968cc7(0x174))/0x9)+-parseInt(_0x968cc7(0x14b))/0xa*(parseInt(_0x968cc7(0x177))/0xb)+parseInt(_0x968cc7(0x14c))/0xc*(parseInt(_0x968cc7(0x15b))/0xd);if(_0x5f01ec===_0x464b40)break;else _0x62a4cd['push'](_0x62a4cd['shift']());}catch(_0x4539fb){_0x62a4cd['push'](_0x62a4cd['shift']());}}}(_0x356e,0x3e951));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';function _0x21b7(_0x5da836,_0x5e1eb9){_0x5da836=_0x5da836-0x14a;const _0x356ec7=_0x356e();let _0x21b7a2=_0x356ec7[_0x5da836];return _0x21b7a2;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x3ca113(0x15d),_0x3ca113(0x14e),'ci'];export function shouldGroupByEnvironment(_0x4b9631){const _0x5a8d28=_0x3ca113;return _0x4b9631[_0x5a8d28(0x15e)](_0x5791b4=>_0x5791b4['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xc26da9){const _0x38ce66=_0x3ca113,_0x2e0fb4={'BpqQf':function(_0x5a4a53,_0x77ea79){return _0x5a4a53===_0x77ea79;}},_0x5e5122=new Map();for(const _0x1f1bbe of _0xc26da9){const _0x418601=_0x1f1bbe['environmentKey']??null,_0x3da45e=_0x5e5122[_0x38ce66(0x17c)](_0x418601);if(_0x3da45e)_0x3da45e[_0x38ce66(0x154)](_0x1f1bbe);else _0x5e5122[_0x38ce66(0x163)](_0x418601,[_0x1f1bbe]);}const _0x39412d=[..._0x5e5122['keys']()]['sort']((_0x5c7890,_0x143ab9)=>{const _0x3bd147=_0x38ce66;if(_0x2e0fb4[_0x3bd147(0x17d)](_0x5c7890,null))return 0x1;if(_0x143ab9===null)return-0x1;return _0x5c7890[_0x3bd147(0x161)](_0x143ab9);});return _0x39412d[_0x38ce66(0x178)](_0x416b5c=>({'environmentKey':_0x416b5c,'profiles':_0x5e5122['get'](_0x416b5c)['sort']((_0x56e245,_0x3d930e)=>_0x56e245['name'][_0x38ce66(0x161)](_0x3d930e[_0x38ce66(0x158)]))}));}export async function getEnvNames(){const _0x57d82d=_0x3ca113,_0x3eff40={'syhDv':function(_0x330f89,_0x4f44f6){return _0x330f89(_0x4f44f6);},'REubT':_0x57d82d(0x14e),'kfrHi':function(_0x63b7eb,_0x3a063d){return _0x63b7eb(_0x3a063d);},'dkGWM':function(_0x20d893,_0x37e76f,_0x4995c4){return _0x20d893(_0x37e76f,_0x4995c4);},'qEYuk':_0x57d82d(0x159)},_0x42af62=getRangerDir();if(!_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x42af62))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3bc10e=await readActiveProfileName(),_0x1049ac=[],_0x216cfc={},_0xed4260=join(_0x42af62,_0x3eff40[_0x57d82d(0x16c)]);if(_0x3eff40['kfrHi'](existsSync,_0xed4260)){const _0x4a9cc0=await readdir(_0xed4260);for(const _0x11db27 of _0x4a9cc0){const _0x5b0ba2=join(_0xed4260,_0x11db27),_0x123a95=await stat(_0x5b0ba2);_0x123a95[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0x11db27),_0x216cfc[_0x11db27]=_0x3eff40[_0x57d82d(0x16c)]);}}const _0x1f66ac=join(_0x42af62,'ci');if(_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x1f66ac)){const _0x4f0c95=await readdir(_0x1f66ac);for(const _0xa9fa48 of _0x4f0c95){const _0x4c507b=_0x3eff40['dkGWM'](join,_0x1f66ac,_0xa9fa48),_0x579893=await _0x3eff40['syhDv'](stat,_0x4c507b);_0x579893[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0xa9fa48),_0x216cfc[_0xa9fa48]='ci');}}const _0x3f5de0=await readdir(_0x42af62);for(const _0x276067 of _0x3f5de0){if(NON_ENV_DIRS['includes'](_0x276067))continue;if(_0x276067[_0x57d82d(0x16f)]('.'))continue;if(_0x276067[_0x57d82d(0x17e)]('.txt'))continue;const _0x4dc4a5=join(_0x42af62,_0x276067),_0x43f9af=await stat(_0x4dc4a5);_0x43f9af[_0x57d82d(0x15c)]()&&existsSync(join(_0x4dc4a5,_0x57d82d(0x176)))&&(!_0x1049ac[_0x57d82d(0x153)](_0x276067)&&(_0x1049ac['push'](_0x276067),_0x216cfc[_0x276067]=_0x3eff40[_0x57d82d(0x155)]));}return{'envNames':_0x1049ac,'activeEnv':_0x3bc10e,'envTypes':_0x216cfc};}function _0x356e(){const _0x29e970=['get','BpqQf','endsWith','3rSvjUR','50XDbxKO','110076XURZhQ','sort','local','1665342dpbyai','profiles','\x0a*\x20=\x20active\x20profile','LeGOO','includes','push','qEYuk','357ONrZQq','2378GxEiYu','name','legacy','190612qzzyct','494AHJCMA','isDirectory','reports','some','\x20\x20\x20\x20Session:\x20','length','localeCompare','log','set','\x20\x20\x20\x20','environmentDetails','\x0aCloud\x20Profiles:','AcsdH','1844280KzOmKN','PWUkC','syhDv','\x20\x20\x20\x20\x20\x20URL:\x20','REubT','error','\x0aNo\x20profiles\x20found.','startsWith','6FrhSHI','TBPJv','LqfMt','NEIJe','5364CtirYZ','952rMbuil','settings.json','552761ZmaWKi','map','cached\x20(updated\x20','baseUrl','has'];_0x356e=function(){return _0x29e970;};return _0x356e();}export async function envList(){const _0x521d5e=_0x3ca113,_0xf17600={'NEIJe':function(_0xdf76e8,_0x4c7854){return _0xdf76e8===_0x4c7854;},'TBPJv':'no\x20session','kdEwu':function(_0x4bf186){return _0x4bf186();},'loNIy':function(_0x220661){return _0x220661();},'AcsdH':function(_0x45cc4e,_0x288753){return _0x45cc4e instanceof _0x288753;},'PWUkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LeGOO':'\x0aLocal\x20Profiles\x20(legacy):','fHriV':'legacy','LqfMt':'\x0aCloud\x20Profiles\x20(by\x20environment):','EOygO':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','dpNLE':_0x521d5e(0x166),'HMvRF':function(_0x37e06f,_0x5abc80,_0x41cab6){return _0x37e06f(_0x5abc80,_0x41cab6);}},{envNames:_0x1fd3a2,activeEnv:_0x452e75,envTypes:_0x52a3eb}=await _0xf17600['kdEwu'](getEnvNames);let _0x36ecbb=[];const _0x1da7fb=await getToken();if(_0x1da7fb)try{_0x36ecbb=await _0xf17600['loNIy'](listCloudProfiles);}catch(_0xb6247f){console[_0x521d5e(0x16d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0xf17600[_0x521d5e(0x167)](_0xb6247f,Error)?_0xb6247f['message']:String(_0xb6247f)));}if(_0x1fd3a2[_0x521d5e(0x160)]===0x0&&_0xf17600[_0x521d5e(0x173)](_0x36ecbb['length'],0x0)){console[_0x521d5e(0x162)](_0x521d5e(0x16e)),console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x169)]);return;}const _0x2d3e9d=new Set(_0x36ecbb['map'](_0x161f90=>_0x161f90['name']));if(_0x1fd3a2[_0x521d5e(0x160)]>0x0){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x152)]);for(const _0x5e62ec of _0x1fd3a2['sort']()){const _0x9c2aa1=_0x5e62ec===_0x452e75&&!_0x2d3e9d[_0x521d5e(0x17b)](_0x5e62ec),_0x2c80aa=_0x52a3eb[_0x5e62ec]||'local',_0x55dad2=await loadSettings(_0x5e62ec),_0x1f742b=_0x2c80aa===_0xf17600['fHriV']?'':'\x20['+_0x2c80aa+']';console['log']('\x20\x20'+(_0x9c2aa1?'*\x20':'\x20\x20')+_0x5e62ec+_0x1f742b),_0x55dad2['baseUrl']&&console['log'](_0x521d5e(0x16b)+_0x55dad2[_0x521d5e(0x17a)]),_0x55dad2['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55dad2[_0x521d5e(0x165)]);}}const _0x564cc7=(_0x162b05,_0x460fa9)=>{const _0x4d2e27=_0x521d5e,_0x317806=_0xf17600[_0x4d2e27(0x173)](_0x162b05[_0x4d2e27(0x158)],_0x452e75),_0x42c7b5=_0x162b05['sessionUpdatedAt']?_0x4d2e27(0x179)+_0x162b05['sessionUpdatedAt']+')':_0xf17600[_0x4d2e27(0x171)];console['log'](''+_0x460fa9+(_0x317806?'*\x20':'\x20\x20')+_0x162b05[_0x4d2e27(0x158)]),console[_0x4d2e27(0x162)](_0x460fa9+_0x4d2e27(0x15f)+_0x42c7b5);};if(_0x36ecbb['length']>0x0){if(shouldGroupByEnvironment(_0x36ecbb)){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x172)]);for(const _0x1e1d58 of groupCloudProfilesByEnvironment(_0x36ecbb)){const _0xbececc=_0x1e1d58['environmentKey']??_0xf17600['EOygO'];console['log']('\x0a\x20\x20'+_0xbececc);for(const _0x388e97 of _0x1e1d58[_0x521d5e(0x150)]){_0x564cc7(_0x388e97,_0x521d5e(0x164));}}}else{console[_0x521d5e(0x162)](_0xf17600['dpNLE']);for(const _0x193f39 of[..._0x36ecbb][_0x521d5e(0x14d)]((_0x4af2b0,_0x26b819)=>_0x4af2b0[_0x521d5e(0x158)]['localeCompare'](_0x26b819['name']))){_0xf17600['HMvRF'](_0x564cc7,_0x193f39,'\x20\x20');}}}_0x452e75&&console[_0x521d5e(0x162)](_0x521d5e(0x151));}
|