@ranger-testing/ranger-cli 3.0.1-alpha.ffffb5b-28 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -0
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/tunnelClient.js +1 -0
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  85. package/package.json +4 -1
@@ -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(_0x2d2da2,_0x504ce3){const _0x51ba31=_0x3e23,_0x105f82=_0x2d2da2();while(!![]){try{const _0x2040ab=parseInt(_0x51ba31(0xb3))/0x1*(parseInt(_0x51ba31(0xba))/0x2)+parseInt(_0x51ba31(0x100))/0x3*(parseInt(_0x51ba31(0xdd))/0x4)+-parseInt(_0x51ba31(0xc6))/0x5+-parseInt(_0x51ba31(0xbf))/0x6+-parseInt(_0x51ba31(0xfc))/0x7*(-parseInt(_0x51ba31(0xb7))/0x8)+parseInt(_0x51ba31(0xf1))/0x9+-parseInt(_0x51ba31(0xf0))/0xa*(parseInt(_0x51ba31(0xd5))/0xb);if(_0x2040ab===_0x504ce3)break;else _0x105f82['push'](_0x105f82['shift']());}catch(_0x214701){_0x105f82['push'](_0x105f82['shift']());}}}(_0x4e74,0x5c0ce));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x1ba835 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x4e74(){const _0x1b1600=['\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','120354SYPKXP','length','slice','gUOxG','cdpEndpoint','mOPCr','rWOfk','setupHeaders','gTEtZ','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x27\x20created.\x0a','force','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','setupHeader','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','UyDtQ','trim','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','name','GsaDQ','gLRtK','What\x20would\x20you\x20like\x20to\x20do?','isProtocolError','wVolZ','✓\x20Cloud\x20profile\x20\x27','action','domains','\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','keys','\x20\x20Set\x20active\x20profile:\x20','DExET','Enter\x20a\x20different\x20URL','startsWith','DIBPr','origin','trackPhaseEnd','TlTCM','CkazP','\x0a\x20\x20Could\x20not\x20reach\x20','NCXVp','vVyPG','environments','user_declined','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','VbVtD','\x0a\x20\x20A\x20profile\x20named\x20\x22','oMOAl','617PWcxAg','saveToCloud','ADFHf','wqutF','48xWYuPZ','log','fetch\x20failed','248dqkgzv','GTkyU','XtpDH','GCFVR','cwrJC','3759336caVXsa','GCBZk','no_auth_config','includes','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','capture','\x27\x20to\x20the\x20cloud?','395205fXMifU','Found\x20auth\x20environment\x20\x27','fKgfU','NODE_TLS_REJECT_UNAUTHORIZED','url','hduFP','continue','join','Oqwxv','\x22:\x20','message','\x20(continuing\x20with\x20--force)','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','vddJL','orDSj','11ydvBGH','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','prompt','yVGPl','env','\x0a🌐\x20Profile\x20Setup\x0a','retry','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','24gTLfJp','status','baseUrl','profile.add.autoRouteSkipped','KjZdv','test','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','indexOf','some','dCtFE','\x20\x20Did\x20you\x20mean\x20','oJLbG','UMDXV','vXFLy','TypeError','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','profile.add.autoRouted','sZpvg','6249180fPDdHF','5892741YiAsVt',')\x0a\x20\x20Save\x20\x27','CRAfW','YKuDX','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','exit','HEAD','\x20\x20https://docs.ranger.net/main/concepts/profiles','iXHik','stdout','✓\x20Profile\x20\x27','858186vweWOa','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','error'];_0x4e74=function(){return _0x1b1600;};return _0x4e74();}const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2ca735=_0x3e23;if(!process[_0x2ca735(0xfa)]['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x36b13a){const _0x1efde1=_0x3e23,_0x4ceced={'SSiqt':_0x1efde1(0xf7),'orDSj':'manual','UyDtQ':function(_0x139627,_0xa031af,_0x260ad6){return _0x139627(_0xa031af,_0x260ad6);},'ePUiG':function(_0x8ce0a4,_0xe1d674){return _0x8ce0a4<_0xe1d674;},'vddJL':function(_0xb3d24f,_0x288755){return _0xb3d24f(_0x288755);},'hduFP':'Invalid\x20URL'};try{const _0x4e9437=new AbortController(),_0x189bf2=setTimeout(()=>_0x4e9437['abort'](),0x1388),_0x26ecab={'method':_0x4ceced['SSiqt'],'signal':_0x4e9437['signal'],'redirect':_0x4ceced[_0x1efde1(0xd4)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x36b13a)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x49d856=await _0x4ceced[_0x1efde1(0x110)](fetch,_0x36b13a,_0x26ecab);delete process[_0x1efde1(0xd9)][_0x1efde1(0xc9)],clearTimeout(_0x189bf2);if(_0x4ceced['ePUiG'](_0x49d856[_0x1efde1(0xde)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x49d856[_0x1efde1(0xde)]};}catch(_0x400628){delete process[_0x1efde1(0xd9)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1ea621=_0x400628,_0x1fee16=_0x1ea621[_0x1efde1(0xd0)]||_0x4ceced[_0x1efde1(0xd3)](String,_0x400628),_0x238fc3=_0x1fee16[_0x1efde1(0xc2)](_0x4ceced[_0x1efde1(0xcb)])||_0x1ea621[_0x1efde1(0x113)]===_0x1efde1(0xeb)||_0x1fee16['includes'](_0x1efde1(0xb9));return{'ok':![],'error':_0x1fee16,'isProtocolError':_0x238fc3};}}async function sweepOrphanLocalProfile(_0x1efa76,_0x54639b,_0x139d2b){const _0x12da4b=_0x3e23,_0x3fd7d7={'YgRwv':function(_0x56d6aa,_0x435652){return _0x56d6aa(_0x435652);},'dCtFE':function(_0x3fa432,_0x5eabf0,_0x3350e0){return _0x3fa432(_0x5eabf0,_0x3350e0);}},_0x5e7c46=join(_0x54639b,'local'),_0x32a945=join(_0x5e7c46,_0x1efa76);existsSync(_0x32a945)&&(_0x139d2b&&await isPathGitTracked(_0x32a945)?console[_0x12da4b(0xb8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x32a945+_0x12da4b(0xdc)):(await rm(_0x32a945,{'recursive':!![],'force':!![]}),console[_0x12da4b(0xb8)](_0x12da4b(0x10a)+_0x32a945)));if(existsSync(_0x5e7c46)){let _0xfaf4d2=[];try{_0xfaf4d2=await _0x3fd7d7['YgRwv'](readdir,_0x5e7c46);}catch{return;}const _0x265989='.tmp-'+_0x1efa76+'-';for(const _0x36dc8b of _0xfaf4d2){if(!_0x36dc8b[_0x12da4b(0x121)](_0x265989))continue;const _0x4daf75=_0x3fd7d7['dCtFE'](join,_0x5e7c46,_0x36dc8b);await _0x3fd7d7[_0x12da4b(0xe6)](rm,_0x4daf75,{'recursive':!![],'force':!![]}),console[_0x12da4b(0xb8)](_0x12da4b(0x10a)+_0x4daf75);}}}async function sweepOrphansBestEffort(_0x4fff3a){const _0x321747=_0x3e23,_0x44ef41={'IXbJh':function(_0x32f5a5,_0x2c52dc,_0x554a10,_0x2f339b){return _0x32f5a5(_0x2c52dc,_0x554a10,_0x2f339b);},'CEQUz':function(_0x1a3fb9){return _0x1a3fb9();},'fKgfU':function(_0x2a6694){return _0x2a6694();},'oMOAl':function(_0x380ee3){return _0x380ee3();},'eYwOn':function(_0x3e22b3,_0x4707b,_0x3fd30f,_0x324fe3){return _0x3e22b3(_0x4707b,_0x3fd30f,_0x324fe3);}};try{await _0x44ef41['IXbJh'](sweepOrphanLocalProfile,_0x4fff3a,_0x44ef41['CEQUz'](getRangerHomeDir),![]);const _0x72de0f=_0x44ef41[_0x321747(0xc8)](getRangerDir);_0x72de0f!==_0x44ef41[_0x321747(0xb2)](getRangerHomeDir)&&await _0x44ef41['eYwOn'](sweepOrphanLocalProfile,_0x4fff3a,_0x72de0f,!![]);}catch(_0x439a06){console[_0x321747(0xb8)](_0x321747(0x112)+(_0x439a06 instanceof Error?_0x439a06['message']:String(_0x439a06))+').');}}async function markActive(_0x4a2426){const _0x553288=_0x3e23,_0x1615ef={'sZpvg':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x4a2426),console['log'](_0x553288(0x11e)+_0x4a2426);}catch{console['log'](_0x1615ef[_0x553288(0xef)]);}}async function tryAutoRouteCloudProfile(_0x1fd22b,_0x50249b,_0x9f764d,_0x229cd2,_0x27e5c3){const _0x5c2e65=_0x3e23,_0x237c53={'iXHik':function(_0x18e66a,_0xaece67){return _0x18e66a===_0xaece67;},'YKuDX':'profile.add.autoRouteSkipped','CkazP':function(_0x48e80d,_0x5e5691,_0x26057f,_0x183f23,_0x26b45e){return _0x48e80d(_0x5e5691,_0x26057f,_0x183f23,_0x26b45e);},'vVyPG':_0x5c2e65(0xc1),'DIBPr':function(_0x11cb3a,_0x3c2d92){return _0x11cb3a+_0x3c2d92;},'cfkDv':function(_0x5b5eaa,_0x3429a3){return _0x5b5eaa+_0x3429a3;},'ivuub':_0x5c2e65(0x11c),'sCiZo':_0x5c2e65(0xd2),'RZINF':_0x5c2e65(0x109),'UHjli':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','cwrJC':function(_0x2666e5,_0x50d8b3,_0x534b0a){return _0x2666e5(_0x50d8b3,_0x534b0a);},'IdITU':'user_declined','rWOfk':function(_0xf372ac,_0xe1698d,_0x416b9d,_0x1b8dee){return _0xf372ac(_0xe1698d,_0x416b9d,_0x1b8dee);},'GCFVR':function(_0x4ddaea,_0x9745d7){return _0x4ddaea(_0x9745d7);},'CsLEc':_0x5c2e65(0xee)};let _0x2ac24d;try{_0x2ac24d=await fetchAuthConfig();}catch(_0x541617){return _0x27e5c3?.['trackPhaseEnd'](_0x237c53[_0x5c2e65(0xf4)],{'reason':'no_auth_config','profileName':_0x1fd22b}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x541617 instanceof Error?_0x541617['message']:String(_0x541617))),![];}if(!_0x2ac24d||!_0x2ac24d['environments']||_0x237c53['iXHik'](Object[_0x5c2e65(0x11d)](_0x2ac24d[_0x5c2e65(0x12a)])[_0x5c2e65(0x101)],0x0)){if(_0x229cd2)return await _0x237c53[_0x5c2e65(0x126)](captureEnvLessProfile,_0x1fd22b,_0x50249b,_0x9f764d,_0x27e5c3);return _0x27e5c3?.[_0x5c2e65(0x124)](_0x237c53['YKuDX'],{'reason':_0x237c53[_0x5c2e65(0x129)],'profileName':_0x1fd22b}),console[_0x5c2e65(0xfe)](_0x237c53[_0x5c2e65(0x122)](_0x237c53['cfkDv'](_0x237c53[_0x5c2e65(0x122)](_0x237c53['cfkDv'](_0x237c53['ivuub'],'\x0a')+_0x237c53['sCiZo'],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1fd22b+'\x20--url\x20'+_0x50249b+'\x20--skip-auth\x0a'),'\x0a'),_0x237c53['RZINF'])+_0x237c53['UHjli']),![];}const _0x41090c=_0x237c53[_0x5c2e65(0xbe)](matchAuthEnvironment,_0x50249b,_0x2ac24d);if(!_0x41090c)return _0x27e5c3?.[_0x5c2e65(0x124)]('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x1fd22b}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x50249b+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x2ac24d['environments'])['join'](',\x20')+'.'),![];const _0x168624=_0x2ac24d['environments'][_0x41090c],_0x19b14c=_0x168624?.[_0x5c2e65(0x11b)]??[];if(_0x229cd2&&!_0x9f764d['yes']){const {saveToCloud:_0x110d1b}=await _0x1ba835[_0x5c2e65(0xd7)]([{'type':'confirm','name':_0x5c2e65(0xb4),'message':_0x5c2e65(0xc7)+_0x41090c+'\x27\x20matching\x20'+_0x50249b+'\x0a\x20\x20(domains:\x20'+_0x19b14c[_0x5c2e65(0xcd)](',\x20')+_0x5c2e65(0xf2)+_0x1fd22b+_0x5c2e65(0xc5),'default':!![]}]);if(!_0x110d1b)return _0x27e5c3?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x237c53['IdITU'],'profileName':_0x1fd22b}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x270a90=_0x19b14c[_0x5c2e65(0xe5)](_0x4c1931=>{const _0x4b530d=_0x5c2e65;try{return _0x237c53[_0x4b530d(0xf9)](new URL(_0x4c1931)[_0x4b530d(0x123)],new URL(_0x50249b)['origin']);}catch{return![];}}),_0x425085={};!_0x270a90&&(_0x425085['baseUrl']=_0x50249b);try{await _0x237c53[_0x5c2e65(0x106)](createCloudProfile,_0x1fd22b,_0x41090c,{'settings':_0x425085}),warnCloudProfileSharedInOrg();}catch(_0x362775){if(_0x362775 instanceof ApiError&&_0x362775['status']===0x199){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1fd22b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x5c2e65(0xf5)+_0x1fd22b));throw _0x362775;}throw _0x362775;}return console['log']('✓\x20Profile\x20\x27'+_0x1fd22b+_0x5c2e65(0x10b)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x1fd22b)),await _0x237c53[_0x5c2e65(0xbd)](sweepOrphansBestEffort,_0x1fd22b),_0x27e5c3?.['trackPhaseEnd'](_0x237c53['CsLEc'],{'envKey':_0x41090c,'profileName':_0x1fd22b}),!![];}function _0x3e23(_0xb21070,_0x372a5e){_0xb21070=_0xb21070-0xae;const _0x4e74cd=_0x4e74();let _0x3e2316=_0x4e74cd[_0xb21070];return _0x3e2316;}async function createUnconfiguredCloudProfile(_0x17cdd7,_0xc0da3b){const _0xc8539e=_0x3e23,_0x614304={'GTkyU':function(_0xa0e702,_0x42012b,_0x583a00,_0x597cc7){return _0xa0e702(_0x42012b,_0x583a00,_0x597cc7);},'JeNIg':function(_0x21cf50,_0x19542f){return _0x21cf50 instanceof _0x19542f;},'gTEtZ':function(_0x5359d6,_0x14831a){return _0x5359d6===_0x14831a;}};try{await _0x614304[_0xc8539e(0xbb)](createCloudProfile,_0x17cdd7,undefined,{'settings':_0xc0da3b}),warnCloudProfileSharedInOrg();}catch(_0x1d3f86){_0x614304['JeNIg'](_0x1d3f86,ApiError)&&_0x614304[_0xc8539e(0x108)](_0x1d3f86['status'],0x199)&&console['error'](_0xc8539e(0xb1)+_0x17cdd7+_0xc8539e(0xaf)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x17cdd7));throw _0x1d3f86;}}async function captureEnvLessProfile(_0x598497,_0x583512,_0x5d9c74,_0x115d4b){const _0x5d2dc8=_0x3e23,_0x55b428={'cBrfl':'confirm','WrJEr':_0x5d2dc8(0xc4),'NCXVp':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','GDjoB':_0x5d2dc8(0xe0),'BonOF':function(_0x506844,_0x31942e){return _0x506844>_0x31942e;},'Oqwxv':function(_0x2a0ab0,_0x482689,_0x2a6d50,_0x71e015){return _0x2a0ab0(_0x482689,_0x2a6d50,_0x71e015);},'vXFLy':function(_0x1390f7,_0x42ac2f){return _0x1390f7 instanceof _0x42ac2f;},'UMDXV':function(_0x16901a,_0xb6a468){return _0x16901a===_0xb6a468;},'GBWBK':function(_0x34ef2a,_0x1953be,_0x4f4d59){return _0x34ef2a(_0x1953be,_0x4f4d59);},'yVGPl':function(_0x2289d6,_0x2234f6){return _0x2289d6+_0x2234f6;},'oJLbG':function(_0x1bfe5a,_0x335d60){return _0x1bfe5a(_0x335d60);},'DhEHq':'profile.add.autoRouted'};if(!_0x5d9c74['yes']){const {capture:_0x4a567a}=await _0x1ba835['prompt']([{'type':_0x55b428['cBrfl'],'name':_0x55b428['WrJEr'],'message':_0x55b428[_0x5d2dc8(0x128)],'default':!![]}]);if(!_0x4a567a)return _0x115d4b?.['trackPhaseEnd'](_0x55b428['GDjoB'],{'reason':_0x5d2dc8(0xae),'profileName':_0x598497}),console[_0x5d2dc8(0xfe)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x291215={};if(_0x5d9c74[_0x5d2dc8(0x10e)])for(const _0x553cd2 of _0x5d9c74['setupHeader']){const _0x5dcd7c=_0x553cd2[_0x5d2dc8(0xe4)](':');if(_0x5dcd7c===-0x1)continue;_0x291215[_0x553cd2[_0x5d2dc8(0x102)](0x0,_0x5dcd7c)['trim']()]=_0x553cd2['slice'](_0x5dcd7c+0x1)[_0x5d2dc8(0x111)]();}const _0x103f2c={'baseUrl':_0x583512};_0x55b428['BonOF'](Object['keys'](_0x291215)['length'],0x0)&&(_0x103f2c[_0x5d2dc8(0x107)]=_0x291215);let _0xcfa31f;try{_0xcfa31f=await _0x55b428[_0x5d2dc8(0xce)](createCloudProfile,_0x598497,undefined,{'settings':_0x103f2c}),warnCloudProfileSharedInOrg();}catch(_0x484fd9){_0x55b428[_0x5d2dc8(0xea)](_0x484fd9,ApiError)&&_0x55b428[_0x5d2dc8(0xe9)](_0x484fd9[_0x5d2dc8(0xde)],0x199)&&console['error'](_0x5d2dc8(0xb1)+_0x598497+_0x5d2dc8(0xaf)+(_0x5d2dc8(0xf5)+_0x598497));throw _0x484fd9;}return await _0x55b428['GBWBK'](manualBrowserLogin,_0xcfa31f,{'key':'','domains':[_0x583512],'setupHeaders':Object[_0x5d2dc8(0x11d)](_0x291215)['length']>0x0?_0x291215:undefined}),console[_0x5d2dc8(0xb8)](_0x55b428[_0x5d2dc8(0xd8)]('\x0a✓\x20Profile\x20\x27'+_0x598497+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x5d2dc8(0xfd)+_0x598497)),await _0x55b428[_0x5d2dc8(0xe8)](sweepOrphansBestEffort,_0x598497),_0x115d4b?.[_0x5d2dc8(0x124)](_0x55b428['DhEHq'],{'envKey':null,'profileName':_0x598497}),!![];}export async function addEnv(_0x52f017,_0x159572={},_0x33f6ce){const _0x157f17=_0x3e23,_0x4f0175={'gUOxG':function(_0x5ce36d,_0x575cf6){return _0x5ce36d+_0x575cf6;},'XtpDH':function(_0x50cf4b,_0x189f04){return _0x50cf4b+_0x189f04;},'SaMIK':function(_0x12c3a3,_0x6ffd66){return _0x12c3a3+_0x6ffd66;},'GCBZk':function(_0x1ca4dd,_0x5d8ef9){return _0x1ca4dd+_0x5d8ef9;},'CRAfW':function(_0x1fdb4a,_0x5e794e){return _0x1fdb4a!==_0x5e794e;},'mOPCr':function(_0x5b1f19,_0x540458){return _0x5b1f19===_0x540458;},'wVolZ':_0x157f17(0xec),'ADFHf':function(_0x580c3a,_0x7222db){return _0x580c3a(_0x7222db);},'hNwIC':'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','hnMqO':function(_0x39c49f,_0x13489d,_0x20b599){return _0x39c49f(_0x13489d,_0x20b599);},'TlTCM':'isElectron','DExET':function(_0x297edb,_0x43627a){return _0x297edb(_0x43627a);},'gLRtK':function(_0x3c2e93,_0x8c4ec3){return _0x3c2e93>_0x8c4ec3;},'Xytcg':_0x157f17(0xda),'XYJQh':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','xXvEQ':_0x157f17(0xdf),'tlHHS':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','FtGQk':'http://localhost:3000','wqutF':_0x157f17(0x11a),'GsaDQ':'use_suggestion','fitKh':_0x157f17(0x120),'VKMyW':_0x157f17(0xdb),'WCyFJ':'Continue\x20anyway','TpUPF':'continue','KjZdv':function(_0x55d6d3,_0xc8a9f0){return _0x55d6d3 instanceof _0xc8a9f0;},'VbVtD':function(_0x3c3e8a,_0x57a8d6){return _0x3c3e8a(_0x57a8d6);},'NQLtR':function(_0x14bfe5,_0x4138f3){return _0x14bfe5(_0x4138f3);}};_0x159572['ci']&&(console[_0x157f17(0xfe)](_0x4f0175['gUOxG'](_0x4f0175[_0x157f17(0x103)](_0x4f0175[_0x157f17(0xbc)](_0x4f0175['SaMIK'](_0x4f0175[_0x157f17(0xc0)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a',_0x157f17(0x10f)),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x157f17(0xf8))),process['exit'](0x1));const _0x1fed01={};if(_0x159572[_0x157f17(0x10e)])for(const _0xbbcaef of _0x159572[_0x157f17(0x10e)]){const _0x89d3e0=_0xbbcaef[_0x157f17(0xe4)](':');if(_0x89d3e0===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0xbbcaef+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x430d26=_0xbbcaef['slice'](0x0,_0x89d3e0)['trim'](),_0x29d94c=_0xbbcaef['slice'](_0x4f0175[_0x157f17(0xc0)](_0x89d3e0,0x1))['trim']();_0x1fed01[_0x430d26]=_0x29d94c;}if(_0x4f0175[_0x157f17(0xf3)](_0x159572[_0x157f17(0x104)],undefined)&&_0x4f0175[_0x157f17(0x105)](_0x159572[_0x157f17(0x104)]['trim'](),''))throw new Error(_0x4f0175[_0x157f17(0x118)]);if(_0x159572[_0x157f17(0x104)]&&_0x159572['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 _0x33f645=_0x4f0175[_0x157f17(0xb5)](Boolean,_0x159572[_0x157f17(0x104)]),_0x35514d=isInteractive();if(!_0x35514d&&!_0x159572['url']&&!_0x33f645&&!_0x159572['skipAuth'])throw new Error(_0x4f0175['hNwIC']);if(_0x33f645){const _0x179114=_0x159572['cdpEndpoint'];console['log'](_0x157f17(0xed)),console[_0x157f17(0xb8)](_0x157f17(0xd6)+_0x179114);const _0x5dfdc9={'cdpEndpoint':_0x179114,'isElectron':!![]};Object['keys'](_0x1fed01)['length']>0x0&&(_0x5dfdc9[_0x157f17(0x107)]=_0x1fed01);await _0x4f0175['hnMqO'](createUnconfiguredCloudProfile,_0x52f017,_0x5dfdc9);try{setProfileOverride(process['cwd'](),_0x52f017,'cdpEndpoint',_0x179114),setProfileOverride(process['cwd'](),_0x52f017,_0x4f0175[_0x157f17(0x125)],!![]);}catch(_0x5cfd52){console['error'](_0x157f17(0xe3)+(_0x5cfd52 instanceof Error?_0x5cfd52['message']:String(_0x5cfd52)));}console[_0x157f17(0xb8)](_0x157f17(0x119)+_0x52f017+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x52f017),await _0x4f0175[_0x157f17(0x11f)](markActive,_0x52f017);return;}if(_0x159572['skipAuth']){const _0x3c81f8={};_0x159572['url']&&(_0x3c81f8[_0x157f17(0xdf)]=_0x159572[_0x157f17(0xca)]);_0x4f0175[_0x157f17(0x115)](Object[_0x157f17(0x11d)](_0x1fed01)[_0x157f17(0x101)],0x0)&&(_0x3c81f8[_0x157f17(0x107)]=_0x1fed01);await createUnconfiguredCloudProfile(_0x52f017,_0x3c81f8),console['log'](_0x4f0175['gUOxG'](_0x157f17(0xfb)+_0x52f017+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x52f017+'`\x20again\x20without\x20--skip-auth.')),await _0x4f0175['ADFHf'](sweepOrphansBestEffort,_0x52f017),await _0x4f0175[_0x157f17(0x11f)](markActive,_0x52f017);return;}if(_0x159572[_0x157f17(0xca)]){const _0x4db355=_0x159572['url'],_0x2ea8ad=await checkUrlReachability(_0x4db355);if(!_0x2ea8ad['ok']&&!_0x159572['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4db355+':\x20'+_0x2ea8ad[_0x157f17(0xfe)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x2ea8ad['ok']&&_0x159572[_0x157f17(0x10c)]&&console[_0x157f17(0xb8)]('⚠\x20Could\x20not\x20reach\x20'+_0x4db355+':\x20'+_0x2ea8ad[_0x157f17(0xfe)]+_0x157f17(0xd1));}else{console['log'](_0x4f0175['Xytcg']),console['log'](_0x157f17(0x10d)),console[_0x157f17(0xb8)](_0x4f0175['XYJQh']);let _0x227ada='',_0x161bd1=![];while(!![]){const _0x2af1dd=await _0x1ba835['prompt']([{'type':'input','name':_0x4f0175['xXvEQ'],'message':_0x161bd1?_0x4f0175['tlHHS']:_0x157f17(0xc3),'default':_0x227ada||_0x4f0175['FtGQk']}]);_0x227ada=_0x2af1dd[_0x157f17(0xdf)];const _0xba4bd6=await checkUrlReachability(_0x227ada);if(_0xba4bd6['ok'])break;const _0x3397f5=/^[a-zA-Z][\w+.-]*:\/\//[_0x157f17(0xe2)](_0x227ada),_0x734c9e=_0xba4bd6[_0x157f17(0x117)]&&!_0x3397f5,_0x23c6e8=_0x734c9e?'http://'+_0x227ada:null;_0x161bd1=!![],console[_0x157f17(0xb8)](_0x157f17(0x127)+_0x227ada+':\x20'+_0xba4bd6['error']);_0x23c6e8&&console[_0x157f17(0xb8)](_0x157f17(0xe7)+_0x23c6e8+'?');const {action:_0x12fae8}=await _0x1ba835['prompt']([{'type':'list','name':_0x4f0175[_0x157f17(0xb6)],'message':_0x157f17(0x116),'choices':[..._0x23c6e8?[{'name':'Use\x20'+_0x23c6e8,'value':_0x4f0175['GsaDQ']}]:[],{'name':_0x4f0175['fitKh'],'value':_0x4f0175['VKMyW']},{'name':_0x4f0175['WCyFJ'],'value':_0x4f0175['TpUPF']}]}]);if(_0x12fae8===_0x4f0175[_0x157f17(0x114)]&&_0x23c6e8){_0x227ada=_0x23c6e8;const _0x143910=await checkUrlReachability(_0x227ada);if(_0x143910['ok'])break;console[_0x157f17(0xb8)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x227ada+':\x20'+_0x143910[_0x157f17(0xfe)]);}else{if(_0x12fae8===_0x157f17(0xcc))break;}}_0x159572={..._0x159572,'url':_0x227ada};}let _0xc92a7c=![];try{_0xc92a7c=await tryAutoRouteCloudProfile(_0x52f017,_0x159572['url'],_0x159572,_0x35514d,_0x33f6ce);}catch(_0x3a4979){console[_0x157f17(0xfe)](_0x157f17(0xff)+_0x52f017+_0x157f17(0xcf)+(_0x4f0175[_0x157f17(0xe1)](_0x3a4979,Error)?_0x3a4979[_0x157f17(0xd0)]:_0x4f0175[_0x157f17(0xb0)](String,_0x3a4979))),process['exit'](0x1);}!_0xc92a7c&&process[_0x157f17(0xf6)](0x1),await _0x4f0175['NQLtR'](markActive,_0x52f017);}
@@ -1 +1 @@
1
- (function(_0x595a4e,_0x4a6d65){var _0x287187=_0x1866,_0xbbc239=_0x595a4e();while(!![]){try{var _0x37bbcc=-parseInt(_0x287187(0xb5))/0x1+parseInt(_0x287187(0xc2))/0x2*(-parseInt(_0x287187(0xbf))/0x3)+-parseInt(_0x287187(0xc0))/0x4*(parseInt(_0x287187(0xb7))/0x5)+-parseInt(_0x287187(0xb8))/0x6+parseInt(_0x287187(0xbb))/0x7*(parseInt(_0x287187(0xc1))/0x8)+-parseInt(_0x287187(0xb4))/0x9+parseInt(_0x287187(0xbe))/0xa;if(_0x37bbcc===_0x4a6d65)break;else _0xbbc239['push'](_0xbbc239['shift']());}catch(_0xe93e1d){_0xbbc239['push'](_0xbbc239['shift']());}}}(_0x58b3,0x3c1b1));function _0x1866(_0x1d898c,_0x237b04){_0x1d898c=_0x1d898c-0xb2;var _0x58b344=_0x58b3();var _0x186663=_0x58b344[_0x1d898c];return _0x186663;}function _0x58b3(){var _0x2a5641=['To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','15099230EsNWVf','46191DeJMEb','4Bgltnx','1096ilRfqP','14VtiVhf','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','AZaJI','3279924LXQsOw','401254MXtrPY','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','2275390zyFXtr','995346QdjaVT','IJeIb','HtokY','11788ANzpQi','WDNGG'];_0x58b3=function(){return _0x2a5641;};return _0x58b3();}export async function authEncrypt(_0x2b395d){var _0x57b57d=_0x1866,_0x193ead={'WDNGG':function(_0x45f514,_0x8bdbc){return _0x45f514+_0x8bdbc;},'IJeIb':function(_0x4aa00c,_0xb2ab25){return _0x4aa00c+_0xb2ab25;},'ytaOP':function(_0x56e27d,_0x442fbe){return _0x56e27d+_0x442fbe;},'ZhUbY':function(_0x431b57,_0x20ffb3){return _0x431b57+_0x20ffb3;},'iYDyk':_0x57b57d(0xbd),'AZaJI':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','HtokY':_0x57b57d(0xb2)};console['error'](_0x193ead[_0x57b57d(0xbc)](_0x193ead[_0x57b57d(0xb9)](_0x193ead['ytaOP'](_0x193ead['ZhUbY'](_0x57b57d(0xb6),'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a')+'\x0a'+_0x193ead['iYDyk'],_0x193ead[_0x57b57d(0xb3)]),'\x0a')+_0x193ead[_0x57b57d(0xba)],'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}
1
+ function _0x1e10(_0x18cd0a,_0x462a8b){_0x18cd0a=_0x18cd0a-0x15e;var _0x2acb8a=_0x2acb();var _0x1e107e=_0x2acb8a[_0x18cd0a];return _0x1e107e;}(function(_0xb3d41b,_0x5cc774){var _0x59e3bd=_0x1e10,_0x27f06e=_0xb3d41b();while(!![]){try{var _0x50048b=-parseInt(_0x59e3bd(0x161))/0x1+-parseInt(_0x59e3bd(0x16c))/0x2*(-parseInt(_0x59e3bd(0x16b))/0x3)+parseInt(_0x59e3bd(0x168))/0x4*(-parseInt(_0x59e3bd(0x167))/0x5)+-parseInt(_0x59e3bd(0x160))/0x6+-parseInt(_0x59e3bd(0x169))/0x7*(parseInt(_0x59e3bd(0x162))/0x8)+parseInt(_0x59e3bd(0x16d))/0x9+parseInt(_0x59e3bd(0x16a))/0xa;if(_0x50048b===_0x5cc774)break;else _0x27f06e['push'](_0x27f06e['shift']());}catch(_0x3849b2){_0x27f06e['push'](_0x27f06e['shift']());}}}(_0x2acb,0x81bd1));export async function authEncrypt(_0x2b5dab){var _0x42f787=_0x1e10,_0x13950f={'cpYIl':function(_0x291c22,_0x365469){return _0x291c22+_0x365469;},'Xbnuk':_0x42f787(0x16e),'Siayg':_0x42f787(0x164)};console['error'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x13950f['cpYIl'](_0x42f787(0x15f),_0x13950f['Xbnuk']),'\x0a'),_0x42f787(0x15e))+_0x42f787(0x163)+'\x0a',_0x13950f[_0x42f787(0x166)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x42f787(0x165)](0x1);}function _0x2acb(){var _0x43dd36=['333592LWDuaJ','1167208ANDlLd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','exit','Siayg','1204855PdHKaa','16ZutTHd','49xeNIKI','18357860KVBOUM','12972AfjZSo','402eSGEPW','5248575fCNmvp','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','2627358IAAhvl'];_0x2acb=function(){return _0x43dd36;};return _0x2acb();}
@@ -1 +1 @@
1
- const _0x36ed98=_0x5737;(function(_0x7d9abf,_0x273471){const _0x44a15c=_0x5737,_0x3bcbf1=_0x7d9abf();while(!![]){try{const _0x5f7595=-parseInt(_0x44a15c(0xfc))/0x1+-parseInt(_0x44a15c(0xd5))/0x2*(parseInt(_0x44a15c(0xf2))/0x3)+parseInt(_0x44a15c(0xef))/0x4+parseInt(_0x44a15c(0xcb))/0x5+-parseInt(_0x44a15c(0xd1))/0x6+-parseInt(_0x44a15c(0xc7))/0x7*(-parseInt(_0x44a15c(0xf3))/0x8)+parseInt(_0x44a15c(0xd8))/0x9*(parseInt(_0x44a15c(0xe6))/0xa);if(_0x5f7595===_0x273471)break;else _0x3bcbf1['push'](_0x3bcbf1['shift']());}catch(_0x28875b){_0x3bcbf1['push'](_0x3bcbf1['shift']());}}}(_0x4af0,0x27f2c));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';function _0x5737(_0xc35715,_0x5d0fcf){_0xc35715=_0xc35715-0xc6;const _0x4af00a=_0x4af0();let _0x573778=_0x4af00a[_0xc35715];return _0x573778;}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x36ed98(0xea),_0x36ed98(0xf5),_0x36ed98(0xe2),_0x36ed98(0xd4)],opencodePluginName='@ranger-testing/opencode-plugin';function _0x4af0(){const _0x7391fb=['EQMIv','✓\x20Removed\x20project\x20skill:\x20','93464DCfQhC','✓\x20Removed\x20stored\x20credentials','TbvGu','7hXYIkw','WaTTz','replace','close','1481565jZZqLp','Nothing\x20to\x20clean\x20up.\x0a','win32','platform','IPqDD','Alucy','1960506PsVvVd','ZykeJ','ranger@trailhead','e2e-test-recommender','6bifCdd','opencode.json','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','9AeFwBR','dezto','project','plugin','SrJAg','DcGFh','tNTzA','tWUDC','jeqbN','utf-8','bug-bash','remove','uqcvO','fUcum','2560210aqBTJY','✓\x20Removed\x20trailhead\x20marketplace','length','user','ranger','gxlbG','push','ZUddE','✓\x20Removed\x20user\x20skill:\x20','797768AZDDHa','zjnfg','xnwrH','242106dIkaeQ','593384WPRnAe','isArray','feature-tracker','ignore','log','lFxKx','--scope'];_0x4af0=function(){return _0x7391fb;};return _0x4af0();}function parseJsonc(_0x2bb4d4){const _0x2d649d=_0x36ed98,_0x499eaa=_0x2bb4d4[_0x2d649d(0xc9)](/\/\*[\s\S]*?\*\//g,''),_0x1ec0b1=_0x499eaa['replace'](/^\s*\/\/.*$/gm,''),_0x54c24b=_0x1ec0b1[_0x2d649d(0xc9)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x54c24b);}async function removeOpencodePluginConfig(_0x527fac){const _0x5b0240=_0x36ed98,_0x3acb32={'tzhSU':function(_0x5005cc,_0x3856db){return _0x5005cc!==_0x3856db;},'ZykeJ':function(_0x35cc09,_0xec2971){return _0x35cc09!==_0xec2971;},'TEsKZ':function(_0x2ca3cf,_0x5bf1d7){return _0x2ca3cf(_0x5bf1d7);},'IMjIa':function(_0x54395c,_0xd5963d,_0x1c381f){return _0x54395c(_0xd5963d,_0x1c381f);},'BTlHZ':_0x5b0240(0xe1),'cRVWp':function(_0x113873,_0x5523c0){return _0x113873===_0x5523c0;},'WaTTz':function(_0x566e26,_0x3305e0){return _0x566e26+_0x3305e0;}};if(!_0x3acb32['TEsKZ'](existsSync,_0x527fac))return![];let _0x48e7c8;try{const _0x4e04e7=await _0x3acb32['IMjIa'](readFile,_0x527fac,_0x3acb32['BTlHZ']);_0x48e7c8=parseJsonc(_0x4e04e7);}catch{return![];}const _0x4b18cc=Array[_0x5b0240(0xf4)](_0x48e7c8['plugin'])?_0x48e7c8[_0x5b0240(0xdb)]:[];if(_0x3acb32['cRVWp'](_0x4b18cc[_0x5b0240(0xe8)],0x0))return![];const _0x2c9381=_0x4b18cc['filter'](_0x36b0c3=>{const _0x452caf=_0x5b0240;if(_0x3acb32['tzhSU'](typeof _0x36b0c3,'string'))return!![];return _0x3acb32[_0x452caf(0xd2)](_0x36b0c3,opencodePluginName);});if(_0x2c9381[_0x5b0240(0xe8)]===_0x4b18cc['length'])return![];return _0x2c9381['length']===0x0?delete _0x48e7c8[_0x5b0240(0xdb)]:_0x48e7c8['plugin']=_0x2c9381,await writeFile(_0x527fac,_0x3acb32[_0x5b0240(0xc8)](JSON['stringify'](_0x48e7c8,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x1ccf74){const _0x249bcc=_0x36ed98,_0x7fc86e={'tNTzA':function(_0x1a5a17,_0xf01508){return _0x1a5a17===_0xf01508;},'KDjzf':'uninstall','SrJAg':_0x249bcc(0xf9),'bEcbC':'error'};return new Promise(_0x58acc8=>{const _0x75f429=_0x249bcc,_0x308d1f={'UUghM':function(_0x4fe115,_0x43d29c){const _0x40a8bb=_0x5737;return _0x7fc86e[_0x40a8bb(0xde)](_0x4fe115,_0x43d29c);},'IPqDD':function(_0x4f86e2,_0x2b2693){return _0x4f86e2(_0x2b2693);}},_0x45477a=[_0x75f429(0xdb),_0x7fc86e['KDjzf'],_0x75f429(0xd3)];_0x1ccf74&&_0x45477a[_0x75f429(0xec)](_0x7fc86e[_0x75f429(0xdc)],_0x1ccf74);const _0x1732c0=spawn('claude',_0x45477a,{'stdio':['ignore','ignore',_0x75f429(0xf6)],'cwd':_0x1ccf74?getProjectRoot():undefined,'shell':process[_0x75f429(0xce)]==='win32'});_0x1732c0['on'](_0x75f429(0xca),_0x4b0ceb=>{_0x58acc8(_0x308d1f['UUghM'](_0x4b0ceb,0x0));}),_0x1732c0['on'](_0x7fc86e['bEcbC'],()=>{const _0x1046b9=_0x75f429;_0x308d1f[_0x1046b9(0xcf)](_0x58acc8,![]);});});}async function removeMarketplace(){const _0x183841=_0x36ed98,_0x5e33a1={'XvKOa':function(_0x5b7a49,_0x3d0f92){return _0x5b7a49(_0x3d0f92);},'xnwrH':function(_0x535c48,_0x11ab89){return _0x535c48===_0x11ab89;},'EQMIv':function(_0xbd40e3,_0x2ec599){return _0xbd40e3(_0x2ec599);},'ZUddE':function(_0xa03f95,_0x2b7eac,_0x14208a,_0x3afc61){return _0xa03f95(_0x2b7eac,_0x14208a,_0x3afc61);},'mTCAP':'plugin','IUKux':_0x183841(0xe3),'DcGFh':'ignore','dezto':_0x183841(0xcd),'Zooto':'close','fkmVz':'error'};return new Promise(_0x443c9b=>{const _0x366cfd=_0x183841,_0x296756=_0x5e33a1[_0x366cfd(0xed)](spawn,'claude',[_0x5e33a1['mTCAP'],'marketplace',_0x5e33a1['IUKux'],'trailhead'],{'stdio':[_0x5e33a1['DcGFh'],_0x5e33a1[_0x366cfd(0xdd)],_0x366cfd(0xf6)],'shell':_0x5e33a1[_0x366cfd(0xf1)](process['platform'],_0x5e33a1[_0x366cfd(0xd9)])});_0x296756['on'](_0x5e33a1['Zooto'],_0x229025=>{const _0x964bf7=_0x366cfd;_0x5e33a1['XvKOa'](_0x443c9b,_0x5e33a1[_0x964bf7(0xf1)](_0x229025,0x0));}),_0x296756['on'](_0x5e33a1['fkmVz'],()=>{const _0x5a767f=_0x366cfd;_0x5e33a1[_0x5a767f(0xfa)](_0x443c9b,![]);});});}export async function clean(){const _0x445a36=_0x36ed98,_0xbca04f={'FRuCK':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','UKprB':function(_0x189067){return _0x189067();},'fUcum':_0x445a36(0xfd),'zjnfg':function(_0x52db82,_0x152931){return _0x52db82(_0x152931);},'tWUDC':function(_0x23a602,_0x58fd03,_0x31724f){return _0x23a602(_0x58fd03,_0x31724f);},'uqcvO':function(_0xea6441,_0x29fc85){return _0xea6441(_0x29fc85);},'jeqbN':_0x445a36(0xda),'Alucy':function(_0x387d65,_0x209695){return _0x387d65(_0x209695);},'lFxKx':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','jMgqQ':_0x445a36(0xe9),'gxlbG':_0x445a36(0xe7),'TbvGu':'\x0a✅\x20Cleanup\x20complete!\x0a','OqeYn':_0x445a36(0xcc)};console[_0x445a36(0xf7)](_0xbca04f['FRuCK']);let _0x2ee520=![];try{await _0xbca04f['UKprB'](deleteAllCredentials),console[_0x445a36(0xf7)](_0xbca04f[_0x445a36(0xe5)]),_0x2ee520=!![];}catch{}const _0x1b8cc4=getCacheFile();_0xbca04f[_0x445a36(0xf0)](existsSync,_0x1b8cc4)&&(await rm(_0x1b8cc4),_0x2ee520=!![]);const _0x386a5c=getRangerDir();existsSync(_0x386a5c)&&(await rm(_0x386a5c,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x2ee520=!![]);const _0x190d41=getProjectSkillsDir();for(const _0x297dd7 of skillsToRemove){const _0x52a768=_0xbca04f[_0x445a36(0xdf)](join,_0x190d41,_0x297dd7);_0xbca04f['uqcvO'](existsSync,_0x52a768)&&(await rm(_0x52a768,{'recursive':!![]}),console['log'](_0x445a36(0xfb)+_0x297dd7),_0x2ee520=!![]);}const _0x114767=getUserSkillsDir();for(const _0x499de6 of skillsToRemove){const _0x29da61=_0xbca04f[_0x445a36(0xdf)](join,_0x114767,_0x499de6);_0xbca04f[_0x445a36(0xe4)](existsSync,_0x29da61)&&(await rm(_0x29da61,{'recursive':!![]}),console['log'](_0x445a36(0xee)+_0x499de6),_0x2ee520=!![]);}const _0x3182be=getOpencodeSkillsDir(_0x445a36(0xda));for(const _0x2e3108 of skillsToRemove){const _0x311a56=join(_0x3182be,_0x2e3108);existsSync(_0x311a56)&&(await _0xbca04f[_0x445a36(0xdf)](rm,_0x311a56,{'recursive':!![]}),console[_0x445a36(0xf7)](_0x445a36(0xd7)+_0x2e3108),_0x2ee520=!![]);}const _0x11f75e=getOpencodeSkillsDir(_0x445a36(0xe9));for(const _0x2f6538 of skillsToRemove){const _0x47a90f=join(_0x11f75e,_0x2f6538);existsSync(_0x47a90f)&&(await rm(_0x47a90f,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x2f6538),_0x2ee520=!![]);}const _0x158242=join(getOpencodeConfigDir(_0xbca04f[_0x445a36(0xe0)]),_0x445a36(0xd6));await _0xbca04f[_0x445a36(0xd0)](removeOpencodePluginConfig,_0x158242)&&(console['log'](_0xbca04f[_0x445a36(0xf8)]),_0x2ee520=!![]);const _0x5557bb=join(getOpencodeConfigDir(_0xbca04f['jMgqQ']),'opencode.json');await removeOpencodePluginConfig(_0x5557bb)&&(console[_0x445a36(0xf7)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x2ee520=!![]);const _0x9df66f=await uninstallClaudePlugin();_0x9df66f&&(console[_0x445a36(0xf7)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x2ee520=!![]);const _0x29d778=await _0xbca04f[_0x445a36(0xe4)](uninstallClaudePlugin,'project');_0x29d778&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x2ee520=!![]);const _0x14401a=await _0xbca04f['UKprB'](removeMarketplace);_0x14401a&&(console[_0x445a36(0xf7)](_0xbca04f[_0x445a36(0xeb)]),_0x2ee520=!![]),_0x2ee520?console[_0x445a36(0xf7)](_0xbca04f[_0x445a36(0xc6)]):console[_0x445a36(0xf7)](_0xbca04f['OqeYn']);}
1
+ (function(_0x4dfd52,_0x8515cf){const _0x5a1813=_0x9fa4,_0x4b3fb9=_0x4dfd52();while(!![]){try{const _0x470e2c=-parseInt(_0x5a1813(0x1d9))/0x1*(-parseInt(_0x5a1813(0x1c7))/0x2)+-parseInt(_0x5a1813(0x1c8))/0x3*(parseInt(_0x5a1813(0x1ad))/0x4)+-parseInt(_0x5a1813(0x1c6))/0x5*(parseInt(_0x5a1813(0x1be))/0x6)+parseInt(_0x5a1813(0x1bd))/0x7+-parseInt(_0x5a1813(0x1b5))/0x8+parseInt(_0x5a1813(0x1ae))/0x9*(parseInt(_0x5a1813(0x1a7))/0xa)+parseInt(_0x5a1813(0x1ab))/0xb*(parseInt(_0x5a1813(0x1c9))/0xc);if(_0x470e2c===_0x8515cf)break;else _0x4b3fb9['push'](_0x4b3fb9['shift']());}catch(_0xf90326){_0x4b3fb9['push'](_0x4b3fb9['shift']());}}}(_0x5c61,0xc1525));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';function _0x5c61(){const _0xbebbd4=['UaqcO','zARAO','error','PSdBn','remove','xyfxg','DGIXa','cEAFE','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','length','user','OSKhN','adGmh','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','xsJEJ','1010034VquIZV','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','peMni','wRIlp','\x0a✅\x20Cleanup\x20complete!\x0a','uVLqx','marketplace','310zJnfUC','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','ZBjsI','iXBow','5275083EsZPxh','oVhcs','1671212sVHtCV','288873wxNKXq','log','uqRJg','YOLGN','replace','parse','win32','8864520CpOIZB','TJTiV','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','dpjLE','ignore','✓\x20Removed\x20user\x20skill:\x20','opencode.json','close','3658361UJIoZA','15978kJzTpE','platform','string','RCdAK','plugin','✓\x20Removed\x20project\x20skill:\x20','XiOGD','claude','2195RBoryT','2KwOJcQ','3eMrzpD','24KJPlXh'];_0x5c61=function(){return _0xbebbd4;};return _0x5c61();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function _0x9fa4(_0x8c189c,_0x55fd4f){_0x8c189c=_0x8c189c-0x1a6;const _0x5c61cb=_0x5c61();let _0x9fa472=_0x5c61cb[_0x8c189c];return _0x9fa472;}function parseJsonc(_0x43eafd){const _0x4f60ff=_0x9fa4,_0xefcb42=_0x43eafd['replace'](/\/\*[\s\S]*?\*\//g,''),_0x27a80f=_0xefcb42[_0x4f60ff(0x1b2)](/^\s*\/\/.*$/gm,''),_0x4513a6=_0x27a80f['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4f60ff(0x1b3)](_0x4513a6);}async function removeOpencodePluginConfig(_0x4a2c49){const _0x408afc=_0x9fa4,_0x1b0fba={'DGIXa':function(_0xe667,_0x2f1b75){return _0xe667!==_0x2f1b75;},'dpjLE':function(_0x4e5492,_0xfe1866){return _0x4e5492(_0xfe1866);},'hiKJD':function(_0x123d26,_0x1ce9c6){return _0x123d26(_0x1ce9c6);},'nKPrp':function(_0x45df29,_0xd24fcc){return _0x45df29===_0xd24fcc;},'lLJif':function(_0x4dd58c,_0x5bb849){return _0x4dd58c===_0x5bb849;},'UaqcO':function(_0x3cad83,_0x4ef5c7){return _0x3cad83===_0x4ef5c7;},'QyXjm':function(_0x37fdc0,_0x535028,_0x1f74b1){return _0x37fdc0(_0x535028,_0x1f74b1);},'uVLqx':function(_0x576515,_0x331f09){return _0x576515+_0x331f09;}};if(!_0x1b0fba[_0x408afc(0x1b8)](existsSync,_0x4a2c49))return![];let _0x6c0b19;try{const _0x497445=await readFile(_0x4a2c49,'utf-8');_0x6c0b19=_0x1b0fba['hiKJD'](parseJsonc,_0x497445);}catch{return![];}const _0x49b3c5=Array['isArray'](_0x6c0b19['plugin'])?_0x6c0b19['plugin']:[];if(_0x1b0fba['nKPrp'](_0x49b3c5[_0x408afc(0x1d3)],0x0))return![];const _0x2a6203=_0x49b3c5['filter'](_0x3fafd0=>{const _0xea048f=_0x408afc;if(_0x1b0fba[_0xea048f(0x1d0)](typeof _0x3fafd0,_0xea048f(0x1c0)))return!![];return _0x1b0fba[_0xea048f(0x1d0)](_0x3fafd0,opencodePluginName);});if(_0x1b0fba['lLJif'](_0x2a6203[_0x408afc(0x1d3)],_0x49b3c5[_0x408afc(0x1d3)]))return![];return _0x1b0fba[_0x408afc(0x1ca)](_0x2a6203[_0x408afc(0x1d3)],0x0)?delete _0x6c0b19[_0x408afc(0x1c2)]:_0x6c0b19[_0x408afc(0x1c2)]=_0x2a6203,await _0x1b0fba['QyXjm'](writeFile,_0x4a2c49,_0x1b0fba[_0x408afc(0x1de)](JSON['stringify'](_0x6c0b19,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x53e366){const _0x1fe935=_0x9fa4,_0x34242a={'yBGXk':function(_0x508e40,_0x4313be){return _0x508e40(_0x4313be);},'RCdAK':function(_0x32da71,_0x41917e){return _0x32da71===_0x41917e;},'zyftm':'uninstall','YwPWK':function(_0x2a023b,_0x9d97b7,_0x30a4fc,_0x27178b){return _0x2a023b(_0x9d97b7,_0x30a4fc,_0x27178b);},'webdP':'ignore','gdoZk':function(_0x26c181){return _0x26c181();},'uQptD':_0x1fe935(0x1cc)};return new Promise(_0x1eeff2=>{const _0x5c56ed=_0x1fe935,_0x1dbb3a={'adGmh':function(_0x10d434,_0x456edf){return _0x10d434(_0x456edf);},'MnwiP':function(_0xd84849,_0x4bec8c){const _0xd49cc9=_0x9fa4;return _0x34242a[_0xd49cc9(0x1c1)](_0xd84849,_0x4bec8c);}},_0x5d2670=[_0x5c56ed(0x1c2),_0x34242a['zyftm'],'ranger@trailhead'];_0x53e366&&_0x5d2670['push']('--scope',_0x53e366);const _0x12438a=_0x34242a['YwPWK'](spawn,'claude',_0x5d2670,{'stdio':[_0x34242a['webdP'],'ignore','ignore'],'cwd':_0x53e366?_0x34242a['gdoZk'](getProjectRoot):undefined,'shell':process['platform']==='win32'});_0x12438a['on']('close',_0x49c6e5=>{const _0x5c88ed=_0x5c56ed;_0x1dbb3a[_0x5c88ed(0x1d6)](_0x1eeff2,_0x1dbb3a['MnwiP'](_0x49c6e5,0x0));}),_0x12438a['on'](_0x34242a['uQptD'],()=>{_0x34242a['yBGXk'](_0x1eeff2,![]);});});}async function removeMarketplace(){const _0x40ca42=_0x9fa4,_0xcc1da0={'BEJxv':function(_0x1f7547,_0x5a9b2e){return _0x1f7547===_0x5a9b2e;},'FYUcU':function(_0x18a8ba,_0x32d243,_0x3dd5d0,_0x53adfc){return _0x18a8ba(_0x32d243,_0x3dd5d0,_0x53adfc);},'OSKhN':_0x40ca42(0x1a6),'peMni':'ignore','TJTiV':_0x40ca42(0x1b4),'ZBjsI':_0x40ca42(0x1bc)};return new Promise(_0x63d25a=>{const _0x45ded3=_0x40ca42,_0x3de593=_0xcc1da0['FYUcU'](spawn,_0x45ded3(0x1c5),['plugin',_0xcc1da0[_0x45ded3(0x1d5)],_0x45ded3(0x1ce),'trailhead'],{'stdio':[_0x45ded3(0x1b9),_0xcc1da0[_0x45ded3(0x1db)],_0x45ded3(0x1b9)],'shell':process[_0x45ded3(0x1bf)]===_0xcc1da0[_0x45ded3(0x1b6)]});_0x3de593['on'](_0xcc1da0[_0x45ded3(0x1a9)],_0x12f78a=>{_0x63d25a(_0xcc1da0['BEJxv'](_0x12f78a,0x0));}),_0x3de593['on']('error',()=>{_0x63d25a(![]);});});}export async function clean(){const _0x7fa845=_0x9fa4,_0x7593ba={'XiOGD':_0x7fa845(0x1da),'xyfxg':function(_0x128f35){return _0x128f35();},'wCecC':function(_0x66943c,_0x21c3eb){return _0x66943c(_0x21c3eb);},'iXBow':function(_0x106e7f,_0x4110ff,_0x34bdff){return _0x106e7f(_0x4110ff,_0x34bdff);},'cEAFE':'✓\x20Removed\x20.ranger/\x20directory','zARAO':function(_0x10abe5){return _0x10abe5();},'PSdBn':function(_0x21680d,_0x4c40ae,_0x134b99){return _0x21680d(_0x4c40ae,_0x134b99);},'YOLGN':function(_0x4ff34c,_0x320076){return _0x4ff34c(_0x320076);},'wRIlp':function(_0x106b02,_0x3b3e9a){return _0x106b02(_0x3b3e9a);},'uqRJg':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','xsJEJ':function(_0x5dd748){return _0x5dd748();},'oVhcs':_0x7fa845(0x1d7),'umUOg':_0x7fa845(0x1dd)};console[_0x7fa845(0x1af)](_0x7593ba[_0x7fa845(0x1c4)]);let _0xa0d05b=![];try{await _0x7593ba[_0x7fa845(0x1cf)](deleteAllCredentials),console[_0x7fa845(0x1af)]('✓\x20Removed\x20stored\x20credentials'),_0xa0d05b=!![];}catch{}const _0x531e71=_0x7593ba['xyfxg'](getCacheFile);existsSync(_0x531e71)&&(await rm(_0x531e71),_0xa0d05b=!![]);const _0x2f9cb2=getRangerDir();_0x7593ba['wCecC'](existsSync,_0x2f9cb2)&&(await _0x7593ba['iXBow'](rm,_0x2f9cb2,{'recursive':!![]}),console['log'](_0x7593ba[_0x7fa845(0x1d1)]),_0xa0d05b=!![]);const _0x4b76e4=_0x7593ba[_0x7fa845(0x1cb)](getProjectSkillsDir);for(const _0xad3502 of skillsToRemove){const _0x8d151=_0x7593ba[_0x7fa845(0x1aa)](join,_0x4b76e4,_0xad3502);_0x7593ba['wCecC'](existsSync,_0x8d151)&&(await rm(_0x8d151,{'recursive':!![]}),console[_0x7fa845(0x1af)](_0x7fa845(0x1c3)+_0xad3502),_0xa0d05b=!![]);}const _0x58da3b=getUserSkillsDir();for(const _0x2285f0 of skillsToRemove){const _0x2db5ee=_0x7593ba['PSdBn'](join,_0x58da3b,_0x2285f0);_0x7593ba[_0x7fa845(0x1b1)](existsSync,_0x2db5ee)&&(await rm(_0x2db5ee,{'recursive':!![]}),console['log'](_0x7fa845(0x1ba)+_0x2285f0),_0xa0d05b=!![]);}const _0x25874f=_0x7593ba['wCecC'](getOpencodeSkillsDir,'project');for(const _0x49e9e8 of skillsToRemove){const _0x4ec488=join(_0x25874f,_0x49e9e8);existsSync(_0x4ec488)&&(await rm(_0x4ec488,{'recursive':!![]}),console['log'](_0x7fa845(0x1d2)+_0x49e9e8),_0xa0d05b=!![]);}const _0x285168=getOpencodeSkillsDir(_0x7fa845(0x1d4));for(const _0x5abf1d of skillsToRemove){const _0x31c16a=join(_0x285168,_0x5abf1d);_0x7593ba['wCecC'](existsSync,_0x31c16a)&&(await rm(_0x31c16a,{'recursive':!![]}),console[_0x7fa845(0x1af)](_0x7fa845(0x1a8)+_0x5abf1d),_0xa0d05b=!![]);}const _0x3c5f8e=_0x7593ba[_0x7fa845(0x1cd)](join,getOpencodeConfigDir('project'),_0x7fa845(0x1bb));await removeOpencodePluginConfig(_0x3c5f8e)&&(console[_0x7fa845(0x1af)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0xa0d05b=!![]);const _0xc5fb57=join(getOpencodeConfigDir(_0x7fa845(0x1d4)),_0x7fa845(0x1bb));await _0x7593ba[_0x7fa845(0x1dc)](removeOpencodePluginConfig,_0xc5fb57)&&(console[_0x7fa845(0x1af)](_0x7593ba[_0x7fa845(0x1b0)]),_0xa0d05b=!![]);const _0x3883f9=await _0x7593ba[_0x7fa845(0x1d8)](uninstallClaudePlugin);_0x3883f9&&(console['log'](_0x7593ba[_0x7fa845(0x1ac)]),_0xa0d05b=!![]);const _0x287298=await _0x7593ba[_0x7fa845(0x1b1)](uninstallClaudePlugin,'project');_0x287298&&(console[_0x7fa845(0x1af)](_0x7fa845(0x1b7)),_0xa0d05b=!![]);const _0x1716aa=await removeMarketplace();_0x1716aa&&(console[_0x7fa845(0x1af)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xa0d05b=!![]),_0xa0d05b?console['log'](_0x7593ba['umUOg']):console[_0x7fa845(0x1af)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- const _0x4c879c=_0x2346;(function(_0x27f5b3,_0x930e19){const _0x549015=_0x2346,_0x16abdc=_0x27f5b3();while(!![]){try{const _0x22991e=parseInt(_0x549015(0x143))/0x1*(parseInt(_0x549015(0x175))/0x2)+-parseInt(_0x549015(0x174))/0x3*(-parseInt(_0x549015(0x158))/0x4)+parseInt(_0x549015(0x170))/0x5+parseInt(_0x549015(0x150))/0x6*(parseInt(_0x549015(0x172))/0x7)+parseInt(_0x549015(0x176))/0x8+-parseInt(_0x549015(0x17a))/0x9*(-parseInt(_0x549015(0x161))/0xa)+-parseInt(_0x549015(0x162))/0xb;if(_0x22991e===_0x930e19)break;else _0x16abdc['push'](_0x16abdc['shift']());}catch(_0x17f284){_0x16abdc['push'](_0x16abdc['shift']());}}}(_0x2b8d,0xd399c));import{existsSync}from'fs';function _0x2b8d(){const _0x2df6fb=['12vxXFjS','246338lvuoPD','9904424DnIDdh','\x20for\x20\x22','Key\x20\x22','aKiCW','15309YpJySS','parse','13sFMogs','keys','iXmHI','isSafeInteger','WRpko','No\x20configuration\x20set\x20for\x20\x22','yhnOq','pvHKA','(not\x20set)','VxMNE','Invalid\x20value\x20for\x20','true','YvhsT','6594eNbydh','QSQEk','kind','\x20=\x20','Cleared\x20local\x20overrides\x20for\x20\x22','undefined','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','WjUsn','803888ZzsgSB','trim','eRvvp','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','vHMGI','KhWNj','EwBov','local','lcvaA','8790PpBCwF','61944454efOVGH','includes','endsWith','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','isNaN','ZjfiR','cloud','headless','ccSEQ','stringify','bCVqT','log','Set\x20','startsWith','2913600JTfVvP','hkoeX','4949VSuBMd','itVuh'];_0x2b8d=function(){return _0x2df6fb;};return _0x2b8d();}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x4c879c(0x169),'allowInsecureLocalhost'];function parseLocalValue(_0xdb1e01,_0x84b113){const _0x356fef=_0x4c879c,_0x309bf3={'NRztx':function(_0x5e2b90,_0x1e09c0){return _0x5e2b90===_0x1e09c0;}};if(BOOLEAN_KEYS[_0x356fef(0x163)](_0xdb1e01)){if(_0x84b113===_0x356fef(0x14e))return!![];if(_0x309bf3['NRztx'](_0x84b113,'false'))return![];throw new Error(_0x356fef(0x14d)+_0xdb1e01+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x84b113;}function parseOverrideValue(_0x4f0ca2){const _0x552644=_0x4c879c,_0x5d1875={'bCVqT':function(_0x1a19ce,_0x31709e){return _0x1a19ce===_0x31709e;},'WjUsn':'false','VxMNE':function(_0x5eef09,_0x3de23d){return _0x5eef09===_0x3de23d;},'ewYQV':function(_0x8c9a59,_0x475a5f){return _0x8c9a59===_0x475a5f;},'eRvvp':function(_0xb9d3bf,_0x4a67eb){return _0xb9d3bf(_0x4a67eb);},'wNQzF':function(_0xfee003,_0x19c713){return _0xfee003(_0x19c713);}};if(_0x4f0ca2==='true')return!![];if(_0x5d1875[_0x552644(0x16c)](_0x4f0ca2,_0x5d1875[_0x552644(0x157)]))return![];if(_0x5d1875[_0x552644(0x14c)](_0x4f0ca2,'null'))return null;if(_0x5d1875['ewYQV'](_0x4f0ca2,_0x552644(0x155)))return undefined;if(/^-?\d+$/['test'](_0x4f0ca2)){const _0x5cb9c3=_0x5d1875[_0x552644(0x15a)](Number,_0x4f0ca2);if(Number[_0x552644(0x146)](_0x5cb9c3))return _0x5cb9c3;}if(/^-?\d+\.\d+$/['test'](_0x4f0ca2)){const _0x4cdccb=_0x5d1875['wNQzF'](Number,_0x4f0ca2);if(!Number[_0x552644(0x166)](_0x4cdccb))return _0x4cdccb;}const _0x25f954=_0x4f0ca2[_0x552644(0x159)]();if(_0x25f954[_0x552644(0x16f)]('{')&&_0x25f954['endsWith']('}')||_0x25f954['startsWith']('[')&&_0x25f954[_0x552644(0x164)](']'))try{return JSON[_0x552644(0x142)](_0x25f954);}catch{}return _0x4f0ca2;}async function resolveProfileTarget(_0x4ad199){const _0x4fbd9b=_0x4c879c,_0x4d16b8={'aKiCW':function(_0x3f7f8b,_0xf88645){return _0x3f7f8b(_0xf88645);}},_0x2a48a2=existsSync(getEnvDir(_0x4ad199));let _0x62a20=![];try{const _0x3292be=await _0x4d16b8['aKiCW'](fetchCloudProfile,_0x4ad199);_0x62a20=_0x4d16b8[_0x4fbd9b(0x179)](Boolean,_0x3292be);}catch{}if(_0x62a20)return{'kind':'cloud','alsoExistsElsewhere':_0x2a48a2};if(_0x2a48a2)return{'kind':_0x4fbd9b(0x15f),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x4ad199+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4ad199);}function printDualExistsHint(_0x25c23f){const _0xc049e2=_0x4c879c;console[_0xc049e2(0x16d)]('\x20\x20Note:\x20\x22'+_0x25c23f+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}function _0x2346(_0x4f57b0,_0x2e025b){_0x4f57b0=_0x4f57b0-0x142;const _0x2b8d3c=_0x2b8d();let _0x23465f=_0x2b8d3c[_0x4f57b0];return _0x23465f;}async function loadEffectiveCloudSettings(_0x4ec26b){const _0x24163f=_0x4c879c,_0x32821e={'vHMGI':function(_0xf7fa88,_0x6538d5){return _0xf7fa88(_0x6538d5);},'Nmhzn':function(_0x3ae1b4,_0x426f55,_0x221c51){return _0x3ae1b4(_0x426f55,_0x221c51);},'CYrdT':function(_0xbaed83,_0xd1d1fc,_0x1548a0){return _0xbaed83(_0xd1d1fc,_0x1548a0);},'nUVWZ':function(_0x5418a2,_0x5b59aa){return _0x5418a2??_0x5b59aa;}},_0x3e1676=await _0x32821e[_0x24163f(0x15c)](fetchCloudProfile,_0x4ec26b),_0x527097=_0x32821e['Nmhzn'](readProfileOverrides,getProjectPath(),_0x4ec26b);return _0x32821e['CYrdT'](mergeCloudProfileSettings,_0x3e1676?.['settings']??{},_0x32821e['nUVWZ'](_0x527097,undefined));}export async function configSet(_0x3fad5d,_0x41be71,_0x402e71){const _0xbeb74a=_0x4c879c,_0x43057c={'hkoeX':function(_0x24f3fb,_0x269e48){return _0x24f3fb(_0x269e48);},'EwBov':function(_0x29517c,_0x399c6b){return _0x29517c(_0x399c6b);},'QSQEk':function(_0x50e10e,_0x299e42,_0x2babb2,_0x494873,_0x32c992){return _0x50e10e(_0x299e42,_0x2babb2,_0x494873,_0x32c992);},'QROna':function(_0x287836,_0x1eb084,_0xdfd906){return _0x287836(_0x1eb084,_0xdfd906);},'itVuh':function(_0xadd797){return _0xadd797();}},_0x795d18=await _0x43057c[_0xbeb74a(0x171)](resolveProfileTarget,_0x3fad5d);if(_0x795d18['kind']==='cloud'){if(_0x795d18['alsoExistsElsewhere'])_0x43057c[_0xbeb74a(0x15e)](printDualExistsHint,_0x3fad5d);const _0x5d9739=parseOverrideValue(_0x402e71);_0x43057c[_0xbeb74a(0x151)](setProfileOverride,getProjectPath(),_0x3fad5d,_0x41be71,_0x5d9739),console[_0xbeb74a(0x16d)](_0xbeb74a(0x16e)+_0x41be71+_0xbeb74a(0x153)+JSON[_0xbeb74a(0x16b)](_0x5d9739)+'\x20for\x20\x22'+_0x3fad5d+'\x22');return;}const _0x519a0a=_0x43057c['QROna'](parseLocalValue,_0x41be71,_0x402e71);setProfileOverride(_0x43057c[_0xbeb74a(0x173)](getProjectPath),_0x3fad5d,_0x41be71,_0x519a0a),console[_0xbeb74a(0x16d)](_0xbeb74a(0x16e)+_0x41be71+'\x20=\x20'+_0x519a0a+'\x20for\x20\x22'+_0x3fad5d+'\x22');}export async function configGet(_0x27e136,_0x405b62){const _0x343911=_0x4c879c,_0xa2aa5d={'pvHKA':'cloud','yhnOq':function(_0x407292,_0x3c1560,_0x5bf834){return _0x407292(_0x3c1560,_0x5bf834);},'qyFek':function(_0x943e68,_0x970b33){return _0x943e68===_0x970b33;},'YvhsT':'object','lcvaA':function(_0x327008,_0x1dbbcb){return _0x327008(_0x1dbbcb);}},_0x33fc86=await resolveProfileTarget(_0x27e136);if(_0x33fc86['kind']===_0xa2aa5d[_0x343911(0x14a)]){const _0xf0866=await loadEffectiveCloudSettings(_0x27e136),_0x10de2b=_0xa2aa5d[_0x343911(0x149)](getNestedValue,_0xf0866,_0x405b62);if(_0xa2aa5d['qyFek'](_0x10de2b,undefined))console[_0x343911(0x16d)](_0x343911(0x14b));else typeof _0x10de2b===_0xa2aa5d[_0x343911(0x14f)]?console['log'](JSON[_0x343911(0x16b)](_0x10de2b,null,0x2)):console['log'](_0x10de2b);return;}const _0x302fa0=await _0xa2aa5d[_0x343911(0x160)](loadSettings,_0x27e136),_0x227f18=_0xa2aa5d['yhnOq'](getNestedValue,_0x302fa0,_0x405b62);if(_0x227f18===undefined)console[_0x343911(0x16d)](_0x343911(0x14b));else typeof _0x227f18===_0xa2aa5d[_0x343911(0x14f)]?console[_0x343911(0x16d)](JSON['stringify'](_0x227f18,null,0x2)):console[_0x343911(0x16d)](_0x227f18);}export async function configList(_0x25fa05){const _0x44f60c=_0x4c879c,_0x4969ef={'ZjfiR':function(_0x38b00c,_0x2ce628){return _0x38b00c===_0x2ce628;},'aiFop':function(_0x3fb5d3,_0x1c7416){return _0x3fb5d3(_0x1c7416);},'ccSEQ':function(_0x218ab9,_0x13c1f1){return _0x218ab9(_0x13c1f1);},'FZDdG':function(_0x28f809,_0x457c24){return _0x28f809(_0x457c24);}},_0x1b45e6=await resolveProfileTarget(_0x25fa05);if(_0x4969ef['ZjfiR'](_0x1b45e6[_0x44f60c(0x152)],_0x44f60c(0x168))){const _0x5569f4=await loadEffectiveCloudSettings(_0x25fa05);if(!_0x5569f4||_0x4969ef[_0x44f60c(0x167)](Object[_0x44f60c(0x144)](_0x5569f4)['length'],0x0)){console[_0x44f60c(0x16d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x25fa05+'\x22');return;}console[_0x44f60c(0x16d)](JSON['stringify'](_0x5569f4,null,0x2));return;}const _0x3ae2a8=_0x4969ef['aiFop'](getSettingsPath,_0x25fa05);if(!_0x4969ef[_0x44f60c(0x16a)](existsSync,_0x3ae2a8)){console[_0x44f60c(0x16d)](_0x44f60c(0x148)+_0x25fa05+'\x22');return;}const _0x190f91=await _0x4969ef['FZDdG'](loadSettings,_0x25fa05),_0x59e772=formatSettings(_0x190f91);!_0x59e772?console[_0x44f60c(0x16d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x25fa05+'\x22'):console['log'](_0x59e772);}export async function configUnset(_0x38330d,_0x2ef27f){const _0x53c6fa=_0x4c879c,_0x55a5d9={'fjrmD':function(_0x46b1c4,_0x242107){return _0x46b1c4(_0x242107);},'wmCUa':'cloud','AlMkz':function(_0x4830cd){return _0x4830cd();},'KhWNj':function(_0x555785,_0x50e1e5,_0x421f7e,_0x1c6704){return _0x555785(_0x50e1e5,_0x421f7e,_0x1c6704);},'FVCof':function(_0x2d1424,_0x1bbec3,_0x140991){return _0x2d1424(_0x1bbec3,_0x140991);}},_0x38a453=await _0x55a5d9['fjrmD'](resolveProfileTarget,_0x38330d);if(_0x38a453['kind']===_0x55a5d9['wmCUa']){if(_0x38a453['alsoExistsElsewhere'])printDualExistsHint(_0x38330d);const _0x4aa3cf=unsetProfileOverride(_0x55a5d9['AlMkz'](getProjectPath),_0x38330d,_0x2ef27f);_0x4aa3cf?console[_0x53c6fa(0x16d)]('Removed\x20'+_0x2ef27f+_0x53c6fa(0x177)+_0x38330d+'\x22'):console['log'](_0x53c6fa(0x178)+_0x2ef27f+'\x22\x20not\x20found');return;}const _0x3dc188=_0x55a5d9[_0x53c6fa(0x15d)](unsetProfileOverride,getProjectPath(),_0x38330d,_0x2ef27f);if(_0x3dc188){console[_0x53c6fa(0x16d)]('Removed\x20'+_0x2ef27f);return;}const _0x592ad5=await loadSettings(_0x38330d),_0xcfe977=_0x55a5d9['FVCof'](deleteNestedValue,_0x592ad5,_0x2ef27f);_0xcfe977?console['log'](_0x53c6fa(0x178)+_0x2ef27f+_0x53c6fa(0x165)+_0x38330d+_0x53c6fa(0x15b)):console['log'](_0x53c6fa(0x178)+_0x2ef27f+'\x22\x20not\x20found');}export async function configReset(_0x297d23){const _0x274852=_0x4c879c,_0x534590={'iXmHI':_0x274852(0x168),'WRpko':function(_0x5652b8,_0x54cc8e,_0x1b357c){return _0x5652b8(_0x54cc8e,_0x1b357c);},'yXFeM':function(_0x389e1e){return _0x389e1e();}},_0x5cae93=await resolveProfileTarget(_0x297d23);if(_0x5cae93['kind']===_0x534590[_0x274852(0x145)]){_0x534590[_0x274852(0x147)](resetProfileOverrides,_0x534590['yXFeM'](getProjectPath),_0x297d23),console['log'](_0x274852(0x154)+_0x297d23+'\x22');return;}console['log']('\x22'+_0x297d23+_0x274852(0x156)+_0x297d23+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x174226=_0x53ac;(function(_0x548ecf,_0x262483){const _0x1ae51f=_0x53ac,_0xc4d55e=_0x548ecf();while(!![]){try{const _0x3ffb82=-parseInt(_0x1ae51f(0x1cd))/0x1+parseInt(_0x1ae51f(0x1bb))/0x2*(parseInt(_0x1ae51f(0x1d6))/0x3)+parseInt(_0x1ae51f(0x1b9))/0x4*(parseInt(_0x1ae51f(0x1d2))/0x5)+parseInt(_0x1ae51f(0x1a7))/0x6*(parseInt(_0x1ae51f(0x1d9))/0x7)+parseInt(_0x1ae51f(0x1db))/0x8+parseInt(_0x1ae51f(0x1be))/0x9+-parseInt(_0x1ae51f(0x1c6))/0xa;if(_0x3ffb82===_0x262483)break;else _0xc4d55e['push'](_0xc4d55e['shift']());}catch(_0x27025b){_0xc4d55e['push'](_0xc4d55e['shift']());}}}(_0x36ff,0x8e9e5));import{existsSync}from'fs';function _0x53ac(_0x4a602a,_0x1b3efb){_0x4a602a=_0x4a602a-0x1a5;const _0x36ff92=_0x36ff();let _0x53ac29=_0x36ff92[_0x4a602a];return _0x53ac29;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x174226(0x1ce),'forceLogin'];function parseLocalValue(_0x3de151,_0x345e4d){const _0x1f1c02=_0x174226,_0x5ecb2d={'bBwOB':_0x1f1c02(0x1b3)};if(BOOLEAN_KEYS[_0x1f1c02(0x1b1)](_0x3de151)){if(_0x345e4d===_0x5ecb2d['bBwOB'])return!![];if(_0x345e4d==='false')return![];throw new Error(_0x1f1c02(0x1cc)+_0x3de151+_0x1f1c02(0x1c7));}return _0x345e4d;}function parseOverrideValue(_0x5c17c3){const _0x2f6689=_0x174226,_0x3ca442={'gZefj':'true','lpwda':function(_0x16b091,_0x1f7ebe){return _0x16b091===_0x1f7ebe;},'HXgfC':'false','NdFPw':_0x2f6689(0x1bd),'DSUME':_0x2f6689(0x1c0),'SMfTX':function(_0x5cdf50,_0x1b2e90){return _0x5cdf50(_0x1b2e90);}};if(_0x5c17c3===_0x3ca442[_0x2f6689(0x1ac)])return!![];if(_0x3ca442[_0x2f6689(0x1ab)](_0x5c17c3,_0x3ca442['HXgfC']))return![];if(_0x3ca442[_0x2f6689(0x1ab)](_0x5c17c3,_0x3ca442['NdFPw']))return null;if(_0x3ca442['lpwda'](_0x5c17c3,_0x3ca442['DSUME']))return undefined;if(/^-?\d+$/['test'](_0x5c17c3)){const _0x1d4bea=Number(_0x5c17c3);if(Number['isSafeInteger'](_0x1d4bea))return _0x1d4bea;}if(/^-?\d+\.\d+$/['test'](_0x5c17c3)){const _0x5e3c59=_0x3ca442[_0x2f6689(0x1a8)](Number,_0x5c17c3);if(!Number[_0x2f6689(0x1bc)](_0x5e3c59))return _0x5e3c59;}const _0x87aa35=_0x5c17c3['trim']();if(_0x87aa35[_0x2f6689(0x1c8)]('{')&&_0x87aa35['endsWith']('}')||_0x87aa35['startsWith']('[')&&_0x87aa35[_0x2f6689(0x1c4)](']'))try{return JSON[_0x2f6689(0x1b4)](_0x87aa35);}catch{}return _0x5c17c3;}function _0x36ff(){const _0x3d814b=['No\x20configuration\x20set\x20for\x20\x22','3632996VRuNXM','MWWgN','1078EhFgAE','isNaN','null','1154628vpXbvd','UrrNx','undefined','\x22\x20not\x20found','stringify','BwIAE','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','26138630LDpevW',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','startsWith','kind','object','fRzrW','Invalid\x20value\x20for\x20','447783RMRxoU','allowInsecureLocalhost','kteos','tcbYc','eEZEj','5MtapPJ','cwd','Set\x20','alsoExistsElsewhere','2553uuQiaY','sXAbP','Profile\x20\x22','7uKfhav','zmcJd','8678472EMTzgc','PtyWw','xHifm','log','(not\x20set)','6394632bPPdPs','SMfTX','cloud','\x20=\x20','lpwda','gZefj','qUxQO','inGrQ','\x20for\x20\x22','uWuyR','includes','ngjlu','true','parse','VWJjL','\x20\x20Note:\x20\x22','local'];_0x36ff=function(){return _0x3d814b;};return _0x36ff();}async function resolveProfileTarget(_0x2a2e07){const _0x3981c3=_0x174226,_0x514ac2={'amBLR':function(_0x179525,_0x5091cf){return _0x179525(_0x5091cf);},'MwulF':'cloud'},_0x44b997=existsSync(getEnvDir(_0x2a2e07));let _0x46c1b8=![];try{const _0x70cc7d=await fetchCloudProfile(_0x2a2e07);_0x46c1b8=_0x514ac2['amBLR'](Boolean,_0x70cc7d);}catch{}if(_0x46c1b8)return{'kind':_0x514ac2['MwulF'],'alsoExistsElsewhere':_0x44b997};if(_0x44b997)return{'kind':_0x3981c3(0x1b7),'alsoExistsElsewhere':![]};throw new Error(_0x3981c3(0x1d8)+_0x2a2e07+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x2a2e07);}function printDualExistsHint(_0x23272){const _0x541d46=_0x174226;console['log'](_0x541d46(0x1b6)+_0x23272+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x309074=_0x174226;return process[_0x309074(0x1d3)]();}async function loadEffectiveCloudSettings(_0x261e5c){const _0x15e797=_0x174226,_0x155820={'MWWgN':function(_0x17b635,_0x5058df){return _0x17b635(_0x5058df);},'eEZEj':function(_0x3c4dc0){return _0x3c4dc0();},'BIAIy':function(_0xf98289,_0x37b36c,_0x50e3b2){return _0xf98289(_0x37b36c,_0x50e3b2);}},_0x42fc64=await _0x155820[_0x15e797(0x1ba)](fetchCloudProfile,_0x261e5c),_0x122d38=readProfileOverrides(_0x155820[_0x15e797(0x1d1)](getProjectPath),_0x261e5c);return _0x155820['BIAIy'](mergeCloudProfileSettings,_0x42fc64?.['settings']??{},_0x122d38??undefined);}export async function configSet(_0x475a7f,_0x3c48ef,_0x4b10d6){const _0x3c711c=_0x174226,_0x30e376={'MRyGN':function(_0x2832cb,_0x1b0fd6){return _0x2832cb===_0x1b0fd6;},'qWETc':function(_0x31806f,_0x1eea08){return _0x31806f(_0x1eea08);},'eVJXn':function(_0x563852,_0x5809da){return _0x563852(_0x5809da);},'oFbxN':function(_0xd63194,_0xc6ac4e,_0x45470e,_0x1dfe80,_0x552b35){return _0xd63194(_0xc6ac4e,_0x45470e,_0x1dfe80,_0x552b35);},'uWuyR':function(_0x44506d,_0x18bc8d,_0x2d2f1a){return _0x44506d(_0x18bc8d,_0x2d2f1a);},'BwIAE':function(_0x5ec275,_0x5084f8,_0x2db598,_0x3005e8,_0x4b3e92){return _0x5ec275(_0x5084f8,_0x2db598,_0x3005e8,_0x4b3e92);},'tcbYc':function(_0x2afb91){return _0x2afb91();}},_0x2278d7=await resolveProfileTarget(_0x475a7f);if(_0x30e376['MRyGN'](_0x2278d7['kind'],_0x3c711c(0x1a9))){if(_0x2278d7['alsoExistsElsewhere'])_0x30e376['qWETc'](printDualExistsHint,_0x475a7f);const _0x387c6b=_0x30e376['eVJXn'](parseOverrideValue,_0x4b10d6);_0x30e376['oFbxN'](setProfileOverride,getProjectPath(),_0x475a7f,_0x3c48ef,_0x387c6b),console[_0x3c711c(0x1a5)](_0x3c711c(0x1d4)+_0x3c48ef+'\x20=\x20'+JSON[_0x3c711c(0x1c2)](_0x387c6b)+_0x3c711c(0x1af)+_0x475a7f+'\x22');return;}const _0x2e84d0=_0x30e376[_0x3c711c(0x1b0)](parseLocalValue,_0x3c48ef,_0x4b10d6);_0x30e376[_0x3c711c(0x1c3)](setProfileOverride,_0x30e376[_0x3c711c(0x1d0)](getProjectPath),_0x475a7f,_0x3c48ef,_0x2e84d0),console[_0x3c711c(0x1a5)]('Set\x20'+_0x3c48ef+_0x3c711c(0x1aa)+_0x2e84d0+'\x20for\x20\x22'+_0x475a7f+'\x22');}export async function configGet(_0x279e5e,_0x5d83a7){const _0x2b23e1=_0x174226,_0x49f4ec={'PtyWw':function(_0x94f067,_0x29a003){return _0x94f067(_0x29a003);},'qUxQO':function(_0x15606f,_0x4b1290,_0x1c8567){return _0x15606f(_0x4b1290,_0x1c8567);},'zmcJd':function(_0xd1770,_0x2cc42e){return _0xd1770===_0x2cc42e;},'dMJWZ':function(_0x525bd2,_0x4c0f70){return _0x525bd2===_0x4c0f70;},'KqcGO':_0x2b23e1(0x1ca)},_0x42fcf5=await resolveProfileTarget(_0x279e5e);if(_0x42fcf5[_0x2b23e1(0x1c9)]===_0x2b23e1(0x1a9)){const _0x1934aa=await _0x49f4ec[_0x2b23e1(0x1dc)](loadEffectiveCloudSettings,_0x279e5e),_0x1607c9=_0x49f4ec[_0x2b23e1(0x1ad)](getNestedValue,_0x1934aa,_0x5d83a7);if(_0x49f4ec[_0x2b23e1(0x1da)](_0x1607c9,undefined))console['log'](_0x2b23e1(0x1a6));else _0x49f4ec['dMJWZ'](typeof _0x1607c9,'object')?console[_0x2b23e1(0x1a5)](JSON[_0x2b23e1(0x1c2)](_0x1607c9,null,0x2)):console[_0x2b23e1(0x1a5)](_0x1607c9);return;}const _0x3802bd=await loadSettings(_0x279e5e),_0x363066=_0x49f4ec['qUxQO'](getNestedValue,_0x3802bd,_0x5d83a7);if(_0x363066===undefined)console[_0x2b23e1(0x1a5)]('(not\x20set)');else typeof _0x363066===_0x49f4ec['KqcGO']?console['log'](JSON['stringify'](_0x363066,null,0x2)):console[_0x2b23e1(0x1a5)](_0x363066);}export async function configList(_0x1a9490){const _0x33de7c=_0x174226,_0x4a0b33={'kteos':function(_0x2210db,_0xce9860){return _0x2210db===_0xce9860;},'UrrNx':_0x33de7c(0x1a9),'xHifm':function(_0xbc5df8,_0x1b11f6){return _0xbc5df8(_0x1b11f6);},'YUUcI':function(_0xe71c68,_0x3a88bb){return _0xe71c68(_0x3a88bb);}},_0x2d8691=await resolveProfileTarget(_0x1a9490);if(_0x4a0b33['kteos'](_0x2d8691[_0x33de7c(0x1c9)],_0x4a0b33[_0x33de7c(0x1bf)])){const _0x2dbfd0=await _0x4a0b33['xHifm'](loadEffectiveCloudSettings,_0x1a9490);if(!_0x2dbfd0||_0x4a0b33[_0x33de7c(0x1cf)](Object['keys'](_0x2dbfd0)['length'],0x0)){console[_0x33de7c(0x1a5)]('No\x20configuration\x20set\x20for\x20\x22'+_0x1a9490+'\x22');return;}console['log'](JSON['stringify'](_0x2dbfd0,null,0x2));return;}const _0x3b07cf=getSettingsPath(_0x1a9490);if(!existsSync(_0x3b07cf)){console[_0x33de7c(0x1a5)]('No\x20configuration\x20set\x20for\x20\x22'+_0x1a9490+'\x22');return;}const _0x661a1c=await _0x4a0b33[_0x33de7c(0x1dd)](loadSettings,_0x1a9490),_0x3b2641=_0x4a0b33['YUUcI'](formatSettings,_0x661a1c);!_0x3b2641?console['log'](_0x33de7c(0x1b8)+_0x1a9490+'\x22'):console['log'](_0x3b2641);}export async function configUnset(_0x2df21c,_0x2cf8b6){const _0x26362a=_0x174226,_0x35c580={'VWJjL':function(_0x31b86b,_0xcc69a0){return _0x31b86b===_0xcc69a0;},'ngjlu':_0x26362a(0x1a9),'WGEgy':function(_0x127f46){return _0x127f46();},'sXAbP':function(_0x22db0e,_0x5cec9b){return _0x22db0e(_0x5cec9b);}},_0x35cc4c=await resolveProfileTarget(_0x2df21c);if(_0x35c580[_0x26362a(0x1b5)](_0x35cc4c[_0x26362a(0x1c9)],_0x35c580[_0x26362a(0x1b2)])){if(_0x35cc4c[_0x26362a(0x1d5)])printDualExistsHint(_0x2df21c);const _0x5f1eed=unsetProfileOverride(_0x35c580['WGEgy'](getProjectPath),_0x2df21c,_0x2cf8b6);_0x5f1eed?console['log']('Removed\x20'+_0x2cf8b6+_0x26362a(0x1af)+_0x2df21c+'\x22'):console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+'\x22\x20not\x20found');return;}const _0x3140f4=unsetProfileOverride(getProjectPath(),_0x2df21c,_0x2cf8b6);if(_0x3140f4){console[_0x26362a(0x1a5)]('Removed\x20'+_0x2cf8b6);return;}const _0x377456=await _0x35c580[_0x26362a(0x1d7)](loadSettings,_0x2df21c),_0x5cfade=deleteNestedValue(_0x377456,_0x2cf8b6);_0x5cfade?console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x2df21c+_0x26362a(0x1c5)):console[_0x26362a(0x1a5)]('Key\x20\x22'+_0x2cf8b6+_0x26362a(0x1c1));}export async function configReset(_0x56b221){const _0x5639eb=_0x174226,_0x5265e9={'fRzrW':function(_0x165457,_0x2bbbbc){return _0x165457(_0x2bbbbc);},'ICsfe':function(_0x58bec2,_0x45208d){return _0x58bec2===_0x45208d;},'mHNek':_0x5639eb(0x1a9),'inGrQ':function(_0x245554,_0x252e47,_0x10c9b3){return _0x245554(_0x252e47,_0x10c9b3);}},_0x17db3c=await _0x5265e9[_0x5639eb(0x1cb)](resolveProfileTarget,_0x56b221);if(_0x5265e9['ICsfe'](_0x17db3c[_0x5639eb(0x1c9)],_0x5265e9['mHNek'])){_0x5265e9[_0x5639eb(0x1ae)](resetProfileOverrides,getProjectPath(),_0x56b221),console[_0x5639eb(0x1a5)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x56b221+'\x22');return;}console[_0x5639eb(0x1a5)]('\x22'+_0x56b221+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x56b221+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- function _0x4f8b(){const _0xedaac4=['log','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','266544WamSEe','142515hwZdrp','16FvDCuA','502226TKmKfl','104ZyuCGH','\x22\x20to\x20confirm\x20deletion:','171997uqDzJB','cwd','160ypcJpC','5xQbeUq','331710gFHCND','1937892tlkPDK','\x22\x20not\x20found.','139218obwOkm','Cloud\x20profile\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.'];_0x4f8b=function(){return _0xedaac4;};return _0x4f8b();}(function(_0x3486d9,_0x3f1dbe){const _0x332fda=_0x2721,_0x5543cf=_0x3486d9();while(!![]){try{const _0x1e7294=parseInt(_0x332fda(0x10b))/0x1+parseInt(_0x332fda(0x10e))/0x2+parseInt(_0x332fda(0x118))/0x3*(-parseInt(_0x332fda(0x10d))/0x4)+parseInt(_0x332fda(0x114))/0x5*(-parseInt(_0x332fda(0x115))/0x6)+parseInt(_0x332fda(0x111))/0x7*(parseInt(_0x332fda(0x10f))/0x8)+parseInt(_0x332fda(0x10c))/0x9*(-parseInt(_0x332fda(0x113))/0xa)+-parseInt(_0x332fda(0x116))/0xb;if(_0x1e7294===_0x3f1dbe)break;else _0x5543cf['push'](_0x5543cf['shift']());}catch(_0x10cbda){_0x5543cf['push'](_0x5543cf['shift']());}}}(_0x4f8b,0x28aef));function _0x2721(_0x2bc187,_0x3582e6){_0x2bc187=_0x2bc187-0x10a;const _0x4f8b7f=_0x4f8b();let _0x2721ac=_0x4f8b7f[_0x2bc187];return _0x2721ac;}import _0xa8a884 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(_0x2fcaf0,_0x4572a0={}){const _0x38d4a0=_0x2721,_0x58f6a7={'EfFPP':'input','EXkJI':function(_0x1c5f40,_0x5f1fda,_0x16045b){return _0x1c5f40(_0x5f1fda,_0x16045b);}},_0x1f488f=await fetchCloudProfile(_0x2fcaf0);if(!_0x1f488f)throw new Error(_0x38d4a0(0x119)+_0x2fcaf0+_0x38d4a0(0x117));if(!_0x4572a0['yes']&&!isInteractive())throw new Error(_0x38d4a0(0x10a));console[_0x38d4a0(0x11b)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x2fcaf0+_0x38d4a0(0x11a));if(!_0x4572a0['yes']){const {confirmation:_0x3f2352}=await _0xa8a884['prompt']([{'type':_0x58f6a7['EfFPP'],'name':'confirmation','message':'Type\x20\x22'+_0x2fcaf0+_0x38d4a0(0x110)}]);if(_0x3f2352!==_0x2fcaf0)throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await deleteCloudProfile(_0x2fcaf0),_0x58f6a7['EXkJI'](resetProfileOverrides,process[_0x38d4a0(0x112)](),_0x2fcaf0),clearLastProfile(process['cwd'](),_0x2fcaf0),console[_0x38d4a0(0x11b)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x2fcaf0+'\x22.');}
1
+ function _0x500d(_0x2bbce5,_0x27fbdd){_0x2bbce5=_0x2bbce5-0x1b8;const _0x447df3=_0x447d();let _0x500d3c=_0x447df3[_0x2bbce5];return _0x500d3c;}(function(_0x18640c,_0x3a5891){const _0x25a793=_0x500d,_0x3da21c=_0x18640c();while(!![]){try{const _0x457a1b=parseInt(_0x25a793(0x1cc))/0x1+parseInt(_0x25a793(0x1c4))/0x2*(parseInt(_0x25a793(0x1c2))/0x3)+-parseInt(_0x25a793(0x1c7))/0x4*(parseInt(_0x25a793(0x1ca))/0x5)+-parseInt(_0x25a793(0x1ba))/0x6+parseInt(_0x25a793(0x1bc))/0x7*(-parseInt(_0x25a793(0x1c1))/0x8)+parseInt(_0x25a793(0x1b9))/0x9+-parseInt(_0x25a793(0x1b8))/0xa;if(_0x457a1b===_0x3a5891)break;else _0x3da21c['push'](_0x3da21c['shift']());}catch(_0x134f59){_0x3da21c['push'](_0x3da21c['shift']());}}}(_0x447d,0xf029a));import _0x4bbfdc from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x447d(){const _0x394d5d=['991384qwUuZV','yes','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','5FxIgrD','prompt','176863HlwXcD','oXuSp','14648130SmCNQH','13510071WJeyIh','3489648faAIbI','Cloud\x20profile\x20\x22','42KXqlQy','Xjfbi','GyYUJ','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','nIxMS','329648nMjGAp','3mqjhHk','confirmation','3694454qpqwVA','Type\x20\x22','uSdlX'];_0x447d=function(){return _0x394d5d;};return _0x447d();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x57b3c0,_0x54385f={}){const _0x2f7a74=_0x500d,_0x557e9c={'uSdlX':_0x2f7a74(0x1c9),'GyYUJ':'input','Xjfbi':_0x2f7a74(0x1bf),'oXuSp':function(_0x2ebbac,_0xc08aa5){return _0x2ebbac(_0xc08aa5);},'nIxMS':function(_0xcb1dbb,_0x4a3289,_0x362bf3){return _0xcb1dbb(_0x4a3289,_0x362bf3);},'gFnXk':function(_0x255fe8,_0x2b192f,_0x480ee9){return _0x255fe8(_0x2b192f,_0x480ee9);}},_0x575279=await fetchCloudProfile(_0x57b3c0);if(!_0x575279)throw new Error(_0x2f7a74(0x1bb)+_0x57b3c0+'\x22\x20not\x20found.');if(!_0x54385f[_0x2f7a74(0x1c8)]&&!isInteractive())throw new Error(_0x557e9c[_0x2f7a74(0x1c6)]);console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x57b3c0+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x54385f['yes']){const {confirmation:_0x20637c}=await _0x4bbfdc[_0x2f7a74(0x1cb)]([{'type':_0x557e9c[_0x2f7a74(0x1be)],'name':_0x2f7a74(0x1c3),'message':_0x2f7a74(0x1c5)+_0x57b3c0+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x20637c!==_0x57b3c0)throw new Error(_0x557e9c[_0x2f7a74(0x1bd)]);}await _0x557e9c[_0x2f7a74(0x1cd)](deleteCloudProfile,_0x57b3c0),_0x557e9c[_0x2f7a74(0x1c0)](resetProfileOverrides,process['cwd'](),_0x57b3c0),_0x557e9c['gFnXk'](clearLastProfile,process['cwd'](),_0x57b3c0),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x57b3c0+'\x22.');}
@@ -1 +1 @@
1
- const _0x226aa4=_0x4e60;(function(_0xc3bd1f,_0x13dd22){const _0x5de4c6=_0x4e60,_0x2dfbfc=_0xc3bd1f();while(!![]){try{const _0x4cefb9=parseInt(_0x5de4c6(0x9c))/0x1+parseInt(_0x5de4c6(0xa9))/0x2+parseInt(_0x5de4c6(0xaa))/0x3+parseInt(_0x5de4c6(0xb1))/0x4+parseInt(_0x5de4c6(0xa8))/0x5+-parseInt(_0x5de4c6(0xac))/0x6+parseInt(_0x5de4c6(0xa1))/0x7*(-parseInt(_0x5de4c6(0xae))/0x8);if(_0x4cefb9===_0x13dd22)break;else _0x2dfbfc['push'](_0x2dfbfc['shift']());}catch(_0x3d8882){_0x2dfbfc['push'](_0x2dfbfc['shift']());}}}(_0x1b89,0x2035d));import{readdir,stat}from'fs/promises';function _0x1b89(){const _0x2e2b63=['\x20\x20\x20\x20\x20\x20Details:\x20','946036LstVtL','TgdYp','map','sort','local','\x0aCloud\x20Profiles:','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','settings.json','XrOKx','\x20[cloud]','endsWith','PbvEX','startsWith','\x0aLocal\x20Profiles\x20(legacy):','uVEMM','error','sessionUpdatedAt','xdYAl','has','length','139885sbNNBw','environmentKey','HVVEh','legacy','push','28BUbnuB','\x0aNo\x20profiles\x20found.','name','isDirectory','guNwL','log','reports','1051555trwrtX','308594hBYfdD','85098eAnyiE','no\x20session','1354146uWSbPW','.txt','823488NHoANE','klcHa'];_0x1b89=function(){return _0x2e2b63;};return _0x1b89();}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';function _0x4e60(_0x204063,_0x55e721){_0x204063=_0x204063-0x96;const _0x1b89ce=_0x1b89();let _0x4e6047=_0x1b89ce[_0x204063];return _0x4e6047;}import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x226aa4(0xa7),'local','ci'];export async function getEnvNames(){const _0xd42283=_0x226aa4,_0x3cc7a0={'klcHa':function(_0x5e77be){return _0x5e77be();},'OZuKG':function(_0x4c0a2a,_0x1d56cc,_0x5e74e){return _0x4c0a2a(_0x1d56cc,_0x5e74e);},'uVEMM':_0xd42283(0xb5),'gicGL':function(_0x511400,_0x391d82){return _0x511400(_0x391d82);},'guNwL':_0xd42283(0xb8)},_0x54c571=_0x3cc7a0['klcHa'](getRangerDir);if(!existsSync(_0x54c571))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x567826=await _0x3cc7a0[_0xd42283(0xaf)](readActiveProfileName),_0x16bfe7=[],_0x48c1b1={},_0x54844b=join(_0x54c571,'local');if(existsSync(_0x54844b)){const _0x4b0c20=await readdir(_0x54844b);for(const _0x50a4ae of _0x4b0c20){const _0x3d3768=_0x3cc7a0['OZuKG'](join,_0x54844b,_0x50a4ae),_0x55842e=await stat(_0x3d3768);_0x55842e[_0xd42283(0xa4)]()&&(_0x16bfe7[_0xd42283(0xa0)](_0x50a4ae),_0x48c1b1[_0x50a4ae]=_0x3cc7a0[_0xd42283(0x96)]);}}const _0x5892a=_0x3cc7a0['OZuKG'](join,_0x54c571,'ci');if(existsSync(_0x5892a)){const _0x49873c=await readdir(_0x5892a);for(const _0x29fe9d of _0x49873c){const _0x30a127=_0x3cc7a0['OZuKG'](join,_0x5892a,_0x29fe9d),_0x2aafe5=await stat(_0x30a127);_0x2aafe5['isDirectory']()&&(_0x16bfe7['push'](_0x29fe9d),_0x48c1b1[_0x29fe9d]='ci');}}const _0x5171fb=await readdir(_0x54c571);for(const _0x12d971 of _0x5171fb){if(NON_ENV_DIRS['includes'](_0x12d971))continue;if(_0x12d971[_0xd42283(0xbd)]('.'))continue;if(_0x12d971[_0xd42283(0xbb)](_0xd42283(0xad)))continue;const _0x29b6f3=join(_0x54c571,_0x12d971),_0x2fcadd=await _0x3cc7a0['gicGL'](stat,_0x29b6f3);_0x2fcadd['isDirectory']()&&existsSync(join(_0x29b6f3,_0x3cc7a0[_0xd42283(0xa5)]))&&(!_0x16bfe7['includes'](_0x12d971)&&(_0x16bfe7['push'](_0x12d971),_0x48c1b1[_0x12d971]=_0xd42283(0x9f)));}return{'envNames':_0x16bfe7,'activeEnv':_0x567826,'envTypes':_0x48c1b1};}export async function envList(){const _0x351b10=_0x226aa4,_0xd7a913={'LpCdO':function(_0x220a84){return _0x220a84();},'TBdkH':function(_0x2937e,_0x9b788d){return _0x2937e instanceof _0x9b788d;},'LFKqf':function(_0x12b965,_0x48c6af){return _0x12b965===_0x48c6af;},'PbvEX':_0x351b10(0xa2),'HVVEh':function(_0xbb65bd,_0x864dfe){return _0xbb65bd>_0x864dfe;},'TgdYp':function(_0x1e65f3,_0x38d5b9){return _0x1e65f3===_0x38d5b9;},'XrOKx':function(_0x53be62,_0xd3a1fc){return _0x53be62(_0xd3a1fc);},'XhyZO':_0x351b10(0x9f),'ZcntD':function(_0x510714,_0xbeec7f){return _0x510714>_0xbeec7f;},'xdYAl':_0x351b10(0xb6)},{envNames:_0x59bf03,activeEnv:_0x28c6e7,envTypes:_0x100cb5}=await getEnvNames();let _0x4d2689=[];const _0x404daf=await _0xd7a913['LpCdO'](getToken);if(_0x404daf)try{_0x4d2689=await listCloudProfiles();}catch(_0xd94ae){console[_0x351b10(0x97)](_0x351b10(0xb7)+(_0xd7a913['TBdkH'](_0xd94ae,Error)?_0xd94ae['message']:String(_0xd94ae)));}if(_0xd7a913['LFKqf'](_0x59bf03[_0x351b10(0x9b)],0x0)&&_0x4d2689[_0x351b10(0x9b)]===0x0){console['log'](_0xd7a913[_0x351b10(0xbc)]),console[_0x351b10(0xa6)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x1ac0d2=new Set(_0x4d2689[_0x351b10(0xb3)](_0xbb037=>_0xbb037[_0x351b10(0xa3)]));if(_0xd7a913[_0x351b10(0x9e)](_0x59bf03['length'],0x0)){console['log'](_0x351b10(0xbe));for(const _0x3b1083 of _0x59bf03['sort']()){const _0x4b053e=_0xd7a913['TgdYp'](_0x3b1083,_0x28c6e7)&&!_0x1ac0d2[_0x351b10(0x9a)](_0x3b1083),_0x743863=_0x100cb5[_0x3b1083]||'local',_0x549640=await _0xd7a913[_0x351b10(0xb9)](loadSettings,_0x3b1083),_0x3bb1b9=_0xd7a913[_0x351b10(0xb2)](_0x743863,_0xd7a913['XhyZO'])?'':'\x20['+_0x743863+']';console['log']('\x20\x20'+(_0x4b053e?'*\x20':'\x20\x20')+_0x3b1083+_0x3bb1b9),_0x549640['baseUrl']&&console[_0x351b10(0xa6)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x549640['baseUrl']),_0x549640['environmentDetails']&&console['log'](_0x351b10(0xb0)+_0x549640['environmentDetails']);}}if(_0xd7a913['ZcntD'](_0x4d2689['length'],0x0)){console[_0x351b10(0xa6)](_0xd7a913[_0x351b10(0x99)]);for(const _0x1e2982 of _0x4d2689[_0x351b10(0xb4)]((_0x2460f7,_0x11eaae)=>_0x2460f7['name']['localeCompare'](_0x11eaae['name']))){const _0x482351=_0xd7a913['LFKqf'](_0x1e2982[_0x351b10(0xa3)],_0x28c6e7),_0x5e1c88=_0x1e2982[_0x351b10(0x9d)]?'\x20('+_0x1e2982['environmentKey']+')':'',_0x351a4c=_0x1e2982['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x1e2982[_0x351b10(0x98)]+')':_0x351b10(0xab);console[_0x351b10(0xa6)]('\x20\x20'+(_0x482351?'*\x20':'\x20\x20')+_0x1e2982[_0x351b10(0xa3)]+_0x351b10(0xba)+_0x5e1c88),console[_0x351b10(0xa6)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x351a4c);}}_0x28c6e7&&console[_0x351b10(0xa6)]('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x381924=_0x2005;(function(_0x5d09bb,_0xaf2fac){const _0x4e73cf=_0x2005,_0x368a76=_0x5d09bb();while(!![]){try{const _0xf6ae3e=parseInt(_0x4e73cf(0xb0))/0x1*(parseInt(_0x4e73cf(0xbe))/0x2)+-parseInt(_0x4e73cf(0xaa))/0x3*(parseInt(_0x4e73cf(0xcd))/0x4)+parseInt(_0x4e73cf(0xcc))/0x5+-parseInt(_0x4e73cf(0xb4))/0x6+parseInt(_0x4e73cf(0xb6))/0x7+-parseInt(_0x4e73cf(0xa8))/0x8+-parseInt(_0x4e73cf(0xa4))/0x9*(-parseInt(_0x4e73cf(0xa5))/0xa);if(_0xf6ae3e===_0xaf2fac)break;else _0x368a76['push'](_0x368a76['shift']());}catch(_0x575467){_0x368a76['push'](_0x368a76['shift']());}}}(_0x4f4a,0xd38cb));function _0x2005(_0x3d61a4,_0x5040fe){_0x3d61a4=_0x3d61a4-0xa3;const _0x4f4a8a=_0x4f4a();let _0x200500=_0x4f4a8a[_0x3d61a4];return _0x200500;}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x381924(0xaf),_0x381924(0xac),_0x381924(0xba),_0x381924(0xb2),'ci'];export async function getEnvNames(){const _0x12bd6a=_0x381924,_0x3f3eea={'CyZlQ':function(_0x289c09,_0x5a392e){return _0x289c09(_0x5a392e);},'FlgeW':function(_0x57ce3d){return _0x57ce3d();},'oVFoS':function(_0x3ebfb6,_0x26d0f8){return _0x3ebfb6(_0x26d0f8);},'kSzIl':'local','KXgNy':function(_0x40033b,_0x2e93d5,_0x158190){return _0x40033b(_0x2e93d5,_0x158190);},'fCobk':_0x12bd6a(0xb3),'iDJBh':function(_0x491dc7,_0x35f718,_0x5e8ee0){return _0x491dc7(_0x35f718,_0x5e8ee0);},'BGvsp':_0x12bd6a(0xb8)},_0x253374=getRangerDir();if(!_0x3f3eea['CyZlQ'](existsSync,_0x253374))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x552e16=await _0x3f3eea['FlgeW'](readActiveProfileName),_0xfd62bc=[],_0x19b215={},_0x2e37fb=join(_0x253374,_0x12bd6a(0xb2));if(_0x3f3eea['oVFoS'](existsSync,_0x2e37fb)){const _0x25c104=await readdir(_0x2e37fb);for(const _0xca322f of _0x25c104){const _0x7ea587=join(_0x2e37fb,_0xca322f),_0x4b32c1=await stat(_0x7ea587);_0x4b32c1['isDirectory']()&&(_0xfd62bc[_0x12bd6a(0xc1)](_0xca322f),_0x19b215[_0xca322f]=_0x3f3eea[_0x12bd6a(0xae)]);}}const _0x2843b9=_0x3f3eea['KXgNy'](join,_0x253374,'ci');if(existsSync(_0x2843b9)){const _0x4d661e=await _0x3f3eea[_0x12bd6a(0xbf)](readdir,_0x2843b9);for(const _0x430e23 of _0x4d661e){const _0x41e35b=join(_0x2843b9,_0x430e23),_0x1d4f95=await stat(_0x41e35b);_0x1d4f95['isDirectory']()&&(_0xfd62bc['push'](_0x430e23),_0x19b215[_0x430e23]='ci');}}const _0x4e1656=await readdir(_0x253374);for(const _0x1ce83e of _0x4e1656){if(NON_ENV_DIRS[_0x12bd6a(0xab)](_0x1ce83e))continue;if(_0x1ce83e[_0x12bd6a(0xbb)]('.'))continue;if(_0x1ce83e[_0x12bd6a(0xc6)](_0x3f3eea[_0x12bd6a(0xc4)]))continue;const _0x586ad6=_0x3f3eea[_0x12bd6a(0xc2)](join,_0x253374,_0x1ce83e),_0x4bee2f=await stat(_0x586ad6);_0x4bee2f['isDirectory']()&&existsSync(join(_0x586ad6,'settings.json'))&&(!_0xfd62bc[_0x12bd6a(0xab)](_0x1ce83e)&&(_0xfd62bc['push'](_0x1ce83e),_0x19b215[_0x1ce83e]=_0x3f3eea['BGvsp']));}return{'envNames':_0xfd62bc,'activeEnv':_0x552e16,'envTypes':_0x19b215};}export async function envList(){const _0xb4538a=_0x381924,_0x5964fd={'ndynA':function(_0x2bb04a){return _0x2bb04a();},'Fsqhj':function(_0x178a10,_0x47c723){return _0x178a10 instanceof _0x47c723;},'AaJco':function(_0x5f27b7,_0x25331f){return _0x5f27b7(_0x25331f);},'FsNuJ':function(_0x3b8767,_0x149839){return _0x3b8767===_0x149839;},'pvRtx':_0xb4538a(0xbd),'FGqeZ':function(_0x74b2b4,_0x4ee510){return _0x74b2b4===_0x4ee510;},'vzpiT':'local','UDHHL':function(_0x1c039c,_0x37177b){return _0x1c039c>_0x37177b;},'fJNfM':function(_0x57d61c,_0x4d0321){return _0x57d61c===_0x4d0321;}},{envNames:_0x37728e,activeEnv:_0x127568,envTypes:_0x16a670}=await _0x5964fd['ndynA'](getEnvNames);let _0x5731e1=[];const _0x5de381=await _0x5964fd['ndynA'](getToken);if(_0x5de381)try{_0x5731e1=await listCloudProfiles();}catch(_0xd74869){console['error'](_0xb4538a(0xb5)+(_0x5964fd['Fsqhj'](_0xd74869,Error)?_0xd74869['message']:_0x5964fd[_0xb4538a(0xbc)](String,_0xd74869)));}if(_0x5964fd[_0xb4538a(0xa3)](_0x37728e[_0xb4538a(0xd0)],0x0)&&_0x5731e1['length']===0x0){console['log'](_0x5964fd['pvRtx']),console[_0xb4538a(0xb9)](_0xb4538a(0xcb));return;}const _0x34d8e2=new Set(_0x5731e1[_0xb4538a(0xc8)](_0x4db228=>_0x4db228[_0xb4538a(0xb1)]));if(_0x37728e['length']>0x0){console['log']('\x0aLocal\x20Profiles\x20(legacy):');for(const _0x1b85da of _0x37728e[_0xb4538a(0xca)]()){const _0x4de94e=_0x5964fd['FGqeZ'](_0x1b85da,_0x127568)&&!_0x34d8e2[_0xb4538a(0xc5)](_0x1b85da),_0x3859c4=_0x16a670[_0x1b85da]||_0x5964fd['vzpiT'],_0x5091d5=await _0x5964fd[_0xb4538a(0xbc)](loadSettings,_0x1b85da),_0x9576da=_0x3859c4==='legacy'?'':'\x20['+_0x3859c4+']';console['log']('\x20\x20'+(_0x4de94e?'*\x20':'\x20\x20')+_0x1b85da+_0x9576da),_0x5091d5[_0xb4538a(0xc7)]&&console['log'](_0xb4538a(0xa6)+_0x5091d5['baseUrl']),_0x5091d5['environmentDetails']&&console[_0xb4538a(0xb9)](_0xb4538a(0xb7)+_0x5091d5[_0xb4538a(0xce)]);}}if(_0x5964fd[_0xb4538a(0xc0)](_0x5731e1['length'],0x0)){console['log'](_0xb4538a(0xad));for(const _0x922321 of _0x5731e1[_0xb4538a(0xca)]((_0x332e6a,_0x1bec26)=>_0x332e6a[_0xb4538a(0xb1)][_0xb4538a(0xa7)](_0x1bec26['name']))){const _0x12d67e=_0x5964fd[_0xb4538a(0xcf)](_0x922321['name'],_0x127568),_0x426083=_0x922321['environmentKey']?'\x20('+_0x922321['environmentKey']+')':'',_0x1d53a7=_0x922321[_0xb4538a(0xc9)]?'cached\x20(updated\x20'+_0x922321[_0xb4538a(0xc9)]+')':_0xb4538a(0xa9);console[_0xb4538a(0xb9)]('\x20\x20'+(_0x12d67e?'*\x20':'\x20\x20')+_0x922321['name']+_0xb4538a(0xc3)+_0x426083),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x1d53a7);}}_0x127568&&console[_0xb4538a(0xb9)]('\x0a*\x20=\x20active\x20profile');}function _0x4f4a(){const _0x2c1c7c=['kSzIl','sessions','2xKgfen','name','local','.txt','7190832OLCrnx','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','5868240RzkEuI','\x20\x20\x20\x20\x20\x20Details:\x20','legacy','log','reports','startsWith','AaJco','\x0aNo\x20profiles\x20found.','203394zPWvBe','CyZlQ','UDHHL','push','iDJBh','\x20[cloud]','fCobk','has','endsWith','baseUrl','map','sessionUpdatedAt','sort','Run:\x20ranger\x20profile\x20add\x20<profile-name>','1537040GxIqpd','12EfYaGT','environmentDetails','fJNfM','length','FsNuJ','19807209ZHiOUW','10cNPwKw','\x20\x20\x20\x20\x20\x20URL:\x20','localeCompare','2737904YBUxqT','no\x20session','1142706RJfuwU','includes','bug-bashes','\x0aCloud\x20Profiles:'];_0x4f4a=function(){return _0x2c1c7c;};return _0x4f4a();}