@ranger-testing/ranger-cli 3.0.1-alpha.ffffb5b-28 → 3.1.1-alpha.b22d278-38
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(_0x282231,_0x414ad1){const _0x539c8f=_0x42d4,_0x331f6f=_0x282231();while(!![]){try{const _0x5ce92e=parseInt(_0x539c8f(0x13b))/0x1*(parseInt(_0x539c8f(0x13e))/0x2)+-parseInt(_0x539c8f(0x147))/0x3+-parseInt(_0x539c8f(0x153))/0x4+parseInt(_0x539c8f(0x197))/0x5+parseInt(_0x539c8f(0x14e))/0x6*(parseInt(_0x539c8f(0x193))/0x7)+parseInt(_0x539c8f(0x164))/0x8*(parseInt(_0x539c8f(0x138))/0x9)+-parseInt(_0x539c8f(0x150))/0xa;if(_0x5ce92e===_0x414ad1)break;else _0x331f6f['push'](_0x331f6f['shift']());}catch(_0x25259e){_0x331f6f['push'](_0x331f6f['shift']());}}}(_0x2d97,0xc9e39));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x56a1a7 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0x42d4(_0x3ffbc3,_0x57b956){_0x3ffbc3=_0x3ffbc3-0x131;const _0x2d9704=_0x2d97();let _0x42d450=_0x2d9704[_0x3ffbc3];return _0x42d450;}function _0x2d97(){const _0x12001a=['\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','prompt','eMwTH','FRQwY','CXQzj','XbQsP','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20Set\x20active\x20profile:\x20','capture','QUInO','profile.add.autoRouteSkipped','rewvr','slice','ibVNk','error','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','DwQld','trackPhaseEnd','name','environments','skipAuth','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20(continuing\x20with\x20--force)','4148949MDlTAb','VfBsw','use_suggestion','Continue\x20anyway','3495775utMJgW','\x27\x20created\x20(CDP).','pVKDq','test','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','trim','exit','Jjuzo','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','FjkVH','\x20\x20https://docs.ranger.net/main/concepts/profiles','signal','profile.add.autoRouted','kHgWs','LLuRf','\x0a🌐\x20Profile\x20Setup\x0a','manual','status','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','env','no_auth_config','IlNPF','Invalid\x20--setup-header\x20format:\x20\x22','YxYyD','some','aBOxC','HEAD','CZRlL','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','DghGX','Invalid\x20URL','BFVbO','SDeyH','nVMaS','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','`\x20again\x20without\x20--skip-auth.','indexOf','keys','YHgDC','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','18QAZqfN','yes','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','1SIPmxT','startsWith','✓\x20Cloud\x20profile\x20\x27','881746XqVYYp','DAMFS','SAwBk','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','origin','confirm','JGnZK','IqUBX','setupHeaders','1131717UERSNE','fJetW','no_match','\x27\x20matching\x20','Enter\x20a\x20different\x20URL','oBqEs','gpznW','6WvsqeU','yLkku','3677820whOvIF','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','ufkAD','1628396jofiIG','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x0a\x20\x20(domains:\x20','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','Use\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','includes','isElectron','jtPUk','fetch\x20failed','rWANm','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x27\x20created.\x0a','nUCHp','http://localhost:3000','juEwo','985288ebeuqk','cdpEndpoint','cwd','\x0a\x20\x20A\x20profile\x20named\x20\x22','nYlOD','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','length','log','awoNF','pnkKZ','NODE_TLS_REJECT_UNAUTHORIZED','setupHeader','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','veAcH','retry','MTZcM','ArAff','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','RLCSM','Found\x20auth\x20environment\x20\x27','join','baseUrl','message','✓\x20Profile\x20\x27'];_0x2d97=function(){return _0x12001a;};return _0x2d97();}import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){if(!process['stdout']['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x38b111){const _0x1f0a65=_0x42d4,_0x4d0d26={'jtPUk':_0x1f0a65(0x1b1),'TLAkG':function(_0x431e4a,_0x25a35b,_0x1f4614){return _0x431e4a(_0x25a35b,_0x1f4614);},'wxdLO':_0x1f0a65(0x1b5),'lsNSz':'TypeError'};try{const _0x3edb7d=new AbortController(),_0x130c49=setTimeout(()=>_0x3edb7d['abort'](),0x1388),_0x4ed7f5={'method':_0x4d0d26[_0x1f0a65(0x15c)],'signal':_0x3edb7d[_0x1f0a65(0x1a2)],'redirect':_0x1f0a65(0x1a7)};/^https:\/\/localhost(:\d+)?/i[_0x1f0a65(0x19a)](_0x38b111)&&(process['env'][_0x1f0a65(0x16e)]='0');const _0x41c51d=await _0x4d0d26['TLAkG'](fetch,_0x38b111,_0x4ed7f5);delete process[_0x1f0a65(0x1aa)][_0x1f0a65(0x16e)],clearTimeout(_0x130c49);if(_0x41c51d[_0x1f0a65(0x1a8)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x41c51d[_0x1f0a65(0x1a8)]};}catch(_0x1ebec6){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x8b94cf=_0x1ebec6,_0x2127e8=_0x8b94cf[_0x1f0a65(0x17a)]||String(_0x1ebec6),_0x490bde=_0x2127e8[_0x1f0a65(0x15a)](_0x4d0d26['wxdLO'])||_0x8b94cf[_0x1f0a65(0x18e)]===_0x4d0d26['lsNSz']||_0x2127e8[_0x1f0a65(0x15a)](_0x1f0a65(0x15d));return{'ok':![],'error':_0x2127e8,'isProtocolError':_0x490bde};}}async function sweepOrphanLocalProfile(_0x44f412,_0x36a2ed,_0xde34d1){const _0x190a60=_0x42d4,_0x1be06f={'CZRlL':function(_0x57147e,_0x8cdab){return _0x57147e(_0x8cdab);},'nUCHp':function(_0xcc0202,_0x269320,_0x3c2a45){return _0xcc0202(_0x269320,_0x3c2a45);},'XjMjc':function(_0x2713a7,_0x5e0f17,_0x4d08df){return _0x2713a7(_0x5e0f17,_0x4d08df);}},_0x38c03c=join(_0x36a2ed,'local'),_0x7950d8=join(_0x38c03c,_0x44f412);existsSync(_0x7950d8)&&(_0xde34d1&&await _0x1be06f[_0x190a60(0x1b2)](isPathGitTracked,_0x7950d8)?console['log'](_0x190a60(0x18b)+_0x7950d8+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x7950d8,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x7950d8)));if(existsSync(_0x38c03c)){let _0x9ee588=[];try{_0x9ee588=await _0x1be06f['CZRlL'](readdir,_0x38c03c);}catch{return;}const _0x4b0377='.tmp-'+_0x44f412+'-';for(const _0x3241c1 of _0x9ee588){if(!_0x3241c1[_0x190a60(0x13c)](_0x4b0377))continue;const _0x1704f9=_0x1be06f[_0x190a60(0x161)](join,_0x38c03c,_0x3241c1);await _0x1be06f['XjMjc'](rm,_0x1704f9,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x1704f9);}}}async function sweepOrphansBestEffort(_0x4f7f92){const _0x400132=_0x42d4,_0x220bca={'LLuRf':function(_0xa640e0,_0x1363b1,_0x3e0d01,_0x26ab15){return _0xa640e0(_0x1363b1,_0x3e0d01,_0x26ab15);},'FjkVH':function(_0x2e7981){return _0x2e7981();}};try{await _0x220bca[_0x400132(0x1a5)](sweepOrphanLocalProfile,_0x4f7f92,_0x220bca[_0x400132(0x1a0)](getRangerHomeDir),![]);const _0x2b7e60=_0x220bca[_0x400132(0x1a0)](getRangerDir);_0x2b7e60!==getRangerHomeDir()&&await _0x220bca['LLuRf'](sweepOrphanLocalProfile,_0x4f7f92,_0x2b7e60,!![]);}catch(_0x1619bd){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x1619bd instanceof Error?_0x1619bd['message']:String(_0x1619bd))+').');}}async function markActive(_0x27ec62){const _0x39d2f5=_0x42d4,_0x4925f9={'RnfwS':function(_0x56091e,_0xaacb9e){return _0x56091e(_0xaacb9e);},'ArAff':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x4925f9['RnfwS'](writeActiveProfileName,_0x27ec62),console['log'](_0x39d2f5(0x183)+_0x27ec62);}catch{console[_0x39d2f5(0x16b)](_0x4925f9[_0x39d2f5(0x174)]);}}async function tryAutoRouteCloudProfile(_0x2391a3,_0x5611b6,_0x442cae,_0x459e71,_0x1b6745){const _0x30180f=_0x42d4,_0x2707ad={'QqSgN':function(_0x365a29,_0x29fdd5){return _0x365a29===_0x29fdd5;},'SAwBk':'profile.add.autoRouteSkipped','aBOxC':function(_0x5995bc,_0x1662c5){return _0x5995bc instanceof _0x1662c5;},'ktHqI':function(_0x1efe09,_0x208db4){return _0x1efe09+_0x208db4;},'KFAik':function(_0x3ed471,_0x80bc98){return _0x3ed471+_0x80bc98;},'erEQb':'\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','hvOLS':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','juEwo':_0x30180f(0x182),'nVMaS':_0x30180f(0x17c),'iZyqx':'saveToCloud','BFVbO':'user_declined','gpznW':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','nYlOD':function(_0x5a30c4,_0x502a5e,_0x3ea210,_0xc6a896){return _0x5a30c4(_0x502a5e,_0x3ea210,_0xc6a896);},'btBlX':function(_0x48460f){return _0x48460f();},'ipcaL':function(_0x2b2ab5,_0x358948){return _0x2b2ab5===_0x358948;},'eMwTH':function(_0x292377,_0x36f842){return _0x292377+_0x36f842;}};let _0x91d968;try{_0x91d968=await fetchAuthConfig();}catch(_0x122e9b){return _0x1b6745?.[_0x30180f(0x18d)](_0x2707ad[_0x30180f(0x140)],{'reason':'no_auth_config','profileName':_0x2391a3}),console['error'](_0x30180f(0x170)+(_0x2707ad[_0x30180f(0x1b0)](_0x122e9b,Error)?_0x122e9b[_0x30180f(0x17a)]:String(_0x122e9b))),![];}if(!_0x91d968||!_0x91d968['environments']||Object['keys'](_0x91d968['environments'])[_0x30180f(0x16a)]===0x0){if(_0x459e71)return await captureEnvLessProfile(_0x2391a3,_0x5611b6,_0x442cae,_0x1b6745);return _0x1b6745?.['trackPhaseEnd'](_0x2707ad[_0x30180f(0x140)],{'reason':_0x30180f(0x1ab),'profileName':_0x2391a3}),console[_0x30180f(0x18a)](_0x2707ad['ktHqI'](_0x2707ad['KFAik'](_0x2707ad['erEQb']+'\x0a'+_0x2707ad['hvOLS']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x2391a3+'\x20--url\x20'+_0x5611b6+'\x20--skip-auth\x0a')+'\x0a',_0x2707ad[_0x30180f(0x163)]),_0x2707ad[_0x30180f(0x131)])),![];}const _0x2f45c2=matchAuthEnvironment(_0x5611b6,_0x91d968);if(!_0x2f45c2)return _0x1b6745?.[_0x30180f(0x18d)](_0x30180f(0x186),{'reason':_0x30180f(0x149),'profileName':_0x2391a3}),console['error'](_0x30180f(0x154)+_0x5611b6+'.\x20Configured\x20envs:\x20'+Object[_0x30180f(0x135)](_0x91d968[_0x30180f(0x18f)])[_0x30180f(0x178)](',\x20')+'.'),![];const _0x20a198=_0x91d968[_0x30180f(0x18f)][_0x2f45c2],_0x1907f5=_0x20a198?.['domains']??[];if(_0x459e71&&!_0x442cae['yes']){const {saveToCloud:_0x145130}=await _0x56a1a7['prompt']([{'type':_0x30180f(0x143),'name':_0x2707ad['iZyqx'],'message':_0x30180f(0x177)+_0x2f45c2+_0x30180f(0x14a)+_0x5611b6+_0x30180f(0x155)+_0x1907f5[_0x30180f(0x178)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2391a3+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x145130)return _0x1b6745?.['trackPhaseEnd'](_0x2707ad['SAwBk'],{'reason':_0x2707ad[_0x30180f(0x1b6)],'profileName':_0x2391a3}),console['error'](_0x2707ad[_0x30180f(0x14d)]),![];}const _0x53f006=_0x1907f5[_0x30180f(0x1af)](_0x496c9c=>{const _0x27afe5=_0x30180f;try{return _0x2707ad['QqSgN'](new URL(_0x496c9c)[_0x27afe5(0x142)],new URL(_0x5611b6)['origin']);}catch{return![];}}),_0x22e6de={};!_0x53f006&&(_0x22e6de['baseUrl']=_0x5611b6);try{await _0x2707ad[_0x30180f(0x168)](createCloudProfile,_0x2391a3,_0x2f45c2,{'settings':_0x22e6de}),_0x2707ad['btBlX'](warnCloudProfileSharedInOrg);}catch(_0x586576){if(_0x586576 instanceof ApiError&&_0x2707ad['ipcaL'](_0x586576['status'],0x199)){console['error'](_0x30180f(0x167)+_0x2391a3+_0x30180f(0x175)+(_0x30180f(0x169)+_0x2391a3));throw _0x586576;}throw _0x586576;}return console[_0x30180f(0x16b)](_0x2707ad[_0x30180f(0x17e)](_0x30180f(0x17b)+_0x2391a3+_0x30180f(0x160),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2391a3)),await sweepOrphansBestEffort(_0x2391a3),_0x1b6745?.[_0x30180f(0x18d)](_0x30180f(0x1a3),{'envKey':_0x2f45c2,'profileName':_0x2391a3}),!![];}async function createUnconfiguredCloudProfile(_0x10fff2,_0x4bf778){const _0x31553f=_0x42d4,_0x3dbc2a={'YKRVz':function(_0x1a37f1,_0x3b561c,_0x2f9e85,_0x2333dc){return _0x1a37f1(_0x3b561c,_0x2f9e85,_0x2333dc);},'AmOHA':function(_0x29db09){return _0x29db09();},'XEgjK':function(_0x8f184f,_0x374c1d){return _0x8f184f===_0x374c1d;},'VfBsw':function(_0x4acc73,_0x66082b){return _0x4acc73+_0x66082b;}};try{await _0x3dbc2a['YKRVz'](createCloudProfile,_0x10fff2,undefined,{'settings':_0x4bf778}),_0x3dbc2a['AmOHA'](warnCloudProfileSharedInOrg);}catch(_0x4e9bf3){_0x4e9bf3 instanceof ApiError&&_0x3dbc2a['XEgjK'](_0x4e9bf3[_0x31553f(0x1a8)],0x199)&&console[_0x31553f(0x18a)](_0x3dbc2a[_0x31553f(0x194)](_0x31553f(0x167)+_0x10fff2+_0x31553f(0x175),_0x31553f(0x169)+_0x10fff2));throw _0x4e9bf3;}}async function captureEnvLessProfile(_0x36b047,_0x1a5c1d,_0x5d9db1,_0x771412){const _0x1f5bee=_0x42d4,_0x19423d={'oBqEs':_0x1f5bee(0x186),'pnkKZ':'user_declined','ibVNk':function(_0x3f4836,_0x491cc5){return _0x3f4836+_0x491cc5;},'IqUBX':function(_0x5ed176,_0xae2c8e){return _0x5ed176===_0xae2c8e;},'VwODv':function(_0x468c4a,_0x270b7b){return _0x468c4a+_0x270b7b;},'jwhcb':function(_0x501562,_0x423470){return _0x501562>_0x423470;},'fDTXj':function(_0x2458cb,_0xab8828,_0x39b8dd,_0x15def8){return _0x2458cb(_0xab8828,_0x39b8dd,_0x15def8);},'yLkku':function(_0x3aaedd){return _0x3aaedd();},'dzjGW':function(_0x2d3d42,_0x5c7651){return _0x2d3d42+_0x5c7651;},'JGnZK':function(_0x3777c0,_0x482b90,_0x58a0af){return _0x3777c0(_0x482b90,_0x58a0af);},'XbQsP':function(_0x45f3f8,_0x3895d2){return _0x45f3f8+_0x3895d2;},'ddXQb':function(_0x58ea23,_0xa0fc22){return _0x58ea23(_0xa0fc22);}};if(!_0x5d9db1[_0x1f5bee(0x139)]){const {capture:_0x5a470a}=await _0x56a1a7[_0x1f5bee(0x17d)]([{'type':'confirm','name':_0x1f5bee(0x184),'message':_0x1f5bee(0x15f),'default':!![]}]);if(!_0x5a470a)return _0x771412?.['trackPhaseEnd'](_0x19423d[_0x1f5bee(0x14c)],{'reason':_0x19423d[_0x1f5bee(0x16d)],'profileName':_0x36b047}),console['error'](_0x19423d[_0x1f5bee(0x189)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x1f5bee(0x19b))),![];}const _0x2e9c44={};if(_0x5d9db1[_0x1f5bee(0x16f)])for(const _0x382e14 of _0x5d9db1[_0x1f5bee(0x16f)]){const _0x26554e=_0x382e14['indexOf'](':');if(_0x19423d['IqUBX'](_0x26554e,-0x1))continue;_0x2e9c44[_0x382e14[_0x1f5bee(0x188)](0x0,_0x26554e)['trim']()]=_0x382e14[_0x1f5bee(0x188)](_0x19423d['VwODv'](_0x26554e,0x1))[_0x1f5bee(0x19c)]();}const _0x3578bd={'baseUrl':_0x1a5c1d};_0x19423d['jwhcb'](Object['keys'](_0x2e9c44)['length'],0x0)&&(_0x3578bd[_0x1f5bee(0x146)]=_0x2e9c44);let _0xc7a47e;try{_0xc7a47e=await _0x19423d['fDTXj'](createCloudProfile,_0x36b047,undefined,{'settings':_0x3578bd}),_0x19423d[_0x1f5bee(0x14f)](warnCloudProfileSharedInOrg);}catch(_0x328b46){_0x328b46 instanceof ApiError&&_0x19423d[_0x1f5bee(0x145)](_0x328b46[_0x1f5bee(0x1a8)],0x199)&&console['error'](_0x19423d['dzjGW']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x36b047+_0x1f5bee(0x175),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x36b047));throw _0x328b46;}return await _0x19423d[_0x1f5bee(0x144)](manualBrowserLogin,_0xc7a47e,{'key':'','domains':[_0x1a5c1d],'setupHeaders':_0x19423d['jwhcb'](Object['keys'](_0x2e9c44)[_0x1f5bee(0x16a)],0x0)?_0x2e9c44:undefined}),console['log'](_0x19423d[_0x1f5bee(0x181)]('\x0a✓\x20Profile\x20\x27'+_0x36b047+_0x1f5bee(0x137),_0x1f5bee(0x191)+_0x36b047)),await _0x19423d['ddXQb'](sweepOrphansBestEffort,_0x36b047),_0x771412?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x36b047}),!![];}export async function addEnv(_0x263080,_0x110e73={},_0x39a9e0){const _0x1207c0=_0x42d4,_0x2f9489={'veAcH':function(_0x5e3aaf,_0x49768d){return _0x5e3aaf+_0x49768d;},'hDNCF':function(_0x30439b,_0xe648ee){return _0x30439b+_0xe648ee;},'SDeyH':function(_0x280eda,_0x110bbe){return _0x280eda+_0x110bbe;},'xHiGx':_0x1207c0(0x13a),'DAMFS':_0x1207c0(0x1b3),'RLCSM':function(_0x5353d3,_0x5b1b86){return _0x5353d3===_0x5b1b86;},'ufkAD':function(_0x3dc546,_0x7754a8){return _0x3dc546!==_0x7754a8;},'kHgWs':function(_0x1de0d2,_0x303d16){return _0x1de0d2===_0x303d16;},'FRQwY':function(_0x95110e,_0x41b2b3){return _0x95110e(_0x41b2b3);},'Rhntj':function(_0x53e8c1){return _0x53e8c1();},'awoNF':'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','DghGX':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','ITTJO':function(_0x421962,_0x54c914){return _0x421962>_0x54c914;},'IlNPF':function(_0x5c2e9f,_0x448928,_0x562d7f){return _0x5c2e9f(_0x448928,_0x562d7f);},'OjtHK':function(_0x42f20d,_0x43ed67,_0xce88dc,_0x510897,_0x379fd0){return _0x42f20d(_0x43ed67,_0xce88dc,_0x510897,_0x379fd0);},'CXQzj':function(_0x2642a6,_0xf0d147){return _0x2642a6 instanceof _0xf0d147;},'YHgDC':function(_0x2299d1,_0x24c260){return _0x2299d1(_0x24c260);},'pVKDq':function(_0x145bd6,_0x3d5bc5){return _0x145bd6(_0x3d5bc5);},'rouQh':function(_0x926394,_0x38b4ef){return _0x926394(_0x38b4ef);},'MTZcM':function(_0x248ce2,_0x595d5a){return _0x248ce2(_0x595d5a);},'YxYyD':_0x1207c0(0x141),'bImpj':'input','rewvr':_0x1207c0(0x179),'DwQld':_0x1207c0(0x158),'nVMBQ':_0x1207c0(0x162),'TuWLv':'list','rWANm':'What\x20would\x20you\x20like\x20to\x20do?','QUInO':_0x1207c0(0x196),'fJetW':'continue','Jjuzo':_0x1207c0(0x195),'JKTgv':function(_0x1191e2,_0x591bd5){return _0x1191e2===_0x591bd5;},'IlNQW':function(_0x22f321,_0x8ef6b2,_0x48e54c,_0x15a42f,_0x4bc89e,_0x3b60a2){return _0x22f321(_0x8ef6b2,_0x48e54c,_0x15a42f,_0x4bc89e,_0x3b60a2);}};_0x110e73['ci']&&(console['error'](_0x2f9489[_0x1207c0(0x171)](_0x2f9489['hDNCF'](_0x2f9489[_0x1207c0(0x1b7)](_0x1207c0(0x132),_0x2f9489['xHiGx']),'\x0a'),_0x1207c0(0x151))+_0x2f9489[_0x1207c0(0x13f)]+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x1207c0(0x1a1)),process[_0x1207c0(0x19d)](0x1));const _0x1f16a2={};if(_0x110e73['setupHeader'])for(const _0x12bb5f of _0x110e73[_0x1207c0(0x16f)]){const _0x3224f0=_0x12bb5f[_0x1207c0(0x134)](':');if(_0x2f9489[_0x1207c0(0x176)](_0x3224f0,-0x1))throw new Error(_0x1207c0(0x1ad)+_0x12bb5f+_0x1207c0(0x19f));const _0x143698=_0x12bb5f['slice'](0x0,_0x3224f0)[_0x1207c0(0x19c)](),_0x2fbeca=_0x12bb5f['slice'](_0x3224f0+0x1)['trim']();_0x1f16a2[_0x143698]=_0x2fbeca;}if(_0x2f9489[_0x1207c0(0x152)](_0x110e73[_0x1207c0(0x165)],undefined)&&_0x2f9489[_0x1207c0(0x1a4)](_0x110e73['cdpEndpoint']['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x110e73['cdpEndpoint']&&_0x110e73['url'])throw new Error(_0x1207c0(0x156));const _0x27c47d=_0x2f9489[_0x1207c0(0x17f)](Boolean,_0x110e73[_0x1207c0(0x165)]),_0x4aba3e=_0x2f9489['Rhntj'](isInteractive);if(!_0x4aba3e&&!_0x110e73['url']&&!_0x27c47d&&!_0x110e73[_0x1207c0(0x190)])throw new Error(_0x2f9489[_0x1207c0(0x16c)]);if(_0x27c47d){const _0x4872e3=_0x110e73[_0x1207c0(0x165)];console['log'](_0x2f9489[_0x1207c0(0x1b4)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x4872e3);const _0x51e884={'cdpEndpoint':_0x4872e3,'isElectron':!![]};_0x2f9489['ITTJO'](Object[_0x1207c0(0x135)](_0x1f16a2)['length'],0x0)&&(_0x51e884['setupHeaders']=_0x1f16a2);await _0x2f9489[_0x1207c0(0x1ac)](createUnconfiguredCloudProfile,_0x263080,_0x51e884);try{_0x2f9489['OjtHK'](setProfileOverride,process[_0x1207c0(0x166)](),_0x263080,_0x1207c0(0x165),_0x4872e3),setProfileOverride(process[_0x1207c0(0x166)](),_0x263080,_0x1207c0(0x15b),!![]);}catch(_0x5e732d){console[_0x1207c0(0x18a)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x2f9489[_0x1207c0(0x180)](_0x5e732d,Error)?_0x5e732d[_0x1207c0(0x17a)]:_0x2f9489[_0x1207c0(0x136)](String,_0x5e732d)));}console['log'](_0x1207c0(0x13d)+_0x263080+_0x1207c0(0x198)),await _0x2f9489[_0x1207c0(0x199)](sweepOrphansBestEffort,_0x263080),await _0x2f9489['rouQh'](markActive,_0x263080);return;}if(_0x110e73['skipAuth']){const _0x192538={};_0x110e73['url']&&(_0x192538[_0x1207c0(0x179)]=_0x110e73['url']);Object[_0x1207c0(0x135)](_0x1f16a2)['length']>0x0&&(_0x192538['setupHeaders']=_0x1f16a2);await createUnconfiguredCloudProfile(_0x263080,_0x192538),console[_0x1207c0(0x16b)](_0x1207c0(0x17b)+_0x263080+'\x27\x20created\x20(no\x20session).\x0a'+(_0x1207c0(0x1a9)+_0x263080+_0x1207c0(0x133))),await _0x2f9489[_0x1207c0(0x173)](sweepOrphansBestEffort,_0x263080),await _0x2f9489['rouQh'](markActive,_0x263080);return;}if(_0x110e73['url']){const _0xfef79e=_0x110e73['url'],_0x33184c=await checkUrlReachability(_0xfef79e);if(!_0x33184c['ok']&&!_0x110e73['force'])throw new Error('Could\x20not\x20reach\x20'+_0xfef79e+':\x20'+_0x33184c[_0x1207c0(0x18a)]+_0x1207c0(0x159));!_0x33184c['ok']&&_0x110e73['force']&&console[_0x1207c0(0x16b)]('⚠\x20Could\x20not\x20reach\x20'+_0xfef79e+':\x20'+_0x33184c['error']+_0x1207c0(0x192));}else{console['log'](_0x1207c0(0x1a6)),console[_0x1207c0(0x16b)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x1207c0(0x16b)](_0x2f9489[_0x1207c0(0x1ae)]);let _0x56a56b='',_0x3dcb24=![];while(!![]){const _0x171855=await _0x56a1a7['prompt']([{'type':_0x2f9489['bImpj'],'name':_0x2f9489[_0x1207c0(0x187)],'message':_0x3dcb24?_0x2f9489[_0x1207c0(0x18c)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x56a56b||_0x2f9489['nVMBQ']}]);_0x56a56b=_0x171855[_0x1207c0(0x179)];const _0x536697=await checkUrlReachability(_0x56a56b);if(_0x536697['ok'])break;const _0x429b90=/^[a-zA-Z][\w+.-]*:\/\//[_0x1207c0(0x19a)](_0x56a56b),_0x3d6f5a=_0x536697['isProtocolError']&&!_0x429b90,_0xa35017=_0x3d6f5a?'http://'+_0x56a56b:null;_0x3dcb24=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x56a56b+':\x20'+_0x536697[_0x1207c0(0x18a)]);_0xa35017&&console[_0x1207c0(0x16b)]('\x20\x20Did\x20you\x20mean\x20'+_0xa35017+'?');const {action:_0x43b51e}=await _0x56a1a7[_0x1207c0(0x17d)]([{'type':_0x2f9489['TuWLv'],'name':'action','message':_0x2f9489[_0x1207c0(0x15e)],'choices':[..._0xa35017?[{'name':_0x1207c0(0x157)+_0xa35017,'value':_0x1207c0(0x195)}]:[],{'name':_0x1207c0(0x14b),'value':_0x1207c0(0x172)},{'name':_0x2f9489[_0x1207c0(0x185)],'value':_0x2f9489[_0x1207c0(0x148)]}]}]);if(_0x43b51e===_0x2f9489[_0x1207c0(0x19e)]&&_0xa35017){_0x56a56b=_0xa35017;const _0x108b29=await checkUrlReachability(_0x56a56b);if(_0x108b29['ok'])break;console[_0x1207c0(0x16b)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x56a56b+':\x20'+_0x108b29['error']);}else{if(_0x2f9489['JKTgv'](_0x43b51e,_0x2f9489['fJetW']))break;}}_0x110e73={..._0x110e73,'url':_0x56a56b};}let _0x1cad93=![];try{_0x1cad93=await _0x2f9489['IlNQW'](tryAutoRouteCloudProfile,_0x263080,_0x110e73['url'],_0x110e73,_0x4aba3e,_0x39a9e0);}catch(_0x273389){console[_0x1207c0(0x18a)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x263080+'\x22:\x20'+(_0x2f9489['CXQzj'](_0x273389,Error)?_0x273389['message']:String(_0x273389))),process[_0x1207c0(0x19d)](0x1);}!_0x1cad93&&process[_0x1207c0(0x19d)](0x1),await markActive(_0x263080);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49ed0e,_0x55b591){var _0x10c6d9=_0x13b2,_0x4b1e65=_0x49ed0e();while(!![]){try{var _0x3e7dd6=parseInt(_0x10c6d9(0x1f5))/0x1+parseInt(_0x10c6d9(0x1ec))/0x2*(parseInt(_0x10c6d9(0x1f2))/0x3)+parseInt(_0x10c6d9(0x1f9))/0x4+parseInt(_0x10c6d9(0x1f4))/0x5+parseInt(_0x10c6d9(0x1eb))/0x6+parseInt(_0x10c6d9(0x1f0))/0x7*(parseInt(_0x10c6d9(0x1f1))/0x8)+parseInt(_0x10c6d9(0x1ea))/0x9*(-parseInt(_0x10c6d9(0x1f7))/0xa);if(_0x3e7dd6===_0x55b591)break;else _0x4b1e65['push'](_0x4b1e65['shift']());}catch(_0x465c76){_0x4b1e65['push'](_0x4b1e65['shift']());}}}(_0x5091,0x694ac));function _0x5091(){var _0x2f7a10=['417430DVYiKJ','860948ZYLuvX','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','10VEtjtl','\x20\x20https://docs.ranger.net/main/concepts/profiles','1715236RhQDcH','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','22442985lSzjHb','4881084pLkoGd','19768SXgMaf','AtXvw','error','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','911288lAuouD','32dUhjAD','66fSRJgF','NpGNn'];_0x5091=function(){return _0x2f7a10;};return _0x5091();}function _0x13b2(_0x51ad26,_0x57b5b8){_0x51ad26=_0x51ad26-0x1e9;var _0x50918b=_0x5091();var _0x13b220=_0x50918b[_0x51ad26];return _0x13b220;}export async function authEncrypt(_0x32c88b){var _0x511f0f=_0x13b2,_0x187851={'NpGNn':function(_0x5552b2,_0x576132){return _0x5552b2+_0x576132;},'Hdhap':_0x511f0f(0x1ef),'AtXvw':_0x511f0f(0x1f8)};console[_0x511f0f(0x1ee)](_0x187851[_0x511f0f(0x1f3)]('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a')+'\x0a'+_0x187851['Hdhap']+_0x511f0f(0x1f6)+'\x0a'+_0x511f0f(0x1e9)+_0x187851[_0x511f0f(0x1ed)]),process['exit'](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4ac0ef=_0xbe34;function _0xbe34(_0x1105f7,_0x2e8f36){_0x1105f7=_0x1105f7-0x13e;const _0x4e7785=_0x4e77();let _0xbe3450=_0x4e7785[_0x1105f7];return _0xbe3450;}function _0x4e77(){const _0x1075cb=['GcQXs','232584HvlBnd','replace','filter','BhFqy','SXFzy','e2e-test-recommender','fkUJR','log','platform','ZedfC','2409201FCMfUw','string','pYUiZ','bnprM','2002985lZWOYT','project','feature-tracker','WrukV','remove','@ranger-testing/opencode-plugin','utf-8','ITxhP','yGpyi','203cMLQtE','marketplace','HnGLK','IEHQl','3iiPgek','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','GXRRS','ignore','234292ITfkzc','error','THOgP','stringify','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','70404BVPZMW','yGYsW','push','5182CUUzyG','QlrsH','vHHIS','959620uOsLui','opencode.json','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','plugin','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','IpsgH','hdLPD','length','Nothing\x20to\x20clean\x20up.\x0a','CWbis','✓\x20Removed\x20trailhead\x20marketplace','KmAwk','7XUAWRp','✓\x20Removed\x20stored\x20credentials','user'];_0x4e77=function(){return _0x1075cb;};return _0x4e77();}(function(_0x3cfefe,_0x2f112a){const _0x484ad3=_0xbe34,_0x367549=_0x3cfefe();while(!![]){try{const _0x35c116=parseInt(_0x484ad3(0x14b))/0x1*(parseInt(_0x484ad3(0x176))/0x2)+parseInt(_0x484ad3(0x16a))/0x3*(-parseInt(_0x484ad3(0x16e))/0x4)+parseInt(_0x484ad3(0x15d))/0x5+parseInt(_0x484ad3(0x173))/0x6*(-parseInt(_0x484ad3(0x166))/0x7)+parseInt(_0x484ad3(0x14f))/0x8+parseInt(_0x484ad3(0x159))/0x9+-parseInt(_0x484ad3(0x13f))/0xa;if(_0x35c116===_0x2f112a)break;else _0x367549['push'](_0x367549['shift']());}catch(_0x2f4efb){_0x367549['push'](_0x367549['shift']());}}}(_0x4e77,0x35e03));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x4ac0ef(0x15f),'bug-bash',_0x4ac0ef(0x154)],opencodePluginName=_0x4ac0ef(0x162);function parseJsonc(_0x3fce6e){const _0x56820f=_0x4ac0ef,_0x560034=_0x3fce6e[_0x56820f(0x150)](/\/\*[\s\S]*?\*\//g,''),_0x330e2c=_0x560034[_0x56820f(0x150)](/^\s*\/\/.*$/gm,''),_0x1da0f2=_0x330e2c['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x1da0f2);}async function removeOpencodePluginConfig(_0x1b0e00){const _0x55307d=_0x4ac0ef,_0x3a0297={'vHHIS':function(_0x37c952,_0x5217b2){return _0x37c952!==_0x5217b2;},'WrukV':function(_0x3f7f2b,_0x487132){return _0x3f7f2b(_0x487132);},'QNHKj':function(_0x1ffcc4,_0x84a8be){return _0x1ffcc4===_0x84a8be;},'rmFtx':function(_0x5e8ef9,_0x5b1ae3,_0x12e7ac){return _0x5e8ef9(_0x5b1ae3,_0x12e7ac);}};if(!_0x3a0297['WrukV'](existsSync,_0x1b0e00))return![];let _0x2f3cbd;try{const _0x3a5b06=await readFile(_0x1b0e00,_0x55307d(0x163));_0x2f3cbd=_0x3a0297[_0x55307d(0x160)](parseJsonc,_0x3a5b06);}catch{return![];}const _0x2830eb=Array['isArray'](_0x2f3cbd['plugin'])?_0x2f3cbd['plugin']:[];if(_0x2830eb['length']===0x0)return![];const _0x4ba158=_0x2830eb[_0x55307d(0x151)](_0x16871d=>{const _0x5e692d=_0x55307d;if(_0x3a0297[_0x5e692d(0x13e)](typeof _0x16871d,_0x5e692d(0x15a)))return!![];return _0x16871d!==opencodePluginName;});if(_0x3a0297['QNHKj'](_0x4ba158[_0x55307d(0x146)],_0x2830eb['length']))return![];return _0x3a0297['QNHKj'](_0x4ba158[_0x55307d(0x146)],0x0)?delete _0x2f3cbd['plugin']:_0x2f3cbd[_0x55307d(0x142)]=_0x4ba158,await _0x3a0297['rmFtx'](writeFile,_0x1b0e00,JSON[_0x55307d(0x171)](_0x2f3cbd,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x44ccb2){const _0x1b7fe2={'ITxhP':function(_0x51c34c,_0x2d7250){return _0x51c34c(_0x2d7250);},'yGpyi':'plugin','IpsgH':function(_0x4818b9,_0x13ae6f,_0x4dbfe9,_0x134008){return _0x4818b9(_0x13ae6f,_0x4dbfe9,_0x134008);},'lCvya':'claude','hdLPD':function(_0x480b92,_0x3f51b){return _0x480b92===_0x3f51b;},'JMonu':'win32','bnprM':'close','yGYsW':'error'};return new Promise(_0x4fb880=>{const _0x5d1251=_0xbe34,_0x3cd05c={'TEVzD':function(_0x11e56a,_0x1ea9cf){return _0x11e56a(_0x1ea9cf);}},_0x9e5b5f=[_0x1b7fe2[_0x5d1251(0x165)],'uninstall','ranger@trailhead'];_0x44ccb2&&_0x9e5b5f[_0x5d1251(0x175)]('--scope',_0x44ccb2);const _0x40e01c=_0x1b7fe2[_0x5d1251(0x144)](spawn,_0x1b7fe2['lCvya'],_0x9e5b5f,{'stdio':[_0x5d1251(0x16d),_0x5d1251(0x16d),_0x5d1251(0x16d)],'cwd':_0x44ccb2?getProjectRoot():undefined,'shell':_0x1b7fe2[_0x5d1251(0x145)](process[_0x5d1251(0x157)],_0x1b7fe2['JMonu'])});_0x40e01c['on'](_0x1b7fe2[_0x5d1251(0x15c)],_0x48b81d=>{_0x3cd05c['TEVzD'](_0x4fb880,_0x48b81d===0x0);}),_0x40e01c['on'](_0x1b7fe2[_0x5d1251(0x174)],()=>{const _0x720357=_0x5d1251;_0x1b7fe2[_0x720357(0x164)](_0x4fb880,![]);});});}async function removeMarketplace(){const _0x8961c7=_0x4ac0ef,_0x4ef053={'KmAwk':function(_0x397011,_0x5e4cde){return _0x397011(_0x5e4cde);},'THOgP':function(_0x35d921,_0x482130,_0x103c42,_0x4d7b40){return _0x35d921(_0x482130,_0x103c42,_0x4d7b40);},'xapvV':_0x8961c7(0x167),'quceH':'trailhead','vFpMt':_0x8961c7(0x16d),'BhFqy':'close','vyJWX':_0x8961c7(0x16f)};return new Promise(_0x36b434=>{const _0x1d4400=_0x8961c7,_0x4a9331=_0x4ef053[_0x1d4400(0x170)](spawn,'claude',['plugin',_0x4ef053['xapvV'],_0x1d4400(0x161),_0x4ef053['quceH']],{'stdio':[_0x4ef053['vFpMt'],'ignore',_0x4ef053['vFpMt']],'shell':process[_0x1d4400(0x157)]==='win32'});_0x4a9331['on'](_0x4ef053[_0x1d4400(0x152)],_0x52cd59=>{const _0x21c639=_0x1d4400;_0x4ef053[_0x21c639(0x14a)](_0x36b434,_0x52cd59===0x0);}),_0x4a9331['on'](_0x4ef053['vyJWX'],()=>{_0x36b434(![]);});});}export async function clean(){const _0x1aac56=_0x4ac0ef,_0x1516ab={'tkDdZ':function(_0x3b992a){return _0x3b992a();},'ZedfC':function(_0x5a6969,_0x50253c){return _0x5a6969(_0x50253c);},'IcGPv':function(_0x55f826){return _0x55f826();},'QlrsH':function(_0x125a5b,_0x20fa45){return _0x125a5b(_0x20fa45);},'GXRRS':'✓\x20Removed\x20.ranger/\x20directory','idaNU':function(_0x2ee6e9){return _0x2ee6e9();},'SXFzy':function(_0x549e2c,_0x827852,_0xfb092a){return _0x549e2c(_0x827852,_0xfb092a);},'xKkFi':function(_0x426ce1,_0x3ee673){return _0x426ce1(_0x3ee673);},'eUgHQ':_0x1aac56(0x15e),'CWbis':function(_0x3a5315,_0x1498e4,_0x5b9268){return _0x3a5315(_0x1498e4,_0x5b9268);},'HnGLK':function(_0x31ffde,_0x33fe18,_0x3a9604){return _0x31ffde(_0x33fe18,_0x3a9604);},'IEHQl':function(_0x35f3bc,_0x567194,_0x526592){return _0x35f3bc(_0x567194,_0x526592);},'WEpbc':_0x1aac56(0x14d),'fkUJR':_0x1aac56(0x140),'GcQXs':function(_0xd1155c,_0x288175){return _0xd1155c(_0x288175);},'hrWdH':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','pYUiZ':function(_0xee3182){return _0xee3182();}};console[_0x1aac56(0x156)](_0x1aac56(0x143));let _0x5cb4f8=![];try{await deleteAllCredentials(),console[_0x1aac56(0x156)](_0x1aac56(0x14c)),_0x5cb4f8=!![];}catch{}const _0x57c828=_0x1516ab['tkDdZ'](getCacheFile);existsSync(_0x57c828)&&(await _0x1516ab[_0x1aac56(0x158)](rm,_0x57c828),_0x5cb4f8=!![]);const _0x369adb=_0x1516ab['IcGPv'](getRangerDir);_0x1516ab['QlrsH'](existsSync,_0x369adb)&&(await rm(_0x369adb,{'recursive':!![]}),console['log'](_0x1516ab[_0x1aac56(0x16c)]),_0x5cb4f8=!![]);const _0x1e095e=_0x1516ab['idaNU'](getProjectSkillsDir);for(const _0xabe705 of skillsToRemove){const _0x55195f=_0x1516ab[_0x1aac56(0x153)](join,_0x1e095e,_0xabe705);_0x1516ab[_0x1aac56(0x177)](existsSync,_0x55195f)&&(await _0x1516ab[_0x1aac56(0x153)](rm,_0x55195f,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0xabe705),_0x5cb4f8=!![]);}const _0x56ccb3=getUserSkillsDir();for(const _0x4ab69d of skillsToRemove){const _0x10c867=_0x1516ab['SXFzy'](join,_0x56ccb3,_0x4ab69d);_0x1516ab['xKkFi'](existsSync,_0x10c867)&&(await _0x1516ab[_0x1aac56(0x153)](rm,_0x10c867,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x4ab69d),_0x5cb4f8=!![]);}const _0x591d0f=_0x1516ab[_0x1aac56(0x177)](getOpencodeSkillsDir,_0x1516ab['eUgHQ']);for(const _0x2d3b64 of skillsToRemove){const _0x64ca96=_0x1516ab[_0x1aac56(0x148)](join,_0x591d0f,_0x2d3b64);existsSync(_0x64ca96)&&(await rm(_0x64ca96,{'recursive':!![]}),console[_0x1aac56(0x156)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2d3b64),_0x5cb4f8=!![]);}const _0x33770a=getOpencodeSkillsDir(_0x1aac56(0x14d));for(const _0x14334a of skillsToRemove){const _0x11c061=_0x1516ab[_0x1aac56(0x168)](join,_0x33770a,_0x14334a);_0x1516ab[_0x1aac56(0x158)](existsSync,_0x11c061)&&(await _0x1516ab[_0x1aac56(0x169)](rm,_0x11c061,{'recursive':!![]}),console['log'](_0x1aac56(0x172)+_0x14334a),_0x5cb4f8=!![]);}const _0x4dc537=join(_0x1516ab['xKkFi'](getOpencodeConfigDir,_0x1aac56(0x15e)),'opencode.json');await _0x1516ab['QlrsH'](removeOpencodePluginConfig,_0x4dc537)&&(console['log'](_0x1aac56(0x141)),_0x5cb4f8=!![]);const _0x980b86=join(getOpencodeConfigDir(_0x1516ab['WEpbc']),_0x1516ab[_0x1aac56(0x155)]);await _0x1516ab[_0x1aac56(0x14e)](removeOpencodePluginConfig,_0x980b86)&&(console[_0x1aac56(0x156)](_0x1516ab['hrWdH']),_0x5cb4f8=!![]);const _0x576ce7=await uninstallClaudePlugin();_0x576ce7&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x5cb4f8=!![]);const _0x317a6d=await _0x1516ab['QlrsH'](uninstallClaudePlugin,_0x1516ab['eUgHQ']);_0x317a6d&&(console['log'](_0x1aac56(0x16b)),_0x5cb4f8=!![]);const _0x5785d0=await _0x1516ab[_0x1aac56(0x15b)](removeMarketplace);_0x5785d0&&(console[_0x1aac56(0x156)](_0x1aac56(0x149)),_0x5cb4f8=!![]),_0x5cb4f8?console[_0x1aac56(0x156)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0x1aac56(0x156)](_0x1aac56(0x147));}
|
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
|
+
function _0x7d9c(){const _0x1a13c1=['CpcOy','keys','zOOia','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','185UCApmp','zSCve','Set\x20','cgtiE','13883221GTsPzS','uBEud','WSDXb','Profile\x20\x22','EOZQW','28DJQCdw','includes','NAeXo','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','startsWith','RWZpU','IZmPC','3PUSAHQ','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cmPxE','alsoExistsElsewhere','2274957aBNisD','(not\x20set)','2963852jvnkXY','YjlaH','FUvsp','GiVxd','wyCuF','EESEK','18606XZyVli','stringify','endsWith','cxkcw','parse','HaJnd','mpYSD','test','XpnPX','false','olfrE','IGKmh','20AMoCdR','log','DjGNl','QKCfl','cloud','ABcoT','eeSMP','zuQcu','\x20=\x20','kind','No\x20configuration\x20set\x20for\x20\x22','1118048pNZBhE','true','Key\x20\x22','6480348dtosAJ','Invalid\x20value\x20for\x20','settings','isSafeInteger','vqmEp','Cleared\x20local\x20overrides\x20for\x20\x22','23570DtKRCC','\x20for\x20\x22','headless','isNaN'];_0x7d9c=function(){return _0x1a13c1;};return _0x7d9c();}const _0x304d40=_0x5aad;(function(_0x47dd10,_0x457d59){const _0x58847f=_0x5aad,_0x33b1bb=_0x47dd10();while(!![]){try{const _0x6a2f89=-parseInt(_0x58847f(0x14f))/0x1*(-parseInt(_0x58847f(0x160))/0x2)+-parseInt(_0x58847f(0x167))/0x3*(parseInt(_0x58847f(0x129))/0x4)+-parseInt(_0x58847f(0x157))/0x5*(-parseInt(_0x58847f(0x12f))/0x6)+-parseInt(_0x58847f(0x149))/0x7+parseInt(_0x58847f(0x146))/0x8+parseInt(_0x58847f(0x127))/0x9*(parseInt(_0x58847f(0x13b))/0xa)+parseInt(_0x58847f(0x15b))/0xb;if(_0x6a2f89===_0x457d59)break;else _0x33b1bb['push'](_0x33b1bb['shift']());}catch(_0x3b1402){_0x33b1bb['push'](_0x33b1bb['shift']());}}}(_0x7d9c,0xa755b));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=[_0x304d40(0x151),'allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x48b0da,_0x2f1dc7){const _0x3e1ce6=_0x304d40,_0x3b2e6c={'zOOia':function(_0x24265e,_0x315ab5){return _0x24265e===_0x315ab5;},'wyCuF':_0x3e1ce6(0x138)};if(BOOLEAN_KEYS[_0x3e1ce6(0x161)](_0x48b0da)){if(_0x3b2e6c[_0x3e1ce6(0x155)](_0x2f1dc7,_0x3e1ce6(0x147)))return!![];if(_0x2f1dc7===_0x3b2e6c[_0x3e1ce6(0x12d)])return![];throw new Error(_0x3e1ce6(0x14a)+_0x48b0da+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2f1dc7;}function parseOverrideValue(_0x282b0a){const _0x30fd16=_0x304d40,_0x23ec0e={'EOZQW':function(_0x53d105,_0x4e907c){return _0x53d105===_0x4e907c;},'PwcCT':_0x30fd16(0x147),'NAeXo':'false','sUwsv':function(_0x1913a4,_0x47cc3c){return _0x1913a4(_0x47cc3c);},'EESEK':function(_0x1c8351,_0x1cc378){return _0x1c8351(_0x1cc378);}};if(_0x23ec0e[_0x30fd16(0x15f)](_0x282b0a,_0x23ec0e['PwcCT']))return!![];if(_0x282b0a===_0x23ec0e[_0x30fd16(0x162)])return![];if(_0x23ec0e['EOZQW'](_0x282b0a,'null'))return null;if(_0x23ec0e['EOZQW'](_0x282b0a,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x282b0a)){const _0x3a61ea=_0x23ec0e['sUwsv'](Number,_0x282b0a);if(Number[_0x30fd16(0x14c)](_0x3a61ea))return _0x3a61ea;}if(/^-?\d+\.\d+$/[_0x30fd16(0x136)](_0x282b0a)){const _0x1a2e88=_0x23ec0e[_0x30fd16(0x12e)](Number,_0x282b0a);if(!Number[_0x30fd16(0x152)](_0x1a2e88))return _0x1a2e88;}const _0x32e59f=_0x282b0a['trim']();if(_0x32e59f[_0x30fd16(0x164)]('{')&&_0x32e59f[_0x30fd16(0x131)]('}')||_0x32e59f['startsWith']('[')&&_0x32e59f['endsWith'](']'))try{return JSON[_0x30fd16(0x133)](_0x32e59f);}catch{}return _0x282b0a;}async function resolveProfileTarget(_0x53e691){const _0x20f127=_0x304d40,_0x925626={'qLhbc':function(_0x4d6884,_0x460d93){return _0x4d6884(_0x460d93);},'DjGNl':function(_0x5ef682,_0xc85935){return _0x5ef682(_0xc85935);},'ABcoT':'cloud'},_0x271436=existsSync(getEnvDir(_0x53e691));let _0x89cd97=![];try{const _0x593208=await _0x925626['qLhbc'](fetchCloudProfile,_0x53e691);_0x89cd97=_0x925626[_0x20f127(0x13d)](Boolean,_0x593208);}catch{}if(_0x89cd97)return{'kind':_0x925626[_0x20f127(0x140)],'alsoExistsElsewhere':_0x271436};if(_0x271436)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x20f127(0x15e)+_0x53e691+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x53e691);}function printDualExistsHint(_0xed47a1){console['log']('\x20\x20Note:\x20\x22'+_0xed47a1+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x4d1bfc){const _0x56f3c6=_0x304d40,_0x2326bc={'iPuKg':function(_0x432416){return _0x432416();},'cxkcw':function(_0x577d1f,_0x4b7d4b,_0x552500){return _0x577d1f(_0x4b7d4b,_0x552500);},'GiVxd':function(_0x1c549e,_0x1ba876){return _0x1c549e??_0x1ba876;}},_0x12c7eb=await fetchCloudProfile(_0x4d1bfc),_0x5d0b66=readProfileOverrides(_0x2326bc['iPuKg'](getProjectPath),_0x4d1bfc);return _0x2326bc[_0x56f3c6(0x132)](mergeCloudProfileSettings,_0x12c7eb?.[_0x56f3c6(0x14b)]??{},_0x2326bc[_0x56f3c6(0x12c)](_0x5d0b66,undefined));}export async function configSet(_0x2565bc,_0x28915f,_0x4e6013){const _0x410eb7=_0x304d40,_0x3d9704={'XpnPX':function(_0x54b13a,_0x2f53a1){return _0x54b13a(_0x2f53a1);},'QQFeb':function(_0x4d5f3f,_0x16bc37){return _0x4d5f3f===_0x16bc37;},'vqmEp':function(_0x1f9e12,_0x3b56ba,_0x5f1595){return _0x1f9e12(_0x3b56ba,_0x5f1595);},'WSDXb':function(_0x2d37e2,_0x1b29ad,_0x220316,_0x467dc0,_0x3c2580){return _0x2d37e2(_0x1b29ad,_0x220316,_0x467dc0,_0x3c2580);},'HuiRn':function(_0x2272bf){return _0x2272bf();}},_0x290c08=await _0x3d9704[_0x410eb7(0x137)](resolveProfileTarget,_0x2565bc);if(_0x3d9704['QQFeb'](_0x290c08[_0x410eb7(0x144)],_0x410eb7(0x13f))){if(_0x290c08[_0x410eb7(0x16a)])printDualExistsHint(_0x2565bc);const _0x519477=parseOverrideValue(_0x4e6013);setProfileOverride(getProjectPath(),_0x2565bc,_0x28915f,_0x519477),console[_0x410eb7(0x13c)](_0x410eb7(0x159)+_0x28915f+_0x410eb7(0x143)+JSON['stringify'](_0x519477)+'\x20for\x20\x22'+_0x2565bc+'\x22');return;}const _0x566b4b=_0x3d9704[_0x410eb7(0x14d)](parseLocalValue,_0x28915f,_0x4e6013);_0x3d9704[_0x410eb7(0x15d)](setProfileOverride,_0x3d9704['HuiRn'](getProjectPath),_0x2565bc,_0x28915f,_0x566b4b),console['log'](_0x410eb7(0x159)+_0x28915f+_0x410eb7(0x143)+_0x566b4b+_0x410eb7(0x150)+_0x2565bc+'\x22');}export async function configGet(_0x444cc8,_0x2db640){const _0x46fcd9=_0x304d40,_0x46561a={'wCVMU':function(_0x5ae49f,_0x7af763){return _0x5ae49f(_0x7af763);},'YjlaH':function(_0x53f207,_0xcf5031){return _0x53f207===_0xcf5031;},'uBEud':_0x46fcd9(0x13f),'IGKmh':function(_0x609cbc,_0xea2597){return _0x609cbc(_0xea2597);},'QKCfl':function(_0x1cbf9d,_0x576623,_0x5e819f){return _0x1cbf9d(_0x576623,_0x5e819f);},'FUvsp':function(_0x32b781,_0x30720b){return _0x32b781(_0x30720b);},'rRzhz':function(_0x3ba928,_0x3d16f2){return _0x3ba928===_0x3d16f2;},'zuQcu':function(_0x10d236,_0x3c9e49){return _0x10d236===_0x3c9e49;}},_0x5c742c=await _0x46561a['wCVMU'](resolveProfileTarget,_0x444cc8);if(_0x46561a[_0x46fcd9(0x12a)](_0x5c742c['kind'],_0x46561a[_0x46fcd9(0x15c)])){const _0x2aa701=await _0x46561a[_0x46fcd9(0x13a)](loadEffectiveCloudSettings,_0x444cc8),_0x2b37a2=_0x46561a[_0x46fcd9(0x13e)](getNestedValue,_0x2aa701,_0x2db640);if(_0x2b37a2===undefined)console[_0x46fcd9(0x13c)](_0x46fcd9(0x128));else typeof _0x2b37a2==='object'?console['log'](JSON['stringify'](_0x2b37a2,null,0x2)):console['log'](_0x2b37a2);return;}const _0x2acb8d=await _0x46561a[_0x46fcd9(0x12b)](loadSettings,_0x444cc8),_0x37457b=getNestedValue(_0x2acb8d,_0x2db640);if(_0x46561a['rRzhz'](_0x37457b,undefined))console[_0x46fcd9(0x13c)]('(not\x20set)');else _0x46561a[_0x46fcd9(0x142)](typeof _0x37457b,'object')?console['log'](JSON['stringify'](_0x37457b,null,0x2)):console[_0x46fcd9(0x13c)](_0x37457b);}function _0x5aad(_0x5ec1a8,_0x17ea11){_0x5ec1a8=_0x5ec1a8-0x127;const _0x7d9ce7=_0x7d9c();let _0x5aad50=_0x7d9ce7[_0x5ec1a8];return _0x5aad50;}export async function configList(_0x2deaa0){const _0x381f4c=_0x304d40,_0x27d48b={'eeSMP':function(_0x24298d,_0x56a6a0){return _0x24298d(_0x56a6a0);},'QnTUA':function(_0x4c3e68,_0x2d719f){return _0x4c3e68===_0x2d719f;},'cmPxE':function(_0x1ef831,_0x43c141){return _0x1ef831(_0x43c141);},'IZmPC':function(_0x45ca28,_0x27ef30){return _0x45ca28(_0x27ef30);},'zSCve':function(_0x2a3bd9,_0x42515a){return _0x2a3bd9(_0x42515a);}},_0x4984e0=await _0x27d48b['eeSMP'](resolveProfileTarget,_0x2deaa0);if(_0x27d48b['QnTUA'](_0x4984e0[_0x381f4c(0x144)],'cloud')){const _0x544a55=await _0x27d48b[_0x381f4c(0x141)](loadEffectiveCloudSettings,_0x2deaa0);if(!_0x544a55||_0x27d48b['QnTUA'](Object[_0x381f4c(0x154)](_0x544a55)['length'],0x0)){console[_0x381f4c(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2deaa0+'\x22');return;}console['log'](JSON[_0x381f4c(0x130)](_0x544a55,null,0x2));return;}const _0x56dfa3=getSettingsPath(_0x2deaa0);if(!_0x27d48b[_0x381f4c(0x169)](existsSync,_0x56dfa3)){console[_0x381f4c(0x13c)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2deaa0+'\x22');return;}const _0x5bfbe6=await _0x27d48b[_0x381f4c(0x166)](loadSettings,_0x2deaa0),_0x153625=_0x27d48b[_0x381f4c(0x158)](formatSettings,_0x5bfbe6);!_0x153625?console['log'](_0x381f4c(0x145)+_0x2deaa0+'\x22'):console[_0x381f4c(0x13c)](_0x153625);}export async function configUnset(_0x374eba,_0x5d2d04){const _0x40188a=_0x304d40,_0x16f830={'tvceX':'cloud','mpYSD':function(_0x54c569,_0x3e6375){return _0x54c569(_0x3e6375);},'olfrE':function(_0x324f52,_0x3b7047,_0x29f587,_0x57ffff){return _0x324f52(_0x3b7047,_0x29f587,_0x57ffff);},'MwOeN':function(_0x218d5e,_0x1a7e17){return _0x218d5e(_0x1a7e17);},'HaJnd':function(_0x3e3bc7,_0x12ae62,_0x1254e7){return _0x3e3bc7(_0x12ae62,_0x1254e7);}},_0x379565=await resolveProfileTarget(_0x374eba);if(_0x379565['kind']===_0x16f830['tvceX']){if(_0x379565['alsoExistsElsewhere'])_0x16f830[_0x40188a(0x135)](printDualExistsHint,_0x374eba);const _0x24803e=unsetProfileOverride(getProjectPath(),_0x374eba,_0x5d2d04);_0x24803e?console['log']('Removed\x20'+_0x5d2d04+'\x20for\x20\x22'+_0x374eba+'\x22'):console['log'](_0x40188a(0x148)+_0x5d2d04+'\x22\x20not\x20found');return;}const _0x3d99e5=_0x16f830[_0x40188a(0x139)](unsetProfileOverride,getProjectPath(),_0x374eba,_0x5d2d04);if(_0x3d99e5){console['log']('Removed\x20'+_0x5d2d04);return;}const _0x3fb723=await _0x16f830['MwOeN'](loadSettings,_0x374eba),_0x28f7fd=_0x16f830[_0x40188a(0x134)](deleteNestedValue,_0x3fb723,_0x5d2d04);_0x28f7fd?console[_0x40188a(0x13c)](_0x40188a(0x148)+_0x5d2d04+_0x40188a(0x168)+_0x374eba+_0x40188a(0x163)):console[_0x40188a(0x13c)]('Key\x20\x22'+_0x5d2d04+'\x22\x20not\x20found');}export async function configReset(_0x5a5178){const _0x3de1fc=_0x304d40,_0x466248={'CpcOy':function(_0x55fb88,_0x5f10b6){return _0x55fb88===_0x5f10b6;},'cgtiE':function(_0x2a4f27,_0x3135fd,_0x3a29d1){return _0x2a4f27(_0x3135fd,_0x3a29d1);},'RWZpU':function(_0x17d151){return _0x17d151();}},_0x332654=await resolveProfileTarget(_0x5a5178);if(_0x466248[_0x3de1fc(0x153)](_0x332654[_0x3de1fc(0x144)],_0x3de1fc(0x13f))){_0x466248[_0x3de1fc(0x15a)](resetProfileOverrides,_0x466248[_0x3de1fc(0x165)](getProjectPath),_0x5a5178),console['log'](_0x3de1fc(0x14e)+_0x5a5178+'\x22');return;}console['log']('\x22'+_0x5a5178+_0x3de1fc(0x156)+_0x5a5178+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x243c(_0x1235f0,_0x42ef8f){_0x1235f0=_0x1235f0-0x13d;const _0x326c9a=_0x326c();let _0x243ccd=_0x326c9a[_0x1235f0];return _0x243ccd;}function _0x326c(){const _0x291bde=['YXORm','24aNWnnQ','726564FRUqro','\x22\x20for\x20everyone\x20in\x20your\x20organization.','212640kuQYWG','log','ESUAy','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','cwd','966170qbEPTO','confirmation','5MQRlHv','yes','109732uTRMSh','DozVB','493254jOknbk','mwZLn','prompt','✓\x20Deleted\x20cloud\x20profile\x20\x22','mFzTN','18951910ZrGdJY','input','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','2553039HKjGrZ','4XgQwEg'];_0x326c=function(){return _0x291bde;};return _0x326c();}(function(_0x1d21f4,_0x2a03ed){const _0x38794e=_0x243c,_0x3ce93f=_0x1d21f4();while(!![]){try{const _0x226d79=parseInt(_0x38794e(0x145))/0x1+-parseInt(_0x38794e(0x14a))/0x2+-parseInt(_0x38794e(0x143))/0x3*(parseInt(_0x38794e(0x140))/0x4)+parseInt(_0x38794e(0x14c))/0x5*(-parseInt(_0x38794e(0x150))/0x6)+-parseInt(_0x38794e(0x14e))/0x7+-parseInt(_0x38794e(0x142))/0x8*(parseInt(_0x38794e(0x13f))/0x9)+parseInt(_0x38794e(0x155))/0xa;if(_0x226d79===_0x2a03ed)break;else _0x3ce93f['push'](_0x3ce93f['shift']());}catch(_0x1c880e){_0x3ce93f['push'](_0x3ce93f['shift']());}}}(_0x326c,0x69dfc));import _0x4b1b15 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x4f8c02,_0x430140={}){const _0x365d83=_0x243c,_0x468762={'RyeoQ':function(_0x3331e7,_0x31a4cb){return _0x3331e7(_0x31a4cb);},'YXORm':_0x365d83(0x13d),'ESUAy':_0x365d83(0x14b),'mwZLn':function(_0x2d3c61,_0x19c64e){return _0x2d3c61!==_0x19c64e;},'mFzTN':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','DozVB':function(_0x547b50,_0x7c784d,_0x4fe019){return _0x547b50(_0x7c784d,_0x4fe019);}},_0x2b51d7=await _0x468762['RyeoQ'](fetchCloudProfile,_0x4f8c02);if(!_0x2b51d7)throw new Error('Cloud\x20profile\x20\x22'+_0x4f8c02+'\x22\x20not\x20found.');if(!_0x430140['yes']&&!isInteractive())throw new Error(_0x365d83(0x148));console[_0x365d83(0x146)](_0x365d83(0x13e)+_0x4f8c02+_0x365d83(0x144));if(!_0x430140[_0x365d83(0x14d)]){const {confirmation:_0xd20325}=await _0x4b1b15[_0x365d83(0x152)]([{'type':_0x468762[_0x365d83(0x141)],'name':_0x468762[_0x365d83(0x147)],'message':'Type\x20\x22'+_0x4f8c02+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x468762[_0x365d83(0x151)](_0xd20325,_0x4f8c02))throw new Error(_0x468762[_0x365d83(0x154)]);}await deleteCloudProfile(_0x4f8c02),_0x468762[_0x365d83(0x14f)](resetProfileOverrides,process['cwd'](),_0x4f8c02),clearLastProfile(process[_0x365d83(0x149)](),_0x4f8c02),console[_0x365d83(0x146)](_0x365d83(0x153)+_0x4f8c02+'\x22.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x554e09=_0x447a;(function(_0x350dec,_0x4f5689){const _0xcdf62f=_0x447a,_0x42ed6e=_0x350dec();while(!![]){try{const _0x1ae99d=parseInt(_0xcdf62f(0xd5))/0x1*(parseInt(_0xcdf62f(0xd8))/0x2)+-parseInt(_0xcdf62f(0xbb))/0x3+parseInt(_0xcdf62f(0xc6))/0x4+-parseInt(_0xcdf62f(0xd6))/0x5*(-parseInt(_0xcdf62f(0xc4))/0x6)+parseInt(_0xcdf62f(0xd0))/0x7+parseInt(_0xcdf62f(0xb9))/0x8*(-parseInt(_0xcdf62f(0xc1))/0x9)+-parseInt(_0xcdf62f(0xd3))/0xa*(parseInt(_0xcdf62f(0xbf))/0xb);if(_0x1ae99d===_0x4f5689)break;else _0x42ed6e['push'](_0x42ed6e['shift']());}catch(_0x269e31){_0x42ed6e['push'](_0x42ed6e['shift']());}}}(_0x2298,0x33440));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';function _0x2298(){const _0x2bbec2=['log','wQSSd','push','endsWith','1156414gXdFWS','legacy','Agaws','1203590TEkgdB','\x20\x20\x20\x20\x20\x20Details:\x20','7739UqRzQQ','55gTAfnj','Nasjw','40GmWMnf','vIibt','sessionUpdatedAt','cached\x20(updated\x20','name','localeCompare','120EYBLHm','environmentKey','323466CBoeHs','local','\x0aCloud\x20Profiles:','PPmrZ','11GKpPLE','length','96777SaDczp','includes','isDirectory','132654qgvqIs','lYaML','145116fIYBPh','AVvvZ','sort','\x20\x20\x20\x20\x20\x20Session:\x20','baseUrl','message'];_0x2298=function(){return _0x2bbec2;};return _0x2298();}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports',_0x554e09(0xbc),'ci'];export async function getEnvNames(){const _0x58d33a=_0x554e09,_0x5ced60={'lYaML':function(_0xe56985){return _0xe56985();},'yoLsu':function(_0x1a6d96,_0x5d8f52){return _0x1a6d96(_0x5d8f52);},'vIibt':function(_0x38c908,_0x14c419,_0x779e04){return _0x38c908(_0x14c419,_0x779e04);},'wDBiI':function(_0x55c28b,_0x2a7d18){return _0x55c28b(_0x2a7d18);},'lWwsH':_0x58d33a(0xbc),'gvWvb':function(_0x34e040,_0x180cd7,_0x5b4cdd){return _0x34e040(_0x180cd7,_0x5b4cdd);},'eKVZa':function(_0x33f420,_0x2bf12d){return _0x33f420(_0x2bf12d);},'tniJo':'settings.json'},_0x359dcf=_0x5ced60['lYaML'](getRangerDir);if(!existsSync(_0x359dcf))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4f7eec=await _0x5ced60[_0x58d33a(0xc5)](readActiveProfileName),_0x534246=[],_0x3913ad={},_0x27cc5e=join(_0x359dcf,_0x58d33a(0xbc));if(existsSync(_0x27cc5e)){const _0x480e63=await _0x5ced60['yoLsu'](readdir,_0x27cc5e);for(const _0x4b5d52 of _0x480e63){const _0xf6d94e=_0x5ced60[_0x58d33a(0xd9)](join,_0x27cc5e,_0x4b5d52),_0xee50f1=await _0x5ced60['wDBiI'](stat,_0xf6d94e);_0xee50f1[_0x58d33a(0xc3)]()&&(_0x534246[_0x58d33a(0xce)](_0x4b5d52),_0x3913ad[_0x4b5d52]=_0x5ced60['lWwsH']);}}const _0x2906b4=join(_0x359dcf,'ci');if(existsSync(_0x2906b4)){const _0x275fe2=await readdir(_0x2906b4);for(const _0x11ba1e of _0x275fe2){const _0x1cedad=_0x5ced60['gvWvb'](join,_0x2906b4,_0x11ba1e),_0xd6b822=await _0x5ced60['wDBiI'](stat,_0x1cedad);_0xd6b822[_0x58d33a(0xc3)]()&&(_0x534246['push'](_0x11ba1e),_0x3913ad[_0x11ba1e]='ci');}}const _0x27b997=await _0x5ced60['eKVZa'](readdir,_0x359dcf);for(const _0x4bce15 of _0x27b997){if(NON_ENV_DIRS[_0x58d33a(0xc2)](_0x4bce15))continue;if(_0x4bce15['startsWith']('.'))continue;if(_0x4bce15[_0x58d33a(0xcf)]('.txt'))continue;const _0x2a0dce=join(_0x359dcf,_0x4bce15),_0x17d356=await stat(_0x2a0dce);_0x17d356[_0x58d33a(0xc3)]()&&_0x5ced60['yoLsu'](existsSync,join(_0x2a0dce,_0x5ced60['tniJo']))&&(!_0x534246['includes'](_0x4bce15)&&(_0x534246['push'](_0x4bce15),_0x3913ad[_0x4bce15]=_0x58d33a(0xd1)));}return{'envNames':_0x534246,'activeEnv':_0x4f7eec,'envTypes':_0x3913ad};}function _0x447a(_0x270125,_0x3dca80){_0x270125=_0x270125-0xb7;const _0x2298b2=_0x2298();let _0x447a06=_0x2298b2[_0x270125];return _0x447a06;}export async function envList(){const _0x1cba67=_0x554e09,_0x18f029={'Agaws':function(_0x555673,_0x4ec0ff){return _0x555673 instanceof _0x4ec0ff;},'PPmrZ':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','AVvvZ':function(_0x4ba531,_0x28fa0c){return _0x4ba531>_0x28fa0c;},'WzeVg':function(_0x2e303d,_0x32eb25){return _0x2e303d(_0x32eb25);},'wQSSd':'legacy','Nasjw':_0x1cba67(0xbd),'BagiD':function(_0x2eaf0a,_0x32b525){return _0x2eaf0a===_0x32b525;}},{envNames:_0x4182f7,activeEnv:_0x127b83,envTypes:_0x23cfa9}=await getEnvNames();let _0x157100=[];const _0x54d935=await getToken();if(_0x54d935)try{_0x157100=await listCloudProfiles();}catch(_0x3d8cf6){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x18f029[_0x1cba67(0xd2)](_0x3d8cf6,Error)?_0x3d8cf6[_0x1cba67(0xcb)]:String(_0x3d8cf6)));}if(_0x4182f7['length']===0x0&&_0x157100[_0x1cba67(0xc0)]===0x0){console['log']('\x0aNo\x20profiles\x20found.'),console['log'](_0x18f029[_0x1cba67(0xbe)]);return;}const _0x23ed31=new Set(_0x157100['map'](_0x5cfc6d=>_0x5cfc6d[_0x1cba67(0xb7)]));if(_0x18f029[_0x1cba67(0xc7)](_0x4182f7['length'],0x0)){console[_0x1cba67(0xcc)]('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x45fdd5 of _0x4182f7['sort']()){const _0x2788ce=_0x45fdd5===_0x127b83&&!_0x23ed31['has'](_0x45fdd5),_0x5a2863=_0x23cfa9[_0x45fdd5]||'local',_0x5a8222=await _0x18f029['WzeVg'](loadSettings,_0x45fdd5),_0x5f1978=_0x5a2863===_0x18f029[_0x1cba67(0xcd)]?'':'\x20['+_0x5a2863+']';console['log']('\x20\x20'+(_0x2788ce?'*\x20':'\x20\x20')+_0x45fdd5+_0x5f1978),_0x5a8222['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x5a8222[_0x1cba67(0xca)]),_0x5a8222['environmentDetails']&&console['log'](_0x1cba67(0xd4)+_0x5a8222['environmentDetails']);}}if(_0x18f029['AVvvZ'](_0x157100[_0x1cba67(0xc0)],0x0)){console[_0x1cba67(0xcc)](_0x18f029[_0x1cba67(0xd7)]);for(const _0x136c11 of _0x157100[_0x1cba67(0xc8)]((_0x363f74,_0x3dca07)=>_0x363f74[_0x1cba67(0xb7)][_0x1cba67(0xb8)](_0x3dca07[_0x1cba67(0xb7)]))){const _0xca34b7=_0x18f029['BagiD'](_0x136c11['name'],_0x127b83),_0x16d0aa=_0x136c11[_0x1cba67(0xba)]?'\x20('+_0x136c11['environmentKey']+')':'',_0x3fa328=_0x136c11['sessionUpdatedAt']?_0x1cba67(0xdb)+_0x136c11[_0x1cba67(0xda)]+')':'no\x20session';console['log']('\x20\x20'+(_0xca34b7?'*\x20':'\x20\x20')+_0x136c11[_0x1cba67(0xb7)]+'\x20[cloud]'+_0x16d0aa),console['log'](_0x1cba67(0xc9)+_0x3fa328);}}_0x127b83&&console['log']('\x0a*\x20=\x20active\x20profile');}
|