@ranger-testing/ranger-cli 3.0.1-alpha.f6aba6c-32 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -0
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +3 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x17789b=_0x3730;(function(_0x2e1e9d,_0x95af42){const _0x23b6db=_0x3730,_0x26986b=_0x2e1e9d();while(!![]){try{const _0x1d53e3=parseInt(_0x23b6db(0xc7))/0x1+parseInt(_0x23b6db(0xf1))/0x2*(parseInt(_0x23b6db(0xb7))/0x3)+-parseInt(_0x23b6db(0x8b))/0x4+parseInt(_0x23b6db(0xc0))/0x5*(parseInt(_0x23b6db(0xbb))/0x6)+parseInt(_0x23b6db(0xe5))/0x7+-parseInt(_0x23b6db(0xdb))/0x8+parseInt(_0x23b6db(0xb2))/0x9;if(_0x1d53e3===_0x95af42)break;else _0x26986b['push'](_0x26986b['shift']());}catch(_0x23a33f){_0x26986b['push'](_0x26986b['shift']());}}}(_0x5add,0x6308d));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x63233c from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';function _0x5add(){const _0x3da167=['\x20\x20Next:\x20ranger\x20go\x20--profile\x20','UkiBR','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','QxCWB','list','\x0a\x20\x20A\x20profile\x20named\x20\x22','error','2288704BOYRlm','Invalid\x20URL','JoCJm',')\x0a\x20\x20Save\x20\x27','ZcpPO','⚠\x20Could\x20not\x20reach\x20','confirm','\x0a🌐\x20Profile\x20Setup\x0a','JFxMr','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','rJlPV','includes','OwRio','setupHeaders','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','slice','ZJSeZ','trim','profile.add.autoRouteSkipped','skipAuth','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','use_suggestion','wXWdH','uWwZV','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','origin','\x20--skip-auth\x0a','✓\x20Profile\x20\x27','force','YYSnf','bQKKo','baseUrl','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','gcCoQ','prompt','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','rZCTv','status','3009240RhtdGA','QeCOy','jrscI','AebUd','cdpEndpoint','57RtuqvI','setupHeader','user_declined','keys','22494mamTRx','ZPFbZ','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','EOLtm','mpICG','5DvPeYB','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','EDEwh','EyhcG','fetch\x20failed','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','476502ZhETQd','length','local','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','startsWith','BODbR','yes','\x20\x20Set\x20active\x20profile:\x20','qCmfA','TypeError','bqsbQ','http://','\x22:\x20','gCAIn','JstvF','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','hqYsx','NODE_TLS_REJECT_UNAUTHORIZED','url','AgVra','5862816tggdaB','WjInz','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','SolZJ','wxIkk','AvhBP','NNvXx','warn','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','eBoVJ','3077907GrltDY','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','env','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','trackPhaseEnd','environments','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','\x20(continuing\x20with\x20--force)','What\x20would\x20you\x20like\x20to\x20do?','XGTQN','indexOf','profile.add.autoRouted','48038wuOVXz','\x20--url\x20','test','`\x20again\x20without\x20--skip-auth.','luXfn','AmQsn','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','JTgIx','Enter\x20a\x20different\x20URL','VmTqI','dEAMI','message','lEzLK','join','log','\x27\x20created.\x0a','exit','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','bJmMi','neltq'];_0x5add=function(){return _0x3da167;};return _0x5add();}function _0x3730(_0x14dd05,_0x1ce219){_0x14dd05=_0x14dd05-0x7f;const _0x5add17=_0x5add();let _0x373096=_0x5add17[_0x14dd05];return _0x373096;}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x17789b(0x86);function warnCloudProfileSharedInOrg(){const _0x5c3178=_0x17789b;if(!process['stdout']['isTTY'])return;console[_0x5c3178(0xe2)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x398c1a){const _0x3a66aa=_0x17789b,_0x4bbc58={'NNvXx':function(_0xaad4c3,_0xdd5933,_0x1594de){return _0xaad4c3(_0xdd5933,_0x1594de);},'FGRaa':'HEAD','wxIkk':'manual','XarYF':function(_0x54d089,_0x135b6a){return _0x54d089(_0x135b6a);},'rZCTv':_0x3a66aa(0x8c),'qCmfA':function(_0x3e7b3a,_0x21db78){return _0x3e7b3a===_0x21db78;},'jrscI':_0x3a66aa(0xc5)};try{const _0x3242bd=new AbortController(),_0x12fcc7=_0x4bbc58['NNvXx'](setTimeout,()=>_0x3242bd['abort'](),0x1388),_0x1f9ea5={'method':_0x4bbc58['FGRaa'],'signal':_0x3242bd['signal'],'redirect':_0x4bbc58[_0x3a66aa(0xdf)]};/^https:\/\/localhost(:\d+)?/i[_0x3a66aa(0xf3)](_0x398c1a)&&(process[_0x3a66aa(0xe7)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x5dfac2=await _0x4bbc58[_0x3a66aa(0xe1)](fetch,_0x398c1a,_0x1f9ea5);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x12fcc7);if(_0x5dfac2[_0x3a66aa(0xb1)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5dfac2[_0x3a66aa(0xb1)]};}catch(_0x37c3b4){delete process[_0x3a66aa(0xe7)][_0x3a66aa(0xd8)];const _0x280af2=_0x37c3b4,_0x9f17a3=_0x280af2['message']||_0x4bbc58['XarYF'](String,_0x37c3b4),_0x146a5f=_0x9f17a3['includes'](_0x4bbc58[_0x3a66aa(0xb0)])||_0x4bbc58[_0x3a66aa(0xcf)](_0x280af2['name'],_0x3a66aa(0xd0))||_0x9f17a3[_0x3a66aa(0x96)](_0x4bbc58[_0x3a66aa(0xb4)]);return{'ok':![],'error':_0x9f17a3,'isProtocolError':_0x146a5f};}}async function sweepOrphanLocalProfile(_0x54f8a8,_0x1082ee,_0x24b507){const _0xf39a1a=_0x17789b,_0x467b2f={'ZcpPO':function(_0x3375ea,_0x445494){return _0x3375ea(_0x445494);},'AebUd':function(_0x71837c,_0xacdeec){return _0x71837c(_0xacdeec);},'JoCJm':function(_0x3f1708,_0x1daffc,_0x5c5ddd){return _0x3f1708(_0x1daffc,_0x5c5ddd);}},_0x72b59c=join(_0x1082ee,_0xf39a1a(0xc9)),_0x32b73f=join(_0x72b59c,_0x54f8a8);_0x467b2f[_0xf39a1a(0x8f)](existsSync,_0x32b73f)&&(_0x24b507&&await _0x467b2f['ZcpPO'](isPathGitTracked,_0x32b73f)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x32b73f+_0xf39a1a(0xf7)):(await rm(_0x32b73f,{'recursive':!![],'force':!![]}),console[_0xf39a1a(0xff)](_0xf39a1a(0x81)+_0x32b73f)));if(_0x467b2f[_0xf39a1a(0xb5)](existsSync,_0x72b59c)){let _0x5034c6=[];try{_0x5034c6=await readdir(_0x72b59c);}catch{return;}const _0x3e6e92='.tmp-'+_0x54f8a8+'-';for(const _0x2805eb of _0x5034c6){if(!_0x2805eb[_0xf39a1a(0xcb)](_0x3e6e92))continue;const _0x2c0779=join(_0x72b59c,_0x2805eb);await _0x467b2f[_0xf39a1a(0x8d)](rm,_0x2c0779,{'recursive':!![],'force':!![]}),console[_0xf39a1a(0xff)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x2c0779);}}}async function sweepOrphansBestEffort(_0x30b16b){const _0x10f9cb=_0x17789b,_0x395bfc={'ZhwqS':function(_0x71eda,_0x1a3822,_0xfb4b67,_0xf5666a){return _0x71eda(_0x1a3822,_0xfb4b67,_0xf5666a);},'BODbR':function(_0x44b1a0){return _0x44b1a0();},'ZiPbW':function(_0x33e582,_0x684421){return _0x33e582 instanceof _0x684421;},'mpICG':function(_0x402918,_0x36119b){return _0x402918(_0x36119b);}};try{await _0x395bfc['ZhwqS'](sweepOrphanLocalProfile,_0x30b16b,_0x395bfc[_0x10f9cb(0xcc)](getRangerHomeDir),![]);const _0x32c3c5=_0x395bfc[_0x10f9cb(0xcc)](getRangerDir);_0x32c3c5!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x30b16b,_0x32c3c5,!![]);}catch(_0xbe4f50){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x395bfc['ZiPbW'](_0xbe4f50,Error)?_0xbe4f50[_0x10f9cb(0xfc)]:_0x395bfc[_0x10f9cb(0xbf)](String,_0xbe4f50))+').');}}async function markActive(_0xe2a11){const _0x44e7fc=_0x17789b,_0x5478dd={'yRnml':function(_0x192392,_0x40950b){return _0x192392(_0x40950b);}};try{await _0x5478dd['yRnml'](writeActiveProfileName,_0xe2a11),console[_0x44e7fc(0xff)](_0x44e7fc(0xce)+_0xe2a11);}catch{console[_0x44e7fc(0xff)](_0x44e7fc(0xe6));}}async function tryAutoRouteCloudProfile(_0x52177e,_0x13a3b8,_0x2255f3,_0x26e93e,_0x3e038e){const _0x5b869b=_0x17789b,_0x51655f={'AvhBP':function(_0x5009d1,_0x5ecf2d){return _0x5009d1===_0x5ecf2d;},'JFxMr':function(_0x9eeae5){return _0x9eeae5();},'bJmMi':'no_auth_config','KnjLb':function(_0x24e1e0,_0x47e0c9){return _0x24e1e0 instanceof _0x47e0c9;},'IOghJ':_0x5b869b(0x9d),'rJlPV':function(_0x47e279,_0x178f99){return _0x47e279+_0x178f99;},'eBoVJ':function(_0x39dc11,_0x25ae3e){return _0x39dc11+_0x25ae3e;},'OwRio':function(_0x2b1068,_0x56614d){return _0x2b1068+_0x56614d;},'wCegN':'\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','QeCOy':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','vjQZX':_0x5b869b(0xc6),'KKkIw':'no_match','LrEFY':_0x5b869b(0xb9),'ZPFbZ':function(_0x4dc8b9){return _0x4dc8b9();},'UkiBR':function(_0x2b5e58,_0x42bfda){return _0x2b5e58+_0x42bfda;},'HIdpM':_0x5b869b(0xf0)};let _0x2c0206;try{_0x2c0206=await _0x51655f[_0x5b869b(0x93)](fetchAuthConfig);}catch(_0x65f4c5){return _0x3e038e?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x51655f[_0x5b869b(0x82)],'profileName':_0x52177e}),console[_0x5b869b(0x8a)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x51655f['KnjLb'](_0x65f4c5,Error)?_0x65f4c5[_0x5b869b(0xfc)]:String(_0x65f4c5))),![];}if(!_0x2c0206||!_0x2c0206['environments']||Object[_0x5b869b(0xba)](_0x2c0206['environments'])[_0x5b869b(0xc8)]===0x0){if(_0x26e93e)return await captureEnvLessProfile(_0x52177e,_0x13a3b8,_0x2255f3,_0x3e038e);return _0x3e038e?.[_0x5b869b(0xe9)](_0x51655f['IOghJ'],{'reason':'no_auth_config','profileName':_0x52177e}),console['error'](_0x51655f[_0x5b869b(0x95)](_0x51655f[_0x5b869b(0xe4)](_0x51655f['OwRio'](_0x51655f['wCegN'],'\x0a')+_0x51655f[_0x5b869b(0xb3)]+(_0x5b869b(0xeb)+_0x52177e+_0x5b869b(0xf2)+_0x13a3b8+_0x5b869b(0xa6)),'\x0a')+'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a',_0x51655f['vjQZX'])),![];}const _0x5a2351=matchAuthEnvironment(_0x13a3b8,_0x2c0206);if(!_0x5a2351)return _0x3e038e?.[_0x5b869b(0xe9)](_0x51655f['IOghJ'],{'reason':_0x51655f['KKkIw'],'profileName':_0x52177e}),console['error'](_0x5b869b(0x94)+_0x13a3b8+'.\x20Configured\x20envs:\x20'+Object[_0x5b869b(0xba)](_0x2c0206[_0x5b869b(0xea)])[_0x5b869b(0xfe)](',\x20')+'.'),![];const _0x4a7790=_0x2c0206['environments'][_0x5a2351],_0xa24f73=_0x4a7790?.['domains']??[];if(_0x26e93e&&!_0x2255f3[_0x5b869b(0xcd)]){const {saveToCloud:_0x249f0f}=await _0x63233c[_0x5b869b(0xae)]([{'type':_0x5b869b(0x91),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x5a2351+'\x27\x20matching\x20'+_0x13a3b8+'\x0a\x20\x20(domains:\x20'+_0xa24f73[_0x5b869b(0xfe)](',\x20')+_0x5b869b(0x8e)+_0x52177e+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x249f0f)return _0x3e038e?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x51655f['LrEFY'],'profileName':_0x52177e}),console[_0x5b869b(0x8a)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x1e9f3e=_0xa24f73['some'](_0x431b56=>{const _0x2732b1=_0x5b869b;try{return _0x51655f[_0x2732b1(0xe0)](new URL(_0x431b56)['origin'],new URL(_0x13a3b8)[_0x2732b1(0xa5)]);}catch{return![];}}),_0xda5533={};!_0x1e9f3e&&(_0xda5533['baseUrl']=_0x13a3b8);try{await createCloudProfile(_0x52177e,_0x5a2351,{'settings':_0xda5533}),_0x51655f[_0x5b869b(0xbc)](warnCloudProfileSharedInOrg);}catch(_0x515b52){if(_0x515b52 instanceof ApiError&&_0x515b52['status']===0x199){console[_0x5b869b(0x8a)](_0x51655f[_0x5b869b(0x85)](_0x5b869b(0x89)+_0x52177e+_0x5b869b(0x9f),_0x5b869b(0xca)+_0x52177e));throw _0x515b52;}throw _0x515b52;}return console[_0x5b869b(0xff)](_0x51655f[_0x5b869b(0x97)](_0x5b869b(0xa7)+_0x52177e+_0x5b869b(0x7f),_0x5b869b(0x84)+_0x52177e)),await sweepOrphansBestEffort(_0x52177e),_0x3e038e?.['trackPhaseEnd'](_0x51655f['HIdpM'],{'envKey':_0x5a2351,'profileName':_0x52177e}),!![];}async function createUnconfiguredCloudProfile(_0x1ca988,_0x54b018){const _0x6a4c83=_0x17789b,_0x32d035={'IgLlT':function(_0x25730a){return _0x25730a();},'dfoJv':function(_0x4d6e3d,_0x10f3c7){return _0x4d6e3d+_0x10f3c7;}};try{await createCloudProfile(_0x1ca988,undefined,{'settings':_0x54b018}),_0x32d035['IgLlT'](warnCloudProfileSharedInOrg);}catch(_0x2dac58){_0x2dac58 instanceof ApiError&&_0x2dac58[_0x6a4c83(0xb1)]===0x199&&console['error'](_0x32d035['dfoJv']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1ca988+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x6a4c83(0xca)+_0x1ca988));throw _0x2dac58;}}async function captureEnvLessProfile(_0x21666a,_0x53c809,_0xb7fd31,_0x3fda40){const _0x2ca455=_0x17789b,_0x3eddcc={'AgVra':_0x2ca455(0x91),'psUtb':'capture','KsDFF':_0x2ca455(0xaf),'JstvF':_0x2ca455(0x9d),'ZJSeZ':_0x2ca455(0xb9),'hqYsx':function(_0x207a2e,_0x30a886){return _0x207a2e+_0x30a886;},'bQKKo':function(_0x20689f){return _0x20689f();},'fsXnt':function(_0xb6aedb,_0x501d06){return _0xb6aedb instanceof _0x501d06;},'PGxQt':function(_0x246adf,_0x323388){return _0x246adf===_0x323388;},'lEzLK':function(_0x529245,_0xd9c3e5){return _0x529245+_0xd9c3e5;},'EyhcG':function(_0x16c251,_0x1587aa,_0x14b2e9){return _0x16c251(_0x1587aa,_0x14b2e9);},'XGTQN':function(_0x5d5be3,_0x2b77b1){return _0x5d5be3>_0x2b77b1;},'neltq':function(_0x830dcf,_0x3ab5cb){return _0x830dcf(_0x3ab5cb);},'EDEwh':_0x2ca455(0xf0)};if(!_0xb7fd31[_0x2ca455(0xcd)]){const {capture:_0x2c029}=await _0x63233c[_0x2ca455(0xae)]([{'type':_0x3eddcc[_0x2ca455(0xda)],'name':_0x3eddcc['psUtb'],'message':_0x3eddcc['KsDFF'],'default':!![]}]);if(!_0x2c029)return _0x3fda40?.['trackPhaseEnd'](_0x3eddcc[_0x2ca455(0xd5)],{'reason':_0x3eddcc[_0x2ca455(0x9b)],'profileName':_0x21666a}),console[_0x2ca455(0x8a)](_0x2ca455(0xe3)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x403305={};if(_0xb7fd31[_0x2ca455(0xb8)])for(const _0x47b843 of _0xb7fd31[_0x2ca455(0xb8)]){const _0x1701fe=_0x47b843[_0x2ca455(0xef)](':');if(_0x1701fe===-0x1)continue;_0x403305[_0x47b843['slice'](0x0,_0x1701fe)['trim']()]=_0x47b843['slice'](_0x3eddcc[_0x2ca455(0xd7)](_0x1701fe,0x1))[_0x2ca455(0x9c)]();}const _0x1a36d2={'baseUrl':_0x53c809};Object[_0x2ca455(0xba)](_0x403305)['length']>0x0&&(_0x1a36d2[_0x2ca455(0x98)]=_0x403305);let _0x2157da;try{_0x2157da=await createCloudProfile(_0x21666a,undefined,{'settings':_0x1a36d2}),_0x3eddcc[_0x2ca455(0xaa)](warnCloudProfileSharedInOrg);}catch(_0x26316c){_0x3eddcc['fsXnt'](_0x26316c,ApiError)&&_0x3eddcc['PGxQt'](_0x26316c[_0x2ca455(0xb1)],0x199)&&console['error'](_0x3eddcc[_0x2ca455(0xfd)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x21666a+_0x2ca455(0x9f),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x21666a));throw _0x26316c;}return await _0x3eddcc[_0x2ca455(0xc4)](manualBrowserLogin,_0x2157da,{'key':'','domains':[_0x53c809],'setupHeaders':_0x3eddcc[_0x2ca455(0xee)](Object[_0x2ca455(0xba)](_0x403305)[_0x2ca455(0xc8)],0x0)?_0x403305:undefined}),console[_0x2ca455(0xff)]('\x0a✓\x20Profile\x20\x27'+_0x21666a+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x2ca455(0x84)+_0x21666a)),await _0x3eddcc[_0x2ca455(0x83)](sweepOrphansBestEffort,_0x21666a),_0x3fda40?.[_0x2ca455(0xe9)](_0x3eddcc[_0x2ca455(0xc3)],{'envKey':null,'profileName':_0x21666a}),!![];}export async function addEnv(_0x5ae2a5,_0x38058a={},_0x226327){const _0x1fd58f=_0x17789b,_0x2a1be7={'HrDDU':function(_0x24eaa0,_0xbd0a5e){return _0x24eaa0+_0xbd0a5e;},'aXlFo':function(_0x314f5f,_0x51ee7e){return _0x314f5f+_0x51ee7e;},'dEAMI':function(_0x1408ef,_0x4e7ae1){return _0x1408ef+_0x4e7ae1;},'GpqJl':function(_0x4a800f,_0x1eff04){return _0x4a800f+_0x1eff04;},'XvSuL':_0x1fd58f(0xdd),'gcCoQ':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','YYSnf':_0x1fd58f(0xe8),'CPwGZ':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','WjInz':function(_0x4da607,_0x4496fd){return _0x4da607===_0x4496fd;},'nuvOj':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','QxCWB':function(_0x4207d3,_0xf11c7f){return _0x4207d3(_0xf11c7f);},'JTgIx':function(_0x24328e,_0x977498,_0x462157,_0x1c15d1,_0x1176d2){return _0x24328e(_0x977498,_0x462157,_0x1c15d1,_0x1176d2);},'bqsbQ':'cdpEndpoint','LYSlu':'isElectron','uWwZV':function(_0x2be22a,_0x2488a0){return _0x2be22a(_0x2488a0);},'wXWdH':function(_0x4b1ef2,_0x42ccdb){return _0x4b1ef2(_0x42ccdb);},'tjRaz':function(_0x2c433f,_0x23bf57){return _0x2c433f(_0x23bf57);},'gCAIn':function(_0x2cbce8,_0x189e7c){return _0x2cbce8>_0x189e7c;},'GtFpy':function(_0x593f64,_0x1b46c1){return _0x593f64+_0x1b46c1;},'luXfn':_0x1fd58f(0x92),'LcyPt':_0x1fd58f(0xac),'SolZJ':_0x1fd58f(0xab),'GJufZ':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','AmQsn':_0x1fd58f(0xd6),'vfizo':function(_0x235bf8,_0x6061cb){return _0x235bf8||_0x6061cb;},'EOLtm':'retry','vXlQW':'continue','VmTqI':function(_0x565f12,_0x1ab923){return _0x565f12 instanceof _0x1ab923;}};_0x38058a['ci']&&(console[_0x1fd58f(0x8a)](_0x2a1be7['HrDDU'](_0x2a1be7['aXlFo'](_0x2a1be7[_0x1fd58f(0xfb)](_0x2a1be7['GpqJl'](_0x2a1be7[_0x1fd58f(0xfb)](_0x2a1be7['XvSuL'],_0x2a1be7[_0x1fd58f(0xad)])+'\x0a',_0x2a1be7[_0x1fd58f(0xa9)]),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x2a1be7['CPwGZ'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x1fd58f(0x80)](0x1));const _0x56f0b0={};if(_0x38058a[_0x1fd58f(0xb8)])for(const _0x10ad09 of _0x38058a['setupHeader']){const _0x31a4a1=_0x10ad09[_0x1fd58f(0xef)](':');if(_0x31a4a1===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x10ad09+_0x1fd58f(0xa0));const _0x22a486=_0x10ad09[_0x1fd58f(0x9a)](0x0,_0x31a4a1)[_0x1fd58f(0x9c)](),_0x293e58=_0x10ad09['slice'](_0x31a4a1+0x1)[_0x1fd58f(0x9c)]();_0x56f0b0[_0x22a486]=_0x293e58;}if(_0x38058a['cdpEndpoint']!==undefined&&_0x2a1be7[_0x1fd58f(0xdc)](_0x38058a['cdpEndpoint'][_0x1fd58f(0x9c)](),''))throw new Error(_0x1fd58f(0x99));if(_0x38058a['cdpEndpoint']&&_0x38058a[_0x1fd58f(0xd9)])throw new Error(_0x2a1be7['nuvOj']);const _0x506871=_0x2a1be7[_0x1fd58f(0x87)](Boolean,_0x38058a[_0x1fd58f(0xb6)]),_0x2eb78e=isInteractive();if(!_0x2eb78e&&!_0x38058a['url']&&!_0x506871&&!_0x38058a[_0x1fd58f(0x9e)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x506871){const _0x4d384c=_0x38058a['cdpEndpoint'];console['log']('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x1fd58f(0xff)](_0x1fd58f(0xc2)+_0x4d384c);const _0x126883={'cdpEndpoint':_0x4d384c,'isElectron':!![]};Object[_0x1fd58f(0xba)](_0x56f0b0)['length']>0x0&&(_0x126883['setupHeaders']=_0x56f0b0);await createUnconfiguredCloudProfile(_0x5ae2a5,_0x126883);try{_0x2a1be7['JTgIx'](setProfileOverride,process['cwd'](),_0x5ae2a5,_0x2a1be7[_0x1fd58f(0xd1)],_0x4d384c),_0x2a1be7[_0x1fd58f(0xf8)](setProfileOverride,process['cwd'](),_0x5ae2a5,_0x2a1be7['LYSlu'],!![]);}catch(_0x2b2f08){console[_0x1fd58f(0x8a)](_0x1fd58f(0xbd)+(_0x2b2f08 instanceof Error?_0x2b2f08['message']:_0x2a1be7[_0x1fd58f(0xa3)](String,_0x2b2f08)));}console[_0x1fd58f(0xff)]('✓\x20Cloud\x20profile\x20\x27'+_0x5ae2a5+'\x27\x20created\x20(CDP).'),await _0x2a1be7[_0x1fd58f(0xa2)](sweepOrphansBestEffort,_0x5ae2a5),await _0x2a1be7['tjRaz'](markActive,_0x5ae2a5);return;}if(_0x38058a['skipAuth']){const _0x25cb6b={};_0x38058a['url']&&(_0x25cb6b[_0x1fd58f(0xab)]=_0x38058a['url']);_0x2a1be7[_0x1fd58f(0xd4)](Object[_0x1fd58f(0xba)](_0x56f0b0)['length'],0x0)&&(_0x25cb6b['setupHeaders']=_0x56f0b0);await createUnconfiguredCloudProfile(_0x5ae2a5,_0x25cb6b),console['log'](_0x2a1be7['GtFpy'](_0x1fd58f(0xa7)+_0x5ae2a5+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5ae2a5+_0x1fd58f(0xf4))),await sweepOrphansBestEffort(_0x5ae2a5),await _0x2a1be7['QxCWB'](markActive,_0x5ae2a5);return;}if(_0x38058a['url']){const _0x1cade6=_0x38058a[_0x1fd58f(0xd9)],_0x8428aa=await checkUrlReachability(_0x1cade6);if(!_0x8428aa['ok']&&!_0x38058a[_0x1fd58f(0xa8)])throw new Error('Could\x20not\x20reach\x20'+_0x1cade6+':\x20'+_0x8428aa['error']+_0x1fd58f(0xa4));!_0x8428aa['ok']&&_0x38058a[_0x1fd58f(0xa8)]&&console['log'](_0x1fd58f(0x90)+_0x1cade6+':\x20'+_0x8428aa['error']+_0x1fd58f(0xec));}else{console['log'](_0x2a1be7[_0x1fd58f(0xf5)]),console['log'](_0x2a1be7['LcyPt']),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x47a1bd='',_0x5b8545=![];while(!![]){const _0x5379ab=await _0x63233c[_0x1fd58f(0xae)]([{'type':'input','name':_0x2a1be7[_0x1fd58f(0xde)],'message':_0x5b8545?_0x2a1be7['GJufZ']:_0x2a1be7[_0x1fd58f(0xf6)],'default':_0x2a1be7['vfizo'](_0x47a1bd,'http://localhost:3000')}]);_0x47a1bd=_0x5379ab[_0x1fd58f(0xab)];const _0x5d3a24=await checkUrlReachability(_0x47a1bd);if(_0x5d3a24['ok'])break;const _0x1afb3e=/^[a-zA-Z][\w+.-]*:\/\//[_0x1fd58f(0xf3)](_0x47a1bd),_0x56d322=_0x5d3a24['isProtocolError']&&!_0x1afb3e,_0x3e96f3=_0x56d322?_0x1fd58f(0xd2)+_0x47a1bd:null;_0x5b8545=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x47a1bd+':\x20'+_0x5d3a24[_0x1fd58f(0x8a)]);_0x3e96f3&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3e96f3+'?');const {action:_0x10483b}=await _0x63233c['prompt']([{'type':_0x1fd58f(0x88),'name':'action','message':_0x1fd58f(0xed),'choices':[..._0x3e96f3?[{'name':'Use\x20'+_0x3e96f3,'value':_0x1fd58f(0xa1)}]:[],{'name':_0x1fd58f(0xf9),'value':_0x2a1be7[_0x1fd58f(0xbe)]},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x10483b===_0x1fd58f(0xa1)&&_0x3e96f3){_0x47a1bd=_0x3e96f3;const _0x488e1c=await checkUrlReachability(_0x47a1bd);if(_0x488e1c['ok'])break;console['log'](_0x1fd58f(0xc1)+_0x47a1bd+':\x20'+_0x488e1c['error']);}else{if(_0x2a1be7[_0x1fd58f(0xdc)](_0x10483b,_0x2a1be7['vXlQW']))break;}}_0x38058a={..._0x38058a,'url':_0x47a1bd};}let _0x4041ee=![];try{_0x4041ee=await tryAutoRouteCloudProfile(_0x5ae2a5,_0x38058a[_0x1fd58f(0xd9)],_0x38058a,_0x2eb78e,_0x226327);}catch(_0x3998fd){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x5ae2a5+_0x1fd58f(0xd3)+(_0x2a1be7[_0x1fd58f(0xfa)](_0x3998fd,Error)?_0x3998fd['message']:_0x2a1be7['QxCWB'](String,_0x3998fd))),process['exit'](0x1);}!_0x4041ee&&process[_0x1fd58f(0x80)](0x1),await markActive(_0x5ae2a5);}
|
|
1
|
+
(function(_0x2d2da2,_0x504ce3){const _0x51ba31=_0x3e23,_0x105f82=_0x2d2da2();while(!![]){try{const _0x2040ab=parseInt(_0x51ba31(0xb3))/0x1*(parseInt(_0x51ba31(0xba))/0x2)+parseInt(_0x51ba31(0x100))/0x3*(parseInt(_0x51ba31(0xdd))/0x4)+-parseInt(_0x51ba31(0xc6))/0x5+-parseInt(_0x51ba31(0xbf))/0x6+-parseInt(_0x51ba31(0xfc))/0x7*(-parseInt(_0x51ba31(0xb7))/0x8)+parseInt(_0x51ba31(0xf1))/0x9+-parseInt(_0x51ba31(0xf0))/0xa*(parseInt(_0x51ba31(0xd5))/0xb);if(_0x2040ab===_0x504ce3)break;else _0x105f82['push'](_0x105f82['shift']());}catch(_0x214701){_0x105f82['push'](_0x105f82['shift']());}}}(_0x4e74,0x5c0ce));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1ba835 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x4e74(){const _0x1b1600=['\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','120354SYPKXP','length','slice','gUOxG','cdpEndpoint','mOPCr','rWOfk','setupHeaders','gTEtZ','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x27\x20created.\x0a','force','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','setupHeader','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','UyDtQ','trim','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','name','GsaDQ','gLRtK','What\x20would\x20you\x20like\x20to\x20do?','isProtocolError','wVolZ','✓\x20Cloud\x20profile\x20\x27','action','domains','\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','keys','\x20\x20Set\x20active\x20profile:\x20','DExET','Enter\x20a\x20different\x20URL','startsWith','DIBPr','origin','trackPhaseEnd','TlTCM','CkazP','\x0a\x20\x20Could\x20not\x20reach\x20','NCXVp','vVyPG','environments','user_declined','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','VbVtD','\x0a\x20\x20A\x20profile\x20named\x20\x22','oMOAl','617PWcxAg','saveToCloud','ADFHf','wqutF','48xWYuPZ','log','fetch\x20failed','248dqkgzv','GTkyU','XtpDH','GCFVR','cwrJC','3759336caVXsa','GCBZk','no_auth_config','includes','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','capture','\x27\x20to\x20the\x20cloud?','395205fXMifU','Found\x20auth\x20environment\x20\x27','fKgfU','NODE_TLS_REJECT_UNAUTHORIZED','url','hduFP','continue','join','Oqwxv','\x22:\x20','message','\x20(continuing\x20with\x20--force)','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','vddJL','orDSj','11ydvBGH','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','prompt','yVGPl','env','\x0a🌐\x20Profile\x20Setup\x0a','retry','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','24gTLfJp','status','baseUrl','profile.add.autoRouteSkipped','KjZdv','test','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','some','dCtFE','\x20\x20Did\x20you\x20mean\x20','oJLbG','UMDXV','vXFLy','TypeError','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','profile.add.autoRouted','sZpvg','6249180fPDdHF','5892741YiAsVt',')\x0a\x20\x20Save\x20\x27','CRAfW','YKuDX','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','exit','HEAD','\x20\x20https://docs.ranger.net/main/concepts/profiles','iXHik','stdout','✓\x20Profile\x20\x27','858186vweWOa','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','error'];_0x4e74=function(){return _0x1b1600;};return _0x4e74();}const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2ca735=_0x3e23;if(!process[_0x2ca735(0xfa)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x36b13a){const _0x1efde1=_0x3e23,_0x4ceced={'SSiqt':_0x1efde1(0xf7),'orDSj':'manual','UyDtQ':function(_0x139627,_0xa031af,_0x260ad6){return _0x139627(_0xa031af,_0x260ad6);},'ePUiG':function(_0x8ce0a4,_0xe1d674){return _0x8ce0a4<_0xe1d674;},'vddJL':function(_0xb3d24f,_0x288755){return _0xb3d24f(_0x288755);},'hduFP':'Invalid\x20URL'};try{const _0x4e9437=new AbortController(),_0x189bf2=setTimeout(()=>_0x4e9437['abort'](),0x1388),_0x26ecab={'method':_0x4ceced['SSiqt'],'signal':_0x4e9437['signal'],'redirect':_0x4ceced[_0x1efde1(0xd4)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x36b13a)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x49d856=await _0x4ceced[_0x1efde1(0x110)](fetch,_0x36b13a,_0x26ecab);delete process[_0x1efde1(0xd9)][_0x1efde1(0xc9)],clearTimeout(_0x189bf2);if(_0x4ceced['ePUiG'](_0x49d856[_0x1efde1(0xde)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x49d856[_0x1efde1(0xde)]};}catch(_0x400628){delete process[_0x1efde1(0xd9)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1ea621=_0x400628,_0x1fee16=_0x1ea621[_0x1efde1(0xd0)]||_0x4ceced[_0x1efde1(0xd3)](String,_0x400628),_0x238fc3=_0x1fee16[_0x1efde1(0xc2)](_0x4ceced[_0x1efde1(0xcb)])||_0x1ea621[_0x1efde1(0x113)]===_0x1efde1(0xeb)||_0x1fee16['includes'](_0x1efde1(0xb9));return{'ok':![],'error':_0x1fee16,'isProtocolError':_0x238fc3};}}async function sweepOrphanLocalProfile(_0x1efa76,_0x54639b,_0x139d2b){const _0x12da4b=_0x3e23,_0x3fd7d7={'YgRwv':function(_0x56d6aa,_0x435652){return _0x56d6aa(_0x435652);},'dCtFE':function(_0x3fa432,_0x5eabf0,_0x3350e0){return _0x3fa432(_0x5eabf0,_0x3350e0);}},_0x5e7c46=join(_0x54639b,'local'),_0x32a945=join(_0x5e7c46,_0x1efa76);existsSync(_0x32a945)&&(_0x139d2b&&await isPathGitTracked(_0x32a945)?console[_0x12da4b(0xb8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x32a945+_0x12da4b(0xdc)):(await rm(_0x32a945,{'recursive':!![],'force':!![]}),console[_0x12da4b(0xb8)](_0x12da4b(0x10a)+_0x32a945)));if(existsSync(_0x5e7c46)){let _0xfaf4d2=[];try{_0xfaf4d2=await _0x3fd7d7['YgRwv'](readdir,_0x5e7c46);}catch{return;}const _0x265989='.tmp-'+_0x1efa76+'-';for(const _0x36dc8b of _0xfaf4d2){if(!_0x36dc8b[_0x12da4b(0x121)](_0x265989))continue;const _0x4daf75=_0x3fd7d7['dCtFE'](join,_0x5e7c46,_0x36dc8b);await _0x3fd7d7[_0x12da4b(0xe6)](rm,_0x4daf75,{'recursive':!![],'force':!![]}),console[_0x12da4b(0xb8)](_0x12da4b(0x10a)+_0x4daf75);}}}async function sweepOrphansBestEffort(_0x4fff3a){const _0x321747=_0x3e23,_0x44ef41={'IXbJh':function(_0x32f5a5,_0x2c52dc,_0x554a10,_0x2f339b){return _0x32f5a5(_0x2c52dc,_0x554a10,_0x2f339b);},'CEQUz':function(_0x1a3fb9){return _0x1a3fb9();},'fKgfU':function(_0x2a6694){return _0x2a6694();},'oMOAl':function(_0x380ee3){return _0x380ee3();},'eYwOn':function(_0x3e22b3,_0x4707b,_0x3fd30f,_0x324fe3){return _0x3e22b3(_0x4707b,_0x3fd30f,_0x324fe3);}};try{await _0x44ef41['IXbJh'](sweepOrphanLocalProfile,_0x4fff3a,_0x44ef41['CEQUz'](getRangerHomeDir),![]);const _0x72de0f=_0x44ef41[_0x321747(0xc8)](getRangerDir);_0x72de0f!==_0x44ef41[_0x321747(0xb2)](getRangerHomeDir)&&await _0x44ef41['eYwOn'](sweepOrphanLocalProfile,_0x4fff3a,_0x72de0f,!![]);}catch(_0x439a06){console[_0x321747(0xb8)](_0x321747(0x112)+(_0x439a06 instanceof Error?_0x439a06['message']:String(_0x439a06))+').');}}async function markActive(_0x4a2426){const _0x553288=_0x3e23,_0x1615ef={'sZpvg':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x4a2426),console['log'](_0x553288(0x11e)+_0x4a2426);}catch{console['log'](_0x1615ef[_0x553288(0xef)]);}}async function tryAutoRouteCloudProfile(_0x1fd22b,_0x50249b,_0x9f764d,_0x229cd2,_0x27e5c3){const _0x5c2e65=_0x3e23,_0x237c53={'iXHik':function(_0x18e66a,_0xaece67){return _0x18e66a===_0xaece67;},'YKuDX':'profile.add.autoRouteSkipped','CkazP':function(_0x48e80d,_0x5e5691,_0x26057f,_0x183f23,_0x26b45e){return _0x48e80d(_0x5e5691,_0x26057f,_0x183f23,_0x26b45e);},'vVyPG':_0x5c2e65(0xc1),'DIBPr':function(_0x11cb3a,_0x3c2d92){return _0x11cb3a+_0x3c2d92;},'cfkDv':function(_0x5b5eaa,_0x3429a3){return _0x5b5eaa+_0x3429a3;},'ivuub':_0x5c2e65(0x11c),'sCiZo':_0x5c2e65(0xd2),'RZINF':_0x5c2e65(0x109),'UHjli':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','cwrJC':function(_0x2666e5,_0x50d8b3,_0x534b0a){return _0x2666e5(_0x50d8b3,_0x534b0a);},'IdITU':'user_declined','rWOfk':function(_0xf372ac,_0xe1698d,_0x416b9d,_0x1b8dee){return _0xf372ac(_0xe1698d,_0x416b9d,_0x1b8dee);},'GCFVR':function(_0x4ddaea,_0x9745d7){return _0x4ddaea(_0x9745d7);},'CsLEc':_0x5c2e65(0xee)};let _0x2ac24d;try{_0x2ac24d=await fetchAuthConfig();}catch(_0x541617){return _0x27e5c3?.['trackPhaseEnd'](_0x237c53[_0x5c2e65(0xf4)],{'reason':'no_auth_config','profileName':_0x1fd22b}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x541617 instanceof Error?_0x541617['message']:String(_0x541617))),![];}if(!_0x2ac24d||!_0x2ac24d['environments']||_0x237c53['iXHik'](Object[_0x5c2e65(0x11d)](_0x2ac24d[_0x5c2e65(0x12a)])[_0x5c2e65(0x101)],0x0)){if(_0x229cd2)return await _0x237c53[_0x5c2e65(0x126)](captureEnvLessProfile,_0x1fd22b,_0x50249b,_0x9f764d,_0x27e5c3);return _0x27e5c3?.[_0x5c2e65(0x124)](_0x237c53['YKuDX'],{'reason':_0x237c53[_0x5c2e65(0x129)],'profileName':_0x1fd22b}),console[_0x5c2e65(0xfe)](_0x237c53[_0x5c2e65(0x122)](_0x237c53['cfkDv'](_0x237c53[_0x5c2e65(0x122)](_0x237c53['cfkDv'](_0x237c53['ivuub'],'\x0a')+_0x237c53['sCiZo'],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1fd22b+'\x20--url\x20'+_0x50249b+'\x20--skip-auth\x0a'),'\x0a'),_0x237c53['RZINF'])+_0x237c53['UHjli']),![];}const _0x41090c=_0x237c53[_0x5c2e65(0xbe)](matchAuthEnvironment,_0x50249b,_0x2ac24d);if(!_0x41090c)return _0x27e5c3?.[_0x5c2e65(0x124)]('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x1fd22b}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x50249b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x2ac24d['environments'])['join'](',\x20')+'.'),![];const _0x168624=_0x2ac24d['environments'][_0x41090c],_0x19b14c=_0x168624?.[_0x5c2e65(0x11b)]??[];if(_0x229cd2&&!_0x9f764d['yes']){const {saveToCloud:_0x110d1b}=await _0x1ba835[_0x5c2e65(0xd7)]([{'type':'confirm','name':_0x5c2e65(0xb4),'message':_0x5c2e65(0xc7)+_0x41090c+'\x27\x20matching\x20'+_0x50249b+'\x0a\x20\x20(domains:\x20'+_0x19b14c[_0x5c2e65(0xcd)](',\x20')+_0x5c2e65(0xf2)+_0x1fd22b+_0x5c2e65(0xc5),'default':!![]}]);if(!_0x110d1b)return _0x27e5c3?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x237c53['IdITU'],'profileName':_0x1fd22b}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x270a90=_0x19b14c[_0x5c2e65(0xe5)](_0x4c1931=>{const _0x4b530d=_0x5c2e65;try{return _0x237c53[_0x4b530d(0xf9)](new URL(_0x4c1931)[_0x4b530d(0x123)],new URL(_0x50249b)['origin']);}catch{return![];}}),_0x425085={};!_0x270a90&&(_0x425085['baseUrl']=_0x50249b);try{await _0x237c53[_0x5c2e65(0x106)](createCloudProfile,_0x1fd22b,_0x41090c,{'settings':_0x425085}),warnCloudProfileSharedInOrg();}catch(_0x362775){if(_0x362775 instanceof ApiError&&_0x362775['status']===0x199){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1fd22b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x5c2e65(0xf5)+_0x1fd22b));throw _0x362775;}throw _0x362775;}return console['log']('✓\x20Profile\x20\x27'+_0x1fd22b+_0x5c2e65(0x10b)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x1fd22b)),await _0x237c53[_0x5c2e65(0xbd)](sweepOrphansBestEffort,_0x1fd22b),_0x27e5c3?.['trackPhaseEnd'](_0x237c53['CsLEc'],{'envKey':_0x41090c,'profileName':_0x1fd22b}),!![];}function _0x3e23(_0xb21070,_0x372a5e){_0xb21070=_0xb21070-0xae;const _0x4e74cd=_0x4e74();let _0x3e2316=_0x4e74cd[_0xb21070];return _0x3e2316;}async function createUnconfiguredCloudProfile(_0x17cdd7,_0xc0da3b){const _0xc8539e=_0x3e23,_0x614304={'GTkyU':function(_0xa0e702,_0x42012b,_0x583a00,_0x597cc7){return _0xa0e702(_0x42012b,_0x583a00,_0x597cc7);},'JeNIg':function(_0x21cf50,_0x19542f){return _0x21cf50 instanceof _0x19542f;},'gTEtZ':function(_0x5359d6,_0x14831a){return _0x5359d6===_0x14831a;}};try{await _0x614304[_0xc8539e(0xbb)](createCloudProfile,_0x17cdd7,undefined,{'settings':_0xc0da3b}),warnCloudProfileSharedInOrg();}catch(_0x1d3f86){_0x614304['JeNIg'](_0x1d3f86,ApiError)&&_0x614304[_0xc8539e(0x108)](_0x1d3f86['status'],0x199)&&console['error'](_0xc8539e(0xb1)+_0x17cdd7+_0xc8539e(0xaf)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x17cdd7));throw _0x1d3f86;}}async function captureEnvLessProfile(_0x598497,_0x583512,_0x5d9c74,_0x115d4b){const _0x5d2dc8=_0x3e23,_0x55b428={'cBrfl':'confirm','WrJEr':_0x5d2dc8(0xc4),'NCXVp':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','GDjoB':_0x5d2dc8(0xe0),'BonOF':function(_0x506844,_0x31942e){return _0x506844>_0x31942e;},'Oqwxv':function(_0x2a0ab0,_0x482689,_0x2a6d50,_0x71e015){return _0x2a0ab0(_0x482689,_0x2a6d50,_0x71e015);},'vXFLy':function(_0x1390f7,_0x42ac2f){return _0x1390f7 instanceof _0x42ac2f;},'UMDXV':function(_0x16901a,_0xb6a468){return _0x16901a===_0xb6a468;},'GBWBK':function(_0x34ef2a,_0x1953be,_0x4f4d59){return _0x34ef2a(_0x1953be,_0x4f4d59);},'yVGPl':function(_0x2289d6,_0x2234f6){return _0x2289d6+_0x2234f6;},'oJLbG':function(_0x1bfe5a,_0x335d60){return _0x1bfe5a(_0x335d60);},'DhEHq':'profile.add.autoRouted'};if(!_0x5d9c74['yes']){const {capture:_0x4a567a}=await _0x1ba835['prompt']([{'type':_0x55b428['cBrfl'],'name':_0x55b428['WrJEr'],'message':_0x55b428[_0x5d2dc8(0x128)],'default':!![]}]);if(!_0x4a567a)return _0x115d4b?.['trackPhaseEnd'](_0x55b428['GDjoB'],{'reason':_0x5d2dc8(0xae),'profileName':_0x598497}),console[_0x5d2dc8(0xfe)]('\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 _0x291215={};if(_0x5d9c74[_0x5d2dc8(0x10e)])for(const _0x553cd2 of _0x5d9c74['setupHeader']){const _0x5dcd7c=_0x553cd2[_0x5d2dc8(0xe4)](':');if(_0x5dcd7c===-0x1)continue;_0x291215[_0x553cd2[_0x5d2dc8(0x102)](0x0,_0x5dcd7c)['trim']()]=_0x553cd2['slice'](_0x5dcd7c+0x1)[_0x5d2dc8(0x111)]();}const _0x103f2c={'baseUrl':_0x583512};_0x55b428['BonOF'](Object['keys'](_0x291215)['length'],0x0)&&(_0x103f2c[_0x5d2dc8(0x107)]=_0x291215);let _0xcfa31f;try{_0xcfa31f=await _0x55b428[_0x5d2dc8(0xce)](createCloudProfile,_0x598497,undefined,{'settings':_0x103f2c}),warnCloudProfileSharedInOrg();}catch(_0x484fd9){_0x55b428[_0x5d2dc8(0xea)](_0x484fd9,ApiError)&&_0x55b428[_0x5d2dc8(0xe9)](_0x484fd9[_0x5d2dc8(0xde)],0x199)&&console['error'](_0x5d2dc8(0xb1)+_0x598497+_0x5d2dc8(0xaf)+(_0x5d2dc8(0xf5)+_0x598497));throw _0x484fd9;}return await _0x55b428['GBWBK'](manualBrowserLogin,_0xcfa31f,{'key':'','domains':[_0x583512],'setupHeaders':Object[_0x5d2dc8(0x11d)](_0x291215)['length']>0x0?_0x291215:undefined}),console[_0x5d2dc8(0xb8)](_0x55b428[_0x5d2dc8(0xd8)]('\x0a✓\x20Profile\x20\x27'+_0x598497+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x5d2dc8(0xfd)+_0x598497)),await _0x55b428[_0x5d2dc8(0xe8)](sweepOrphansBestEffort,_0x598497),_0x115d4b?.[_0x5d2dc8(0x124)](_0x55b428['DhEHq'],{'envKey':null,'profileName':_0x598497}),!![];}export async function addEnv(_0x52f017,_0x159572={},_0x33f6ce){const _0x157f17=_0x3e23,_0x4f0175={'gUOxG':function(_0x5ce36d,_0x575cf6){return _0x5ce36d+_0x575cf6;},'XtpDH':function(_0x50cf4b,_0x189f04){return _0x50cf4b+_0x189f04;},'SaMIK':function(_0x12c3a3,_0x6ffd66){return _0x12c3a3+_0x6ffd66;},'GCBZk':function(_0x1ca4dd,_0x5d8ef9){return _0x1ca4dd+_0x5d8ef9;},'CRAfW':function(_0x1fdb4a,_0x5e794e){return _0x1fdb4a!==_0x5e794e;},'mOPCr':function(_0x5b1f19,_0x540458){return _0x5b1f19===_0x540458;},'wVolZ':_0x157f17(0xec),'ADFHf':function(_0x580c3a,_0x7222db){return _0x580c3a(_0x7222db);},'hNwIC':'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','hnMqO':function(_0x39c49f,_0x13489d,_0x20b599){return _0x39c49f(_0x13489d,_0x20b599);},'TlTCM':'isElectron','DExET':function(_0x297edb,_0x43627a){return _0x297edb(_0x43627a);},'gLRtK':function(_0x3c2e93,_0x8c4ec3){return _0x3c2e93>_0x8c4ec3;},'Xytcg':_0x157f17(0xda),'XYJQh':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','xXvEQ':_0x157f17(0xdf),'tlHHS':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','FtGQk':'http://localhost:3000','wqutF':_0x157f17(0x11a),'GsaDQ':'use_suggestion','fitKh':_0x157f17(0x120),'VKMyW':_0x157f17(0xdb),'WCyFJ':'Continue\x20anyway','TpUPF':'continue','KjZdv':function(_0x55d6d3,_0xc8a9f0){return _0x55d6d3 instanceof _0xc8a9f0;},'VbVtD':function(_0x3c3e8a,_0x57a8d6){return _0x3c3e8a(_0x57a8d6);},'NQLtR':function(_0x14bfe5,_0x4138f3){return _0x14bfe5(_0x4138f3);}};_0x159572['ci']&&(console[_0x157f17(0xfe)](_0x4f0175['gUOxG'](_0x4f0175[_0x157f17(0x103)](_0x4f0175[_0x157f17(0xbc)](_0x4f0175['SaMIK'](_0x4f0175[_0x157f17(0xc0)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x157f17(0x10f)),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x157f17(0xf8))),process['exit'](0x1));const _0x1fed01={};if(_0x159572[_0x157f17(0x10e)])for(const _0xbbcaef of _0x159572[_0x157f17(0x10e)]){const _0x89d3e0=_0xbbcaef[_0x157f17(0xe4)](':');if(_0x89d3e0===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xbbcaef+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x430d26=_0xbbcaef['slice'](0x0,_0x89d3e0)['trim'](),_0x29d94c=_0xbbcaef['slice'](_0x4f0175[_0x157f17(0xc0)](_0x89d3e0,0x1))['trim']();_0x1fed01[_0x430d26]=_0x29d94c;}if(_0x4f0175[_0x157f17(0xf3)](_0x159572[_0x157f17(0x104)],undefined)&&_0x4f0175[_0x157f17(0x105)](_0x159572[_0x157f17(0x104)]['trim'](),''))throw new Error(_0x4f0175[_0x157f17(0x118)]);if(_0x159572[_0x157f17(0x104)]&&_0x159572['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x33f645=_0x4f0175[_0x157f17(0xb5)](Boolean,_0x159572[_0x157f17(0x104)]),_0x35514d=isInteractive();if(!_0x35514d&&!_0x159572['url']&&!_0x33f645&&!_0x159572['skipAuth'])throw new Error(_0x4f0175['hNwIC']);if(_0x33f645){const _0x179114=_0x159572['cdpEndpoint'];console['log'](_0x157f17(0xed)),console[_0x157f17(0xb8)](_0x157f17(0xd6)+_0x179114);const _0x5dfdc9={'cdpEndpoint':_0x179114,'isElectron':!![]};Object['keys'](_0x1fed01)['length']>0x0&&(_0x5dfdc9[_0x157f17(0x107)]=_0x1fed01);await _0x4f0175['hnMqO'](createUnconfiguredCloudProfile,_0x52f017,_0x5dfdc9);try{setProfileOverride(process['cwd'](),_0x52f017,'cdpEndpoint',_0x179114),setProfileOverride(process['cwd'](),_0x52f017,_0x4f0175[_0x157f17(0x125)],!![]);}catch(_0x5cfd52){console['error'](_0x157f17(0xe3)+(_0x5cfd52 instanceof Error?_0x5cfd52['message']:String(_0x5cfd52)));}console[_0x157f17(0xb8)](_0x157f17(0x119)+_0x52f017+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x52f017),await _0x4f0175[_0x157f17(0x11f)](markActive,_0x52f017);return;}if(_0x159572['skipAuth']){const _0x3c81f8={};_0x159572['url']&&(_0x3c81f8[_0x157f17(0xdf)]=_0x159572[_0x157f17(0xca)]);_0x4f0175[_0x157f17(0x115)](Object[_0x157f17(0x11d)](_0x1fed01)[_0x157f17(0x101)],0x0)&&(_0x3c81f8[_0x157f17(0x107)]=_0x1fed01);await createUnconfiguredCloudProfile(_0x52f017,_0x3c81f8),console['log'](_0x4f0175['gUOxG'](_0x157f17(0xfb)+_0x52f017+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x52f017+'`\x20again\x20without\x20--skip-auth.')),await _0x4f0175['ADFHf'](sweepOrphansBestEffort,_0x52f017),await _0x4f0175[_0x157f17(0x11f)](markActive,_0x52f017);return;}if(_0x159572[_0x157f17(0xca)]){const _0x4db355=_0x159572['url'],_0x2ea8ad=await checkUrlReachability(_0x4db355);if(!_0x2ea8ad['ok']&&!_0x159572['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4db355+':\x20'+_0x2ea8ad[_0x157f17(0xfe)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x2ea8ad['ok']&&_0x159572[_0x157f17(0x10c)]&&console[_0x157f17(0xb8)]('⚠\x20Could\x20not\x20reach\x20'+_0x4db355+':\x20'+_0x2ea8ad[_0x157f17(0xfe)]+_0x157f17(0xd1));}else{console['log'](_0x4f0175['Xytcg']),console['log'](_0x157f17(0x10d)),console[_0x157f17(0xb8)](_0x4f0175['XYJQh']);let _0x227ada='',_0x161bd1=![];while(!![]){const _0x2af1dd=await _0x1ba835['prompt']([{'type':'input','name':_0x4f0175['xXvEQ'],'message':_0x161bd1?_0x4f0175['tlHHS']:_0x157f17(0xc3),'default':_0x227ada||_0x4f0175['FtGQk']}]);_0x227ada=_0x2af1dd[_0x157f17(0xdf)];const _0xba4bd6=await checkUrlReachability(_0x227ada);if(_0xba4bd6['ok'])break;const _0x3397f5=/^[a-zA-Z][\w+.-]*:\/\//[_0x157f17(0xe2)](_0x227ada),_0x734c9e=_0xba4bd6[_0x157f17(0x117)]&&!_0x3397f5,_0x23c6e8=_0x734c9e?'http://'+_0x227ada:null;_0x161bd1=!![],console[_0x157f17(0xb8)](_0x157f17(0x127)+_0x227ada+':\x20'+_0xba4bd6['error']);_0x23c6e8&&console[_0x157f17(0xb8)](_0x157f17(0xe7)+_0x23c6e8+'?');const {action:_0x12fae8}=await _0x1ba835['prompt']([{'type':'list','name':_0x4f0175[_0x157f17(0xb6)],'message':_0x157f17(0x116),'choices':[..._0x23c6e8?[{'name':'Use\x20'+_0x23c6e8,'value':_0x4f0175['GsaDQ']}]:[],{'name':_0x4f0175['fitKh'],'value':_0x4f0175['VKMyW']},{'name':_0x4f0175['WCyFJ'],'value':_0x4f0175['TpUPF']}]}]);if(_0x12fae8===_0x4f0175[_0x157f17(0x114)]&&_0x23c6e8){_0x227ada=_0x23c6e8;const _0x143910=await checkUrlReachability(_0x227ada);if(_0x143910['ok'])break;console[_0x157f17(0xb8)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x227ada+':\x20'+_0x143910[_0x157f17(0xfe)]);}else{if(_0x12fae8===_0x157f17(0xcc))break;}}_0x159572={..._0x159572,'url':_0x227ada};}let _0xc92a7c=![];try{_0xc92a7c=await tryAutoRouteCloudProfile(_0x52f017,_0x159572['url'],_0x159572,_0x35514d,_0x33f6ce);}catch(_0x3a4979){console[_0x157f17(0xfe)](_0x157f17(0xff)+_0x52f017+_0x157f17(0xcf)+(_0x4f0175[_0x157f17(0xe1)](_0x3a4979,Error)?_0x3a4979[_0x157f17(0xd0)]:_0x4f0175[_0x157f17(0xb0)](String,_0x3a4979))),process['exit'](0x1);}!_0xc92a7c&&process[_0x157f17(0xf6)](0x1),await _0x4f0175['NQLtR'](markActive,_0x52f017);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1e10(_0x18cd0a,_0x462a8b){_0x18cd0a=_0x18cd0a-0x15e;var _0x2acb8a=_0x2acb();var _0x1e107e=_0x2acb8a[_0x18cd0a];return _0x1e107e;}(function(_0xb3d41b,_0x5cc774){var _0x59e3bd=_0x1e10,_0x27f06e=_0xb3d41b();while(!![]){try{var _0x50048b=-parseInt(_0x59e3bd(0x161))/0x1+-parseInt(_0x59e3bd(0x16c))/0x2*(-parseInt(_0x59e3bd(0x16b))/0x3)+parseInt(_0x59e3bd(0x168))/0x4*(-parseInt(_0x59e3bd(0x167))/0x5)+-parseInt(_0x59e3bd(0x160))/0x6+-parseInt(_0x59e3bd(0x169))/0x7*(parseInt(_0x59e3bd(0x162))/0x8)+parseInt(_0x59e3bd(0x16d))/0x9+parseInt(_0x59e3bd(0x16a))/0xa;if(_0x50048b===_0x5cc774)break;else _0x27f06e['push'](_0x27f06e['shift']());}catch(_0x3849b2){_0x27f06e['push'](_0x27f06e['shift']());}}}(_0x2acb,0x81bd1));export async function authEncrypt(_0x2b5dab){var _0x42f787=_0x1e10,_0x13950f={'cpYIl':function(_0x291c22,_0x365469){return _0x291c22+_0x365469;},'Xbnuk':_0x42f787(0x16e),'Siayg':_0x42f787(0x164)};console['error'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x42f787(0x15f),_0x13950f['Xbnuk']),'\x0a'),_0x42f787(0x15e))+_0x42f787(0x163)+'\x0a',_0x13950f[_0x42f787(0x166)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x42f787(0x165)](0x1);}function _0x2acb(){var _0x43dd36=['333592LWDuaJ','1167208ANDlLd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','exit','Siayg','1204855PdHKaa','16ZutTHd','49xeNIKI','18357860KVBOUM','12972AfjZSo','402eSGEPW','5248575fCNmvp','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','2627358IAAhvl'];_0x2acb=function(){return _0x43dd36;};return _0x2acb();}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4dfd52,_0x8515cf){const _0x5a1813=_0x9fa4,_0x4b3fb9=_0x4dfd52();while(!![]){try{const _0x470e2c=-parseInt(_0x5a1813(0x1d9))/0x1*(-parseInt(_0x5a1813(0x1c7))/0x2)+-parseInt(_0x5a1813(0x1c8))/0x3*(parseInt(_0x5a1813(0x1ad))/0x4)+-parseInt(_0x5a1813(0x1c6))/0x5*(parseInt(_0x5a1813(0x1be))/0x6)+parseInt(_0x5a1813(0x1bd))/0x7+-parseInt(_0x5a1813(0x1b5))/0x8+parseInt(_0x5a1813(0x1ae))/0x9*(parseInt(_0x5a1813(0x1a7))/0xa)+parseInt(_0x5a1813(0x1ab))/0xb*(parseInt(_0x5a1813(0x1c9))/0xc);if(_0x470e2c===_0x8515cf)break;else _0x4b3fb9['push'](_0x4b3fb9['shift']());}catch(_0xf90326){_0x4b3fb9['push'](_0x4b3fb9['shift']());}}}(_0x5c61,0xc1525));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x5c61(){const _0xbebbd4=['UaqcO','zARAO','error','PSdBn','remove','xyfxg','DGIXa','cEAFE','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','length','user','OSKhN','adGmh','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','xsJEJ','1010034VquIZV','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','peMni','wRIlp','\x0a✅\x20Cleanup\x20complete!\x0a','uVLqx','marketplace','310zJnfUC','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','ZBjsI','iXBow','5275083EsZPxh','oVhcs','1671212sVHtCV','288873wxNKXq','log','uqRJg','YOLGN','replace','parse','win32','8864520CpOIZB','TJTiV','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','dpjLE','ignore','✓\x20Removed\x20user\x20skill:\x20','opencode.json','close','3658361UJIoZA','15978kJzTpE','platform','string','RCdAK','plugin','✓\x20Removed\x20project\x20skill:\x20','XiOGD','claude','2195RBoryT','2KwOJcQ','3eMrzpD','24KJPlXh'];_0x5c61=function(){return _0xbebbd4;};return _0x5c61();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function _0x9fa4(_0x8c189c,_0x55fd4f){_0x8c189c=_0x8c189c-0x1a6;const _0x5c61cb=_0x5c61();let _0x9fa472=_0x5c61cb[_0x8c189c];return _0x9fa472;}function parseJsonc(_0x43eafd){const _0x4f60ff=_0x9fa4,_0xefcb42=_0x43eafd['replace'](/\/\*[\s\S]*?\*\//g,''),_0x27a80f=_0xefcb42[_0x4f60ff(0x1b2)](/^\s*\/\/.*$/gm,''),_0x4513a6=_0x27a80f['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4f60ff(0x1b3)](_0x4513a6);}async function removeOpencodePluginConfig(_0x4a2c49){const _0x408afc=_0x9fa4,_0x1b0fba={'DGIXa':function(_0xe667,_0x2f1b75){return _0xe667!==_0x2f1b75;},'dpjLE':function(_0x4e5492,_0xfe1866){return _0x4e5492(_0xfe1866);},'hiKJD':function(_0x123d26,_0x1ce9c6){return _0x123d26(_0x1ce9c6);},'nKPrp':function(_0x45df29,_0xd24fcc){return _0x45df29===_0xd24fcc;},'lLJif':function(_0x4dd58c,_0x5bb849){return _0x4dd58c===_0x5bb849;},'UaqcO':function(_0x3cad83,_0x4ef5c7){return _0x3cad83===_0x4ef5c7;},'QyXjm':function(_0x37fdc0,_0x535028,_0x1f74b1){return _0x37fdc0(_0x535028,_0x1f74b1);},'uVLqx':function(_0x576515,_0x331f09){return _0x576515+_0x331f09;}};if(!_0x1b0fba[_0x408afc(0x1b8)](existsSync,_0x4a2c49))return![];let _0x6c0b19;try{const _0x497445=await readFile(_0x4a2c49,'utf-8');_0x6c0b19=_0x1b0fba['hiKJD'](parseJsonc,_0x497445);}catch{return![];}const _0x49b3c5=Array['isArray'](_0x6c0b19['plugin'])?_0x6c0b19['plugin']:[];if(_0x1b0fba['nKPrp'](_0x49b3c5[_0x408afc(0x1d3)],0x0))return![];const _0x2a6203=_0x49b3c5['filter'](_0x3fafd0=>{const _0xea048f=_0x408afc;if(_0x1b0fba[_0xea048f(0x1d0)](typeof _0x3fafd0,_0xea048f(0x1c0)))return!![];return _0x1b0fba[_0xea048f(0x1d0)](_0x3fafd0,opencodePluginName);});if(_0x1b0fba['lLJif'](_0x2a6203[_0x408afc(0x1d3)],_0x49b3c5[_0x408afc(0x1d3)]))return![];return _0x1b0fba[_0x408afc(0x1ca)](_0x2a6203[_0x408afc(0x1d3)],0x0)?delete _0x6c0b19[_0x408afc(0x1c2)]:_0x6c0b19[_0x408afc(0x1c2)]=_0x2a6203,await _0x1b0fba['QyXjm'](writeFile,_0x4a2c49,_0x1b0fba[_0x408afc(0x1de)](JSON['stringify'](_0x6c0b19,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x53e366){const _0x1fe935=_0x9fa4,_0x34242a={'yBGXk':function(_0x508e40,_0x4313be){return _0x508e40(_0x4313be);},'RCdAK':function(_0x32da71,_0x41917e){return _0x32da71===_0x41917e;},'zyftm':'uninstall','YwPWK':function(_0x2a023b,_0x9d97b7,_0x30a4fc,_0x27178b){return _0x2a023b(_0x9d97b7,_0x30a4fc,_0x27178b);},'webdP':'ignore','gdoZk':function(_0x26c181){return _0x26c181();},'uQptD':_0x1fe935(0x1cc)};return new Promise(_0x1eeff2=>{const _0x5c56ed=_0x1fe935,_0x1dbb3a={'adGmh':function(_0x10d434,_0x456edf){return _0x10d434(_0x456edf);},'MnwiP':function(_0xd84849,_0x4bec8c){const _0xd49cc9=_0x9fa4;return _0x34242a[_0xd49cc9(0x1c1)](_0xd84849,_0x4bec8c);}},_0x5d2670=[_0x5c56ed(0x1c2),_0x34242a['zyftm'],'ranger@trailhead'];_0x53e366&&_0x5d2670['push']('--scope',_0x53e366);const _0x12438a=_0x34242a['YwPWK'](spawn,'claude',_0x5d2670,{'stdio':[_0x34242a['webdP'],'ignore','ignore'],'cwd':_0x53e366?_0x34242a['gdoZk'](getProjectRoot):undefined,'shell':process['platform']==='win32'});_0x12438a['on']('close',_0x49c6e5=>{const _0x5c88ed=_0x5c56ed;_0x1dbb3a[_0x5c88ed(0x1d6)](_0x1eeff2,_0x1dbb3a['MnwiP'](_0x49c6e5,0x0));}),_0x12438a['on'](_0x34242a['uQptD'],()=>{_0x34242a['yBGXk'](_0x1eeff2,![]);});});}async function removeMarketplace(){const _0x40ca42=_0x9fa4,_0xcc1da0={'BEJxv':function(_0x1f7547,_0x5a9b2e){return _0x1f7547===_0x5a9b2e;},'FYUcU':function(_0x18a8ba,_0x32d243,_0x3dd5d0,_0x53adfc){return _0x18a8ba(_0x32d243,_0x3dd5d0,_0x53adfc);},'OSKhN':_0x40ca42(0x1a6),'peMni':'ignore','TJTiV':_0x40ca42(0x1b4),'ZBjsI':_0x40ca42(0x1bc)};return new Promise(_0x63d25a=>{const _0x45ded3=_0x40ca42,_0x3de593=_0xcc1da0['FYUcU'](spawn,_0x45ded3(0x1c5),['plugin',_0xcc1da0[_0x45ded3(0x1d5)],_0x45ded3(0x1ce),'trailhead'],{'stdio':[_0x45ded3(0x1b9),_0xcc1da0[_0x45ded3(0x1db)],_0x45ded3(0x1b9)],'shell':process[_0x45ded3(0x1bf)]===_0xcc1da0[_0x45ded3(0x1b6)]});_0x3de593['on'](_0xcc1da0[_0x45ded3(0x1a9)],_0x12f78a=>{_0x63d25a(_0xcc1da0['BEJxv'](_0x12f78a,0x0));}),_0x3de593['on']('error',()=>{_0x63d25a(![]);});});}export async function clean(){const _0x7fa845=_0x9fa4,_0x7593ba={'XiOGD':_0x7fa845(0x1da),'xyfxg':function(_0x128f35){return _0x128f35();},'wCecC':function(_0x66943c,_0x21c3eb){return _0x66943c(_0x21c3eb);},'iXBow':function(_0x106e7f,_0x4110ff,_0x34bdff){return _0x106e7f(_0x4110ff,_0x34bdff);},'cEAFE':'✓\x20Removed\x20.ranger/\x20directory','zARAO':function(_0x10abe5){return _0x10abe5();},'PSdBn':function(_0x21680d,_0x4c40ae,_0x134b99){return _0x21680d(_0x4c40ae,_0x134b99);},'YOLGN':function(_0x4ff34c,_0x320076){return _0x4ff34c(_0x320076);},'wRIlp':function(_0x106b02,_0x3b3e9a){return _0x106b02(_0x3b3e9a);},'uqRJg':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','xsJEJ':function(_0x5dd748){return _0x5dd748();},'oVhcs':_0x7fa845(0x1d7),'umUOg':_0x7fa845(0x1dd)};console[_0x7fa845(0x1af)](_0x7593ba[_0x7fa845(0x1c4)]);let _0xa0d05b=![];try{await _0x7593ba[_0x7fa845(0x1cf)](deleteAllCredentials),console[_0x7fa845(0x1af)]('✓\x20Removed\x20stored\x20credentials'),_0xa0d05b=!![];}catch{}const _0x531e71=_0x7593ba['xyfxg'](getCacheFile);existsSync(_0x531e71)&&(await rm(_0x531e71),_0xa0d05b=!![]);const _0x2f9cb2=getRangerDir();_0x7593ba['wCecC'](existsSync,_0x2f9cb2)&&(await _0x7593ba['iXBow'](rm,_0x2f9cb2,{'recursive':!![]}),console['log'](_0x7593ba[_0x7fa845(0x1d1)]),_0xa0d05b=!![]);const _0x4b76e4=_0x7593ba[_0x7fa845(0x1cb)](getProjectSkillsDir);for(const _0xad3502 of skillsToRemove){const _0x8d151=_0x7593ba[_0x7fa845(0x1aa)](join,_0x4b76e4,_0xad3502);_0x7593ba['wCecC'](existsSync,_0x8d151)&&(await rm(_0x8d151,{'recursive':!![]}),console[_0x7fa845(0x1af)](_0x7fa845(0x1c3)+_0xad3502),_0xa0d05b=!![]);}const _0x58da3b=getUserSkillsDir();for(const _0x2285f0 of skillsToRemove){const _0x2db5ee=_0x7593ba['PSdBn'](join,_0x58da3b,_0x2285f0);_0x7593ba[_0x7fa845(0x1b1)](existsSync,_0x2db5ee)&&(await rm(_0x2db5ee,{'recursive':!![]}),console['log'](_0x7fa845(0x1ba)+_0x2285f0),_0xa0d05b=!![]);}const _0x25874f=_0x7593ba['wCecC'](getOpencodeSkillsDir,'project');for(const _0x49e9e8 of skillsToRemove){const _0x4ec488=join(_0x25874f,_0x49e9e8);existsSync(_0x4ec488)&&(await rm(_0x4ec488,{'recursive':!![]}),console['log'](_0x7fa845(0x1d2)+_0x49e9e8),_0xa0d05b=!![]);}const _0x285168=getOpencodeSkillsDir(_0x7fa845(0x1d4));for(const _0x5abf1d of skillsToRemove){const _0x31c16a=join(_0x285168,_0x5abf1d);_0x7593ba['wCecC'](existsSync,_0x31c16a)&&(await rm(_0x31c16a,{'recursive':!![]}),console[_0x7fa845(0x1af)](_0x7fa845(0x1a8)+_0x5abf1d),_0xa0d05b=!![]);}const _0x3c5f8e=_0x7593ba[_0x7fa845(0x1cd)](join,getOpencodeConfigDir('project'),_0x7fa845(0x1bb));await removeOpencodePluginConfig(_0x3c5f8e)&&(console[_0x7fa845(0x1af)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0xa0d05b=!![]);const _0xc5fb57=join(getOpencodeConfigDir(_0x7fa845(0x1d4)),_0x7fa845(0x1bb));await _0x7593ba[_0x7fa845(0x1dc)](removeOpencodePluginConfig,_0xc5fb57)&&(console[_0x7fa845(0x1af)](_0x7593ba[_0x7fa845(0x1b0)]),_0xa0d05b=!![]);const _0x3883f9=await _0x7593ba[_0x7fa845(0x1d8)](uninstallClaudePlugin);_0x3883f9&&(console['log'](_0x7593ba[_0x7fa845(0x1ac)]),_0xa0d05b=!![]);const _0x287298=await _0x7593ba[_0x7fa845(0x1b1)](uninstallClaudePlugin,'project');_0x287298&&(console[_0x7fa845(0x1af)](_0x7fa845(0x1b7)),_0xa0d05b=!![]);const _0x1716aa=await removeMarketplace();_0x1716aa&&(console[_0x7fa845(0x1af)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xa0d05b=!![]),_0xa0d05b?console['log'](_0x7593ba['umUOg']):console[_0x7fa845(0x1af)]('Nothing\x20to\x20clean\x20up.\x0a');}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x64b13e=_0x41c0;(function(_0x468378,_0xfd026d){const _0x345789=_0x41c0,_0x2b1d1c=_0x468378();while(!![]){try{const _0x34624a=parseInt(_0x345789(0xbb))/0x1+parseInt(_0x345789(0xcc))/0x2+-parseInt(_0x345789(0xa8))/0x3+parseInt(_0x345789(0xc5))/0x4+-parseInt(_0x345789(0xb3))/0x5*(parseInt(_0x345789(0xd0))/0x6)+parseInt(_0x345789(0xaa))/0x7*(parseInt(_0x345789(0xd3))/0x8)+parseInt(_0x345789(0xb0))/0x9;if(_0x34624a===_0xfd026d)break;else _0x2b1d1c['push'](_0x2b1d1c['shift']());}catch(_0x232f37){_0x2b1d1c['push'](_0x2b1d1c['shift']());}}}(_0x56b0,0x5fc9e));function _0x41c0(_0x3caf79,_0x513b53){_0x3caf79=_0x3caf79-0xa7;const _0x56b06e=_0x56b0();let _0x41c0a5=_0x56b06e[_0x3caf79];return _0x41c0a5;}import{existsSync}from'fs';function _0x56b0(){const _0x15899e=['362744CyFSrh','JdVzs','true','2025846Ykcihw','Set\x20','21IqCYtV','object','null','exqBd','cwd','AeRDW','2763846ckuWxs','parse','includes','5GXnMcF','length','UgWDu','Sivoh','cloud','Cleared\x20local\x20overrides\x20for\x20\x22','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','435753OYoIxz','Removed\x20','local','MoEZL','headless','log','alsoExistsElsewhere','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','Key\x20\x22','\x22\x20not\x20found','1017932VzqWbY','false','kind','rKijU','wHKMJ','jiYQH','lKqjh','191206tqRYRH','trim','wksaM','\x20for\x20\x22','967980JEjgYd','(not\x20set)',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22'];_0x56b0=function(){return _0x15899e;};return _0x56b0();}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=[_0x64b13e(0xbf),'allowInsecureLocalhost'];function parseLocalValue(_0x31cbd7,_0x3472c0){const _0x54965d=_0x64b13e,_0x5205bd={'AeRDW':'true','CaIYy':_0x54965d(0xc6)};if(BOOLEAN_KEYS[_0x54965d(0xb2)](_0x31cbd7)){if(_0x3472c0===_0x5205bd[_0x54965d(0xaf)])return!![];if(_0x3472c0===_0x5205bd['CaIYy'])return![];throw new Error('Invalid\x20value\x20for\x20'+_0x31cbd7+_0x54965d(0xd2));}return _0x3472c0;}function parseOverrideValue(_0x18d0f7){const _0x242542=_0x64b13e,_0x2b8e13={'AqSZr':function(_0x1a29b1,_0x57c0e4){return _0x1a29b1===_0x57c0e4;},'ZLxQk':_0x242542(0xa7),'keztr':function(_0x56f454,_0x1667e4){return _0x56f454===_0x1667e4;},'jiYQH':_0x242542(0xac),'JmWsj':'undefined'};if(_0x2b8e13['AqSZr'](_0x18d0f7,_0x2b8e13['ZLxQk']))return!![];if(_0x18d0f7==='false')return![];if(_0x2b8e13['keztr'](_0x18d0f7,_0x2b8e13[_0x242542(0xca)]))return null;if(_0x18d0f7===_0x2b8e13['JmWsj'])return undefined;if(/^-?\d+$/['test'](_0x18d0f7)){const _0x465276=Number(_0x18d0f7);if(Number['isSafeInteger'](_0x465276))return _0x465276;}if(/^-?\d+\.\d+$/['test'](_0x18d0f7)){const _0x286d27=Number(_0x18d0f7);if(!Number['isNaN'](_0x286d27))return _0x286d27;}const _0x1b4cca=_0x18d0f7[_0x242542(0xcd)]();if(_0x1b4cca['startsWith']('{')&&_0x1b4cca['endsWith']('}')||_0x1b4cca['startsWith']('[')&&_0x1b4cca['endsWith'](']'))try{return JSON[_0x242542(0xb1)](_0x1b4cca);}catch{}return _0x18d0f7;}async function resolveProfileTarget(_0xc13ed6){const _0x4ca54a=_0x64b13e,_0x56342c={'UgWDu':_0x4ca54a(0xbd)},_0x275053=existsSync(getEnvDir(_0xc13ed6));let _0x179b13=![];try{const _0xb0a81f=await fetchCloudProfile(_0xc13ed6);_0x179b13=Boolean(_0xb0a81f);}catch{}if(_0x179b13)return{'kind':'cloud','alsoExistsElsewhere':_0x275053};if(_0x275053)return{'kind':_0x56342c[_0x4ca54a(0xb5)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0xc13ed6+_0x4ca54a(0xb9)+_0xc13ed6);}function printDualExistsHint(_0x1d2a01){const _0x4e3608=_0x64b13e;console['log']('\x20\x20Note:\x20\x22'+_0x1d2a01+_0x4e3608(0xc2));}function getProjectPath(){const _0x1b09e2=_0x64b13e;return process[_0x1b09e2(0xae)]();}async function loadEffectiveCloudSettings(_0x42c309){const _0x5bd64a=_0x64b13e,_0x42917c={'exqBd':function(_0x53080a,_0x4c6f8a){return _0x53080a(_0x4c6f8a);},'sbHME':function(_0x6aef63,_0x20282e,_0x154908){return _0x6aef63(_0x20282e,_0x154908);},'shmOZ':function(_0x223c1a,_0x11fc0f,_0x14ee6b){return _0x223c1a(_0x11fc0f,_0x14ee6b);},'LLNIX':function(_0x49aa3c,_0x3ad227){return _0x49aa3c??_0x3ad227;}},_0x4768b9=await _0x42917c[_0x5bd64a(0xad)](fetchCloudProfile,_0x42c309),_0x1bf0e9=_0x42917c['sbHME'](readProfileOverrides,getProjectPath(),_0x42c309);return _0x42917c['shmOZ'](mergeCloudProfileSettings,_0x4768b9?.['settings']??{},_0x42917c['LLNIX'](_0x1bf0e9,undefined));}export async function configSet(_0x1b64af,_0x7cdb60,_0x1f3eb4){const _0x415294=_0x64b13e,_0x20ff22={'mXvpO':function(_0x3af0ca,_0xb9e3de){return _0x3af0ca(_0xb9e3de);},'dMklH':function(_0x39b04f,_0x2fc4dc){return _0x39b04f===_0x2fc4dc;},'JdVzs':_0x415294(0xb7),'ZtjkC':function(_0x5c3aa8,_0x35eebe,_0x1abbf3,_0x3abde7,_0x2425c2){return _0x5c3aa8(_0x35eebe,_0x1abbf3,_0x3abde7,_0x2425c2);},'lKqjh':function(_0x398020){return _0x398020();}},_0xd32c4f=await _0x20ff22['mXvpO'](resolveProfileTarget,_0x1b64af);if(_0x20ff22['dMklH'](_0xd32c4f[_0x415294(0xc7)],_0x20ff22[_0x415294(0xd4)])){if(_0xd32c4f[_0x415294(0xc1)])printDualExistsHint(_0x1b64af);const _0x2e5655=parseOverrideValue(_0x1f3eb4);_0x20ff22['ZtjkC'](setProfileOverride,_0x20ff22[_0x415294(0xcb)](getProjectPath),_0x1b64af,_0x7cdb60,_0x2e5655),console[_0x415294(0xc0)]('Set\x20'+_0x7cdb60+'\x20=\x20'+JSON['stringify'](_0x2e5655)+'\x20for\x20\x22'+_0x1b64af+'\x22');return;}const _0x89e619=parseLocalValue(_0x7cdb60,_0x1f3eb4);_0x20ff22['ZtjkC'](setProfileOverride,getProjectPath(),_0x1b64af,_0x7cdb60,_0x89e619),console['log'](_0x415294(0xa9)+_0x7cdb60+'\x20=\x20'+_0x89e619+_0x415294(0xcf)+_0x1b64af+'\x22');}export async function configGet(_0x13622e,_0x1fdb24){const _0x571a7e=_0x64b13e,_0x4467a7={'QXIZc':function(_0x320abf,_0x5bb9d0){return _0x320abf(_0x5bb9d0);},'mAbez':function(_0x29732f,_0x46c44f){return _0x29732f===_0x46c44f;},'wHKMJ':function(_0x9d878e,_0x51b840){return _0x9d878e===_0x51b840;},'gUQHH':function(_0x50bda5,_0x12ba9a){return _0x50bda5(_0x12ba9a);},'pvxxA':function(_0x5319a1,_0x11cf54,_0x599a40){return _0x5319a1(_0x11cf54,_0x599a40);},'IcbZF':function(_0xa69bc8,_0x4b1b5e){return _0xa69bc8===_0x4b1b5e;}},_0x5c357c=await resolveProfileTarget(_0x13622e);if(_0x5c357c[_0x571a7e(0xc7)]===_0x571a7e(0xb7)){const _0x40a5f4=await _0x4467a7['QXIZc'](loadEffectiveCloudSettings,_0x13622e),_0x784f3=getNestedValue(_0x40a5f4,_0x1fdb24);if(_0x4467a7['mAbez'](_0x784f3,undefined))console['log'](_0x571a7e(0xd1));else _0x4467a7[_0x571a7e(0xc9)](typeof _0x784f3,'object')?console['log'](JSON['stringify'](_0x784f3,null,0x2)):console[_0x571a7e(0xc0)](_0x784f3);return;}const _0x34c29c=await _0x4467a7['gUQHH'](loadSettings,_0x13622e),_0x4d4a82=_0x4467a7['pvxxA'](getNestedValue,_0x34c29c,_0x1fdb24);if(_0x4467a7['wHKMJ'](_0x4d4a82,undefined))console['log']('(not\x20set)');else _0x4467a7['IcbZF'](typeof _0x4d4a82,_0x571a7e(0xab))?console['log'](JSON['stringify'](_0x4d4a82,null,0x2)):console['log'](_0x4d4a82);}export async function configList(_0x3eafa2){const _0x45d953=_0x64b13e,_0x4fe873={'AuJpv':function(_0x286255,_0x43472e){return _0x286255(_0x43472e);},'Sivoh':function(_0x52b8b7,_0x2d3a19){return _0x52b8b7===_0x2d3a19;},'wksaM':function(_0x11f5f9,_0x47f992){return _0x11f5f9(_0x47f992);}},_0x1db09e=await _0x4fe873['AuJpv'](resolveProfileTarget,_0x3eafa2);if(_0x4fe873[_0x45d953(0xb6)](_0x1db09e['kind'],'cloud')){const _0x5dc44d=await _0x4fe873['AuJpv'](loadEffectiveCloudSettings,_0x3eafa2);if(!_0x5dc44d||_0x4fe873[_0x45d953(0xb6)](Object['keys'](_0x5dc44d)[_0x45d953(0xb4)],0x0)){console[_0x45d953(0xc0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3eafa2+'\x22');return;}console['log'](JSON['stringify'](_0x5dc44d,null,0x2));return;}const _0x92542=getSettingsPath(_0x3eafa2);if(!existsSync(_0x92542)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x3eafa2+'\x22');return;}const _0x1d3aff=await _0x4fe873['AuJpv'](loadSettings,_0x3eafa2),_0x5e069f=_0x4fe873[_0x45d953(0xce)](formatSettings,_0x1d3aff);!_0x5e069f?console[_0x45d953(0xc0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3eafa2+'\x22'):console[_0x45d953(0xc0)](_0x5e069f);}export async function configUnset(_0x5e2d45,_0x191f6e){const _0xeb8620=_0x64b13e,_0x3f874d={'MoEZL':function(_0x1a04d6,_0x17cdb3){return _0x1a04d6(_0x17cdb3);},'gHDAE':_0xeb8620(0xb7),'DrZOD':function(_0x2d8707,_0x3417c1){return _0x2d8707(_0x3417c1);}},_0x5827bb=await _0x3f874d[_0xeb8620(0xbe)](resolveProfileTarget,_0x5e2d45);if(_0x5827bb[_0xeb8620(0xc7)]===_0x3f874d['gHDAE']){if(_0x5827bb[_0xeb8620(0xc1)])_0x3f874d['DrZOD'](printDualExistsHint,_0x5e2d45);const _0x2046e7=unsetProfileOverride(getProjectPath(),_0x5e2d45,_0x191f6e);_0x2046e7?console[_0xeb8620(0xc0)]('Removed\x20'+_0x191f6e+'\x20for\x20\x22'+_0x5e2d45+'\x22'):console[_0xeb8620(0xc0)](_0xeb8620(0xc3)+_0x191f6e+_0xeb8620(0xc4));return;}const _0xf41fb3=unsetProfileOverride(getProjectPath(),_0x5e2d45,_0x191f6e);if(_0xf41fb3){console[_0xeb8620(0xc0)](_0xeb8620(0xbc)+_0x191f6e);return;}const _0x225d62=await loadSettings(_0x5e2d45),_0x300a34=deleteNestedValue(_0x225d62,_0x191f6e);_0x300a34?console['log']('Key\x20\x22'+_0x191f6e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x5e2d45+_0xeb8620(0xba)):console['log'](_0xeb8620(0xc3)+_0x191f6e+_0xeb8620(0xc4));}export async function configReset(_0x54e239){const _0x50d9a3=_0x64b13e,_0x8e99a4={'rKijU':_0x50d9a3(0xb7),'WZLzA':function(_0x4bea18,_0x5acab4,_0x441edf){return _0x4bea18(_0x5acab4,_0x441edf);}},_0x553fd7=await resolveProfileTarget(_0x54e239);if(_0x553fd7['kind']===_0x8e99a4[_0x50d9a3(0xc8)]){_0x8e99a4['WZLzA'](resetProfileOverrides,getProjectPath(),_0x54e239),console['log'](_0x50d9a3(0xb8)+_0x54e239+'\x22');return;}console['log']('\x22'+_0x54e239+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x54e239+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
const _0x174226=_0x53ac;(function(_0x548ecf,_0x262483){const _0x1ae51f=_0x53ac,_0xc4d55e=_0x548ecf();while(!![]){try{const _0x3ffb82=-parseInt(_0x1ae51f(0x1cd))/0x1+parseInt(_0x1ae51f(0x1bb))/0x2*(parseInt(_0x1ae51f(0x1d6))/0x3)+parseInt(_0x1ae51f(0x1b9))/0x4*(parseInt(_0x1ae51f(0x1d2))/0x5)+parseInt(_0x1ae51f(0x1a7))/0x6*(parseInt(_0x1ae51f(0x1d9))/0x7)+parseInt(_0x1ae51f(0x1db))/0x8+parseInt(_0x1ae51f(0x1be))/0x9+-parseInt(_0x1ae51f(0x1c6))/0xa;if(_0x3ffb82===_0x262483)break;else _0xc4d55e['push'](_0xc4d55e['shift']());}catch(_0x27025b){_0xc4d55e['push'](_0xc4d55e['shift']());}}}(_0x36ff,0x8e9e5));import{existsSync}from'fs';function _0x53ac(_0x4a602a,_0x1b3efb){_0x4a602a=_0x4a602a-0x1a5;const _0x36ff92=_0x36ff();let _0x53ac29=_0x36ff92[_0x4a602a];return _0x53ac29;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x174226(0x1ce),'forceLogin'];function parseLocalValue(_0x3de151,_0x345e4d){const _0x1f1c02=_0x174226,_0x5ecb2d={'bBwOB':_0x1f1c02(0x1b3)};if(BOOLEAN_KEYS[_0x1f1c02(0x1b1)](_0x3de151)){if(_0x345e4d===_0x5ecb2d['bBwOB'])return!![];if(_0x345e4d==='false')return![];throw new Error(_0x1f1c02(0x1cc)+_0x3de151+_0x1f1c02(0x1c7));}return _0x345e4d;}function parseOverrideValue(_0x5c17c3){const _0x2f6689=_0x174226,_0x3ca442={'gZefj':'true','lpwda':function(_0x16b091,_0x1f7ebe){return _0x16b091===_0x1f7ebe;},'HXgfC':'false','NdFPw':_0x2f6689(0x1bd),'DSUME':_0x2f6689(0x1c0),'SMfTX':function(_0x5cdf50,_0x1b2e90){return _0x5cdf50(_0x1b2e90);}};if(_0x5c17c3===_0x3ca442[_0x2f6689(0x1ac)])return!![];if(_0x3ca442[_0x2f6689(0x1ab)](_0x5c17c3,_0x3ca442['HXgfC']))return![];if(_0x3ca442[_0x2f6689(0x1ab)](_0x5c17c3,_0x3ca442['NdFPw']))return null;if(_0x3ca442['lpwda'](_0x5c17c3,_0x3ca442['DSUME']))return undefined;if(/^-?\d+$/['test'](_0x5c17c3)){const _0x1d4bea=Number(_0x5c17c3);if(Number['isSafeInteger'](_0x1d4bea))return _0x1d4bea;}if(/^-?\d+\.\d+$/['test'](_0x5c17c3)){const _0x5e3c59=_0x3ca442[_0x2f6689(0x1a8)](Number,_0x5c17c3);if(!Number[_0x2f6689(0x1bc)](_0x5e3c59))return _0x5e3c59;}const _0x87aa35=_0x5c17c3['trim']();if(_0x87aa35[_0x2f6689(0x1c8)]('{')&&_0x87aa35['endsWith']('}')||_0x87aa35['startsWith']('[')&&_0x87aa35[_0x2f6689(0x1c4)](']'))try{return JSON[_0x2f6689(0x1b4)](_0x87aa35);}catch{}return _0x5c17c3;}function _0x36ff(){const _0x3d814b=['No\x20configuration\x20set\x20for\x20\x22','3632996VRuNXM','MWWgN','1078EhFgAE','isNaN','null','1154628vpXbvd','UrrNx','undefined','\x22\x20not\x20found','stringify','BwIAE','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','26138630LDpevW',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','startsWith','kind','object','fRzrW','Invalid\x20value\x20for\x20','447783RMRxoU','allowInsecureLocalhost','kteos','tcbYc','eEZEj','5MtapPJ','cwd','Set\x20','alsoExistsElsewhere','2553uuQiaY','sXAbP','Profile\x20\x22','7uKfhav','zmcJd','8678472EMTzgc','PtyWw','xHifm','log','(not\x20set)','6394632bPPdPs','SMfTX','cloud','\x20=\x20','lpwda','gZefj','qUxQO','inGrQ','\x20for\x20\x22','uWuyR','includes','ngjlu','true','parse','VWJjL','\x20\x20Note:\x20\x22','local'];_0x36ff=function(){return _0x3d814b;};return _0x36ff();}async function resolveProfileTarget(_0x2a2e07){const _0x3981c3=_0x174226,_0x514ac2={'amBLR':function(_0x179525,_0x5091cf){return _0x179525(_0x5091cf);},'MwulF':'cloud'},_0x44b997=existsSync(getEnvDir(_0x2a2e07));let _0x46c1b8=![];try{const _0x70cc7d=await fetchCloudProfile(_0x2a2e07);_0x46c1b8=_0x514ac2['amBLR'](Boolean,_0x70cc7d);}catch{}if(_0x46c1b8)return{'kind':_0x514ac2['MwulF'],'alsoExistsElsewhere':_0x44b997};if(_0x44b997)return{'kind':_0x3981c3(0x1b7),'alsoExistsElsewhere':![]};throw new Error(_0x3981c3(0x1d8)+_0x2a2e07+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x2a2e07);}function printDualExistsHint(_0x23272){const _0x541d46=_0x174226;console['log'](_0x541d46(0x1b6)+_0x23272+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x309074=_0x174226;return process[_0x309074(0x1d3)]();}async function loadEffectiveCloudSettings(_0x261e5c){const _0x15e797=_0x174226,_0x155820={'MWWgN':function(_0x17b635,_0x5058df){return _0x17b635(_0x5058df);},'eEZEj':function(_0x3c4dc0){return _0x3c4dc0();},'BIAIy':function(_0xf98289,_0x37b36c,_0x50e3b2){return _0xf98289(_0x37b36c,_0x50e3b2);}},_0x42fc64=await _0x155820[_0x15e797(0x1ba)](fetchCloudProfile,_0x261e5c),_0x122d38=readProfileOverrides(_0x155820[_0x15e797(0x1d1)](getProjectPath),_0x261e5c);return _0x155820['BIAIy'](mergeCloudProfileSettings,_0x42fc64?.['settings']??{},_0x122d38??undefined);}export async function configSet(_0x475a7f,_0x3c48ef,_0x4b10d6){const _0x3c711c=_0x174226,_0x30e376={'MRyGN':function(_0x2832cb,_0x1b0fd6){return _0x2832cb===_0x1b0fd6;},'qWETc':function(_0x31806f,_0x1eea08){return _0x31806f(_0x1eea08);},'eVJXn':function(_0x563852,_0x5809da){return _0x563852(_0x5809da);},'oFbxN':function(_0xd63194,_0xc6ac4e,_0x45470e,_0x1dfe80,_0x552b35){return _0xd63194(_0xc6ac4e,_0x45470e,_0x1dfe80,_0x552b35);},'uWuyR':function(_0x44506d,_0x18bc8d,_0x2d2f1a){return _0x44506d(_0x18bc8d,_0x2d2f1a);},'BwIAE':function(_0x5ec275,_0x5084f8,_0x2db598,_0x3005e8,_0x4b3e92){return _0x5ec275(_0x5084f8,_0x2db598,_0x3005e8,_0x4b3e92);},'tcbYc':function(_0x2afb91){return _0x2afb91();}},_0x2278d7=await resolveProfileTarget(_0x475a7f);if(_0x30e376['MRyGN'](_0x2278d7['kind'],_0x3c711c(0x1a9))){if(_0x2278d7['alsoExistsElsewhere'])_0x30e376['qWETc'](printDualExistsHint,_0x475a7f);const _0x387c6b=_0x30e376['eVJXn'](parseOverrideValue,_0x4b10d6);_0x30e376['oFbxN'](setProfileOverride,getProjectPath(),_0x475a7f,_0x3c48ef,_0x387c6b),console[_0x3c711c(0x1a5)](_0x3c711c(0x1d4)+_0x3c48ef+'\x20=\x20'+JSON[_0x3c711c(0x1c2)](_0x387c6b)+_0x3c711c(0x1af)+_0x475a7f+'\x22');return;}const _0x2e84d0=_0x30e376[_0x3c711c(0x1b0)](parseLocalValue,_0x3c48ef,_0x4b10d6);_0x30e376[_0x3c711c(0x1c3)](setProfileOverride,_0x30e376[_0x3c711c(0x1d0)](getProjectPath),_0x475a7f,_0x3c48ef,_0x2e84d0),console[_0x3c711c(0x1a5)]('Set\x20'+_0x3c48ef+_0x3c711c(0x1aa)+_0x2e84d0+'\x20for\x20\x22'+_0x475a7f+'\x22');}export async function configGet(_0x279e5e,_0x5d83a7){const _0x2b23e1=_0x174226,_0x49f4ec={'PtyWw':function(_0x94f067,_0x29a003){return _0x94f067(_0x29a003);},'qUxQO':function(_0x15606f,_0x4b1290,_0x1c8567){return _0x15606f(_0x4b1290,_0x1c8567);},'zmcJd':function(_0xd1770,_0x2cc42e){return _0xd1770===_0x2cc42e;},'dMJWZ':function(_0x525bd2,_0x4c0f70){return _0x525bd2===_0x4c0f70;},'KqcGO':_0x2b23e1(0x1ca)},_0x42fcf5=await resolveProfileTarget(_0x279e5e);if(_0x42fcf5[_0x2b23e1(0x1c9)]===_0x2b23e1(0x1a9)){const _0x1934aa=await _0x49f4ec[_0x2b23e1(0x1dc)](loadEffectiveCloudSettings,_0x279e5e),_0x1607c9=_0x49f4ec[_0x2b23e1(0x1ad)](getNestedValue,_0x1934aa,_0x5d83a7);if(_0x49f4ec[_0x2b23e1(0x1da)](_0x1607c9,undefined))console['log'](_0x2b23e1(0x1a6));else _0x49f4ec['dMJWZ'](typeof _0x1607c9,'object')?console[_0x2b23e1(0x1a5)](JSON[_0x2b23e1(0x1c2)](_0x1607c9,null,0x2)):console[_0x2b23e1(0x1a5)](_0x1607c9);return;}const _0x3802bd=await loadSettings(_0x279e5e),_0x363066=_0x49f4ec['qUxQO'](getNestedValue,_0x3802bd,_0x5d83a7);if(_0x363066===undefined)console[_0x2b23e1(0x1a5)]('(not\x20set)');else typeof _0x363066===_0x49f4ec['KqcGO']?console['log'](JSON['stringify'](_0x363066,null,0x2)):console[_0x2b23e1(0x1a5)](_0x363066);}export async function configList(_0x1a9490){const _0x33de7c=_0x174226,_0x4a0b33={'kteos':function(_0x2210db,_0xce9860){return _0x2210db===_0xce9860;},'UrrNx':_0x33de7c(0x1a9),'xHifm':function(_0xbc5df8,_0x1b11f6){return _0xbc5df8(_0x1b11f6);},'YUUcI':function(_0xe71c68,_0x3a88bb){return _0xe71c68(_0x3a88bb);}},_0x2d8691=await resolveProfileTarget(_0x1a9490);if(_0x4a0b33['kteos'](_0x2d8691[_0x33de7c(0x1c9)],_0x4a0b33[_0x33de7c(0x1bf)])){const _0x2dbfd0=await _0x4a0b33['xHifm'](loadEffectiveCloudSettings,_0x1a9490);if(!_0x2dbfd0||_0x4a0b33[_0x33de7c(0x1cf)](Object['keys'](_0x2dbfd0)['length'],0x0)){console[_0x33de7c(0x1a5)]('No\x20configuration\x20set\x20for\x20\x22'+_0x1a9490+'\x22');return;}console['log'](JSON['stringify'](_0x2dbfd0,null,0x2));return;}const _0x3b07cf=getSettingsPath(_0x1a9490);if(!existsSync(_0x3b07cf)){console[_0x33de7c(0x1a5)]('No\x20configuration\x20set\x20for\x20\x22'+_0x1a9490+'\x22');return;}const _0x661a1c=await _0x4a0b33[_0x33de7c(0x1dd)](loadSettings,_0x1a9490),_0x3b2641=_0x4a0b33['YUUcI'](formatSettings,_0x661a1c);!_0x3b2641?console['log'](_0x33de7c(0x1b8)+_0x1a9490+'\x22'):console['log'](_0x3b2641);}export async function configUnset(_0x2df21c,_0x2cf8b6){const _0x26362a=_0x174226,_0x35c580={'VWJjL':function(_0x31b86b,_0xcc69a0){return _0x31b86b===_0xcc69a0;},'ngjlu':_0x26362a(0x1a9),'WGEgy':function(_0x127f46){return _0x127f46();},'sXAbP':function(_0x22db0e,_0x5cec9b){return _0x22db0e(_0x5cec9b);}},_0x35cc4c=await resolveProfileTarget(_0x2df21c);if(_0x35c580[_0x26362a(0x1b5)](_0x35cc4c[_0x26362a(0x1c9)],_0x35c580[_0x26362a(0x1b2)])){if(_0x35cc4c[_0x26362a(0x1d5)])printDualExistsHint(_0x2df21c);const _0x5f1eed=unsetProfileOverride(_0x35c580['WGEgy'](getProjectPath),_0x2df21c,_0x2cf8b6);_0x5f1eed?console['log']('Removed\x20'+_0x2cf8b6+_0x26362a(0x1af)+_0x2df21c+'\x22'):console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+'\x22\x20not\x20found');return;}const _0x3140f4=unsetProfileOverride(getProjectPath(),_0x2df21c,_0x2cf8b6);if(_0x3140f4){console[_0x26362a(0x1a5)]('Removed\x20'+_0x2cf8b6);return;}const _0x377456=await _0x35c580[_0x26362a(0x1d7)](loadSettings,_0x2df21c),_0x5cfade=deleteNestedValue(_0x377456,_0x2cf8b6);_0x5cfade?console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x2df21c+_0x26362a(0x1c5)):console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+_0x26362a(0x1c1));}export async function configReset(_0x56b221){const _0x5639eb=_0x174226,_0x5265e9={'fRzrW':function(_0x165457,_0x2bbbbc){return _0x165457(_0x2bbbbc);},'ICsfe':function(_0x58bec2,_0x45208d){return _0x58bec2===_0x45208d;},'mHNek':_0x5639eb(0x1a9),'inGrQ':function(_0x245554,_0x252e47,_0x10c9b3){return _0x245554(_0x252e47,_0x10c9b3);}},_0x17db3c=await _0x5265e9[_0x5639eb(0x1cb)](resolveProfileTarget,_0x56b221);if(_0x5265e9['ICsfe'](_0x17db3c[_0x5639eb(0x1c9)],_0x5265e9['mHNek'])){_0x5265e9[_0x5639eb(0x1ae)](resetProfileOverrides,getProjectPath(),_0x56b221),console[_0x5639eb(0x1a5)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x56b221+'\x22');return;}console[_0x5639eb(0x1a5)]('\x22'+_0x56b221+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x56b221+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x500d(_0x2bbce5,_0x27fbdd){_0x2bbce5=_0x2bbce5-0x1b8;const _0x447df3=_0x447d();let _0x500d3c=_0x447df3[_0x2bbce5];return _0x500d3c;}(function(_0x18640c,_0x3a5891){const _0x25a793=_0x500d,_0x3da21c=_0x18640c();while(!![]){try{const _0x457a1b=parseInt(_0x25a793(0x1cc))/0x1+parseInt(_0x25a793(0x1c4))/0x2*(parseInt(_0x25a793(0x1c2))/0x3)+-parseInt(_0x25a793(0x1c7))/0x4*(parseInt(_0x25a793(0x1ca))/0x5)+-parseInt(_0x25a793(0x1ba))/0x6+parseInt(_0x25a793(0x1bc))/0x7*(-parseInt(_0x25a793(0x1c1))/0x8)+parseInt(_0x25a793(0x1b9))/0x9+-parseInt(_0x25a793(0x1b8))/0xa;if(_0x457a1b===_0x3a5891)break;else _0x3da21c['push'](_0x3da21c['shift']());}catch(_0x134f59){_0x3da21c['push'](_0x3da21c['shift']());}}}(_0x447d,0xf029a));import _0x4bbfdc from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x447d(){const _0x394d5d=['991384qwUuZV','yes','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','5FxIgrD','prompt','176863HlwXcD','oXuSp','14648130SmCNQH','13510071WJeyIh','3489648faAIbI','Cloud\x20profile\x20\x22','42KXqlQy','Xjfbi','GyYUJ','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','nIxMS','329648nMjGAp','3mqjhHk','confirmation','3694454qpqwVA','Type\x20\x22','uSdlX'];_0x447d=function(){return _0x394d5d;};return _0x447d();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x57b3c0,_0x54385f={}){const _0x2f7a74=_0x500d,_0x557e9c={'uSdlX':_0x2f7a74(0x1c9),'GyYUJ':'input','Xjfbi':_0x2f7a74(0x1bf),'oXuSp':function(_0x2ebbac,_0xc08aa5){return _0x2ebbac(_0xc08aa5);},'nIxMS':function(_0xcb1dbb,_0x4a3289,_0x362bf3){return _0xcb1dbb(_0x4a3289,_0x362bf3);},'gFnXk':function(_0x255fe8,_0x2b192f,_0x480ee9){return _0x255fe8(_0x2b192f,_0x480ee9);}},_0x575279=await fetchCloudProfile(_0x57b3c0);if(!_0x575279)throw new Error(_0x2f7a74(0x1bb)+_0x57b3c0+'\x22\x20not\x20found.');if(!_0x54385f[_0x2f7a74(0x1c8)]&&!isInteractive())throw new Error(_0x557e9c[_0x2f7a74(0x1c6)]);console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x57b3c0+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x54385f['yes']){const {confirmation:_0x20637c}=await _0x4bbfdc[_0x2f7a74(0x1cb)]([{'type':_0x557e9c[_0x2f7a74(0x1be)],'name':_0x2f7a74(0x1c3),'message':_0x2f7a74(0x1c5)+_0x57b3c0+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x20637c!==_0x57b3c0)throw new Error(_0x557e9c[_0x2f7a74(0x1bd)]);}await _0x557e9c[_0x2f7a74(0x1cd)](deleteCloudProfile,_0x57b3c0),_0x557e9c[_0x2f7a74(0x1c0)](resetProfileOverrides,process['cwd'](),_0x57b3c0),_0x557e9c['gFnXk'](clearLastProfile,process['cwd'](),_0x57b3c0),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x57b3c0+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x381924=_0x2005;(function(_0x5d09bb,_0xaf2fac){const _0x4e73cf=_0x2005,_0x368a76=_0x5d09bb();while(!![]){try{const _0xf6ae3e=parseInt(_0x4e73cf(0xb0))/0x1*(parseInt(_0x4e73cf(0xbe))/0x2)+-parseInt(_0x4e73cf(0xaa))/0x3*(parseInt(_0x4e73cf(0xcd))/0x4)+parseInt(_0x4e73cf(0xcc))/0x5+-parseInt(_0x4e73cf(0xb4))/0x6+parseInt(_0x4e73cf(0xb6))/0x7+-parseInt(_0x4e73cf(0xa8))/0x8+-parseInt(_0x4e73cf(0xa4))/0x9*(-parseInt(_0x4e73cf(0xa5))/0xa);if(_0xf6ae3e===_0xaf2fac)break;else _0x368a76['push'](_0x368a76['shift']());}catch(_0x575467){_0x368a76['push'](_0x368a76['shift']());}}}(_0x4f4a,0xd38cb));function _0x2005(_0x3d61a4,_0x5040fe){_0x3d61a4=_0x3d61a4-0xa3;const _0x4f4a8a=_0x4f4a();let _0x200500=_0x4f4a8a[_0x3d61a4];return _0x200500;}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';const NON_ENV_DIRS=[_0x381924(0xaf),_0x381924(0xac),_0x381924(0xba),_0x381924(0xb2),'ci'];export async function getEnvNames(){const _0x12bd6a=_0x381924,_0x3f3eea={'CyZlQ':function(_0x289c09,_0x5a392e){return _0x289c09(_0x5a392e);},'FlgeW':function(_0x57ce3d){return _0x57ce3d();},'oVFoS':function(_0x3ebfb6,_0x26d0f8){return _0x3ebfb6(_0x26d0f8);},'kSzIl':'local','KXgNy':function(_0x40033b,_0x2e93d5,_0x158190){return _0x40033b(_0x2e93d5,_0x158190);},'fCobk':_0x12bd6a(0xb3),'iDJBh':function(_0x491dc7,_0x35f718,_0x5e8ee0){return _0x491dc7(_0x35f718,_0x5e8ee0);},'BGvsp':_0x12bd6a(0xb8)},_0x253374=getRangerDir();if(!_0x3f3eea['CyZlQ'](existsSync,_0x253374))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x552e16=await _0x3f3eea['FlgeW'](readActiveProfileName),_0xfd62bc=[],_0x19b215={},_0x2e37fb=join(_0x253374,_0x12bd6a(0xb2));if(_0x3f3eea['oVFoS'](existsSync,_0x2e37fb)){const _0x25c104=await readdir(_0x2e37fb);for(const _0xca322f of _0x25c104){const _0x7ea587=join(_0x2e37fb,_0xca322f),_0x4b32c1=await stat(_0x7ea587);_0x4b32c1['isDirectory']()&&(_0xfd62bc[_0x12bd6a(0xc1)](_0xca322f),_0x19b215[_0xca322f]=_0x3f3eea[_0x12bd6a(0xae)]);}}const _0x2843b9=_0x3f3eea['KXgNy'](join,_0x253374,'ci');if(existsSync(_0x2843b9)){const _0x4d661e=await _0x3f3eea[_0x12bd6a(0xbf)](readdir,_0x2843b9);for(const _0x430e23 of _0x4d661e){const _0x41e35b=join(_0x2843b9,_0x430e23),_0x1d4f95=await stat(_0x41e35b);_0x1d4f95['isDirectory']()&&(_0xfd62bc['push'](_0x430e23),_0x19b215[_0x430e23]='ci');}}const _0x4e1656=await readdir(_0x253374);for(const _0x1ce83e of _0x4e1656){if(NON_ENV_DIRS[_0x12bd6a(0xab)](_0x1ce83e))continue;if(_0x1ce83e[_0x12bd6a(0xbb)]('.'))continue;if(_0x1ce83e[_0x12bd6a(0xc6)](_0x3f3eea[_0x12bd6a(0xc4)]))continue;const _0x586ad6=_0x3f3eea[_0x12bd6a(0xc2)](join,_0x253374,_0x1ce83e),_0x4bee2f=await stat(_0x586ad6);_0x4bee2f['isDirectory']()&&existsSync(join(_0x586ad6,'settings.json'))&&(!_0xfd62bc[_0x12bd6a(0xab)](_0x1ce83e)&&(_0xfd62bc['push'](_0x1ce83e),_0x19b215[_0x1ce83e]=_0x3f3eea['BGvsp']));}return{'envNames':_0xfd62bc,'activeEnv':_0x552e16,'envTypes':_0x19b215};}export async function envList(){const _0xb4538a=_0x381924,_0x5964fd={'ndynA':function(_0x2bb04a){return _0x2bb04a();},'Fsqhj':function(_0x178a10,_0x47c723){return _0x178a10 instanceof _0x47c723;},'AaJco':function(_0x5f27b7,_0x25331f){return _0x5f27b7(_0x25331f);},'FsNuJ':function(_0x3b8767,_0x149839){return _0x3b8767===_0x149839;},'pvRtx':_0xb4538a(0xbd),'FGqeZ':function(_0x74b2b4,_0x4ee510){return _0x74b2b4===_0x4ee510;},'vzpiT':'local','UDHHL':function(_0x1c039c,_0x37177b){return _0x1c039c>_0x37177b;},'fJNfM':function(_0x57d61c,_0x4d0321){return _0x57d61c===_0x4d0321;}},{envNames:_0x37728e,activeEnv:_0x127568,envTypes:_0x16a670}=await _0x5964fd['ndynA'](getEnvNames);let _0x5731e1=[];const _0x5de381=await _0x5964fd['ndynA'](getToken);if(_0x5de381)try{_0x5731e1=await listCloudProfiles();}catch(_0xd74869){console['error'](_0xb4538a(0xb5)+(_0x5964fd['Fsqhj'](_0xd74869,Error)?_0xd74869['message']:_0x5964fd[_0xb4538a(0xbc)](String,_0xd74869)));}if(_0x5964fd[_0xb4538a(0xa3)](_0x37728e[_0xb4538a(0xd0)],0x0)&&_0x5731e1['length']===0x0){console['log'](_0x5964fd['pvRtx']),console[_0xb4538a(0xb9)](_0xb4538a(0xcb));return;}const _0x34d8e2=new Set(_0x5731e1[_0xb4538a(0xc8)](_0x4db228=>_0x4db228[_0xb4538a(0xb1)]));if(_0x37728e['length']>0x0){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x1b85da of _0x37728e[_0xb4538a(0xca)]()){const _0x4de94e=_0x5964fd['FGqeZ'](_0x1b85da,_0x127568)&&!_0x34d8e2[_0xb4538a(0xc5)](_0x1b85da),_0x3859c4=_0x16a670[_0x1b85da]||_0x5964fd['vzpiT'],_0x5091d5=await _0x5964fd[_0xb4538a(0xbc)](loadSettings,_0x1b85da),_0x9576da=_0x3859c4==='legacy'?'':'\x20['+_0x3859c4+']';console['log']('\x20\x20'+(_0x4de94e?'*\x20':'\x20\x20')+_0x1b85da+_0x9576da),_0x5091d5[_0xb4538a(0xc7)]&&console['log'](_0xb4538a(0xa6)+_0x5091d5['baseUrl']),_0x5091d5['environmentDetails']&&console[_0xb4538a(0xb9)](_0xb4538a(0xb7)+_0x5091d5[_0xb4538a(0xce)]);}}if(_0x5964fd[_0xb4538a(0xc0)](_0x5731e1['length'],0x0)){console['log'](_0xb4538a(0xad));for(const _0x922321 of _0x5731e1[_0xb4538a(0xca)]((_0x332e6a,_0x1bec26)=>_0x332e6a[_0xb4538a(0xb1)][_0xb4538a(0xa7)](_0x1bec26['name']))){const _0x12d67e=_0x5964fd[_0xb4538a(0xcf)](_0x922321['name'],_0x127568),_0x426083=_0x922321['environmentKey']?'\x20('+_0x922321['environmentKey']+')':'',_0x1d53a7=_0x922321[_0xb4538a(0xc9)]?'cached\x20(updated\x20'+_0x922321[_0xb4538a(0xc9)]+')':_0xb4538a(0xa9);console[_0xb4538a(0xb9)]('\x20\x20'+(_0x12d67e?'*\x20':'\x20\x20')+_0x922321['name']+_0xb4538a(0xc3)+_0x426083),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x1d53a7);}}_0x127568&&console[_0xb4538a(0xb9)]('\x0a*\x20=\x20active\x20profile');}function _0x4f4a(){const _0x2c1c7c=['kSzIl','sessions','2xKgfen','name','local','.txt','7190832OLCrnx','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','5868240RzkEuI','\x20\x20\x20\x20\x20\x20Details:\x20','legacy','log','reports','startsWith','AaJco','\x0aNo\x20profiles\x20found.','203394zPWvBe','CyZlQ','UDHHL','push','iDJBh','\x20[cloud]','fCobk','has','endsWith','baseUrl','map','sessionUpdatedAt','sort','Run:\x20ranger\x20profile\x20add\x20<profile-name>','1537040GxIqpd','12EfYaGT','environmentDetails','fJNfM','length','FsNuJ','19807209ZHiOUW','10cNPwKw','\x20\x20\x20\x20\x20\x20URL:\x20','localeCompare','2737904YBUxqT','no\x20session','1142706RJfuwU','includes','bug-bashes','\x0aCloud\x20Profiles:'];_0x4f4a=function(){return _0x2c1c7c;};return _0x4f4a();}
|