@ranger-testing/ranger-cli 3.0.0 → 3.0.1-alpha.46ed70b-30
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/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 -0
- 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/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 -0
- package/package.json +3 -2
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3bbba5,_0x5a9163){const _0x57dcce=_0x2795,_0x3ed740=_0x3bbba5();while(!![]){try{const _0x13aaf2=-parseInt(_0x57dcce(0x212))/0x1*(-parseInt(_0x57dcce(0x213))/0x2)+parseInt(_0x57dcce(0x1c6))/0x3+parseInt(_0x57dcce(0x20f))/0x4*(parseInt(_0x57dcce(0x1fc))/0x5)+parseInt(_0x57dcce(0x202))/0x6*(-parseInt(_0x57dcce(0x1b1))/0x7)+parseInt(_0x57dcce(0x1bf))/0x8+-parseInt(_0x57dcce(0x1e9))/0x9*(-parseInt(_0x57dcce(0x1b2))/0xa)+parseInt(_0x57dcce(0x1be))/0xb*(-parseInt(_0x57dcce(0x210))/0xc);if(_0x13aaf2===_0x5a9163)break;else _0x3ed740['push'](_0x3ed740['shift']());}catch(_0x2e7477){_0x3ed740['push'](_0x3ed740['shift']());}}}(_0x5ae9,0x436a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x307568 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x2795(_0x114df5,_0x52096b){_0x114df5=_0x114df5-0x1a5;const _0x5ae922=_0x5ae9();let _0x279577=_0x5ae922[_0x114df5];return _0x279577;}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2171f9=_0x2795;if(!process['stdout'][_0x2171f9(0x1d6)])return;console[_0x2171f9(0x1b7)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2d6fe7){const _0x367b2f=_0x2795,_0x1f7097={'DNRzY':function(_0x5a2666,_0x2740fc,_0x42df9f){return _0x5a2666(_0x2740fc,_0x42df9f);},'HnMqC':_0x367b2f(0x1f7),'xxqnv':function(_0x1eee70,_0x276a7c){return _0x1eee70(_0x276a7c);},'YIVvZ':function(_0x3f218e,_0x133b3a){return _0x3f218e<_0x133b3a;},'BtyHR':'TypeError'};try{const _0x13a374=new AbortController(),_0x515266=_0x1f7097[_0x367b2f(0x1fd)](setTimeout,()=>_0x13a374[_0x367b2f(0x21a)](),0x1388),_0x3eeecb={'method':_0x367b2f(0x1e5),'signal':_0x13a374['signal'],'redirect':_0x1f7097[_0x367b2f(0x21f)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x2d6fe7)&&(process['env'][_0x367b2f(0x1dc)]='0');const _0x2f6772=await fetch(_0x2d6fe7,_0x3eeecb);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f7097['xxqnv'](clearTimeout,_0x515266);if(_0x1f7097['YIVvZ'](_0x2f6772[_0x367b2f(0x200)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x2f6772[_0x367b2f(0x200)]};}catch(_0x326e7d){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x356a36=_0x326e7d,_0x25ddee=_0x356a36[_0x367b2f(0x1c5)]||_0x1f7097['xxqnv'](String,_0x326e7d),_0x11375c=_0x25ddee['includes']('Invalid\x20URL')||_0x356a36[_0x367b2f(0x1fb)]===_0x1f7097[_0x367b2f(0x214)]||_0x25ddee['includes'](_0x367b2f(0x1c2));return{'ok':![],'error':_0x25ddee,'isProtocolError':_0x11375c};}}async function sweepOrphanLocalProfile(_0x46992f,_0x507909,_0xbf0fa8){const _0x4cffeb=_0x2795,_0x5d964a={'IBvlw':function(_0x3140b5,_0x20e920,_0x9f485c){return _0x3140b5(_0x20e920,_0x9f485c);},'zFPtT':function(_0x1a322b,_0x2758a9){return _0x1a322b(_0x2758a9);}},_0x2f69c3=join(_0x507909,_0x4cffeb(0x1b6)),_0x504037=_0x5d964a[_0x4cffeb(0x1e2)](join,_0x2f69c3,_0x46992f);existsSync(_0x504037)&&(_0xbf0fa8&&await _0x5d964a[_0x4cffeb(0x1fe)](isPathGitTracked,_0x504037)?console[_0x4cffeb(0x1e1)](_0x4cffeb(0x203)+_0x504037+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x504037,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x504037)));if(_0x5d964a[_0x4cffeb(0x1fe)](existsSync,_0x2f69c3)){let _0x3bbda9=[];try{_0x3bbda9=await readdir(_0x2f69c3);}catch{return;}const _0x237fa8=_0x4cffeb(0x1b0)+_0x46992f+'-';for(const _0x4ee105 of _0x3bbda9){if(!_0x4ee105['startsWith'](_0x237fa8))continue;const _0x18e038=join(_0x2f69c3,_0x4ee105);await rm(_0x18e038,{'recursive':!![],'force':!![]}),console[_0x4cffeb(0x1e1)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x18e038);}}}async function sweepOrphansBestEffort(_0x24f400){const _0xd59a11=_0x2795,_0x4ec49d={'SsYyq':function(_0x17bcaa,_0xc9ce55,_0x1dca74,_0x3756a5){return _0x17bcaa(_0xc9ce55,_0x1dca74,_0x3756a5);},'hSWGd':function(_0x24f026){return _0x24f026();},'QIhZY':function(_0x22017b){return _0x22017b();},'goiQs':function(_0x228046,_0x84638c){return _0x228046(_0x84638c);}};try{await _0x4ec49d[_0xd59a11(0x1b3)](sweepOrphanLocalProfile,_0x24f400,_0x4ec49d['hSWGd'](getRangerHomeDir),![]);const _0x36e8c0=_0x4ec49d['hSWGd'](getRangerDir);_0x36e8c0!==_0x4ec49d['QIhZY'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x24f400,_0x36e8c0,!![]);}catch(_0x58a327){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x58a327 instanceof Error?_0x58a327['message']:_0x4ec49d[_0xd59a11(0x21e)](String,_0x58a327))+').');}}async function markActive(_0x415a50){const _0x9fa460=_0x2795,_0x598269={'GrLiy':function(_0x2c3c47,_0x59c95d){return _0x2c3c47(_0x59c95d);}};try{await _0x598269['GrLiy'](writeActiveProfileName,_0x415a50),console[_0x9fa460(0x1e1)]('\x20\x20Set\x20active\x20profile:\x20'+_0x415a50);}catch{console[_0x9fa460(0x1e1)](_0x9fa460(0x1d0));}}async function tryAutoRouteCloudProfile(_0x5bf623,_0x19805b,_0x35b78f,_0xa6be2d,_0x203d0e){const _0x37e69c=_0x2795,_0x234d37={'nOZJG':function(_0x195626,_0x528ffa){return _0x195626===_0x528ffa;},'rksyN':'profile.add.autoRouteSkipped','FFehE':function(_0x44e1ae,_0x25284c){return _0x44e1ae instanceof _0x25284c;},'SJXrA':function(_0x345bfe,_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a){return _0x345bfe(_0x330c59,_0x52c5d3,_0x2b2964,_0x41213a);},'ndFlt':function(_0x512134,_0x27bea9){return _0x512134+_0x27bea9;},'ZcfVm':'\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','kWWOd':_0x37e69c(0x1bc),'imPWO':_0x37e69c(0x1b9),'FzJmb':_0x37e69c(0x1ab),'lmdhs':'no_match','bkjwY':_0x37e69c(0x1d2),'BzfoC':function(_0x6a5fd6,_0x381b37,_0x11b709,_0x19240c){return _0x6a5fd6(_0x381b37,_0x11b709,_0x19240c);},'HXOID':function(_0x1590fb,_0x59dc02){return _0x1590fb===_0x59dc02;},'WtnEg':function(_0x4d9fe5,_0x24d4fc){return _0x4d9fe5+_0x24d4fc;},'xcPgx':function(_0x43f6b3,_0x3c6835){return _0x43f6b3+_0x3c6835;},'PODcS':function(_0x32b87b,_0x140de8){return _0x32b87b(_0x140de8);}};let _0x11dc40;try{_0x11dc40=await fetchAuthConfig();}catch(_0x3e6a2a){return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x37e69c(0x1da)+(_0x234d37['FFehE'](_0x3e6a2a,Error)?_0x3e6a2a['message']:String(_0x3e6a2a))),![];}if(!_0x11dc40||!_0x11dc40[_0x37e69c(0x1d4)]||_0x234d37[_0x37e69c(0x1f5)](Object[_0x37e69c(0x1f6)](_0x11dc40['environments'])['length'],0x0)){if(_0xa6be2d)return await _0x234d37['SJXrA'](captureEnvLessProfile,_0x5bf623,_0x19805b,_0x35b78f,_0x203d0e);return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x37e69c(0x1c0),'profileName':_0x5bf623}),console['error'](_0x234d37['ndFlt'](_0x234d37[_0x37e69c(0x1ad)](_0x234d37[_0x37e69c(0x1f8)]+'\x0a',_0x234d37['kWWOd']),_0x37e69c(0x1ac)+_0x5bf623+_0x37e69c(0x1c8)+_0x19805b+'\x20--skip-auth\x0a')+'\x0a'+_0x234d37[_0x37e69c(0x1fa)]+_0x234d37[_0x37e69c(0x222)]),![];}const _0x2b53ed=matchAuthEnvironment(_0x19805b,_0x11dc40);if(!_0x2b53ed)return _0x203d0e?.['trackPhaseEnd'](_0x234d37['rksyN'],{'reason':_0x234d37['lmdhs'],'profileName':_0x5bf623}),console[_0x37e69c(0x1c9)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x19805b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x11dc40[_0x37e69c(0x1d4)])['join'](',\x20')+'.'),![];const _0x13e46f=_0x11dc40[_0x37e69c(0x1d4)][_0x2b53ed],_0x349189=_0x13e46f?.['domains']??[];if(_0xa6be2d&&!_0x35b78f['yes']){const {saveToCloud:_0xe938ed}=await _0x307568['prompt']([{'type':_0x37e69c(0x20c),'name':_0x234d37['bkjwY'],'message':'Found\x20auth\x20environment\x20\x27'+_0x2b53ed+_0x37e69c(0x1aa)+_0x19805b+'\x0a\x20\x20(domains:\x20'+_0x349189['join'](',\x20')+_0x37e69c(0x201)+_0x5bf623+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xe938ed)return _0x203d0e?.[_0x37e69c(0x1ea)](_0x234d37['rksyN'],{'reason':_0x37e69c(0x218),'profileName':_0x5bf623}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0xc8c00b=_0x349189['some'](_0x450328=>{const _0x1c4916=_0x37e69c;try{return _0x234d37[_0x1c4916(0x1f5)](new URL(_0x450328)[_0x1c4916(0x1c3)],new URL(_0x19805b)[_0x1c4916(0x1c3)]);}catch{return![];}}),_0x18fa1d={};!_0xc8c00b&&(_0x18fa1d[_0x37e69c(0x1f4)]=_0x19805b);try{await _0x234d37[_0x37e69c(0x1d1)](createCloudProfile,_0x5bf623,_0x2b53ed,{'settings':_0x18fa1d}),warnCloudProfileSharedInOrg();}catch(_0x39110f){if(_0x39110f instanceof ApiError&&_0x234d37['HXOID'](_0x39110f[_0x37e69c(0x200)],0x199)){console['error'](_0x234d37[_0x37e69c(0x219)](_0x37e69c(0x1e7)+_0x5bf623+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5bf623));throw _0x39110f;}throw _0x39110f;}return console['log'](_0x234d37[_0x37e69c(0x20b)](_0x37e69c(0x20d)+_0x5bf623+_0x37e69c(0x1ef),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5bf623)),await _0x234d37['PODcS'](sweepOrphansBestEffort,_0x5bf623),_0x203d0e?.['trackPhaseEnd'](_0x37e69c(0x1d5),{'envKey':_0x2b53ed,'profileName':_0x5bf623}),!![];}function _0x5ae9(){const _0x692891=['\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Invalid\x20--setup-header\x20format:\x20\x22','11EKURot','715280Oyivmc','no_auth_config','ULmkg','fetch\x20failed','origin','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','message','743373BVIeuX','tTOmS','\x20--url\x20','error','`\x20again\x20without\x20--skip-auth.','AOSSm','yes','setupHeader','SfJlE','use_suggestion','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','BzfoC','saveToCloud','Enter\x20a\x20different\x20URL','environments','profile.add.autoRouted','isTTY','exit','isElectron','cdpEndpoint','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x0a🌐\x20Profile\x20Setup\x0a','NODE_TLS_REJECT_UNAUTHORIZED','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','slice','vvcpX','\x20\x20Did\x20you\x20mean\x20','log','IBvlw','zNpKd','HRYNF','HEAD','trim','\x0a\x20\x20A\x20profile\x20named\x20\x22','input','747ditNSG','trackPhaseEnd','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','lowIf','profile.add.autoRouteSkipped','force','\x27\x20created.\x0a','CkDbM','Use\x20','Tdaqf','cwd','baseUrl','nOZJG','keys','manual','ZcfVm','oyXJX','imPWO','name','175pIBdra','DNRzY','zFPtT','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','status',')\x0a\x20\x20Save\x20\x27','73122anEjPh','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','indexOf','setupHeaders','test','SFSbn','FGoDo','\x0a✓\x20Profile\x20\x27','UFMml','xcPgx','confirm','✓\x20Profile\x20\x27','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','44580TsyzhY','13405476kGkbsU','length','42577xNNnHv','24oaUckX','BtyHR','FcRPb','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x27\x20created\x20(CDP).','user_declined','WtnEg','abort','iHJXn','continue','CNxqH','goiQs','HnMqC','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','\x22:\x20','FzJmb','Kffbk','rxgCG','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','http://localhost:3000','skipAuth','\x27\x20matching\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','ndFlt','tyfYb','url','.tmp-','91JyguVY','37770ysAJIy','SsYyq','action','QmLni','local','warn','ghxMz','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','AyBVP'];_0x5ae9=function(){return _0x692891;};return _0x5ae9();}async function createUnconfiguredCloudProfile(_0x103cee,_0x1b8808){const _0x4dd917=_0x2795;try{await createCloudProfile(_0x103cee,undefined,{'settings':_0x1b8808}),warnCloudProfileSharedInOrg();}catch(_0x58385b){_0x58385b instanceof ApiError&&_0x58385b['status']===0x199&&console['error'](_0x4dd917(0x1e7)+_0x103cee+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4dd917(0x1dd)+_0x103cee));throw _0x58385b;}}async function captureEnvLessProfile(_0x3fe166,_0x212271,_0x3ba0e8,_0x3f1490){const _0x2ec8aa=_0x2795,_0x55000f={'KBWEM':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','SfJlE':_0x2ec8aa(0x1ed),'tyfYb':_0x2ec8aa(0x218),'FcRPb':function(_0x5aead3,_0x27735b){return _0x5aead3+_0x27735b;},'SFSbn':function(_0x22e265,_0x264596,_0x1c0e96){return _0x22e265(_0x264596,_0x1c0e96);},'hBqAl':function(_0x4c8b42,_0x50bf76){return _0x4c8b42>_0x50bf76;},'rxgCG':function(_0x226fd6,_0x55e310){return _0x226fd6(_0x55e310);},'eiXCP':'profile.add.autoRouted'};if(!_0x3ba0e8[_0x2ec8aa(0x1cc)]){const {capture:_0x1d218e}=await _0x307568['prompt']([{'type':'confirm','name':'capture','message':_0x55000f['KBWEM'],'default':!![]}]);if(!_0x1d218e)return _0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f[_0x2ec8aa(0x1ce)],{'reason':_0x55000f[_0x2ec8aa(0x1ae)],'profileName':_0x3fe166}),console[_0x2ec8aa(0x1c9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x2ec8aa(0x1ff)),![];}const _0x2ef095={};if(_0x3ba0e8['setupHeader'])for(const _0x499e6f of _0x3ba0e8[_0x2ec8aa(0x1cd)]){const _0x2a2c21=_0x499e6f[_0x2ec8aa(0x204)](':');if(_0x2a2c21===-0x1)continue;_0x2ef095[_0x499e6f[_0x2ec8aa(0x1de)](0x0,_0x2a2c21)['trim']()]=_0x499e6f[_0x2ec8aa(0x1de)](_0x2a2c21+0x1)[_0x2ec8aa(0x1e6)]();}const _0x17df1c={'baseUrl':_0x212271};Object['keys'](_0x2ef095)['length']>0x0&&(_0x17df1c[_0x2ec8aa(0x205)]=_0x2ef095);let _0x111b1b;try{_0x111b1b=await createCloudProfile(_0x3fe166,undefined,{'settings':_0x17df1c}),warnCloudProfileSharedInOrg();}catch(_0x259ec1){_0x259ec1 instanceof ApiError&&_0x259ec1['status']===0x199&&console[_0x2ec8aa(0x1c9)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x1e7)+_0x3fe166+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x2ec8aa(0x1dd)+_0x3fe166));throw _0x259ec1;}return await _0x55000f[_0x2ec8aa(0x207)](manualBrowserLogin,_0x111b1b,{'key':'','domains':[_0x212271],'setupHeaders':_0x55000f['hBqAl'](Object[_0x2ec8aa(0x1f6)](_0x2ef095)[_0x2ec8aa(0x211)],0x0)?_0x2ef095:undefined}),console[_0x2ec8aa(0x1e1)](_0x55000f[_0x2ec8aa(0x215)](_0x2ec8aa(0x209)+_0x3fe166+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3fe166)),await _0x55000f[_0x2ec8aa(0x1a6)](sweepOrphansBestEffort,_0x3fe166),_0x3f1490?.[_0x2ec8aa(0x1ea)](_0x55000f['eiXCP'],{'envKey':null,'profileName':_0x3fe166}),!![];}export async function addEnv(_0x39a8cd,_0x85392f={},_0x4a3cd6){const _0x1051e5=_0x2795,_0x28f6cc={'Kffbk':function(_0x1d9ea6,_0x4b1a45){return _0x1d9ea6+_0x4b1a45;},'UYGPZ':function(_0x1cdf39,_0x48d331){return _0x1cdf39+_0x48d331;},'GpBkH':function(_0x1de8ee,_0x1a5e92){return _0x1de8ee+_0x1a5e92;},'ghxMz':_0x1051e5(0x216),'CNxqH':_0x1051e5(0x1c4),'UFMml':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','lowIf':_0x1051e5(0x1ba),'FGoDo':function(_0x5a315d,_0x328834){return _0x5a315d===_0x328834;},'QmLni':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iHJXn':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vvcpX':_0x1051e5(0x1a7),'Tdaqf':function(_0x380f61,_0x3c4bc5){return _0x380f61>_0x3c4bc5;},'dGLYL':function(_0x2fb84d,_0x579075,_0x2cb946,_0x3a2168,_0x24233e){return _0x2fb84d(_0x579075,_0x2cb946,_0x3a2168,_0x24233e);},'UpXDm':'cdpEndpoint','CkDbM':function(_0x27d54a,_0x382faf){return _0x27d54a instanceof _0x382faf;},'HRYNF':function(_0x2deb4f,_0x4f3b37){return _0x2deb4f(_0x4f3b37);},'ULmkg':function(_0x786ac0,_0x5f33e4){return _0x786ac0>_0x5f33e4;},'fCrKL':function(_0xd64179,_0x2e27bd,_0x1243f0){return _0xd64179(_0x2e27bd,_0x1243f0);},'XOQHc':function(_0x5c2e40,_0x33643f){return _0x5c2e40(_0x33643f);},'AyBVP':_0x1051e5(0x1db),'xNhRa':_0x1051e5(0x1e8),'oyXJX':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zNpKd':'list','AOSSm':'What\x20would\x20you\x20like\x20to\x20do?','tTOmS':'Continue\x20anyway','gKTXc':function(_0x2afcd6,_0x1f0949){return _0x2afcd6(_0x1f0949);},'UcSZD':function(_0x3354f0,_0x391f2b){return _0x3354f0===_0x391f2b;},'MNxew':'continue'};_0x85392f['ci']&&(console[_0x1051e5(0x1c9)](_0x28f6cc['Kffbk'](_0x28f6cc['UYGPZ'](_0x28f6cc['GpBkH'](_0x28f6cc[_0x1051e5(0x1a5)](_0x28f6cc[_0x1051e5(0x1a5)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x28f6cc[_0x1051e5(0x1b8)]+'\x0a',_0x1051e5(0x1eb)),_0x28f6cc[_0x1051e5(0x21d)]),'\x0a'),_0x28f6cc[_0x1051e5(0x20a)]),_0x28f6cc[_0x1051e5(0x1ec)])),process[_0x1051e5(0x1d7)](0x1));const _0x33b768={};if(_0x85392f['setupHeader'])for(const _0x2ded9b of _0x85392f[_0x1051e5(0x1cd)]){const _0x1e12b4=_0x2ded9b['indexOf'](':');if(_0x1e12b4===-0x1)throw new Error(_0x1051e5(0x1bd)+_0x2ded9b+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x9257ef=_0x2ded9b['slice'](0x0,_0x1e12b4)['trim'](),_0x18e24d=_0x2ded9b['slice'](_0x1e12b4+0x1)['trim']();_0x33b768[_0x9257ef]=_0x18e24d;}if(_0x85392f['cdpEndpoint']!==undefined&&_0x28f6cc[_0x1051e5(0x208)](_0x85392f['cdpEndpoint'][_0x1051e5(0x1e6)](),''))throw new Error(_0x28f6cc[_0x1051e5(0x1b5)]);if(_0x85392f[_0x1051e5(0x1d9)]&&_0x85392f['url'])throw new Error(_0x28f6cc[_0x1051e5(0x21b)]);const _0x280904=Boolean(_0x85392f[_0x1051e5(0x1d9)]),_0x392b3f=isInteractive();if(!_0x392b3f&&!_0x85392f[_0x1051e5(0x1af)]&&!_0x280904&&!_0x85392f['skipAuth'])throw new Error(_0x1051e5(0x220));if(_0x280904){const _0x1d7373=_0x85392f[_0x1051e5(0x1d9)];console[_0x1051e5(0x1e1)](_0x28f6cc[_0x1051e5(0x1df)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1d7373);const _0x1719ec={'cdpEndpoint':_0x1d7373,'isElectron':!![]};_0x28f6cc[_0x1051e5(0x1f2)](Object['keys'](_0x33b768)['length'],0x0)&&(_0x1719ec[_0x1051e5(0x205)]=_0x33b768);await createUnconfiguredCloudProfile(_0x39a8cd,_0x1719ec);try{_0x28f6cc['dGLYL'](setProfileOverride,process[_0x1051e5(0x1f3)](),_0x39a8cd,_0x28f6cc['UpXDm'],_0x1d7373),_0x28f6cc['dGLYL'](setProfileOverride,process['cwd'](),_0x39a8cd,_0x1051e5(0x1d8),!![]);}catch(_0x3c92c6){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x28f6cc[_0x1051e5(0x1f0)](_0x3c92c6,Error)?_0x3c92c6['message']:String(_0x3c92c6)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x39a8cd+_0x1051e5(0x217)),await _0x28f6cc[_0x1051e5(0x1e4)](sweepOrphansBestEffort,_0x39a8cd),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);return;}if(_0x85392f[_0x1051e5(0x1a9)]){const _0x5a242c={};_0x85392f[_0x1051e5(0x1af)]&&(_0x5a242c['baseUrl']=_0x85392f['url']);_0x28f6cc[_0x1051e5(0x1c1)](Object[_0x1051e5(0x1f6)](_0x33b768)[_0x1051e5(0x211)],0x0)&&(_0x5a242c[_0x1051e5(0x205)]=_0x33b768);await _0x28f6cc['fCrKL'](createUnconfiguredCloudProfile,_0x39a8cd,_0x5a242c),console['log'](_0x28f6cc[_0x1051e5(0x1a5)]('✓\x20Profile\x20\x27'+_0x39a8cd+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x39a8cd+_0x1051e5(0x1ca))),await sweepOrphansBestEffort(_0x39a8cd),await _0x28f6cc['XOQHc'](markActive,_0x39a8cd);return;}if(_0x85392f['url']){const _0x35d1f9=_0x85392f[_0x1051e5(0x1af)],_0x1ca69e=await checkUrlReachability(_0x35d1f9);if(!_0x1ca69e['ok']&&!_0x85392f[_0x1051e5(0x1ee)])throw new Error('Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1ca69e['ok']&&_0x85392f[_0x1051e5(0x1ee)]&&console[_0x1051e5(0x1e1)]('⚠\x20Could\x20not\x20reach\x20'+_0x35d1f9+':\x20'+_0x1ca69e[_0x1051e5(0x1c9)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x28f6cc[_0x1051e5(0x1bb)]),console['log'](_0x1051e5(0x20e)),console[_0x1051e5(0x1e1)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2227ed='',_0x59405e=![];while(!![]){const _0x3ff74b=await _0x307568['prompt']([{'type':_0x28f6cc['xNhRa'],'name':_0x1051e5(0x1f4),'message':_0x59405e?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x28f6cc[_0x1051e5(0x1f9)],'default':_0x2227ed||_0x1051e5(0x1a8)}]);_0x2227ed=_0x3ff74b['baseUrl'];const _0x59b832=await checkUrlReachability(_0x2227ed);if(_0x59b832['ok'])break;const _0x380d92=/^[a-zA-Z][\w+.-]*:\/\//[_0x1051e5(0x206)](_0x2227ed),_0x1f33d7=_0x59b832['isProtocolError']&&!_0x380d92,_0x12855d=_0x1f33d7?'http://'+_0x2227ed:null;_0x59405e=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x59b832['error']);_0x12855d&&console['log'](_0x1051e5(0x1e0)+_0x12855d+'?');const {action:_0x23fc0b}=await _0x307568['prompt']([{'type':_0x28f6cc[_0x1051e5(0x1e3)],'name':_0x1051e5(0x1b4),'message':_0x28f6cc[_0x1051e5(0x1cb)],'choices':[..._0x12855d?[{'name':_0x1051e5(0x1f1)+_0x12855d,'value':_0x1051e5(0x1cf)}]:[],{'name':_0x1051e5(0x1d3),'value':'retry'},{'name':_0x28f6cc[_0x1051e5(0x1c7)],'value':_0x1051e5(0x21c)}]}]);if(_0x23fc0b===_0x1051e5(0x1cf)&&_0x12855d){_0x2227ed=_0x12855d;const _0x365be2=await _0x28f6cc['gKTXc'](checkUrlReachability,_0x2227ed);if(_0x365be2['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2227ed+':\x20'+_0x365be2['error']);}else{if(_0x28f6cc['UcSZD'](_0x23fc0b,_0x28f6cc['MNxew']))break;}}_0x85392f={..._0x85392f,'url':_0x2227ed};}let _0x1cfe41=![];try{_0x1cfe41=await tryAutoRouteCloudProfile(_0x39a8cd,_0x85392f['url'],_0x85392f,_0x392b3f,_0x4a3cd6);}catch(_0x551c1a){console[_0x1051e5(0x1c9)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x39a8cd+_0x1051e5(0x221)+(_0x551c1a instanceof Error?_0x551c1a['message']:String(_0x551c1a))),process['exit'](0x1);}!_0x1cfe41&&process['exit'](0x1),await _0x28f6cc[_0x1051e5(0x1e4)](markActive,_0x39a8cd);}
|
|
1
|
+
const _0x4e2803=_0x515c;(function(_0xf4e871,_0x3878ef){const _0x1baf29=_0x515c,_0x2efcaf=_0xf4e871();while(!![]){try{const _0x104b73=parseInt(_0x1baf29(0x1a3))/0x1*(-parseInt(_0x1baf29(0x1ab))/0x2)+parseInt(_0x1baf29(0x1ce))/0x3*(parseInt(_0x1baf29(0x1b6))/0x4)+parseInt(_0x1baf29(0x1b8))/0x5+-parseInt(_0x1baf29(0x1e0))/0x6*(-parseInt(_0x1baf29(0x1ee))/0x7)+-parseInt(_0x1baf29(0x201))/0x8+parseInt(_0x1baf29(0x1ff))/0x9*(-parseInt(_0x1baf29(0x208))/0xa)+parseInt(_0x1baf29(0x1d4))/0xb;if(_0x104b73===_0x3878ef)break;else _0x2efcaf['push'](_0x2efcaf['shift']());}catch(_0x3babda){_0x2efcaf['push'](_0x2efcaf['shift']());}}}(_0x2499,0xebba0));function _0x2499(){const _0x5c8687=['manual','\x27\x20created.\x0a','\x27\x20to\x20the\x20cloud?','rBdbq','35jYLhns','Invalid\x20--setup-header\x20format:\x20\x22','hnvAC','startsWith','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','yes','trim','url','.\x20Configured\x20envs:\x20','bpTTz','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','length','message','ReUVJ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x22:\x20','6588045vHlrgH','skipAuth','1307112brSEFD','Use\x20','ZBfCI','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','continue','XvypH','oeEiM','20fynLLF','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','use_suggestion','EbUoq','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','capture','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','stdout','NODE_TLS_REJECT_UNAUTHORIZED','LOmgH','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','signal','QWzXW','user_declined','setupHeaders','wMqpR','qyIci','\x0a\x20\x20Could\x20not\x20reach\x20','rhKgJ','xxypp','env','profile.add.autoRouted','jQnam','.tmp-','Invalid\x20URL','JnHpk','ZiVIV','profile.add.autoRouteSkipped','includes','fQcbe','269lVpgpE','fetch\x20failed','\x0a\x20\x20(domains:\x20','\x20--skip-auth\x0a','cwd','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','FEBcO','7078bmbQup','keys','no_auth_config','test','eRmGg','error','QARRv','✓\x20Cloud\x20profile\x20\x27','OBBnm','HTTP\x20','environments','2913796UbGpPG','eldUs','3965030rbiNJk','abort','trackPhaseEnd','warn','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','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','kjEFM','slice','kJnVi','bZdJB','\x20(continuing\x20with\x20--force)','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','origin','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','ATIRh','eUeMO','UHoGZ','isElectron','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','force','rlhAe','3jSjwKF','HHRSX','✓\x20Profile\x20\x27','http://','\x20\x20https://docs.ranger.net/main/concepts/profiles','iKGoy','17581696XCnPew','\x20\x20Set\x20active\x20profile:\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','Enter\x20a\x20different\x20URL','baseUrl','list','confirm','log','status','retry','prompt','name','510162YADrNc','no_match','setupHeader','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x27\x20created\x20(no\x20session).\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','cdpEndpoint','cFCqH','hPuIA','KnJuY'];_0x2499=function(){return _0x5c8687;};return _0x2499();}import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x48f2af 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 _0x515c(_0x30ba3b,_0x5dcb35){_0x30ba3b=_0x30ba3b-0x191;const _0x249903=_0x2499();let _0x515c9f=_0x249903[_0x30ba3b];return _0x515c9f;}const CLOUD_PROFILE_SHARING_WARNING=_0x4e2803(0x1c4);function warnCloudProfileSharedInOrg(){const _0x1e3834=_0x4e2803;if(!process[_0x1e3834(0x20f)]['isTTY'])return;console[_0x1e3834(0x1bb)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x33594d){const _0x122205=_0x4e2803,_0x45123b={'nKjRG':_0x122205(0x1ea),'MfBAh':function(_0x4c9889,_0x5d3de0,_0x824d16){return _0x4c9889(_0x5d3de0,_0x824d16);},'YZCix':function(_0x15ca18,_0x54ec14){return _0x15ca18<_0x54ec14;},'ZUSmf':function(_0x3335f8,_0x25e629){return _0x3335f8(_0x25e629);},'VuBQQ':_0x122205(0x19d),'eldUs':'TypeError'};try{const _0x1a90bd=new AbortController(),_0x2dcdb1=setTimeout(()=>_0x1a90bd[_0x122205(0x1b9)](),0x1388),_0x17f027={'method':'HEAD','signal':_0x1a90bd[_0x122205(0x213)],'redirect':_0x45123b['nKjRG']};/^https:\/\/localhost(:\d+)?/i[_0x122205(0x1ae)](_0x33594d)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3914fa=await _0x45123b['MfBAh'](fetch,_0x33594d,_0x17f027);delete process['env'][_0x122205(0x210)],clearTimeout(_0x2dcdb1);if(_0x45123b['YZCix'](_0x3914fa[_0x122205(0x1dc)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x122205(0x1b4)+_0x3914fa[_0x122205(0x1dc)]};}catch(_0x2fde01){delete process[_0x122205(0x199)][_0x122205(0x210)];const _0x23bfd2=_0x2fde01,_0x1d636e=_0x23bfd2['message']||_0x45123b['ZUSmf'](String,_0x2fde01),_0x5f2531=_0x1d636e[_0x122205(0x1a1)](_0x45123b['VuBQQ'])||_0x23bfd2[_0x122205(0x1df)]===_0x45123b[_0x122205(0x1b7)]||_0x1d636e[_0x122205(0x1a1)](_0x122205(0x1a4));return{'ok':![],'error':_0x1d636e,'isProtocolError':_0x5f2531};}}async function sweepOrphanLocalProfile(_0x253a7d,_0x2d055b,_0x2a0b42){const _0x4b7e45=_0x4e2803,_0x27f09c={'ecWXf':'local','evtxk':function(_0x2be20b,_0xa14860,_0x1d0f3c){return _0x2be20b(_0xa14860,_0x1d0f3c);},'mYyGG':function(_0x256572,_0x3f431f){return _0x256572(_0x3f431f);},'iKGoy':function(_0x9c70a2,_0x186eed,_0x107000){return _0x9c70a2(_0x186eed,_0x107000);},'pbKoh':function(_0x2718d1,_0x8c0e6f,_0x4af898){return _0x2718d1(_0x8c0e6f,_0x4af898);},'ZBfCI':function(_0x10745c,_0x4afeb3,_0x4afba8){return _0x10745c(_0x4afeb3,_0x4afba8);}},_0x3bc457=join(_0x2d055b,_0x27f09c['ecWXf']),_0xe224d2=_0x27f09c['evtxk'](join,_0x3bc457,_0x253a7d);_0x27f09c['mYyGG'](existsSync,_0xe224d2)&&(_0x2a0b42&&await isPathGitTracked(_0xe224d2)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xe224d2+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x27f09c[_0x4b7e45(0x1d3)](rm,_0xe224d2,{'recursive':!![],'force':!![]}),console[_0x4b7e45(0x1db)](_0x4b7e45(0x204)+_0xe224d2)));if(existsSync(_0x3bc457)){let _0x378848=[];try{_0x378848=await _0x27f09c['mYyGG'](readdir,_0x3bc457);}catch{return;}const _0x1308b3=_0x4b7e45(0x19c)+_0x253a7d+'-';for(const _0x4da1c4 of _0x378848){if(!_0x4da1c4[_0x4b7e45(0x1f1)](_0x1308b3))continue;const _0x5a37c4=_0x27f09c['pbKoh'](join,_0x3bc457,_0x4da1c4);await _0x27f09c[_0x4b7e45(0x203)](rm,_0x5a37c4,{'recursive':!![],'force':!![]}),console[_0x4b7e45(0x1db)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5a37c4);}}}async function sweepOrphansBestEffort(_0x502007){const _0x18e032=_0x4e2803,_0x830765={'uHuyR':function(_0x548f15){return _0x548f15();},'VHIzl':function(_0x6810a2,_0x5c7cb5){return _0x6810a2!==_0x5c7cb5;},'HHRSX':function(_0x467545,_0x2ef5ed,_0x2572e2,_0x466ca5){return _0x467545(_0x2ef5ed,_0x2572e2,_0x466ca5);},'efqtI':function(_0x5d5e95,_0x230fbf){return _0x5d5e95 instanceof _0x230fbf;}};try{await sweepOrphanLocalProfile(_0x502007,getRangerHomeDir(),![]);const _0x14037c=_0x830765['uHuyR'](getRangerDir);_0x830765['VHIzl'](_0x14037c,_0x830765['uHuyR'](getRangerHomeDir))&&await _0x830765[_0x18e032(0x1cf)](sweepOrphanLocalProfile,_0x502007,_0x14037c,!![]);}catch(_0x47f4f5){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x830765['efqtI'](_0x47f4f5,Error)?_0x47f4f5[_0x18e032(0x1fb)]:String(_0x47f4f5))+').');}}async function markActive(_0x1c3f76){const _0x41678f=_0x4e2803;try{await writeActiveProfileName(_0x1c3f76),console[_0x41678f(0x1db)](_0x41678f(0x1d5)+_0x1c3f76);}catch{console['log'](_0x41678f(0x1bd));}}async function tryAutoRouteCloudProfile(_0x1aef37,_0x3fb195,_0x539947,_0x194d48,_0x4913b0){const _0x4e01c8=_0x4e2803,_0x18c870={'rlhAe':function(_0x163095,_0x59a5f6){return _0x163095===_0x59a5f6;},'OBBnm':function(_0x2b29a8){return _0x2b29a8();},'wMqpR':function(_0x2d6e8a,_0x12c1ca){return _0x2d6e8a instanceof _0x12c1ca;},'xxypp':function(_0x5cb095,_0x27e80f){return _0x5cb095===_0x27e80f;},'FpXQu':function(_0x7bc69d,_0xb5d0c7){return _0x7bc69d+_0xb5d0c7;},'pNNPL':function(_0x15be49,_0x35347e){return _0x15be49+_0x35347e;},'XvypH':function(_0x1c4f23,_0x368b82){return _0x1c4f23+_0x368b82;},'UHoGZ':function(_0x18bf17,_0x5e6170){return _0x18bf17+_0x5e6170;},'kdhAW':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','ZiVIV':function(_0x22db7d,_0x14f4de,_0x477422){return _0x22db7d(_0x14f4de,_0x477422);},'oeEiM':'profile.add.autoRouteSkipped','eRmGg':_0x4e01c8(0x1e1),'hnvAC':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','QlVLj':function(_0x2e8ce2){return _0x2e8ce2();},'kGwEf':function(_0x1e964b,_0x270c72){return _0x1e964b instanceof _0x270c72;},'ATIRh':_0x4e01c8(0x19a)};let _0x14cdf5;try{_0x14cdf5=await _0x18c870[_0x4e01c8(0x1b3)](fetchAuthConfig);}catch(_0xd5674e){return _0x4913b0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x18c870[_0x4e01c8(0x194)](_0xd5674e,Error)?_0xd5674e[_0x4e01c8(0x1fb)]:String(_0xd5674e))),![];}if(!_0x14cdf5||!_0x14cdf5['environments']||_0x18c870[_0x4e01c8(0x198)](Object[_0x4e01c8(0x1ac)](_0x14cdf5['environments'])['length'],0x0)){if(_0x194d48)return await captureEnvLessProfile(_0x1aef37,_0x3fb195,_0x539947,_0x4913b0);return _0x4913b0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x4e01c8(0x1ad),'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x18c870['FpXQu'](_0x18c870['pNNPL'](_0x18c870[_0x4e01c8(0x206)](_0x18c870[_0x4e01c8(0x1c9)](_0x4e01c8(0x1a8),'\x0a'),_0x18c870['kdhAW'])+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1aef37+'\x20--url\x20'+_0x3fb195+_0x4e01c8(0x1a6))+'\x0a',_0x4e01c8(0x1d6)),_0x4e01c8(0x1e5))),![];}const _0x2a7246=_0x18c870[_0x4e01c8(0x19f)](matchAuthEnvironment,_0x3fb195,_0x14cdf5);if(!_0x2a7246)return _0x4913b0?.['trackPhaseEnd'](_0x18c870['oeEiM'],{'reason':_0x18c870[_0x4e01c8(0x1af)],'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x4e01c8(0x209)+_0x3fb195+_0x4e01c8(0x1f7)+Object['keys'](_0x14cdf5[_0x4e01c8(0x1b5)])['join'](',\x20')+'.'),![];const _0x5e46c4=_0x14cdf5['environments'][_0x2a7246],_0xde8ceb=_0x5e46c4?.['domains']??[];if(_0x194d48&&!_0x539947['yes']){const {saveToCloud:_0x544dd1}=await _0x48f2af['prompt']([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x2a7246+'\x27\x20matching\x20'+_0x3fb195+_0x4e01c8(0x1a5)+_0xde8ceb['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1aef37+_0x4e01c8(0x1ec),'default':!![]}]);if(!_0x544dd1)return _0x4913b0?.[_0x4e01c8(0x1ba)](_0x18c870[_0x4e01c8(0x207)],{'reason':_0x4e01c8(0x192),'profileName':_0x1aef37}),console[_0x4e01c8(0x1b0)](_0x18c870[_0x4e01c8(0x1f0)]),![];}const _0x213813=_0xde8ceb['some'](_0x20f970=>{const _0x366277=_0x4e01c8;try{return _0x18c870[_0x366277(0x1cd)](new URL(_0x20f970)['origin'],new URL(_0x3fb195)[_0x366277(0x1c5)]);}catch{return![];}}),_0x484076={};!_0x213813&&(_0x484076['baseUrl']=_0x3fb195);try{await createCloudProfile(_0x1aef37,_0x2a7246,{'settings':_0x484076}),_0x18c870['QlVLj'](warnCloudProfileSharedInOrg);}catch(_0x26dda2){if(_0x18c870['kGwEf'](_0x26dda2,ApiError)&&_0x26dda2[_0x4e01c8(0x1dc)]===0x199){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1aef37+_0x4e01c8(0x1c6)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1aef37));throw _0x26dda2;}throw _0x26dda2;}return console[_0x4e01c8(0x1db)](_0x18c870[_0x4e01c8(0x206)](_0x4e01c8(0x1d0)+_0x1aef37+_0x4e01c8(0x1eb),_0x4e01c8(0x1f3)+_0x1aef37)),await sweepOrphansBestEffort(_0x1aef37),_0x4913b0?.[_0x4e01c8(0x1ba)](_0x18c870[_0x4e01c8(0x1c7)],{'envKey':_0x2a7246,'profileName':_0x1aef37}),!![];}async function createUnconfiguredCloudProfile(_0x8b0a7f,_0x5a3a7c){const _0x24ac36=_0x4e2803,_0x16a330={'LOmgH':function(_0x21bbf5,_0x46168c){return _0x21bbf5===_0x46168c;}};try{await createCloudProfile(_0x8b0a7f,undefined,{'settings':_0x5a3a7c}),warnCloudProfileSharedInOrg();}catch(_0x4ecf27){_0x4ecf27 instanceof ApiError&&_0x16a330[_0x24ac36(0x211)](_0x4ecf27['status'],0x199)&&console[_0x24ac36(0x1b0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x8b0a7f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x8b0a7f));throw _0x4ecf27;}}async function captureEnvLessProfile(_0x5f0314,_0x2014f4,_0x32e9d0,_0x5a4c43){const _0x264386=_0x4e2803,_0x9fcc30={'wWFLE':_0x264386(0x1da),'fQcbe':function(_0x2c6165,_0x2176b5){return _0x2c6165+_0x2176b5;},'vvWkT':function(_0x42ac4f,_0x30a510){return _0x42ac4f===_0x30a510;},'wKZQw':function(_0x27e230,_0x271498,_0x45a453,_0x5e73b8){return _0x27e230(_0x271498,_0x45a453,_0x5e73b8);},'LPECv':function(_0x17497d,_0xc507bb,_0x2fed32){return _0x17497d(_0xc507bb,_0x2fed32);},'cxjZX':function(_0x5af354,_0x4c374f){return _0x5af354>_0x4c374f;},'QARRv':_0x264386(0x19a)};if(!_0x32e9d0[_0x264386(0x1f4)]){const {capture:_0x5a671f}=await _0x48f2af['prompt']([{'type':_0x9fcc30['wWFLE'],'name':_0x264386(0x20d),'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x5a671f)return _0x5a4c43?.['trackPhaseEnd'](_0x264386(0x1a0),{'reason':_0x264386(0x192),'profileName':_0x5f0314}),console[_0x264386(0x1b0)](_0x9fcc30[_0x264386(0x1a2)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x264386(0x212))),![];}const _0x33144={};if(_0x32e9d0[_0x264386(0x1e2)])for(const _0x115cdd of _0x32e9d0[_0x264386(0x1e2)]){const _0x121a67=_0x115cdd['indexOf'](':');if(_0x9fcc30['vvWkT'](_0x121a67,-0x1))continue;_0x33144[_0x115cdd['slice'](0x0,_0x121a67)[_0x264386(0x1f5)]()]=_0x115cdd['slice'](_0x9fcc30['fQcbe'](_0x121a67,0x1))[_0x264386(0x1f5)]();}const _0x3ada62={'baseUrl':_0x2014f4};Object['keys'](_0x33144)[_0x264386(0x1fa)]>0x0&&(_0x3ada62[_0x264386(0x193)]=_0x33144);let _0x423210;try{_0x423210=await _0x9fcc30['wKZQw'](createCloudProfile,_0x5f0314,undefined,{'settings':_0x3ada62}),warnCloudProfileSharedInOrg();}catch(_0x53d0fd){_0x53d0fd instanceof ApiError&&_0x53d0fd[_0x264386(0x1dc)]===0x199&&console[_0x264386(0x1b0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5f0314+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5f0314));throw _0x53d0fd;}return await _0x9fcc30['LPECv'](manualBrowserLogin,_0x423210,{'key':'','domains':[_0x2014f4],'setupHeaders':_0x9fcc30['cxjZX'](Object[_0x264386(0x1ac)](_0x33144)['length'],0x0)?_0x33144:undefined}),console[_0x264386(0x1db)]('\x0a✓\x20Profile\x20\x27'+_0x5f0314+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5f0314)),await sweepOrphansBestEffort(_0x5f0314),_0x5a4c43?.[_0x264386(0x1ba)](_0x9fcc30[_0x264386(0x1b1)],{'envKey':null,'profileName':_0x5f0314}),!![];}export async function addEnv(_0x200037,_0x448f15={},_0x6b4399){const _0x519e70=_0x4e2803,_0x1157ac={'hPuIA':function(_0x2c67e8,_0x645f58){return _0x2c67e8+_0x645f58;},'abDlY':function(_0x58db3a,_0x33f6f3){return _0x58db3a+_0x33f6f3;},'cFCqH':function(_0x2401af,_0x23ea27){return _0x2401af+_0x23ea27;},'zwUFu':_0x519e70(0x20c),'kjEFM':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','rBdbq':_0x519e70(0x20e),'bZdJB':_0x519e70(0x1fd),'jgucE':_0x519e70(0x1d2),'ReUVJ':function(_0x51889b,_0x3ea9df){return _0x51889b===_0x3ea9df;},'eUeMO':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','puaYV':function(_0x80f179,_0x23c2ca){return _0x80f179(_0x23c2ca);},'Enloa':_0x519e70(0x1be),'FEBcO':_0x519e70(0x1e3),'KnJuY':function(_0x1592bc,_0x589ef0,_0x233675){return _0x1592bc(_0x589ef0,_0x233675);},'kJnVi':function(_0x1b1247,_0x12c9e5,_0x1393b8,_0x2c8123,_0x3b127d){return _0x1b1247(_0x12c9e5,_0x1393b8,_0x2c8123,_0x3b127d);},'QHVLJ':_0x519e70(0x1ca),'qyIci':function(_0x4bcf1a,_0x4b683c){return _0x4bcf1a instanceof _0x4b683c;},'rhKgJ':function(_0x4ace06,_0x289cb4){return _0x4ace06(_0x289cb4);},'EbUoq':function(_0x3484c8,_0xf35df7){return _0x3484c8>_0xf35df7;},'QWzXW':function(_0xe07b2d,_0xd97a8e){return _0xe07b2d(_0xd97a8e);},'jQnam':'\x0a🌐\x20Profile\x20Setup\x0a','HDhgL':'baseUrl','JnHpk':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','XSdkB':_0x519e70(0x1f9),'uMSoz':'http://localhost:3000','RztFV':_0x519e70(0x1d7),'bpTTz':'Continue\x20anyway','DkvqG':_0x519e70(0x205),'GBUsK':_0x519e70(0x20a)};_0x448f15['ci']&&(console[_0x519e70(0x1b0)](_0x1157ac[_0x519e70(0x1e8)](_0x1157ac[_0x519e70(0x1e8)](_0x1157ac['abDlY'](_0x1157ac[_0x519e70(0x1e7)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x1157ac['zwUFu'])+'\x0a',_0x1157ac[_0x519e70(0x1bf)])+_0x1157ac[_0x519e70(0x1ed)],'\x0a'),_0x1157ac[_0x519e70(0x1c2)])+_0x1157ac['jgucE']),process['exit'](0x1));const _0xb2b0a9={};if(_0x448f15[_0x519e70(0x1e2)])for(const _0x1e78d1 of _0x448f15[_0x519e70(0x1e2)]){const _0x5f579c=_0x1e78d1['indexOf'](':');if(_0x1157ac['ReUVJ'](_0x5f579c,-0x1))throw new Error(_0x519e70(0x1ef)+_0x1e78d1+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x5d5544=_0x1e78d1['slice'](0x0,_0x5f579c)[_0x519e70(0x1f5)](),_0x5742cf=_0x1e78d1[_0x519e70(0x1c0)](_0x1157ac[_0x519e70(0x1e8)](_0x5f579c,0x1))['trim']();_0xb2b0a9[_0x5d5544]=_0x5742cf;}if(_0x448f15[_0x519e70(0x1e6)]!==undefined&&_0x448f15['cdpEndpoint']['trim']()==='')throw new Error(_0x1157ac[_0x519e70(0x1c8)]);if(_0x448f15[_0x519e70(0x1e6)]&&_0x448f15[_0x519e70(0x1f6)])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 _0x5124e4=_0x1157ac['puaYV'](Boolean,_0x448f15[_0x519e70(0x1e6)]),_0x5e66e9=isInteractive();if(!_0x5e66e9&&!_0x448f15[_0x519e70(0x1f6)]&&!_0x5124e4&&!_0x448f15[_0x519e70(0x200)])throw new Error(_0x1157ac['Enloa']);if(_0x5124e4){const _0x422701=_0x448f15['cdpEndpoint'];console['log'](_0x1157ac[_0x519e70(0x1aa)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x422701);const _0x1e1e9a={'cdpEndpoint':_0x422701,'isElectron':!![]};Object[_0x519e70(0x1ac)](_0xb2b0a9)[_0x519e70(0x1fa)]>0x0&&(_0x1e1e9a[_0x519e70(0x193)]=_0xb2b0a9);await _0x1157ac[_0x519e70(0x1e9)](createUnconfiguredCloudProfile,_0x200037,_0x1e1e9a);try{_0x1157ac[_0x519e70(0x1c1)](setProfileOverride,process[_0x519e70(0x1a7)](),_0x200037,_0x519e70(0x1e6),_0x422701),setProfileOverride(process['cwd'](),_0x200037,_0x1157ac['QHVLJ'],!![]);}catch(_0x322573){console['error'](_0x519e70(0x1f2)+(_0x1157ac['qyIci'](_0x322573,Error)?_0x322573[_0x519e70(0x1fb)]:_0x1157ac['puaYV'](String,_0x322573)));}console['log'](_0x519e70(0x1b2)+_0x200037+'\x27\x20created\x20(CDP).'),await _0x1157ac['rhKgJ'](sweepOrphansBestEffort,_0x200037),await markActive(_0x200037);return;}if(_0x448f15['skipAuth']){const _0x14dcff={};_0x448f15['url']&&(_0x14dcff[_0x519e70(0x1d8)]=_0x448f15['url']);_0x1157ac[_0x519e70(0x20b)](Object[_0x519e70(0x1ac)](_0xb2b0a9)[_0x519e70(0x1fa)],0x0)&&(_0x14dcff[_0x519e70(0x193)]=_0xb2b0a9);await createUnconfiguredCloudProfile(_0x200037,_0x14dcff),console['log']('✓\x20Profile\x20\x27'+_0x200037+_0x519e70(0x1e4)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x200037+'`\x20again\x20without\x20--skip-auth.')),await _0x1157ac[_0x519e70(0x191)](sweepOrphansBestEffort,_0x200037),await markActive(_0x200037);return;}if(_0x448f15['url']){const _0x56dd84=_0x448f15[_0x519e70(0x1f6)],_0xf043d3=await checkUrlReachability(_0x56dd84);if(!_0xf043d3['ok']&&!_0x448f15['force'])throw new Error('Could\x20not\x20reach\x20'+_0x56dd84+':\x20'+_0xf043d3[_0x519e70(0x1b0)]+_0x519e70(0x1bc));!_0xf043d3['ok']&&_0x448f15[_0x519e70(0x1cc)]&&console[_0x519e70(0x1db)]('⚠\x20Could\x20not\x20reach\x20'+_0x56dd84+':\x20'+_0xf043d3['error']+_0x519e70(0x1c3));}else{console['log'](_0x1157ac[_0x519e70(0x19b)]),console[_0x519e70(0x1db)](_0x519e70(0x1cb)),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2e2d71='',_0x3b3d96=![];while(!![]){const _0x364fb1=await _0x48f2af['prompt']([{'type':'input','name':_0x1157ac['HDhgL'],'message':_0x3b3d96?_0x1157ac[_0x519e70(0x19e)]:_0x1157ac['XSdkB'],'default':_0x2e2d71||_0x1157ac['uMSoz']}]);_0x2e2d71=_0x364fb1[_0x519e70(0x1d8)];const _0x50bd42=await checkUrlReachability(_0x2e2d71);if(_0x50bd42['ok'])break;const _0x1d76e0=/^[a-zA-Z][\w+.-]*:\/\//[_0x519e70(0x1ae)](_0x2e2d71),_0x49ec8c=_0x50bd42['isProtocolError']&&!_0x1d76e0,_0x4f0c90=_0x49ec8c?_0x519e70(0x1d1)+_0x2e2d71:null;_0x3b3d96=!![],console[_0x519e70(0x1db)](_0x519e70(0x196)+_0x2e2d71+':\x20'+_0x50bd42[_0x519e70(0x1b0)]);_0x4f0c90&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x4f0c90+'?');const {action:_0x278e81}=await _0x48f2af[_0x519e70(0x1de)]([{'type':_0x519e70(0x1d9),'name':'action','message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x4f0c90?[{'name':_0x519e70(0x202)+_0x4f0c90,'value':'use_suggestion'}]:[],{'name':_0x1157ac['RztFV'],'value':_0x519e70(0x1dd)},{'name':_0x1157ac[_0x519e70(0x1f8)],'value':_0x1157ac['DkvqG']}]}]);if(_0x278e81===_0x1157ac['GBUsK']&&_0x4f0c90){_0x2e2d71=_0x4f0c90;const _0x54be1f=await _0x1157ac[_0x519e70(0x197)](checkUrlReachability,_0x2e2d71);if(_0x54be1f['ok'])break;console[_0x519e70(0x1db)](_0x519e70(0x1a9)+_0x2e2d71+':\x20'+_0x54be1f[_0x519e70(0x1b0)]);}else{if(_0x1157ac[_0x519e70(0x1fc)](_0x278e81,_0x1157ac['DkvqG']))break;}}_0x448f15={..._0x448f15,'url':_0x2e2d71};}let _0x533de3=![];try{_0x533de3=await tryAutoRouteCloudProfile(_0x200037,_0x448f15['url'],_0x448f15,_0x5e66e9,_0x6b4399);}catch(_0x59e15f){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x200037+_0x519e70(0x1fe)+(_0x1157ac[_0x519e70(0x195)](_0x59e15f,Error)?_0x59e15f[_0x519e70(0x1fb)]:String(_0x59e15f))),process['exit'](0x1);}!_0x533de3&&process['exit'](0x1),await markActive(_0x200037);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5de4e0,_0x209204){var _0x51aa23=_0x16ff,_0x3179ee=_0x5de4e0();while(!![]){try{var _0x2bc47c=parseInt(_0x51aa23(0x177))/0x1*(-parseInt(_0x51aa23(0x180))/0x2)+parseInt(_0x51aa23(0x17a))/0x3*(-parseInt(_0x51aa23(0x185))/0x4)+-parseInt(_0x51aa23(0x178))/0x5+-parseInt(_0x51aa23(0x17d))/0x6+-parseInt(_0x51aa23(0x176))/0x7+parseInt(_0x51aa23(0x181))/0x8*(-parseInt(_0x51aa23(0x179))/0x9)+parseInt(_0x51aa23(0x187))/0xa;if(_0x2bc47c===_0x209204)break;else _0x3179ee['push'](_0x3179ee['shift']());}catch(_0x343baa){_0x3179ee['push'](_0x3179ee['shift']());}}}(_0x31cc,0xb73ee));function _0x16ff(_0x56fc20,_0x13bc13){_0x56fc20=_0x56fc20-0x176;var _0x31cc6e=_0x31cc();var _0x16ffbf=_0x31cc6e[_0x56fc20];return _0x16ffbf;}function _0x31cc(){var _0x24e2ed=['ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','LXRQt','9970632vlDUQc','721562XbIOui','3630890ObAcbW','4774239SHpDds','94470HSOmWX','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EbNCZ','6987642sVKOGT','gadBr','\x20\x20https://docs.ranger.net/main/concepts/profiles','4nYfjdv','8sOsJYt','zNeEN','error','ZeUyN','172cRIlVo','exit','73934000vPNtXD'];_0x31cc=function(){return _0x24e2ed;};return _0x31cc();}export async function authEncrypt(_0x550dac){var _0x4788e5=_0x16ff,_0x184f6b={'qtZId':function(_0x59b389,_0x2d9704){return _0x59b389+_0x2d9704;},'gadBr':function(_0x2b432b,_0x2bf7bd){return _0x2b432b+_0x2bf7bd;},'LXRQt':function(_0x4f1665,_0x29079a){return _0x4f1665+_0x29079a;},'HrYDr':_0x4788e5(0x188),'zNeEN':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','rrqAP':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ZeUyN':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','EbNCZ':_0x4788e5(0x17f)};console[_0x4788e5(0x183)](_0x184f6b['qtZId'](_0x184f6b[_0x4788e5(0x17e)](_0x184f6b[_0x4788e5(0x17e)](_0x184f6b[_0x4788e5(0x189)](_0x184f6b['HrYDr'],_0x184f6b[_0x4788e5(0x182)]),'\x0a'),_0x184f6b['rrqAP'])+_0x4788e5(0x17b)+'\x0a',_0x184f6b[_0x4788e5(0x184)])+_0x184f6b[_0x4788e5(0x17c)]),process[_0x4788e5(0x186)](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5982e1=_0x5d86;(function(_0x3ded28,_0x57ff62){const _0x5c2165=_0x5d86,_0x2690d9=_0x3ded28();while(!![]){try{const _0x43e929=parseInt(_0x5c2165(0x1ac))/0x1+-parseInt(_0x5c2165(0x1b9))/0x2+parseInt(_0x5c2165(0x190))/0x3*(parseInt(_0x5c2165(0x1b2))/0x4)+parseInt(_0x5c2165(0x185))/0x5*(parseInt(_0x5c2165(0x193))/0x6)+parseInt(_0x5c2165(0x189))/0x7*(-parseInt(_0x5c2165(0x18b))/0x8)+-parseInt(_0x5c2165(0x1b8))/0x9*(-parseInt(_0x5c2165(0x19f))/0xa)+-parseInt(_0x5c2165(0x19d))/0xb*(parseInt(_0x5c2165(0x196))/0xc);if(_0x43e929===_0x57ff62)break;else _0x2690d9['push'](_0x2690d9['shift']());}catch(_0x3590c9){_0x2690d9['push'](_0x2690d9['shift']());}}}(_0x23b5,0x71ab6));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';function _0x23b5(){const _0x497d79=['✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','IGlyx','GZyJE','178940xGEGJR','BJrGQ','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','uPoFR','7jOpdYJ','✓\x20Removed\x20project\x20skill:\x20','1618416UgTlhY','parse','GupCK','Nothing\x20to\x20clean\x20up.\x0a','xXCPu','248871zlZSxU','log','stringify','18IaWrhr','cZyQf','win32','2664zVeqBd','HLiKe','PJwLl','isArray','project','mgmKG','✓\x20Removed\x20trailhead\x20marketplace','25003WDzHsx','ABhZg','8310vKrgFe','push','--scope','glKgv','EXxCK','yCMra','filter','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','bkyYB','IbtYe','error','yiojr','plugin','868920SLlhmn','rwNvj','AKtNn','remove','opencode.json','claude','40idRlpi','ranger','replace','bug-bash','e2e-test-recommender','\x0a✅\x20Cleanup\x20complete!\x0a','1692VjXwfX','1579168GqFiXn','ranger@trailhead','feature-tracker','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','platform'];_0x23b5=function(){return _0x497d79;};return _0x23b5();}import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x5982e1(0x1b3),_0x5982e1(0x17f),_0x5982e1(0x1b5),_0x5982e1(0x1b6)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x28bc2b){const _0x533d57=_0x5982e1,_0x3c0c64=_0x28bc2b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x1c8add=_0x3c0c64['replace'](/^\s*\/\/.*$/gm,''),_0x160135=_0x1c8add[_0x533d57(0x1b4)](/,\s*([}\]])/g,'$1');return JSON[_0x533d57(0x18c)](_0x160135);}async function removeOpencodePluginConfig(_0x3b2196){const _0x1626cd=_0x5982e1,_0x206c87={'ytLSb':'string','BJrGQ':function(_0x2cfd3b,_0x2df40c){return _0x2cfd3b(_0x2df40c);},'GZyJE':function(_0x42ded5,_0x843fa8){return _0x42ded5===_0x843fa8;},'tqTwf':function(_0xf75096,_0x5d12de){return _0xf75096+_0x5d12de;}};if(!existsSync(_0x3b2196))return![];let _0x8ebaa4;try{const _0xcddc5a=await readFile(_0x3b2196,'utf-8');_0x8ebaa4=_0x206c87[_0x1626cd(0x186)](parseJsonc,_0xcddc5a);}catch{return![];}const _0x4d4467=Array[_0x1626cd(0x199)](_0x8ebaa4[_0x1626cd(0x1ab)])?_0x8ebaa4['plugin']:[];if(_0x4d4467['length']===0x0)return![];const _0x493925=_0x4d4467[_0x1626cd(0x1a5)](_0x5daf71=>{if(typeof _0x5daf71!==_0x206c87['ytLSb'])return!![];return _0x5daf71!==opencodePluginName;});if(_0x493925['length']===_0x4d4467['length'])return![];return _0x206c87[_0x1626cd(0x184)](_0x493925['length'],0x0)?delete _0x8ebaa4[_0x1626cd(0x1ab)]:_0x8ebaa4[_0x1626cd(0x1ab)]=_0x493925,await writeFile(_0x3b2196,_0x206c87['tqTwf'](JSON[_0x1626cd(0x192)](_0x8ebaa4,null,0x2),'\x0a')),!![];}function _0x5d86(_0x450acb,_0x52b8be){_0x450acb=_0x450acb-0x17e;const _0x23b594=_0x23b5();let _0x5d86cd=_0x23b594[_0x450acb];return _0x5d86cd;}async function uninstallClaudePlugin(_0x35ec2f){const _0x388a42=_0x5982e1,_0x196236={'yCMra':function(_0x486af0,_0x2d8fbf){return _0x486af0===_0x2d8fbf;},'EtyVL':_0x388a42(0x1ab),'rwNvj':'uninstall','aDNyX':_0x388a42(0x1a1),'yiojr':function(_0x59f9db,_0x13e046,_0x5c64f4,_0x288b1a){return _0x59f9db(_0x13e046,_0x5c64f4,_0x288b1a);},'fFUtM':'claude','flqPg':'ignore','glKgv':function(_0xed8aa9){return _0xed8aa9();},'aEOwZ':function(_0x113b48,_0xf705b){return _0x113b48===_0xf705b;},'ABhZg':_0x388a42(0x195),'AKtNn':'close'};return new Promise(_0x9afa0a=>{const _0x428fce=_0x388a42,_0x561ccc={'HLiKe':function(_0x4a169e,_0x33a8c6){const _0x1c11f7=_0x5d86;return _0x196236[_0x1c11f7(0x1a4)](_0x4a169e,_0x33a8c6);}},_0x463d71=[_0x196236['EtyVL'],_0x196236[_0x428fce(0x1ad)],_0x428fce(0x17e)];_0x35ec2f&&_0x463d71[_0x428fce(0x1a0)](_0x196236['aDNyX'],_0x35ec2f);const _0xc0c9c0=_0x196236[_0x428fce(0x1aa)](spawn,_0x196236['fFUtM'],_0x463d71,{'stdio':[_0x196236['flqPg'],'ignore','ignore'],'cwd':_0x35ec2f?_0x196236[_0x428fce(0x1a2)](getProjectRoot):undefined,'shell':_0x196236['aEOwZ'](process['platform'],_0x196236[_0x428fce(0x19e)])});_0xc0c9c0['on'](_0x196236[_0x428fce(0x1ae)],_0x4765ab=>{const _0x4e8b9a=_0x428fce;_0x9afa0a(_0x561ccc[_0x4e8b9a(0x197)](_0x4765ab,0x0));}),_0xc0c9c0['on'](_0x428fce(0x1a9),()=>{_0x9afa0a(![]);});});}async function removeMarketplace(){const _0x837fa={'mgmKG':'marketplace','ztphZ':'trailhead','Cmumy':function(_0x3b1523,_0x2a011f){return _0x3b1523===_0x2a011f;}};return new Promise(_0x2292d2=>{const _0x5e065=_0x5d86,_0x1f4892=spawn(_0x5e065(0x1b1),[_0x5e065(0x1ab),_0x837fa[_0x5e065(0x19b)],_0x5e065(0x1af),_0x837fa['ztphZ']],{'stdio':['ignore','ignore','ignore'],'shell':_0x837fa['Cmumy'](process[_0x5e065(0x181)],'win32')});_0x1f4892['on']('close',_0x1d9b20=>{_0x2292d2(_0x1d9b20===0x0);}),_0x1f4892['on'](_0x5e065(0x1a9),()=>{_0x2292d2(![]);});});}export async function clean(){const _0xcb46f8=_0x5982e1,_0x561533={'aJHoH':function(_0x2f181b,_0x588ef6){return _0x2f181b(_0x588ef6);},'dGJee':function(_0xe809e0){return _0xe809e0();},'bkyYB':function(_0x45b4bf,_0x2dea5c,_0x5abeb8){return _0x45b4bf(_0x2dea5c,_0x5abeb8);},'xXCPu':function(_0x20a12b){return _0x20a12b();},'bsXCB':function(_0x27c6c6,_0x16af26,_0x364f02){return _0x27c6c6(_0x16af26,_0x364f02);},'uPoFR':function(_0x3ab8a2,_0x278358){return _0x3ab8a2(_0x278358);},'Punek':function(_0x5d4f8b,_0x504184,_0x2cc227){return _0x5d4f8b(_0x504184,_0x2cc227);},'GupCK':_0xcb46f8(0x19a),'fDZBa':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','cZyQf':'user','hwqcU':_0xcb46f8(0x182),'IbtYe':function(_0x1c23b1){return _0x1c23b1();},'IGlyx':_0xcb46f8(0x180),'PJwLl':function(_0x48158c){return _0x48158c();},'EXxCK':_0xcb46f8(0x1b7)};console[_0xcb46f8(0x191)](_0xcb46f8(0x187));let _0x140324=![];try{await deleteAllCredentials(),console[_0xcb46f8(0x191)]('✓\x20Removed\x20stored\x20credentials'),_0x140324=!![];}catch{}const _0x55f0c1=getCacheFile();existsSync(_0x55f0c1)&&(await _0x561533['aJHoH'](rm,_0x55f0c1),_0x140324=!![]);const _0x451ba3=_0x561533['dGJee'](getRangerDir);existsSync(_0x451ba3)&&(await _0x561533[_0xcb46f8(0x1a7)](rm,_0x451ba3,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x140324=!![]);const _0x8fee98=getProjectSkillsDir();for(const _0x16e76b of skillsToRemove){const _0x17114b=join(_0x8fee98,_0x16e76b);_0x561533['aJHoH'](existsSync,_0x17114b)&&(await rm(_0x17114b,{'recursive':!![]}),console[_0xcb46f8(0x191)](_0xcb46f8(0x18a)+_0x16e76b),_0x140324=!![]);}const _0x2898ec=_0x561533[_0xcb46f8(0x18f)](getUserSkillsDir);for(const _0x2158d3 of skillsToRemove){const _0x1d5291=join(_0x2898ec,_0x2158d3);existsSync(_0x1d5291)&&(await rm(_0x1d5291,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20user\x20skill:\x20'+_0x2158d3),_0x140324=!![]);}const _0x4a3c4e=getOpencodeSkillsDir(_0xcb46f8(0x19a));for(const _0x51374a of skillsToRemove){const _0x5c72a3=_0x561533['bsXCB'](join,_0x4a3c4e,_0x51374a);existsSync(_0x5c72a3)&&(await rm(_0x5c72a3,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x51374a),_0x140324=!![]);}const _0x45d02f=_0x561533[_0xcb46f8(0x188)](getOpencodeSkillsDir,'user');for(const _0x57a6eb of skillsToRemove){const _0x4a0161=_0x561533['Punek'](join,_0x45d02f,_0x57a6eb);existsSync(_0x4a0161)&&(await rm(_0x4a0161,{'recursive':!![]}),console[_0xcb46f8(0x191)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x57a6eb),_0x140324=!![]);}const _0x28a343=join(_0x561533[_0xcb46f8(0x188)](getOpencodeConfigDir,_0x561533[_0xcb46f8(0x18d)]),_0xcb46f8(0x1b0));await removeOpencodePluginConfig(_0x28a343)&&(console['log'](_0x561533['fDZBa']),_0x140324=!![]);const _0x4034c4=join(getOpencodeConfigDir(_0x561533[_0xcb46f8(0x194)]),_0xcb46f8(0x1b0));await removeOpencodePluginConfig(_0x4034c4)&&(console[_0xcb46f8(0x191)](_0x561533['hwqcU']),_0x140324=!![]);const _0xb6d9fa=await _0x561533[_0xcb46f8(0x1a8)](uninstallClaudePlugin);_0xb6d9fa&&(console[_0xcb46f8(0x191)](_0xcb46f8(0x1a6)),_0x140324=!![]);const _0x530a72=await uninstallClaudePlugin('project');_0x530a72&&(console['log'](_0x561533[_0xcb46f8(0x183)]),_0x140324=!![]);const _0x38998a=await _0x561533[_0xcb46f8(0x198)](removeMarketplace);_0x38998a&&(console['log'](_0xcb46f8(0x19c)),_0x140324=!![]),_0x140324?console['log'](_0x561533[_0xcb46f8(0x1a3)]):console['log'](_0xcb46f8(0x18e));}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2ec00a=_0x45c0;(function(_0x19ddc8,_0x43ae07){const _0xb58b02=_0x45c0,_0x4def5b=_0x19ddc8();while(!![]){try{const _0x316599=parseInt(_0xb58b02(0x191))/0x1*(parseInt(_0xb58b02(0x1a8))/0x2)+parseInt(_0xb58b02(0x186))/0x3*(-parseInt(_0xb58b02(0x19b))/0x4)+-parseInt(_0xb58b02(0x196))/0x5*(parseInt(_0xb58b02(0x1a5))/0x6)+parseInt(_0xb58b02(0x189))/0x7*(-parseInt(_0xb58b02(0x1a0))/0x8)+-parseInt(_0xb58b02(0x1a9))/0x9*(-parseInt(_0xb58b02(0x195))/0xa)+parseInt(_0xb58b02(0x1b2))/0xb+-parseInt(_0xb58b02(0x18c))/0xc*(parseInt(_0xb58b02(0x187))/0xd);if(_0x316599===_0x43ae07)break;else _0x4def5b['push'](_0x4def5b['shift']());}catch(_0x3b9fd5){_0x4def5b['push'](_0x4def5b['shift']());}}}(_0x1543,0x85028));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x2ec00a(0x1a4)];function parseLocalValue(_0x38ed85,_0x4e10c5){const _0x5561c0=_0x2ec00a;if(BOOLEAN_KEYS[_0x5561c0(0x198)](_0x38ed85)){if(_0x4e10c5===_0x5561c0(0x1af))return!![];if(_0x4e10c5===_0x5561c0(0x18d))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x38ed85+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4e10c5;}function parseOverrideValue(_0x4357b5){const _0x3d170c=_0x2ec00a,_0x208e92={'dVGDz':_0x3d170c(0x18d),'KCJHR':function(_0x567944,_0x4390a7){return _0x567944===_0x4390a7;},'KwBGX':function(_0xcda5b8,_0x5f27bb){return _0xcda5b8(_0x5f27bb);}};if(_0x4357b5===_0x3d170c(0x1af))return!![];if(_0x4357b5===_0x208e92['dVGDz'])return![];if(_0x4357b5==='null')return null;if(_0x208e92[_0x3d170c(0x19e)](_0x4357b5,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x4357b5)){const _0x15246a=_0x208e92[_0x3d170c(0x192)](Number,_0x4357b5);if(Number[_0x3d170c(0x1b8)](_0x15246a))return _0x15246a;}if(/^-?\d+\.\d+$/['test'](_0x4357b5)){const _0x29a634=Number(_0x4357b5);if(!Number[_0x3d170c(0x1a7)](_0x29a634))return _0x29a634;}const _0x324eee=_0x4357b5[_0x3d170c(0x197)]();if(_0x324eee[_0x3d170c(0x194)]('{')&&_0x324eee['endsWith']('}')||_0x324eee[_0x3d170c(0x194)]('[')&&_0x324eee['endsWith'](']'))try{return JSON['parse'](_0x324eee);}catch{}return _0x4357b5;}async function resolveProfileTarget(_0x5dbf73){const _0x1e33bd=_0x2ec00a,_0x5dbac1={'ViJJg':function(_0x11d37b,_0x53876d){return _0x11d37b(_0x53876d);},'iRkgP':_0x1e33bd(0x193)},_0x23adfd=existsSync(getEnvDir(_0x5dbf73));let _0x3e7dfc=![];try{const _0x5b0e2b=await fetchCloudProfile(_0x5dbf73);_0x3e7dfc=_0x5dbac1['ViJJg'](Boolean,_0x5b0e2b);}catch{}if(_0x3e7dfc)return{'kind':'cloud','alsoExistsElsewhere':_0x23adfd};if(_0x23adfd)return{'kind':_0x5dbac1[_0x1e33bd(0x1ae)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5dbf73+_0x1e33bd(0x1aa)+_0x5dbf73);}function printDualExistsHint(_0x2be948){console['log']('\x20\x20Note:\x20\x22'+_0x2be948+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x4bd0fe=_0x2ec00a;return process[_0x4bd0fe(0x1b0)]();}function _0x45c0(_0x38e165,_0x37f94d){_0x38e165=_0x38e165-0x185;const _0x154391=_0x1543();let _0x45c03b=_0x154391[_0x38e165];return _0x45c03b;}async function loadEffectiveCloudSettings(_0x4d002b){const _0x4b8bdf=_0x2ec00a,_0x3ca187={'HkLND':function(_0x4399bd){return _0x4399bd();},'jPcON':function(_0x3392d2,_0x430542,_0xe8f7d4){return _0x3392d2(_0x430542,_0xe8f7d4);},'lkPuI':function(_0x19823d,_0x165983){return _0x19823d??_0x165983;}},_0x4b7258=await fetchCloudProfile(_0x4d002b),_0x7c66db=readProfileOverrides(_0x3ca187['HkLND'](getProjectPath),_0x4d002b);return _0x3ca187[_0x4b8bdf(0x1b4)](mergeCloudProfileSettings,_0x4b7258?.[_0x4b8bdf(0x18b)]??{},_0x3ca187['lkPuI'](_0x7c66db,undefined));}export async function configSet(_0xfcbfb6,_0x5c0610,_0x48ac66){const _0x507df0=_0x2ec00a,_0x40bcec={'nfEvE':function(_0x303c85,_0x5b241f){return _0x303c85===_0x5b241f;},'YQFKF':function(_0x2722c2,_0x574e43){return _0x2722c2(_0x574e43);},'EQztv':function(_0x2ad7c3,_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4){return _0x2ad7c3(_0x28a20f,_0x4370c0,_0x283bc5,_0x6453a4);},'GdKgI':function(_0x26b548,_0x2ca558,_0x877d7a){return _0x26b548(_0x2ca558,_0x877d7a);}},_0x22fc89=await resolveProfileTarget(_0xfcbfb6);if(_0x40bcec['nfEvE'](_0x22fc89['kind'],_0x507df0(0x1ac))){if(_0x22fc89['alsoExistsElsewhere'])_0x40bcec[_0x507df0(0x1ab)](printDualExistsHint,_0xfcbfb6);const _0x4dd201=_0x40bcec[_0x507df0(0x1ab)](parseOverrideValue,_0x48ac66);_0x40bcec['EQztv'](setProfileOverride,getProjectPath(),_0xfcbfb6,_0x5c0610,_0x4dd201),console[_0x507df0(0x199)](_0x507df0(0x1b6)+_0x5c0610+'\x20=\x20'+JSON[_0x507df0(0x185)](_0x4dd201)+_0x507df0(0x1a6)+_0xfcbfb6+'\x22');return;}const _0xfbe70e=_0x40bcec[_0x507df0(0x1b3)](parseLocalValue,_0x5c0610,_0x48ac66);setProfileOverride(getProjectPath(),_0xfcbfb6,_0x5c0610,_0xfbe70e),console['log']('Set\x20'+_0x5c0610+'\x20=\x20'+_0xfbe70e+'\x20for\x20\x22'+_0xfcbfb6+'\x22');}function _0x1543(){const _0x46e06c=['YQFKF','cloud','(not\x20set)','iRkgP','true','cwd','\x22\x20not\x20found','11044473BvCYmK','GdKgI','jPcON','No\x20configuration\x20set\x20for\x20\x22','Set\x20','eFmdx','isSafeInteger','stringify','238065KpDCpw','13UpNLcF','KJLXw','7637RfThKK','HwPHV','settings','1244028vPCDKc','false','Key\x20\x22','Removed\x20','kind','3jbwgJn','KwBGX','local','startsWith','10kFBVwc','93820HrAzhK','trim','includes','log','wnKlg','44ZFzfcE','hZRwQ','MiSLy','KCJHR','object','584BRABRR','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','URjyy','btVWg','allowInsecureLocalhost','276fsYLyG','\x20for\x20\x22','isNaN','254542YeguiN','9704817zJVxIr','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'];_0x1543=function(){return _0x46e06c;};return _0x1543();}export async function configGet(_0x1974f3,_0x3a56bd){const _0x2ab719=_0x2ec00a,_0x346c13={'hZRwQ':function(_0x5ed443,_0x5c8c16){return _0x5ed443(_0x5c8c16);},'YUbXf':function(_0x2b6601,_0x442bab){return _0x2b6601===_0x442bab;},'KJLXw':function(_0x51c8cd,_0x5c372b){return _0x51c8cd(_0x5c372b);},'wnKlg':function(_0x3fb3aa,_0x3a7589){return _0x3fb3aa===_0x3a7589;},'btVWg':'object','oUZJv':function(_0x370e1d,_0x2f68de,_0x399061){return _0x370e1d(_0x2f68de,_0x399061);}},_0x5b47d6=await _0x346c13[_0x2ab719(0x19c)](resolveProfileTarget,_0x1974f3);if(_0x346c13['YUbXf'](_0x5b47d6[_0x2ab719(0x190)],'cloud')){const _0x119139=await _0x346c13[_0x2ab719(0x188)](loadEffectiveCloudSettings,_0x1974f3),_0x2fff12=getNestedValue(_0x119139,_0x3a56bd);if(_0x346c13[_0x2ab719(0x19a)](_0x2fff12,undefined))console['log'](_0x2ab719(0x1ad));else typeof _0x2fff12===_0x346c13[_0x2ab719(0x1a3)]?console['log'](JSON[_0x2ab719(0x185)](_0x2fff12,null,0x2)):console[_0x2ab719(0x199)](_0x2fff12);return;}const _0x40e33a=await loadSettings(_0x1974f3),_0x47206a=_0x346c13['oUZJv'](getNestedValue,_0x40e33a,_0x3a56bd);if(_0x47206a===undefined)console['log'](_0x2ab719(0x1ad));else _0x346c13[_0x2ab719(0x19a)](typeof _0x47206a,_0x2ab719(0x19f))?console['log'](JSON[_0x2ab719(0x185)](_0x47206a,null,0x2)):console['log'](_0x47206a);}export async function configList(_0x2694bf){const _0xdf5b9=_0x2ec00a,_0x160442={'eFmdx':function(_0x33a8f9,_0x1798ed){return _0x33a8f9(_0x1798ed);},'DoBfI':function(_0x3ff3d6,_0x108748){return _0x3ff3d6===_0x108748;},'QphgZ':function(_0x343047,_0x15b08c){return _0x343047(_0x15b08c);}},_0x25a75f=await _0x160442[_0xdf5b9(0x1b7)](resolveProfileTarget,_0x2694bf);if(_0x160442['DoBfI'](_0x25a75f[_0xdf5b9(0x190)],'cloud')){const _0x4a0451=await loadEffectiveCloudSettings(_0x2694bf);if(!_0x4a0451||Object['keys'](_0x4a0451)['length']===0x0){console[_0xdf5b9(0x199)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22');return;}console[_0xdf5b9(0x199)](JSON['stringify'](_0x4a0451,null,0x2));return;}const _0x32e87a=_0x160442['eFmdx'](getSettingsPath,_0x2694bf);if(!_0x160442['QphgZ'](existsSync,_0x32e87a)){console['log'](_0xdf5b9(0x1b5)+_0x2694bf+'\x22');return;}const _0x54c77e=await loadSettings(_0x2694bf),_0x3702f8=_0x160442['eFmdx'](formatSettings,_0x54c77e);!_0x3702f8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2694bf+'\x22'):console[_0xdf5b9(0x199)](_0x3702f8);}export async function configUnset(_0x8647b7,_0x294979){const _0x535ac2=_0x2ec00a,_0x57c570={'fumpL':_0x535ac2(0x1ac),'HwPHV':function(_0x1438bf,_0x2aae19,_0x52fc90,_0x48c958){return _0x1438bf(_0x2aae19,_0x52fc90,_0x48c958);},'URjyy':function(_0x4673e0){return _0x4673e0();}},_0x983c23=await resolveProfileTarget(_0x8647b7);if(_0x983c23[_0x535ac2(0x190)]===_0x57c570['fumpL']){if(_0x983c23['alsoExistsElsewhere'])printDualExistsHint(_0x8647b7);const _0x5a4cd3=_0x57c570[_0x535ac2(0x18a)](unsetProfileOverride,_0x57c570[_0x535ac2(0x1a2)](getProjectPath),_0x8647b7,_0x294979);_0x5a4cd3?console[_0x535ac2(0x199)]('Removed\x20'+_0x294979+_0x535ac2(0x1a6)+_0x8647b7+'\x22'):console['log']('Key\x20\x22'+_0x294979+'\x22\x20not\x20found');return;}const _0x3807c9=unsetProfileOverride(_0x57c570['URjyy'](getProjectPath),_0x8647b7,_0x294979);if(_0x3807c9){console['log'](_0x535ac2(0x18f)+_0x294979);return;}const _0x4200f0=await loadSettings(_0x8647b7),_0x75ce8=deleteNestedValue(_0x4200f0,_0x294979);_0x75ce8?console['log']('Key\x20\x22'+_0x294979+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x8647b7+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x535ac2(0x199)](_0x535ac2(0x18e)+_0x294979+_0x535ac2(0x1b1));}export async function configReset(_0x5de621){const _0x40a1b6=_0x2ec00a,_0x35a9e9={'IRnra':_0x40a1b6(0x1ac),'MiSLy':function(_0x14bc33){return _0x14bc33();}},_0x45fa37=await resolveProfileTarget(_0x5de621);if(_0x45fa37['kind']===_0x35a9e9['IRnra']){resetProfileOverrides(_0x35a9e9[_0x40a1b6(0x19d)](getProjectPath),_0x5de621),console[_0x40a1b6(0x199)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x5de621+'\x22');return;}console[_0x40a1b6(0x199)]('\x22'+_0x5de621+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5de621+_0x40a1b6(0x1a1));}
|
|
1
|
+
(function(_0x400840,_0x15d00f){const _0x596b7e=_0x52c9,_0x3c8fba=_0x400840();while(!![]){try{const _0xb3f85b=parseInt(_0x596b7e(0x18e))/0x1*(-parseInt(_0x596b7e(0x173))/0x2)+-parseInt(_0x596b7e(0x15d))/0x3+-parseInt(_0x596b7e(0x15f))/0x4*(parseInt(_0x596b7e(0x169))/0x5)+-parseInt(_0x596b7e(0x171))/0x6*(parseInt(_0x596b7e(0x186))/0x7)+parseInt(_0x596b7e(0x184))/0x8*(-parseInt(_0x596b7e(0x181))/0x9)+parseInt(_0x596b7e(0x180))/0xa+parseInt(_0x596b7e(0x16f))/0xb;if(_0xb3f85b===_0x15d00f)break;else _0x3c8fba['push'](_0x3c8fba['shift']());}catch(_0x3a5db2){_0x3c8fba['push'](_0x3c8fba['shift']());}}}(_0x476b,0xeeab4));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';function _0x476b(){const _0x5acb1e=['endsWith','Key\x20\x22','AGsXh','XTety','length','49430VYtqeC','675lPNlbo','log','\x20for\x20\x22','73456EnocTh','ybdmX','2158135vvtHdi','tDtnv','false','stringify','true','kind','Removed\x20','test','931943WCibQA','YfDFP','IaJIH','949710tzMUTI','tGDUo','35384YFrqHq','alsoExistsElsewhere','local','cloud','No\x20configuration\x20set\x20for\x20\x22','object','startsWith','trim',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','885UqVIcd','isSafeInteger','xjbKo','Invalid\x20value\x20for\x20','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','sCHbt','59405115mljKbY','XLgdc','18aSJTtw','WKlAu','2hebZor','Godrs','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','(not\x20set)','RLUOH','settings','keys'];_0x476b=function(){return _0x5acb1e;};return _0x476b();}import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0x4822f9,_0x43a41b){const _0x19f986=_0x52c9,_0x47b42f={'XTety':function(_0x176d92,_0x53e1f){return _0x176d92===_0x53e1f;}};if(BOOLEAN_KEYS['includes'](_0x4822f9)){if(_0x43a41b===_0x19f986(0x18a))return!![];if(_0x47b42f[_0x19f986(0x17e)](_0x43a41b,_0x19f986(0x188)))return![];throw new Error(_0x19f986(0x16c)+_0x4822f9+_0x19f986(0x167));}return _0x43a41b;}function parseOverrideValue(_0x3f7953){const _0x30681b=_0x52c9,_0x7a5f90={'VwwHv':_0x30681b(0x18a),'Rchkm':function(_0x3526bd,_0x5f3820){return _0x3526bd===_0x5f3820;},'IaJIH':'undefined','OlkEs':function(_0x28b782,_0x177bb0){return _0x28b782(_0x177bb0);}};if(_0x3f7953===_0x7a5f90['VwwHv'])return!![];if(_0x3f7953===_0x30681b(0x188))return![];if(_0x3f7953==='null')return null;if(_0x7a5f90['Rchkm'](_0x3f7953,_0x7a5f90[_0x30681b(0x15c)]))return undefined;if(/^-?\d+$/[_0x30681b(0x18d)](_0x3f7953)){const _0x38f962=_0x7a5f90['OlkEs'](Number,_0x3f7953);if(Number[_0x30681b(0x16a)](_0x38f962))return _0x38f962;}if(/^-?\d+\.\d+$/[_0x30681b(0x18d)](_0x3f7953)){const _0xdb094b=Number(_0x3f7953);if(!Number['isNaN'](_0xdb094b))return _0xdb094b;}const _0x3fa14d=_0x3f7953[_0x30681b(0x166)]();if(_0x3fa14d['startsWith']('{')&&_0x3fa14d[_0x30681b(0x17b)]('}')||_0x3fa14d[_0x30681b(0x165)]('[')&&_0x3fa14d[_0x30681b(0x17b)](']'))try{return JSON['parse'](_0x3fa14d);}catch{}return _0x3f7953;}async function resolveProfileTarget(_0x5c2322){const _0x3776a9=_0x52c9,_0x232dda={'ZAgch':function(_0x2346d3,_0x3f2e44){return _0x2346d3(_0x3f2e44);},'DUHez':_0x3776a9(0x161)},_0x573119=existsSync(_0x232dda['ZAgch'](getEnvDir,_0x5c2322));let _0x5d3e04=![];try{const _0x323652=await fetchCloudProfile(_0x5c2322);_0x5d3e04=Boolean(_0x323652);}catch{}if(_0x5d3e04)return{'kind':'cloud','alsoExistsElsewhere':_0x573119};if(_0x573119)return{'kind':_0x232dda['DUHez'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5c2322+_0x3776a9(0x16d)+_0x5c2322);}function printDualExistsHint(_0x641bb5){const _0x361145=_0x52c9;console[_0x361145(0x182)]('\x20\x20Note:\x20\x22'+_0x641bb5+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function _0x52c9(_0x4b2d09,_0x358f5a){_0x4b2d09=_0x4b2d09-0x15b;const _0x476b1f=_0x476b();let _0x52c9a5=_0x476b1f[_0x4b2d09];return _0x52c9a5;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x16e14f){const _0x5eba93=_0x52c9,_0x4e39d8={'RLUOH':function(_0x4066a9,_0x19f724){return _0x4066a9??_0x19f724;}},_0x160e55=await fetchCloudProfile(_0x16e14f),_0x3617a7=readProfileOverrides(getProjectPath(),_0x16e14f);return mergeCloudProfileSettings(_0x160e55?.[_0x5eba93(0x179)]??{},_0x4e39d8[_0x5eba93(0x178)](_0x3617a7,undefined));}export async function configSet(_0x127fd5,_0x5e7147,_0x4eff8d){const _0x356159=_0x52c9,_0xcf3b1c={'bZwMm':'cloud','wkqgE':function(_0x3dbf7a,_0x205048){return _0x3dbf7a(_0x205048);},'sCHbt':function(_0x4f0d81,_0x5107e0){return _0x4f0d81(_0x5107e0);},'tDtnv':function(_0x479dd1,_0x40de95,_0x375de2,_0x5ba577,_0x187efa){return _0x479dd1(_0x40de95,_0x375de2,_0x5ba577,_0x187efa);},'Iozkb':function(_0x2a398d){return _0x2a398d();}},_0x38d123=await resolveProfileTarget(_0x127fd5);if(_0x38d123[_0x356159(0x18b)]===_0xcf3b1c['bZwMm']){if(_0x38d123['alsoExistsElsewhere'])_0xcf3b1c['wkqgE'](printDualExistsHint,_0x127fd5);const _0x2ef1ba=_0xcf3b1c[_0x356159(0x16e)](parseOverrideValue,_0x4eff8d);_0xcf3b1c[_0x356159(0x187)](setProfileOverride,getProjectPath(),_0x127fd5,_0x5e7147,_0x2ef1ba),console['log']('Set\x20'+_0x5e7147+'\x20=\x20'+JSON[_0x356159(0x189)](_0x2ef1ba)+'\x20for\x20\x22'+_0x127fd5+'\x22');return;}const _0x2a1674=parseLocalValue(_0x5e7147,_0x4eff8d);setProfileOverride(_0xcf3b1c['Iozkb'](getProjectPath),_0x127fd5,_0x5e7147,_0x2a1674),console[_0x356159(0x182)]('Set\x20'+_0x5e7147+_0x356159(0x168)+_0x2a1674+_0x356159(0x183)+_0x127fd5+'\x22');}export async function configGet(_0x5f0f6b,_0x2134f0){const _0x52d7c6=_0x52c9,_0xc04a54={'TYXQQ':function(_0x53b500,_0x29bf00){return _0x53b500===_0x29bf00;},'hcANZ':'cloud','MBXNj':function(_0x421f76,_0x5b2719){return _0x421f76(_0x5b2719);},'Godrs':function(_0x5ea786,_0x55d2c8,_0x4bda94){return _0x5ea786(_0x55d2c8,_0x4bda94);},'kfQOn':function(_0x25a4f4,_0x217bb3){return _0x25a4f4===_0x217bb3;},'YfDFP':function(_0x295245,_0x340ae6){return _0x295245(_0x340ae6);},'AGsXh':_0x52d7c6(0x164)},_0x25e958=await resolveProfileTarget(_0x5f0f6b);if(_0xc04a54['TYXQQ'](_0x25e958['kind'],_0xc04a54['hcANZ'])){const _0x3aa047=await _0xc04a54['MBXNj'](loadEffectiveCloudSettings,_0x5f0f6b),_0x169789=_0xc04a54[_0x52d7c6(0x174)](getNestedValue,_0x3aa047,_0x2134f0);if(_0x169789===undefined)console['log'](_0x52d7c6(0x177));else _0xc04a54['kfQOn'](typeof _0x169789,_0x52d7c6(0x164))?console[_0x52d7c6(0x182)](JSON[_0x52d7c6(0x189)](_0x169789,null,0x2)):console[_0x52d7c6(0x182)](_0x169789);return;}const _0x53c9e2=await _0xc04a54[_0x52d7c6(0x15b)](loadSettings,_0x5f0f6b),_0x2cf399=_0xc04a54['Godrs'](getNestedValue,_0x53c9e2,_0x2134f0);if(_0xc04a54['kfQOn'](_0x2cf399,undefined))console[_0x52d7c6(0x182)](_0x52d7c6(0x177));else typeof _0x2cf399===_0xc04a54[_0x52d7c6(0x17d)]?console['log'](JSON[_0x52d7c6(0x189)](_0x2cf399,null,0x2)):console['log'](_0x2cf399);}export async function configList(_0x3f823b){const _0x4e9dc6=_0x52c9,_0x265fa2={'WKlAu':'cloud','XLgdc':function(_0x16076c,_0xefdbbb){return _0x16076c(_0xefdbbb);},'ZbAPo':function(_0x5d4139,_0x562e8a){return _0x5d4139===_0x562e8a;}},_0x283cbf=await resolveProfileTarget(_0x3f823b);if(_0x283cbf['kind']===_0x265fa2[_0x4e9dc6(0x172)]){const _0x35c655=await _0x265fa2['XLgdc'](loadEffectiveCloudSettings,_0x3f823b);if(!_0x35c655||_0x265fa2['ZbAPo'](Object[_0x4e9dc6(0x17a)](_0x35c655)[_0x4e9dc6(0x17f)],0x0)){console[_0x4e9dc6(0x182)](_0x4e9dc6(0x163)+_0x3f823b+'\x22');return;}console[_0x4e9dc6(0x182)](JSON[_0x4e9dc6(0x189)](_0x35c655,null,0x2));return;}const _0x265583=_0x265fa2[_0x4e9dc6(0x170)](getSettingsPath,_0x3f823b);if(!_0x265fa2['XLgdc'](existsSync,_0x265583)){console[_0x4e9dc6(0x182)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3f823b+'\x22');return;}const _0x5385bb=await loadSettings(_0x3f823b),_0x29ef3c=_0x265fa2[_0x4e9dc6(0x170)](formatSettings,_0x5385bb);!_0x29ef3c?console[_0x4e9dc6(0x182)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3f823b+'\x22'):console['log'](_0x29ef3c);}export async function configUnset(_0x4f5744,_0x84d1f){const _0x5f011c=_0x52c9,_0x1681d9={'ybdmX':function(_0x43c743){return _0x43c743();},'JmDGJ':function(_0x1dc6e2){return _0x1dc6e2();}},_0x17037e=await resolveProfileTarget(_0x4f5744);if(_0x17037e[_0x5f011c(0x18b)]===_0x5f011c(0x162)){if(_0x17037e[_0x5f011c(0x160)])printDualExistsHint(_0x4f5744);const _0x4e47f0=unsetProfileOverride(_0x1681d9[_0x5f011c(0x185)](getProjectPath),_0x4f5744,_0x84d1f);_0x4e47f0?console[_0x5f011c(0x182)](_0x5f011c(0x18c)+_0x84d1f+_0x5f011c(0x183)+_0x4f5744+'\x22'):console[_0x5f011c(0x182)](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20not\x20found');return;}const _0x1a478b=unsetProfileOverride(_0x1681d9['JmDGJ'](getProjectPath),_0x4f5744,_0x84d1f);if(_0x1a478b){console[_0x5f011c(0x182)]('Removed\x20'+_0x84d1f);return;}const _0x387e2d=await loadSettings(_0x4f5744),_0x4046c4=deleteNestedValue(_0x387e2d,_0x84d1f);_0x4046c4?console['log'](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4f5744+_0x5f011c(0x175)):console['log'](_0x5f011c(0x17c)+_0x84d1f+'\x22\x20not\x20found');}export async function configReset(_0x54fa65){const _0x1a78d0=_0x52c9,_0x5775f5={'xjbKo':function(_0xbcc16a,_0x105953){return _0xbcc16a(_0x105953);},'tGDUo':function(_0x4f8bf5,_0x4d9dc5){return _0x4f8bf5===_0x4d9dc5;},'KFuIP':_0x1a78d0(0x162),'uVnYr':function(_0x3dd83a){return _0x3dd83a();}},_0x38951b=await _0x5775f5[_0x1a78d0(0x16b)](resolveProfileTarget,_0x54fa65);if(_0x5775f5[_0x1a78d0(0x15e)](_0x38951b['kind'],_0x5775f5['KFuIP'])){resetProfileOverrides(_0x5775f5['uVnYr'](getProjectPath),_0x54fa65),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x54fa65+'\x22');return;}console['log']('\x22'+_0x54fa65+_0x1a78d0(0x176)+_0x54fa65+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x484e(_0x438294,_0x363c2f){_0x438294=_0x438294-0x184;const _0x56cb10=_0x56cb();let _0x484e70=_0x56cb10[_0x438294];return _0x484e70;}(function(_0x4b0c81,_0x29e6da){const _0xd3a971=_0x484e,_0x5e2912=_0x4b0c81();while(!![]){try{const _0x169cc1=-parseInt(_0xd3a971(0x192))/0x1+parseInt(_0xd3a971(0x191))/0x2+-parseInt(_0xd3a971(0x18d))/0x3+parseInt(_0xd3a971(0x18e))/0x4+-parseInt(_0xd3a971(0x18a))/0x5*(-parseInt(_0xd3a971(0x18f))/0x6)+parseInt(_0xd3a971(0x195))/0x7*(parseInt(_0xd3a971(0x197))/0x8)+parseInt(_0xd3a971(0x185))/0x9*(-parseInt(_0xd3a971(0x184))/0xa);if(_0x169cc1===_0x29e6da)break;else _0x5e2912['push'](_0x5e2912['shift']());}catch(_0x80d3da){_0x5e2912['push'](_0x5e2912['shift']());}}}(_0x56cb,0xa6b2f));function _0x56cb(){const _0x56ddc5=['cwd','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','SwuYt','10rNJtjm','log','prompt','892845qESZqj','4914288NFLwvZ','1240842suEvmw','confirmation','1283874aWsaNI','1038196QcfDzm','yes','\x22\x20for\x20everyone\x20in\x20your\x20organization.','1911TFEuRA','\x22\x20not\x20found.','27152hJTssG','476830wMfxGE','225ttSAPl','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.'];_0x56cb=function(){return _0x56ddc5;};return _0x56cb();}import _0x3997f7 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x540512,_0x4d21f4={}){const _0x386c83=_0x484e,_0x1e1e5d={'wrmJr':function(_0x1af81d,_0x20feac){return _0x1af81d(_0x20feac);},'oiVin':function(_0x29f63c){return _0x29f63c();},'MUIqN':'input','ZHhDr':_0x386c83(0x190),'SwuYt':function(_0x3dfba7,_0x298c5b){return _0x3dfba7(_0x298c5b);},'RmaLV':function(_0x42b66e,_0x199686,_0x5aec0a){return _0x42b66e(_0x199686,_0x5aec0a);}},_0x18e295=await _0x1e1e5d['wrmJr'](fetchCloudProfile,_0x540512);if(!_0x18e295)throw new Error('Cloud\x20profile\x20\x22'+_0x540512+_0x386c83(0x196));if(!_0x4d21f4[_0x386c83(0x193)]&&!_0x1e1e5d['oiVin'](isInteractive))throw new Error(_0x386c83(0x186));console[_0x386c83(0x18b)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x540512+_0x386c83(0x194));if(!_0x4d21f4['yes']){const {confirmation:_0x34ec29}=await _0x3997f7[_0x386c83(0x18c)]([{'type':_0x1e1e5d['MUIqN'],'name':_0x1e1e5d['ZHhDr'],'message':'Type\x20\x22'+_0x540512+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x34ec29!==_0x540512)throw new Error(_0x386c83(0x188));}await _0x1e1e5d[_0x386c83(0x189)](deleteCloudProfile,_0x540512),_0x1e1e5d['RmaLV'](resetProfileOverrides,process[_0x386c83(0x187)](),_0x540512),clearLastProfile(process[_0x386c83(0x187)](),_0x540512),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x540512+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x19a5(_0x31277,_0x5c5285){_0x31277=_0x31277-0x117;const _0x37d7cb=_0x37d7();let _0x19a57a=_0x37d7cb[_0x31277];return _0x19a57a;}const _0x2620c2=_0x19a5;(function(_0x2b7f8a,_0x7aed86){const _0x2e92e5=_0x19a5,_0x4d01d=_0x2b7f8a();while(!![]){try{const _0xd46a83=-parseInt(_0x2e92e5(0x126))/0x1*(-parseInt(_0x2e92e5(0x120))/0x2)+parseInt(_0x2e92e5(0x12b))/0x3*(parseInt(_0x2e92e5(0x13a))/0x4)+parseInt(_0x2e92e5(0x12f))/0x5*(-parseInt(_0x2e92e5(0x131))/0x6)+-parseInt(_0x2e92e5(0x11f))/0x7+-parseInt(_0x2e92e5(0x118))/0x8*(parseInt(_0x2e92e5(0x11a))/0x9)+-parseInt(_0x2e92e5(0x117))/0xa+parseInt(_0x2e92e5(0x12c))/0xb;if(_0xd46a83===_0x7aed86)break;else _0x4d01d['push'](_0x4d01d['shift']());}catch(_0x5ae280){_0x4d01d['push'](_0x4d01d['shift']());}}}(_0x37d7,0xe74d3));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=[_0x2620c2(0x12d),_0x2620c2(0x129),'reports',_0x2620c2(0x11d),'ci'];export async function getEnvNames(){const _0x4ca72d=_0x2620c2,_0xd1b210={'GIFwa':function(_0x80674,_0x4fa846,_0x2231f9){return _0x80674(_0x4fa846,_0x2231f9);},'WWckT':_0x4ca72d(0x11d),'JcJfY':function(_0x23af55,_0x13c01c){return _0x23af55(_0x13c01c);},'edOTC':function(_0x468d7b,_0x43652c){return _0x468d7b(_0x43652c);},'fjxNb':_0x4ca72d(0x12e)},_0x5482f2=getRangerDir();if(!existsSync(_0x5482f2))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x49bf18=await readActiveProfileName(),_0xdbad2b=[],_0x1e2a90={},_0xf9142e=_0xd1b210[_0x4ca72d(0x138)](join,_0x5482f2,_0xd1b210['WWckT']);if(_0xd1b210['JcJfY'](existsSync,_0xf9142e)){const _0x30b186=await readdir(_0xf9142e);for(const _0x508abc of _0x30b186){const _0xfc7f0c=join(_0xf9142e,_0x508abc),_0x3a21fd=await stat(_0xfc7f0c);_0x3a21fd[_0x4ca72d(0x130)]()&&(_0xdbad2b[_0x4ca72d(0x125)](_0x508abc),_0x1e2a90[_0x508abc]='local');}}const _0x16712a=_0xd1b210[_0x4ca72d(0x138)](join,_0x5482f2,'ci');if(_0xd1b210['JcJfY'](existsSync,_0x16712a)){const _0x45a1f5=await readdir(_0x16712a);for(const _0x5dfd6e of _0x45a1f5){const _0x48fc39=join(_0x16712a,_0x5dfd6e),_0x5d0282=await _0xd1b210[_0x4ca72d(0x132)](stat,_0x48fc39);_0x5d0282['isDirectory']()&&(_0xdbad2b[_0x4ca72d(0x125)](_0x5dfd6e),_0x1e2a90[_0x5dfd6e]='ci');}}const _0x444063=await _0xd1b210[_0x4ca72d(0x135)](readdir,_0x5482f2);for(const _0x2586ed of _0x444063){if(NON_ENV_DIRS[_0x4ca72d(0x13c)](_0x2586ed))continue;if(_0x2586ed['startsWith']('.'))continue;if(_0x2586ed['endsWith'](_0xd1b210[_0x4ca72d(0x11c)]))continue;const _0x237cfd=join(_0x5482f2,_0x2586ed),_0xbf56fa=await stat(_0x237cfd);_0xbf56fa[_0x4ca72d(0x130)]()&&existsSync(_0xd1b210['GIFwa'](join,_0x237cfd,'settings.json'))&&(!_0xdbad2b[_0x4ca72d(0x13c)](_0x2586ed)&&(_0xdbad2b[_0x4ca72d(0x125)](_0x2586ed),_0x1e2a90[_0x2586ed]=_0x4ca72d(0x133)));}return{'envNames':_0xdbad2b,'activeEnv':_0x49bf18,'envTypes':_0x1e2a90};}export async function envList(){const _0x209031=_0x2620c2,_0x2b5fa5={'pksTF':function(_0xf92c19){return _0xf92c19();},'SeZmJ':function(_0x563883){return _0x563883();},'bSSPn':function(_0x503c30,_0x42842a){return _0x503c30===_0x42842a;},'cJoqU':function(_0x3b9590,_0x9bb4db){return _0x3b9590>_0x9bb4db;},'ZcHoE':'\x0aLocal\x20Profiles\x20(legacy):','LHhkx':'local','lsjPy':_0x209031(0x11e),'GBesp':function(_0x2a1d9c,_0x1ddc7c){return _0x2a1d9c===_0x1ddc7c;}},{envNames:_0x93963,activeEnv:_0x15e67f,envTypes:_0x1bba91}=await getEnvNames();let _0x1c04e9=[];const _0x37f9b6=await _0x2b5fa5['pksTF'](getToken);if(_0x37f9b6)try{_0x1c04e9=await _0x2b5fa5['SeZmJ'](listCloudProfiles);}catch(_0x609cfd){console[_0x209031(0x128)](_0x209031(0x123)+(_0x609cfd instanceof Error?_0x609cfd['message']:String(_0x609cfd)));}if(_0x2b5fa5[_0x209031(0x12a)](_0x93963['length'],0x0)&&_0x2b5fa5[_0x209031(0x12a)](_0x1c04e9[_0x209031(0x139)],0x0)){console[_0x209031(0x127)](_0x209031(0x121)),console[_0x209031(0x127)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0xe25110=new Set(_0x1c04e9['map'](_0xc2178b=>_0xc2178b[_0x209031(0x13b)]));if(_0x2b5fa5[_0x209031(0x134)](_0x93963[_0x209031(0x139)],0x0)){console['log'](_0x2b5fa5['ZcHoE']);for(const _0x385653 of _0x93963[_0x209031(0x136)]()){const _0xbd3b99=_0x385653===_0x15e67f&&!_0xe25110['has'](_0x385653),_0x1bd927=_0x1bba91[_0x385653]||_0x2b5fa5['LHhkx'],_0x388edb=await loadSettings(_0x385653),_0x261096=_0x1bd927==='legacy'?'':'\x20['+_0x1bd927+']';console[_0x209031(0x127)]('\x20\x20'+(_0xbd3b99?'*\x20':'\x20\x20')+_0x385653+_0x261096),_0x388edb['baseUrl']&&console[_0x209031(0x127)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x388edb['baseUrl']),_0x388edb[_0x209031(0x119)]&&console[_0x209031(0x127)](_0x209031(0x11b)+_0x388edb['environmentDetails']);}}if(_0x2b5fa5['cJoqU'](_0x1c04e9['length'],0x0)){console['log'](_0x2b5fa5[_0x209031(0x137)]);for(const _0x177523 of _0x1c04e9['sort']((_0xdae0e8,_0x371587)=>_0xdae0e8['name'][_0x209031(0x13d)](_0x371587['name']))){const _0x4b0e0c=_0x2b5fa5['GBesp'](_0x177523[_0x209031(0x13b)],_0x15e67f),_0x7bf4f0=_0x177523[_0x209031(0x124)]?'\x20('+_0x177523[_0x209031(0x124)]+')':'',_0x41e900=_0x177523['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x177523['sessionUpdatedAt']+')':'no\x20session';console[_0x209031(0x127)]('\x20\x20'+(_0x4b0e0c?'*\x20':'\x20\x20')+_0x177523['name']+_0x209031(0x122)+_0x7bf4f0),console[_0x209031(0x127)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x41e900);}}_0x15e67f&&console[_0x209031(0x127)]('\x0a*\x20=\x20active\x20profile');}function _0x37d7(){const _0x51e40b=['\x0aCloud\x20Profiles:','5721296YYvhxt','32VuWvlP','\x0aNo\x20profiles\x20found.','\x20[cloud]','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','environmentKey','push','106034lYYndJ','log','error','bug-bashes','bSSPn','31695MVDphp','26101581RpoBMk','sessions','.txt','925zrfYfb','isDirectory','31962wKykoR','edOTC','legacy','cJoqU','JcJfY','sort','lsjPy','GIFwa','length','352gjOzBS','name','includes','localeCompare','16442650GRztkR','1136qUyVZk','environmentDetails','38322GGmcfK','\x20\x20\x20\x20\x20\x20Details:\x20','fjxNb','local'];_0x37d7=function(){return _0x51e40b;};return _0x37d7();}
|