@ranger-testing/ranger-cli 3.1.5-alpha.aebd071-49 → 3.1.6-alpha.4287155-52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +2 -2
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x925980=_0x4620;(function(_0x52ce31,_0x1e1233){const _0x4617ff=_0x4620,_0xf61f4b=_0x52ce31();while(!![]){try{const _0x1d52f5=-parseInt(_0x4617ff(0xd7))/0x1*(-parseInt(_0x4617ff(0x8b))/0x2)+-parseInt(_0x4617ff(0xce))/0x3*(parseInt(_0x4617ff(0xec))/0x4)+-parseInt(_0x4617ff(0xe3))/0x5*(parseInt(_0x4617ff(0xd1))/0x6)+-parseInt(_0x4617ff(0xc0))/0x7+-parseInt(_0x4617ff(0x70))/0x8*(parseInt(_0x4617ff(0x97))/0x9)+-parseInt(_0x4617ff(0xc1))/0xa*(-parseInt(_0x4617ff(0xba))/0xb)+-parseInt(_0x4617ff(0xca))/0xc*(-parseInt(_0x4617ff(0x8d))/0xd);if(_0x1d52f5===_0x1e1233)break;else _0xf61f4b['push'](_0xf61f4b['shift']());}catch(_0x1db815){_0xf61f4b['push'](_0xf61f4b['shift']());}}}(_0x34d1,0xa86c3));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x27d670 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 _0x4620(_0x5c582a,_0x43e7ee){_0x5c582a=_0x5c582a-0x65;const _0x34d1cb=_0x34d1();let _0x46204a=_0x34d1cb[_0x5c582a];return _0x46204a;}const CLOUD_PROFILE_SHARING_WARNING=_0x925980(0xc8);function warnCloudProfileSharedInOrg(){const _0x477e50=_0x925980;if(!process[_0x477e50(0xe0)][_0x477e50(0xf2)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x4be855){const _0x27ca3f=_0x925980,_0x403b0b={'dhzPJ':'manual','kiFUo':function(_0x4ef9ed,_0x1b0439){return _0x4ef9ed(_0x1b0439);},'WlOya':'Invalid\x20URL','hJKyT':'TypeError','hRSDl':'fetch\x20failed'};try{const _0x4fe158=new AbortController(),_0x5a0e3a=setTimeout(()=>_0x4fe158[_0x27ca3f(0x89)](),0x1388),_0x164902={'method':_0x27ca3f(0xb2),'signal':_0x4fe158[_0x27ca3f(0x84)],'redirect':_0x403b0b[_0x27ca3f(0xc4)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x4be855)&&(process[_0x27ca3f(0xeb)][_0x27ca3f(0xde)]='0');const _0x167487=await fetch(_0x4be855,_0x164902);delete process[_0x27ca3f(0xeb)][_0x27ca3f(0xde)],_0x403b0b['kiFUo'](clearTimeout,_0x5a0e3a);if(_0x167487[_0x27ca3f(0xa8)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x27ca3f(0xe6)+_0x167487['status']};}catch(_0x2f8935){delete process[_0x27ca3f(0xeb)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x2e603d=_0x2f8935,_0x155c76=_0x2e603d[_0x27ca3f(0xcb)]||String(_0x2f8935),_0x2e02a4=_0x155c76[_0x27ca3f(0x77)](_0x403b0b['WlOya'])||_0x2e603d['name']===_0x403b0b[_0x27ca3f(0xa5)]||_0x155c76['includes'](_0x403b0b['hRSDl']);return{'ok':![],'error':_0x155c76,'isProtocolError':_0x2e02a4};}}function _0x34d1(){const _0x23b09c=['ouAjv','uLIwp','15147nmOQIm','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YLpyh','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','test','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6439461yYoecZ','7440OqWGAT','\x27\x20to\x20the\x20cloud?','KLhhX','dhzPJ','\x20--skip-auth\x0a','mFyaS','tEOUh','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','cdpEndpoint','12lEOysc','message','\x27\x20created\x20(no\x20session).\x0a','AJZTv','3KsUxAY','✓\x20Profile\x20\x27','QhEDY','7638594AkVTdB','wdIyQ','prompt','⚠\x20Could\x20not\x20reach\x20','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','✓\x20Cloud\x20profile\x20\x27','340741lzTYmn','skipAuth','Continue\x20anyway','AZapQ','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','input','NRONC','NODE_TLS_REJECT_UNAUTHORIZED','xXOKK','stdout','XDNUs','\x20\x20Set\x20active\x20profile:\x20','5wLSGkV','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','HTTP\x20','http://','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','exit','qBqys','env','4855740bjuGzw','RqLNH','log','domains','wyBxX','http://localhost:3000','isTTY','Invalid\x20--setup-header\x20format:\x20\x22','Knjxw','join','What\x20would\x20you\x20like\x20to\x20do?','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','slice','KmKLH','mCowR','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','authEnv','IzxXa','use_suggestion','62632lsMEyt','profile.add.autoRouteSkipped','ODoLX','\x20(continuing\x20with\x20--force)','setupHeaders','muMox','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','includes','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','gXgkm','\x0a\x20\x20A\x20profile\x20named\x20\x22','setupHeader','\x20\x20Did\x20you\x20mean\x20','pdWrB','env_not_found','aIKja','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','environments','action','kpRrH','signal','list','yes','origin','\x27\x20created\x20(CDP).','abort','local','4tiPrJv','LtQPH','45635109KmPlle','user_declined','csGCj','no_auth_config','error','`\x20again\x20without\x20--skip-auth.','qRHuH','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','BKawg','hCsDg','1287ueIkwV','Enter\x20a\x20different\x20URL','indexOf','Byfck','no_match','\x0a\x20\x20Auth\x20environment\x20\x22','Rdsfv','trim','trackPhaseEnd','CVRNO','\x0a🌐\x20Profile\x20Setup\x0a','wUJcu','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','cVrFs','hJKyT','iVblA','url','status','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','keys','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','ZHQMa','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','length','HEAD','YLpfx','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','jmwKX','baseUrl','isElectron'];_0x34d1=function(){return _0x23b09c;};return _0x34d1();}async function sweepOrphanLocalProfile(_0x4be62f,_0xf31246,_0x4fe116){const _0x512885=_0x925980,_0x4d6ef0={'ODoLX':function(_0x33f124,_0x2eb0de,_0x61ac89){return _0x33f124(_0x2eb0de,_0x61ac89);},'IzxXa':function(_0x49eb8e,_0x52475d,_0x39be37){return _0x49eb8e(_0x52475d,_0x39be37);},'LtQPH':function(_0x12c834,_0x4e24ee){return _0x12c834(_0x4e24ee);},'MCKeD':function(_0x363bdb,_0x4c8862,_0x367655){return _0x363bdb(_0x4c8862,_0x367655);},'qBqys':function(_0x3ef484,_0x46fd7a,_0x1f10d1){return _0x3ef484(_0x46fd7a,_0x1f10d1);}},_0x2862fb=_0x4d6ef0[_0x512885(0x72)](join,_0xf31246,_0x512885(0x8a)),_0x852fb9=_0x4d6ef0[_0x512885(0x6e)](join,_0x2862fb,_0x4be62f);_0x4d6ef0[_0x512885(0x8c)](existsSync,_0x852fb9)&&(_0x4fe116&&await _0x4d6ef0[_0x512885(0x8c)](isPathGitTracked,_0x852fb9)?console[_0x512885(0xee)](_0x512885(0xa3)+_0x852fb9+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x4d6ef0['MCKeD'](rm,_0x852fb9,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x852fb9)));if(existsSync(_0x2862fb)){let _0x45367f=[];try{_0x45367f=await _0x4d6ef0['LtQPH'](readdir,_0x2862fb);}catch{return;}const _0x48f459='.tmp-'+_0x4be62f+'-';for(const _0x1df3a5 of _0x45367f){if(!_0x1df3a5['startsWith'](_0x48f459))continue;const _0x32fa57=_0x4d6ef0[_0x512885(0xea)](join,_0x2862fb,_0x1df3a5);await rm(_0x32fa57,{'recursive':!![],'force':!![]}),console[_0x512885(0xee)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x32fa57);}}}async function sweepOrphansBestEffort(_0x4c3a13){const _0x24bdcb=_0x925980,_0x47ef57={'Hdxgk':function(_0x2970a0,_0x3f3a2d,_0x4cd2ac,_0x5ee8df){return _0x2970a0(_0x3f3a2d,_0x4cd2ac,_0x5ee8df);},'Wdnuq':function(_0x1fb875){return _0x1fb875();},'IQrlZ':function(_0x6dc908,_0x54345e){return _0x6dc908 instanceof _0x54345e;}};try{await _0x47ef57['Hdxgk'](sweepOrphanLocalProfile,_0x4c3a13,_0x47ef57['Wdnuq'](getRangerHomeDir),![]);const _0x330dfb=getRangerDir();_0x330dfb!==_0x47ef57['Wdnuq'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x4c3a13,_0x330dfb,!![]);}catch(_0x37bfdc){console['log'](_0x24bdcb(0xe5)+(_0x47ef57['IQrlZ'](_0x37bfdc,Error)?_0x37bfdc[_0x24bdcb(0xcb)]:String(_0x37bfdc))+').');}}async function markActive(_0x40bdb6){const _0x50a901=_0x925980,_0x42b805={'ijIzs':function(_0x3f629d,_0x5f1b91){return _0x3f629d(_0x5f1b91);}};try{await _0x42b805['ijIzs'](writeActiveProfileName,_0x40bdb6),console['log'](_0x50a901(0xe2)+_0x40bdb6);}catch{console[_0x50a901(0xee)]('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x1ac0a7,_0x1ec071,_0x226d20,_0x1d9e1a,_0x4e83dc){const _0x2d4dd6=_0x925980,_0x5c96f4={'ffJUi':_0x2d4dd6(0x71),'ZHQMa':function(_0x1991a0,_0x29df78){return _0x1991a0 instanceof _0x29df78;},'woCAO':function(_0x267ad2,_0x995cce){return _0x267ad2(_0x995cce);},'uLIwp':function(_0x1ddc6c,_0x309e1b,_0xd6d0aa,_0x455b10,_0x40ad62){return _0x1ddc6c(_0x309e1b,_0xd6d0aa,_0x455b10,_0x40ad62);},'YLpyh':_0x2d4dd6(0x90),'kpRrH':function(_0x196717,_0x2df5a5){return _0x196717+_0x2df5a5;},'aIKja':function(_0x3982cf,_0x347427){return _0x3982cf+_0x347427;},'drEsi':_0x2d4dd6(0xbb),'iyBny':_0x2d4dd6(0x7e),'ouAjv':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','QhEDY':_0x2d4dd6(0x9b),'KmKLH':'user_declined','AZapQ':function(_0x1935e8,_0x30e89b){return _0x1935e8===_0x30e89b;},'gJzIa':function(_0x186bfe,_0x29a05b){return _0x186bfe+_0x29a05b;},'OJpWh':'profile.add.autoRouted'};let _0x2f9e1f;try{_0x2f9e1f=await fetchAuthConfig();}catch(_0x2e000d){return _0x4e83dc?.['trackPhaseEnd'](_0x5c96f4['ffJUi'],{'reason':_0x2d4dd6(0x90),'profileName':_0x1ac0a7}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5c96f4[_0x2d4dd6(0xaf)](_0x2e000d,Error)?_0x2e000d['message']:_0x5c96f4['woCAO'](String,_0x2e000d))),![];}if((!_0x2f9e1f||!_0x2f9e1f['environments']||Object[_0x2d4dd6(0xaa)](_0x2f9e1f[_0x2d4dd6(0x81)])['length']===0x0)&&!_0x226d20[_0x2d4dd6(0x6d)]){if(_0x1d9e1a)return await _0x5c96f4[_0x2d4dd6(0xb9)](captureEnvLessProfile,_0x1ac0a7,_0x1ec071,_0x226d20,_0x4e83dc);return _0x4e83dc?.[_0x2d4dd6(0x9f)](_0x2d4dd6(0x71),{'reason':_0x5c96f4[_0x2d4dd6(0xbc)],'profileName':_0x1ac0a7}),console[_0x2d4dd6(0x91)](_0x5c96f4['kpRrH'](_0x5c96f4[_0x2d4dd6(0x7f)](_0x5c96f4[_0x2d4dd6(0x7f)](_0x5c96f4[_0x2d4dd6(0x83)]('\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'),_0x2d4dd6(0x76))+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1ac0a7+'\x20--url\x20'+_0x1ec071+_0x2d4dd6(0xc5)),'\x0a'),'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a')+_0x5c96f4['drEsi']),![];}let _0x49d19f;if(_0x226d20[_0x2d4dd6(0x6d)]){if(!_0x2f9e1f?.[_0x2d4dd6(0x81)]?.[_0x226d20[_0x2d4dd6(0x6d)]]){const _0x4d5a88=Object['keys'](_0x2f9e1f?.['environments']??{});return _0x4e83dc?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x5c96f4['iyBny'],'profileName':_0x1ac0a7}),console[_0x2d4dd6(0x91)](_0x5c96f4[_0x2d4dd6(0x7f)](_0x2d4dd6(0x9c)+_0x226d20['authEnv']+'\x22\x20not\x20found.',_0x4d5a88['length']?'\x20Configured\x20envs:\x20'+_0x4d5a88[_0x2d4dd6(0x66)](',\x20')+'.':_0x5c96f4[_0x2d4dd6(0xb8)])),![];}_0x49d19f=_0x226d20[_0x2d4dd6(0x6d)];}else _0x49d19f=matchAuthEnvironment(_0x1ec071,_0x2f9e1f);if(!_0x49d19f)return _0x4e83dc?.['trackPhaseEnd'](_0x2d4dd6(0x71),{'reason':_0x5c96f4[_0x2d4dd6(0xd0)],'profileName':_0x1ac0a7}),console[_0x2d4dd6(0x91)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x1ec071+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x2d4dd6(0xaa)](_0x2f9e1f?.[_0x2d4dd6(0x81)]??{})[_0x2d4dd6(0x66)](',\x20')+'.'),![];const _0xad0d9a=_0x2f9e1f?.['environments']?.[_0x49d19f],_0xbe9c12=_0xad0d9a?.[_0x2d4dd6(0xef)]??[];if(_0x1d9e1a&&!_0x226d20[_0x2d4dd6(0x86)]){const {saveToCloud:_0x320473}=await _0x27d670['prompt']([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x49d19f+'\x27\x20matching\x20'+_0x1ec071+'\x0a\x20\x20(domains:\x20'+_0xbe9c12[_0x2d4dd6(0x66)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x1ac0a7+_0x2d4dd6(0xc2),'default':!![]}]);if(!_0x320473)return _0x4e83dc?.['trackPhaseEnd'](_0x2d4dd6(0x71),{'reason':_0x5c96f4[_0x2d4dd6(0x6a)],'profileName':_0x1ac0a7}),console[_0x2d4dd6(0x91)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x590c80=_0xbe9c12['some'](_0x182bf5=>{const _0x441d81=_0x2d4dd6;try{return new URL(_0x182bf5)['origin']===new URL(_0x1ec071)[_0x441d81(0x87)];}catch{return![];}}),_0x37eb9c={};!_0x590c80&&(_0x37eb9c['baseUrl']=_0x1ec071);try{await createCloudProfile(_0x1ac0a7,_0x49d19f,{'settings':_0x37eb9c}),warnCloudProfileSharedInOrg();}catch(_0x307e24){if(_0x307e24 instanceof ApiError&&_0x5c96f4[_0x2d4dd6(0xda)](_0x307e24['status'],0x199)){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1ac0a7+_0x2d4dd6(0xb0)+(_0x2d4dd6(0xac)+_0x1ac0a7));throw _0x307e24;}throw _0x307e24;}return console['log'](_0x5c96f4['gJzIa']('✓\x20Profile\x20\x27'+_0x1ac0a7+'\x27\x20created.\x0a',_0x2d4dd6(0x80)+_0x1ac0a7)),await sweepOrphansBestEffort(_0x1ac0a7),_0x4e83dc?.['trackPhaseEnd'](_0x5c96f4['OJpWh'],{'envKey':_0x49d19f,'profileName':_0x1ac0a7}),!![];}async function createUnconfiguredCloudProfile(_0x380959,_0x454a02){const _0x429291=_0x925980,_0x59e33a={'bIzom':function(_0x431532){return _0x431532();}};try{await createCloudProfile(_0x380959,undefined,{'settings':_0x454a02}),_0x59e33a['bIzom'](warnCloudProfileSharedInOrg);}catch(_0x151148){_0x151148 instanceof ApiError&&_0x151148[_0x429291(0xa8)]===0x199&&console['error'](_0x429291(0x7a)+_0x380959+_0x429291(0xb0)+(_0x429291(0xac)+_0x380959));throw _0x151148;}}async function captureEnvLessProfile(_0x1c40b6,_0x5a8a62,_0x115667,_0x57f660){const _0x41dfda=_0x925980,_0x13ccff={'jmwKX':'confirm','SDsXk':'capture','Ddsxb':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','hCsDg':_0x41dfda(0x71),'cVrFs':_0x41dfda(0x8e),'WrzJY':function(_0x176b0e,_0x3ff6be){return _0x176b0e+_0x3ff6be;},'XDNUs':function(_0x4a6632,_0xaa7324){return _0x4a6632===_0xaa7324;},'SuJkz':function(_0x56b64a){return _0x56b64a();},'wZLOS':function(_0x21734b,_0x46f798){return _0x21734b instanceof _0x46f798;},'Knjxw':function(_0x2d072a,_0x117da1,_0x2e4ff1){return _0x2d072a(_0x117da1,_0x2e4ff1);},'CVRNO':function(_0x4d947d,_0x35f1d9){return _0x4d947d>_0x35f1d9;},'YLpfx':function(_0x3ee721,_0x1afb5b){return _0x3ee721+_0x1afb5b;},'wyBxX':'profile.add.autoRouted'};if(!_0x115667['yes']){const {capture:_0x5cca7e}=await _0x27d670[_0x41dfda(0xd3)]([{'type':_0x13ccff[_0x41dfda(0xb5)],'name':_0x13ccff['SDsXk'],'message':_0x13ccff['Ddsxb'],'default':!![]}]);if(!_0x5cca7e)return _0x57f660?.['trackPhaseEnd'](_0x13ccff[_0x41dfda(0x96)],{'reason':_0x13ccff[_0x41dfda(0xa4)],'profileName':_0x1c40b6}),console[_0x41dfda(0x91)](_0x13ccff['WrzJY']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x41dfda(0xab))),![];}const _0x386fd7={};if(_0x115667[_0x41dfda(0x7b)])for(const _0x56c0ef of _0x115667['setupHeader']){const _0x51781c=_0x56c0ef[_0x41dfda(0x99)](':');if(_0x13ccff[_0x41dfda(0xe1)](_0x51781c,-0x1))continue;_0x386fd7[_0x56c0ef['slice'](0x0,_0x51781c)['trim']()]=_0x56c0ef[_0x41dfda(0x69)](_0x51781c+0x1)[_0x41dfda(0x9e)]();}const _0x5bd879={'baseUrl':_0x5a8a62};Object[_0x41dfda(0xaa)](_0x386fd7)['length']>0x0&&(_0x5bd879['setupHeaders']=_0x386fd7);let _0x4deccf;try{_0x4deccf=await createCloudProfile(_0x1c40b6,undefined,{'settings':_0x5bd879}),_0x13ccff['SuJkz'](warnCloudProfileSharedInOrg);}catch(_0x538ecd){_0x13ccff['wZLOS'](_0x538ecd,ApiError)&&_0x13ccff['XDNUs'](_0x538ecd[_0x41dfda(0xa8)],0x199)&&console['error'](_0x41dfda(0x7a)+_0x1c40b6+_0x41dfda(0xb0)+(_0x41dfda(0xac)+_0x1c40b6));throw _0x538ecd;}return await _0x13ccff[_0x41dfda(0x65)](manualBrowserLogin,_0x4deccf,{'key':'','domains':[_0x5a8a62],'setupHeaders':_0x13ccff[_0x41dfda(0xa0)](Object['keys'](_0x386fd7)['length'],0x0)?_0x386fd7:undefined}),console['log'](_0x13ccff[_0x41dfda(0xb3)]('\x0a✓\x20Profile\x20\x27'+_0x1c40b6+_0x41dfda(0x68),_0x41dfda(0x80)+_0x1c40b6)),await sweepOrphansBestEffort(_0x1c40b6),_0x57f660?.[_0x41dfda(0x9f)](_0x13ccff[_0x41dfda(0xf0)],{'envKey':null,'profileName':_0x1c40b6}),!![];}export async function addEnv(_0x552d97,_0x4603d5={},_0x8ef14d){const _0x5239ed=_0x925980,_0x268d9c={'RQyFG':function(_0x22acf9,_0x1e9dc3){return _0x22acf9+_0x1e9dc3;},'wdIyQ':function(_0x407e2f,_0x2d676d){return _0x407e2f+_0x2d676d;},'wFgZV':function(_0x53b87a,_0x21adc4){return _0x53b87a+_0x21adc4;},'mCowR':_0x5239ed(0x78),'xXOKK':_0x5239ed(0xd5),'muMox':_0x5239ed(0xbf),'nkbBb':'\x20\x20https://docs.ranger.net/main/concepts/profiles','dcswL':function(_0x2d086b,_0x12f47a){return _0x2d086b===_0x12f47a;},'qRHuH':function(_0x39c3d5,_0x5b3e34){return _0x39c3d5!==_0x5b3e34;},'RqLNH':function(_0x71adce,_0x81af00){return _0x71adce===_0x81af00;},'sAYga':_0x5239ed(0xdb),'BMcum':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','pdWrB':_0x5239ed(0xae),'tEOUh':function(_0x2c740b,_0x5b38ed){return _0x2c740b(_0x5b38ed);},'NRONC':function(_0x19c055,_0x1ee850){return _0x19c055>_0x1ee850;},'UuklJ':function(_0x3da2e5,_0x5aa024,_0x1cbdee){return _0x3da2e5(_0x5aa024,_0x1cbdee);},'mFyaS':function(_0x3eec4a,_0x149d6b,_0x53ee8b,_0x1b9de6,_0x1d4dca){return _0x3eec4a(_0x149d6b,_0x53ee8b,_0x1b9de6,_0x1d4dca);},'zORSa':_0x5239ed(0xb7),'WJOxl':function(_0x341c1b,_0x452813){return _0x341c1b(_0x452813);},'TNeDs':function(_0x8b6d6b,_0x2cce00,_0x2f55f0){return _0x8b6d6b(_0x2cce00,_0x2f55f0);},'csGCj':function(_0x185cfc,_0x20f2ca){return _0x185cfc(_0x20f2ca);},'AJZTv':function(_0x29ee3f,_0x4fb3c7){return _0x29ee3f(_0x4fb3c7);},'gXgkm':_0x5239ed(0xa1),'nEuUG':_0x5239ed(0xbd),'Byfck':_0x5239ed(0xdc),'KLhhX':_0x5239ed(0xb6),'iVblA':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','wUJcu':function(_0x15c2c2,_0x9949b1){return _0x15c2c2||_0x9949b1;},'Rdsfv':function(_0x4c5f3b,_0x5486fa){return _0x4c5f3b(_0x5486fa);},'jJgPJ':_0x5239ed(0x85),'ELeIU':_0x5239ed(0x82),'XLCdr':'retry','ZIXsS':_0x5239ed(0xd9),'FmYIW':_0x5239ed(0x6f),'fttob':function(_0x59e3e3,_0x3f220){return _0x59e3e3(_0x3f220);},'BKawg':function(_0x377fcd,_0x168ca9){return _0x377fcd(_0x168ca9);}};_0x4603d5['ci']&&(console['error'](_0x268d9c['RQyFG'](_0x268d9c[_0x5239ed(0xd2)](_0x268d9c['wdIyQ'](_0x268d9c['wFgZV'](_0x268d9c['wdIyQ']('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x5239ed(0xad)),'\x0a'),_0x268d9c[_0x5239ed(0x6b)])+_0x268d9c[_0x5239ed(0xdf)]+'\x0a',_0x268d9c[_0x5239ed(0x75)]),_0x268d9c['nkbBb'])),process[_0x5239ed(0xe9)](0x1));const _0x360e29={};if(_0x4603d5[_0x5239ed(0x7b)])for(const _0x33ef39 of _0x4603d5[_0x5239ed(0x7b)]){const _0x17cb44=_0x33ef39['indexOf'](':');if(_0x268d9c['dcswL'](_0x17cb44,-0x1))throw new Error(_0x5239ed(0xf3)+_0x33ef39+_0x5239ed(0xb4));const _0xf7cdeb=_0x33ef39['slice'](0x0,_0x17cb44)[_0x5239ed(0x9e)](),_0x49e4e3=_0x33ef39['slice'](_0x17cb44+0x1)['trim']();_0x360e29[_0xf7cdeb]=_0x49e4e3;}if(_0x268d9c[_0x5239ed(0x93)](_0x4603d5[_0x5239ed(0xc9)],undefined)&&_0x268d9c[_0x5239ed(0xed)](_0x4603d5[_0x5239ed(0xc9)][_0x5239ed(0x9e)](),''))throw new Error(_0x268d9c['sAYga']);if(_0x4603d5[_0x5239ed(0xc9)]&&_0x4603d5['url'])throw new Error(_0x5239ed(0x94));if(_0x4603d5['authEnv']&&_0x4603d5[_0x5239ed(0xd8)])throw new Error(_0x268d9c['BMcum']);if(_0x4603d5['authEnv']&&_0x4603d5['cdpEndpoint'])throw new Error(_0x268d9c[_0x5239ed(0x7d)]);const _0x427466=_0x268d9c[_0x5239ed(0xc7)](Boolean,_0x4603d5[_0x5239ed(0xc9)]),_0x4b9c87=isInteractive();if(!_0x4b9c87&&!_0x4603d5['url']&&!_0x427466&&!_0x4603d5[_0x5239ed(0xd8)])throw new Error(_0x5239ed(0xa9));if(_0x427466){const _0x238729=_0x4603d5[_0x5239ed(0xc9)];console['log']('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x238729);const _0x167d3e={'cdpEndpoint':_0x238729,'isElectron':!![]};_0x268d9c[_0x5239ed(0xdd)](Object['keys'](_0x360e29)['length'],0x0)&&(_0x167d3e['setupHeaders']=_0x360e29);await _0x268d9c['UuklJ'](createUnconfiguredCloudProfile,_0x552d97,_0x167d3e);try{_0x268d9c[_0x5239ed(0xc6)](setProfileOverride,process['cwd'](),_0x552d97,_0x5239ed(0xc9),_0x238729),_0x268d9c[_0x5239ed(0xc6)](setProfileOverride,process['cwd'](),_0x552d97,_0x268d9c['zORSa'],!![]);}catch(_0x56a901){console['error'](_0x5239ed(0x6c)+(_0x56a901 instanceof Error?_0x56a901[_0x5239ed(0xcb)]:_0x268d9c['tEOUh'](String,_0x56a901)));}console['log'](_0x5239ed(0xd6)+_0x552d97+_0x5239ed(0x88)),await sweepOrphansBestEffort(_0x552d97),await _0x268d9c['WJOxl'](markActive,_0x552d97);return;}if(_0x4603d5[_0x5239ed(0xd8)]){const _0x3b59a0={};_0x4603d5[_0x5239ed(0xa7)]&&(_0x3b59a0[_0x5239ed(0xb6)]=_0x4603d5['url']);Object[_0x5239ed(0xaa)](_0x360e29)[_0x5239ed(0xb1)]>0x0&&(_0x3b59a0[_0x5239ed(0x74)]=_0x360e29);await _0x268d9c['TNeDs'](createUnconfiguredCloudProfile,_0x552d97,_0x3b59a0),console['log'](_0x5239ed(0xcf)+_0x552d97+_0x5239ed(0xcc)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x552d97+_0x5239ed(0x92))),await _0x268d9c[_0x5239ed(0x8f)](sweepOrphansBestEffort,_0x552d97),await markActive(_0x552d97);return;}if(_0x4603d5[_0x5239ed(0xa7)]){const _0x3620f5=_0x4603d5[_0x5239ed(0xa7)],_0x4a59ae=await _0x268d9c[_0x5239ed(0xcd)](checkUrlReachability,_0x3620f5);if(!_0x4a59ae['ok']&&!_0x4603d5['force'])throw new Error('Could\x20not\x20reach\x20'+_0x3620f5+':\x20'+_0x4a59ae['error']+_0x5239ed(0xe8));!_0x4a59ae['ok']&&_0x4603d5['force']&&console['log'](_0x5239ed(0xd4)+_0x3620f5+':\x20'+_0x4a59ae[_0x5239ed(0x91)]+_0x5239ed(0x73));}else{console[_0x5239ed(0xee)](_0x268d9c[_0x5239ed(0x79)]),console[_0x5239ed(0xee)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console['log'](_0x268d9c['nEuUG']);let _0x3e3a63='',_0x575ee6=![];while(!![]){const _0x25c144=await _0x27d670[_0x5239ed(0xd3)]([{'type':_0x268d9c[_0x5239ed(0x9a)],'name':_0x268d9c[_0x5239ed(0xc3)],'message':_0x575ee6?_0x268d9c[_0x5239ed(0xa6)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x268d9c[_0x5239ed(0xa2)](_0x3e3a63,_0x5239ed(0xf1))}]);_0x3e3a63=_0x25c144['baseUrl'];const _0x44c9fb=await _0x268d9c[_0x5239ed(0x9d)](checkUrlReachability,_0x3e3a63);if(_0x44c9fb['ok'])break;const _0x10daee=/^[a-zA-Z][\w+.-]*:\/\//[_0x5239ed(0xbe)](_0x3e3a63),_0x30a47e=_0x44c9fb['isProtocolError']&&!_0x10daee,_0x3830f2=_0x30a47e?_0x5239ed(0xe7)+_0x3e3a63:null;_0x575ee6=!![],console[_0x5239ed(0xee)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3e3a63+':\x20'+_0x44c9fb['error']);_0x3830f2&&console['log'](_0x5239ed(0x7c)+_0x3830f2+'?');const {action:_0x39cf77}=await _0x27d670['prompt']([{'type':_0x268d9c['jJgPJ'],'name':_0x268d9c['ELeIU'],'message':_0x5239ed(0x67),'choices':[..._0x3830f2?[{'name':'Use\x20'+_0x3830f2,'value':'use_suggestion'}]:[],{'name':_0x5239ed(0x98),'value':_0x268d9c['XLCdr']},{'name':_0x268d9c['ZIXsS'],'value':'continue'}]}]);if(_0x268d9c[_0x5239ed(0xed)](_0x39cf77,_0x268d9c['FmYIW'])&&_0x3830f2){_0x3e3a63=_0x3830f2;const _0x14398c=await _0x268d9c['fttob'](checkUrlReachability,_0x3e3a63);if(_0x14398c['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x3e3a63+':\x20'+_0x14398c[_0x5239ed(0x91)]);}else{if(_0x268d9c['RqLNH'](_0x39cf77,'continue'))break;}}_0x4603d5={..._0x4603d5,'url':_0x3e3a63};}let _0x50059c=![];try{_0x50059c=await tryAutoRouteCloudProfile(_0x552d97,_0x4603d5['url'],_0x4603d5,_0x4b9c87,_0x8ef14d);}catch(_0x521fe8){console[_0x5239ed(0x91)](_0x5239ed(0xe4)+_0x552d97+'\x22:\x20'+(_0x521fe8 instanceof Error?_0x521fe8[_0x5239ed(0xcb)]:String(_0x521fe8))),process[_0x5239ed(0xe9)](0x1);}!_0x50059c&&process['exit'](0x1),await _0x268d9c[_0x5239ed(0x95)](markActive,_0x552d97);}
|
|
1
|
+
(function(_0x2ef848,_0x54fb6f){const _0x471b32=_0x267c,_0xe20aef=_0x2ef848();while(!![]){try{const _0x3011ff=parseInt(_0x471b32(0x91))/0x1*(parseInt(_0x471b32(0xb4))/0x2)+parseInt(_0x471b32(0x70))/0x3+parseInt(_0x471b32(0xd5))/0x4+-parseInt(_0x471b32(0x9f))/0x5*(-parseInt(_0x471b32(0xcf))/0x6)+-parseInt(_0x471b32(0x80))/0x7*(parseInt(_0x471b32(0xd8))/0x8)+-parseInt(_0x471b32(0xda))/0x9*(parseInt(_0x471b32(0xd1))/0xa)+-parseInt(_0x471b32(0x74))/0xb;if(_0x3011ff===_0x54fb6f)break;else _0xe20aef['push'](_0xe20aef['shift']());}catch(_0xb18f83){_0xe20aef['push'](_0xe20aef['shift']());}}}(_0x5281,0x682e6));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x24f4bb from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x5281(){const _0x558397=['2186244SEqMuv','\x20\x20Set\x20active\x20profile:\x20','trackPhaseEnd','startsWith','11636174SKhXXw','IPCGF',')\x0a\x20\x20Save\x20\x27','FcbJu','prompt','environments','PLSFw','manual','env','NODE_TLS_REJECT_UNAUTHORIZED','isProtocolError','EtgsQ','7XDOdej','local','rrtVt','yNUOt','DJIJT','FebZR','leGeZ','cdpEndpoint','\x27\x20created\x20(no\x20session).\x0a','signal','✓\x20Cloud\x20profile\x20\x27','ThAph','skipAuth','cwd','GkbSP','origin','lTyxr','340528VxPYNB','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','dKKXW','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','saveToCloud','Invalid\x20URL','BnaOk','`\x20again\x20without\x20--skip-auth.','user_declined','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','sNCLw','profile.add.autoRouted','\x27\x20matching\x20','log','495ZrYSZg','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','IyhUC','tQxRU','\x22\x20not\x20found.','error','abort','some','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','no_auth_config','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','retry','\x0a\x20\x20Could\x20not\x20reach\x20','confirm','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','setupHeaders','DwQXL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','Cjuqh','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','trim','4ZPtpOx','test','sbSJB','gpZjm','fetch\x20failed','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','\x0a\x20\x20Auth\x20environment\x20\x22','Enter\x20a\x20different\x20URL','RUZSl','lxiIP','indexOf','LKBFZ','baseUrl','ZidiP','authEnv','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','url','continue','keys','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','TRcGd','fDmvv','isTTY','join','PTKpa','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','status','5190PurXHQ','uEnyk','42910dRtNff','setupHeader','iKkSR','length','1112972bQXvGZ','message','slice','2072680NIOsbh','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','63Vptwjh','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','TwMIb','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','dcaQO','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a\x20\x20(domains:\x20','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','http://localhost:3000','aOlad','CLvRV','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x20--url\x20','ssfPY','RFWSa'];_0x5281=function(){return _0x558397;};return _0x5281();}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x1c9c49=_0x267c;if(!process['stdout'][_0x1c9c49(0xca)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}function _0x267c(_0xa89593,_0x6351dd){_0xa89593=_0xa89593-0x6c;const _0x52815a=_0x5281();let _0x267c38=_0x52815a[_0xa89593];return _0x267c38;}async function checkUrlReachability(_0x646e9a){const _0x4ad29c=_0x267c,_0x537c59={'rrtVt':function(_0x2f6ade,_0x20e0a4){return _0x2f6ade<_0x20e0a4;},'IPCGF':_0x4ad29c(0xb8)};try{const _0x553027=new AbortController(),_0x651c18=setTimeout(()=>_0x553027[_0x4ad29c(0xa5)](),0x1388),_0x3c80e6={'method':'HEAD','signal':_0x553027[_0x4ad29c(0x89)],'redirect':_0x4ad29c(0x7b)};/^https:\/\/localhost(:\d+)?/i[_0x4ad29c(0xb5)](_0x646e9a)&&(process[_0x4ad29c(0x7c)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x32c54b=await fetch(_0x646e9a,_0x3c80e6);delete process[_0x4ad29c(0x7c)][_0x4ad29c(0x7d)],clearTimeout(_0x651c18);if(_0x537c59[_0x4ad29c(0x82)](_0x32c54b['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x32c54b['status']};}catch(_0x265f0a){delete process[_0x4ad29c(0x7c)][_0x4ad29c(0x7d)];const _0x3187fb=_0x265f0a,_0x54883a=_0x3187fb[_0x4ad29c(0xd6)]||String(_0x265f0a),_0x3ca68c=_0x54883a['includes'](_0x4ad29c(0x96))||_0x3187fb['name']==='TypeError'||_0x54883a['includes'](_0x537c59[_0x4ad29c(0x75)]);return{'ok':![],'error':_0x54883a,'isProtocolError':_0x3ca68c};}}async function sweepOrphanLocalProfile(_0x1cff0d,_0x5e922e,_0x5509e5){const _0x3d8fbf=_0x267c,_0xcd841b={'TRcGd':function(_0x144716,_0x1c7fa7){return _0x144716(_0x1c7fa7);},'hoQwa':function(_0x30678a,_0xd7d1dc,_0x487e2a){return _0x30678a(_0xd7d1dc,_0x487e2a);},'ZMnwR':function(_0x3f241b,_0x252e3e){return _0x3f241b(_0x252e3e);}},_0x1e2f5d=join(_0x5e922e,_0x3d8fbf(0x81)),_0x747a7a=join(_0x1e2f5d,_0x1cff0d);existsSync(_0x747a7a)&&(_0x5509e5&&await _0xcd841b[_0x3d8fbf(0xc8)](isPathGitTracked,_0x747a7a)?console['log'](_0x3d8fbf(0xb9)+_0x747a7a+_0x3d8fbf(0xad)):(await _0xcd841b['hoQwa'](rm,_0x747a7a,{'recursive':!![],'force':!![]}),console[_0x3d8fbf(0x9e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x747a7a)));if(_0xcd841b[_0x3d8fbf(0xc8)](existsSync,_0x1e2f5d)){let _0x5e8c89=[];try{_0x5e8c89=await _0xcd841b['ZMnwR'](readdir,_0x1e2f5d);}catch{return;}const _0xa9a26='.tmp-'+_0x1cff0d+'-';for(const _0x39386e of _0x5e8c89){if(!_0x39386e[_0x3d8fbf(0x73)](_0xa9a26))continue;const _0x55ce60=join(_0x1e2f5d,_0x39386e);await rm(_0x55ce60,{'recursive':!![],'force':!![]}),console[_0x3d8fbf(0x9e)](_0x3d8fbf(0xdd)+_0x55ce60);}}}async function sweepOrphansBestEffort(_0x36498e){const _0x20cb57=_0x267c,_0x1728cf={'iKkSR':function(_0xd665b4){return _0xd665b4();},'FebZR':function(_0x758a47,_0x20bac8){return _0x758a47!==_0x20bac8;},'GkbSP':function(_0x4922d2,_0x309667){return _0x4922d2(_0x309667);}};try{await sweepOrphanLocalProfile(_0x36498e,_0x1728cf[_0x20cb57(0xd3)](getRangerHomeDir),![]);const _0x400dc1=_0x1728cf['iKkSR'](getRangerDir);_0x1728cf[_0x20cb57(0x85)](_0x400dc1,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x36498e,_0x400dc1,!![]);}catch(_0x196681){console[_0x20cb57(0x9e)](_0x20cb57(0xa9)+(_0x196681 instanceof Error?_0x196681['message']:_0x1728cf[_0x20cb57(0x8e)](String,_0x196681))+').');}}async function markActive(_0x596afa){const _0x3b27e9=_0x267c,_0xee8b63={'IyhUC':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x596afa),console[_0x3b27e9(0x9e)](_0x3b27e9(0x71)+_0x596afa);}catch{console['log'](_0xee8b63[_0x3b27e9(0xa1)]);}}async function tryAutoRouteCloudProfile(_0x306edc,_0x5566e2,_0x122768,_0x4b1840,_0x5b1949){const _0x16846f=_0x267c,_0x1835bf={'lHMRA':function(_0x5b01fc,_0x34d259){return _0x5b01fc===_0x34d259;},'DJIJT':function(_0x248e04){return _0x248e04();},'lTyxr':function(_0x2c6406,_0x34880e){return _0x2c6406===_0x34880e;},'RUZSl':function(_0x4376ef,_0x548917,_0x1418e5,_0xe95c87,_0x381de4){return _0x4376ef(_0x548917,_0x1418e5,_0xe95c87,_0x381de4);},'sbSJB':'profile.add.autoRouteSkipped','fDmvv':_0x16846f(0xa8),'RJfrh':function(_0x57c7ca,_0x1fbac3){return _0x57c7ca+_0x1fbac3;},'wuyfd':function(_0x41d08f,_0x594d0b){return _0x41d08f+_0x594d0b;},'aOlad':'\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','CIllq':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','LKBFZ':'env_not_found','ftBUL':function(_0x526e09,_0xfd47fe){return _0x526e09+_0xfd47fe;},'ThAph':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','vJAKy':'no_match','tQxRU':_0x16846f(0x95),'pPxbG':_0x16846f(0x99),'gSvka':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','drGzf':function(_0x2cbc5d,_0x589d6d,_0x3dba45,_0x18ac4a){return _0x2cbc5d(_0x589d6d,_0x3dba45,_0x18ac4a);}};let _0x44a1c9;try{_0x44a1c9=await _0x1835bf[_0x16846f(0x84)](fetchAuthConfig);}catch(_0xa959e7){return _0x5b1949?.[_0x16846f(0x72)]('profile.add.autoRouteSkipped',{'reason':_0x16846f(0xa8),'profileName':_0x306edc}),console['error'](_0x16846f(0xb2)+(_0xa959e7 instanceof Error?_0xa959e7['message']:String(_0xa959e7))),![];}if((!_0x44a1c9||!_0x44a1c9['environments']||_0x1835bf[_0x16846f(0x90)](Object[_0x16846f(0xc6)](_0x44a1c9[_0x16846f(0x79)])[_0x16846f(0xd4)],0x0))&&!_0x122768['authEnv']){if(_0x4b1840)return await _0x1835bf[_0x16846f(0xbc)](captureEnvLessProfile,_0x306edc,_0x5566e2,_0x122768,_0x5b1949);return _0x5b1949?.['trackPhaseEnd'](_0x1835bf['sbSJB'],{'reason':_0x1835bf[_0x16846f(0xc9)],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['RJfrh'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf['wuyfd'](_0x1835bf[_0x16846f(0xe4)]+'\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x306edc+_0x16846f(0x6d)+_0x5566e2+'\x20--skip-auth\x0a'),'\x0a'),'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x1835bf['CIllq'])),![];}let _0xb2b843;if(_0x122768[_0x16846f(0xc2)]){if(!_0x44a1c9?.[_0x16846f(0x79)]?.[_0x122768['authEnv']]){const _0x242984=Object['keys'](_0x44a1c9?.[_0x16846f(0x79)]??{});return _0x5b1949?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1835bf[_0x16846f(0xbf)],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['ftBUL'](_0x16846f(0xba)+_0x122768[_0x16846f(0xc2)]+_0x16846f(0xa3),_0x242984[_0x16846f(0xd4)]?'\x20Configured\x20envs:\x20'+_0x242984[_0x16846f(0xcb)](',\x20')+'.':_0x1835bf[_0x16846f(0x8b)])),![];}_0xb2b843=_0x122768[_0x16846f(0xc2)];}else _0xb2b843=matchAuthEnvironment(_0x5566e2,_0x44a1c9);if(!_0xb2b843)return _0x5b1949?.['trackPhaseEnd'](_0x1835bf[_0x16846f(0xb6)],{'reason':_0x1835bf['vJAKy'],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x16846f(0xa7)+_0x5566e2+_0x16846f(0x92)+Object['keys'](_0x44a1c9?.[_0x16846f(0x79)]??{})[_0x16846f(0xcb)](',\x20')+'.'),![];const _0x53d77a=_0x44a1c9?.['environments']?.[_0xb2b843],_0x21803a=_0x53d77a?.['domains']??[];if(_0x4b1840&&!_0x122768['yes']){const {saveToCloud:_0x4e365f}=await _0x24f4bb['prompt']([{'type':'confirm','name':_0x1835bf[_0x16846f(0xa2)],'message':'Found\x20auth\x20environment\x20\x27'+_0xb2b843+_0x16846f(0x9d)+_0x5566e2+_0x16846f(0xe1)+_0x21803a[_0x16846f(0xcb)](',\x20')+_0x16846f(0x76)+_0x306edc+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x4e365f)return _0x5b1949?.[_0x16846f(0x72)](_0x1835bf['sbSJB'],{'reason':_0x1835bf['pPxbG'],'profileName':_0x306edc}),console[_0x16846f(0xa4)](_0x1835bf['gSvka']),![];}const _0x5e47d0=_0x21803a[_0x16846f(0xa6)](_0x391f42=>{const _0xdfb877=_0x16846f;try{return _0x1835bf['lHMRA'](new URL(_0x391f42)['origin'],new URL(_0x5566e2)[_0xdfb877(0x8f)]);}catch{return![];}}),_0xc50694={};!_0x5e47d0&&(_0xc50694[_0x16846f(0xc0)]=_0x5566e2);try{await _0x1835bf['drGzf'](createCloudProfile,_0x306edc,_0xb2b843,{'settings':_0xc50694}),warnCloudProfileSharedInOrg();}catch(_0x26fa62){if(_0x26fa62 instanceof ApiError&&_0x1835bf[_0x16846f(0x90)](_0x26fa62[_0x16846f(0xce)],0x199)){console[_0x16846f(0xa4)](_0x16846f(0x6c)+_0x306edc+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x16846f(0xc7)+_0x306edc));throw _0x26fa62;}throw _0x26fa62;}return console['log'](_0x1835bf['wuyfd']('✓\x20Profile\x20\x27'+_0x306edc+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x306edc)),await sweepOrphansBestEffort(_0x306edc),_0x5b1949?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':_0xb2b843,'profileName':_0x306edc}),!![];}async function createUnconfiguredCloudProfile(_0x5e4a66,_0x1c3580){const _0x221abb=_0x267c,_0x25e9e0={'lxiIP':function(_0x15a2af){return _0x15a2af();},'FJJyK':function(_0x1a06b8,_0x47fde3){return _0x1a06b8 instanceof _0x47fde3;},'leGeZ':function(_0x1bd6d0,_0x4f52fa){return _0x1bd6d0===_0x4f52fa;}};try{await createCloudProfile(_0x5e4a66,undefined,{'settings':_0x1c3580}),_0x25e9e0[_0x221abb(0xbd)](warnCloudProfileSharedInOrg);}catch(_0x5e086f){_0x25e9e0['FJJyK'](_0x5e086f,ApiError)&&_0x25e9e0[_0x221abb(0x86)](_0x5e086f[_0x221abb(0xce)],0x199)&&console[_0x221abb(0xa4)](_0x221abb(0x6c)+_0x5e4a66+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5e4a66));throw _0x5e086f;}}async function captureEnvLessProfile(_0xe380d2,_0x4d2462,_0x426ab5,_0x11c6b1){const _0x19909c=_0x267c,_0x2600b8={'jxiXI':_0x19909c(0xac),'kTZeT':'capture','gJeYw':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sNCLw':'profile.add.autoRouteSkipped','bfnJE':'user_declined','gpZjm':function(_0x35902b,_0x5aadae){return _0x35902b===_0x5aadae;},'BnaOk':function(_0x503801,_0x276576){return _0x503801>_0x276576;},'jyhWm':function(_0x116dcf,_0x2ee2ce,_0xac9499,_0x389011){return _0x116dcf(_0x2ee2ce,_0xac9499,_0x389011);},'TwMIb':function(_0x480173){return _0x480173();},'FGKPr':function(_0x145131,_0x49b2a1){return _0x145131 instanceof _0x49b2a1;},'uEnyk':function(_0x4d4c4c,_0x36e872){return _0x4d4c4c===_0x36e872;},'dKKXW':function(_0x166df9,_0xd87f77){return _0x166df9+_0xd87f77;},'Htcwm':function(_0x264d31,_0x2c9652,_0xe1427a){return _0x264d31(_0x2c9652,_0xe1427a);}};if(!_0x426ab5['yes']){const {capture:_0x34d0ce}=await _0x24f4bb[_0x19909c(0x78)]([{'type':_0x2600b8['jxiXI'],'name':_0x2600b8['kTZeT'],'message':_0x2600b8['gJeYw'],'default':!![]}]);if(!_0x34d0ce)return _0x11c6b1?.[_0x19909c(0x72)](_0x2600b8[_0x19909c(0x9b)],{'reason':_0x2600b8['bfnJE'],'profileName':_0xe380d2}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x21cdfa={};if(_0x426ab5['setupHeader'])for(const _0xb9b766 of _0x426ab5['setupHeader']){const _0x34f1bd=_0xb9b766['indexOf'](':');if(_0x2600b8[_0x19909c(0xb7)](_0x34f1bd,-0x1))continue;_0x21cdfa[_0xb9b766[_0x19909c(0xd7)](0x0,_0x34f1bd)['trim']()]=_0xb9b766['slice'](_0x34f1bd+0x1)[_0x19909c(0xb3)]();}const _0x2cd38f={'baseUrl':_0x4d2462};_0x2600b8[_0x19909c(0x97)](Object['keys'](_0x21cdfa)['length'],0x0)&&(_0x2cd38f['setupHeaders']=_0x21cdfa);let _0x397df8;try{_0x397df8=await _0x2600b8['jyhWm'](createCloudProfile,_0xe380d2,undefined,{'settings':_0x2cd38f}),_0x2600b8[_0x19909c(0xdc)](warnCloudProfileSharedInOrg);}catch(_0x1e76c9){_0x2600b8['FGKPr'](_0x1e76c9,ApiError)&&_0x2600b8[_0x19909c(0xd0)](_0x1e76c9[_0x19909c(0xce)],0x199)&&console[_0x19909c(0xa4)](_0x2600b8[_0x19909c(0x93)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xe380d2+_0x19909c(0xdb),_0x19909c(0xc7)+_0xe380d2));throw _0x1e76c9;}return await _0x2600b8['Htcwm'](manualBrowserLogin,_0x397df8,{'key':'','domains':[_0x4d2462],'setupHeaders':_0x2600b8['BnaOk'](Object[_0x19909c(0xc6)](_0x21cdfa)['length'],0x0)?_0x21cdfa:undefined}),console['log'](_0x2600b8[_0x19909c(0x93)]('\x0a✓\x20Profile\x20\x27'+_0xe380d2+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0xe380d2)),await sweepOrphansBestEffort(_0xe380d2),_0x11c6b1?.[_0x19909c(0x72)](_0x19909c(0x9c),{'envKey':null,'profileName':_0xe380d2}),!![];}export async function addEnv(_0x4d7bb5,_0x31de7a={},_0x17a994){const _0x595080=_0x267c,_0x505d6b={'PTKpa':function(_0x4c0edc,_0x4c7585){return _0x4c0edc+_0x4c7585;},'CLvRV':function(_0x4579dd,_0x4be16c){return _0x4579dd+_0x4be16c;},'DwQXL':function(_0x4373a7,_0x2d1cbb){return _0x4373a7+_0x2d1cbb;},'ssfPY':function(_0x4d3110,_0x3aefc0){return _0x4d3110+_0x3aefc0;},'XUeDz':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','ONtkx':function(_0x3befd7,_0x3088d1){return _0x3befd7===_0x3088d1;},'XiNbU':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','dKKcP':_0x595080(0xa0),'FcbJu':_0x595080(0x94),'IzGCi':function(_0x286717,_0x23905f){return _0x286717(_0x23905f);},'kzYBk':function(_0x58be00){return _0x58be00();},'yNUOt':_0x595080(0xe2),'KWQMs':function(_0x60a33e,_0x44339f,_0x308178){return _0x60a33e(_0x44339f,_0x308178);},'PLSFw':'cdpEndpoint','xseXN':function(_0x3d2d12,_0x39fdb9){return _0x3d2d12 instanceof _0x39fdb9;},'csCpr':function(_0x430af0,_0x1771e0){return _0x430af0(_0x1771e0);},'fIQAz':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','xWzUR':'input','EtgsQ':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','dcaQO':function(_0x40e837,_0x4d2325){return _0x40e837||_0x4d2325;},'QPgvT':_0x595080(0xe3),'yZUXS':'action','Cjuqh':'use_suggestion','ZidiP':_0x595080(0xbb),'RFWSa':function(_0x235218,_0x1ff1ef){return _0x235218 instanceof _0x1ff1ef;},'oZDoI':function(_0x460ff9,_0x2b3dda){return _0x460ff9(_0x2b3dda);},'WxuGx':function(_0x1dc98f,_0x440cbd){return _0x1dc98f(_0x440cbd);}};_0x31de7a['ci']&&(console[_0x595080(0xa4)](_0x505d6b[_0x595080(0xcc)](_0x505d6b['PTKpa'](_0x505d6b[_0x595080(0xe5)](_0x505d6b[_0x595080(0xaf)](_0x505d6b[_0x595080(0x6e)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x505d6b['XUeDz']),'\x0a'),_0x595080(0xc3))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1));const _0x545dd0={};if(_0x31de7a['setupHeader'])for(const _0x5dd7ab of _0x31de7a[_0x595080(0xd2)]){const _0x3e1b0d=_0x5dd7ab[_0x595080(0xbe)](':');if(_0x3e1b0d===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x5dd7ab+_0x595080(0xe0));const _0x4cbf56=_0x5dd7ab[_0x595080(0xd7)](0x0,_0x3e1b0d)[_0x595080(0xb3)](),_0xcc49fd=_0x5dd7ab['slice'](_0x505d6b[_0x595080(0xe5)](_0x3e1b0d,0x1))[_0x595080(0xb3)]();_0x545dd0[_0x4cbf56]=_0xcc49fd;}if(_0x31de7a[_0x595080(0x87)]!==undefined&&_0x505d6b['ONtkx'](_0x31de7a['cdpEndpoint'][_0x595080(0xb3)](),''))throw new Error(_0x505d6b['XiNbU']);if(_0x31de7a[_0x595080(0x87)]&&_0x31de7a[_0x595080(0xc4)])throw new Error(_0x505d6b['dKKcP']);if(_0x31de7a[_0x595080(0xc2)]&&_0x31de7a[_0x595080(0x8c)])throw new Error(_0x505d6b[_0x595080(0x77)]);if(_0x31de7a['authEnv']&&_0x31de7a[_0x595080(0x87)])throw new Error(_0x595080(0x9a));const _0x3cf622=_0x505d6b['IzGCi'](Boolean,_0x31de7a[_0x595080(0x87)]),_0x4e88a1=_0x505d6b['kzYBk'](isInteractive);if(!_0x4e88a1&&!_0x31de7a['url']&&!_0x3cf622&&!_0x31de7a['skipAuth'])throw new Error(_0x505d6b[_0x595080(0x83)]);if(_0x3cf622){const _0x5868b4=_0x31de7a[_0x595080(0x87)];console[_0x595080(0x9e)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x595080(0x9e)](_0x595080(0xdf)+_0x5868b4);const _0x111739={'cdpEndpoint':_0x5868b4,'isElectron':!![]};Object[_0x595080(0xc6)](_0x545dd0)['length']>0x0&&(_0x111739['setupHeaders']=_0x545dd0);await _0x505d6b['KWQMs'](createUnconfiguredCloudProfile,_0x4d7bb5,_0x111739);try{setProfileOverride(process[_0x595080(0x8d)](),_0x4d7bb5,_0x505d6b[_0x595080(0x7a)],_0x5868b4),setProfileOverride(process[_0x595080(0x8d)](),_0x4d7bb5,'isElectron',!![]);}catch(_0x33d087){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x505d6b['xseXN'](_0x33d087,Error)?_0x33d087['message']:String(_0x33d087)));}console[_0x595080(0x9e)](_0x595080(0x8a)+_0x4d7bb5+'\x27\x20created\x20(CDP).'),await _0x505d6b['csCpr'](sweepOrphansBestEffort,_0x4d7bb5),await markActive(_0x4d7bb5);return;}if(_0x31de7a['skipAuth']){const _0x2279f7={};_0x31de7a[_0x595080(0xc4)]&&(_0x2279f7['baseUrl']=_0x31de7a[_0x595080(0xc4)]);Object['keys'](_0x545dd0)[_0x595080(0xd4)]>0x0&&(_0x2279f7[_0x595080(0xae)]=_0x545dd0);await createUnconfiguredCloudProfile(_0x4d7bb5,_0x2279f7),console['log']('✓\x20Profile\x20\x27'+_0x4d7bb5+_0x595080(0x88)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4d7bb5+_0x595080(0x98))),await _0x505d6b['csCpr'](sweepOrphansBestEffort,_0x4d7bb5),await markActive(_0x4d7bb5);return;}if(_0x31de7a[_0x595080(0xc4)]){const _0xf475c9=_0x31de7a[_0x595080(0xc4)],_0x5005b1=await checkUrlReachability(_0xf475c9);if(!_0x5005b1['ok']&&!_0x31de7a['force'])throw new Error('Could\x20not\x20reach\x20'+_0xf475c9+':\x20'+_0x5005b1[_0x595080(0xa4)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x5005b1['ok']&&_0x31de7a['force']&&console[_0x595080(0x9e)]('⚠\x20Could\x20not\x20reach\x20'+_0xf475c9+':\x20'+_0x5005b1['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x595080(0x9e)]('\x0a🌐\x20Profile\x20Setup\x0a'),console['log'](_0x505d6b['fIQAz']),console['log'](_0x595080(0xcd));let _0x2f0baa='',_0x460593=![];while(!![]){const _0x3e8b3b=await _0x24f4bb['prompt']([{'type':_0x505d6b['xWzUR'],'name':_0x595080(0xc0),'message':_0x460593?_0x595080(0xd9):_0x505d6b[_0x595080(0x7f)],'default':_0x505d6b[_0x595080(0xde)](_0x2f0baa,_0x505d6b['QPgvT'])}]);_0x2f0baa=_0x3e8b3b['baseUrl'];const _0x4b6205=await checkUrlReachability(_0x2f0baa);if(_0x4b6205['ok'])break;const _0x19b335=/^[a-zA-Z][\w+.-]*:\/\//[_0x595080(0xb5)](_0x2f0baa),_0x288988=_0x4b6205[_0x595080(0x7e)]&&!_0x19b335,_0x335e99=_0x288988?'http://'+_0x2f0baa:null;_0x460593=!![],console[_0x595080(0x9e)](_0x595080(0xab)+_0x2f0baa+':\x20'+_0x4b6205['error']);_0x335e99&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x335e99+'?');const {action:_0x50b89a}=await _0x24f4bb['prompt']([{'type':'list','name':_0x505d6b['yZUXS'],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x335e99?[{'name':'Use\x20'+_0x335e99,'value':_0x505d6b[_0x595080(0xb1)]}]:[],{'name':_0x505d6b[_0x595080(0xc1)],'value':_0x595080(0xaa)},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x50b89a==='use_suggestion'&&_0x335e99){_0x2f0baa=_0x335e99;const _0x1b01d7=await checkUrlReachability(_0x2f0baa);if(_0x1b01d7['ok'])break;console['log'](_0x595080(0xb0)+_0x2f0baa+':\x20'+_0x1b01d7['error']);}else{if(_0x50b89a===_0x595080(0xc5))break;}}_0x31de7a={..._0x31de7a,'url':_0x2f0baa};}let _0x5a587e=![];try{_0x5a587e=await tryAutoRouteCloudProfile(_0x4d7bb5,_0x31de7a['url'],_0x31de7a,_0x4e88a1,_0x17a994);}catch(_0x71e8bb){console[_0x595080(0xa4)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4d7bb5+'\x22:\x20'+(_0x505d6b[_0x595080(0x6f)](_0x71e8bb,Error)?_0x71e8bb['message']:_0x505d6b['oZDoI'](String,_0x71e8bb))),process['exit'](0x1);}!_0x5a587e&&process['exit'](0x1),await _0x505d6b['WxuGx'](markActive,_0x4d7bb5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59f039,_0x45d086){var _0x13521c=_0xa604,_0x380798=_0x59f039();while(!![]){try{var _0x1bcaa3=-parseInt(_0x13521c(0x1b0))/0x1*(-parseInt(_0x13521c(0x1ac))/0x2)+parseInt(_0x13521c(0x1b1))/0x3*(-parseInt(_0x13521c(0x1b3))/0x4)+parseInt(_0x13521c(0x1b5))/0x5+-parseInt(_0x13521c(0x1ae))/0x6+parseInt(_0x13521c(0x1b4))/0x7+parseInt(_0x13521c(0x1b2))/0x8+-parseInt(_0x13521c(0x1af))/0x9*(parseInt(_0x13521c(0x1a4))/0xa);if(_0x1bcaa3===_0x45d086)break;else _0x380798['push'](_0x380798['shift']());}catch(_0x58263a){_0x380798['push'](_0x380798['shift']());}}}(_0x4f4d,0x9673e));function _0xa604(_0x260e05,_0x368835){_0x260e05=_0x260e05-0x1a3;var _0x4f4d69=_0x4f4d();var _0xa60449=_0x4f4d69[_0x260e05];return _0xa60449;}function _0x4f4d(){var _0x175bd0=['2161110ALhHOj','3786552sZrWTz','120233YARYwI','180678NqhbAD','156024tvKZtf','40HGQGpo','4813648cNzBNZ','2854310PQUhol','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','10NrRwdS','\x20\x20https://docs.ranger.net/main/concepts/profiles','DkXVm','RQxER','error','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','JnXcS','Ripxm','12PNVeol','ujZGV'];_0x4f4d=function(){return _0x175bd0;};return _0x4f4d();}export async function authEncrypt(_0x4623d5){var _0xf32764=_0xa604,_0xc8d963={'DkXVm':function(_0x18d7b4,_0x1a5c83){return _0x18d7b4+_0x1a5c83;},'RQxER':function(_0x211a23,_0x5c7d15){return _0x211a23+_0x5c7d15;},'bONPx':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','Ripxm':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','JnXcS':_0xf32764(0x1a9),'ujZGV':_0xf32764(0x1a5)};console[_0xf32764(0x1a8)](_0xc8d963['DkXVm'](_0xc8d963[_0xf32764(0x1a6)](_0xc8d963[_0xf32764(0x1a7)](_0xc8d963[_0xf32764(0x1a7)]('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a'+_0xc8d963['bONPx'],'\x0a')+_0xc8d963[_0xf32764(0x1ab)],_0xc8d963[_0xf32764(0x1aa)]),'\x0a')+_0xf32764(0x1a3),_0xc8d963[_0xf32764(0x1ad)])),process['exit'](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x189e(_0x3d1f10,_0xf50c96){_0x3d1f10=_0x3d1f10-0xba;const _0x2a0b19=_0x2a0b();let _0x189ec0=_0x2a0b19[_0x3d1f10];return _0x189ec0;}const _0x2ff99f=_0x189e;(function(_0x447721,_0x35b46a){const _0x2987ce=_0x189e,_0x420bc4=_0x447721();while(!![]){try{const _0x3d8dd8=parseInt(_0x2987ce(0xbf))/0x1+parseInt(_0x2987ce(0xd5))/0x2*(parseInt(_0x2987ce(0xe5))/0x3)+parseInt(_0x2987ce(0xcd))/0x4+-parseInt(_0x2987ce(0xe0))/0x5*(parseInt(_0x2987ce(0xe2))/0x6)+-parseInt(_0x2987ce(0xdd))/0x7+parseInt(_0x2987ce(0xbe))/0x8+-parseInt(_0x2987ce(0xe9))/0x9;if(_0x3d8dd8===_0x35b46a)break;else _0x420bc4['push'](_0x420bc4['shift']());}catch(_0x3d1007){_0x420bc4['push'](_0x420bc4['shift']());}}}(_0x2a0b,0xeac5c));function _0x2a0b(){const _0x3d8e6a=['VomkG','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','QcVmM','uninstall','10833193vYaeEg','push','\x0a✅\x20Cleanup\x20complete!\x0a','19865pBaDfp','UqaAM','1218DxNXYx','close','lLMKe','927039KobTDy','platform','log','parse','1601685CqoEIW','YRhgZ','✓\x20Removed\x20trailhead\x20marketplace','Nothing\x20to\x20clean\x20up.\x0a','ranger@trailhead','sCAPz','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','vXrfa','XXETe','7150840QKptac','142975YmkkYt','feature-tracker','e2e-test-recommender','string','ecvJo','filter','ignore','project','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','vjhsm','✓\x20Removed\x20user\x20skill:\x20','claude','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','stringify','7355420ojLHCT','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','QFLdX','plugin','nNoeM','length','utf-8','lDChq','4aMmSvJ','trailhead','DqfXb','marketplace'];_0x2a0b=function(){return _0x3d8e6a;};return _0x2a0b();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x2ff99f(0xc0),'bug-bash',_0x2ff99f(0xc1)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x45228d){const _0x4d440f=_0x2ff99f,_0x3816fd=_0x45228d['replace'](/\/\*[\s\S]*?\*\//g,''),_0x5df3fc=_0x3816fd['replace'](/^\s*\/\/.*$/gm,''),_0x40f578=_0x5df3fc['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4d440f(0xe8)](_0x40f578);}async function removeOpencodePluginConfig(_0x52a7eb){const _0x202343=_0x2ff99f,_0x352015={'jHWZl':function(_0x51b829,_0x562188){return _0x51b829!==_0x562188;},'BEjzT':function(_0x28ee72,_0x4b40f2){return _0x28ee72(_0x4b40f2);},'hkIVX':_0x202343(0xd3),'QcVmM':function(_0x44b096,_0x56b516){return _0x44b096===_0x56b516;},'ecvJo':function(_0x23db84,_0x1ca2ad){return _0x23db84===_0x1ca2ad;}};if(!_0x352015['BEjzT'](existsSync,_0x52a7eb))return![];let _0x1b676b;try{const _0x5b1941=await readFile(_0x52a7eb,_0x352015['hkIVX']);_0x1b676b=parseJsonc(_0x5b1941);}catch{return![];}const _0x27c0bf=Array['isArray'](_0x1b676b[_0x202343(0xd0)])?_0x1b676b['plugin']:[];if(_0x27c0bf['length']===0x0)return![];const _0x53ef68=_0x27c0bf[_0x202343(0xc4)](_0x3aa1ca=>{const _0xc08b06=_0x202343;if(_0x352015['jHWZl'](typeof _0x3aa1ca,_0xc08b06(0xc2)))return!![];return _0x3aa1ca!==opencodePluginName;});if(_0x352015[_0x202343(0xdb)](_0x53ef68[_0x202343(0xd2)],_0x27c0bf['length']))return![];return _0x352015[_0x202343(0xc3)](_0x53ef68['length'],0x0)?delete _0x1b676b[_0x202343(0xd0)]:_0x1b676b[_0x202343(0xd0)]=_0x53ef68,await writeFile(_0x52a7eb,JSON[_0x202343(0xcc)](_0x1b676b,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xc8106b){const _0x2b1762=_0x2ff99f,_0x2ddb62={'zpMNj':_0x2b1762(0xed),'IItSn':'--scope','gQOJX':'ignore','DqfXb':function(_0x2dc02d){return _0x2dc02d();},'TgzsZ':function(_0x49359b,_0x7485fa){return _0x49359b===_0x7485fa;}};return new Promise(_0x130c5d=>{const _0xfce1a4=_0x2b1762,_0x376427=['plugin',_0xfce1a4(0xdc),_0x2ddb62['zpMNj']];_0xc8106b&&_0x376427[_0xfce1a4(0xde)](_0x2ddb62['IItSn'],_0xc8106b);const _0x2badc7=spawn(_0xfce1a4(0xca),_0x376427,{'stdio':[_0x2ddb62['gQOJX'],_0x2ddb62['gQOJX'],_0x2ddb62['gQOJX']],'cwd':_0xc8106b?_0x2ddb62[_0xfce1a4(0xd7)](getProjectRoot):undefined,'shell':_0x2ddb62['TgzsZ'](process[_0xfce1a4(0xe6)],'win32')});_0x2badc7['on']('close',_0xf8d017=>{_0x130c5d(_0xf8d017===0x0);}),_0x2badc7['on']('error',()=>{_0x130c5d(![]);});});}async function removeMarketplace(){const _0x1ca38f=_0x2ff99f,_0x32272b={'OieNP':function(_0x3b6209,_0x152afb){return _0x3b6209(_0x152afb);},'YRhgZ':function(_0x1b68f9,_0x266ada,_0x87a0f6,_0x494a89){return _0x1b68f9(_0x266ada,_0x87a0f6,_0x494a89);},'jSuXQ':_0x1ca38f(0xca),'psVux':_0x1ca38f(0xd8),'EvHeI':_0x1ca38f(0xc5),'naAhF':function(_0xbaec4c,_0x2da6be){return _0xbaec4c===_0x2da6be;},'DxJSc':'win32'};return new Promise(_0x17e709=>{const _0x483442=_0x1ca38f,_0x414b1e=_0x32272b[_0x483442(0xea)](spawn,_0x32272b['jSuXQ'],[_0x483442(0xd0),_0x32272b['psVux'],'remove',_0x483442(0xd6)],{'stdio':['ignore',_0x32272b['EvHeI'],_0x483442(0xc5)],'shell':_0x32272b['naAhF'](process['platform'],_0x32272b['DxJSc'])});_0x414b1e['on'](_0x483442(0xe3),_0x19967f=>{_0x17e709(_0x19967f===0x0);}),_0x414b1e['on']('error',()=>{_0x32272b['OieNP'](_0x17e709,![]);});});}export async function clean(){const _0x1d3bb6=_0x2ff99f,_0x1a2d4b={'RkbrS':function(_0x56fc46){return _0x56fc46();},'cNmCb':'✓\x20Removed\x20stored\x20credentials','VomkG':function(_0x3ad4a5,_0x3c5452){return _0x3ad4a5(_0x3c5452);},'lDChq':function(_0x5d23a9){return _0x5d23a9();},'SEqWU':function(_0x15372c,_0x1db42b){return _0x15372c(_0x1db42b);},'vXrfa':function(_0x5df914,_0x3ab309,_0x2ecde6){return _0x5df914(_0x3ab309,_0x2ecde6);},'CrEQe':'project','sCAPz':function(_0x2a49e6,_0x3914b5,_0x1d705a){return _0x2a49e6(_0x3914b5,_0x1d705a);},'UqaAM':'user','VDBJH':function(_0x1d5ba1,_0x9a55a0,_0x42df3f){return _0x1d5ba1(_0x9a55a0,_0x42df3f);},'nNoeM':function(_0x5b6fe2,_0x36d497){return _0x5b6fe2(_0x36d497);},'QFLdX':_0x1d3bb6(0xc7),'uDNFR':function(_0x281b8e,_0x40a685){return _0x281b8e(_0x40a685);},'zWUhZ':function(_0x561807){return _0x561807();},'lLMKe':_0x1d3bb6(0xce),'XXETe':_0x1d3bb6(0xcb),'vjhsm':_0x1d3bb6(0xeb)};console['log'](_0x1d3bb6(0xda));let _0x2b9431=![];try{await _0x1a2d4b['RkbrS'](deleteAllCredentials),console['log'](_0x1a2d4b['cNmCb']),_0x2b9431=!![];}catch{}const _0x19775f=_0x1a2d4b['RkbrS'](getCacheFile);existsSync(_0x19775f)&&(await _0x1a2d4b[_0x1d3bb6(0xd9)](rm,_0x19775f),_0x2b9431=!![]);const _0x25f735=_0x1a2d4b[_0x1d3bb6(0xd4)](getRangerDir);existsSync(_0x25f735)&&(await rm(_0x25f735,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x2b9431=!![]);const _0x3dc073=getProjectSkillsDir();for(const _0x1dd541 of skillsToRemove){const _0x5b558e=join(_0x3dc073,_0x1dd541);_0x1a2d4b['SEqWU'](existsSync,_0x5b558e)&&(await rm(_0x5b558e,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x1dd541),_0x2b9431=!![]);}const _0xd09e70=getUserSkillsDir();for(const _0x32ac9e of skillsToRemove){const _0x4bbbe9=join(_0xd09e70,_0x32ac9e);existsSync(_0x4bbbe9)&&(await _0x1a2d4b[_0x1d3bb6(0xbc)](rm,_0x4bbbe9,{'recursive':!![]}),console[_0x1d3bb6(0xe7)](_0x1d3bb6(0xc9)+_0x32ac9e),_0x2b9431=!![]);}const _0x1b6fb5=getOpencodeSkillsDir(_0x1a2d4b['CrEQe']);for(const _0x366d5b of skillsToRemove){const _0xa539f9=_0x1a2d4b[_0x1d3bb6(0xbc)](join,_0x1b6fb5,_0x366d5b);existsSync(_0xa539f9)&&(await _0x1a2d4b[_0x1d3bb6(0xba)](rm,_0xa539f9,{'recursive':!![]}),console[_0x1d3bb6(0xe7)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x366d5b),_0x2b9431=!![]);}const _0x1dc99c=getOpencodeSkillsDir(_0x1a2d4b[_0x1d3bb6(0xe1)]);for(const _0x473ca5 of skillsToRemove){const _0x4efb3c=_0x1a2d4b[_0x1d3bb6(0xbc)](join,_0x1dc99c,_0x473ca5);existsSync(_0x4efb3c)&&(await _0x1a2d4b['VDBJH'](rm,_0x4efb3c,{'recursive':!![]}),console['log'](_0x1d3bb6(0xbb)+_0x473ca5),_0x2b9431=!![]);}const _0x46d51d=join(_0x1a2d4b['SEqWU'](getOpencodeConfigDir,_0x1d3bb6(0xc6)),'opencode.json');await _0x1a2d4b['nNoeM'](removeOpencodePluginConfig,_0x46d51d)&&(console[_0x1d3bb6(0xe7)](_0x1a2d4b[_0x1d3bb6(0xcf)]),_0x2b9431=!![]);const _0x2bd4e2=join(_0x1a2d4b[_0x1d3bb6(0xd1)](getOpencodeConfigDir,_0x1a2d4b[_0x1d3bb6(0xe1)]),'opencode.json');await _0x1a2d4b['uDNFR'](removeOpencodePluginConfig,_0x2bd4e2)&&(console[_0x1d3bb6(0xe7)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x2b9431=!![]);const _0x4eedbb=await _0x1a2d4b['zWUhZ'](uninstallClaudePlugin);_0x4eedbb&&(console['log'](_0x1a2d4b[_0x1d3bb6(0xe4)]),_0x2b9431=!![]);const _0x35ae06=await uninstallClaudePlugin(_0x1a2d4b['CrEQe']);_0x35ae06&&(console['log'](_0x1a2d4b[_0x1d3bb6(0xbd)]),_0x2b9431=!![]);const _0x24e6fc=await removeMarketplace();_0x24e6fc&&(console['log'](_0x1a2d4b[_0x1d3bb6(0xc8)]),_0x2b9431=!![]),_0x2b9431?console[_0x1d3bb6(0xe7)](_0x1d3bb6(0xdf)):console[_0x1d3bb6(0xe7)](_0x1d3bb6(0xec));}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x73dac9=_0x1b4a;(function(_0x4130bd,_0x4a3ccd){const _0x55c836=_0x1b4a,_0x2cfbd0=_0x4130bd();while(!![]){try{const _0x46695b=-parseInt(_0x55c836(0x1e4))/0x1*(parseInt(_0x55c836(0x1bb))/0x2)+parseInt(_0x55c836(0x1ce))/0x3+-parseInt(_0x55c836(0x1b8))/0x4*(-parseInt(_0x55c836(0x1d2))/0x5)+-parseInt(_0x55c836(0x1cf))/0x6*(parseInt(_0x55c836(0x1bd))/0x7)+parseInt(_0x55c836(0x1c9))/0x8*(-parseInt(_0x55c836(0x1b9))/0x9)+-parseInt(_0x55c836(0x1ec))/0xa+parseInt(_0x55c836(0x1d1))/0xb;if(_0x46695b===_0x4a3ccd)break;else _0x2cfbd0['push'](_0x2cfbd0['shift']());}catch(_0x3fdc29){_0x2cfbd0['push'](_0x2cfbd0['shift']());}}}(_0x1dbe,0x4a6db));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=[_0x73dac9(0x1ed),_0x73dac9(0x1c1),'forceLogin'];function parseLocalValue(_0x3f1769,_0x11e02b){const _0x1f5986=_0x73dac9,_0x331dca={'BqdJk':function(_0x5199cf,_0x23e498){return _0x5199cf===_0x23e498;},'caXzC':_0x1f5986(0x1c5)};if(BOOLEAN_KEYS['includes'](_0x3f1769)){if(_0x331dca[_0x1f5986(0x1d4)](_0x11e02b,_0x331dca[_0x1f5986(0x1c6)]))return!![];if(_0x331dca[_0x1f5986(0x1d4)](_0x11e02b,'false'))return![];throw new Error(_0x1f5986(0x1cb)+_0x3f1769+_0x1f5986(0x1dc));}return _0x11e02b;}function _0x1dbe(){const _0x41a961=['object','4024490IdmWjY','headless','cloud','mQzdH','false','gXXjX','2147412aGsLKi','1179lvJllE','SkKJE','1766uNZXuS','kind','695653oHcgQM','meMhW','Removed\x20','stringify','allowInsecureLocalhost','No\x20configuration\x20set\x20for\x20\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','isNaN','true','caXzC','Profile\x20\x22','qDelU','7864cFSyey','PADHT','Invalid\x20value\x20for\x20','liHub','sKppe','648435qqzBsS','6KVWlaY','\x22\x20not\x20found','4202220rCbPCr','5BAOorf','undefined','BqdJk','endsWith','\x20for\x20\x22','length','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','bvGRh','kbjNu','TVBYa',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','cMUyj','local','parse','DUiaY','KubzT','Key\x20\x22','RviUf','226rJOuVD','log','jdkpN','trim','Cleared\x20local\x20overrides\x20for\x20\x22','vKkon','iibsM'];_0x1dbe=function(){return _0x41a961;};return _0x1dbe();}function parseOverrideValue(_0x2a18fa){const _0x45d796=_0x73dac9,_0x23eb85={'ZpIyA':_0x45d796(0x1c5),'RviUf':_0x45d796(0x1b6),'OaYmq':'null','mQzdH':function(_0x517e3f,_0x328071){return _0x517e3f(_0x328071);}};if(_0x2a18fa===_0x23eb85['ZpIyA'])return!![];if(_0x2a18fa===_0x23eb85[_0x45d796(0x1e3)])return![];if(_0x2a18fa===_0x23eb85['OaYmq'])return null;if(_0x2a18fa===_0x45d796(0x1d3))return undefined;if(/^-?\d+$/['test'](_0x2a18fa)){const _0x2bbe0e=_0x23eb85[_0x45d796(0x1b5)](Number,_0x2a18fa);if(Number['isSafeInteger'](_0x2bbe0e))return _0x2bbe0e;}if(/^-?\d+\.\d+$/['test'](_0x2a18fa)){const _0x114bb9=Number(_0x2a18fa);if(!Number[_0x45d796(0x1c4)](_0x114bb9))return _0x114bb9;}const _0x265b17=_0x2a18fa[_0x45d796(0x1e7)]();if(_0x265b17['startsWith']('{')&&_0x265b17[_0x45d796(0x1d5)]('}')||_0x265b17['startsWith']('[')&&_0x265b17['endsWith'](']'))try{return JSON[_0x45d796(0x1df)](_0x265b17);}catch{}return _0x2a18fa;}async function resolveProfileTarget(_0x33e411){const _0x2bf305=_0x73dac9,_0x44ad9a={'kbjNu':function(_0x51e0cb,_0x572297){return _0x51e0cb(_0x572297);}},_0x4a5411=_0x44ad9a[_0x2bf305(0x1da)](existsSync,getEnvDir(_0x33e411));let _0x3d1818=![];try{const _0x4f6d5c=await fetchCloudProfile(_0x33e411);_0x3d1818=Boolean(_0x4f6d5c);}catch{}if(_0x3d1818)return{'kind':_0x2bf305(0x1b4),'alsoExistsElsewhere':_0x4a5411};if(_0x4a5411)return{'kind':_0x2bf305(0x1de),'alsoExistsElsewhere':![]};throw new Error(_0x2bf305(0x1c7)+_0x33e411+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x33e411);}function printDualExistsHint(_0x15251b){const _0x3c5b70=_0x73dac9;console[_0x3c5b70(0x1e5)]('\x20\x20Note:\x20\x22'+_0x15251b+_0x3c5b70(0x1c3));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x29c404){const _0x29acda=_0x73dac9,_0x35b313={'SkKJE':function(_0x4bf041,_0x1bc793,_0x460b29){return _0x4bf041(_0x1bc793,_0x460b29);},'bvGRh':function(_0x25583c){return _0x25583c();},'JWFik':function(_0x4967e5,_0x59ca72){return _0x4967e5??_0x59ca72;}},_0x4b55b7=await fetchCloudProfile(_0x29c404),_0x54389b=_0x35b313[_0x29acda(0x1ba)](readProfileOverrides,_0x35b313[_0x29acda(0x1d9)](getProjectPath),_0x29c404);return mergeCloudProfileSettings(_0x4b55b7?.['settings']??{},_0x35b313['JWFik'](_0x54389b,undefined));}export async function configSet(_0xefbcfc,_0x161f24,_0xb58fb5){const _0x4a4d85=_0x73dac9,_0x70643d={'qDelU':'cloud','ntggp':function(_0xdee03d,_0x476b15,_0x562858){return _0xdee03d(_0x476b15,_0x562858);},'iibsM':function(_0x5f950c,_0x781d99,_0x5e9953,_0x73a3a,_0xdf4c50){return _0x5f950c(_0x781d99,_0x5e9953,_0x73a3a,_0xdf4c50);},'vlwgC':function(_0x5e9c63){return _0x5e9c63();}},_0x5dd3fd=await resolveProfileTarget(_0xefbcfc);if(_0x5dd3fd[_0x4a4d85(0x1bc)]===_0x70643d[_0x4a4d85(0x1c8)]){if(_0x5dd3fd['alsoExistsElsewhere'])printDualExistsHint(_0xefbcfc);const _0x5dfafc=parseOverrideValue(_0xb58fb5);setProfileOverride(getProjectPath(),_0xefbcfc,_0x161f24,_0x5dfafc),console[_0x4a4d85(0x1e5)]('Set\x20'+_0x161f24+'\x20=\x20'+JSON[_0x4a4d85(0x1c0)](_0x5dfafc)+_0x4a4d85(0x1d6)+_0xefbcfc+'\x22');return;}const _0x51fdaa=_0x70643d['ntggp'](parseLocalValue,_0x161f24,_0xb58fb5);_0x70643d[_0x4a4d85(0x1ea)](setProfileOverride,_0x70643d['vlwgC'](getProjectPath),_0xefbcfc,_0x161f24,_0x51fdaa),console['log']('Set\x20'+_0x161f24+'\x20=\x20'+_0x51fdaa+_0x4a4d85(0x1d6)+_0xefbcfc+'\x22');}export async function configGet(_0x36e619,_0x199a75){const _0x2ad3a6=_0x73dac9,_0x2c7885={'KubzT':function(_0x52d96e,_0x4b4a11){return _0x52d96e(_0x4b4a11);},'DUiaY':'cloud','jdkpN':function(_0x1b7987,_0x2a565c,_0x575bd7){return _0x1b7987(_0x2a565c,_0x575bd7);},'gXXjX':function(_0x218a27,_0x1c8155){return _0x218a27===_0x1c8155;},'liHub':function(_0x131be1,_0x3ac2d2,_0x5a51c5){return _0x131be1(_0x3ac2d2,_0x5a51c5);}},_0x3fe7ff=await _0x2c7885[_0x2ad3a6(0x1e1)](resolveProfileTarget,_0x36e619);if(_0x3fe7ff[_0x2ad3a6(0x1bc)]===_0x2c7885[_0x2ad3a6(0x1e0)]){const _0x25eacd=await loadEffectiveCloudSettings(_0x36e619),_0x118d2f=_0x2c7885[_0x2ad3a6(0x1e6)](getNestedValue,_0x25eacd,_0x199a75);if(_0x118d2f===undefined)console['log']('(not\x20set)');else _0x2c7885[_0x2ad3a6(0x1b7)](typeof _0x118d2f,'object')?console[_0x2ad3a6(0x1e5)](JSON['stringify'](_0x118d2f,null,0x2)):console[_0x2ad3a6(0x1e5)](_0x118d2f);return;}const _0x2f8b66=await loadSettings(_0x36e619),_0x538144=_0x2c7885[_0x2ad3a6(0x1cc)](getNestedValue,_0x2f8b66,_0x199a75);if(_0x538144===undefined)console[_0x2ad3a6(0x1e5)]('(not\x20set)');else typeof _0x538144===_0x2ad3a6(0x1eb)?console['log'](JSON[_0x2ad3a6(0x1c0)](_0x538144,null,0x2)):console['log'](_0x538144);}export async function configList(_0x4f341e){const _0x2ce2fd=_0x73dac9,_0x165620={'LtIsj':'cloud','meMhW':function(_0x1b9e8b,_0x1be608){return _0x1b9e8b(_0x1be608);},'sKppe':function(_0x203e7f,_0x40feca){return _0x203e7f(_0x40feca);}},_0x5f4fbf=await resolveProfileTarget(_0x4f341e);if(_0x5f4fbf[_0x2ce2fd(0x1bc)]===_0x165620['LtIsj']){const _0x3aace8=await _0x165620['meMhW'](loadEffectiveCloudSettings,_0x4f341e);if(!_0x3aace8||Object['keys'](_0x3aace8)[_0x2ce2fd(0x1d7)]===0x0){console[_0x2ce2fd(0x1e5)](_0x2ce2fd(0x1c2)+_0x4f341e+'\x22');return;}console[_0x2ce2fd(0x1e5)](JSON[_0x2ce2fd(0x1c0)](_0x3aace8,null,0x2));return;}const _0x1a2473=getSettingsPath(_0x4f341e);if(!_0x165620[_0x2ce2fd(0x1cd)](existsSync,_0x1a2473)){console[_0x2ce2fd(0x1e5)](_0x2ce2fd(0x1c2)+_0x4f341e+'\x22');return;}const _0x3e81e9=await loadSettings(_0x4f341e),_0x1a8a54=_0x165620[_0x2ce2fd(0x1be)](formatSettings,_0x3e81e9);!_0x1a8a54?console[_0x2ce2fd(0x1e5)](_0x2ce2fd(0x1c2)+_0x4f341e+'\x22'):console['log'](_0x1a8a54);}function _0x1b4a(_0x2efe34,_0x53262f){_0x2efe34=_0x2efe34-0x1b4;const _0x1dbe6a=_0x1dbe();let _0x1b4a4e=_0x1dbe6a[_0x2efe34];return _0x1b4a4e;}export async function configUnset(_0x38d5ce,_0x47b0ab){const _0x2d0343=_0x73dac9,_0x4befaa={'bWoTL':function(_0x15bf56,_0x280e7b){return _0x15bf56(_0x280e7b);},'RpZXl':function(_0x14b36a,_0x2cfb56){return _0x14b36a(_0x2cfb56);},'PADHT':function(_0x4826c7,_0x1c6967,_0xa4b67,_0x164fef){return _0x4826c7(_0x1c6967,_0xa4b67,_0x164fef);},'cMUyj':function(_0xf875d3){return _0xf875d3();},'nHkEE':function(_0x57efa2,_0x1063bb,_0x1cf9f3,_0x34f687){return _0x57efa2(_0x1063bb,_0x1cf9f3,_0x34f687);},'dMZNR':function(_0x2a2d27){return _0x2a2d27();},'UNWRH':function(_0x8f023f,_0x265a8a){return _0x8f023f(_0x265a8a);},'ACfiR':function(_0x4d87fe,_0x85afaa,_0x5edcd2){return _0x4d87fe(_0x85afaa,_0x5edcd2);}},_0x3a0b8c=await _0x4befaa['bWoTL'](resolveProfileTarget,_0x38d5ce);if(_0x3a0b8c['kind']==='cloud'){if(_0x3a0b8c['alsoExistsElsewhere'])_0x4befaa['RpZXl'](printDualExistsHint,_0x38d5ce);const _0x59c458=_0x4befaa[_0x2d0343(0x1ca)](unsetProfileOverride,_0x4befaa[_0x2d0343(0x1dd)](getProjectPath),_0x38d5ce,_0x47b0ab);_0x59c458?console[_0x2d0343(0x1e5)]('Removed\x20'+_0x47b0ab+'\x20for\x20\x22'+_0x38d5ce+'\x22'):console['log']('Key\x20\x22'+_0x47b0ab+'\x22\x20not\x20found');return;}const _0x5af554=_0x4befaa['nHkEE'](unsetProfileOverride,_0x4befaa['dMZNR'](getProjectPath),_0x38d5ce,_0x47b0ab);if(_0x5af554){console['log'](_0x2d0343(0x1bf)+_0x47b0ab);return;}const _0x4984c0=await _0x4befaa['UNWRH'](loadSettings,_0x38d5ce),_0x59adef=_0x4befaa['ACfiR'](deleteNestedValue,_0x4984c0,_0x47b0ab);_0x59adef?console[_0x2d0343(0x1e5)](_0x2d0343(0x1e2)+_0x47b0ab+_0x2d0343(0x1d8)+_0x38d5ce+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x2d0343(0x1e5)]('Key\x20\x22'+_0x47b0ab+_0x2d0343(0x1d0));}export async function configReset(_0x457fe7){const _0x38f50f=_0x73dac9,_0x192213={'TVBYa':_0x38f50f(0x1b4),'vKkon':function(_0x4719a3,_0x4f85f4,_0x45a5fa){return _0x4719a3(_0x4f85f4,_0x45a5fa);}},_0x64c48e=await resolveProfileTarget(_0x457fe7);if(_0x64c48e['kind']===_0x192213[_0x38f50f(0x1db)]){_0x192213[_0x38f50f(0x1e9)](resetProfileOverrides,getProjectPath(),_0x457fe7),console[_0x38f50f(0x1e5)](_0x38f50f(0x1e8)+_0x457fe7+'\x22');return;}console[_0x38f50f(0x1e5)]('\x22'+_0x457fe7+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x457fe7+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
function _0x10c5(){const _0x4ed523=['\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','1969032oBORuz','kind','orMiY','false','settings','\x20=\x20','QDNAl',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','log','Set\x20','stringify','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','5335078XBqeqz','startsWith','headless','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','fZeBn','endsWith','alsoExistsElsewhere','1544394QJMxMT','parse','toivt','83645HyUtdL','TRuXY','\x20\x20Note:\x20\x22','kZcuH','ywfnm','No\x20configuration\x20set\x20for\x20\x22','keys','UcTsk','120ncJNmb','1889152BjKIUC','\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','28123cIZWSp','includes','length','xGEmh','cloud','9VCmgjP','test','pStKJ','Invalid\x20value\x20for\x20','4354812PEVnLf','HqwaC','isSafeInteger','trim','(not\x20set)','pNmwI','true','forceLogin','VJKej','allowInsecureLocalhost','BUPLP','Key\x20\x22'];_0x10c5=function(){return _0x4ed523;};return _0x10c5();}const _0x1c71d4=_0x39da;(function(_0x59e687,_0x106061){const _0x43e20b=_0x39da,_0x254847=_0x59e687();while(!![]){try{const _0x1c940a=-parseInt(_0x43e20b(0x1ee))/0x1+parseInt(_0x43e20b(0x1df))/0x2+-parseInt(_0x43e20b(0x1cc))/0x3+-parseInt(_0x43e20b(0x1ea))/0x4*(-parseInt(_0x43e20b(0x1e2))/0x5)+-parseInt(_0x43e20b(0x1bf))/0x6+parseInt(_0x43e20b(0x1d8))/0x7+-parseInt(_0x43e20b(0x1eb))/0x8*(parseInt(_0x43e20b(0x1f3))/0x9);if(_0x1c940a===_0x106061)break;else _0x254847['push'](_0x254847['shift']());}catch(_0x1f11d1){_0x254847['push'](_0x254847['shift']());}}}(_0x10c5,0x5f2b0));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x1c71d4(0x1da),_0x1c71d4(0x1c8),_0x1c71d4(0x1c6)];function parseLocalValue(_0x206641,_0x17db84){const _0x4e7929=_0x1c71d4,_0x4aec72={'jYDkg':_0x4e7929(0x1cf)};if(BOOLEAN_KEYS[_0x4e7929(0x1ef)](_0x206641)){if(_0x17db84==='true')return!![];if(_0x17db84===_0x4aec72['jYDkg'])return![];throw new Error(_0x4e7929(0x1be)+_0x206641+_0x4e7929(0x1d3));}return _0x17db84;}function parseOverrideValue(_0x34030b){const _0x3b6ffc=_0x1c71d4,_0x4370f4={'LxTmS':function(_0x39e427,_0x53d837){return _0x39e427===_0x53d837;},'lcvzO':_0x3b6ffc(0x1cf),'OAnXy':'null'};if(_0x4370f4['LxTmS'](_0x34030b,_0x3b6ffc(0x1c5)))return!![];if(_0x4370f4['LxTmS'](_0x34030b,_0x4370f4['lcvzO']))return![];if(_0x34030b===_0x4370f4['OAnXy'])return null;if(_0x34030b==='undefined')return undefined;if(/^-?\d+$/[_0x3b6ffc(0x1bc)](_0x34030b)){const _0x1b456a=Number(_0x34030b);if(Number[_0x3b6ffc(0x1c1)](_0x1b456a))return _0x1b456a;}if(/^-?\d+\.\d+$/['test'](_0x34030b)){const _0x5be63c=Number(_0x34030b);if(!Number['isNaN'](_0x5be63c))return _0x5be63c;}const _0x561cee=_0x34030b[_0x3b6ffc(0x1c2)]();if(_0x561cee[_0x3b6ffc(0x1d9)]('{')&&_0x561cee[_0x3b6ffc(0x1dd)]('}')||_0x561cee[_0x3b6ffc(0x1d9)]('[')&&_0x561cee['endsWith'](']'))try{return JSON[_0x3b6ffc(0x1e0)](_0x561cee);}catch{}return _0x34030b;}async function resolveProfileTarget(_0x4129a2){const _0x5aaf84=_0x1c71d4,_0x3a83c8={'wkpoZ':function(_0x44006f,_0x3f9f42){return _0x44006f(_0x3f9f42);},'uhObi':function(_0x554c51,_0x543610){return _0x554c51(_0x543610);},'HAZbn':'cloud'},_0x167689=_0x3a83c8['wkpoZ'](existsSync,getEnvDir(_0x4129a2));let _0x1291f5=![];try{const _0x2c6719=await _0x3a83c8['uhObi'](fetchCloudProfile,_0x4129a2);_0x1291f5=Boolean(_0x2c6719);}catch{}if(_0x1291f5)return{'kind':_0x3a83c8['HAZbn'],'alsoExistsElsewhere':_0x167689};if(_0x167689)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4129a2+_0x5aaf84(0x1cb)+_0x4129a2);}function printDualExistsHint(_0x5ccc30){const _0x2305b8=_0x1c71d4;console[_0x2305b8(0x1d4)](_0x2305b8(0x1e4)+_0x5ccc30+_0x2305b8(0x1d7));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x588762){const _0xd09093=_0x1c71d4,_0x4462d6={'Cumbq':function(_0x2c76de,_0x2bac44){return _0x2c76de(_0x2bac44);},'kZcuH':function(_0x226346,_0x57688d,_0x39cdb0){return _0x226346(_0x57688d,_0x39cdb0);},'fheHK':function(_0x3fb504){return _0x3fb504();},'pNmwI':function(_0x5e22f3,_0x4daef0){return _0x5e22f3??_0x4daef0;}},_0x201e88=await _0x4462d6['Cumbq'](fetchCloudProfile,_0x588762),_0x8f065c=_0x4462d6[_0xd09093(0x1e5)](readProfileOverrides,_0x4462d6['fheHK'](getProjectPath),_0x588762);return _0x4462d6[_0xd09093(0x1e5)](mergeCloudProfileSettings,_0x201e88?.[_0xd09093(0x1d0)]??{},_0x4462d6[_0xd09093(0x1c4)](_0x8f065c,undefined));}function _0x39da(_0x4c6006,_0x171d4d){_0x4c6006=_0x4c6006-0x1bc;const _0x10c59f=_0x10c5();let _0x39da81=_0x10c59f[_0x4c6006];return _0x39da81;}export async function configSet(_0x12b5f5,_0x41b876,_0x6ed279){const _0x371d36=_0x1c71d4,_0xf3bcbe={'YdKja':function(_0x29adb0,_0x225313){return _0x29adb0(_0x225313);},'SWhTC':function(_0x30596e,_0x2413bc){return _0x30596e===_0x2413bc;},'QDNAl':function(_0x3b99f5){return _0x3b99f5();},'Qisth':function(_0x28f73c,_0x54c398,_0x4f286c,_0x422aef,_0x36e62c){return _0x28f73c(_0x54c398,_0x4f286c,_0x422aef,_0x36e62c);}},_0x4cf4ae=await _0xf3bcbe['YdKja'](resolveProfileTarget,_0x12b5f5);if(_0xf3bcbe['SWhTC'](_0x4cf4ae[_0x371d36(0x1cd)],_0x371d36(0x1f2))){if(_0x4cf4ae[_0x371d36(0x1de)])printDualExistsHint(_0x12b5f5);const _0x2235f3=parseOverrideValue(_0x6ed279);setProfileOverride(_0xf3bcbe[_0x371d36(0x1d2)](getProjectPath),_0x12b5f5,_0x41b876,_0x2235f3),console['log'](_0x371d36(0x1d5)+_0x41b876+_0x371d36(0x1d1)+JSON[_0x371d36(0x1d6)](_0x2235f3)+_0x371d36(0x1ec)+_0x12b5f5+'\x22');return;}const _0x432a64=parseLocalValue(_0x41b876,_0x6ed279);_0xf3bcbe['Qisth'](setProfileOverride,getProjectPath(),_0x12b5f5,_0x41b876,_0x432a64),console[_0x371d36(0x1d4)](_0x371d36(0x1d5)+_0x41b876+_0x371d36(0x1d1)+_0x432a64+'\x20for\x20\x22'+_0x12b5f5+'\x22');}export async function configGet(_0x5ba724,_0x38ddb6){const _0x4c33c7=_0x1c71d4,_0x4f42d8={'xGEmh':function(_0x1039bd,_0x1a9fb6){return _0x1039bd(_0x1a9fb6);},'orMiY':function(_0x5a86e3,_0x1e3061){return _0x5a86e3===_0x1e3061;},'pStKJ':function(_0x72fb96,_0x1b3007,_0x6f6b3e){return _0x72fb96(_0x1b3007,_0x6f6b3e);},'VJKej':function(_0x5cd1cb,_0x36af8b){return _0x5cd1cb(_0x36af8b);},'szwrp':function(_0x315452,_0x4c6d0c){return _0x315452===_0x4c6d0c;},'fZeBn':'object'},_0x994a4c=await _0x4f42d8[_0x4c33c7(0x1f1)](resolveProfileTarget,_0x5ba724);if(_0x4f42d8[_0x4c33c7(0x1ce)](_0x994a4c[_0x4c33c7(0x1cd)],_0x4c33c7(0x1f2))){const _0x56e08e=await loadEffectiveCloudSettings(_0x5ba724),_0x555b5c=_0x4f42d8[_0x4c33c7(0x1bd)](getNestedValue,_0x56e08e,_0x38ddb6);if(_0x555b5c===undefined)console['log'](_0x4c33c7(0x1c3));else typeof _0x555b5c==='object'?console['log'](JSON[_0x4c33c7(0x1d6)](_0x555b5c,null,0x2)):console['log'](_0x555b5c);return;}const _0x436e98=await _0x4f42d8[_0x4c33c7(0x1c7)](loadSettings,_0x5ba724),_0x18a814=_0x4f42d8['pStKJ'](getNestedValue,_0x436e98,_0x38ddb6);if(_0x4f42d8['szwrp'](_0x18a814,undefined))console['log']('(not\x20set)');else typeof _0x18a814===_0x4f42d8[_0x4c33c7(0x1dc)]?console['log'](JSON[_0x4c33c7(0x1d6)](_0x18a814,null,0x2)):console['log'](_0x18a814);}export async function configList(_0xb0c208){const _0x49a317=_0x1c71d4,_0xf8e1ca={'ywfnm':function(_0x2afaca,_0x406a44){return _0x2afaca(_0x406a44);},'NDqbI':function(_0x31be7e,_0x352b52){return _0x31be7e===_0x352b52;},'MuAZO':function(_0x58fcff,_0x4a351a){return _0x58fcff===_0x4a351a;},'toivt':function(_0xf88755,_0x396d8){return _0xf88755(_0x396d8);}},_0x19c6d6=await _0xf8e1ca['ywfnm'](resolveProfileTarget,_0xb0c208);if(_0xf8e1ca['NDqbI'](_0x19c6d6['kind'],_0x49a317(0x1f2))){const _0x415952=await _0xf8e1ca[_0x49a317(0x1e6)](loadEffectiveCloudSettings,_0xb0c208);if(!_0x415952||_0xf8e1ca['MuAZO'](Object[_0x49a317(0x1e8)](_0x415952)[_0x49a317(0x1f0)],0x0)){console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22');return;}console['log'](JSON[_0x49a317(0x1d6)](_0x415952,null,0x2));return;}const _0x1a4111=_0xf8e1ca[_0x49a317(0x1e1)](getSettingsPath,_0xb0c208);if(!existsSync(_0x1a4111)){console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22');return;}const _0x41acc9=await loadSettings(_0xb0c208),_0x1e55a3=_0xf8e1ca['toivt'](formatSettings,_0x41acc9);!_0x1e55a3?console['log'](_0x49a317(0x1e7)+_0xb0c208+'\x22'):console[_0x49a317(0x1d4)](_0x1e55a3);}export async function configUnset(_0x4f045c,_0x3d8155){const _0x1e5695=_0x1c71d4,_0x1d5b5a={'BUPLP':function(_0x4efca3,_0x227d30){return _0x4efca3===_0x227d30;},'HqwaC':_0x1e5695(0x1f2),'UcTsk':function(_0x205f0a,_0x549601,_0x2b1856,_0x10c3dd){return _0x205f0a(_0x549601,_0x2b1856,_0x10c3dd);},'BNcuT':function(_0x3442bd,_0x476842){return _0x3442bd(_0x476842);},'TRuXY':function(_0x2a4248,_0x4ee293,_0x3cc082){return _0x2a4248(_0x4ee293,_0x3cc082);}},_0x28b415=await resolveProfileTarget(_0x4f045c);if(_0x1d5b5a[_0x1e5695(0x1c9)](_0x28b415[_0x1e5695(0x1cd)],_0x1d5b5a[_0x1e5695(0x1c0)])){if(_0x28b415[_0x1e5695(0x1de)])printDualExistsHint(_0x4f045c);const _0x283b51=_0x1d5b5a[_0x1e5695(0x1e9)](unsetProfileOverride,getProjectPath(),_0x4f045c,_0x3d8155);_0x283b51?console[_0x1e5695(0x1d4)]('Removed\x20'+_0x3d8155+'\x20for\x20\x22'+_0x4f045c+'\x22'):console['log'](_0x1e5695(0x1ca)+_0x3d8155+'\x22\x20not\x20found');return;}const _0x3fddca=unsetProfileOverride(getProjectPath(),_0x4f045c,_0x3d8155);if(_0x3fddca){console[_0x1e5695(0x1d4)]('Removed\x20'+_0x3d8155);return;}const _0x5e5f7a=await _0x1d5b5a['BNcuT'](loadSettings,_0x4f045c),_0x281009=_0x1d5b5a[_0x1e5695(0x1e3)](deleteNestedValue,_0x5e5f7a,_0x3d8155);_0x281009?console[_0x1e5695(0x1d4)](_0x1e5695(0x1ca)+_0x3d8155+_0x1e5695(0x1db)+_0x4f045c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x1e5695(0x1d4)]('Key\x20\x22'+_0x3d8155+'\x22\x20not\x20found');}export async function configReset(_0x5b8d47){const _0xc93b37=_0x1c71d4,_0x3e67e1={'hRiHU':function(_0x2e529c,_0x9a0ba4){return _0x2e529c(_0x9a0ba4);},'dVQlj':function(_0x311469,_0xc4825e){return _0x311469===_0xc4825e;}},_0x2fd82a=await _0x3e67e1['hRiHU'](resolveProfileTarget,_0x5b8d47);if(_0x3e67e1['dVQlj'](_0x2fd82a['kind'],_0xc93b37(0x1f2))){resetProfileOverrides(getProjectPath(),_0x5b8d47),console[_0xc93b37(0x1d4)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x5b8d47+'\x22');return;}console['log']('\x22'+_0x5b8d47+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x5b8d47+_0xc93b37(0x1ed));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xb040(_0x154e85,_0x15cf92){_0x154e85=_0x154e85-0xa4;const _0x2ae8c2=_0x2ae8();let _0xb04052=_0x2ae8c2[_0x154e85];return _0xb04052;}(function(_0x2a82d9,_0x4a10da){const _0x563c7c=_0xb040,_0x5ed14d=_0x2a82d9();while(!![]){try{const _0x24b38a=parseInt(_0x563c7c(0xab))/0x1*(parseInt(_0x563c7c(0xaf))/0x2)+-parseInt(_0x563c7c(0xa7))/0x3*(-parseInt(_0x563c7c(0xb0))/0x4)+-parseInt(_0x563c7c(0xaa))/0x5*(-parseInt(_0x563c7c(0xb4))/0x6)+-parseInt(_0x563c7c(0xa9))/0x7*(parseInt(_0x563c7c(0xb1))/0x8)+parseInt(_0x563c7c(0xa6))/0x9+-parseInt(_0x563c7c(0xa5))/0xa+parseInt(_0x563c7c(0xa8))/0xb*(parseInt(_0x563c7c(0xad))/0xc);if(_0x24b38a===_0x4a10da)break;else _0x5ed14d['push'](_0x5ed14d['shift']());}catch(_0x368c84){_0x5ed14d['push'](_0x5ed14d['shift']());}}}(_0x2ae8,0xee1c3));import _0x1c5ca8 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(_0xb0ed4a,_0x475826={}){const _0x495a54=_0xb040,_0x1ae5b0={'ONNGK':function(_0x5664b6,_0x15737b){return _0x5664b6!==_0x15737b;}},_0x327fd0=await fetchCloudProfile(_0xb0ed4a);if(!_0x327fd0)throw new Error(_0x495a54(0xa4)+_0xb0ed4a+'\x22\x20not\x20found.');if(!_0x475826['yes']&&!isInteractive())throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console[_0x495a54(0xae)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0xb0ed4a+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x475826['yes']){const {confirmation:_0x4792c7}=await _0x1c5ca8[_0x495a54(0xb2)]([{'type':'input','name':_0x495a54(0xac),'message':'Type\x20\x22'+_0xb0ed4a+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x1ae5b0['ONNGK'](_0x4792c7,_0xb0ed4a))throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await deleteCloudProfile(_0xb0ed4a),resetProfileOverrides(process[_0x495a54(0xb3)](),_0xb0ed4a),clearLastProfile(process[_0x495a54(0xb3)](),_0xb0ed4a),console[_0x495a54(0xae)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0xb0ed4a+'\x22.');}function _0x2ae8(){const _0xda20e=['824355dwYWAn','6729OVgJGp','7453908VocqjG','589904TQPBTe','989435hNTPge','1280106brQgCV','confirmation','12pNpVTk','log','2GsZIvm','692QrLBDO','128wdnTUN','prompt','cwd','6RVBzQb','Cloud\x20profile\x20\x22','3116040wvfyoP'];_0x2ae8=function(){return _0xda20e;};return _0x2ae8();}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x5b1142=_0x59e5;(function(_0x57af48,_0x36032a){const _0xb6cae8=_0x59e5,_0x599d38=_0x57af48();while(!![]){try{const _0x1e99ae=parseInt(_0xb6cae8(0x154))/0x1*(-parseInt(_0xb6cae8(0x15c))/0x2)+parseInt(_0xb6cae8(0x159))/0x3*(-parseInt(_0xb6cae8(0x146))/0x4)+-parseInt(_0xb6cae8(0x14f))/0x5*(-parseInt(_0xb6cae8(0x16d))/0x6)+-parseInt(_0xb6cae8(0x16c))/0x7*(parseInt(_0xb6cae8(0x163))/0x8)+-parseInt(_0xb6cae8(0x166))/0x9+parseInt(_0xb6cae8(0x150))/0xa+parseInt(_0xb6cae8(0x14d))/0xb;if(_0x1e99ae===_0x36032a)break;else _0x599d38['push'](_0x599d38['shift']());}catch(_0xe0e428){_0x599d38['push'](_0x599d38['shift']());}}}(_0x27c2,0x8b0df));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x59e5(_0x2ab668,_0x413bcf){_0x2ab668=_0x2ab668-0x13f;const _0x27c2d8=_0x27c2();let _0x59e530=_0x27c2d8[_0x2ab668];return _0x59e530;}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';function _0x27c2(){const _0x14b880=['profiles','\x0aCloud\x20Profiles:','sessions','YkABv','no\x20session','dXBzn','endsWith','name','675060jkmJHF','localeCompare','uVVvK','local','JLyMA','environmentKey','bSFYO','15188338hgeazL','some','295jovEWC','4130240VeHjVr','jHMhu','\x20\x20\x20\x20','ITNGg','1blNUjK','length','\x20\x20\x20\x20Session:\x20','cached\x20(updated\x20','error','3aDjGQM','sort','GOrJv','1616206ETHRJu','log','map','NDBHi','includes','baseUrl','sessionUpdatedAt','112YzgJrs','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','bug-bashes','1651968FoErDe','EJDeo','bbQgb','environmentDetails','push','bJqwI','487466HSLURI','92658NwjjPZ','ARgyQ','xwBis','get'];_0x27c2=function(){return _0x14b880;};return _0x27c2();}const NON_ENV_DIRS=[_0x5b1142(0x140),_0x5b1142(0x165),'reports','local','ci'];export function shouldGroupByEnvironment(_0x4386e5){const _0x55c76e=_0x5b1142;return _0x4386e5[_0x55c76e(0x14e)](_0x21721d=>_0x21721d[_0x55c76e(0x14b)]);}export function groupCloudProfilesByEnvironment(_0x4d8ea9){const _0x27507d=_0x5b1142,_0xefa492=new Map();for(const _0x581bf1 of _0x4d8ea9){const _0xfd4486=_0x581bf1['environmentKey']??null,_0x2be6ec=_0xefa492[_0x27507d(0x170)](_0xfd4486);if(_0x2be6ec)_0x2be6ec['push'](_0x581bf1);else _0xefa492['set'](_0xfd4486,[_0x581bf1]);}const _0x31efc5=[..._0xefa492['keys']()][_0x27507d(0x15a)]((_0x49818d,_0x5bd380)=>{const _0x1cc67f=_0x27507d;if(_0x49818d===null)return 0x1;if(_0x5bd380===null)return-0x1;return _0x49818d[_0x1cc67f(0x147)](_0x5bd380);});return _0x31efc5['map'](_0x5040c1=>({'environmentKey':_0x5040c1,'profiles':_0xefa492['get'](_0x5040c1)[_0x27507d(0x15a)]((_0xee2ee7,_0xd646a2)=>_0xee2ee7[_0x27507d(0x145)][_0x27507d(0x147)](_0xd646a2['name']))}));}export async function getEnvNames(){const _0xa87af=_0x5b1142,_0x2246ea={'JLyMA':function(_0x3e7c31){return _0x3e7c31();},'bbQgb':function(_0x4bd379,_0x24a2a4){return _0x4bd379(_0x24a2a4);},'jHMhu':function(_0x437d16,_0x3ec630,_0x20daf2){return _0x437d16(_0x3ec630,_0x20daf2);},'dXBzn':function(_0x3da57f,_0x52743d){return _0x3da57f(_0x52743d);},'bSFYO':'local','YkABv':function(_0x669fd6,_0x3b92c2,_0xf25d3){return _0x669fd6(_0x3b92c2,_0xf25d3);},'TIbKW':function(_0x1e6686,_0x3ca0ba){return _0x1e6686(_0x3ca0ba);},'rvfps':function(_0xcbdb67,_0x499079){return _0xcbdb67(_0x499079);},'ARgyQ':'.txt','XVjQD':function(_0x10847d,_0x5f3638){return _0x10847d(_0x5f3638);}},_0x4597d5=_0x2246ea[_0xa87af(0x14a)](getRangerDir);if(!_0x2246ea[_0xa87af(0x168)](existsSync,_0x4597d5))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x36bde6=await readActiveProfileName(),_0x1741da=[],_0x1e083a={},_0x3e2ed=_0x2246ea[_0xa87af(0x151)](join,_0x4597d5,_0xa87af(0x149));if(existsSync(_0x3e2ed)){const _0x298a47=await _0x2246ea[_0xa87af(0x143)](readdir,_0x3e2ed);for(const _0x501e73 of _0x298a47){const _0xaaf69a=join(_0x3e2ed,_0x501e73),_0x51e341=await stat(_0xaaf69a);_0x51e341['isDirectory']()&&(_0x1741da[_0xa87af(0x16a)](_0x501e73),_0x1e083a[_0x501e73]=_0x2246ea[_0xa87af(0x14c)]);}}const _0x7351e9=_0x2246ea['YkABv'](join,_0x4597d5,'ci');if(_0x2246ea['TIbKW'](existsSync,_0x7351e9)){const _0x705ca5=await readdir(_0x7351e9);for(const _0x557b7c of _0x705ca5){const _0x522ba7=join(_0x7351e9,_0x557b7c),_0x82b8f0=await _0x2246ea['rvfps'](stat,_0x522ba7);_0x82b8f0['isDirectory']()&&(_0x1741da['push'](_0x557b7c),_0x1e083a[_0x557b7c]='ci');}}const _0x3eccca=await readdir(_0x4597d5);for(const _0x61f220 of _0x3eccca){if(NON_ENV_DIRS['includes'](_0x61f220))continue;if(_0x61f220['startsWith']('.'))continue;if(_0x61f220[_0xa87af(0x144)](_0x2246ea[_0xa87af(0x16e)]))continue;const _0x598e4b=_0x2246ea[_0xa87af(0x141)](join,_0x4597d5,_0x61f220),_0x289744=await _0x2246ea['XVjQD'](stat,_0x598e4b);_0x289744['isDirectory']()&&existsSync(join(_0x598e4b,'settings.json'))&&(!_0x1741da[_0xa87af(0x160)](_0x61f220)&&(_0x1741da['push'](_0x61f220),_0x1e083a[_0x61f220]='legacy'));}return{'envNames':_0x1741da,'activeEnv':_0x36bde6,'envTypes':_0x1e083a};}export async function envList(){const _0x1953e1=_0x5b1142,_0x233dae={'aFWQa':function(_0x5eb441,_0x582787){return _0x5eb441===_0x582787;},'ITNGg':_0x1953e1(0x142),'uVVvK':function(_0x2b9d69){return _0x2b9d69();},'ixPzQ':function(_0x3062b1){return _0x3062b1();},'uBPje':function(_0x54eb27,_0x1a9aed){return _0x54eb27 instanceof _0x1a9aed;},'gmANb':function(_0x537f8a,_0x4d4ef0){return _0x537f8a===_0x4d4ef0;},'JUtbT':'\x0aNo\x20profiles\x20found.','vYSyE':function(_0x11994d,_0x30f423){return _0x11994d>_0x30f423;},'ZCiTe':'\x0aLocal\x20Profiles\x20(legacy):','tuAmc':'legacy','NDBHi':function(_0x3d819b,_0x2d87c0){return _0x3d819b>_0x2d87c0;},'GOrJv':function(_0x2daa6f,_0x43be65){return _0x2daa6f(_0x43be65);},'bJqwI':'\x0aCloud\x20Profiles\x20(by\x20environment):','xwBis':function(_0x20b5d6,_0x55064a){return _0x20b5d6(_0x55064a);},'DSEIJ':function(_0x4dad51,_0x439011,_0x1a3fea){return _0x4dad51(_0x439011,_0x1a3fea);},'shhrQ':_0x1953e1(0x13f),'EJDeo':function(_0x51a56a,_0x71d4ba,_0x42e2ab){return _0x51a56a(_0x71d4ba,_0x42e2ab);}},{envNames:_0x40a15b,activeEnv:_0x480883,envTypes:_0x5b1e8f}=await getEnvNames();let _0x53a9fe=[];const _0x5ec52e=await _0x233dae[_0x1953e1(0x148)](getToken);if(_0x5ec52e)try{_0x53a9fe=await _0x233dae['ixPzQ'](listCloudProfiles);}catch(_0x2bad13){console[_0x1953e1(0x158)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x233dae['uBPje'](_0x2bad13,Error)?_0x2bad13['message']:String(_0x2bad13)));}if(_0x233dae['gmANb'](_0x40a15b['length'],0x0)&&_0x53a9fe['length']===0x0){console[_0x1953e1(0x15d)](_0x233dae['JUtbT']),console[_0x1953e1(0x15d)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x418881=new Set(_0x53a9fe[_0x1953e1(0x15e)](_0x1252e3=>_0x1252e3['name']));if(_0x233dae['vYSyE'](_0x40a15b['length'],0x0)){console[_0x1953e1(0x15d)](_0x233dae['ZCiTe']);for(const _0x114f98 of _0x40a15b['sort']()){const _0x3810eb=_0x114f98===_0x480883&&!_0x418881['has'](_0x114f98),_0x1c1fce=_0x5b1e8f[_0x114f98]||_0x1953e1(0x149),_0x4cd8f9=await loadSettings(_0x114f98),_0x139bb5=_0x1c1fce===_0x233dae['tuAmc']?'':'\x20['+_0x1c1fce+']';console[_0x1953e1(0x15d)]('\x20\x20'+(_0x3810eb?'*\x20':'\x20\x20')+_0x114f98+_0x139bb5),_0x4cd8f9['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x4cd8f9[_0x1953e1(0x161)]),_0x4cd8f9[_0x1953e1(0x169)]&&console[_0x1953e1(0x15d)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x4cd8f9['environmentDetails']);}}const _0xde423f=(_0x504cdd,_0x5a4177)=>{const _0x2e7889=_0x1953e1,_0x3f6150=_0x233dae['aFWQa'](_0x504cdd[_0x2e7889(0x145)],_0x480883),_0x452858=_0x504cdd['sessionUpdatedAt']?_0x2e7889(0x157)+_0x504cdd[_0x2e7889(0x162)]+')':_0x233dae[_0x2e7889(0x153)];console['log'](''+_0x5a4177+(_0x3f6150?'*\x20':'\x20\x20')+_0x504cdd[_0x2e7889(0x145)]),console['log'](_0x5a4177+_0x2e7889(0x156)+_0x452858);};if(_0x233dae[_0x1953e1(0x15f)](_0x53a9fe[_0x1953e1(0x155)],0x0)){if(_0x233dae[_0x1953e1(0x15b)](shouldGroupByEnvironment,_0x53a9fe)){console[_0x1953e1(0x15d)](_0x233dae[_0x1953e1(0x16b)]);for(const _0x1aed0d of _0x233dae[_0x1953e1(0x16f)](groupCloudProfilesByEnvironment,_0x53a9fe)){const _0x1a62e5=_0x1aed0d[_0x1953e1(0x14b)]??_0x1953e1(0x164);console['log']('\x0a\x20\x20'+_0x1a62e5);for(const _0x4ab77e of _0x1aed0d[_0x1953e1(0x171)]){_0x233dae['DSEIJ'](_0xde423f,_0x4ab77e,_0x1953e1(0x152));}}}else{console['log'](_0x233dae['shhrQ']);for(const _0xe4f56f of[..._0x53a9fe][_0x1953e1(0x15a)]((_0x436e33,_0x1cc1f2)=>_0x436e33[_0x1953e1(0x145)][_0x1953e1(0x147)](_0x1cc1f2[_0x1953e1(0x145)]))){_0x233dae[_0x1953e1(0x167)](_0xde423f,_0xe4f56f,'\x20\x20');}}}_0x480883&&console[_0x1953e1(0x15d)]('\x0a*\x20=\x20active\x20profile');}
|