@ranger-testing/ranger-cli 3.0.1-alpha.ffffb5b-28 → 3.1.1-alpha.08fb70e-39
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 -0
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -0
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -0
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
- package/package.json +4 -1
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x22f8(){const _0x1ab778=['What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','retry','rvhKC','signal','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','NODE_TLS_REJECT_UNAUTHORIZED','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','Could\x20not\x20reach\x20','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','confirm','✓\x20Cloud\x20profile\x20\x27','message','167643RqplFC','ulhJz','bNlES','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','KZPsE','rdGLm','fzbuA','\x27\x20to\x20the\x20cloud?','length','CzdLr','HTTP\x20','yes','.\x20Configured\x20envs:\x20','Qqptq','error','121098rPVxid','http://localhost:3000','lUoVJ','profile.add.autoRouteSkipped','baseUrl','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','profile.add.autoRouted','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','wvFCd','PCiCD','\x22:\x20','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','KISKC','148962xPhFGg','4xaEOZz','isProtocolError','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x27\x20matching\x20','test','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','capture','abort','nsDHM','HdQxs','url','MEAQg','includes','slice','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','Enter\x20a\x20different\x20URL','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','ENRny','origin','use_suggestion','22lRGymG','82354veSgNe','\x0a\x20\x20(domains:\x20','6204056czcSKG','trim','env','jdike','WlDtr','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','some','\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','startsWith','500iYnEeB','\x20\x20https://docs.ranger.net/main/concepts/profiles','115HvrXUl','CFNtz','\x20\x20Set\x20active\x20profile:\x20','keys','exit','Found\x20auth\x20environment\x20\x27','TypeError','What\x20would\x20you\x20like\x20to\x20do?','continue','\x0a🌐\x20Profile\x20Setup\x0a','xzjfL','izqAs','log','trackPhaseEnd','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','setupHeader','ZOhBj','manual','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','TiwWj','xzfik','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x27\x20created.\x0a','indexOf','stdout','\x20\x20Did\x20you\x20mean\x20','status','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','rBVWJ',')\x0a\x20\x20Save\x20\x27','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','AeJFC','jIcwM','prompt','ZeiFZ','`\x20again\x20without\x20--skip-auth.','5348844wQeLgq','environments','3210270VOcXIL','zxbDE','setupHeaders','action','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'];_0x22f8=function(){return _0x1ab778;};return _0x22f8();}(function(_0x33fc3b,_0x522b2d){const _0xcf4a5=_0x144c,_0x3e462b=_0x33fc3b();while(!![]){try{const _0x95d1dd=-parseInt(_0xcf4a5(0x14f))/0x1*(-parseInt(_0xcf4a5(0x14e))/0x2)+parseInt(_0xcf4a5(0x11b))/0x3*(parseInt(_0xcf4a5(0x139))/0x4)+parseInt(_0xcf4a5(0x15c))/0x5*(parseInt(_0xcf4a5(0x12a))/0x6)+-parseInt(_0xcf4a5(0x108))/0x7+parseInt(_0xcf4a5(0x151))/0x8+-parseInt(_0xcf4a5(0x181))/0x9+parseInt(_0xcf4a5(0x15a))/0xa*(-parseInt(_0xcf4a5(0x138))/0xb);if(_0x95d1dd===_0x522b2d)break;else _0x3e462b['push'](_0x3e462b['shift']());}catch(_0x11aa32){_0x3e462b['push'](_0x3e462b['shift']());}}}(_0x22f8,0x731a9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0xcaaa0d 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';function _0x144c(_0x38f5bf,_0x5bc1c1){_0x38f5bf=_0x38f5bf-0x107;const _0x22f808=_0x22f8();let _0x144c7a=_0x22f808[_0x38f5bf];return _0x144c7a;}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 _0x20de59=_0x144c;if(!process[_0x20de59(0x175)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2f32eb){const _0x5e6fd6=_0x144c,_0x5f0ba8={'mBztA':function(_0x3a8db6,_0x3ecc74){return _0x3a8db6(_0x3ecc74);},'EOsxk':function(_0x2716a6,_0x1a8692){return _0x2716a6===_0x1a8692;},'zxbDE':_0x5e6fd6(0x162),'SrPUx':'fetch\x20failed'};try{const _0x1940a3=new AbortController(),_0xefa1ab=setTimeout(()=>_0x1940a3[_0x5e6fd6(0x140)](),0x1388),_0x132f72={'method':'HEAD','signal':_0x1940a3[_0x5e6fd6(0x111)],'redirect':_0x5e6fd6(0x16d)};/^https:\/\/localhost(:\d+)?/i[_0x5e6fd6(0x13d)](_0x2f32eb)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x2fae37=await fetch(_0x2f32eb,_0x132f72);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x5f0ba8['mBztA'](clearTimeout,_0xefa1ab);if(_0x2fae37['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x5e6fd6(0x125)+_0x2fae37['status']};}catch(_0x4493e9){delete process[_0x5e6fd6(0x153)][_0x5e6fd6(0x113)];const _0x43c470=_0x4493e9,_0x38c02e=_0x43c470[_0x5e6fd6(0x11a)]||String(_0x4493e9),_0xd1b81b=_0x38c02e[_0x5e6fd6(0x145)]('Invalid\x20URL')||_0x5f0ba8['EOsxk'](_0x43c470['name'],_0x5f0ba8[_0x5e6fd6(0x109)])||_0x38c02e[_0x5e6fd6(0x145)](_0x5f0ba8['SrPUx']);return{'ok':![],'error':_0x38c02e,'isProtocolError':_0xd1b81b};}}async function sweepOrphanLocalProfile(_0x29b531,_0x4cce61,_0x27d73d){const _0x52f190=_0x144c,_0x21bcb6={'xzfik':function(_0x25ce35,_0x423ee7,_0x5e09f1){return _0x25ce35(_0x423ee7,_0x5e09f1);},'lxTIz':function(_0x54f7bd,_0xc7d3f4){return _0x54f7bd(_0xc7d3f4);}},_0x5df04d=join(_0x4cce61,'local'),_0x559cce=_0x21bcb6[_0x52f190(0x171)](join,_0x5df04d,_0x29b531);_0x21bcb6['lxTIz'](existsSync,_0x559cce)&&(_0x27d73d&&await _0x21bcb6['lxTIz'](isPathGitTracked,_0x559cce)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x559cce+_0x52f190(0x13b)):(await rm(_0x559cce,{'recursive':!![],'force':!![]}),console[_0x52f190(0x168)](_0x52f190(0x172)+_0x559cce)));if(_0x21bcb6['lxTIz'](existsSync,_0x5df04d)){let _0x2f7348=[];try{_0x2f7348=await readdir(_0x5df04d);}catch{return;}const _0x1d3911='.tmp-'+_0x29b531+'-';for(const _0x2157a6 of _0x2f7348){if(!_0x2157a6[_0x52f190(0x159)](_0x1d3911))continue;const _0x260e16=join(_0x5df04d,_0x2157a6);await _0x21bcb6['xzfik'](rm,_0x260e16,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x260e16);}}}async function sweepOrphansBestEffort(_0x434bde){const _0x59d3b8=_0x144c,_0x460c35={'WlDtr':function(_0x180e64){return _0x180e64();},'EaGqI':function(_0x8b0fc3){return _0x8b0fc3();},'nsDHM':function(_0x2770fb,_0x263d13,_0x4292c5,_0x3c7aac){return _0x2770fb(_0x263d13,_0x4292c5,_0x3c7aac);},'MUYDL':function(_0x5032a7,_0x5b2c13){return _0x5032a7 instanceof _0x5b2c13;}};try{await sweepOrphanLocalProfile(_0x434bde,_0x460c35[_0x59d3b8(0x155)](getRangerHomeDir),![]);const _0x28c9ff=_0x460c35[_0x59d3b8(0x155)](getRangerDir);_0x28c9ff!==_0x460c35['EaGqI'](getRangerHomeDir)&&await _0x460c35[_0x59d3b8(0x141)](sweepOrphanLocalProfile,_0x434bde,_0x28c9ff,!![]);}catch(_0x361a8e){console['log'](_0x59d3b8(0x117)+(_0x460c35['MUYDL'](_0x361a8e,Error)?_0x361a8e['message']:String(_0x361a8e))+').');}}async function markActive(_0x4e4ddb){const _0x3bdfce=_0x144c;try{await writeActiveProfileName(_0x4e4ddb),console[_0x3bdfce(0x168)](_0x3bdfce(0x15e)+_0x4e4ddb);}catch{console['log'](_0x3bdfce(0x11e));}}async function tryAutoRouteCloudProfile(_0x359882,_0x49f055,_0x4b1edc,_0x2a725f,_0x436e68){const _0x26b9a2=_0x144c,_0x185e6f={'icEpf':function(_0x417285,_0x44c2a0){return _0x417285===_0x44c2a0;},'WYubN':function(_0x51a56d){return _0x51a56d();},'rdGLm':'no_auth_config','makKZ':function(_0x159f84,_0x4a2449){return _0x159f84 instanceof _0x4a2449;},'wvFCd':function(_0x203a03,_0x3976c8){return _0x203a03(_0x3976c8);},'AiCLJ':function(_0x3911f8,_0x48a941){return _0x3911f8===_0x48a941;},'DuskY':function(_0x4548cc,_0x3adb91,_0x2b2442,_0x21879c,_0x501caf){return _0x4548cc(_0x3adb91,_0x2b2442,_0x21879c,_0x501caf);},'KAuzA':function(_0x3893fb,_0xf176d3){return _0x3893fb+_0xf176d3;},'xzjfL':_0x26b9a2(0x158),'izqAs':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','XNuKY':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','rBVWJ':'no_match','Qqptq':_0x26b9a2(0x12d),'AeJFC':'user_declined','fbgCZ':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','CzdLr':function(_0x575d1c,_0x2063e0){return _0x575d1c instanceof _0x2063e0;},'KZPsE':function(_0x23c6ce,_0x458a4b){return _0x23c6ce(_0x458a4b);}};let _0x4fad8d;try{_0x4fad8d=await _0x185e6f['WYubN'](fetchAuthConfig);}catch(_0x2db9d4){return _0x436e68?.[_0x26b9a2(0x169)](_0x26b9a2(0x12d),{'reason':_0x185e6f[_0x26b9a2(0x120)],'profileName':_0x359882}),console['error'](_0x26b9a2(0x17b)+(_0x185e6f['makKZ'](_0x2db9d4,Error)?_0x2db9d4[_0x26b9a2(0x11a)]:_0x185e6f[_0x26b9a2(0x133)](String,_0x2db9d4))),![];}if(!_0x4fad8d||!_0x4fad8d[_0x26b9a2(0x107)]||_0x185e6f['AiCLJ'](Object[_0x26b9a2(0x15f)](_0x4fad8d[_0x26b9a2(0x107)])['length'],0x0)){if(_0x2a725f)return await _0x185e6f['DuskY'](captureEnvLessProfile,_0x359882,_0x49f055,_0x4b1edc,_0x436e68);return _0x436e68?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x185e6f['rdGLm'],'profileName':_0x359882}),console['error'](_0x185e6f['KAuzA'](_0x185e6f[_0x26b9a2(0x166)]+'\x0a'+_0x26b9a2(0x131)+(_0x26b9a2(0x136)+_0x359882+'\x20--url\x20'+_0x49f055+'\x20--skip-auth\x0a')+'\x0a',_0x185e6f[_0x26b9a2(0x167)])+_0x185e6f['XNuKY']),![];}const _0x506529=matchAuthEnvironment(_0x49f055,_0x4fad8d);if(!_0x506529)return _0x436e68?.[_0x26b9a2(0x169)](_0x26b9a2(0x12d),{'reason':_0x185e6f[_0x26b9a2(0x179)],'profileName':_0x359882}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x49f055+_0x26b9a2(0x127)+Object[_0x26b9a2(0x15f)](_0x4fad8d['environments'])['join'](',\x20')+'.'),![];const _0x27c711=_0x4fad8d[_0x26b9a2(0x107)][_0x506529],_0x49d669=_0x27c711?.['domains']??[];if(_0x2a725f&&!_0x4b1edc[_0x26b9a2(0x126)]){const {saveToCloud:_0xdddb43}=await _0xcaaa0d['prompt']([{'type':_0x26b9a2(0x118),'name':'saveToCloud','message':_0x26b9a2(0x161)+_0x506529+_0x26b9a2(0x13c)+_0x49f055+_0x26b9a2(0x150)+_0x49d669['join'](',\x20')+_0x26b9a2(0x17a)+_0x359882+_0x26b9a2(0x122),'default':!![]}]);if(!_0xdddb43)return _0x436e68?.[_0x26b9a2(0x169)](_0x185e6f[_0x26b9a2(0x128)],{'reason':_0x185e6f[_0x26b9a2(0x17c)],'profileName':_0x359882}),console['error'](_0x185e6f['fbgCZ']),![];}const _0x81f672=_0x49d669[_0x26b9a2(0x157)](_0x49cf07=>{const _0x2811cd=_0x26b9a2;try{return _0x185e6f['icEpf'](new URL(_0x49cf07)['origin'],new URL(_0x49f055)[_0x2811cd(0x14c)]);}catch{return![];}}),_0x256927={};!_0x81f672&&(_0x256927[_0x26b9a2(0x12e)]=_0x49f055);try{await createCloudProfile(_0x359882,_0x506529,{'settings':_0x256927}),warnCloudProfileSharedInOrg();}catch(_0x16acc6){if(_0x185e6f[_0x26b9a2(0x124)](_0x16acc6,ApiError)&&_0x185e6f['AiCLJ'](_0x16acc6['status'],0x199)){console[_0x26b9a2(0x129)](_0x26b9a2(0x16e)+_0x359882+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x359882));throw _0x16acc6;}throw _0x16acc6;}return console[_0x26b9a2(0x168)]('✓\x20Profile\x20\x27'+_0x359882+_0x26b9a2(0x173)+(_0x26b9a2(0x112)+_0x359882)),await _0x185e6f[_0x26b9a2(0x11f)](sweepOrphansBestEffort,_0x359882),_0x436e68?.['trackPhaseEnd'](_0x26b9a2(0x130),{'envKey':_0x506529,'profileName':_0x359882}),!![];}async function createUnconfiguredCloudProfile(_0x312005,_0x573f04){const _0x135bf2=_0x144c,_0x45429c={'wCraM':function(_0x2eea96){return _0x2eea96();},'CFNtz':function(_0x476196,_0xe47dd2){return _0x476196 instanceof _0xe47dd2;}};try{await createCloudProfile(_0x312005,undefined,{'settings':_0x573f04}),_0x45429c['wCraM'](warnCloudProfileSharedInOrg);}catch(_0x5303e4){_0x45429c[_0x135bf2(0x15d)](_0x5303e4,ApiError)&&_0x5303e4[_0x135bf2(0x177)]===0x199&&console[_0x135bf2(0x129)](_0x135bf2(0x16e)+_0x312005+_0x135bf2(0x13e)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x312005));throw _0x5303e4;}}async function captureEnvLessProfile(_0xecf28f,_0x1f4520,_0x167cf2,_0x580acb){const _0x458191=_0x144c,_0x3be460={'OUMaN':_0x458191(0x13f),'lUoVJ':function(_0x5c16f9,_0x1def02){return _0x5c16f9+_0x1def02;},'jdike':function(_0x464ba9,_0x26441a,_0x31ff24,_0x193d90){return _0x464ba9(_0x26441a,_0x31ff24,_0x193d90);},'ZeiFZ':function(_0x2e6b5f){return _0x2e6b5f();},'tzbhh':function(_0x4e5419,_0x187909){return _0x4e5419>_0x187909;},'fzbuA':function(_0xe7bdfc,_0x2c28eb){return _0xe7bdfc(_0x2c28eb);},'QYNtJ':'profile.add.autoRouted'};if(!_0x167cf2['yes']){const {capture:_0x1801cd}=await _0xcaaa0d['prompt']([{'type':'confirm','name':_0x3be460['OUMaN'],'message':_0x458191(0x16a),'default':!![]}]);if(!_0x1801cd)return _0x580acb?.['trackPhaseEnd'](_0x458191(0x12d),{'reason':'user_declined','profileName':_0xecf28f}),console['error'](_0x458191(0x149)+_0x458191(0x16f)),![];}const _0x4dee70={};if(_0x167cf2['setupHeader'])for(const _0x59f277 of _0x167cf2[_0x458191(0x16b)]){const _0x34bf3b=_0x59f277[_0x458191(0x174)](':');if(_0x34bf3b===-0x1)continue;_0x4dee70[_0x59f277[_0x458191(0x146)](0x0,_0x34bf3b)[_0x458191(0x152)]()]=_0x59f277['slice'](_0x3be460[_0x458191(0x12c)](_0x34bf3b,0x1))['trim']();}const _0x402d84={'baseUrl':_0x1f4520};Object[_0x458191(0x15f)](_0x4dee70)['length']>0x0&&(_0x402d84[_0x458191(0x10a)]=_0x4dee70);let _0x2fe58e;try{_0x2fe58e=await _0x3be460[_0x458191(0x154)](createCloudProfile,_0xecf28f,undefined,{'settings':_0x402d84}),_0x3be460[_0x458191(0x17f)](warnCloudProfileSharedInOrg);}catch(_0x20859d){_0x20859d instanceof ApiError&&_0x20859d[_0x458191(0x177)]===0x199&&console['error'](_0x3be460[_0x458191(0x12c)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xecf28f+_0x458191(0x13e),_0x458191(0x116)+_0xecf28f));throw _0x20859d;}return await manualBrowserLogin(_0x2fe58e,{'key':'','domains':[_0x1f4520],'setupHeaders':_0x3be460['tzbhh'](Object[_0x458191(0x15f)](_0x4dee70)[_0x458191(0x123)],0x0)?_0x4dee70:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0xecf28f+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x458191(0x112)+_0xecf28f)),await _0x3be460[_0x458191(0x121)](sweepOrphansBestEffort,_0xecf28f),_0x580acb?.['trackPhaseEnd'](_0x3be460['QYNtJ'],{'envKey':null,'profileName':_0xecf28f}),!![];}export async function addEnv(_0x4f7d94,_0x6f4626={},_0x4e950a){const _0x1b5ef4=_0x144c,_0x399859={'bNlES':function(_0x544f13,_0x14439c){return _0x544f13+_0x14439c;},'MEAQg':function(_0x10d5c8,_0x4fc8ec){return _0x10d5c8+_0x4fc8ec;},'qEvAx':_0x1b5ef4(0x10c),'KISKC':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','rvhKC':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','OSQUt':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','HdQxs':function(_0x2e7e23,_0x37f202,_0x41f993,_0x430fd1,_0x2183bf){return _0x2e7e23(_0x37f202,_0x41f993,_0x430fd1,_0x2183bf);},'PCiCD':'isElectron','HxsGl':function(_0x15bde3,_0x17cecd){return _0x15bde3>_0x17cecd;},'JaqVA':function(_0x5a8332,_0x39fc37,_0x1c9ce8){return _0x5a8332(_0x39fc37,_0x1c9ce8);},'cvZuf':function(_0x149a57,_0x363825){return _0x149a57+_0x363825;},'ulhJz':function(_0x11c908,_0x564b78){return _0x11c908(_0x564b78);},'HGrSi':_0x1b5ef4(0x147),'GzFIQ':function(_0x29c19d,_0x1e885a){return _0x29c19d||_0x1e885a;},'lgHwC':'list','BKbqf':_0x1b5ef4(0x10b),'pzEue':_0x1b5ef4(0x14d),'wuehd':_0x1b5ef4(0x148),'jIcwM':function(_0x41b6c3,_0x25cf6f){return _0x41b6c3===_0x25cf6f;},'ENRny':function(_0x5bc9d5,_0x980947){return _0x5bc9d5(_0x980947);},'TiwWj':function(_0x249d54,_0x30bb53){return _0x249d54===_0x30bb53;},'RzeAp':function(_0xd9b62c,_0x1ad71b,_0x5cc2ef,_0x588b8c,_0x318072,_0x13fcb3){return _0xd9b62c(_0x1ad71b,_0x5cc2ef,_0x588b8c,_0x318072,_0x13fcb3);},'ZOhBj':function(_0x435df4,_0x2ab612){return _0x435df4(_0x2ab612);}};_0x6f4626['ci']&&(console['error'](_0x399859['bNlES'](_0x399859['bNlES'](_0x399859[_0x1b5ef4(0x11d)](_0x399859[_0x1b5ef4(0x144)](_0x399859['qEvAx'],_0x399859[_0x1b5ef4(0x137)]),'\x0a')+_0x1b5ef4(0x12f)+_0x399859[_0x1b5ef4(0x110)],'\x0a'),_0x399859['OSQUt'])+_0x1b5ef4(0x15b)),process[_0x1b5ef4(0x160)](0x1));const _0x56ca12={};if(_0x6f4626[_0x1b5ef4(0x16b)])for(const _0x5b8b2b of _0x6f4626[_0x1b5ef4(0x16b)]){const _0x16a43c=_0x5b8b2b[_0x1b5ef4(0x174)](':');if(_0x16a43c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x5b8b2b+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x2aad82=_0x5b8b2b['slice'](0x0,_0x16a43c)['trim'](),_0x57d128=_0x5b8b2b['slice'](_0x399859['bNlES'](_0x16a43c,0x1))[_0x1b5ef4(0x152)]();_0x56ca12[_0x2aad82]=_0x57d128;}if(_0x6f4626['cdpEndpoint']!==undefined&&_0x6f4626['cdpEndpoint'][_0x1b5ef4(0x152)]()==='')throw new Error(_0x1b5ef4(0x10e));if(_0x6f4626['cdpEndpoint']&&_0x6f4626['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x5c5422=Boolean(_0x6f4626['cdpEndpoint']),_0x17f6bd=isInteractive();if(!_0x17f6bd&&!_0x6f4626[_0x1b5ef4(0x143)]&&!_0x5c5422&&!_0x6f4626['skipAuth'])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x5c5422){const _0xb738fd=_0x6f4626['cdpEndpoint'];console['log'](_0x1b5ef4(0x178)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0xb738fd);const _0x7b7060={'cdpEndpoint':_0xb738fd,'isElectron':!![]};Object['keys'](_0x56ca12)[_0x1b5ef4(0x123)]>0x0&&(_0x7b7060['setupHeaders']=_0x56ca12);await createUnconfiguredCloudProfile(_0x4f7d94,_0x7b7060);try{_0x399859[_0x1b5ef4(0x142)](setProfileOverride,process['cwd'](),_0x4f7d94,'cdpEndpoint',_0xb738fd),setProfileOverride(process['cwd'](),_0x4f7d94,_0x399859[_0x1b5ef4(0x134)],!![]);}catch(_0x38e34c){console['error'](_0x1b5ef4(0x156)+(_0x38e34c instanceof Error?_0x38e34c['message']:String(_0x38e34c)));}console[_0x1b5ef4(0x168)](_0x1b5ef4(0x119)+_0x4f7d94+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x4f7d94),await markActive(_0x4f7d94);return;}if(_0x6f4626['skipAuth']){const _0x1757c6={};_0x6f4626['url']&&(_0x1757c6[_0x1b5ef4(0x12e)]=_0x6f4626['url']);_0x399859['HxsGl'](Object['keys'](_0x56ca12)[_0x1b5ef4(0x123)],0x0)&&(_0x1757c6['setupHeaders']=_0x56ca12);await _0x399859['JaqVA'](createUnconfiguredCloudProfile,_0x4f7d94,_0x1757c6),console['log'](_0x399859['cvZuf']('✓\x20Profile\x20\x27'+_0x4f7d94+'\x27\x20created\x20(no\x20session).\x0a',_0x1b5ef4(0x114)+_0x4f7d94+_0x1b5ef4(0x180))),await _0x399859[_0x1b5ef4(0x11c)](sweepOrphansBestEffort,_0x4f7d94),await markActive(_0x4f7d94);return;}if(_0x6f4626['url']){const _0x32c697=_0x6f4626['url'],_0x40d2c2=await checkUrlReachability(_0x32c697);if(!_0x40d2c2['ok']&&!_0x6f4626['force'])throw new Error(_0x1b5ef4(0x115)+_0x32c697+':\x20'+_0x40d2c2['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x40d2c2['ok']&&_0x6f4626['force']&&console[_0x1b5ef4(0x168)]('⚠\x20Could\x20not\x20reach\x20'+_0x32c697+':\x20'+_0x40d2c2['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x1b5ef4(0x168)](_0x1b5ef4(0x165)),console['log'](_0x399859['HGrSi']),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x50d567='',_0xdf91c2=![];while(!![]){const _0x48d94c=await _0xcaaa0d[_0x1b5ef4(0x17e)]([{'type':'input','name':_0x1b5ef4(0x12e),'message':_0xdf91c2?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x1b5ef4(0x10d),'default':_0x399859['GzFIQ'](_0x50d567,_0x1b5ef4(0x12b))}]);_0x50d567=_0x48d94c[_0x1b5ef4(0x12e)];const _0x48ccd9=await _0x399859[_0x1b5ef4(0x11c)](checkUrlReachability,_0x50d567);if(_0x48ccd9['ok'])break;const _0x6798b5=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x50d567),_0x416dc7=_0x48ccd9[_0x1b5ef4(0x13a)]&&!_0x6798b5,_0xefbdb3=_0x416dc7?'http://'+_0x50d567:null;_0xdf91c2=!![],console[_0x1b5ef4(0x168)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x50d567+':\x20'+_0x48ccd9['error']);_0xefbdb3&&console['log'](_0x1b5ef4(0x176)+_0xefbdb3+'?');const {action:_0x17e181}=await _0xcaaa0d['prompt']([{'type':_0x399859['lgHwC'],'name':_0x399859['BKbqf'],'message':_0x1b5ef4(0x163),'choices':[..._0xefbdb3?[{'name':'Use\x20'+_0xefbdb3,'value':_0x399859['pzEue']}]:[],{'name':_0x399859['wuehd'],'value':_0x1b5ef4(0x10f)},{'name':'Continue\x20anyway','value':_0x1b5ef4(0x164)}]}]);if(_0x399859[_0x1b5ef4(0x17d)](_0x17e181,_0x1b5ef4(0x14d))&&_0xefbdb3){_0x50d567=_0xefbdb3;const _0x109287=await _0x399859[_0x1b5ef4(0x14b)](checkUrlReachability,_0x50d567);if(_0x109287['ok'])break;console['log'](_0x1b5ef4(0x132)+_0x50d567+':\x20'+_0x109287[_0x1b5ef4(0x129)]);}else{if(_0x399859[_0x1b5ef4(0x170)](_0x17e181,'continue'))break;}}_0x6f4626={..._0x6f4626,'url':_0x50d567};}let _0x13b9ae=![];try{_0x13b9ae=await _0x399859['RzeAp'](tryAutoRouteCloudProfile,_0x4f7d94,_0x6f4626[_0x1b5ef4(0x143)],_0x6f4626,_0x17f6bd,_0x4e950a);}catch(_0x284f73){console['error'](_0x1b5ef4(0x14a)+_0x4f7d94+_0x1b5ef4(0x135)+(_0x284f73 instanceof Error?_0x284f73['message']:_0x399859[_0x1b5ef4(0x11c)](String,_0x284f73))),process[_0x1b5ef4(0x160)](0x1);}!_0x13b9ae&&process['exit'](0x1),await _0x399859[_0x1b5ef4(0x16c)](markActive,_0x4f7d94);}
|
|
1
|
+
(function(_0x4e1eb3,_0x57f2f8){const _0x20db23=_0x5422,_0x1d9afe=_0x4e1eb3();while(!![]){try{const _0x41bb66=parseInt(_0x20db23(0x13f))/0x1*(parseInt(_0x20db23(0x13e))/0x2)+parseInt(_0x20db23(0x155))/0x3*(parseInt(_0x20db23(0x15d))/0x4)+parseInt(_0x20db23(0x119))/0x5+-parseInt(_0x20db23(0x13a))/0x6+-parseInt(_0x20db23(0x132))/0x7+parseInt(_0x20db23(0x152))/0x8+-parseInt(_0x20db23(0x115))/0x9;if(_0x41bb66===_0x57f2f8)break;else _0x1d9afe['push'](_0x1d9afe['shift']());}catch(_0xcea12f){_0x1d9afe['push'](_0x1d9afe['shift']());}}}(_0x12b0,0xefb8a));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x2763b4 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';function _0x5422(_0x3c539d,_0x4015e3){_0x3c539d=_0x3c539d-0xdf;const _0x12b07c=_0x12b0();let _0x5422b9=_0x12b07c[_0x3c539d];return _0x5422b9;}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 _0x12b0(){const _0x45e0e1=['10964072mOSqiC','test','Could\x20not\x20reach\x20','6GKgnUg','force','✓\x20Profile\x20\x27','signal','indexOf','\x20\x20https://docs.ranger.net/main/concepts/profiles','PVUQz','SsJzU','2982284raLCPy','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','no_match','prompt','dmSZD','error','some','Wpanu','env','\x0a🌐\x20Profile\x20Setup\x0a','local','startsWith','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','sRGCD','isProtocolError','⚠\x20Could\x20not\x20reach\x20','HEAD','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','log','TEDBT','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','profile.add.autoRouteSkipped','nvXFo','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','input','manual','VwLzL','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','iLqaz','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x27\x20created.\x0a','cdpEndpoint','trackPhaseEnd','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','message','GTlTg','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','mXTxO','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','GBcDl','trim','action','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','Continue\x20anyway','OEBti','MVDzn','GdmHU','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','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','eCyue','Enter\x20a\x20different\x20URL','retry','environments','keys','\x27\x20created\x20(CDP).','nWSxA','IMgDw','tlLBs','34146666LWJJqo','pJjUi','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','AvzjD','9756615vsawME','\x20\x20Set\x20active\x20profile:\x20','cwd','Use\x20','fetch\x20failed','OeJdr','\x27\x20created\x20(no\x20session).\x0a','setupHeaders','baseUrl','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','KwtTU','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','status','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','.tmp-','stdout','list','\x22:\x20','warn','url','iOMJJ','setupHeader','qqWBM','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','JKanI','13413078Tbfsqc','BxodQ','Found\x20auth\x20environment\x20\x27','yes','continue','\x20(continuing\x20with\x20--force)','\x27\x20matching\x20','\x20--skip-auth\x0a','310110ghuCvA','GkLyQ','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','HdnNV','5738icBIOv','673GfbIJQ','.\x20Configured\x20envs:\x20','http://localhost:3000','length','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','MunJS','confirm','slice','AEMmv','use_suggestion','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','includes','isTTY','\x27\x20to\x20the\x20cloud?','\x20\x20Did\x20you\x20mean\x20','MlUMy','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','NODE_TLS_REJECT_UNAUTHORIZED','http://'];_0x12b0=function(){return _0x45e0e1;};return _0x12b0();}function warnCloudProfileSharedInOrg(){const _0x533d93=_0x5422;if(!process[_0x533d93(0x128)][_0x533d93(0x14b)])return;console[_0x533d93(0x12b)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x22e261){const _0x199ec0=_0x5422,_0x181f71={'MVDzn':function(_0x36cf8c,_0x1c9611,_0x35a797){return _0x36cf8c(_0x1c9611,_0x35a797);},'nvXFo':_0x199ec0(0xe9),'tGVeS':_0x199ec0(0xf3),'afsoy':function(_0x2d7d0e,_0x547234){return _0x2d7d0e(_0x547234);},'mKxtu':function(_0x3ff1b2,_0x1016b1){return _0x3ff1b2<_0x1016b1;},'lhliU':function(_0x2e086f,_0x499b08){return _0x2e086f===_0x499b08;},'hJgpZ':'TypeError','hJRSd':_0x199ec0(0x11d)};try{const _0x29552b=new AbortController(),_0x59a8b3=_0x181f71[_0x199ec0(0x108)](setTimeout,()=>_0x29552b['abort'](),0x1388),_0x5bc705={'method':_0x181f71[_0x199ec0(0xf0)],'signal':_0x29552b[_0x199ec0(0x158)],'redirect':_0x181f71['tGVeS']};/^https:\/\/localhost(:\d+)?/i['test'](_0x22e261)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4f08f2=await fetch(_0x22e261,_0x5bc705);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x181f71['afsoy'](clearTimeout,_0x59a8b3);if(_0x181f71['mKxtu'](_0x4f08f2['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x4f08f2[_0x199ec0(0x125)]};}catch(_0x5d3abc){delete process[_0x199ec0(0xe1)][_0x199ec0(0x150)];const _0x43dbc8=_0x5d3abc,_0xed60ce=_0x43dbc8['message']||String(_0x5d3abc),_0x46cd97=_0xed60ce[_0x199ec0(0x14a)]('Invalid\x20URL')||_0x181f71['lhliU'](_0x43dbc8['name'],_0x181f71['hJgpZ'])||_0xed60ce['includes'](_0x181f71['hJRSd']);return{'ok':![],'error':_0xed60ce,'isProtocolError':_0x46cd97};}}async function sweepOrphanLocalProfile(_0x2936f0,_0x54eaa1,_0x4f1ae0){const _0x577671=_0x5422,_0x29a50f={'VwLzL':function(_0x56730c,_0x392bcd,_0x560c95){return _0x56730c(_0x392bcd,_0x560c95);},'BxodQ':function(_0x472d5f,_0x1cbcac){return _0x472d5f(_0x1cbcac);},'aKbWg':function(_0x50192a,_0x25214e,_0x4172e0){return _0x50192a(_0x25214e,_0x4172e0);}},_0x48673b=_0x29a50f[_0x577671(0xf4)](join,_0x54eaa1,_0x577671(0xe3)),_0x2a1756=join(_0x48673b,_0x2936f0);existsSync(_0x2a1756)&&(_0x4f1ae0&&await isPathGitTracked(_0x2a1756)?console['log'](_0x577671(0x101)+_0x2a1756+_0x577671(0xea)):(await rm(_0x2a1756,{'recursive':!![],'force':!![]}),console['log'](_0x577671(0xf7)+_0x2a1756)));if(_0x29a50f[_0x577671(0x133)](existsSync,_0x48673b)){let _0x1dcbc1=[];try{_0x1dcbc1=await readdir(_0x48673b);}catch{return;}const _0x3f04bc=_0x577671(0x127)+_0x2936f0+'-';for(const _0xbe292c of _0x1dcbc1){if(!_0xbe292c[_0x577671(0xe4)](_0x3f04bc))continue;const _0x275eba=_0x29a50f['aKbWg'](join,_0x48673b,_0xbe292c);await rm(_0x275eba,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x275eba);}}}async function sweepOrphansBestEffort(_0x3bc9c4){const _0x27587a=_0x5422,_0x154a7b={'qBcVl':function(_0x5c2bd0){return _0x5c2bd0();},'UbLoO':function(_0x3adbe5,_0x102d62,_0x400d25,_0x51b0f5){return _0x3adbe5(_0x102d62,_0x400d25,_0x51b0f5);},'PaJCI':function(_0xb20db6,_0xb5cb2c){return _0xb20db6 instanceof _0xb5cb2c;},'HdnNV':function(_0x5bcd04,_0x61412e){return _0x5bcd04(_0x61412e);}};try{await sweepOrphanLocalProfile(_0x3bc9c4,_0x154a7b['qBcVl'](getRangerHomeDir),![]);const _0x42b35a=getRangerDir();_0x42b35a!==getRangerHomeDir()&&await _0x154a7b['UbLoO'](sweepOrphanLocalProfile,_0x3bc9c4,_0x42b35a,!![]);}catch(_0x420f51){console[_0x27587a(0xeb)](_0x27587a(0xfc)+(_0x154a7b['PaJCI'](_0x420f51,Error)?_0x420f51[_0x27587a(0xfd)]:_0x154a7b[_0x27587a(0x13d)](String,_0x420f51))+').');}}async function markActive(_0x2aea1f){const _0x4a5450=_0x5422,_0x5f49ac={'TyNPe':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x2aea1f),console[_0x4a5450(0xeb)](_0x4a5450(0x11a)+_0x2aea1f);}catch{console['log'](_0x5f49ac['TyNPe']);}}async function tryAutoRouteCloudProfile(_0x29df45,_0x5aa2c2,_0x52d979,_0x143a7d,_0x3296e4){const _0x5031e9=_0x5422,_0x889899={'swIZI':function(_0x22c2a0){return _0x22c2a0();},'PVUQz':'no_auth_config','pJjUi':function(_0x1d4910,_0x546813){return _0x1d4910+_0x546813;},'AEMmv':'\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','eNTRQ':_0x5031e9(0x126),'OEBti':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','GBcDl':function(_0x2ff56a,_0x17a4ad,_0x3627fb){return _0x2ff56a(_0x17a4ad,_0x3627fb);},'atxCz':_0x5031e9(0x160),'SsJzU':'confirm','AuOme':function(_0x36e690,_0x342f4f){return _0x36e690 instanceof _0x342f4f;},'dmSZD':function(_0xe0f7f5,_0x1c080c){return _0xe0f7f5(_0x1c080c);}};let _0x3e6069;try{_0x3e6069=await _0x889899['swIZI'](fetchAuthConfig);}catch(_0x3d558f){return _0x3296e4?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x889899['PVUQz'],'profileName':_0x29df45}),console[_0x5031e9(0x163)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x3d558f instanceof Error?_0x3d558f['message']:String(_0x3d558f))),![];}if(!_0x3e6069||!_0x3e6069[_0x5031e9(0x10f)]||Object['keys'](_0x3e6069[_0x5031e9(0x10f)])['length']===0x0){if(_0x143a7d)return await captureEnvLessProfile(_0x29df45,_0x5aa2c2,_0x52d979,_0x3296e4);return _0x3296e4?.[_0x5031e9(0xfb)]('profile.add.autoRouteSkipped',{'reason':_0x889899[_0x5031e9(0x15b)],'profileName':_0x29df45}),console[_0x5031e9(0x163)](_0x889899['pJjUi'](_0x889899['pJjUi'](_0x889899[_0x5031e9(0x116)](_0x889899['pJjUi'](_0x889899[_0x5031e9(0x147)],'\x0a'),_0x889899['eNTRQ'])+(_0x5031e9(0xed)+_0x29df45+'\x20--url\x20'+_0x5aa2c2+_0x5031e9(0x139)),'\x0a')+_0x889899[_0x5031e9(0x107)],'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login')),![];}const _0x4e6ac8=_0x889899[_0x5031e9(0x102)](matchAuthEnvironment,_0x5aa2c2,_0x3e6069);if(!_0x4e6ac8)return _0x3296e4?.[_0x5031e9(0xfb)](_0x5031e9(0xef),{'reason':_0x889899['atxCz'],'profileName':_0x29df45}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x5aa2c2+_0x5031e9(0x140)+Object['keys'](_0x3e6069[_0x5031e9(0x10f)])['join'](',\x20')+'.'),![];const _0x53fd24=_0x3e6069[_0x5031e9(0x10f)][_0x4e6ac8],_0x4cb6fd=_0x53fd24?.['domains']??[];if(_0x143a7d&&!_0x52d979['yes']){const {saveToCloud:_0x26ea0a}=await _0x2763b4[_0x5031e9(0x161)]([{'type':_0x889899[_0x5031e9(0x15c)],'name':'saveToCloud','message':_0x5031e9(0x134)+_0x4e6ac8+_0x5031e9(0x138)+_0x5aa2c2+'\x0a\x20\x20(domains:\x20'+_0x4cb6fd['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x29df45+_0x5031e9(0x14c),'default':!![]}]);if(!_0x26ea0a)return _0x3296e4?.[_0x5031e9(0xfb)](_0x5031e9(0xef),{'reason':'user_declined','profileName':_0x29df45}),console[_0x5031e9(0x163)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x500a17=_0x4cb6fd[_0x5031e9(0xdf)](_0x5440bb=>{try{return new URL(_0x5440bb)['origin']===new URL(_0x5aa2c2)['origin'];}catch{return![];}}),_0x1f8d32={};!_0x500a17&&(_0x1f8d32[_0x5031e9(0x121)]=_0x5aa2c2);try{await createCloudProfile(_0x29df45,_0x4e6ac8,{'settings':_0x1f8d32}),warnCloudProfileSharedInOrg();}catch(_0x368f26){if(_0x889899['AuOme'](_0x368f26,ApiError)&&_0x368f26[_0x5031e9(0x125)]===0x199){console[_0x5031e9(0x163)](_0x889899['pJjUi']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x29df45+_0x5031e9(0x124),_0x5031e9(0x15f)+_0x29df45));throw _0x368f26;}throw _0x368f26;}return console['log'](_0x889899['pJjUi'](_0x5031e9(0x157)+_0x29df45+_0x5031e9(0xf9),_0x5031e9(0xe5)+_0x29df45)),await _0x889899[_0x5031e9(0x162)](sweepOrphansBestEffort,_0x29df45),_0x3296e4?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':_0x4e6ac8,'profileName':_0x29df45}),!![];}async function createUnconfiguredCloudProfile(_0x5ddd4d,_0x23928e){const _0xe4911a=_0x5422;try{await createCloudProfile(_0x5ddd4d,undefined,{'settings':_0x23928e}),warnCloudProfileSharedInOrg();}catch(_0x397234){_0x397234 instanceof ApiError&&_0x397234[_0xe4911a(0x125)]===0x199&&console[_0xe4911a(0x163)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5ddd4d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5ddd4d));throw _0x397234;}}async function captureEnvLessProfile(_0x2d36b1,_0x46c52e,_0x757acd,_0x20a0de){const _0x333c42=_0x5422,_0x2e38ab={'nWSxA':_0x333c42(0x145),'MlUMy':'capture','JKanI':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sGGlU':'profile.add.autoRouteSkipped','RIjon':'user_declined','iLqaz':function(_0x28ba58,_0x5ea3dc){return _0x28ba58+_0x5ea3dc;},'GdmHU':function(_0x57808e,_0x1a9592){return _0x57808e>_0x1a9592;},'IeUBG':function(_0x3f55e2){return _0x3f55e2();},'OeJdr':function(_0x4408bc,_0x854d04){return _0x4408bc instanceof _0x854d04;},'mXTxO':function(_0x1b2575,_0x223331){return _0x1b2575>_0x223331;},'iVGPq':function(_0x24059e,_0x52c187){return _0x24059e+_0x52c187;}};if(!_0x757acd[_0x333c42(0x135)]){const {capture:_0xecfc66}=await _0x2763b4[_0x333c42(0x161)]([{'type':_0x2e38ab[_0x333c42(0x112)],'name':_0x2e38ab[_0x333c42(0x14e)],'message':_0x2e38ab[_0x333c42(0x131)],'default':!![]}]);if(!_0xecfc66)return _0x20a0de?.[_0x333c42(0xfb)](_0x2e38ab['sGGlU'],{'reason':_0x2e38ab['RIjon'],'profileName':_0x2d36b1}),console[_0x333c42(0x163)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x333c42(0xff)),![];}const _0x2de6f4={};if(_0x757acd['setupHeader'])for(const _0x18993a of _0x757acd['setupHeader']){const _0x13c69c=_0x18993a[_0x333c42(0x159)](':');if(_0x13c69c===-0x1)continue;_0x2de6f4[_0x18993a[_0x333c42(0x146)](0x0,_0x13c69c)['trim']()]=_0x18993a['slice'](_0x2e38ab[_0x333c42(0xf6)](_0x13c69c,0x1))['trim']();}const _0x3c4ddd={'baseUrl':_0x46c52e};_0x2e38ab[_0x333c42(0x109)](Object['keys'](_0x2de6f4)[_0x333c42(0x142)],0x0)&&(_0x3c4ddd['setupHeaders']=_0x2de6f4);let _0x413008;try{_0x413008=await createCloudProfile(_0x2d36b1,undefined,{'settings':_0x3c4ddd}),_0x2e38ab['IeUBG'](warnCloudProfileSharedInOrg);}catch(_0x28cce8){_0x2e38ab[_0x333c42(0x11e)](_0x28cce8,ApiError)&&_0x28cce8[_0x333c42(0x125)]===0x199&&console['error'](_0x2e38ab['iLqaz'](_0x333c42(0xf8)+_0x2d36b1+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x2d36b1));throw _0x28cce8;}return await manualBrowserLogin(_0x413008,{'key':'','domains':[_0x46c52e],'setupHeaders':_0x2e38ab[_0x333c42(0x100)](Object['keys'](_0x2de6f4)['length'],0x0)?_0x2de6f4:undefined}),console['log'](_0x2e38ab['iVGPq']('\x0a✓\x20Profile\x20\x27'+_0x2d36b1+_0x333c42(0x105),_0x333c42(0xe5)+_0x2d36b1)),await sweepOrphansBestEffort(_0x2d36b1),_0x20a0de?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x2d36b1}),!![];}export async function addEnv(_0x4d3f32,_0x56bc49={},_0x323a2f){const _0x5f49c5=_0x5422,_0x471474={'sRGCD':function(_0x26e149,_0x37c335){return _0x26e149+_0x37c335;},'GTlTg':function(_0x3e7517,_0x59ba89){return _0x3e7517+_0x59ba89;},'BFPtF':function(_0x4187a5,_0x2c4e11){return _0x4187a5+_0x2c4e11;},'eCyue':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','GkLyQ':_0x5f49c5(0x13c),'TEDBT':function(_0x5e9dbb,_0x14085f){return _0x5e9dbb===_0x14085f;},'AvzjD':function(_0x21f555,_0xe1e651){return _0x21f555+_0xe1e651;},'UvTIQ':function(_0x294722,_0x4c67e5){return _0x294722!==_0x4c67e5;},'MunJS':function(_0x175160,_0x54d6f7){return _0x175160(_0x54d6f7);},'SgQsr':function(_0x3d9d72){return _0x3d9d72();},'OCFzf':_0x5f49c5(0x10a),'eBLcq':_0x5f49c5(0xf5),'PawsN':function(_0x4cc7b0,_0x1a57f4,_0x33364d){return _0x4cc7b0(_0x1a57f4,_0x33364d);},'tlLBs':function(_0x41a03f,_0x2e653d,_0x17d76c,_0x4b0eea,_0x28dee9){return _0x41a03f(_0x2e653d,_0x17d76c,_0x4b0eea,_0x28dee9);},'qqWBM':'cdpEndpoint','gWJWQ':function(_0x133c75,_0x2d3074){return _0x133c75 instanceof _0x2d3074;},'BOopD':function(_0x4276e0,_0x1e5b59){return _0x4276e0(_0x1e5b59);},'agZBm':_0x5f49c5(0xf2),'KwtTU':'baseUrl','vQmZr':function(_0x30874b,_0x40e143){return _0x30874b(_0x40e143);},'iOMJJ':'What\x20would\x20you\x20like\x20to\x20do?','StFfE':_0x5f49c5(0x10d),'Wpanu':_0x5f49c5(0x106),'OnYew':function(_0x21a6e9,_0x2fad93){return _0x21a6e9(_0x2fad93);},'gLydp':function(_0x4a7b52,_0x47f2df){return _0x4a7b52===_0x47f2df;},'SXGbm':_0x5f49c5(0x136),'BhHQW':function(_0x49b15c,_0x194541,_0x4d465c,_0x33bb8a,_0x53c396,_0x3826c2){return _0x49b15c(_0x194541,_0x4d465c,_0x33bb8a,_0x53c396,_0x3826c2);},'IMgDw':function(_0x242389,_0x2b55d8){return _0x242389(_0x2b55d8);}};_0x56bc49['ci']&&(console[_0x5f49c5(0x163)](_0x471474[_0x5f49c5(0xe6)](_0x471474[_0x5f49c5(0xfe)](_0x471474['GTlTg'](_0x471474['BFPtF'](_0x471474[_0x5f49c5(0x10c)]+_0x5f49c5(0x149),'\x0a')+_0x471474[_0x5f49c5(0x13b)],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a',_0x5f49c5(0x117)),_0x5f49c5(0x15a))),process['exit'](0x1));const _0x229825={};if(_0x56bc49[_0x5f49c5(0x12e)])for(const _0x5b47a4 of _0x56bc49['setupHeader']){const _0x216e4d=_0x5b47a4[_0x5f49c5(0x159)](':');if(_0x471474[_0x5f49c5(0xec)](_0x216e4d,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x5b47a4+_0x5f49c5(0xee));const _0x1fd89b=_0x5b47a4[_0x5f49c5(0x146)](0x0,_0x216e4d)[_0x5f49c5(0x103)](),_0x130dc1=_0x5b47a4[_0x5f49c5(0x146)](_0x471474[_0x5f49c5(0x118)](_0x216e4d,0x1))[_0x5f49c5(0x103)]();_0x229825[_0x1fd89b]=_0x130dc1;}if(_0x471474['UvTIQ'](_0x56bc49[_0x5f49c5(0xfa)],undefined)&&_0x56bc49['cdpEndpoint'][_0x5f49c5(0x103)]()==='')throw new Error(_0x5f49c5(0x10b));if(_0x56bc49[_0x5f49c5(0xfa)]&&_0x56bc49[_0x5f49c5(0x12c)])throw new Error(_0x5f49c5(0x122));const _0x374cf8=_0x471474[_0x5f49c5(0x144)](Boolean,_0x56bc49[_0x5f49c5(0xfa)]),_0x36b0b0=_0x471474['SgQsr'](isInteractive);if(!_0x36b0b0&&!_0x56bc49[_0x5f49c5(0x12c)]&&!_0x374cf8&&!_0x56bc49['skipAuth'])throw new Error(_0x471474['OCFzf']);if(_0x374cf8){const _0x40cdf0=_0x56bc49[_0x5f49c5(0xfa)];console[_0x5f49c5(0xeb)](_0x471474['eBLcq']),console['log'](_0x5f49c5(0x15e)+_0x40cdf0);const _0x2d2a93={'cdpEndpoint':_0x40cdf0,'isElectron':!![]};Object['keys'](_0x229825)[_0x5f49c5(0x142)]>0x0&&(_0x2d2a93[_0x5f49c5(0x120)]=_0x229825);await _0x471474['PawsN'](createUnconfiguredCloudProfile,_0x4d3f32,_0x2d2a93);try{_0x471474[_0x5f49c5(0x114)](setProfileOverride,process[_0x5f49c5(0x11b)](),_0x4d3f32,_0x471474[_0x5f49c5(0x12f)],_0x40cdf0),setProfileOverride(process['cwd'](),_0x4d3f32,'isElectron',!![]);}catch(_0x52b573){console[_0x5f49c5(0x163)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x471474['gWJWQ'](_0x52b573,Error)?_0x52b573[_0x5f49c5(0xfd)]:String(_0x52b573)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x4d3f32+_0x5f49c5(0x111)),await _0x471474['MunJS'](sweepOrphansBestEffort,_0x4d3f32),await markActive(_0x4d3f32);return;}if(_0x56bc49['skipAuth']){const _0x10e245={};_0x56bc49[_0x5f49c5(0x12c)]&&(_0x10e245['baseUrl']=_0x56bc49[_0x5f49c5(0x12c)]);Object[_0x5f49c5(0x110)](_0x229825)['length']>0x0&&(_0x10e245[_0x5f49c5(0x120)]=_0x229825);await createUnconfiguredCloudProfile(_0x4d3f32,_0x10e245),console[_0x5f49c5(0xeb)](_0x5f49c5(0x157)+_0x4d3f32+_0x5f49c5(0x11f)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4d3f32+'`\x20again\x20without\x20--skip-auth.')),await _0x471474['BOopD'](sweepOrphansBestEffort,_0x4d3f32),await _0x471474['BOopD'](markActive,_0x4d3f32);return;}if(_0x56bc49['url']){const _0x31c799=_0x56bc49['url'],_0xecac1f=await checkUrlReachability(_0x31c799);if(!_0xecac1f['ok']&&!_0x56bc49[_0x5f49c5(0x156)])throw new Error(_0x5f49c5(0x154)+_0x31c799+':\x20'+_0xecac1f[_0x5f49c5(0x163)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0xecac1f['ok']&&_0x56bc49['force']&&console[_0x5f49c5(0xeb)](_0x5f49c5(0xe8)+_0x31c799+':\x20'+_0xecac1f['error']+_0x5f49c5(0x137));}else{console[_0x5f49c5(0xeb)](_0x5f49c5(0xe2)),console[_0x5f49c5(0xeb)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x5f49c5(0xeb)](_0x5f49c5(0x143));let _0x3b298d='',_0x51a219=![];while(!![]){const _0x38240c=await _0x2763b4[_0x5f49c5(0x161)]([{'type':_0x471474['agZBm'],'name':_0x471474[_0x5f49c5(0x123)],'message':_0x51a219?_0x5f49c5(0x14f):_0x5f49c5(0x130),'default':_0x3b298d||_0x5f49c5(0x141)}]);_0x3b298d=_0x38240c['baseUrl'];const _0x269fe3=await _0x471474['vQmZr'](checkUrlReachability,_0x3b298d);if(_0x269fe3['ok'])break;const _0xc1ddcc=/^[a-zA-Z][\w+.-]*:\/\//[_0x5f49c5(0x153)](_0x3b298d),_0x23b769=_0x269fe3[_0x5f49c5(0xe7)]&&!_0xc1ddcc,_0x3c026d=_0x23b769?_0x5f49c5(0x151)+_0x3b298d:null;_0x51a219=!![],console[_0x5f49c5(0xeb)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x3b298d+':\x20'+_0x269fe3['error']);_0x3c026d&&console[_0x5f49c5(0xeb)](_0x5f49c5(0x14d)+_0x3c026d+'?');const {action:_0x342a1e}=await _0x2763b4[_0x5f49c5(0x161)]([{'type':_0x5f49c5(0x129),'name':_0x5f49c5(0x104),'message':_0x471474[_0x5f49c5(0x12d)],'choices':[..._0x3c026d?[{'name':_0x5f49c5(0x11c)+_0x3c026d,'value':'use_suggestion'}]:[],{'name':_0x471474['StFfE'],'value':_0x5f49c5(0x10e)},{'name':_0x471474[_0x5f49c5(0xe0)],'value':_0x5f49c5(0x136)}]}]);if(_0x342a1e===_0x5f49c5(0x148)&&_0x3c026d){_0x3b298d=_0x3c026d;const _0x54b85b=await _0x471474['OnYew'](checkUrlReachability,_0x3b298d);if(_0x54b85b['ok'])break;console['log'](_0x5f49c5(0xf1)+_0x3b298d+':\x20'+_0x54b85b['error']);}else{if(_0x471474['gLydp'](_0x342a1e,_0x471474['SXGbm']))break;}}_0x56bc49={..._0x56bc49,'url':_0x3b298d};}let _0x332225=![];try{_0x332225=await _0x471474['BhHQW'](tryAutoRouteCloudProfile,_0x4d3f32,_0x56bc49[_0x5f49c5(0x12c)],_0x56bc49,_0x36b0b0,_0x323a2f);}catch(_0x483b4e){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4d3f32+_0x5f49c5(0x12a)+(_0x483b4e instanceof Error?_0x483b4e[_0x5f49c5(0xfd)]:String(_0x483b4e))),process['exit'](0x1);}!_0x332225&&process['exit'](0x1),await _0x471474[_0x5f49c5(0x113)](markActive,_0x4d3f32);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5112(){var _0x3b4562=['QjtwS','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','663844ImjuxE','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','error','14358aJGDoc','24vrmpmb','3977392jvYOzt','866115upWbjQ','66OqPuKO','1818168aWxvZN','2789255mUWbnv','vEeMp','Vcrsa','lRYTr','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','7161147XxzjIQ'];_0x5112=function(){return _0x3b4562;};return _0x5112();}(function(_0x16424e,_0x144730){var _0x3f2617=_0x4549,_0xbec4f3=_0x16424e();while(!![]){try{var _0x42307e=parseInt(_0x3f2617(0x107))/0x1+-parseInt(_0x3f2617(0x10a))/0x2*(parseInt(_0x3f2617(0x10e))/0x3)+parseInt(_0x3f2617(0x10c))/0x4+parseInt(_0x3f2617(0x10d))/0x5*(-parseInt(_0x3f2617(0x10b))/0x6)+parseInt(_0x3f2617(0x110))/0x7+parseInt(_0x3f2617(0x10f))/0x8+-parseInt(_0x3f2617(0x104))/0x9;if(_0x42307e===_0x144730)break;else _0xbec4f3['push'](_0xbec4f3['shift']());}catch(_0x6f9059){_0xbec4f3['push'](_0xbec4f3['shift']());}}}(_0x5112,0x9b9e7));function _0x4549(_0x5e50b2,_0x55e611){_0x5e50b2=_0x5e50b2-0x101;var _0x51129b=_0x5112();var _0x4549ca=_0x51129b[_0x5e50b2];return _0x4549ca;}export async function authEncrypt(_0x42d8ff){var _0xf04ef4=_0x4549,_0x33d753={'Vcrsa':function(_0x1fcddd,_0x583afa){return _0x1fcddd+_0x583afa;},'HzmtO':function(_0x5db746,_0x36164d){return _0x5db746+_0x36164d;},'QjtwS':function(_0x193f78,_0x299d56){return _0x193f78+_0x299d56;},'shzzY':_0xf04ef4(0x102),'qibmy':_0xf04ef4(0x108),'lLhKq':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','lRYTr':_0xf04ef4(0x106),'vEeMp':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console[_0xf04ef4(0x109)](_0x33d753['Vcrsa'](_0x33d753['HzmtO'](_0x33d753[_0xf04ef4(0x112)](_0x33d753[_0xf04ef4(0x105)](_0x33d753['shzzY'],_0xf04ef4(0x103)),'\x0a'),_0x33d753['qibmy']),_0x33d753['lLhKq'])+'\x0a'+_0x33d753[_0xf04ef4(0x101)]+_0x33d753[_0xf04ef4(0x111)]),process['exit'](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1e92c6=_0x343a;(function(_0xeb861e,_0x1f1e83){const _0x1a74cf=_0x343a,_0x5d256f=_0xeb861e();while(!![]){try{const _0x4dfd5a=-parseInt(_0x1a74cf(0xea))/0x1*(-parseInt(_0x1a74cf(0xbd))/0x2)+parseInt(_0x1a74cf(0xcc))/0x3*(parseInt(_0x1a74cf(0xd1))/0x4)+parseInt(_0x1a74cf(0xb9))/0x5+parseInt(_0x1a74cf(0xd6))/0x6+parseInt(_0x1a74cf(0xbc))/0x7*(-parseInt(_0x1a74cf(0xb7))/0x8)+parseInt(_0x1a74cf(0xd2))/0x9*(-parseInt(_0x1a74cf(0xe8))/0xa)+parseInt(_0x1a74cf(0xd0))/0xb*(-parseInt(_0x1a74cf(0xb6))/0xc);if(_0x4dfd5a===_0x1f1e83)break;else _0x5d256f['push'](_0x5d256f['shift']());}catch(_0x150087){_0x5d256f['push'](_0x5d256f['shift']());}}}(_0x598d,0x20f50));import{rm,readFile,writeFile}from'fs/promises';function _0x343a(_0x5c6fc0,_0x3b6bd6){_0x5c6fc0=_0x5c6fc0-0xb3;const _0x598d8e=_0x598d();let _0x343ad0=_0x598d8e[_0x5c6fc0];return _0x343ad0;}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',_0x1e92c6(0xdf),'bug-bash','e2e-test-recommender'],opencodePluginName=_0x1e92c6(0xc4);function parseJsonc(_0x1633e1){const _0x5ecbf1=_0x1e92c6,_0x57183e=_0x1633e1['replace'](/\/\*[\s\S]*?\*\//g,''),_0x5ddaba=_0x57183e[_0x5ecbf1(0xbb)](/^\s*\/\/.*$/gm,''),_0x1c4bfe=_0x5ddaba[_0x5ecbf1(0xbb)](/,\s*([}\]])/g,'$1');return JSON[_0x5ecbf1(0xcd)](_0x1c4bfe);}async function removeOpencodePluginConfig(_0x4e4e72){const _0x4c94a1=_0x1e92c6,_0x2ce19b={'OcDBE':'string','gnJcw':function(_0x4dd99b,_0x12538d){return _0x4dd99b===_0x12538d;},'uhfyF':function(_0x412e4c,_0x242c08,_0x5878a9){return _0x412e4c(_0x242c08,_0x5878a9);},'weini':function(_0x4b74b6,_0x239846){return _0x4b74b6+_0x239846;}};if(!existsSync(_0x4e4e72))return![];let _0x1047b5;try{const _0x361ab1=await readFile(_0x4e4e72,_0x4c94a1(0xc5));_0x1047b5=parseJsonc(_0x361ab1);}catch{return![];}const _0x177586=Array['isArray'](_0x1047b5['plugin'])?_0x1047b5['plugin']:[];if(_0x177586['length']===0x0)return![];const _0x5dc38f=_0x177586['filter'](_0x247b5d=>{const _0x104bdf=_0x4c94a1;if(typeof _0x247b5d!==_0x2ce19b[_0x104bdf(0xde)])return!![];return _0x247b5d!==opencodePluginName;});if(_0x2ce19b['gnJcw'](_0x5dc38f['length'],_0x177586['length']))return![];return _0x2ce19b[_0x4c94a1(0xb4)](_0x5dc38f[_0x4c94a1(0xdd)],0x0)?delete _0x1047b5[_0x4c94a1(0xca)]:_0x1047b5[_0x4c94a1(0xca)]=_0x5dc38f,await _0x2ce19b['uhfyF'](writeFile,_0x4e4e72,_0x2ce19b[_0x4c94a1(0xc7)](JSON[_0x4c94a1(0xe9)](_0x1047b5,null,0x2),'\x0a')),!![];}function _0x598d(){const _0x459c16=['✓\x20Removed\x20project\x20skill:\x20','spywZ','WZbnd','@ranger-testing/opencode-plugin','utf-8','ZhUuB','weini','jjWKc','error','plugin','claude','1371KuYeJP','parse','oOsWj','trailhead','1208185DteZsq','56sUiWHk','16839MtIiPO','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','EWpyD','opencode.json','1580850aUvLFo','✓\x20Removed\x20stored\x20credentials','kSCTf','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','platform','log','push','length','OcDBE','feature-tracker','yEzho','JMJCe','✓\x20Removed\x20trailhead\x20marketplace','close','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','AdnUK','GSIPy','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','590eTHigL','stringify','33107DjDwcY','ULQQo','MzVAX','jcquk','HmGKx','cujTI','YYeon','PjxRP','IYiSF','gnJcw','HLHiD','24mCqGIJ','2368oonUmG','YJgXV','916560ajfypA','PpHIO','replace','4417yVAVhW','12qUCVWw','MIzzS','UICqX','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'];_0x598d=function(){return _0x459c16;};return _0x598d();}async function uninstallClaudePlugin(_0x2102f3){const _0x17e9dd=_0x1e92c6,_0x2e0747={'EWpyD':function(_0x2d12ab,_0x1c9e2c){return _0x2d12ab===_0x1c9e2c;},'PjxRP':'ranger@trailhead','GWpem':'--scope','MzVAX':'ignore','JMJCe':_0x17e9dd(0xe3)};return new Promise(_0x4a0247=>{const _0x293ebd=_0x17e9dd,_0x25103f={'ULQQo':function(_0x281f9f,_0xfb99d7){return _0x281f9f(_0xfb99d7);},'spywZ':function(_0x5bf9b3,_0x1e0680){const _0x26976b=_0x343a;return _0x2e0747[_0x26976b(0xd4)](_0x5bf9b3,_0x1e0680);}},_0x24aefb=['plugin','uninstall',_0x2e0747[_0x293ebd(0xf1)]];_0x2102f3&&_0x24aefb[_0x293ebd(0xdc)](_0x2e0747['GWpem'],_0x2102f3);const _0x23380c=spawn(_0x293ebd(0xcb),_0x24aefb,{'stdio':[_0x2e0747['MzVAX'],'ignore',_0x2e0747[_0x293ebd(0xec)]],'cwd':_0x2102f3?getProjectRoot():undefined,'shell':process[_0x293ebd(0xda)]==='win32'});_0x23380c['on'](_0x2e0747[_0x293ebd(0xe1)],_0x2dd0d4=>{const _0x57f302=_0x293ebd;_0x25103f[_0x57f302(0xeb)](_0x4a0247,_0x25103f[_0x57f302(0xc2)](_0x2dd0d4,0x0));}),_0x23380c['on'](_0x293ebd(0xc9),()=>{_0x4a0247(![]);});});}async function removeMarketplace(){const _0x57f508=_0x1e92c6,_0x4ceefd={'YYeon':function(_0x4c86ba,_0x52f611){return _0x4c86ba(_0x52f611);},'AdnUK':function(_0x280f14,_0x5b0dde){return _0x280f14===_0x5b0dde;},'IYiSF':function(_0x3c89c1,_0x2af5be){return _0x3c89c1(_0x2af5be);},'YJgXV':function(_0x34f709,_0x45f143,_0x2bf152,_0x4ebd65){return _0x34f709(_0x45f143,_0x2bf152,_0x4ebd65);},'WWKuu':'ignore','pJbTU':_0x57f508(0xc9)};return new Promise(_0x17fab5=>{const _0x274be4=_0x57f508,_0x3ac7f2={'jcquk':function(_0x213d3a,_0x5229ce){const _0x298ebc=_0x343a;return _0x4ceefd[_0x298ebc(0xb3)](_0x213d3a,_0x5229ce);}},_0x34caa2=_0x4ceefd[_0x274be4(0xb8)](spawn,'claude',[_0x274be4(0xca),'marketplace','remove',_0x274be4(0xcf)],{'stdio':[_0x4ceefd['WWKuu'],_0x4ceefd['WWKuu'],'ignore'],'shell':process[_0x274be4(0xda)]==='win32'});_0x34caa2['on'](_0x274be4(0xe3),_0x2c75c8=>{const _0x29c3d4=_0x274be4;_0x4ceefd[_0x29c3d4(0xf0)](_0x17fab5,_0x4ceefd[_0x29c3d4(0xe5)](_0x2c75c8,0x0));}),_0x34caa2['on'](_0x4ceefd['pJbTU'],()=>{const _0x584bf8=_0x274be4;_0x3ac7f2[_0x584bf8(0xed)](_0x17fab5,![]);});});}export async function clean(){const _0x202ecb=_0x1e92c6,_0x16b8e8={'kSCTf':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','AKoBU':function(_0x5cb4b3,_0x341329){return _0x5cb4b3(_0x341329);},'ZhUuB':function(_0x2d02aa){return _0x2d02aa();},'szSRT':function(_0xc3a23c,_0x18fa74,_0x466c77){return _0xc3a23c(_0x18fa74,_0x466c77);},'PpHIO':'✓\x20Removed\x20.ranger/\x20directory','jjWKc':function(_0x305b6a){return _0x305b6a();},'HLHiD':function(_0x2d1687,_0x4deb72){return _0x2d1687(_0x4deb72);},'cujTI':'project','HmGKx':'user','DkynB':function(_0x10acc3,_0x37fe3c,_0x2922f6){return _0x10acc3(_0x37fe3c,_0x2922f6);},'oOsWj':function(_0x6afb78,_0x2a61f8){return _0x6afb78(_0x2a61f8);},'VxkAB':function(_0x53b03e,_0x1123d2,_0x1a32c2){return _0x53b03e(_0x1123d2,_0x1a32c2);},'yEzho':_0x202ecb(0xe7),'MIzzS':_0x202ecb(0xd9),'UICqX':function(_0x37dc1c,_0x1c5d87){return _0x37dc1c(_0x1c5d87);},'WZbnd':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','GSIPy':'\x0a✅\x20Cleanup\x20complete!\x0a','gJlig':'Nothing\x20to\x20clean\x20up.\x0a'};console['log'](_0x16b8e8[_0x202ecb(0xd8)]);let _0x14d99d=![];try{await deleteAllCredentials(),console[_0x202ecb(0xdb)](_0x202ecb(0xd7)),_0x14d99d=!![];}catch{}const _0x2b32d3=getCacheFile();existsSync(_0x2b32d3)&&(await _0x16b8e8['AKoBU'](rm,_0x2b32d3),_0x14d99d=!![]);const _0x5a49bc=_0x16b8e8['ZhUuB'](getRangerDir);existsSync(_0x5a49bc)&&(await _0x16b8e8['szSRT'](rm,_0x5a49bc,{'recursive':!![]}),console[_0x202ecb(0xdb)](_0x16b8e8[_0x202ecb(0xba)]),_0x14d99d=!![]);const _0x2d68a8=_0x16b8e8[_0x202ecb(0xc8)](getProjectSkillsDir);for(const _0x24d134 of skillsToRemove){const _0x3e92d4=join(_0x2d68a8,_0x24d134);existsSync(_0x3e92d4)&&(await _0x16b8e8['szSRT'](rm,_0x3e92d4,{'recursive':!![]}),console[_0x202ecb(0xdb)](_0x202ecb(0xc1)+_0x24d134),_0x14d99d=!![]);}const _0x58ebeb=_0x16b8e8['jjWKc'](getUserSkillsDir);for(const _0x3f6801 of skillsToRemove){const _0x257ff0=join(_0x58ebeb,_0x3f6801);_0x16b8e8['AKoBU'](existsSync,_0x257ff0)&&(await rm(_0x257ff0,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x3f6801),_0x14d99d=!![]);}const _0x5b74fa=_0x16b8e8[_0x202ecb(0xb5)](getOpencodeSkillsDir,_0x16b8e8[_0x202ecb(0xef)]);for(const _0x56a995 of skillsToRemove){const _0x3dea16=join(_0x5b74fa,_0x56a995);existsSync(_0x3dea16)&&(await rm(_0x3dea16,{'recursive':!![]}),console['log'](_0x202ecb(0xe4)+_0x56a995),_0x14d99d=!![]);}const _0x2edddf=getOpencodeSkillsDir(_0x16b8e8[_0x202ecb(0xee)]);for(const _0x1acedf of skillsToRemove){const _0x5f45c7=_0x16b8e8['szSRT'](join,_0x2edddf,_0x1acedf);_0x16b8e8['AKoBU'](existsSync,_0x5f45c7)&&(await _0x16b8e8['DkynB'](rm,_0x5f45c7,{'recursive':!![]}),console[_0x202ecb(0xdb)](_0x202ecb(0xc0)+_0x1acedf),_0x14d99d=!![]);}const _0x82f4f=join(getOpencodeConfigDir(_0x16b8e8['cujTI']),'opencode.json');await _0x16b8e8[_0x202ecb(0xce)](removeOpencodePluginConfig,_0x82f4f)&&(console[_0x202ecb(0xdb)](_0x202ecb(0xd3)),_0x14d99d=!![]);const _0x42eb09=_0x16b8e8['VxkAB'](join,_0x16b8e8['AKoBU'](getOpencodeConfigDir,_0x16b8e8['HmGKx']),_0x202ecb(0xd5));await removeOpencodePluginConfig(_0x42eb09)&&(console['log'](_0x16b8e8[_0x202ecb(0xe0)]),_0x14d99d=!![]);const _0x1ddb57=await _0x16b8e8[_0x202ecb(0xc6)](uninstallClaudePlugin);_0x1ddb57&&(console[_0x202ecb(0xdb)](_0x16b8e8[_0x202ecb(0xbe)]),_0x14d99d=!![]);const _0x901eb4=await _0x16b8e8[_0x202ecb(0xbf)](uninstallClaudePlugin,_0x16b8e8[_0x202ecb(0xef)]);_0x901eb4&&(console[_0x202ecb(0xdb)](_0x16b8e8[_0x202ecb(0xc3)]),_0x14d99d=!![]);const _0x4818a6=await _0x16b8e8['jjWKc'](removeMarketplace);_0x4818a6&&(console[_0x202ecb(0xdb)](_0x202ecb(0xe2)),_0x14d99d=!![]),_0x14d99d?console['log'](_0x16b8e8[_0x202ecb(0xe6)]):console['log'](_0x16b8e8['gJlig']);}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4c879c=_0x2346;(function(_0x27f5b3,_0x930e19){const _0x549015=_0x2346,_0x16abdc=_0x27f5b3();while(!![]){try{const _0x22991e=parseInt(_0x549015(0x143))/0x1*(parseInt(_0x549015(0x175))/0x2)+-parseInt(_0x549015(0x174))/0x3*(-parseInt(_0x549015(0x158))/0x4)+parseInt(_0x549015(0x170))/0x5+parseInt(_0x549015(0x150))/0x6*(parseInt(_0x549015(0x172))/0x7)+parseInt(_0x549015(0x176))/0x8+-parseInt(_0x549015(0x17a))/0x9*(-parseInt(_0x549015(0x161))/0xa)+-parseInt(_0x549015(0x162))/0xb;if(_0x22991e===_0x930e19)break;else _0x16abdc['push'](_0x16abdc['shift']());}catch(_0x17f284){_0x16abdc['push'](_0x16abdc['shift']());}}}(_0x2b8d,0xd399c));import{existsSync}from'fs';function _0x2b8d(){const _0x2df6fb=['12vxXFjS','246338lvuoPD','9904424DnIDdh','\x20for\x20\x22','Key\x20\x22','aKiCW','15309YpJySS','parse','13sFMogs','keys','iXmHI','isSafeInteger','WRpko','No\x20configuration\x20set\x20for\x20\x22','yhnOq','pvHKA','(not\x20set)','VxMNE','Invalid\x20value\x20for\x20','true','YvhsT','6594eNbydh','QSQEk','kind','\x20=\x20','Cleared\x20local\x20overrides\x20for\x20\x22','undefined','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','WjUsn','803888ZzsgSB','trim','eRvvp','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','vHMGI','KhWNj','EwBov','local','lcvaA','8790PpBCwF','61944454efOVGH','includes','endsWith','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','isNaN','ZjfiR','cloud','headless','ccSEQ','stringify','bCVqT','log','Set\x20','startsWith','2913600JTfVvP','hkoeX','4949VSuBMd','itVuh'];_0x2b8d=function(){return _0x2df6fb;};return _0x2b8d();}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=[_0x4c879c(0x169),'allowInsecureLocalhost'];function parseLocalValue(_0xdb1e01,_0x84b113){const _0x356fef=_0x4c879c,_0x309bf3={'NRztx':function(_0x5e2b90,_0x1e09c0){return _0x5e2b90===_0x1e09c0;}};if(BOOLEAN_KEYS[_0x356fef(0x163)](_0xdb1e01)){if(_0x84b113===_0x356fef(0x14e))return!![];if(_0x309bf3['NRztx'](_0x84b113,'false'))return![];throw new Error(_0x356fef(0x14d)+_0xdb1e01+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x84b113;}function parseOverrideValue(_0x4f0ca2){const _0x552644=_0x4c879c,_0x5d1875={'bCVqT':function(_0x1a19ce,_0x31709e){return _0x1a19ce===_0x31709e;},'WjUsn':'false','VxMNE':function(_0x5eef09,_0x3de23d){return _0x5eef09===_0x3de23d;},'ewYQV':function(_0x8c9a59,_0x475a5f){return _0x8c9a59===_0x475a5f;},'eRvvp':function(_0xb9d3bf,_0x4a67eb){return _0xb9d3bf(_0x4a67eb);},'wNQzF':function(_0xfee003,_0x19c713){return _0xfee003(_0x19c713);}};if(_0x4f0ca2==='true')return!![];if(_0x5d1875[_0x552644(0x16c)](_0x4f0ca2,_0x5d1875[_0x552644(0x157)]))return![];if(_0x5d1875[_0x552644(0x14c)](_0x4f0ca2,'null'))return null;if(_0x5d1875['ewYQV'](_0x4f0ca2,_0x552644(0x155)))return undefined;if(/^-?\d+$/['test'](_0x4f0ca2)){const _0x5cb9c3=_0x5d1875[_0x552644(0x15a)](Number,_0x4f0ca2);if(Number[_0x552644(0x146)](_0x5cb9c3))return _0x5cb9c3;}if(/^-?\d+\.\d+$/['test'](_0x4f0ca2)){const _0x4cdccb=_0x5d1875['wNQzF'](Number,_0x4f0ca2);if(!Number[_0x552644(0x166)](_0x4cdccb))return _0x4cdccb;}const _0x25f954=_0x4f0ca2[_0x552644(0x159)]();if(_0x25f954[_0x552644(0x16f)]('{')&&_0x25f954['endsWith']('}')||_0x25f954['startsWith']('[')&&_0x25f954[_0x552644(0x164)](']'))try{return JSON[_0x552644(0x142)](_0x25f954);}catch{}return _0x4f0ca2;}async function resolveProfileTarget(_0x4ad199){const _0x4fbd9b=_0x4c879c,_0x4d16b8={'aKiCW':function(_0x3f7f8b,_0xf88645){return _0x3f7f8b(_0xf88645);}},_0x2a48a2=existsSync(getEnvDir(_0x4ad199));let _0x62a20=![];try{const _0x3292be=await _0x4d16b8['aKiCW'](fetchCloudProfile,_0x4ad199);_0x62a20=_0x4d16b8[_0x4fbd9b(0x179)](Boolean,_0x3292be);}catch{}if(_0x62a20)return{'kind':'cloud','alsoExistsElsewhere':_0x2a48a2};if(_0x2a48a2)return{'kind':_0x4fbd9b(0x15f),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4ad199+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4ad199);}function printDualExistsHint(_0x25c23f){const _0xc049e2=_0x4c879c;console[_0xc049e2(0x16d)]('\x20\x20Note:\x20\x22'+_0x25c23f+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}function _0x2346(_0x4f57b0,_0x2e025b){_0x4f57b0=_0x4f57b0-0x142;const _0x2b8d3c=_0x2b8d();let _0x23465f=_0x2b8d3c[_0x4f57b0];return _0x23465f;}async function loadEffectiveCloudSettings(_0x4ec26b){const _0x24163f=_0x4c879c,_0x32821e={'vHMGI':function(_0xf7fa88,_0x6538d5){return _0xf7fa88(_0x6538d5);},'Nmhzn':function(_0x3ae1b4,_0x426f55,_0x221c51){return _0x3ae1b4(_0x426f55,_0x221c51);},'CYrdT':function(_0xbaed83,_0xd1d1fc,_0x1548a0){return _0xbaed83(_0xd1d1fc,_0x1548a0);},'nUVWZ':function(_0x5418a2,_0x5b59aa){return _0x5418a2??_0x5b59aa;}},_0x3e1676=await _0x32821e[_0x24163f(0x15c)](fetchCloudProfile,_0x4ec26b),_0x527097=_0x32821e['Nmhzn'](readProfileOverrides,getProjectPath(),_0x4ec26b);return _0x32821e['CYrdT'](mergeCloudProfileSettings,_0x3e1676?.['settings']??{},_0x32821e['nUVWZ'](_0x527097,undefined));}export async function configSet(_0x3fad5d,_0x41be71,_0x402e71){const _0xbeb74a=_0x4c879c,_0x43057c={'hkoeX':function(_0x24f3fb,_0x269e48){return _0x24f3fb(_0x269e48);},'EwBov':function(_0x29517c,_0x399c6b){return _0x29517c(_0x399c6b);},'QSQEk':function(_0x50e10e,_0x299e42,_0x2babb2,_0x494873,_0x32c992){return _0x50e10e(_0x299e42,_0x2babb2,_0x494873,_0x32c992);},'QROna':function(_0x287836,_0x1eb084,_0xdfd906){return _0x287836(_0x1eb084,_0xdfd906);},'itVuh':function(_0xadd797){return _0xadd797();}},_0x795d18=await _0x43057c[_0xbeb74a(0x171)](resolveProfileTarget,_0x3fad5d);if(_0x795d18['kind']==='cloud'){if(_0x795d18['alsoExistsElsewhere'])_0x43057c[_0xbeb74a(0x15e)](printDualExistsHint,_0x3fad5d);const _0x5d9739=parseOverrideValue(_0x402e71);_0x43057c[_0xbeb74a(0x151)](setProfileOverride,getProjectPath(),_0x3fad5d,_0x41be71,_0x5d9739),console[_0xbeb74a(0x16d)](_0xbeb74a(0x16e)+_0x41be71+_0xbeb74a(0x153)+JSON[_0xbeb74a(0x16b)](_0x5d9739)+'\x20for\x20\x22'+_0x3fad5d+'\x22');return;}const _0x519a0a=_0x43057c['QROna'](parseLocalValue,_0x41be71,_0x402e71);setProfileOverride(_0x43057c[_0xbeb74a(0x173)](getProjectPath),_0x3fad5d,_0x41be71,_0x519a0a),console[_0xbeb74a(0x16d)](_0xbeb74a(0x16e)+_0x41be71+'\x20=\x20'+_0x519a0a+'\x20for\x20\x22'+_0x3fad5d+'\x22');}export async function configGet(_0x27e136,_0x405b62){const _0x343911=_0x4c879c,_0xa2aa5d={'pvHKA':'cloud','yhnOq':function(_0x407292,_0x3c1560,_0x5bf834){return _0x407292(_0x3c1560,_0x5bf834);},'qyFek':function(_0x943e68,_0x970b33){return _0x943e68===_0x970b33;},'YvhsT':'object','lcvaA':function(_0x327008,_0x1dbbcb){return _0x327008(_0x1dbbcb);}},_0x33fc86=await resolveProfileTarget(_0x27e136);if(_0x33fc86['kind']===_0xa2aa5d[_0x343911(0x14a)]){const _0xf0866=await loadEffectiveCloudSettings(_0x27e136),_0x10de2b=_0xa2aa5d[_0x343911(0x149)](getNestedValue,_0xf0866,_0x405b62);if(_0xa2aa5d['qyFek'](_0x10de2b,undefined))console[_0x343911(0x16d)](_0x343911(0x14b));else typeof _0x10de2b===_0xa2aa5d[_0x343911(0x14f)]?console['log'](JSON[_0x343911(0x16b)](_0x10de2b,null,0x2)):console['log'](_0x10de2b);return;}const _0x302fa0=await _0xa2aa5d[_0x343911(0x160)](loadSettings,_0x27e136),_0x227f18=_0xa2aa5d['yhnOq'](getNestedValue,_0x302fa0,_0x405b62);if(_0x227f18===undefined)console[_0x343911(0x16d)](_0x343911(0x14b));else typeof _0x227f18===_0xa2aa5d[_0x343911(0x14f)]?console[_0x343911(0x16d)](JSON['stringify'](_0x227f18,null,0x2)):console[_0x343911(0x16d)](_0x227f18);}export async function configList(_0x25fa05){const _0x44f60c=_0x4c879c,_0x4969ef={'ZjfiR':function(_0x38b00c,_0x2ce628){return _0x38b00c===_0x2ce628;},'aiFop':function(_0x3fb5d3,_0x1c7416){return _0x3fb5d3(_0x1c7416);},'ccSEQ':function(_0x218ab9,_0x13c1f1){return _0x218ab9(_0x13c1f1);},'FZDdG':function(_0x28f809,_0x457c24){return _0x28f809(_0x457c24);}},_0x1b45e6=await resolveProfileTarget(_0x25fa05);if(_0x4969ef['ZjfiR'](_0x1b45e6[_0x44f60c(0x152)],_0x44f60c(0x168))){const _0x5569f4=await loadEffectiveCloudSettings(_0x25fa05);if(!_0x5569f4||_0x4969ef[_0x44f60c(0x167)](Object[_0x44f60c(0x144)](_0x5569f4)['length'],0x0)){console[_0x44f60c(0x16d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x25fa05+'\x22');return;}console[_0x44f60c(0x16d)](JSON['stringify'](_0x5569f4,null,0x2));return;}const _0x3ae2a8=_0x4969ef['aiFop'](getSettingsPath,_0x25fa05);if(!_0x4969ef[_0x44f60c(0x16a)](existsSync,_0x3ae2a8)){console[_0x44f60c(0x16d)](_0x44f60c(0x148)+_0x25fa05+'\x22');return;}const _0x190f91=await _0x4969ef['FZDdG'](loadSettings,_0x25fa05),_0x59e772=formatSettings(_0x190f91);!_0x59e772?console[_0x44f60c(0x16d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x25fa05+'\x22'):console['log'](_0x59e772);}export async function configUnset(_0x38330d,_0x2ef27f){const _0x53c6fa=_0x4c879c,_0x55a5d9={'fjrmD':function(_0x46b1c4,_0x242107){return _0x46b1c4(_0x242107);},'wmCUa':'cloud','AlMkz':function(_0x4830cd){return _0x4830cd();},'KhWNj':function(_0x555785,_0x50e1e5,_0x421f7e,_0x1c6704){return _0x555785(_0x50e1e5,_0x421f7e,_0x1c6704);},'FVCof':function(_0x2d1424,_0x1bbec3,_0x140991){return _0x2d1424(_0x1bbec3,_0x140991);}},_0x38a453=await _0x55a5d9['fjrmD'](resolveProfileTarget,_0x38330d);if(_0x38a453['kind']===_0x55a5d9['wmCUa']){if(_0x38a453['alsoExistsElsewhere'])printDualExistsHint(_0x38330d);const _0x4aa3cf=unsetProfileOverride(_0x55a5d9['AlMkz'](getProjectPath),_0x38330d,_0x2ef27f);_0x4aa3cf?console[_0x53c6fa(0x16d)]('Removed\x20'+_0x2ef27f+_0x53c6fa(0x177)+_0x38330d+'\x22'):console['log'](_0x53c6fa(0x178)+_0x2ef27f+'\x22\x20not\x20found');return;}const _0x3dc188=_0x55a5d9[_0x53c6fa(0x15d)](unsetProfileOverride,getProjectPath(),_0x38330d,_0x2ef27f);if(_0x3dc188){console[_0x53c6fa(0x16d)]('Removed\x20'+_0x2ef27f);return;}const _0x592ad5=await loadSettings(_0x38330d),_0xcfe977=_0x55a5d9['FVCof'](deleteNestedValue,_0x592ad5,_0x2ef27f);_0xcfe977?console['log'](_0x53c6fa(0x178)+_0x2ef27f+_0x53c6fa(0x165)+_0x38330d+_0x53c6fa(0x15b)):console['log'](_0x53c6fa(0x178)+_0x2ef27f+'\x22\x20not\x20found');}export async function configReset(_0x297d23){const _0x274852=_0x4c879c,_0x534590={'iXmHI':_0x274852(0x168),'WRpko':function(_0x5652b8,_0x54cc8e,_0x1b357c){return _0x5652b8(_0x54cc8e,_0x1b357c);},'yXFeM':function(_0x389e1e){return _0x389e1e();}},_0x5cae93=await resolveProfileTarget(_0x297d23);if(_0x5cae93['kind']===_0x534590[_0x274852(0x145)]){_0x534590[_0x274852(0x147)](resetProfileOverrides,_0x534590['yXFeM'](getProjectPath),_0x297d23),console['log'](_0x274852(0x154)+_0x297d23+'\x22');return;}console['log']('\x22'+_0x297d23+_0x274852(0x156)+_0x297d23+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
1
|
+
const _0x4af29d=_0x15a1;(function(_0x4870e7,_0x3946b3){const _0x4262d3=_0x15a1,_0x2d9b7b=_0x4870e7();while(!![]){try{const _0x4c136a=parseInt(_0x4262d3(0x1e9))/0x1+parseInt(_0x4262d3(0x1ca))/0x2+parseInt(_0x4262d3(0x1f8))/0x3*(parseInt(_0x4262d3(0x1f0))/0x4)+-parseInt(_0x4262d3(0x1e0))/0x5*(-parseInt(_0x4262d3(0x1d7))/0x6)+parseInt(_0x4262d3(0x1eb))/0x7*(-parseInt(_0x4262d3(0x1db))/0x8)+-parseInt(_0x4262d3(0x1e4))/0x9*(-parseInt(_0x4262d3(0x1e6))/0xa)+parseInt(_0x4262d3(0x1cd))/0xb;if(_0x4c136a===_0x3946b3)break;else _0x2d9b7b['push'](_0x2d9b7b['shift']());}catch(_0x567a80){_0x2d9b7b['push'](_0x2d9b7b['shift']());}}}(_0x4ed7,0xaa5ed));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=[_0x4af29d(0x1cf),_0x4af29d(0x1f6),_0x4af29d(0x1c4)];function _0x15a1(_0x3c646b,_0x4c915e){_0x3c646b=_0x3c646b-0x1c4;const _0x4ed743=_0x4ed7();let _0x15a156=_0x4ed743[_0x3c646b];return _0x15a156;}function parseLocalValue(_0x4794d7,_0x5e8344){const _0x38fb26=_0x4af29d,_0x582fc5={'MJDVI':function(_0x318822,_0x502a4d){return _0x318822===_0x502a4d;},'DmLgS':_0x38fb26(0x1f9)};if(BOOLEAN_KEYS['includes'](_0x4794d7)){if(_0x582fc5['MJDVI'](_0x5e8344,_0x582fc5['DmLgS']))return!![];if(_0x5e8344==='false')return![];throw new Error(_0x38fb26(0x1d3)+_0x4794d7+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x5e8344;}function parseOverrideValue(_0x285cd5){const _0x28f856=_0x4af29d,_0x1053f8={'LHZTw':function(_0x2e884c,_0x3aa65c){return _0x2e884c===_0x3aa65c;},'fnYlh':_0x28f856(0x1d8),'hrKzv':function(_0x48897a,_0x5afbeb){return _0x48897a(_0x5afbeb);},'DOsKw':function(_0x8aec30,_0x165d4b){return _0x8aec30(_0x165d4b);}};if(_0x1053f8['LHZTw'](_0x285cd5,'true'))return!![];if(_0x285cd5===_0x1053f8[_0x28f856(0x1ea)])return![];if(_0x1053f8[_0x28f856(0x1fe)](_0x285cd5,_0x28f856(0x1fb)))return null;if(_0x285cd5==='undefined')return undefined;if(/^-?\d+$/[_0x28f856(0x1d5)](_0x285cd5)){const _0x1733ba=_0x1053f8['hrKzv'](Number,_0x285cd5);if(Number['isSafeInteger'](_0x1733ba))return _0x1733ba;}if(/^-?\d+\.\d+$/['test'](_0x285cd5)){const _0x5e4a22=_0x1053f8['DOsKw'](Number,_0x285cd5);if(!Number[_0x28f856(0x1de)](_0x5e4a22))return _0x5e4a22;}const _0x2eb656=_0x285cd5['trim']();if(_0x2eb656[_0x28f856(0x1f7)]('{')&&_0x2eb656[_0x28f856(0x1f1)]('}')||_0x2eb656[_0x28f856(0x1f7)]('[')&&_0x2eb656['endsWith'](']'))try{return JSON['parse'](_0x2eb656);}catch{}return _0x285cd5;}async function resolveProfileTarget(_0x5b308f){const _0x35f1db=_0x4af29d,_0x33cd61={'iRcrN':function(_0xa5e271,_0x463e91){return _0xa5e271(_0x463e91);},'dSYUd':function(_0x217221,_0x42f4f1){return _0x217221(_0x42f4f1);},'xOaOq':_0x35f1db(0x1ef),'OPeCO':'local'},_0x2ab500=existsSync(getEnvDir(_0x5b308f));let _0x6ef536=![];try{const _0xfed995=await _0x33cd61[_0x35f1db(0x1df)](fetchCloudProfile,_0x5b308f);_0x6ef536=_0x33cd61['dSYUd'](Boolean,_0xfed995);}catch{}if(_0x6ef536)return{'kind':_0x33cd61['xOaOq'],'alsoExistsElsewhere':_0x2ab500};if(_0x2ab500)return{'kind':_0x33cd61[_0x35f1db(0x1fc)],'alsoExistsElsewhere':![]};throw new Error(_0x35f1db(0x1f4)+_0x5b308f+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x5b308f);}function printDualExistsHint(_0x4569f3){const _0x3b3745=_0x4af29d;console[_0x3b3745(0x1e2)]('\x20\x20Note:\x20\x22'+_0x4569f3+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x39755f){const _0x104eb8=_0x4af29d,_0x6fd466={'iIkLE':function(_0x1a9f83,_0x47f901){return _0x1a9f83(_0x47f901);},'QZPOT':function(_0x19b9c4){return _0x19b9c4();},'yEPgQ':function(_0x57090d,_0x459a05,_0x23d196){return _0x57090d(_0x459a05,_0x23d196);},'ZYrdD':function(_0x59ea00,_0x2a8a41){return _0x59ea00??_0x2a8a41;}},_0x454453=await _0x6fd466[_0x104eb8(0x1d6)](fetchCloudProfile,_0x39755f),_0x490894=readProfileOverrides(_0x6fd466['QZPOT'](getProjectPath),_0x39755f);return _0x6fd466['yEPgQ'](mergeCloudProfileSettings,_0x454453?.['settings']??{},_0x6fd466[_0x104eb8(0x1cb)](_0x490894,undefined));}function _0x4ed7(){const _0x51e6d4=['object','hskSQ','DdGqF','keys','277314zqDSmC','ZYrdD','phEZR','2654333UxQYeR','QxKTy','headless','yrTcx','bgXnb','EkETK','Invalid\x20value\x20for\x20','No\x20configuration\x20set\x20for\x20\x22','test','iIkLE','18GTTxjG','false','MFpWR','Removed\x20','8PoBcEX','Key\x20\x22','\x22\x20not\x20found','isNaN','iRcrN','294865OTZgWe','Set\x20','log','ktIzy','18TSIYvN','kind','872930jpQxCl','(not\x20set)','\x20=\x20','666113fssvac','fnYlh','5342897SFZSYM','lRfbk','alsoExistsElsewhere','KkvHK','cloud','4ctrCiH','endsWith','\x20for\x20\x22','length','Profile\x20\x22','stringify','allowInsecureLocalhost','startsWith','190590AvKpLb','true','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','null','OPeCO','JEikN','LHZTw','idEWi','forceLogin','kXCYG'];_0x4ed7=function(){return _0x51e6d4;};return _0x4ed7();}export async function configSet(_0x3aef09,_0x353764,_0x58d822){const _0x3dcbbd=_0x4af29d,_0x3cff6f={'phEZR':function(_0x25cc09,_0x2dd35a){return _0x25cc09(_0x2dd35a);},'kXCYG':function(_0x1a3d8d,_0x4ebe3b,_0x51db90,_0x4921a5,_0x30f18c){return _0x1a3d8d(_0x4ebe3b,_0x51db90,_0x4921a5,_0x30f18c);}},_0x2ec487=await _0x3cff6f[_0x3dcbbd(0x1cc)](resolveProfileTarget,_0x3aef09);if(_0x2ec487[_0x3dcbbd(0x1e5)]==='cloud'){if(_0x2ec487[_0x3dcbbd(0x1ed)])_0x3cff6f['phEZR'](printDualExistsHint,_0x3aef09);const _0x59c9fe=parseOverrideValue(_0x58d822);_0x3cff6f[_0x3dcbbd(0x1c5)](setProfileOverride,getProjectPath(),_0x3aef09,_0x353764,_0x59c9fe),console['log'](_0x3dcbbd(0x1e1)+_0x353764+_0x3dcbbd(0x1e8)+JSON[_0x3dcbbd(0x1f5)](_0x59c9fe)+_0x3dcbbd(0x1f2)+_0x3aef09+'\x22');return;}const _0x318fff=parseLocalValue(_0x353764,_0x58d822);setProfileOverride(getProjectPath(),_0x3aef09,_0x353764,_0x318fff),console[_0x3dcbbd(0x1e2)](_0x3dcbbd(0x1e1)+_0x353764+_0x3dcbbd(0x1e8)+_0x318fff+'\x20for\x20\x22'+_0x3aef09+'\x22');}export async function configGet(_0x22cd77,_0x4b60fb){const _0x2ba38b=_0x4af29d,_0x21a0c7={'JEikN':function(_0x587c0c,_0x17a9ac){return _0x587c0c(_0x17a9ac);},'DdGqF':function(_0x2fcb13,_0x83bcb4,_0x3d1b53){return _0x2fcb13(_0x83bcb4,_0x3d1b53);},'MFpWR':function(_0x5ebfdd,_0x4d8ed0){return _0x5ebfdd===_0x4d8ed0;}},_0x3d6571=await _0x21a0c7[_0x2ba38b(0x1fd)](resolveProfileTarget,_0x22cd77);if(_0x3d6571[_0x2ba38b(0x1e5)]==='cloud'){const _0x2b3e00=await loadEffectiveCloudSettings(_0x22cd77),_0x55963f=_0x21a0c7[_0x2ba38b(0x1c8)](getNestedValue,_0x2b3e00,_0x4b60fb);if(_0x21a0c7[_0x2ba38b(0x1d9)](_0x55963f,undefined))console[_0x2ba38b(0x1e2)]('(not\x20set)');else typeof _0x55963f==='object'?console[_0x2ba38b(0x1e2)](JSON['stringify'](_0x55963f,null,0x2)):console['log'](_0x55963f);return;}const _0x54695f=await loadSettings(_0x22cd77),_0x11eaa2=_0x21a0c7[_0x2ba38b(0x1c8)](getNestedValue,_0x54695f,_0x4b60fb);if(_0x11eaa2===undefined)console[_0x2ba38b(0x1e2)](_0x2ba38b(0x1e7));else typeof _0x11eaa2===_0x2ba38b(0x1c6)?console[_0x2ba38b(0x1e2)](JSON[_0x2ba38b(0x1f5)](_0x11eaa2,null,0x2)):console['log'](_0x11eaa2);}export async function configList(_0x470ec7){const _0x46a798=_0x4af29d,_0x160fda={'QxKTy':function(_0x1a10b0,_0x17d1d5){return _0x1a10b0(_0x17d1d5);},'lRfbk':function(_0x232022,_0x323792){return _0x232022===_0x323792;},'ktIzy':function(_0x54f93e,_0x192a69){return _0x54f93e(_0x192a69);},'GmOoO':function(_0x4cdd6d,_0xb8888c){return _0x4cdd6d(_0xb8888c);}},_0x35982b=await _0x160fda['QxKTy'](resolveProfileTarget,_0x470ec7);if(_0x160fda[_0x46a798(0x1ec)](_0x35982b['kind'],_0x46a798(0x1ef))){const _0x2d57e3=await loadEffectiveCloudSettings(_0x470ec7);if(!_0x2d57e3||_0x160fda['lRfbk'](Object[_0x46a798(0x1c9)](_0x2d57e3)[_0x46a798(0x1f3)],0x0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x470ec7+'\x22');return;}console['log'](JSON['stringify'](_0x2d57e3,null,0x2));return;}const _0x3b0fc1=_0x160fda[_0x46a798(0x1e3)](getSettingsPath,_0x470ec7);if(!existsSync(_0x3b0fc1)){console[_0x46a798(0x1e2)](_0x46a798(0x1d4)+_0x470ec7+'\x22');return;}const _0x11a2bc=await _0x160fda[_0x46a798(0x1ce)](loadSettings,_0x470ec7),_0x5dc27c=_0x160fda['GmOoO'](formatSettings,_0x11a2bc);!_0x5dc27c?console[_0x46a798(0x1e2)]('No\x20configuration\x20set\x20for\x20\x22'+_0x470ec7+'\x22'):console['log'](_0x5dc27c);}export async function configUnset(_0xc000b7,_0x46b907){const _0x4fdd69=_0x4af29d,_0x2a5301={'hskSQ':function(_0x52c8eb,_0xf57d9e){return _0x52c8eb(_0xf57d9e);},'EkETK':function(_0x3d433f,_0x42c3c1){return _0x3d433f===_0x42c3c1;},'bgXnb':function(_0x4a9b08,_0x243ac9){return _0x4a9b08(_0x243ac9);},'yrTcx':function(_0x1df283,_0x3340a7,_0x3c4ef5,_0x1a437d){return _0x1df283(_0x3340a7,_0x3c4ef5,_0x1a437d);},'rSKDJ':function(_0x3d7c04,_0x2f74cd,_0x4d8865,_0x556ce3){return _0x3d7c04(_0x2f74cd,_0x4d8865,_0x556ce3);},'ufbpB':function(_0x303339){return _0x303339();},'idEWi':function(_0x116374,_0x37a44f){return _0x116374(_0x37a44f);}},_0x5885cd=await _0x2a5301[_0x4fdd69(0x1c7)](resolveProfileTarget,_0xc000b7);if(_0x2a5301[_0x4fdd69(0x1d2)](_0x5885cd['kind'],'cloud')){if(_0x5885cd['alsoExistsElsewhere'])_0x2a5301[_0x4fdd69(0x1d1)](printDualExistsHint,_0xc000b7);const _0x55cab7=_0x2a5301[_0x4fdd69(0x1d0)](unsetProfileOverride,getProjectPath(),_0xc000b7,_0x46b907);_0x55cab7?console['log'](_0x4fdd69(0x1da)+_0x46b907+'\x20for\x20\x22'+_0xc000b7+'\x22'):console['log']('Key\x20\x22'+_0x46b907+_0x4fdd69(0x1dd));return;}const _0xb74752=_0x2a5301['rSKDJ'](unsetProfileOverride,_0x2a5301['ufbpB'](getProjectPath),_0xc000b7,_0x46b907);if(_0xb74752){console[_0x4fdd69(0x1e2)]('Removed\x20'+_0x46b907);return;}const _0x3898ee=await _0x2a5301[_0x4fdd69(0x1ff)](loadSettings,_0xc000b7),_0xfb550c=deleteNestedValue(_0x3898ee,_0x46b907);_0xfb550c?console[_0x4fdd69(0x1e2)](_0x4fdd69(0x1dc)+_0x46b907+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0xc000b7+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x4fdd69(0x1e2)](_0x4fdd69(0x1dc)+_0x46b907+_0x4fdd69(0x1dd));}export async function configReset(_0x31aaf4){const _0x3953cf=_0x4af29d,_0x3bcd88={'nWqDx':function(_0x2c3147,_0x5056fa){return _0x2c3147(_0x5056fa);},'KkvHK':_0x3953cf(0x1ef)},_0xfd6af7=await _0x3bcd88['nWqDx'](resolveProfileTarget,_0x31aaf4);if(_0xfd6af7[_0x3953cf(0x1e5)]===_0x3bcd88[_0x3953cf(0x1ee)]){resetProfileOverrides(getProjectPath(),_0x31aaf4),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x31aaf4+'\x22');return;}console['log']('\x22'+_0x31aaf4+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x31aaf4+_0x3953cf(0x1fa));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5d63(){const _0x146e84=['13RIuCvl','\x22\x20not\x20found.','wLRRY','prompt','yes','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x22\x20for\x20everyone\x20in\x20your\x20organization.','4eIlhqd','10wFTCHq','261804sPeZXJ','273SYlwNQ','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','890571JCjXIs','10983182ebqcdy','confirmation','eEFMR','46006dEERgA','76488dIxOPy','5316GNejvj','1460EIVbVN','ZWoLS','12PTcQWq','\x22\x20to\x20confirm\x20deletion:','Cloud\x20profile\x20\x22','33rqZMFK','1310058NXmXLM','cwd'];_0x5d63=function(){return _0x146e84;};return _0x5d63();}(function(_0x220eee,_0x4028e4){const _0x230c08=_0xed9a,_0x3f9870=_0x220eee();while(!![]){try{const _0x263791=parseInt(_0x230c08(0x196))/0x1*(parseInt(_0x230c08(0x19b))/0x2)+parseInt(_0x230c08(0x192))/0x3*(-parseInt(_0x230c08(0x18d))/0x4)+parseInt(_0x230c08(0x199))/0x5*(-parseInt(_0x230c08(0x198))/0x6)+-parseInt(_0x230c08(0x190))/0x7*(parseInt(_0x230c08(0x197))/0x8)+-parseInt(_0x230c08(0x184))/0x9*(-parseInt(_0x230c08(0x18e))/0xa)+-parseInt(_0x230c08(0x183))/0xb*(parseInt(_0x230c08(0x18f))/0xc)+parseInt(_0x230c08(0x186))/0xd*(parseInt(_0x230c08(0x193))/0xe);if(_0x263791===_0x4028e4)break;else _0x3f9870['push'](_0x3f9870['shift']());}catch(_0x2dbff8){_0x3f9870['push'](_0x3f9870['shift']());}}}(_0x5d63,0x33cf4));import _0x39433a from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0xed9a(_0xf30cfd,_0x90a7a2){_0xf30cfd=_0xf30cfd-0x182;const _0x5d6365=_0x5d63();let _0xed9a01=_0x5d6365[_0xf30cfd];return _0xed9a01;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x531f6b,_0x2875ff={}){const _0x16bb34=_0xed9a,_0x57e733={'wLRRY':function(_0x5e237a,_0x5509f6){return _0x5e237a(_0x5509f6);},'eEFMR':function(_0x311cc7){return _0x311cc7();},'JygOA':_0x16bb34(0x194),'ZWoLS':function(_0x24c260,_0x509131,_0x21dd82){return _0x24c260(_0x509131,_0x21dd82);}},_0x4d931f=await _0x57e733['wLRRY'](fetchCloudProfile,_0x531f6b);if(!_0x4d931f)throw new Error(_0x16bb34(0x182)+_0x531f6b+_0x16bb34(0x187));if(!_0x2875ff[_0x16bb34(0x18a)]&&!_0x57e733[_0x16bb34(0x195)](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['log'](_0x16bb34(0x191)+_0x531f6b+_0x16bb34(0x18c));if(!_0x2875ff[_0x16bb34(0x18a)]){const {confirmation:_0x3a63ba}=await _0x39433a[_0x16bb34(0x189)]([{'type':'input','name':_0x57e733['JygOA'],'message':'Type\x20\x22'+_0x531f6b+_0x16bb34(0x19c)}]);if(_0x3a63ba!==_0x531f6b)throw new Error(_0x16bb34(0x18b));}await _0x57e733[_0x16bb34(0x188)](deleteCloudProfile,_0x531f6b),_0x57e733[_0x16bb34(0x19a)](resetProfileOverrides,process[_0x16bb34(0x185)](),_0x531f6b),clearLastProfile(process[_0x16bb34(0x185)](),_0x531f6b),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x531f6b+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x43b512=_0x1bf1;function _0x4156(){const _0x152b93=['\x0aLocal\x20Profiles\x20(legacy):','PxMmi','cached\x20(updated\x20','\x20\x20\x20\x20\x20\x20Details:\x20','DuPea','includes','8644800EfgSzJ','settings.json','Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20\x20\x20\x20\x20Session:\x20','MYMew','legacy','12EZBtAI','xQchL','message','environmentKey','VfQmH','local','muiJY','\x20[cloud]','1868955gYAdOE','isDirectory','WMOBQ','error','sort','reports','1193328revCCr','length','eEUeJ','stGGL','PdFUn','EwnEL','5912424DGOBmq','sessionUpdatedAt','map','61784bktszW','\x0a*\x20=\x20active\x20profile','name','Eimlv','5020910YnHNzK','environmentDetails','15983730brRpdo','4RkbZPH','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','bug-bashes','push','has','log'];_0x4156=function(){return _0x152b93;};return _0x4156();}(function(_0x15a4f4,_0x13a629){const _0x31f951=_0x1bf1,_0x439c5d=_0x15a4f4();while(!![]){try{const _0x28aaf4=parseInt(_0x31f951(0xa5))/0x1*(-parseInt(_0x31f951(0xce))/0x2)+parseInt(_0x31f951(0xbf))/0x3+parseInt(_0x31f951(0xc5))/0x4+-parseInt(_0x31f951(0xa2))/0x5+-parseInt(_0x31f951(0xb7))/0x6*(parseInt(_0x31f951(0xcb))/0x7)+parseInt(_0x31f951(0xb1))/0x8+parseInt(_0x31f951(0xa4))/0x9;if(_0x28aaf4===_0x13a629)break;else _0x439c5d['push'](_0x439c5d['shift']());}catch(_0x2192eb){_0x439c5d['push'](_0x439c5d['shift']());}}}(_0x4156,0xea969));function _0x1bf1(_0x4ccaa8,_0x30bda0){_0x4ccaa8=_0x4ccaa8-0xa2;const _0x41563c=_0x4156();let _0x1bf173=_0x41563c[_0x4ccaa8];return _0x1bf173;}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x43b512(0xa7),_0x43b512(0xc4),'local','ci'];export async function getEnvNames(){const _0x4807fd=_0x43b512,_0x282a52={'IykhI':function(_0x2edfad){return _0x2edfad();},'muiJY':function(_0x49d669,_0x5a82c5){return _0x49d669(_0x5a82c5);},'GNjlj':function(_0x31fc66){return _0x31fc66();},'DuPea':function(_0x4652ab,_0x8681dc,_0x2a98b9){return _0x4652ab(_0x8681dc,_0x2a98b9);},'PdFUn':_0x4807fd(0xbc),'dvpGU':function(_0x39ecb8,_0x51303d){return _0x39ecb8(_0x51303d);},'MYMew':function(_0x55c934,_0x3e4911){return _0x55c934(_0x3e4911);},'EwnEL':function(_0x33d430,_0x419b6d){return _0x33d430(_0x419b6d);},'WWyHx':'.txt','PxMmi':_0x4807fd(0xb2)},_0xbab264=_0x282a52['IykhI'](getRangerDir);if(!_0x282a52[_0x4807fd(0xbd)](existsSync,_0xbab264))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1cd0b7=await _0x282a52['GNjlj'](readActiveProfileName),_0x1f3a62=[],_0x55d251={},_0x117211=_0x282a52[_0x4807fd(0xaf)](join,_0xbab264,_0x282a52[_0x4807fd(0xc9)]);if(existsSync(_0x117211)){const _0x4a7ec8=await _0x282a52['dvpGU'](readdir,_0x117211);for(const _0x5c8256 of _0x4a7ec8){const _0x5efd62=join(_0x117211,_0x5c8256),_0x1fadf4=await _0x282a52[_0x4807fd(0xb5)](stat,_0x5efd62);_0x1fadf4[_0x4807fd(0xc0)]()&&(_0x1f3a62['push'](_0x5c8256),_0x55d251[_0x5c8256]=_0x4807fd(0xbc));}}const _0x308be9=join(_0xbab264,'ci');if(existsSync(_0x308be9)){const _0x48d07d=await readdir(_0x308be9);for(const _0x17a8ea of _0x48d07d){const _0x4ad6d0=join(_0x308be9,_0x17a8ea),_0x5e2d22=await _0x282a52['MYMew'](stat,_0x4ad6d0);_0x5e2d22['isDirectory']()&&(_0x1f3a62[_0x4807fd(0xa8)](_0x17a8ea),_0x55d251[_0x17a8ea]='ci');}}const _0x10881=await _0x282a52[_0x4807fd(0xca)](readdir,_0xbab264);for(const _0x378b96 of _0x10881){if(NON_ENV_DIRS['includes'](_0x378b96))continue;if(_0x378b96['startsWith']('.'))continue;if(_0x378b96['endsWith'](_0x282a52['WWyHx']))continue;const _0xca7b12=join(_0xbab264,_0x378b96),_0x3064d8=await stat(_0xca7b12);_0x3064d8[_0x4807fd(0xc0)]()&&_0x282a52['MYMew'](existsSync,join(_0xca7b12,_0x282a52[_0x4807fd(0xac)]))&&(!_0x1f3a62[_0x4807fd(0xb0)](_0x378b96)&&(_0x1f3a62['push'](_0x378b96),_0x55d251[_0x378b96]='legacy'));}return{'envNames':_0x1f3a62,'activeEnv':_0x1cd0b7,'envTypes':_0x55d251};}export async function envList(){const _0x29885b=_0x43b512,_0x4f456a={'eEUeJ':function(_0x2ac4b2,_0x4e4b45){return _0x2ac4b2 instanceof _0x4e4b45;},'VfQmH':'\x0aNo\x20profiles\x20found.','WMOBQ':function(_0x5bd008,_0x20301f){return _0x5bd008>_0x20301f;},'DNlYp':_0x29885b(0xbc),'Eimlv':function(_0x3cb1ce,_0x510233){return _0x3cb1ce(_0x510233);},'sMxbb':'\x0aCloud\x20Profiles:','stGGL':function(_0x48c3ab,_0x2618a6){return _0x48c3ab===_0x2618a6;},'xQchL':'no\x20session'},{envNames:_0xd05b3c,activeEnv:_0x8d2e0f,envTypes:_0x31a85e}=await getEnvNames();let _0x1d57a3=[];const _0x222cd5=await getToken();if(_0x222cd5)try{_0x1d57a3=await listCloudProfiles();}catch(_0x2b566a){console[_0x29885b(0xc2)](_0x29885b(0xa6)+(_0x4f456a[_0x29885b(0xc7)](_0x2b566a,Error)?_0x2b566a[_0x29885b(0xb9)]:String(_0x2b566a)));}if(_0xd05b3c['length']===0x0&&_0x1d57a3[_0x29885b(0xc6)]===0x0){console[_0x29885b(0xaa)](_0x4f456a[_0x29885b(0xbb)]),console['log'](_0x29885b(0xb3));return;}const _0x314120=new Set(_0x1d57a3[_0x29885b(0xcd)](_0x5f2475=>_0x5f2475['name']));if(_0x4f456a[_0x29885b(0xc1)](_0xd05b3c[_0x29885b(0xc6)],0x0)){console['log'](_0x29885b(0xab));for(const _0x17496d of _0xd05b3c[_0x29885b(0xc3)]()){const _0xf483b1=_0x17496d===_0x8d2e0f&&!_0x314120[_0x29885b(0xa9)](_0x17496d),_0x4c52f9=_0x31a85e[_0x17496d]||_0x4f456a['DNlYp'],_0x1d3b86=await _0x4f456a[_0x29885b(0xd1)](loadSettings,_0x17496d),_0x128876=_0x4c52f9===_0x29885b(0xb6)?'':'\x20['+_0x4c52f9+']';console['log']('\x20\x20'+(_0xf483b1?'*\x20':'\x20\x20')+_0x17496d+_0x128876),_0x1d3b86['baseUrl']&&console[_0x29885b(0xaa)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1d3b86['baseUrl']),_0x1d3b86['environmentDetails']&&console['log'](_0x29885b(0xae)+_0x1d3b86[_0x29885b(0xa3)]);}}if(_0x1d57a3['length']>0x0){console[_0x29885b(0xaa)](_0x4f456a['sMxbb']);for(const _0x281520 of _0x1d57a3[_0x29885b(0xc3)]((_0x21ddc4,_0x38453e)=>_0x21ddc4[_0x29885b(0xd0)]['localeCompare'](_0x38453e[_0x29885b(0xd0)]))){const _0x310a6e=_0x4f456a[_0x29885b(0xc8)](_0x281520['name'],_0x8d2e0f),_0xf15c3=_0x281520['environmentKey']?'\x20('+_0x281520[_0x29885b(0xba)]+')':'',_0x2f0a49=_0x281520[_0x29885b(0xcc)]?_0x29885b(0xad)+_0x281520['sessionUpdatedAt']+')':_0x4f456a[_0x29885b(0xb8)];console[_0x29885b(0xaa)]('\x20\x20'+(_0x310a6e?'*\x20':'\x20\x20')+_0x281520[_0x29885b(0xd0)]+_0x29885b(0xbe)+_0xf15c3),console[_0x29885b(0xaa)](_0x29885b(0xb4)+_0x2f0a49);}}_0x8d2e0f&&console[_0x29885b(0xaa)](_0x29885b(0xcf));}
|