@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -0
- 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 -0
- 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/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 -0
- package/build/skills/ranger/SKILL.md +1 -1
- package/package.json +1 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3a7b82,_0x51edb0){const _0x5809ae=_0x332f,_0x4dd505=_0x3a7b82();while(!![]){try{const _0x5c8dc1=-parseInt(_0x5809ae(0x16b))/0x1+-parseInt(_0x5809ae(0x189))/0x2*(-parseInt(_0x5809ae(0x195))/0x3)+parseInt(_0x5809ae(0x197))/0x4*(-parseInt(_0x5809ae(0x14b))/0x5)+-parseInt(_0x5809ae(0x1af))/0x6*(-parseInt(_0x5809ae(0x199))/0x7)+-parseInt(_0x5809ae(0x19e))/0x8+-parseInt(_0x5809ae(0x196))/0x9*(parseInt(_0x5809ae(0x16d))/0xa)+-parseInt(_0x5809ae(0x192))/0xb*(-parseInt(_0x5809ae(0x15d))/0xc);if(_0x5c8dc1===_0x51edb0)break;else _0x4dd505['push'](_0x4dd505['shift']());}catch(_0xd71988){_0x4dd505['push'](_0x4dd505['shift']());}}}(_0x2ae8,0xdef6f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x356642 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{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x2b8bc2){const _0x473a0e=_0x332f,_0x586490={'NwNNX':function(_0x230330,_0x56f7d9,_0x55a319){return _0x230330(_0x56f7d9,_0x55a319);},'WHzsY':function(_0x536408,_0x430383){return _0x536408(_0x430383);},'srfLx':function(_0xf5acde,_0x2da8b1){return _0xf5acde<_0x2da8b1;},'mPjbA':function(_0x5618fa,_0x31dac8){return _0x5618fa===_0x31dac8;},'IjvJk':'fetch\x20failed'};try{const _0x12a9e1=new AbortController(),_0xf4dc5f=setTimeout(()=>_0x12a9e1['abort'](),0x1388),_0x2f37df={'method':_0x473a0e(0x160),'signal':_0x12a9e1['signal'],'redirect':_0x473a0e(0x18f)};/^https:\/\/localhost(:\d+)?/i['test'](_0x2b8bc2)&&(process[_0x473a0e(0x1b5)][_0x473a0e(0x1a3)]='0');const _0xce2d87=await _0x586490[_0x473a0e(0x1b2)](fetch,_0x2b8bc2,_0x2f37df);delete process['env'][_0x473a0e(0x1a3)],_0x586490[_0x473a0e(0x1c7)](clearTimeout,_0xf4dc5f);if(_0x586490[_0x473a0e(0x149)](_0xce2d87['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x473a0e(0x14a)+_0xce2d87['status']};}catch(_0x467aae){delete process[_0x473a0e(0x1b5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xa6f0=_0x467aae,_0x59c006=_0xa6f0[_0x473a0e(0x180)]||String(_0x467aae),_0x16013a=_0x59c006[_0x473a0e(0x19f)]('Invalid\x20URL')||_0x586490[_0x473a0e(0x161)](_0xa6f0['name'],_0x473a0e(0x18b))||_0x59c006['includes'](_0x586490['IjvJk']);return{'ok':![],'error':_0x59c006,'isProtocolError':_0x16013a};}}async function sweepOrphanLocalProfile(_0x3455f7,_0x171edb,_0x355c12){const _0x42c640=_0x332f,_0x3c77a5={'sZRdE':function(_0x31352e,_0x164271,_0x17d89c){return _0x31352e(_0x164271,_0x17d89c);},'lFNCB':'local','iiUkL':function(_0x1a0b0a,_0x78afa5){return _0x1a0b0a(_0x78afa5);}},_0x5233d8=_0x3c77a5[_0x42c640(0x185)](join,_0x171edb,_0x3c77a5[_0x42c640(0x159)]),_0x275d18=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x3455f7);existsSync(_0x275d18)&&(_0x355c12&&await isPathGitTracked(_0x275d18)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x275d18+_0x42c640(0x19a)):(await rm(_0x275d18,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x275d18)));if(_0x3c77a5['iiUkL'](existsSync,_0x5233d8)){let _0x420890=[];try{_0x420890=await readdir(_0x5233d8);}catch{return;}const _0x527ad0='.tmp-'+_0x3455f7+'-';for(const _0x24580f of _0x420890){if(!_0x24580f[_0x42c640(0x177)](_0x527ad0))continue;const _0x2abab2=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x24580f);await rm(_0x2abab2,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x2abab2);}}}async function sweepOrphansBestEffort(_0x2803c2){const _0x135974=_0x332f,_0x154008={'FUgJA':function(_0x44a825,_0x106cd6){return _0x44a825!==_0x106cd6;},'ycldD':function(_0x3b0cac,_0x2cee7e){return _0x3b0cac(_0x2cee7e);}};try{await sweepOrphanLocalProfile(_0x2803c2,getRangerHomeDir(),![]);const _0x2f19ae=getRangerDir();_0x154008[_0x135974(0x170)](_0x2f19ae,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x2803c2,_0x2f19ae,!![]);}catch(_0x55471b){console['log'](_0x135974(0x154)+(_0x55471b instanceof Error?_0x55471b[_0x135974(0x180)]:_0x154008['ycldD'](String,_0x55471b))+').');}}function _0x2ae8(){const _0x34d4a4=['\x0a🌐\x20Profile\x20Setup\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','HEAD','mPjbA','Hbiap','MpWhs','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','RPpAN','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','url','KjJyd','cwd','http://localhost:3000','530962klazPe','⚠\x20Could\x20not\x20reach\x20','290tfKxJz','FLsnp','JfLls','FUgJA','capture','profile.add.autoRouteSkipped','cdpEndpoint','RxqRK','\x0a\x20\x20(domains:\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','startsWith','prompt','hBywO','retry','UtpqF','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','WxvLA','KssPC','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','message','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','trackPhaseEnd','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','error','sZRdE','fJZCP','Use\x20','ncNoK','8WojPSV','hcpBZ','TypeError','iuERG','\x20\x20Did\x20you\x20mean\x20','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','manual','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','`\x20again\x20without\x20--skip-auth.','21399917XpGspx','continue','input','196539tSoozh','241443wvEVpB','2104QHYTuQ','FvEyC','14hmGvZe','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','What\x20would\x20you\x20like\x20to\x20do?','qGHRT','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','2161544wcNQeh','includes','keys','zWXnJ','ghDsV','NODE_TLS_REJECT_UNAUTHORIZED','log','yes','action','exit','vaWRj','otUeX','baseUrl','setupHeaders','\x0a\x20\x20A\x20profile\x20named\x20\x22','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','3191724pVOOyR','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','length','NwNNX','BpHIF','Enter\x20a\x20different\x20URL','env','confirm','\x27\x20to\x20the\x20cloud?','status','\x27\x20matching\x20','QfMHx','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','YjCCF','luZOJ','isElectron','✓\x20Profile\x20\x27','domains','slice','join','\x22:\x20','profile.add.autoRouted','mkRQP','WHzsY','\x20\x20Set\x20active\x20profile:\x20','srfLx','HTTP\x20','7405CoDTPT','\x20--url\x20','trim','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','environments','Could\x20not\x20reach\x20','saveToCloud','xfGOB','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','use_suggestion','force','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lFNCB','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','GSkDI','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','12wPBOTR'];_0x2ae8=function(){return _0x34d4a4;};return _0x2ae8();}async function markActive(_0x21e361){const _0x3c35f6=_0x332f,_0x5bafed={'TeyTK':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x21e361),console[_0x3c35f6(0x1a4)](_0x3c35f6(0x1c8)+_0x21e361);}catch{console['log'](_0x5bafed['TeyTK']);}}async function tryAutoRouteCloudProfile(_0x5b323e,_0x172863,_0x131112,_0x2ecc43,_0x465de2){const _0x272560=_0x332f,_0x587951={'cNFSf':function(_0x1ffd00,_0x241b06){return _0x1ffd00===_0x241b06;},'MpWhs':function(_0x44530a,_0x3a5b8f){return _0x44530a instanceof _0x3a5b8f;},'ieMlw':function(_0x3a3a7b,_0x16cc2c){return _0x3a3a7b(_0x16cc2c);},'mkRQP':'profile.add.autoRouteSkipped','otUeX':function(_0x628bda,_0x4616d4){return _0x628bda+_0x4616d4;},'PEqvF':function(_0x471285,_0x31bd7b){return _0x471285+_0x31bd7b;},'MmyMC':'\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','mdOnB':_0x272560(0x19d),'WxvLA':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','zlifT':_0x272560(0x15f),'jsdwk':function(_0x287c68,_0x5963d2,_0x4ac38a){return _0x287c68(_0x5963d2,_0x4ac38a);},'Srqoi':'no_match','zXWpQ':'user_declined','JfLls':_0x272560(0x1c5)};let _0x116fc8;try{_0x116fc8=await fetchAuthConfig();}catch(_0x1a8397){return _0x465de2?.['trackPhaseEnd'](_0x272560(0x172),{'reason':'no_auth_config','profileName':_0x5b323e}),console['error'](_0x272560(0x14f)+(_0x587951[_0x272560(0x163)](_0x1a8397,Error)?_0x1a8397['message']:_0x587951['ieMlw'](String,_0x1a8397))),![];}if(!_0x116fc8||!_0x116fc8['environments']||Object[_0x272560(0x1a0)](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1b1)]===0x0){if(_0x2ecc43)return await captureEnvLessProfile(_0x5b323e,_0x172863,_0x131112,_0x465de2);return _0x465de2?.['trackPhaseEnd'](_0x587951['mkRQP'],{'reason':'no_auth_config','profileName':_0x5b323e}),console[_0x272560(0x184)](_0x587951[_0x272560(0x1a9)](_0x587951['PEqvF'](_0x587951['MmyMC'],'\x0a')+_0x587951['mdOnB']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x5b323e+_0x272560(0x14c)+_0x172863+'\x20--skip-auth\x0a')+'\x0a',_0x587951[_0x272560(0x17d)])+_0x587951['zlifT']),![];}const _0x536407=_0x587951['jsdwk'](matchAuthEnvironment,_0x172863,_0x116fc8);if(!_0x536407)return _0x465de2?.['trackPhaseEnd'](_0x587951[_0x272560(0x1c6)],{'reason':_0x587951['Srqoi'],'profileName':_0x5b323e}),console[_0x272560(0x184)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x172863+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1c3)](',\x20')+'.'),![];const _0x4bf430=_0x116fc8[_0x272560(0x150)][_0x536407],_0x3d0b07=_0x4bf430?.[_0x272560(0x1c1)]??[];if(_0x2ecc43&&!_0x131112[_0x272560(0x1a5)]){const {saveToCloud:_0x38de62}=await _0x356642['prompt']([{'type':_0x272560(0x1b6),'name':_0x272560(0x152),'message':'Found\x20auth\x20environment\x20\x27'+_0x536407+_0x272560(0x1b9)+_0x172863+_0x272560(0x175)+_0x3d0b07[_0x272560(0x1c3)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x5b323e+_0x272560(0x1b7),'default':!![]}]);if(!_0x38de62)return _0x465de2?.[_0x272560(0x182)](_0x587951['mkRQP'],{'reason':_0x587951['zXWpQ'],'profileName':_0x5b323e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x38321d=_0x3d0b07['some'](_0x5b6a03=>{try{return _0x587951['cNFSf'](new URL(_0x5b6a03)['origin'],new URL(_0x172863)['origin']);}catch{return![];}}),_0x338ecb={};!_0x38321d&&(_0x338ecb['baseUrl']=_0x172863);try{await createCloudProfile(_0x5b323e,_0x536407,{'settings':_0x338ecb});}catch(_0x50f856){if(_0x50f856 instanceof ApiError&&_0x50f856['status']===0x199){console['error'](_0x272560(0x1ac)+_0x5b323e+_0x272560(0x158)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5b323e));throw _0x50f856;}throw _0x50f856;}return console['log'](_0x587951['PEqvF']('✓\x20Profile\x20\x27'+_0x5b323e+'\x27\x20created.\x0a',_0x272560(0x166)+_0x5b323e)),await _0x587951['ieMlw'](sweepOrphansBestEffort,_0x5b323e),_0x465de2?.[_0x272560(0x182)](_0x587951[_0x272560(0x16f)],{'envKey':_0x536407,'profileName':_0x5b323e}),!![];}async function createUnconfiguredCloudProfile(_0x4cf094,_0x2060ca){const _0x2d37dd=_0x332f;try{await createCloudProfile(_0x4cf094,undefined,{'settings':_0x2060ca});}catch(_0x8a7084){_0x8a7084 instanceof ApiError&&_0x8a7084['status']===0x199&&console[_0x2d37dd(0x184)](_0x2d37dd(0x1ac)+_0x4cf094+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4cf094));throw _0x8a7084;}}function _0x332f(_0x46d516,_0x50f596){_0x46d516=_0x46d516-0x149;const _0x2ae82e=_0x2ae8();let _0x332f2f=_0x2ae82e[_0x46d516];return _0x332f2f;}async function captureEnvLessProfile(_0x310457,_0x58cf30,_0x4eb74f,_0x4fe327){const _0xced005=_0x332f,_0x379fb8={'YVdQW':'confirm','ncNoK':'user_declined','BpHIF':function(_0x3d6842,_0x2c068d){return _0x3d6842+_0x2c068d;},'UtpqF':function(_0xb9964f,_0x3df03b){return _0xb9964f===_0x3df03b;},'jynut':function(_0x41eb3c,_0x3fa305){return _0x41eb3c>_0x3fa305;},'luZOJ':function(_0x3011be,_0x1ef4d3,_0xd24a7,_0x527cd2){return _0x3011be(_0x1ef4d3,_0xd24a7,_0x527cd2);},'zWXnJ':function(_0x4de165,_0x1da359){return _0x4de165 instanceof _0x1da359;},'hcpBZ':function(_0x164031,_0xba4341,_0x11046b){return _0x164031(_0xba4341,_0x11046b);},'pIXoc':_0xced005(0x1c5)};if(!_0x4eb74f['yes']){const {capture:_0x434ff0}=await _0x356642[_0xced005(0x178)]([{'type':_0x379fb8['YVdQW'],'name':_0xced005(0x171),'message':_0xced005(0x1ae),'default':!![]}]);if(!_0x434ff0)return _0x4fe327?.[_0xced005(0x182)](_0xced005(0x172),{'reason':_0x379fb8[_0xced005(0x188)],'profileName':_0x310457}),console['error'](_0x379fb8[_0xced005(0x1b3)](_0xced005(0x157),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x5f41d4={};if(_0x4eb74f['setupHeader'])for(const _0x37c4a5 of _0x4eb74f['setupHeader']){const _0x288345=_0x37c4a5['indexOf'](':');if(_0x379fb8[_0xced005(0x17b)](_0x288345,-0x1))continue;_0x5f41d4[_0x37c4a5['slice'](0x0,_0x288345)[_0xced005(0x14d)]()]=_0x37c4a5[_0xced005(0x1c2)](_0x288345+0x1)['trim']();}const _0x638116={'baseUrl':_0x58cf30};_0x379fb8['jynut'](Object['keys'](_0x5f41d4)['length'],0x0)&&(_0x638116[_0xced005(0x1ab)]=_0x5f41d4);let _0x4eb625;try{_0x4eb625=await _0x379fb8[_0xced005(0x1be)](createCloudProfile,_0x310457,undefined,{'settings':_0x638116});}catch(_0x3c63de){_0x379fb8[_0xced005(0x1a1)](_0x3c63de,ApiError)&&_0x379fb8['UtpqF'](_0x3c63de[_0xced005(0x1b8)],0x199)&&console[_0xced005(0x184)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x310457+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x310457));throw _0x3c63de;}return await _0x379fb8[_0xced005(0x18a)](manualBrowserLogin,_0x4eb625,{'key':'','domains':[_0x58cf30],'setupHeaders':Object['keys'](_0x5f41d4)['length']>0x0?_0x5f41d4:undefined}),console[_0xced005(0x1a4)]('\x0a✓\x20Profile\x20\x27'+_0x310457+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x310457)),await sweepOrphansBestEffort(_0x310457),_0x4fe327?.[_0xced005(0x182)](_0x379fb8['pIXoc'],{'envKey':null,'profileName':_0x310457}),!![];}export async function addEnv(_0x5fbf0f,_0x300611={},_0x24c80a){const _0x5aa2ce=_0x332f,_0x91573d={'oqhpD':_0x5aa2ce(0x1ad),'FLsnp':_0x5aa2ce(0x1b0),'hBywO':function(_0x1b07e1,_0x22ed34){return _0x1b07e1+_0x22ed34;},'vaWRj':function(_0x1780be,_0x588b73){return _0x1780be!==_0x588b73;},'QfMHx':function(_0x2c7e68,_0x549257){return _0x2c7e68===_0x549257;},'iuERG':_0x5aa2ce(0x181),'vxWsw':_0x5aa2ce(0x15a),'oGVaO':function(_0x1edf21,_0x4cbc04){return _0x1edf21(_0x4cbc04);},'RxqRK':function(_0x1448c9,_0x4b2efc,_0x5a88ae){return _0x1448c9(_0x4b2efc,_0x5a88ae);},'fJZCP':function(_0x59b22b,_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2){return _0x59b22b(_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2);},'Hbiap':function(_0x26f963,_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108){return _0x26f963(_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108);},'dMwIa':_0x5aa2ce(0x1bf),'aOxii':function(_0x4e9593,_0x574da6){return _0x4e9593(_0x574da6);},'KjJyd':function(_0x3b04a2,_0xebc72c){return _0x3b04a2>_0xebc72c;},'qGHRT':function(_0x5b7e72,_0xd44ad3){return _0x5b7e72(_0xd44ad3);},'ghDsV':function(_0x1f7741,_0x4513fe){return _0x1f7741(_0x4513fe);},'JjFVt':_0x5aa2ce(0x1aa),'RPpAN':_0x5aa2ce(0x190),'YjCCF':_0x5aa2ce(0x16a),'FvEyC':_0x5aa2ce(0x1a6),'KssPC':_0x5aa2ce(0x19b),'xfGOB':_0x5aa2ce(0x1b4),'ZTdOg':'Continue\x20anyway','SMvUK':function(_0x29f1b2,_0x441072){return _0x29f1b2===_0x441072;},'Rfhha':_0x5aa2ce(0x155),'GSkDI':function(_0x433218,_0x2c4f69){return _0x433218(_0x2c4f69);}};_0x300611['ci']&&(console[_0x5aa2ce(0x184)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x91573d['oqhpD']+'\x0a'+_0x91573d[_0x5aa2ce(0x16e)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x5aa2ce(0x1bb)),process['exit'](0x1));const _0x1a5f1b={};if(_0x300611['setupHeader'])for(const _0x51d256 of _0x300611['setupHeader']){const _0x6b1f77=_0x51d256['indexOf'](':');if(_0x6b1f77===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x51d256+_0x5aa2ce(0x1bc));const _0x1db0cd=_0x51d256[_0x5aa2ce(0x1c2)](0x0,_0x6b1f77)[_0x5aa2ce(0x14d)](),_0x49a291=_0x51d256['slice'](_0x91573d[_0x5aa2ce(0x179)](_0x6b1f77,0x1))['trim']();_0x1a5f1b[_0x1db0cd]=_0x49a291;}if(_0x91573d[_0x5aa2ce(0x1a8)](_0x300611[_0x5aa2ce(0x173)],undefined)&&_0x91573d[_0x5aa2ce(0x1ba)](_0x300611['cdpEndpoint']['trim'](),''))throw new Error(_0x91573d[_0x5aa2ce(0x18c)]);if(_0x300611['cdpEndpoint']&&_0x300611['url'])throw new Error(_0x91573d['vxWsw']);const _0x3910c9=_0x91573d['oGVaO'](Boolean,_0x300611['cdpEndpoint']),_0x45543a=process['stdin']['isTTY']&&process['stdout']['isTTY'];if(!_0x45543a&&!_0x300611['url']&&!_0x3910c9&&!_0x300611['skipAuth'])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x3910c9){const _0x5e0be3=_0x300611[_0x5aa2ce(0x173)];console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x14e)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x5e0be3);const _0x4bf96b={'cdpEndpoint':_0x5e0be3,'isElectron':!![]};Object['keys'](_0x1a5f1b)['length']>0x0&&(_0x4bf96b[_0x5aa2ce(0x1ab)]=_0x1a5f1b);await _0x91573d[_0x5aa2ce(0x174)](createUnconfiguredCloudProfile,_0x5fbf0f,_0x4bf96b);try{_0x91573d[_0x5aa2ce(0x186)](setProfileOverride,process['cwd'](),_0x5fbf0f,_0x5aa2ce(0x173),_0x5e0be3),_0x91573d[_0x5aa2ce(0x162)](setProfileOverride,process[_0x5aa2ce(0x169)](),_0x5fbf0f,_0x91573d['dMwIa'],!![]);}catch(_0x3491fd){console[_0x5aa2ce(0x184)](_0x5aa2ce(0x17c)+(_0x3491fd instanceof Error?_0x3491fd[_0x5aa2ce(0x180)]:String(_0x3491fd)));}console[_0x5aa2ce(0x1a4)]('✓\x20Cloud\x20profile\x20\x27'+_0x5fbf0f+'\x27\x20created\x20(CDP).'),await _0x91573d['aOxii'](sweepOrphansBestEffort,_0x5fbf0f),await markActive(_0x5fbf0f);return;}if(_0x300611['skipAuth']){const _0x37e18b={};_0x300611[_0x5aa2ce(0x167)]&&(_0x37e18b[_0x5aa2ce(0x1aa)]=_0x300611['url']);_0x91573d[_0x5aa2ce(0x168)](Object[_0x5aa2ce(0x1a0)](_0x1a5f1b)['length'],0x0)&&(_0x37e18b['setupHeaders']=_0x1a5f1b);await createUnconfiguredCloudProfile(_0x5fbf0f,_0x37e18b),console['log'](_0x91573d['hBywO'](_0x5aa2ce(0x1c0)+_0x5fbf0f+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5fbf0f+_0x5aa2ce(0x191))),await _0x91573d[_0x5aa2ce(0x19c)](sweepOrphansBestEffort,_0x5fbf0f),await _0x91573d[_0x5aa2ce(0x1a2)](markActive,_0x5fbf0f);return;}if(_0x300611['url']){const _0x5732cb=_0x300611['url'],_0x5c237e=await _0x91573d['oGVaO'](checkUrlReachability,_0x5732cb);if(!_0x5c237e['ok']&&!_0x300611[_0x5aa2ce(0x156)])throw new Error(_0x5aa2ce(0x151)+_0x5732cb+':\x20'+_0x5c237e['error']+_0x5aa2ce(0x15c));!_0x5c237e['ok']&&_0x300611['force']&&console['log'](_0x5aa2ce(0x16c)+_0x5732cb+':\x20'+_0x5c237e[_0x5aa2ce(0x184)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x5aa2ce(0x15e)),console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x164)),console[_0x5aa2ce(0x1a4)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2774bb='',_0x429716=![];while(!![]){const _0xb4b7b5=await _0x356642['prompt']([{'type':_0x5aa2ce(0x194),'name':_0x91573d['JjFVt'],'message':_0x429716?_0x91573d[_0x5aa2ce(0x165)]:_0x5aa2ce(0x183),'default':_0x2774bb||_0x91573d[_0x5aa2ce(0x1bd)]}]);_0x2774bb=_0xb4b7b5['baseUrl'];const _0x78d5fe=await checkUrlReachability(_0x2774bb);if(_0x78d5fe['ok'])break;const _0x4da3af=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2774bb),_0x1bf393=_0x78d5fe['isProtocolError']&&!_0x4da3af,_0x58ad06=_0x1bf393?'http://'+_0x2774bb:null;_0x429716=!![],console[_0x5aa2ce(0x1a4)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2774bb+':\x20'+_0x78d5fe['error']);_0x58ad06&&console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x18d)+_0x58ad06+'?');const {action:_0x537b94}=await _0x356642['prompt']([{'type':'list','name':_0x91573d[_0x5aa2ce(0x198)],'message':_0x91573d[_0x5aa2ce(0x17e)],'choices':[..._0x58ad06?[{'name':_0x5aa2ce(0x187)+_0x58ad06,'value':_0x5aa2ce(0x155)}]:[],{'name':_0x91573d[_0x5aa2ce(0x153)],'value':_0x5aa2ce(0x17a)},{'name':_0x91573d['ZTdOg'],'value':'continue'}]}]);if(_0x91573d['SMvUK'](_0x537b94,_0x91573d['Rfhha'])&&_0x58ad06){_0x2774bb=_0x58ad06;const _0x1c5a26=await _0x91573d[_0x5aa2ce(0x15b)](checkUrlReachability,_0x2774bb);if(_0x1c5a26['ok'])break;console['log'](_0x5aa2ce(0x18e)+_0x2774bb+':\x20'+_0x1c5a26['error']);}else{if(_0x537b94===_0x5aa2ce(0x193))break;}}_0x300611={..._0x300611,'url':_0x2774bb};}let _0x3a73d6=![];try{_0x3a73d6=await tryAutoRouteCloudProfile(_0x5fbf0f,_0x300611[_0x5aa2ce(0x167)],_0x300611,_0x45543a,_0x24c80a);}catch(_0x1e9757){console['error'](_0x5aa2ce(0x176)+_0x5fbf0f+_0x5aa2ce(0x1c4)+(_0x1e9757 instanceof Error?_0x1e9757[_0x5aa2ce(0x180)]:String(_0x1e9757))),process[_0x5aa2ce(0x1a7)](0x1);}!_0x3a73d6&&process['exit'](0x1),await _0x91573d[_0x5aa2ce(0x15b)](markActive,_0x5fbf0f);}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbc2dc1,_0x15ddf5){var _0x3d3130=_0xe6a7,_0x1db64a=_0xbc2dc1();while(!![]){try{var _0x5cf3a0=-parseInt(_0x3d3130(0x15c))/0x1*(-parseInt(_0x3d3130(0x156))/0x2)+-parseInt(_0x3d3130(0x153))/0x3*(parseInt(_0x3d3130(0x150))/0x4)+parseInt(_0x3d3130(0x15a))/0x5*(-parseInt(_0x3d3130(0x152))/0x6)+-parseInt(_0x3d3130(0x157))/0x7+-parseInt(_0x3d3130(0x158))/0x8*(parseInt(_0x3d3130(0x155))/0x9)+parseInt(_0x3d3130(0x154))/0xa+-parseInt(_0x3d3130(0x151))/0xb*(-parseInt(_0x3d3130(0x159))/0xc);if(_0x5cf3a0===_0x15ddf5)break;else _0x1db64a['push'](_0x1db64a['shift']());}catch(_0x44fb62){_0x1db64a['push'](_0x1db64a['shift']());}}}(_0x1435,0xce527));function _0x1435(){var _0x431031=['3172530hoScKG','44442rfOvWy','434ZlQtdU','7137683VFBaIC','424NHmgYG','26484vguYaq','10aOioKZ','error','6619qPGOVx','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','SoWrN','exit','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','ZWnPn','4hJuyXU','6523KmoGLB','1867872GUvBEZ','939675ZNiRsV'];_0x1435=function(){return _0x431031;};return _0x1435();}function _0xe6a7(_0x5a5635,_0x5dc427){_0x5a5635=_0x5a5635-0x150;var _0x1435e0=_0x1435();var _0xe6a762=_0x1435e0[_0x5a5635];return _0xe6a762;}export async function authEncrypt(_0x59e847){var _0x50da0d=_0xe6a7,_0x57a5fa={'SoWrN':function(_0x26d5bc,_0x4feee8){return _0x26d5bc+_0x4feee8;},'djDgT':function(_0x450767,_0x294e73){return _0x450767+_0x294e73;},'kIsLo':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','ZWnPn':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x50da0d(0x15b)](_0x57a5fa['SoWrN'](_0x57a5fa['SoWrN'](_0x57a5fa[_0x50da0d(0x15e)](_0x57a5fa['SoWrN'](_0x57a5fa['djDgT'](_0x50da0d(0x160)+_0x57a5fa['kIsLo'],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x50da0d(0x15d)),'\x0a'),_0x57a5fa[_0x50da0d(0x161)]),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x50da0d(0x15f)](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5f4a5c=_0x3fe2;(function(_0x3b5dc3,_0xf549dc){const _0x564bdf=_0x3fe2,_0x5801fd=_0x3b5dc3();while(!![]){try{const _0x33f67f=-parseInt(_0x564bdf(0xa8))/0x1+-parseInt(_0x564bdf(0x9c))/0x2+-parseInt(_0x564bdf(0x80))/0x3*(-parseInt(_0x564bdf(0x86))/0x4)+parseInt(_0x564bdf(0x87))/0x5*(parseInt(_0x564bdf(0xa6))/0x6)+parseInt(_0x564bdf(0x79))/0x7+parseInt(_0x564bdf(0x94))/0x8+parseInt(_0x564bdf(0xa3))/0x9;if(_0x33f67f===_0xf549dc)break;else _0x5801fd['push'](_0x5801fd['shift']());}catch(_0x2cb291){_0x5801fd['push'](_0x5801fd['shift']());}}}(_0x47fb,0xcdd43));function _0x47fb(){const _0x219280=['remove','log','144968TwTVYV','5wnZzqp','tnjqE','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','Ittze','cKdRu','fHyrf','replace','Nothing\x20to\x20clean\x20up.\x0a','\x0a✅\x20Cleanup\x20complete!\x0a','claude','utf-8','yjieG','xntma','1433536yhZZaO','ranger','VphPQ','marketplace','UGfZT','✓\x20Removed\x20trailhead\x20marketplace','platform','close','439978ytoQxj','seaIq','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','IMyxJ','win32','plugin','raMjz','2298384hzvszb','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','string','2960418PnYTJV','LppxE','600785DnSHqG','push','HkbqQ','error','length','ASQnU','user','project','byOGg','idfEt','330960nrlYEZ','leoUe','xxPYy','BPNZp','filter','ignore','JCLLa','57pMBdfQ','OlJzA','✓\x20Removed\x20project\x20skill:\x20','parse'];_0x47fb=function(){return _0x219280;};return _0x47fb();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x3fe2(_0x59c341,_0x1e623e){_0x59c341=_0x59c341-0x72;const _0x47fb53=_0x47fb();let _0x3fe251=_0x47fb53[_0x59c341];return _0x3fe251;}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x5f4a5c(0x95),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x3f9e6d){const _0x1c3e38=_0x5f4a5c,_0x536597=_0x3f9e6d[_0x1c3e38(0x8d)](/\/\*[\s\S]*?\*\//g,''),_0x4b88c0=_0x536597['replace'](/^\s*\/\/.*$/gm,''),_0x2128b4=_0x4b88c0[_0x1c3e38(0x8d)](/,\s*([}\]])/g,'$1');return JSON[_0x1c3e38(0x83)](_0x2128b4);}async function removeOpencodePluginConfig(_0x3bad2d){const _0x153359=_0x5f4a5c,_0x5b9896={'vkaDA':function(_0x541521,_0x45201c){return _0x541521!==_0x45201c;},'GSzAE':function(_0x23050c,_0x5d087c){return _0x23050c!==_0x5d087c;},'DxLEC':function(_0x5b834a,_0x3380b9){return _0x5b834a(_0x3380b9);},'Ittze':function(_0x2b4e40,_0x19ae4a,_0x26331c){return _0x2b4e40(_0x19ae4a,_0x26331c);},'TavtX':function(_0x175112,_0x4c1388){return _0x175112===_0x4c1388;},'JCLLa':function(_0x556fc1,_0x4beec3){return _0x556fc1===_0x4beec3;}};if(!_0x5b9896['DxLEC'](existsSync,_0x3bad2d))return![];let _0x3b9ab9;try{const _0x451140=await _0x5b9896['Ittze'](readFile,_0x3bad2d,_0x153359(0x91));_0x3b9ab9=parseJsonc(_0x451140);}catch{return![];}const _0x26d3ff=Array['isArray'](_0x3b9ab9[_0x153359(0xa1)])?_0x3b9ab9['plugin']:[];if(_0x5b9896['TavtX'](_0x26d3ff[_0x153359(0x73)],0x0))return![];const _0x2e9498=_0x26d3ff[_0x153359(0x7d)](_0x57800f=>{const _0x417bf2=_0x153359;if(_0x5b9896['vkaDA'](typeof _0x57800f,_0x417bf2(0xa5)))return!![];return _0x5b9896['GSzAE'](_0x57800f,opencodePluginName);});if(_0x5b9896[_0x153359(0x7f)](_0x2e9498[_0x153359(0x73)],_0x26d3ff[_0x153359(0x73)]))return![];return _0x5b9896['TavtX'](_0x2e9498['length'],0x0)?delete _0x3b9ab9['plugin']:_0x3b9ab9[_0x153359(0xa1)]=_0x2e9498,await _0x5b9896[_0x153359(0x8a)](writeFile,_0x3bad2d,JSON['stringify'](_0x3b9ab9,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5998bc){const _0x53dab4=_0x5f4a5c,_0x52729a={'zYTEc':function(_0x4ceaa4,_0x5e12bf){return _0x4ceaa4(_0x5e12bf);},'IMyxJ':function(_0x5a4e64,_0x56b8ac){return _0x5a4e64(_0x56b8ac);},'OlJzA':_0x53dab4(0xa1),'smhyu':'ranger@trailhead','UGfZT':'--scope','seaIq':_0x53dab4(0x90),'VphPQ':_0x53dab4(0x7e)};return new Promise(_0x496170=>{const _0x49c405=_0x53dab4,_0x58393c={'raMjz':function(_0x246391,_0xdac900){const _0x15495e=_0x3fe2;return _0x52729a[_0x15495e(0x9f)](_0x246391,_0xdac900);}},_0x2e4bce=[_0x52729a[_0x49c405(0x81)],'uninstall',_0x52729a['smhyu']];_0x5998bc&&_0x2e4bce[_0x49c405(0xa9)](_0x52729a[_0x49c405(0x98)],_0x5998bc);const _0x27f61e=spawn(_0x52729a[_0x49c405(0x9d)],_0x2e4bce,{'stdio':[_0x52729a[_0x49c405(0x96)],_0x52729a[_0x49c405(0x96)],_0x52729a['VphPQ']],'cwd':_0x5998bc?getProjectRoot():undefined,'shell':process[_0x49c405(0x9a)]==='win32'});_0x27f61e['on'](_0x49c405(0x9b),_0x3c6ffd=>{_0x52729a['zYTEc'](_0x496170,_0x3c6ffd===0x0);}),_0x27f61e['on'](_0x49c405(0x72),()=>{const _0x33f88b=_0x49c405;_0x58393c[_0x33f88b(0xa2)](_0x496170,![]);});});}async function removeMarketplace(){const _0x5d984b=_0x5f4a5c,_0x18a00f={'BPNZp':function(_0x3de65c,_0xcfdbfe){return _0x3de65c(_0xcfdbfe);},'SzRzw':function(_0x14137e,_0x1d3284,_0x169abc,_0x178bdc){return _0x14137e(_0x1d3284,_0x169abc,_0x178bdc);},'nXITD':'plugin','BiJMD':_0x5d984b(0x97),'VHHsD':_0x5d984b(0x7e),'TwbSj':function(_0x3142ea,_0xa7acb8){return _0x3142ea===_0xa7acb8;},'yjieG':_0x5d984b(0xa0),'leoUe':_0x5d984b(0x9b),'MTqoB':'error'};return new Promise(_0x46af62=>{const _0xf5fff6=_0x5d984b,_0xe1fc4c={'xntma':function(_0x5a7893,_0x4b02c7){return _0x5a7893===_0x4b02c7;}},_0x3ea2cf=_0x18a00f['SzRzw'](spawn,'claude',[_0x18a00f['nXITD'],_0x18a00f['BiJMD'],_0xf5fff6(0x84),'trailhead'],{'stdio':[_0xf5fff6(0x7e),_0x18a00f['VHHsD'],'ignore'],'shell':_0x18a00f['TwbSj'](process[_0xf5fff6(0x9a)],_0x18a00f[_0xf5fff6(0x92)])});_0x3ea2cf['on'](_0x18a00f[_0xf5fff6(0x7a)],_0x34dd54=>{const _0x2e4de5=_0xf5fff6;_0x46af62(_0xe1fc4c[_0x2e4de5(0x93)](_0x34dd54,0x0));}),_0x3ea2cf['on'](_0x18a00f['MTqoB'],()=>{const _0x29b74f=_0xf5fff6;_0x18a00f[_0x29b74f(0x7c)](_0x46af62,![]);});});}export async function clean(){const _0x87f781=_0x5f4a5c,_0x485202={'pjUWk':'✓\x20Removed\x20stored\x20credentials','HkbqQ':function(_0x205c51,_0x3c64d2){return _0x205c51(_0x3c64d2);},'ASQnU':function(_0x33f5a8){return _0x33f5a8();},'xxPYy':function(_0x52492a,_0x18c5ad,_0x29eb49){return _0x52492a(_0x18c5ad,_0x29eb49);},'cKdRu':function(_0x5a3e55,_0x5a7f7f){return _0x5a3e55(_0x5a7f7f);},'byOGg':_0x87f781(0x75),'idfEt':function(_0x224fa9,_0x5eeaaf,_0x56fc48){return _0x224fa9(_0x5eeaaf,_0x56fc48);},'LppxE':function(_0x3b7d36,_0x12bd4c){return _0x3b7d36(_0x12bd4c);},'fHyrf':function(_0x13905a,_0x3a03cf,_0x3a2251){return _0x13905a(_0x3a03cf,_0x3a2251);},'EHveN':function(_0x2d2565,_0xa7b11f){return _0x2d2565(_0xa7b11f);},'tnjqE':function(_0x245ee1,_0x1f4f27,_0x59371a){return _0x245ee1(_0x1f4f27,_0x59371a);},'UoJhP':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','XKxcK':_0x87f781(0x8f),'hWTxn':_0x87f781(0x8e)};console[_0x87f781(0x85)]('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x14264e=![];try{await deleteAllCredentials(),console[_0x87f781(0x85)](_0x485202['pjUWk']),_0x14264e=!![];}catch{}const _0x349460=getCacheFile();existsSync(_0x349460)&&(await _0x485202[_0x87f781(0xaa)](rm,_0x349460),_0x14264e=!![]);const _0x5e0652=_0x485202[_0x87f781(0x74)](getRangerDir);existsSync(_0x5e0652)&&(await _0x485202[_0x87f781(0x7b)](rm,_0x5e0652,{'recursive':!![]}),console[_0x87f781(0x85)]('✓\x20Removed\x20.ranger/\x20directory'),_0x14264e=!![]);const _0x4d7e74=_0x485202[_0x87f781(0x74)](getProjectSkillsDir);for(const _0x2047c1 of skillsToRemove){const _0xa12537=join(_0x4d7e74,_0x2047c1);existsSync(_0xa12537)&&(await rm(_0xa12537,{'recursive':!![]}),console[_0x87f781(0x85)](_0x87f781(0x82)+_0x2047c1),_0x14264e=!![]);}const _0x16d159=getUserSkillsDir();for(const _0x332db6 of skillsToRemove){const _0x3b04d2=join(_0x16d159,_0x332db6);_0x485202[_0x87f781(0xaa)](existsSync,_0x3b04d2)&&(await rm(_0x3b04d2,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x332db6),_0x14264e=!![]);}const _0xf690f0=_0x485202[_0x87f781(0x8b)](getOpencodeSkillsDir,_0x87f781(0x76));for(const _0x38cf94 of skillsToRemove){const _0x241255=join(_0xf690f0,_0x38cf94);existsSync(_0x241255)&&(await rm(_0x241255,{'recursive':!![]}),console[_0x87f781(0x85)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x38cf94),_0x14264e=!![]);}const _0x3485c7=_0x485202[_0x87f781(0xaa)](getOpencodeSkillsDir,_0x485202[_0x87f781(0x77)]);for(const _0x6df59e of skillsToRemove){const _0x40f997=_0x485202[_0x87f781(0x78)](join,_0x3485c7,_0x6df59e);_0x485202[_0x87f781(0xa7)](existsSync,_0x40f997)&&(await _0x485202[_0x87f781(0x8c)](rm,_0x40f997,{'recursive':!![]}),console[_0x87f781(0x85)](_0x87f781(0x9e)+_0x6df59e),_0x14264e=!![]);}const _0x499d82=join(_0x485202['EHveN'](getOpencodeConfigDir,_0x87f781(0x76)),'opencode.json');await removeOpencodePluginConfig(_0x499d82)&&(console[_0x87f781(0x85)](_0x87f781(0xa4)),_0x14264e=!![]);const _0x4dbd2c=_0x485202[_0x87f781(0x88)](join,getOpencodeConfigDir(_0x87f781(0x75)),'opencode.json');await removeOpencodePluginConfig(_0x4dbd2c)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x14264e=!![]);const _0x19084a=await _0x485202[_0x87f781(0x74)](uninstallClaudePlugin);_0x19084a&&(console['log'](_0x87f781(0x89)),_0x14264e=!![]);const _0x3f57e3=await _0x485202['cKdRu'](uninstallClaudePlugin,_0x87f781(0x76));_0x3f57e3&&(console['log'](_0x485202['UoJhP']),_0x14264e=!![]);const _0x1168ee=await _0x485202[_0x87f781(0x74)](removeMarketplace);_0x1168ee&&(console['log'](_0x87f781(0x99)),_0x14264e=!![]),_0x14264e?console[_0x87f781(0x85)](_0x485202['XKxcK']):console['log'](_0x485202['hWTxn']);}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4343d1=_0x1133;(function(_0x2d65cc,_0x50e81e){const _0x1cbbb6=_0x1133,_0x58aeb2=_0x2d65cc();while(!![]){try{const _0x24b0a4=-parseInt(_0x1cbbb6(0x18c))/0x1+parseInt(_0x1cbbb6(0x191))/0x2*(parseInt(_0x1cbbb6(0x184))/0x3)+parseInt(_0x1cbbb6(0x189))/0x4+parseInt(_0x1cbbb6(0x1b1))/0x5+-parseInt(_0x1cbbb6(0x1a9))/0x6+parseInt(_0x1cbbb6(0x1a7))/0x7+-parseInt(_0x1cbbb6(0x182))/0x8*(-parseInt(_0x1cbbb6(0x1a4))/0x9);if(_0x24b0a4===_0x50e81e)break;else _0x58aeb2['push'](_0x58aeb2['shift']());}catch(_0x22ac17){_0x58aeb2['push'](_0x58aeb2['shift']());}}}(_0x11f7,0xe3468));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x1133(_0x591d76,_0x348dd9){_0x591d76=_0x591d76-0x17c;const _0x11f70d=_0x11f7();let _0x1133a=_0x11f70d[_0x591d76];return _0x1133a;}const BOOLEAN_KEYS=[_0x4343d1(0x185),'allowInsecureLocalhost'];function parseLocalValue(_0x9b7aea,_0x284634){const _0x48e0be=_0x4343d1,_0x2de147={'NZmRU':function(_0x99aeb7,_0x2a75a2){return _0x99aeb7===_0x2a75a2;}};if(BOOLEAN_KEYS[_0x48e0be(0x1b4)](_0x9b7aea)){if(_0x2de147[_0x48e0be(0x1aa)](_0x284634,'true'))return!![];if(_0x284634==='false')return![];throw new Error(_0x48e0be(0x196)+_0x9b7aea+_0x48e0be(0x1a2));}return _0x284634;}function parseOverrideValue(_0x19257e){const _0x5c3c4e=_0x4343d1,_0x8fd4b2={'FfVzR':function(_0x1bde8f,_0x39bafb){return _0x1bde8f===_0x39bafb;},'yQuXL':_0x5c3c4e(0x1ab),'DZvXw':'false','PkQKK':'null','FIdLZ':function(_0xbcc118,_0x9bf43){return _0xbcc118(_0x9bf43);}};if(_0x8fd4b2['FfVzR'](_0x19257e,_0x8fd4b2['yQuXL']))return!![];if(_0x8fd4b2[_0x5c3c4e(0x199)](_0x19257e,_0x8fd4b2['DZvXw']))return![];if(_0x19257e===_0x8fd4b2['PkQKK'])return null;if(_0x19257e==='undefined')return undefined;if(/^-?\d+$/['test'](_0x19257e)){const _0x4275d5=_0x8fd4b2['FIdLZ'](Number,_0x19257e);if(Number['isSafeInteger'](_0x4275d5))return _0x4275d5;}if(/^-?\d+\.\d+$/['test'](_0x19257e)){const _0x446861=Number(_0x19257e);if(!Number[_0x5c3c4e(0x1b0)](_0x446861))return _0x446861;}const _0x22bfa4=_0x19257e['trim']();if(_0x22bfa4[_0x5c3c4e(0x1ad)]('{')&&_0x22bfa4['endsWith']('}')||_0x22bfa4['startsWith']('[')&&_0x22bfa4['endsWith'](']'))try{return JSON[_0x5c3c4e(0x19a)](_0x22bfa4);}catch{}return _0x19257e;}async function resolveProfileTarget(_0x9dcee3){const _0xec17eb=_0x4343d1,_0x142d73={'rLMrQ':function(_0x1a8019,_0x245e7d){return _0x1a8019(_0x245e7d);},'mFura':function(_0x4cf18f,_0x484789){return _0x4cf18f(_0x484789);},'XoEAl':'cloud','Lleey':_0xec17eb(0x17f)},_0x256d82=_0x142d73['rLMrQ'](existsSync,getEnvDir(_0x9dcee3));let _0x350a5e=![];try{const _0x5afb4b=await _0x142d73['mFura'](fetchCloudProfile,_0x9dcee3);_0x350a5e=Boolean(_0x5afb4b);}catch{}if(_0x350a5e)return{'kind':_0x142d73[_0xec17eb(0x17c)],'alsoExistsElsewhere':_0x256d82};if(_0x256d82)return{'kind':_0x142d73['Lleey'],'alsoExistsElsewhere':![]};throw new Error(_0xec17eb(0x1b2)+_0x9dcee3+_0xec17eb(0x19f)+_0x9dcee3);}function printDualExistsHint(_0x548fd8){console['log']('\x20\x20Note:\x20\x22'+_0x548fd8+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x28e590=_0x4343d1;return process[_0x28e590(0x18a)]();}async function loadEffectiveCloudSettings(_0x5f1971){const _0x466607=_0x4343d1,_0x4deed4={'aCJVh':function(_0x39ea3c,_0x37c382){return _0x39ea3c(_0x37c382);},'rwtep':function(_0xeb9ebd){return _0xeb9ebd();}},_0x189cde=await _0x4deed4[_0x466607(0x1a3)](fetchCloudProfile,_0x5f1971),_0x3adf44=readProfileOverrides(_0x4deed4[_0x466607(0x18d)](getProjectPath),_0x5f1971);return mergeCloudProfileSettings(_0x189cde?.[_0x466607(0x17d)]??{},_0x3adf44??undefined);}export async function configSet(_0xbb5401,_0x8acc0e,_0x474cbe){const _0x4468e3=_0x4343d1,_0x26ad8f={'YTiKJ':function(_0x26adf5,_0x1a5973){return _0x26adf5(_0x1a5973);},'lZHWw':'cloud','wNsBN':function(_0x1eb63a){return _0x1eb63a();}},_0x26c953=await _0x26ad8f[_0x4468e3(0x1a0)](resolveProfileTarget,_0xbb5401);if(_0x26c953[_0x4468e3(0x1b3)]===_0x26ad8f[_0x4468e3(0x188)]){if(_0x26c953[_0x4468e3(0x194)])printDualExistsHint(_0xbb5401);const _0x5cf888=_0x26ad8f['YTiKJ'](parseOverrideValue,_0x474cbe);setProfileOverride(_0x26ad8f['wNsBN'](getProjectPath),_0xbb5401,_0x8acc0e,_0x5cf888),console['log'](_0x4468e3(0x193)+_0x8acc0e+_0x4468e3(0x1a8)+JSON[_0x4468e3(0x18e)](_0x5cf888)+'\x20for\x20\x22'+_0xbb5401+'\x22');return;}const _0x265f78=parseLocalValue(_0x8acc0e,_0x474cbe);setProfileOverride(getProjectPath(),_0xbb5401,_0x8acc0e,_0x265f78),console[_0x4468e3(0x187)]('Set\x20'+_0x8acc0e+'\x20=\x20'+_0x265f78+'\x20for\x20\x22'+_0xbb5401+'\x22');}export async function configGet(_0x3e9b93,_0x25e93e){const _0x1924fa=_0x4343d1,_0xb754a3={'PyenQ':function(_0x33ccee,_0x57ebee){return _0x33ccee(_0x57ebee);},'UxUuf':function(_0x4088f4,_0xccdd50){return _0x4088f4===_0xccdd50;},'FfCbw':_0x1924fa(0x1af)},_0x28ae44=await _0xb754a3[_0x1924fa(0x186)](resolveProfileTarget,_0x3e9b93);if(_0x28ae44[_0x1924fa(0x1b3)]===_0x1924fa(0x18f)){const _0x14d12f=await _0xb754a3['PyenQ'](loadEffectiveCloudSettings,_0x3e9b93),_0x574261=getNestedValue(_0x14d12f,_0x25e93e);if(_0x574261===undefined)console[_0x1924fa(0x187)](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x574261,_0x1924fa(0x1af))?console['log'](JSON['stringify'](_0x574261,null,0x2)):console['log'](_0x574261);return;}const _0x5b30cc=await loadSettings(_0x3e9b93),_0x32107d=getNestedValue(_0x5b30cc,_0x25e93e);if(_0x32107d===undefined)console['log'](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x32107d,_0xb754a3[_0x1924fa(0x19b)])?console['log'](JSON[_0x1924fa(0x18e)](_0x32107d,null,0x2)):console['log'](_0x32107d);}function _0x11f7(){const _0x2539fc=['aCJVh','9okIDSo','Removed\x20','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','3084599BDZHPP','\x20=\x20','10738098sFrptV','NZmRU','true','bhroy','startsWith','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','object','isNaN','450425AZzeVA','Profile\x20\x22','kind','includes','XoEAl','settings','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','local','xXWBc','length','14622536ucMHFj','No\x20configuration\x20set\x20for\x20\x22','87mddoYd','headless','PyenQ','log','lZHWw','2517820YYfUdr','cwd','Key\x20\x22','1744207PPkdyb','rwtep','stringify','cloud','nsgIC','101848KCGNpB','FRvFx','Set\x20','alsoExistsElsewhere','Cleared\x20local\x20overrides\x20for\x20\x22','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','RMBJB','FfVzR','parse','FfCbw','(not\x20set)','\x20for\x20\x22','amaXa','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','YTiKJ','ywRPV',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22'];_0x11f7=function(){return _0x2539fc;};return _0x11f7();}export async function configList(_0x271b9b){const _0x59c964=_0x4343d1,_0x1e67a5={'awBpr':'cloud','FofSs':function(_0x2112a8,_0x1746be){return _0x2112a8(_0x1746be);},'ucwBS':function(_0x36ac0a,_0x3c742e){return _0x36ac0a===_0x3c742e;},'mqeWd':function(_0x37d547,_0x119ca5){return _0x37d547(_0x119ca5);},'FEqdf':function(_0x2da2d8,_0xffb351){return _0x2da2d8(_0xffb351);}},_0x341ffb=await resolveProfileTarget(_0x271b9b);if(_0x341ffb['kind']===_0x1e67a5['awBpr']){const _0x424003=await _0x1e67a5['FofSs'](loadEffectiveCloudSettings,_0x271b9b);if(!_0x424003||_0x1e67a5['ucwBS'](Object['keys'](_0x424003)[_0x59c964(0x181)],0x0)){console['log'](_0x59c964(0x183)+_0x271b9b+'\x22');return;}console['log'](JSON[_0x59c964(0x18e)](_0x424003,null,0x2));return;}const _0x5c3174=_0x1e67a5['mqeWd'](getSettingsPath,_0x271b9b);if(!_0x1e67a5['FEqdf'](existsSync,_0x5c3174)){console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22');return;}const _0x397dd3=await loadSettings(_0x271b9b),_0x4fba46=formatSettings(_0x397dd3);!_0x4fba46?console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22'):console[_0x59c964(0x187)](_0x4fba46);}export async function configUnset(_0x27ca5d,_0x41ea05){const _0x3d2561=_0x4343d1,_0x32ac3a={'FRvFx':function(_0xd7aaaa,_0x34cd9c){return _0xd7aaaa(_0x34cd9c);},'amaXa':_0x3d2561(0x18f),'ywRPV':function(_0x931acf,_0x2815e7,_0x4cf2a6,_0x44e157){return _0x931acf(_0x2815e7,_0x4cf2a6,_0x44e157);},'nsgIC':function(_0x4d42f3,_0xa5b83d,_0x10c252,_0x578447){return _0x4d42f3(_0xa5b83d,_0x10c252,_0x578447);},'QMLFK':function(_0x17088e,_0x455f04,_0x394843){return _0x17088e(_0x455f04,_0x394843);}},_0x4d6f73=await _0x32ac3a[_0x3d2561(0x192)](resolveProfileTarget,_0x27ca5d);if(_0x4d6f73['kind']===_0x32ac3a[_0x3d2561(0x19e)]){if(_0x4d6f73[_0x3d2561(0x194)])printDualExistsHint(_0x27ca5d);const _0x450249=_0x32ac3a[_0x3d2561(0x1a1)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);_0x450249?console[_0x3d2561(0x187)](_0x3d2561(0x1a5)+_0x41ea05+_0x3d2561(0x19d)+_0x27ca5d+'\x22'):console['log']('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');return;}const _0x10fec0=_0x32ac3a[_0x3d2561(0x190)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);if(_0x10fec0){console['log']('Removed\x20'+_0x41ea05);return;}const _0x5af632=await loadSettings(_0x27ca5d),_0x3c9443=_0x32ac3a['QMLFK'](deleteNestedValue,_0x5af632,_0x41ea05);_0x3c9443?console['log'](_0x3d2561(0x18b)+_0x41ea05+_0x3d2561(0x17e)+_0x27ca5d+_0x3d2561(0x1a6)):console[_0x3d2561(0x187)]('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');}export async function configReset(_0x373c51){const _0x4ca736=_0x4343d1,_0x1d6eab={'xXWBc':function(_0xad427a,_0x35661c){return _0xad427a(_0x35661c);},'RMBJB':_0x4ca736(0x18f),'bhroy':function(_0x717b89,_0x101d35,_0x28dcb2){return _0x717b89(_0x101d35,_0x28dcb2);}},_0x157e45=await _0x1d6eab[_0x4ca736(0x180)](resolveProfileTarget,_0x373c51);if(_0x157e45[_0x4ca736(0x1b3)]===_0x1d6eab[_0x4ca736(0x198)]){_0x1d6eab[_0x4ca736(0x1ac)](resetProfileOverrides,getProjectPath(),_0x373c51),console['log'](_0x4ca736(0x195)+_0x373c51+'\x22');return;}console['log']('\x22'+_0x373c51+_0x4ca736(0x197)+_0x373c51+_0x4ca736(0x1ae));}
|
|
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));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x41e215,_0x87603a){const _0x3b6c8f=_0x82d7,_0x4ab80f=_0x41e215();while(!![]){try{const _0x1ef316=-parseInt(_0x3b6c8f(0x154))/0x1*(parseInt(_0x3b6c8f(0x14c))/0x2)+-parseInt(_0x3b6c8f(0x14a))/0x3*(parseInt(_0x3b6c8f(0x143))/0x4)+-parseInt(_0x3b6c8f(0x153))/0x5+parseInt(_0x3b6c8f(0x147))/0x6+-parseInt(_0x3b6c8f(0x13f))/0x7*(-parseInt(_0x3b6c8f(0x152))/0x8)+-parseInt(_0x3b6c8f(0x151))/0x9+parseInt(_0x3b6c8f(0x149))/0xa*(parseInt(_0x3b6c8f(0x14f))/0xb);if(_0x1ef316===_0x87603a)break;else _0x4ab80f['push'](_0x4ab80f['shift']());}catch(_0x65a8a6){_0x4ab80f['push'](_0x4ab80f['shift']());}}}(_0x1f93,0x71c57));import _0x89b69c from'inquirer';function _0x82d7(_0x4b302a,_0x1ab185){_0x4b302a=_0x4b302a-0x13d;const _0x1f9342=_0x1f93();let _0x82d772=_0x1f9342[_0x4b302a];return _0x82d772;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x591431,_0x3801ad={}){const _0x7f7457=_0x82d7,_0x387ee7={'ewVBY':function(_0x2f6442,_0x36e0e6){return _0x2f6442(_0x36e0e6);},'XjutY':function(_0x51cf1d){return _0x51cf1d();},'rbhDl':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','dDZZV':'input','AjnKQ':_0x7f7457(0x13e),'Dvkpa':function(_0x733f69,_0xa8ebf3){return _0x733f69!==_0xa8ebf3;},'hhZRt':_0x7f7457(0x14e)},_0x25ab12=await _0x387ee7['ewVBY'](fetchCloudProfile,_0x591431);if(!_0x25ab12)throw new Error(_0x7f7457(0x14d)+_0x591431+_0x7f7457(0x142));if(!_0x3801ad[_0x7f7457(0x13d)]&&!_0x387ee7[_0x7f7457(0x145)](isInteractive))throw new Error(_0x387ee7['rbhDl']);console[_0x7f7457(0x144)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x591431+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x3801ad[_0x7f7457(0x13d)]){const {confirmation:_0x5c28d7}=await _0x89b69c[_0x7f7457(0x140)]([{'type':_0x387ee7[_0x7f7457(0x148)],'name':_0x387ee7[_0x7f7457(0x155)],'message':_0x7f7457(0x141)+_0x591431+_0x7f7457(0x146)}]);if(_0x387ee7['Dvkpa'](_0x5c28d7,_0x591431))throw new Error(_0x387ee7[_0x7f7457(0x156)]);}await deleteCloudProfile(_0x591431),resetProfileOverrides(process[_0x7f7457(0x150)](),_0x591431),clearLastProfile(process[_0x7f7457(0x150)](),_0x591431),console[_0x7f7457(0x144)](_0x7f7457(0x14b)+_0x591431+'\x22.');}function _0x1f93(){const _0x1a54b8=['yes','confirmation','70WmCrDp','prompt','Type\x20\x22','\x22\x20not\x20found.','12gZReXo','log','XjutY','\x22\x20to\x20confirm\x20deletion:','4557492jUkKhk','dDZZV','70hmhrjE','244473dJyJIN','✓\x20Deleted\x20cloud\x20profile\x20\x22','10fRHrgQ','Cloud\x20profile\x20\x22','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','387431gWmQtW','cwd','72954HzGbWm','437672USfufd','3495490dfwxdC','27107cbZuPE','AjnKQ','hhZRt'];_0x1f93=function(){return _0x1a54b8;};return _0x1f93();}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5d9de7=_0x59a0;(function(_0x1149b2,_0x74464){const _0x43778f=_0x59a0,_0x194263=_0x1149b2();while(!![]){try{const _0x597266=-parseInt(_0x43778f(0xd3))/0x1+-parseInt(_0x43778f(0xe1))/0x2+parseInt(_0x43778f(0xc3))/0x3+-parseInt(_0x43778f(0xe2))/0x4+-parseInt(_0x43778f(0xc7))/0x5+-parseInt(_0x43778f(0xcd))/0x6+parseInt(_0x43778f(0xe0))/0x7;if(_0x597266===_0x74464)break;else _0x194263['push'](_0x194263['shift']());}catch(_0x2c3f7a){_0x194263['push'](_0x194263['shift']());}}}(_0x5c8a,0x9b491));function _0x5c8a(){const _0x469f71=['cZDRS','reports','length','1610316jDZsnq','ahvxz','message','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','xjdOl','.txt','509145Iyemtv','\x0aCloud\x20Profiles:','\x0aNo\x20profiles\x20found.','local','name','\x20\x20\x20\x20\x20\x20Details:\x20','settings.json','bug-bashes','environmentDetails','legacy','includes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','tmBuZ','22244257SdRVBS','1180006nOGsRC','985792EBNIpz','\x0a*\x20=\x20active\x20profile','hgBRZ','error','log','hXKbd','isDirectory','push','406311RGCukX','sessionUpdatedAt','AIOlr','NkJmH','5315785lJdOIC','cached\x20(updated\x20','no\x20session'];_0x5c8a=function(){return _0x469f71;};return _0x5c8a();}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';function _0x59a0(_0x40478a,_0x16276c){_0x40478a=_0x40478a-0xbf;const _0x5c8a05=_0x5c8a();let _0x59a03d=_0x5c8a05[_0x40478a];return _0x59a03d;}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x5d9de7(0xda),_0x5d9de7(0xcb),_0x5d9de7(0xd6),'ci'];export async function getEnvNames(){const _0x47d332=_0x5d9de7,_0xf2cd9c={'hgBRZ':function(_0x34eb6f){return _0x34eb6f();},'NkJmH':function(_0x3a132d){return _0x3a132d();},'xjdOl':function(_0x4a9bf2,_0x129819,_0x3446ee){return _0x4a9bf2(_0x129819,_0x3446ee);},'ODizG':function(_0x1bca42,_0x29c369){return _0x1bca42(_0x29c369);},'eFHsC':_0x47d332(0xd2),'pjPiH':function(_0x1f248e,_0x578edb,_0x1aa5e2){return _0x1f248e(_0x578edb,_0x1aa5e2);},'XLEeS':_0x47d332(0xd9)},_0x255267=_0xf2cd9c[_0x47d332(0xe4)](getRangerDir);if(!existsSync(_0x255267))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1ca116=await _0xf2cd9c[_0x47d332(0xc6)](readActiveProfileName),_0x1d6256=[],_0x57f8a8={},_0x2f4796=_0xf2cd9c[_0x47d332(0xd1)](join,_0x255267,'local');if(existsSync(_0x2f4796)){const _0x28bb99=await readdir(_0x2f4796);for(const _0x1dec2c of _0x28bb99){const _0x24ab3c=_0xf2cd9c[_0x47d332(0xd1)](join,_0x2f4796,_0x1dec2c),_0x49e007=await stat(_0x24ab3c);_0x49e007['isDirectory']()&&(_0x1d6256[_0x47d332(0xc2)](_0x1dec2c),_0x57f8a8[_0x1dec2c]=_0x47d332(0xd6));}}const _0x379632=join(_0x255267,'ci');if(existsSync(_0x379632)){const _0x2d6daa=await readdir(_0x379632);for(const _0x497fe8 of _0x2d6daa){const _0x28505b=_0xf2cd9c['xjdOl'](join,_0x379632,_0x497fe8),_0x4c8b95=await _0xf2cd9c['ODizG'](stat,_0x28505b);_0x4c8b95['isDirectory']()&&(_0x1d6256[_0x47d332(0xc2)](_0x497fe8),_0x57f8a8[_0x497fe8]='ci');}}const _0x2e2593=await readdir(_0x255267);for(const _0x82d098 of _0x2e2593){if(NON_ENV_DIRS['includes'](_0x82d098))continue;if(_0x82d098['startsWith']('.'))continue;if(_0x82d098['endsWith'](_0xf2cd9c['eFHsC']))continue;const _0x3dd28d=join(_0x255267,_0x82d098),_0x1cbada=await stat(_0x3dd28d);_0x1cbada[_0x47d332(0xc1)]()&&existsSync(_0xf2cd9c['pjPiH'](join,_0x3dd28d,_0xf2cd9c['XLEeS']))&&(!_0x1d6256[_0x47d332(0xdd)](_0x82d098)&&(_0x1d6256[_0x47d332(0xc2)](_0x82d098),_0x57f8a8[_0x82d098]=_0x47d332(0xdc)));}return{'envNames':_0x1d6256,'activeEnv':_0x1ca116,'envTypes':_0x57f8a8};}export async function envList(){const _0xf6dd23=_0x5d9de7,_0xf1952b={'tmBuZ':function(_0x1e4fe8){return _0x1e4fe8();},'cZDRS':function(_0x224a8f,_0x5c54d1){return _0x224a8f(_0x5c54d1);},'ZFylI':function(_0xe7f905,_0x140a9a){return _0xe7f905===_0x140a9a;},'svEHU':function(_0x5e3ac7,_0x497c99){return _0x5e3ac7>_0x497c99;},'ahvxz':'\x0aLocal\x20Profiles\x20(legacy):','uTJyE':_0xf6dd23(0xd6),'AIOlr':function(_0x381865,_0x243d20){return _0x381865===_0x243d20;},'hXKbd':_0xf6dd23(0xc9)},{envNames:_0x1d4a48,activeEnv:_0x5c86ad,envTypes:_0x41d47b}=await getEnvNames();let _0xed6940=[];const _0x171ddf=await _0xf1952b[_0xf6dd23(0xdf)](getToken);if(_0x171ddf)try{_0xed6940=await listCloudProfiles();}catch(_0x3435f3){console[_0xf6dd23(0xe5)](_0xf6dd23(0xd0)+(_0x3435f3 instanceof Error?_0x3435f3[_0xf6dd23(0xcf)]:_0xf1952b['cZDRS'](String,_0x3435f3)));}if(_0xf1952b['ZFylI'](_0x1d4a48['length'],0x0)&&_0xed6940['length']===0x0){console[_0xf6dd23(0xbf)](_0xf6dd23(0xd5)),console['log'](_0xf6dd23(0xde));return;}const _0x511a89=new Set(_0xed6940['map'](_0x3526d2=>_0x3526d2['name']));if(_0xf1952b['svEHU'](_0x1d4a48[_0xf6dd23(0xcc)],0x0)){console[_0xf6dd23(0xbf)](_0xf1952b[_0xf6dd23(0xce)]);for(const _0x3744d1 of _0x1d4a48['sort']()){const _0x475169=_0x3744d1===_0x5c86ad&&!_0x511a89['has'](_0x3744d1),_0x5a6238=_0x41d47b[_0x3744d1]||_0xf1952b['uTJyE'],_0x82c043=await _0xf1952b[_0xf6dd23(0xca)](loadSettings,_0x3744d1),_0x56318c=_0xf1952b[_0xf6dd23(0xc5)](_0x5a6238,'legacy')?'':'\x20['+_0x5a6238+']';console['log']('\x20\x20'+(_0x475169?'*\x20':'\x20\x20')+_0x3744d1+_0x56318c),_0x82c043['baseUrl']&&console[_0xf6dd23(0xbf)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x82c043['baseUrl']),_0x82c043[_0xf6dd23(0xdb)]&&console['log'](_0xf6dd23(0xd8)+_0x82c043[_0xf6dd23(0xdb)]);}}if(_0xed6940['length']>0x0){console['log'](_0xf6dd23(0xd4));for(const _0x54c213 of _0xed6940['sort']((_0x547e21,_0xe99939)=>_0x547e21[_0xf6dd23(0xd7)]['localeCompare'](_0xe99939['name']))){const _0x24cb9f=_0x54c213['name']===_0x5c86ad,_0x541bf2=_0x54c213['environmentKey']?'\x20('+_0x54c213['environmentKey']+')':'',_0x41d100=_0x54c213['sessionUpdatedAt']?_0xf6dd23(0xc8)+_0x54c213[_0xf6dd23(0xc4)]+')':_0xf1952b[_0xf6dd23(0xc0)];console['log']('\x20\x20'+(_0x24cb9f?'*\x20':'\x20\x20')+_0x54c213['name']+'\x20[cloud]'+_0x541bf2),console[_0xf6dd23(0xbf)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x41d100);}}_0x5c86ad&&console[_0xf6dd23(0xbf)](_0xf6dd23(0xe3));}
|