@ranger-testing/ranger-cli 2.5.4-alpha.ed286f1-2 → 2.5.4-alpha.f4657dc-23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -0
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -0
- package/build/commands/utils/cloudProfileSession.js +1 -0
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -0
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -0
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -0
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -0
- package/build/commands/utils/resolveProfileUrl.js +1 -0
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +36 -6
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +46 -7
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x55b1(_0x356cd6,_0x3121c2){_0x356cd6=_0x356cd6-0xb2;const _0x4da781=_0x4da7();let _0x55b16c=_0x4da781[_0x356cd6];return _0x55b16c;}(function(_0x69475b,_0x22858){const _0x66c6d=_0x55b1,_0x577d13=_0x69475b();while(!![]){try{const _0x8e5077=parseInt(_0x66c6d(0xb7))/0x1+parseInt(_0x66c6d(0xd0))/0x2+parseInt(_0x66c6d(0xcf))/0x3+parseInt(_0x66c6d(0xcc))/0x4*(-parseInt(_0x66c6d(0xb5))/0x5)+parseInt(_0x66c6d(0xb2))/0x6*(-parseInt(_0x66c6d(0xca))/0x7)+parseInt(_0x66c6d(0xc7))/0x8+-parseInt(_0x66c6d(0xc2))/0x9;if(_0x8e5077===_0x22858)break;else _0x577d13['push'](_0x577d13['shift']());}catch(_0xb319d2){_0x577d13['push'](_0x577d13['shift']());}}}(_0x4da7,0xef231));import{join}from'path';import{existsSync}from'fs';function _0x4da7(){const _0x50bd88=['dPBti','227428mbuHiX','User\x20(available\x20in\x20all\x20your\x20projects)','Where\x20should\x20the\x20plugin\x20be\x20installed?','2502177mYWmQu','3519156ZBUeEH','6fIzGrL','LYldJ','parse','15fcPcVS','https://opencode.ai/config.json','850878fREyLr','user','@ranger-testing/opencode-plugin','project','KUsIn','Failed\x20to\x20read\x20opencode.json','gtIBb','pluginScope','includes','plugin','kiGij','33302835SHdONG','isArray','Project\x20(shared\x20with\x20team\x20via\x20git)','log','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','12852120MVevDf','JDkCn','\x0a📦\x20OpenCode\x20Plugin\x0a','1404473QQesiM'];_0x4da7=function(){return _0x50bd88;};return _0x4da7();}import{mkdir,readFile,writeFile}from'fs/promises';import _0xd38aee from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x4d9674){const _0x55d00b=_0x55b1,_0x4a7ca7={'FjnaR':function(_0x4ae508,_0x3d0619,_0xade9dd){return _0x4ae508(_0x3d0619,_0xade9dd);},'KUsIn':function(_0xd58d9b,_0x4b2302){return _0xd58d9b(_0x4b2302);},'gtIBb':_0x55d00b(0xba),'LYldJ':'opencode.json','qYobS':_0x55d00b(0xce),'kiGij':_0x55d00b(0xcd),'dPBti':_0x55d00b(0xb8),'JDkCn':_0x55d00b(0xc4),'kcPYD':'utf-8','egAyQ':'✓\x20OpenCode\x20plugin\x20already\x20configured','DGEqx':'✓\x20OpenCode\x20plugin\x20configured'},_0x1353ce=existsSync(_0x4a7ca7['FjnaR'](join,_0x4a7ca7[_0x55d00b(0xbb)](getOpencodeConfigDir,_0x4a7ca7[_0x55d00b(0xbd)]),_0x4a7ca7[_0x55d00b(0xb3)]));let _0x4510e9;if(_0x4d9674)_0x4510e9=_0x4d9674;else{if(_0x1353ce)_0x4510e9=_0x4a7ca7[_0x55d00b(0xbd)];else{console['log'](_0x55d00b(0xc9));const _0x1749ed=await _0xd38aee['prompt']([{'type':'list','name':_0x55d00b(0xbe),'message':_0x4a7ca7['qYobS'],'choices':[{'name':_0x4a7ca7[_0x55d00b(0xc1)],'value':_0x4a7ca7[_0x55d00b(0xcb)]},{'name':_0x4a7ca7[_0x55d00b(0xc8)],'value':_0x55d00b(0xba)}],'default':_0x55d00b(0xb8)}]);_0x4510e9=_0x1749ed[_0x55d00b(0xbe)];}}const _0x1c63fb=join(getOpencodeConfigDir(_0x4510e9),_0x4a7ca7[_0x55d00b(0xb3)]),_0x5467d9=_0x55d00b(0xb9),_0x24952b=_0x55d00b(0xb6);let _0x471577={};if(existsSync(_0x1c63fb))try{const _0x193eaa=await readFile(_0x1c63fb,_0x4a7ca7['kcPYD']);_0x471577=JSON[_0x55d00b(0xb4)](_0x193eaa);}catch(_0x16a941){return console['error'](_0x55d00b(0xc6)),{'configured':![],'scope':_0x4510e9,'error':_0x55d00b(0xbc),'details':_0x16a941};}const _0x34024a=Array[_0x55d00b(0xc3)](_0x471577[_0x55d00b(0xc0)])?_0x471577[_0x55d00b(0xc0)]:[];if(_0x34024a[_0x55d00b(0xbf)](_0x5467d9))return console[_0x55d00b(0xc5)](_0x4a7ca7['egAyQ']),{'configured':![],'scope':_0x4510e9};return _0x471577['$schema']=_0x471577['$schema']||_0x24952b,_0x471577['plugin']=[..._0x34024a,_0x5467d9],await mkdir(getOpencodeConfigDir(_0x4510e9),{'recursive':!![]}),await _0x4a7ca7['FjnaR'](writeFile,_0x1c63fb,JSON['stringify'](_0x471577,null,0x2)+'\x0a'),console[_0x55d00b(0xc5)](_0x4a7ca7['DGEqx']),{'configured':!![],'scope':_0x4510e9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x11dd(_0x5eae88,_0x19d8a7){_0x5eae88=_0x5eae88-0x16f;var _0x20e62c=_0x20e6();var _0x11dd3f=_0x20e62c[_0x5eae88];return _0x11dd3f;}function _0x20e6(){var _0x1b408e=['622050ZVGtQT','1452753DVheFR','AKkjt','10LbrqIv','4048734aeNzUB','9863IhneJE','6359517dtfPJW','2865405hNDPqA','3576bWYQrF','BAfbb','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','4eWRgco','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','error','exit','613058pQTpAg','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x20e6=function(){return _0x1b408e;};return _0x20e6();}(function(_0x49484b,_0x642dc){var _0x30d36b=_0x11dd,_0x500de8=_0x49484b();while(!![]){try{var _0x56d1ce=parseInt(_0x30d36b(0x17c))/0x1+parseInt(_0x30d36b(0x17a))/0x2+parseInt(_0x30d36b(0x17d))/0x3*(-parseInt(_0x30d36b(0x176))/0x4)+parseInt(_0x30d36b(0x172))/0x5+parseInt(_0x30d36b(0x16f))/0x6+-parseInt(_0x30d36b(0x170))/0x7*(parseInt(_0x30d36b(0x173))/0x8)+parseInt(_0x30d36b(0x171))/0x9*(-parseInt(_0x30d36b(0x17f))/0xa);if(_0x56d1ce===_0x642dc)break;else _0x500de8['push'](_0x500de8['shift']());}catch(_0x5b4034){_0x500de8['push'](_0x500de8['shift']());}}}(_0x20e6,0x56db2));export async function setupCi(_0x59f868,_0x48d46d,_0x5c4701){var _0x44bb36=_0x11dd,_0x17678e={'AKkjt':function(_0x3934a8,_0x41b8f8){return _0x3934a8+_0x41b8f8;},'BAfbb':_0x44bb36(0x175),'DWSjZ':_0x44bb36(0x177),'xbuDm':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x44bb36(0x178)](_0x17678e[_0x44bb36(0x17e)](_0x17678e[_0x44bb36(0x174)]+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x17678e['DWSjZ'],'\x0a')+_0x17678e['xbuDm']+_0x44bb36(0x17b)),process[_0x44bb36(0x179)](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ebadb,_0x177b35){const _0x5a7189=_0x4bca,_0x55684c=_0x2ebadb();while(!![]){try{const _0xbd4b97=parseInt(_0x5a7189(0xa8))/0x1*(-parseInt(_0x5a7189(0x85))/0x2)+parseInt(_0x5a7189(0x81))/0x3*(parseInt(_0x5a7189(0xa4))/0x4)+-parseInt(_0x5a7189(0xa1))/0x5+parseInt(_0x5a7189(0x8a))/0x6+parseInt(_0x5a7189(0x9e))/0x7*(-parseInt(_0x5a7189(0x93))/0x8)+parseInt(_0x5a7189(0x94))/0x9+parseInt(_0x5a7189(0x97))/0xa;if(_0xbd4b97===_0x177b35)break;else _0x55684c['push'](_0x55684c['shift']());}catch(_0x4d6fd9){_0x55684c['push'](_0x55684c['shift']());}}}(_0x49dd,0x1fdd7));function _0x49dd(){const _0x328e74=['autoInstall','GMYFz','\x0a📦\x20Installing\x20skills...\x0a','igGOm','list','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','949109RcmwHK','\x20--opencode','xhYEu','950330QWAPNM','plPzb','To\x20get\x20started:','896AMKmlw','installLevel','platform','plocr','2mWitnB','\x20\x203.\x20Run:\x20ranger\x20skillup','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','log','user','Where\x20should\x20skills\x20be\x20installed?','1461YcOiCU','suppressUsage','/skills/','grRpk','112564wUdqxA','project','isloL','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','opencode','1059360fCxFuO','yzBtb','vYafA','claude','\x20successfully!\x0a','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','To\x20use:','isTTY','8NXMqOm','1506231gBSsls','pZfFr','\x0a✅\x20Installed\x20','1157290KfkIXt'];_0x49dd=function(){return _0x328e74;};return _0x49dd();}import{basename}from'path';import _0x53512b from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x4bca(_0x411a4d,_0x5780b8){_0x411a4d=_0x411a4d-0x7e;const _0x49dd90=_0x49dd();let _0x4bca36=_0x49dd90[_0x411a4d];return _0x4bca36;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1d1c47={}){const _0x50c66a=_0x4bca,_0x326e6f={'lkBYZ':function(_0x55e19c){return _0x55e19c();},'yzBtb':_0x50c66a(0x9d),'vYafA':_0x50c66a(0x90),'ypAZV':function(_0x168ada,_0x52b14e){return _0x168ada===_0x52b14e;},'GMYFz':function(_0x22f8da,_0xca2336){return _0x22f8da===_0xca2336;},'DqVpr':'opencode','pZfFr':function(_0xe90b9){return _0xe90b9();},'xhYEu':_0x50c66a(0x7f),'YuxLy':'installLevel','Vrvov':_0x50c66a(0x80),'GTWTU':'project','NfAna':function(_0x48d11c){return _0x48d11c();},'zyXai':_0x50c66a(0x9a),'grRpk':'ranger','MylKN':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','igGOm':function(_0x3667b2,_0x1c749b){return _0x3667b2 instanceof _0x1c749b;},'plPzb':'user-level','sSgcn':'project-level','nepDM':function(_0x3363a0,_0x65b0d9){return _0x3363a0>_0x65b0d9;},'isloL':_0x50c66a(0x91),'tnRgD':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','plocr':_0x50c66a(0xaa)};console[_0x50c66a(0x7e)](_0x50c66a(0xab));const _0x3082c5=_0x1d1c47[_0x50c66a(0xa6)]??_0x50c66a(0x8d),_0x18608f=await _0x326e6f['lkBYZ'](getToken);if(!_0x18608f){console[_0x50c66a(0x7e)](_0x326e6f[_0x50c66a(0x8b)]),console[_0x50c66a(0x7e)](_0x50c66a(0xa3)),console['log'](_0x326e6f[_0x50c66a(0x8c)]),console[_0x50c66a(0x7e)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x326e6f['ypAZV'](_0x3082c5,'opencode')?_0x50c66a(0x9f):'')+'\x20<your-api-token>'),console[_0x50c66a(0x7e)](_0x50c66a(0xa9)+(_0x326e6f[_0x50c66a(0x99)](_0x3082c5,_0x326e6f['DqVpr'])?'\x20--opencode':'')+'\x0a');return;}console[_0x50c66a(0x7e)]('✓\x20Found\x20API\x20token');const _0x1abca0=_0x326e6f[_0x50c66a(0x95)](getProjectRoot),_0x1aa336=basename(_0x1abca0),_0x5d6db4=_0x3082c5===_0x326e6f['DqVpr']?getOpencodeConfigDir(_0x326e6f['xhYEu'])+_0x50c66a(0x83):getClaudeConfigDir()+'/skills/',_0x30a083=_0x3082c5===_0x50c66a(0x89)?_0x1abca0+'/.opencode/skills/':_0x1abca0+'/.claude/skills/',_0x4e4147=process['stdin']['isTTY']&&process['stdout'][_0x50c66a(0x92)];let _0x345cb6;if(_0x1d1c47['autoInstall'])_0x345cb6=_0x1d1c47[_0x50c66a(0x98)];else{if(_0x4e4147){const _0x24f2c1=await _0x53512b['prompt']([{'type':_0x50c66a(0x9c),'name':_0x326e6f['YuxLy'],'message':_0x326e6f['Vrvov'],'choices':[{'name':'All\x20projects\x20('+_0x5d6db4+')','value':_0x326e6f[_0x50c66a(0xa0)]},{'name':'This\x20project\x20only\x20('+_0x30a083+')','value':_0x326e6f['GTWTU']}]}]);_0x345cb6=_0x24f2c1[_0x50c66a(0xa5)];}else _0x345cb6=_0x50c66a(0x86),console[_0x50c66a(0x7e)](_0x50c66a(0x88)+_0x30a083+')');}let _0x6d3804=0x0;const _0x871cec=_0x326e6f['NfAna'](getCurrentVersion);console[_0x50c66a(0x7e)](_0x326e6f['zyXai']);try{const _0x50612c=await installSkill(_0x326e6f[_0x50c66a(0x84)],{'cliVersion':_0x871cec,'level':_0x345cb6,'platform':_0x3082c5});_0x50612c&&_0x6d3804++;}catch(_0x2160eb){console['warn'](_0x326e6f['MylKN'],_0x326e6f[_0x50c66a(0x9b)](_0x2160eb,Error)?_0x2160eb['message']:_0x2160eb);}if(_0x6d3804>0x0){const _0x588822=_0x345cb6===_0x326e6f['xhYEu']?_0x326e6f[_0x50c66a(0xa2)]:_0x326e6f['sSgcn'];console['log'](_0x50c66a(0x96)+_0x6d3804+'\x20'+_0x588822+'\x20skill'+(_0x326e6f['nepDM'](_0x6d3804,0x1)?'s':'')+_0x50c66a(0x8e)),!_0x1d1c47[_0x50c66a(0x82)]&&(console[_0x50c66a(0x7e)](_0x326e6f[_0x50c66a(0x87)]),_0x326e6f['ypAZV'](_0x3082c5,_0x50c66a(0x89))?console[_0x50c66a(0x7e)](_0x326e6f['tnRgD']):console['log'](_0x326e6f[_0x50c66a(0xa7)]));}else console[_0x50c66a(0x7e)](_0x50c66a(0x8f));}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x41c326=_0x48d1;(function(_0xdd56c,_0x548109){const _0x56ac20=_0x48d1,_0x183a2c=_0xdd56c();while(!![]){try{const _0x566c55=parseInt(_0x56ac20(0x208))/0x1+-parseInt(_0x56ac20(0x204))/0x2+-parseInt(_0x56ac20(0x1d7))/0x3+-parseInt(_0x56ac20(0x1fa))/0x4+parseInt(_0x56ac20(0x228))/0x5*(parseInt(_0x56ac20(0x1de))/0x6)+-parseInt(_0x56ac20(0x1d6))/0x7+parseInt(_0x56ac20(0x209))/0x8;if(_0x566c55===_0x548109)break;else _0x183a2c['push'](_0x183a2c['shift']());}catch(_0x20bd1c){_0x183a2c['push'](_0x183a2c['shift']());}}}(_0x376f,0x8d2fa));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x137ec0 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x376f(){const _0x5da841=['⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20Created\x20.ranger/.gitignore','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','5719308tfsBkL','951165DbcXPw','trackPhaseEnd','trackPhaseStart','playwright@','chromium','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','plugin','6414JjqHUy','You\x20can\x20install\x20it\x20manually\x20by\x20running:','pwggE','skipChromium','Authentication\x20failed:\x20','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','sJrru','Validating\x20API\x20token...','juHkD','npx','UcHff','✓\x20Stored\x20credentials\x20locally','profile','scope','UnxLu','✓\x20Already\x20authenticated\x20to\x20','log','GITHUB_ENV','win32','OBXSQ','DiVZI','VoONC','✓\x20Playwright\x20Chromium\x20browser\x20found','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','hioyt','ZJxhs','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','user','1427140pNQVAP','\x20\x20npx\x20playwright@','\x0a🚀\x20Ranger\x20Setup\x0a','wantsProfile','install','executablePath','isTTY','force','auth','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','1790236bqiYTH','✓\x20.ranger/\x20directory\x20already\x20exists','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','\x20(fallback\x20version)','359918dgrpgT','12462648sodVfO','OvWfI','blBrq','ranger','\x20install\x20chromium','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','error','inherit','The\x20required\x20version\x20(','upiQQ','url','FJKSM','ASkRc','prompt','organizationName','skipped','env','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','stdout','GEqwx','provided_token','\x0aIn\x20Claude\x20Code,\x20run\x20','wstpc','gZOru','cVbVj','EVOEH','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','jdhHQ','opencode','success','4895CjdPEL','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','...','ranger\x20profile\x20add\x20local','✓\x20Authenticated\x20to\x20','status','gMgxB','close','message','TZRwv','RebXR','nrWax','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','skills','git_check','lEOex','tCopU','allowInsecureLocalhost','\x0a❌\x20Profile\x20setup\x20failed:','LAcjK','✓\x20Created\x20.ranger/\x20directory','yyeKS','KDZjc','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','✓\x20Skipping\x20authentication\x20(--skip-auth)','gyquM','skipAuth','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','cMhkv','\x1b[1m','confirm','sdtyQ','or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','PGcAE','iAFKy','wgpVI','YXZHi','\x0a⚠\x20Skipping\x20Chromium\x20installation.'];_0x376f=function(){return _0x5da841;};return _0x376f();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x19e636=>_0x41c326(0x1c9)+_0x19e636+'\x1b[0m';export function getPlaywrightVersion(){try{const _0x4850d4=require['resolve']('playwright/package.json'),_0xf272e9=require(_0x4850d4);return _0xf272e9['version'];}catch{return null;}}export function installChromiumBinary(_0xa5dad0,_0x5a6455=![]){const _0x3f5411=_0x41c326,_0xf512d6={'ewFaV':function(_0x3ab704){return _0x3ab704();},'dNDxU':_0x3f5411(0x1fe),'mLmMO':'--with-deps','TZRwv':_0x3f5411(0x1db),'wgpVI':_0x3f5411(0x1e7),'GAnjo':'ignore','jdhHQ':'inherit','FZNpB':function(_0x588d52,_0x405e9e){return _0x588d52===_0x405e9e;},'TtDGW':_0x3f5411(0x1f0),'CZBYI':_0x3f5411(0x210)};return new Promise((_0x484a49,_0x48381e)=>{const _0x2c24ee=_0x3f5411,_0x5e8043=[_0x2c24ee(0x1da)+_0xa5dad0,_0xf512d6['dNDxU'],..._0x5a6455?[_0xf512d6['mLmMO']]:[],_0xf512d6[_0x2c24ee(0x231)]],_0x41b5e4=spawn(_0xf512d6[_0x2c24ee(0x1cf)],_0x5e8043,{'stdio':[_0xf512d6['GAnjo'],_0xf512d6[_0x2c24ee(0x225)],_0x2c24ee(0x211)],'shell':_0xf512d6['FZNpB'](process['platform'],_0xf512d6['TtDGW'])});_0x41b5e4['on'](_0x2c24ee(0x22f),_0x34e6b3=>{_0x34e6b3===0x0?_0xf512d6['ewFaV'](_0x484a49):_0x48381e(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x34e6b3));}),_0x41b5e4['on'](_0xf512d6['CZBYI'],_0x9b233a=>{_0x48381e(_0x9b233a);});});}export async function authenticate(_0x1b02dd){const _0xed3d84=_0x41c326,_0x214c6e={'UnxLu':function(_0x5b65f7){return _0x5b65f7();},'mxfNF':'existing_token','ZJxhs':function(_0x296894,_0x356b00){return _0x296894(_0x356b00);},'systq':_0xed3d84(0x1e5),'YXZHi':function(_0x1f7cf2,_0x1dd556){return _0x1f7cf2(_0x1dd556);},'GEqwx':_0xed3d84(0x21e)};if(!_0x1b02dd){const _0x3b6100=await _0x214c6e[_0xed3d84(0x1ec)](getToken);if(_0x3b6100){const _0x3590c0=await getCurrentUser(_0x3b6100);if(_0x3590c0[_0xed3d84(0x227)])return console['log'](_0xed3d84(0x1ed)+_0x3590c0[_0xed3d84(0x1f9)]['organizationName']),{'token':_0x3b6100,'method':_0x214c6e['mxfNF']};}try{_0x1b02dd=await runDeviceAuthFlow();}catch(_0x3b3db7){throw new Error('Authentication\x20failed:\x20'+(_0x3b3db7 instanceof Error?_0x3b3db7['message']:_0x3b3db7));}const _0x500086=await _0x214c6e[_0xed3d84(0x1f7)](getCurrentUser,_0x1b02dd);if(!_0x500086[_0xed3d84(0x227)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x500086[_0xed3d84(0x210)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x500086['user'][_0xed3d84(0x218)]),{'token':_0x1b02dd,'method':'device_auth'};}console['log'](_0x214c6e['systq']);const _0x5e336c=await getCurrentUser(_0x1b02dd);if(!_0x5e336c[_0xed3d84(0x227)]){if(_0x5e336c[_0xed3d84(0x22d)])throw new Error(_0xed3d84(0x1e2)+_0x5e336c[_0xed3d84(0x210)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x5e336c['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0xed3d84(0x1ee)](_0xed3d84(0x22c)+_0x5e336c['user'][_0xed3d84(0x218)]),await _0x214c6e[_0xed3d84(0x1d0)](storeToken,_0x1b02dd),console['log'](process[_0xed3d84(0x21a)][_0xed3d84(0x1ef)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0xed3d84(0x1e9)),{'token':_0x1b02dd,'method':_0x214c6e[_0xed3d84(0x21d)]};}export async function ensureRangerDir(_0x6bb2ca){const _0x60a769=_0x41c326,_0x55f648={'OBXSQ':function(_0x2b11dc){return _0x2b11dc();},'sGzxA':function(_0x2855e9,_0x4e367a,_0x5733f6){return _0x2855e9(_0x4e367a,_0x5733f6);},'cVbVj':function(_0x415cad,_0x308f15){return _0x415cad(_0x308f15);},'gsbMs':function(_0x37ec4d,_0xbb2a05,_0x582a97){return _0x37ec4d(_0xbb2a05,_0x582a97);},'hioyt':_0x60a769(0x205)};let _0x33c3b7;if(_0x6bb2ca==='user')_0x33c3b7=_0x55f648[_0x60a769(0x1f1)](getRangerHomeDir);else{const _0x3a0c95=findGitRoot();_0x33c3b7=_0x3a0c95?_0x55f648['sGzxA'](join,_0x3a0c95,'.ranger'):getRangerDir();}return!_0x55f648[_0x60a769(0x222)](existsSync,_0x33c3b7)?(await _0x55f648['gsbMs'](mkdir,_0x33c3b7,{'recursive':!![]}),console[_0x60a769(0x1ee)](_0x60a769(0x23c)),{'path':_0x33c3b7,'installed':!![]}):(console[_0x60a769(0x1ee)](_0x55f648[_0x60a769(0x1f6)]),{'path':_0x33c3b7,'installed':![]});}export async function ensureChromium(_0xc9e765=![]){const _0x3735cb=_0x41c326,_0x325d87={'ojxBN':_0x3735cb(0x1f4),'UcHff':function(_0x21b183){return _0x21b183();},'PGcAE':function(_0x52ac16,_0x21681b){return _0x52ac16??_0x21681b;},'IcDgF':_0x3735cb(0x1dc),'upiQQ':function(_0x347c87,_0x343b86){return _0x347c87 instanceof _0x343b86;},'VoONC':_0x3735cb(0x1df),'IWZGD':_0x3735cb(0x1d1)};let _0x398ec4=![];try{const _0x159c1f=chromium[_0x3735cb(0x1ff)]();_0x398ec4=existsSync(_0x159c1f);}catch{_0x398ec4=![];}if(_0x398ec4)return console['log'](_0x325d87['ojxBN']),![];const _0x5f106d=_0x325d87[_0x3735cb(0x1e8)](getPlaywrightVersion),_0x45a91f=_0x325d87[_0x3735cb(0x1cd)](_0x5f106d,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x3ae708=!_0x5f106d,_0x25f69f=process['stdin'][_0x3735cb(0x200)]&&process[_0x3735cb(0x21c)][_0x3735cb(0x200)];let _0x2d523a=!![];if(_0x25f69f){const {install:_0x279f74}=await _0x137ec0[_0x3735cb(0x217)]([{'type':'confirm','name':_0x3735cb(0x1fe),'message':_0x3ae708?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x45a91f+'\x20now?':_0x3735cb(0x212)+_0x45a91f+_0x3735cb(0x1d3),'default':!![]}]);_0x2d523a=_0x279f74;}else console[_0x3735cb(0x1ee)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x45a91f+(_0x3ae708?_0x3735cb(0x207):'')+_0x3735cb(0x22a));if(_0x2d523a){console[_0x3735cb(0x1ee)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x45a91f,_0xc9e765),console[_0x3735cb(0x1ee)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x228b55){console['error'](_0x325d87['IcDgF'],_0x325d87[_0x3735cb(0x213)](_0x228b55,Error)?_0x228b55[_0x3735cb(0x230)]:_0x228b55),console['log'](_0x325d87[_0x3735cb(0x1f3)]),console[_0x3735cb(0x1ee)](_0x3735cb(0x1fb)+_0x45a91f+_0x3735cb(0x20d));}}else console[_0x3735cb(0x1ee)](_0x325d87['IWZGD']),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0x45a91f+_0x3735cb(0x20d));return!![];}export async function writeRangerGitignore(_0x460d6e){const _0x39490c=_0x41c326,_0x7f882={'ASkRc':function(_0x4d2a28,_0x26fc5a,_0x266bb2){return _0x4d2a28(_0x26fc5a,_0x266bb2);},'DiVZI':_0x39490c(0x1d4)},_0x29054a=_0x7f882[_0x39490c(0x216)](join,_0x460d6e,'.gitignore'),_0x20bba3='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x29054a,_0x20bba3),console['log'](_0x7f882[_0x39490c(0x1f2)]);}function printProfileSetupLaterInstructions(){const _0x201acd=_0x41c326,_0x1f036e={'nRQno':_0x201acd(0x23f),'LAcjK':_0x201acd(0x22b),'iAFKy':'Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a'};console['log'](_0x1f036e['nRQno']),console[_0x201acd(0x1ee)]('\x20\x20'+bold(_0x1f036e[_0x201acd(0x23b)])),console[_0x201acd(0x1ee)](_0x1f036e[_0x201acd(0x1ce)]);}export async function ensureLocalEnv(_0x5733b2,_0x2ba9af){const _0x4a56bb=_0x41c326,_0x445f79={'nrWax':_0x4a56bb(0x1d2),'yuata':function(_0x45ed1d){return _0x45ed1d();},'fkTVo':function(_0x316693,_0x1ea217,_0x19021f){return _0x316693(_0x1ea217,_0x19021f);},'sdtyQ':'local','wlsCe':'✓\x20Local\x20profile\x20already\x20exists','RebXR':_0x4a56bb(0x21b),'gMgxB':_0x4a56bb(0x234),'vePAh':'use\x20until\x20the\x20session\x20expires.\x0a','juHkD':_0x4a56bb(0x1ca),'pvHkz':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','OvWfI':_0x4a56bb(0x23a)};if(!findGitRoot())return console['log'](_0x445f79[_0x4a56bb(0x233)]),{'ready':![],'skipped':!![]};const _0x6ad21d=_0x5733b2?.['scope']==='user'?_0x445f79['yuata'](getRangerHomeDir):undefined;if(_0x445f79['fkTVo'](findExistingEnv,_0x445f79[_0x4a56bb(0x1cb)],{'locations':[_0x445f79[_0x4a56bb(0x1cb)]],'rangerDir':_0x6ad21d}))return console[_0x4a56bb(0x1ee)](_0x445f79['wlsCe']),{'ready':!![],'skipped':![]};const _0x4039c5=process['stdin']['isTTY']&&process[_0x4a56bb(0x21c)]['isTTY'];if(_0x4039c5&&!_0x5733b2?.[_0x4a56bb(0x214)]){console[_0x4a56bb(0x1ee)](_0x4a56bb(0x206)),console['log'](_0x445f79[_0x4a56bb(0x232)]),console['log'](_0x445f79[_0x4a56bb(0x22e)]),console['log'](_0x445f79['vePAh']),console['log']('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0x1c01c7}=await _0x137ec0['prompt']([{'type':_0x445f79[_0x4a56bb(0x1e6)],'name':_0x4a56bb(0x1fd),'message':_0x445f79['pvHkz'],'default':!![]}]);if(!_0x1c01c7)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv('local',{'url':_0x5733b2?.['url'],'force':_0x5733b2?.[_0x4a56bb(0x201)],'allowInsecureLocalhost':_0x5733b2?.[_0x4a56bb(0x239)],'scope':_0x5733b2?.['scope']},_0x2ba9af),{'ready':!![],'skipped':![]};}catch(_0xe031a7){return console[_0x4a56bb(0x210)](_0x445f79[_0x4a56bb(0x20a)],_0xe031a7 instanceof Error?_0xe031a7['message']:_0xe031a7),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}function _0x48d1(_0xff4fc9,_0x3a15da){_0xff4fc9=_0xff4fc9-0x1c8;const _0x376f0c=_0x376f();let _0x48d1db=_0x376f0c[_0xff4fc9];return _0x48d1db;}export async function start(_0x21fe92,_0x4face3,_0x3cc207){const _0x7043ea=_0x41c326,_0x1058d9={'gyquM':_0x7043ea(0x1fc),'oxXCY':function(_0x52f311,_0x1b59b7){return _0x52f311===_0x1b59b7;},'qsIPW':_0x7043ea(0x1f9),'cMhkv':function(_0x34ff2e){return _0x34ff2e();},'sJrru':'No\x20git\x20repository\x20found','tCopU':function(_0xa1b6ed,_0x2349ad){return _0xa1b6ed+_0x2349ad;},'EVOEH':_0x7043ea(0x229),'CgDhb':_0x7043ea(0x1cc),'KDZjc':function(_0x482818,_0x5b80f0){return _0x482818(_0x5b80f0);},'oJQzo':function(_0x406ba0,_0xfcbc24){return _0x406ba0(_0xfcbc24);},'pwggE':_0x7043ea(0x240),'INcHq':_0x7043ea(0x1db),'Inbnv':_0x7043ea(0x20e),'ZLXKL':'plugin','wstpc':_0x7043ea(0x235),'yyeKS':function(_0x518189,_0x12c09c,_0x44deb8){return _0x518189(_0x12c09c,_0x44deb8);},'LuGDS':_0x7043ea(0x20c),'gZOru':function(_0x6d1141){return _0x6d1141();},'ZcnkQ':_0x7043ea(0x226),'FJKSM':_0x7043ea(0x1d5),'XxwxN':function(_0x59b1b5,_0x192609){return _0x59b1b5 instanceof _0x192609;},'rGIpp':_0x7043ea(0x1f8),'dseVl':_0x7043ea(0x1f5),'MRmVG':function(_0x2b5216,_0x1ba618,_0x672feb){return _0x2b5216(_0x1ba618,_0x672feb);},'Pohcb':function(_0x34d5a5,_0x1aa5f0){return _0x34d5a5===_0x1aa5f0;},'djdLU':_0x7043ea(0x1ea),'Vinni':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','blBrq':_0x7043ea(0x1e3),'lEOex':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console[_0x7043ea(0x1ee)](_0x1058d9[_0x7043ea(0x241)]);const _0x2f89f5=process['stdin']['isTTY']&&process['stdout']['isTTY'];!_0x2f89f5&&!_0x4face3?.[_0x7043ea(0x1eb)]&&(console['log'](_0x7043ea(0x243)),_0x4face3={..._0x4face3,'scope':_0x7043ea(0x1f9)});const _0x21419b=_0x1058d9['oxXCY'](_0x4face3?.[_0x7043ea(0x1eb)],_0x1058d9['qsIPW']);_0x3cc207?.[_0x7043ea(0x1d9)]('git_check');const _0x270f69=_0x1058d9[_0x7043ea(0x1c8)](findGitRoot);if(!_0x270f69&&!_0x21419b){await _0x3cc207?.['trackPhaseError']('git_check',new Error(_0x1058d9[_0x7043ea(0x1e4)]));throw new Error(_0x1058d9[_0x7043ea(0x238)](_0x1058d9[_0x7043ea(0x223)],_0x1058d9['CgDhb']));}_0x3cc207?.[_0x7043ea(0x1d8)](_0x7043ea(0x236));const _0x2eef52=!_0x1058d9[_0x7043ea(0x23e)](existsSync,getRangerDir()),{path:_0x59681b}=await _0x1058d9['oJQzo'](ensureRangerDir,_0x21419b?'user':undefined);if(_0x4face3?.[_0x7043ea(0x242)])console[_0x7043ea(0x1ee)](_0x1058d9[_0x7043ea(0x1e0)]),_0x3cc207?.['trackPhaseEnd'](_0x7043ea(0x202),{'isFirstRun':_0x2eef52,'method':_0x7043ea(0x219)});else{_0x3cc207?.[_0x7043ea(0x1d9)]('auth');const _0x10e457=await authenticate(_0x21fe92);_0x3cc207?.[_0x7043ea(0x1d8)]('auth',{'isFirstRun':_0x2eef52,'method':_0x10e457['method']});}_0x3cc207?.['trackPhaseStart'](_0x1058d9['INcHq']);_0x4face3?.[_0x7043ea(0x1e1)]?console[_0x7043ea(0x1ee)](_0x1058d9['Inbnv']):await ensureChromium(_0x4face3?.['withDeps']);_0x3cc207?.[_0x7043ea(0x1d8)](_0x7043ea(0x1db),{'isFirstRun':_0x2eef52,'skipped':!!_0x4face3?.[_0x7043ea(0x1e1)]});!_0x21419b&&await writeRangerGitignore(_0x59681b);console['log'](_0x7043ea(0x224));const _0x813485=_0x4face3?.['scope'],_0x18609c=_0x4face3?.[_0x7043ea(0x226)]??![];let _0x2abe1a=null;_0x18609c?(_0x3cc207?.['trackPhaseStart'](_0x1058d9['ZLXKL']),_0x2abe1a=await ensureOpencodePluginConfig(_0x813485),_0x3cc207?.[_0x7043ea(0x1d8)](_0x1058d9['ZLXKL'],{'isFirstRun':_0x2eef52,'opencode':!![]})):(_0x3cc207?.[_0x7043ea(0x1d9)](_0x7043ea(0x1dd)),await ensureClaudePlugin(_0x813485),_0x3cc207?.[_0x7043ea(0x1d8)]('plugin',{'isFirstRun':_0x2eef52}));if(_0x18609c&&_0x2abe1a){_0x3cc207?.['trackPhaseStart'](_0x1058d9[_0x7043ea(0x220)]);try{await _0x1058d9[_0x7043ea(0x23d)](installSkill,_0x1058d9['LuGDS'],{'level':_0x2abe1a['scope'],'cliVersion':_0x1058d9[_0x7043ea(0x221)](getCurrentVersion),'platform':_0x1058d9['ZcnkQ']}),_0x3cc207?.[_0x7043ea(0x1d8)](_0x1058d9[_0x7043ea(0x220)],{'isFirstRun':_0x2eef52,'opencode':!![]});}catch(_0x2352bf){console['warn'](_0x1058d9[_0x7043ea(0x215)],_0x1058d9['XxwxN'](_0x2352bf,Error)?_0x2352bf['message']:_0x2352bf),_0x3cc207?.[_0x7043ea(0x1d8)](_0x1058d9['wstpc'],{'isFirstRun':_0x2eef52,'opencode':!![],'failed':!![]});}}else _0x3cc207?.[_0x7043ea(0x1d9)](_0x7043ea(0x235)),await ensureClaudeSkills(_0x813485),_0x3cc207?.[_0x7043ea(0x1d8)](_0x7043ea(0x235),{'isFirstRun':_0x2eef52});if(_0x4face3?.['skipAuth'])console['log'](_0x1058d9['rGIpp']);else{if(!_0x2f89f5&&!_0x4face3?.[_0x7043ea(0x214)])console['log'](_0x1058d9['dseVl']),console['log']('\x20\x20'+bold(_0x7043ea(0x22b))+'\x0a');else{_0x3cc207?.['trackPhaseStart']('profile');const _0x5b643e=await _0x1058d9['MRmVG'](ensureLocalEnv,{'url':_0x4face3?.[_0x7043ea(0x214)],'force':_0x4face3?.['force'],'allowInsecureLocalhost':_0x4face3?.['allowInsecureLocalhost'],'scope':_0x1058d9['Pohcb'](_0x4face3?.[_0x7043ea(0x1eb)],'user')?'user':undefined},_0x3cc207);_0x3cc207?.['trackPhaseEnd'](_0x1058d9['djdLU'],{'isFirstRun':_0x2eef52,'profileReady':_0x5b643e['ready'],'userSkipped':_0x5b643e['skipped']}),_0x5b643e['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}}if(_0x18609c)console[_0x7043ea(0x1ee)](_0x1058d9['Vinni']),console['log'](_0x1058d9[_0x7043ea(0x20b)]),console[_0x7043ea(0x1ee)](_0x1058d9[_0x7043ea(0x237)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x137cbd=_0x1058d9['KDZjc'](bold,'/ranger:enable');console[_0x7043ea(0x1ee)](_0x1058d9[_0x7043ea(0x238)](_0x1058d9['tCopU'](_0x1058d9['tCopU'](_0x7043ea(0x21f)+_0x137cbd+'\x20and\x20prompt\x20the\x20coding',_0x7043ea(0x203)),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),_0x7043ea(0x20f)));}}
|
|
1
|
+
function _0x2a02(){const _0x67d8d0=['✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','stdout','MvFPP','jPbZv','exit','/ranger:enable','resolve','iAfaV','DOwOV','organizationName','TrriN','5UQlnfc','\x1b[0m','HiwEf','lBwQq','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','ranger\x20setup\x20--scope=','372911llSPid','\x20and\x20prompt\x20the\x20coding','✓\x20Authenticated\x20to\x20','\x20is\x20no\x20longer\x20supported.\x20','plugin','chromium','.gitignore','success','PQISB','QIqkS','\x20\x20npx\x20playwright@','url','status','✓\x20Already\x20authenticated\x20to\x20','\x0aIn\x20Claude\x20Code,\x20run\x20','auth','KzEik','ignore','cjPyo','6bwlrTx','OCkir','1827875mwxsJi','scope','✓\x20Exported\x20credentials\x20for\x20CI','gGCTu','env','profile','message','ZigSz','Skgby','allowInsecureLocalhost','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','566064zZHZVq','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','trackPhaseStart','kKaFU','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','hmejB','platform','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','Authentication\x20failed:\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','aRpWr','playwright@','1697840TwDlTE','confirm','fcCKq','dznHl','The\x20required\x20version\x20(','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0a🚀\x20Ranger\x20Setup\x0a','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','stdin','warn','skills','win32','Installation\x20failed\x20with\x20exit\x20code\x20','\x0a\x20\x20','199194zFMHAy','skipped','trackPhaseEnd','isTTY','npx','LicDi','WAuLl','error','\x1b[1m','local','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','1679436KPkASB','force','user','close','skipAuth','OZMsl','playwright/package.json','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','1692552bPSMHb','log','CCePW','LEwKB','thTkt','✓\x20Local\x20profile\x20already\x20exists','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','owout','inherit'];_0x2a02=function(){return _0x67d8d0;};return _0x2a02();}const _0x1e5c9d=_0x37ab;(function(_0x5e4edc,_0x1714c2){const _0x563a57=_0x37ab,_0x48d925=_0x5e4edc();while(!![]){try{const _0x1b785c=-parseInt(_0x563a57(0x92))/0x1+-parseInt(_0x563a57(0xcc))/0x2*(-parseInt(_0x563a57(0xa5))/0x3)+-parseInt(_0x563a57(0xbe))/0x4+-parseInt(_0x563a57(0x8b))/0x5*(-parseInt(_0x563a57(0xd7))/0x6)+parseInt(_0x563a57(0xa7))/0x7+parseInt(_0x563a57(0xdf))/0x8+parseInt(_0x563a57(0xb2))/0x9;if(_0x1b785c===_0x1714c2)break;else _0x48d925['push'](_0x48d925['shift']());}catch(_0x40552c){_0x48d925['push'](_0x48d925['shift']());}}}(_0x2a02,0x350e7));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x4caed9 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';function _0x37ab(_0x45bd4f,_0x30625e){_0x45bd4f=_0x45bd4f-0x7e;const _0x2a022b=_0x2a02();let _0x37ab77=_0x2a022b[_0x45bd4f];return _0x37ab77;}import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x10df7d=>_0x1e5c9d(0xd4)+_0x10df7d+_0x1e5c9d(0x8c);export function getPlaywrightVersion(){const _0x4708d2=_0x1e5c9d,_0x14f425={'Wlshw':_0x4708d2(0xdd),'OZMsl':function(_0x5f11a8,_0x188078){return _0x5f11a8(_0x188078);}};try{const _0x4436f0=require[_0x4708d2(0x86)](_0x14f425['Wlshw']),_0x36d8ec=_0x14f425[_0x4708d2(0xdc)](require,_0x4436f0);return _0x36d8ec['version'];}catch{return null;}}export function installChromiumBinary(_0x4a5a25,_0xa2a60=![]){const _0x58584a=_0x1e5c9d,_0x3bcb8d={'QIpiB':function(_0x440d5f,_0x21a73d){return _0x440d5f===_0x21a73d;},'VwMGh':function(_0x14ab12,_0x3b7a27){return _0x14ab12(_0x3b7a27);},'hmejB':'install','huKuc':'--with-deps','owout':_0x58584a(0x97),'EvHvw':_0x58584a(0x7f),'MgjUI':_0x58584a(0xc9),'kKaFU':_0x58584a(0xda)};return new Promise((_0x45378a,_0x35c9de)=>{const _0x4432b7=_0x58584a,_0x3f3f6a=[_0x4432b7(0xbd)+_0x4a5a25,_0x3bcb8d[_0x4432b7(0xb7)],..._0xa2a60?[_0x3bcb8d['huKuc']]:[],_0x3bcb8d[_0x4432b7(0x7e)]],_0x189c1d=spawn(_0x4432b7(0xd0),_0x3f3f6a,{'stdio':[_0x4432b7(0xa3),_0x4432b7(0x7f),_0x3bcb8d['EvHvw']],'shell':process[_0x4432b7(0xb8)]===_0x3bcb8d['MgjUI']});_0x189c1d['on'](_0x3bcb8d[_0x4432b7(0xb5)],_0x58a2b4=>{const _0x2fac4f=_0x4432b7;_0x3bcb8d['QIpiB'](_0x58a2b4,0x0)?_0x45378a():_0x3bcb8d['VwMGh'](_0x35c9de,new Error(_0x2fac4f(0xca)+_0x58a2b4));}),_0x189c1d['on'](_0x4432b7(0xd3),_0x357c60=>{_0x35c9de(_0x357c60);});});}export async function authenticate(_0x1bab30){const _0x30a697=_0x1e5c9d,_0x12c7a7={'jPbZv':function(_0x33a8ec){return _0x33a8ec();},'GEMdL':function(_0x182620,_0x6673e0){return _0x182620 instanceof _0x6673e0;},'ZZkrL':function(_0x84aed3,_0x39521b){return _0x84aed3(_0x39521b);},'MvFPP':'device_auth','bTZHM':_0x30a697(0xa9),'cJqEJ':'provided_token'};if(!_0x1bab30){const _0x1644e5=await _0x12c7a7[_0x30a697(0x83)](getToken);if(_0x1644e5){const _0x5091f2=await getCurrentUser(_0x1644e5);if(_0x5091f2['success'])return console[_0x30a697(0xe0)](_0x30a697(0x9f)+_0x5091f2[_0x30a697(0xd9)][_0x30a697(0x89)]),{'token':_0x1644e5,'method':'existing_token'};}try{_0x1bab30=await runDeviceAuthFlow();}catch(_0x123504){throw new Error(_0x30a697(0xba)+(_0x12c7a7['GEMdL'](_0x123504,Error)?_0x123504[_0x30a697(0xad)]:_0x123504));}const _0x2fecfb=await _0x12c7a7['ZZkrL'](getCurrentUser,_0x1bab30);if(!_0x2fecfb['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x2fecfb[_0x30a697(0xd3)]);return console['log'](_0x30a697(0x94)+_0x2fecfb[_0x30a697(0xd9)][_0x30a697(0x89)]),{'token':_0x1bab30,'method':_0x12c7a7[_0x30a697(0x82)]};}console[_0x30a697(0xe0)]('Validating\x20API\x20token...');const _0x24a2ab=await _0x12c7a7['ZZkrL'](getCurrentUser,_0x1bab30);if(!_0x24a2ab[_0x30a697(0x99)]){if(_0x24a2ab[_0x30a697(0x9e)])throw new Error('Authentication\x20failed:\x20'+_0x24a2ab[_0x30a697(0xd3)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x24a2ab['error']+_0x30a697(0xc3));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x24a2ab[_0x30a697(0xd9)]['organizationName']),await storeToken(_0x1bab30),console['log'](process[_0x30a697(0xab)]['GITHUB_ENV']?_0x12c7a7['bTZHM']:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x1bab30,'method':_0x12c7a7['cJqEJ']};}export async function ensureRangerDir(_0x4c4e1f){const _0x3afa66=_0x1e5c9d,_0x2f3c29={'tWyeF':function(_0x40c7bf){return _0x40c7bf();},'BQCqE':'✓\x20Created\x20~/.ranger/\x20directory','QIqkS':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x4c4e1f;const _0x306986=_0x2f3c29['tWyeF'](getRangerHomeDir);return!existsSync(_0x306986)?(await mkdir(_0x306986,{'recursive':!![]}),console[_0x3afa66(0xe0)](_0x2f3c29['BQCqE']),{'path':_0x306986,'installed':!![]}):(console['log'](_0x2f3c29[_0x3afa66(0x9b)]),{'path':_0x306986,'installed':![]});}export async function ensureChromium(_0x4adcf7=![]){const _0x435b45=_0x1e5c9d,_0xa4cddf={'sGKGX':function(_0x11e4dd,_0x6dca26){return _0x11e4dd(_0x6dca26);},'BoeYo':function(_0x71697f){return _0x71697f();},'aRpWr':_0x435b45(0xbf),'bLBqR':'\x20(fallback\x20version)','ZigSz':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','TrriN':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','WbyVM':function(_0x5ba11e,_0x4aab72){return _0x5ba11e instanceof _0x4aab72;},'DOwOV':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','vAgoR':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x6262fb=![];try{const _0x5ac69d=chromium['executablePath']();_0x6262fb=_0xa4cddf['sGKGX'](existsSync,_0x5ac69d);}catch{_0x6262fb=![];}if(_0x6262fb)return console['log'](_0x435b45(0xbb)),![];const _0xc3420f=_0xa4cddf['BoeYo'](getPlaywrightVersion),_0x4185d8=_0xc3420f??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x2f10b6=!_0xc3420f,_0x41f4fb=process[_0x435b45(0xc6)][_0x435b45(0xcf)]&&process[_0x435b45(0x81)]['isTTY'];let _0x191a57=!![];if(_0x41f4fb){const {install:_0x5931c6}=await _0x4caed9['prompt']([{'type':_0xa4cddf[_0x435b45(0xbc)],'name':'install','message':_0x2f10b6?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x4185d8+'\x20now?':_0x435b45(0xc2)+_0x4185d8+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x191a57=_0x5931c6;}else console[_0x435b45(0xe0)](_0x435b45(0xde)+_0x4185d8+(_0x2f10b6?_0xa4cddf['bLBqR']:'')+'...');if(_0x191a57){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x4185d8,_0x4adcf7),console[_0x435b45(0xe0)](_0xa4cddf[_0x435b45(0xae)]);}catch(_0x2daeb8){console['error'](_0xa4cddf[_0x435b45(0x8a)],_0xa4cddf['WbyVM'](_0x2daeb8,Error)?_0x2daeb8[_0x435b45(0xad)]:_0x2daeb8),console[_0x435b45(0xe0)](_0xa4cddf[_0x435b45(0x88)]),console['log'](_0x435b45(0x9c)+_0x4185d8+'\x20install\x20chromium');}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0xa4cddf['vAgoR']),console[_0x435b45(0xe0)]('\x20\x20npx\x20playwright@'+_0x4185d8+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0xb536c){const _0x45dc72=_0x1e5c9d,_0x16d6f5={'OCkir':_0x45dc72(0x98),'CCePW':'✓\x20Created\x20.ranger/.gitignore'},_0x13e0d8=join(_0xb536c,_0x16d6f5[_0x45dc72(0xa6)]),_0x4f8967='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x13e0d8,_0x4f8967),console[_0x45dc72(0xe0)](_0x16d6f5[_0x45dc72(0xe1)]);}export async function ensureLocalEnv(_0x3b2f3e,_0x27222a){const _0x31e465=_0x1e5c9d,_0xab6795={'cjPyo':function(_0x1bf95d){return _0x1bf95d();},'EbtEo':function(_0x206e4b,_0x536f2a){return _0x206e4b===_0x536f2a;},'KzEik':function(_0x43cc57){return _0x43cc57();},'LEwKB':function(_0x100829,_0x27a67c,_0x3b7b05,_0x3c0539){return _0x100829(_0x27a67c,_0x3b7b05,_0x3c0539);},'RLHrj':'\x0a❌\x20Profile\x20setup\x20failed:','iAfaV':function(_0x4d7e1f,_0x1ef0e0){return _0x4d7e1f instanceof _0x1ef0e0;}};if(!_0xab6795[_0x31e465(0xa4)](findGitRoot)&&_0x3b2f3e?.[_0x31e465(0xa8)]!=='user')return console[_0x31e465(0xe0)](_0x31e465(0xc5)),{'ready':![],'skipped':!![]};const _0x4de64b=_0xab6795['EbtEo'](_0x3b2f3e?.['scope'],_0x31e465(0xd9))?_0xab6795[_0x31e465(0xa2)](getRangerHomeDir):undefined;if(findExistingEnv(_0x31e465(0xd5),{'locations':[_0x31e465(0xd5)],'rangerDir':_0x4de64b}))return console['log'](_0x31e465(0xe4)),{'ready':!![],'skipped':![]};try{return await _0xab6795[_0x31e465(0xe2)](addEnv,_0x31e465(0xd5),{'url':_0x3b2f3e?.['url'],'force':_0x3b2f3e?.['force'],'allowInsecureLocalhost':_0x3b2f3e?.[_0x31e465(0xb0)],'scope':_0x3b2f3e?.[_0x31e465(0xa8)]},_0x27222a),{'ready':!![],'skipped':![]};}catch(_0x202398){return console[_0x31e465(0xd3)](_0xab6795['RLHrj'],_0xab6795[_0x31e465(0x87)](_0x202398,Error)?_0x202398[_0x31e465(0xad)]:_0x202398),{'ready':![],'skipped':![]};}}export async function start(_0x407e54,_0x427c93,_0xb02234){const _0x42fd3e=_0x1e5c9d,_0x1eaa25={'PiuYd':function(_0x24c051,_0x341b63){return _0x24c051!==_0x341b63;},'oKUWf':function(_0x365480,_0xcfa6e1){return _0x365480(_0xcfa6e1);},'Qkdez':'user','LicDi':'✓\x20Skipping\x20authentication\x20(--skip-auth)','fcCKq':'auth','dznHl':_0x42fd3e(0xcd),'zpMOA':_0x42fd3e(0x97),'lBwQq':_0x42fd3e(0xd6),'HiwEf':_0x42fd3e(0x96),'oOZbD':function(_0x2b06c7,_0x2a4de7){return _0x2b06c7(_0x2a4de7);},'thTkt':_0x42fd3e(0xc8),'VcMAq':function(_0x3ea984){return _0x3ea984();},'iEFiJ':'opencode','ceGMo':_0x42fd3e(0xb9),'gGCTu':function(_0x1a943a,_0x222ec6){return _0x1a943a(_0x222ec6);},'WAuLl':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','DtTpd':function(_0x44dda5,_0x179962,_0xcfcd6){return _0x44dda5(_0x179962,_0xcfcd6);},'PQISB':function(_0x27542a,_0xab161){return _0x27542a+_0xab161;},'izaAK':_0x42fd3e(0xb1),'zKWjm':_0x42fd3e(0xe5),'cAASd':_0x42fd3e(0xe6),'Skgby':_0x42fd3e(0x85)};console['log'](_0x42fd3e(0xc4));_0x1eaa25['PiuYd'](_0x427c93?.['scope'],undefined)&&_0x1eaa25['PiuYd'](_0x427c93['scope'],'user')&&(console[_0x42fd3e(0xd3)](_0x42fd3e(0x91)+_0x1eaa25['oKUWf'](String,_0x427c93['scope'])+_0x42fd3e(0x95)+_0x42fd3e(0xb3)+'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.'),process[_0x42fd3e(0x84)](0x1));_0x427c93={..._0x427c93,'scope':_0x1eaa25['Qkdez']};const _0x5856c7=!existsSync(getRangerHomeDir());await ensureRangerDir('user');if(_0x427c93?.[_0x42fd3e(0xdb)])console[_0x42fd3e(0xe0)](_0x1eaa25[_0x42fd3e(0xd1)]),_0xb02234?.[_0x42fd3e(0xce)](_0x1eaa25[_0x42fd3e(0xc0)],{'isFirstRun':_0x5856c7,'method':_0x1eaa25[_0x42fd3e(0xc1)]});else{_0xb02234?.[_0x42fd3e(0xb4)](_0x42fd3e(0xa1));const _0x2962a7=await authenticate(_0x407e54);_0xb02234?.[_0x42fd3e(0xce)](_0x1eaa25[_0x42fd3e(0xc0)],{'isFirstRun':_0x5856c7,'method':_0x2962a7['method']});}_0xb02234?.['trackPhaseStart']('chromium');_0x427c93?.['skipChromium']?console[_0x42fd3e(0xe0)](_0x42fd3e(0x80)):await ensureChromium(_0x427c93?.['withDeps']);_0xb02234?.[_0x42fd3e(0xce)](_0x1eaa25['zpMOA'],{'isFirstRun':_0x5856c7,'skipped':!!_0x427c93?.['skipChromium']}),console['log'](_0x1eaa25[_0x42fd3e(0x8e)]);const _0x2e8f8f=_0x427c93?.[_0x42fd3e(0xa8)],_0x22d119=_0x427c93?.['opencode']??![];let _0x1f09e9=null;_0x22d119?(_0xb02234?.[_0x42fd3e(0xb4)](_0x1eaa25['HiwEf']),_0x1f09e9=await _0x1eaa25['oOZbD'](ensureOpencodePluginConfig,_0x2e8f8f),_0xb02234?.['trackPhaseEnd'](_0x1eaa25['HiwEf'],{'isFirstRun':_0x5856c7,'opencode':!![]})):(_0xb02234?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x2e8f8f),_0xb02234?.['trackPhaseEnd'](_0x1eaa25[_0x42fd3e(0x8d)],{'isFirstRun':_0x5856c7}));if(_0x22d119&&_0x1f09e9){_0xb02234?.[_0x42fd3e(0xb4)](_0x1eaa25[_0x42fd3e(0xe3)]);try{await installSkill('ranger',{'level':_0x1f09e9['scope'],'cliVersion':_0x1eaa25['VcMAq'](getCurrentVersion),'platform':_0x1eaa25['iEFiJ']}),_0xb02234?.[_0x42fd3e(0xce)](_0x42fd3e(0xc8),{'isFirstRun':_0x5856c7,'opencode':!![]});}catch(_0x223eac){console[_0x42fd3e(0xc7)](_0x1eaa25['ceGMo'],_0x223eac instanceof Error?_0x223eac['message']:_0x223eac),_0xb02234?.[_0x42fd3e(0xce)]('skills',{'isFirstRun':_0x5856c7,'opencode':!![],'failed':!![]});}}else _0xb02234?.['trackPhaseStart'](_0x42fd3e(0xc8)),await _0x1eaa25[_0x42fd3e(0xaa)](ensureClaudeSkills,_0x2e8f8f),_0xb02234?.['trackPhaseEnd'](_0x1eaa25['thTkt'],{'isFirstRun':_0x5856c7});if(_0x427c93?.['skipAuth'])console['log'](_0x1eaa25[_0x42fd3e(0xd2)]);else{if(_0x427c93?.['url']){_0xb02234?.[_0x42fd3e(0xb4)]('profile');const _0xdc51e9=await _0x1eaa25['DtTpd'](ensureLocalEnv,{'url':_0x427c93[_0x42fd3e(0x9d)],'force':_0x427c93?.[_0x42fd3e(0xd8)],'allowInsecureLocalhost':_0x427c93?.['allowInsecureLocalhost'],'scope':'user'},_0xb02234);_0xb02234?.[_0x42fd3e(0xce)](_0x42fd3e(0xac),{'isFirstRun':_0x5856c7,'profileReady':_0xdc51e9['ready'],'userSkipped':_0xdc51e9[_0x42fd3e(0xcd)]});}else console['log'](_0x1eaa25[_0x42fd3e(0x9a)](_0x1eaa25['PQISB']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x42fd3e(0xcb)+bold('ranger\x20profile\x20add\x20<name>'))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'),_0x42fd3e(0xb6)));}if(_0x22d119)console['log'](_0x1eaa25['izaAK']),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x42fd3e(0xe0)](_0x1eaa25['zKWjm']),console['log'](_0x1eaa25['cAASd']);else{const _0x5aa0ce=bold(_0x1eaa25[_0x42fd3e(0xaf)]);console[_0x42fd3e(0xe0)](_0x1eaa25['PQISB'](_0x42fd3e(0xa0)+_0x5aa0ce+_0x42fd3e(0x93)+_0x42fd3e(0x90),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x42fd3e(0x8f));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5866d1=_0x15d4;function _0x15d4(_0x275849,_0x42fd35){_0x275849=_0x275849-0x1c2;const _0x170262=_0x1702();let _0x15d414=_0x170262[_0x275849];return _0x15d414;}(function(_0x4608f7,_0x5d7c0a){const _0x4e5301=_0x15d4,_0x6b6f62=_0x4608f7();while(!![]){try{const _0x1973e3=-parseInt(_0x4e5301(0x1f9))/0x1+-parseInt(_0x4e5301(0x1cc))/0x2*(-parseInt(_0x4e5301(0x204))/0x3)+parseInt(_0x4e5301(0x1c9))/0x4*(parseInt(_0x4e5301(0x1f4))/0x5)+parseInt(_0x4e5301(0x1e7))/0x6*(-parseInt(_0x4e5301(0x203))/0x7)+parseInt(_0x4e5301(0x22e))/0x8*(parseInt(_0x4e5301(0x20b))/0x9)+-parseInt(_0x4e5301(0x1f8))/0xa*(-parseInt(_0x4e5301(0x224))/0xb)+parseInt(_0x4e5301(0x1cd))/0xc;if(_0x1973e3===_0x5d7c0a)break;else _0x6b6f62['push'](_0x6b6f62['shift']());}catch(_0x1c302e){_0x6b6f62['push'](_0x6b6f62['shift']());}}}(_0x1702,0x2a3ec));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';function _0x1702(){const _0x4b551e=['154090JMCQTa','409hDtXYR','disabled','LWyqZ','qBtCE','ulMOB','vyKkk','none','OQOIz','ranger@trailhead','qSAmA','86135xsvEeS','9NJYiNP','GhHRT','settingsPath','VpeTa','join','Root:\x20','path','185805beZaZF','jkSdR','plaintext','\x0a📊\x20Ranger\x20Status\x0a','string','some','name','tFlPC','configured','map','encrypted','details','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x1b]8;;file://','ignore','VJKnQ','\x20\x20Run:\x20ranger\x20skillup','project','SGYrT','hasPlaintextAuth','oCyQU','\x0a---\x20OpenCode\x20Plugin\x20---','\x20\x20Run:\x20ranger\x20update','version','11nfJWYK','length','dtWpy','error','HPHJq','Version:\x20','\x20(active)','not_configured','\x20\x20User-level:','OgrjO','56AaDhts','yypKM','\x20\x20Project-level:','zlEnq','zfUvi','\x20\x20\x20\x20Settings:\x20','API\x20Token:\x20✗\x20Not\x20found','pipe','198916dfRZmG','JDWVz','\x20plugin(s)\x20configured','108NdSuhu','443412zUTUun','No\x20profiles\x20configured',':\x20configured','hylEh','status','includes','log','isArray','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','user','organizationName','plugin','\x20(up\x20to\x20date)','\x1b]8;;\x07','parse','match','iaRFk','Nhevf','\x20\x20\x20\x20','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','AWrFy','\x0a---\x20Claude\x20Code\x20Plugin\x20---','uOxkc','push','trim','Wegge','60sYGWwj','Vgpkb','@ranger-testing/opencode-plugin','cwd','isActive','opencode-plugin','TqxMV','toString','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','unknown','ABdIa','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','stderr','10NoUnHV','isDirectory','tNGzF','\x20(latest:\x20'];_0x1702=function(){return _0x4b551e;};return _0x1702();}import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xa8c90c=>'\x1b[1m'+_0xa8c90c+'\x1b[0m',link=(_0x114ebb,_0x3269d8)=>_0x5866d1(0x219)+_0x114ebb+'\x07'+(_0x3269d8||_0x114ebb)+_0x5866d1(0x1da);async function getOpencodePluginStatus(){const _0xb8007f=_0x5866d1,_0x23450d={'swCUL':function(_0x315088,_0x453ad4){return _0x315088!==_0x453ad4;},'JDWVz':function(_0x19adc1,_0x59c808){return _0x19adc1>_0x59c808;},'dtWpy':'opencode','iaRFk':_0xb8007f(0x1c8),'qBtCE':'data','yypKM':_0xb8007f(0x227),'oCyQU':'close'};return new Promise(_0x265230=>{const _0x5c2e36=_0xb8007f,_0x1b1795={'cyCkw':'not_installed','EEBBn':function(_0x414b3c,_0x54ddca){return _0x23450d['swCUL'](_0x414b3c,_0x54ddca);},'hsgoD':function(_0x1e1077,_0x25bce7){const _0xba683c=_0x15d4;return _0x23450d[_0xba683c(0x1ca)](_0x1e1077,_0x25bce7);},'lyvea':function(_0x52a6b1,_0x57610b){return _0x52a6b1(_0x57610b);}},_0x56dcba=spawn(_0x23450d[_0x5c2e36(0x226)],['debug','config'],{'stdio':[_0x5c2e36(0x21a),_0x5c2e36(0x1c8),_0x23450d[_0x5c2e36(0x1dd)]]});let _0x1e0825='';_0x56dcba['stdout']?.['on']('data',_0x102cb0=>{const _0x30f714=_0x5c2e36;_0x1e0825+=_0x102cb0[_0x30f714(0x1ee)]();}),_0x56dcba[_0x5c2e36(0x1f3)]?.['on'](_0x23450d[_0x5c2e36(0x1fc)],_0x534e06=>{const _0x390540=_0x5c2e36;_0x1e0825+=_0x534e06[_0x390540(0x1ee)]();}),_0x56dcba['on'](_0x23450d[_0x5c2e36(0x1c2)],()=>{_0x265230({'status':_0x1b1795['cyCkw']});}),_0x56dcba['on'](_0x23450d[_0x5c2e36(0x220)],_0x2b813b=>{const _0x6efac9=_0x5c2e36,_0x1f326d={'syUGQ':_0x6efac9(0x1e9)};if(_0x1b1795['EEBBn'](_0x2b813b,0x0)){_0x265230({'status':'not_installed'});return;}const _0x48bd1b=_0x1e0825[_0x6efac9(0x1e5)]();let _0x14c87=null;if(_0x48bd1b)try{_0x14c87=JSON[_0x6efac9(0x1db)](_0x48bd1b);}catch{const _0x20c141=_0x48bd1b[_0x6efac9(0x1dc)](/\{[\s\S]*\}$/);if(_0x20c141)try{_0x14c87=JSON['parse'](_0x20c141[0x0]);}catch{_0x14c87=null;}}const _0x381ec4=Array[_0x6efac9(0x1d4)](_0x14c87?.['plugin'])?_0x14c87?.[_0x6efac9(0x1d8)]:[],_0x52c710=_0x381ec4[_0x6efac9(0x210)](_0x3a1fa0=>{const _0x185c68=_0x6efac9;if(typeof _0x3a1fa0!==_0x185c68(0x20f))return![];return _0x3a1fa0['includes'](_0x1f326d['syUGQ'])||_0x3a1fa0['includes'](_0x185c68(0x1ec));});if(_0x52c710){_0x265230({'status':_0x6efac9(0x213),'details':_0x381ec4['length']>0x0?_0x381ec4['length']+_0x6efac9(0x1cb):undefined});return;}if(_0x1b1795['hsgoD'](_0x381ec4['length'],0x0)){_0x265230({'status':'not_configured','details':_0x381ec4['length']+'\x20plugin(s)\x20configured'});return;}_0x1b1795['lyvea'](_0x265230,{'status':_0x6efac9(0x22b)});});});}async function getSkillsFromDir(_0x256dc0,_0x43c493){const _0x5e602d=_0x5866d1,_0x3333bd={'jkSdR':function(_0x2b2c8d,_0x560dd4){return _0x2b2c8d(_0x560dd4);}};if(!_0x3333bd[_0x5e602d(0x20c)](existsSync,_0x256dc0))return[];const _0x295802=[];try{const _0x18c98d=await readdir(_0x256dc0,{'withFileTypes':!![]});for(const _0x1be875 of _0x18c98d){if(_0x1be875[_0x5e602d(0x1f5)]()){const _0x448e67=join(_0x256dc0,_0x1be875['name'],'SKILL.md');if(existsSync(_0x448e67)){let _0x3bd887=_0x1be875[_0x5e602d(0x211)];try{const _0x497788=await readFile(_0x448e67,'utf-8'),_0x3cdc9e=_0x497788[_0x5e602d(0x1dc)](/name:\s*(.+)/);_0x3cdc9e&&(_0x3bd887=_0x3cdc9e[0x1]['trim']());}catch{}_0x295802[_0x5e602d(0x1e4)]({'name':_0x1be875['name'],'displayName':_0x3bd887,'path':_0x448e67,'level':_0x43c493});}}}}catch{return[];}return _0x295802;}async function getInstalledSkills(){const _0x3dc2ce=_0x5866d1,_0x91c623={'Wegge':function(_0x8728ab){return _0x8728ab();}},[_0x504748,_0x58fb27]=await Promise['all']([getSkillsFromDir(_0x91c623[_0x3dc2ce(0x1e6)](getProjectSkillsDir),_0x3dc2ce(0x21d)),getSkillsFromDir(getUserSkillsDir(),_0x3dc2ce(0x1d6))]);return{'project':_0x504748,'user':_0x58fb27};}async function getEnvironments(){const _0x2f1f07=_0x5866d1,_0x4fafc={'LWyqZ':function(_0x308043,_0x29a325,_0x422616){return _0x308043(_0x29a325,_0x422616);},'omvNQ':'settings.json','AWrFy':function(_0x404ff2,_0x5f0160,_0x2620ca){return _0x404ff2(_0x5f0160,_0x2620ca);},'vcQCD':function(_0x30517d,_0x262674,_0x113e86){return _0x30517d(_0x262674,_0x113e86);},'vXmwu':'auth.json.enc','ABdIa':function(_0x2471ef){return _0x2471ef();}},{envNames:_0x21dbd0,activeEnv:_0x16ed48}=await getEnvNames(),_0x34dd81=_0x4fafc[_0x2f1f07(0x1f1)](getRangerDir);if(!existsSync(_0x34dd81))return{'envs':[],'activeEnv':null};const _0x16bc91=_0x21dbd0[_0x2f1f07(0x214)](_0x5e2fa0=>{const _0x2edbd3=_0x2f1f07,_0x6b347c=getEnvDir(_0x5e2fa0),_0x2b085b=_0x4fafc[_0x2edbd3(0x1fb)](join,_0x6b347c,_0x4fafc['omvNQ']),_0x5a93e1=_0x4fafc[_0x2edbd3(0x1e1)](join,_0x6b347c,'auth.json'),_0x3021ef=_0x4fafc['vcQCD'](join,_0x6b347c,_0x4fafc['vXmwu']);return{'name':_0x5e2fa0,'settingsPath':existsSync(_0x2b085b)?_0x2b085b:'(not\x20found)','hasPlaintextAuth':existsSync(_0x5a93e1),'hasEncryptedAuth':existsSync(_0x3021ef),'isActive':_0x5e2fa0===_0x16ed48};});return{'envs':_0x16bc91,'activeEnv':_0x16ed48};}export async function status(){const _0x2b3380=_0x5866d1,_0x1eb723={'GhHRT':_0x2b3380(0x20e),'uOxkc':function(_0x51bc85,_0xe702f1){return _0x51bc85(_0xe702f1);},'SGYrT':function(_0x2c8310,_0x49beee){return _0x2c8310(_0x49beee);},'vyKkk':function(_0x3ae69e,_0x41eab9){return _0x3ae69e(_0x41eab9);},'OgrjO':function(_0x458926,_0x5c92ad){return _0x458926!==_0x5c92ad;},'Vgpkb':function(_0x3336ba){return _0x3336ba();},'VpeTa':function(_0x52d74c,_0x4a73ae){return _0x52d74c(_0x4a73ae);},'ulMOB':function(_0x39a504){return _0x39a504();},'tFlPC':function(_0x22d984){return _0x22d984();},'hylEh':function(_0xdf6eb9,_0xf7d8d8){return _0xdf6eb9===_0xf7d8d8;},'EFYYI':_0x2b3380(0x217),'nlxqr':_0x2b3380(0x1e2),'qSAmA':function(_0x3bd0e2,_0x1f6020){return _0x3bd0e2(_0x1f6020);},'tNGzF':_0x2b3380(0x1fa),'zfUvi':_0x2b3380(0x201),'GWBWP':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','zlEnq':'\x0a---\x20Skills\x20---','zHGbt':function(_0xc8cb12){return _0xc8cb12();},'OQOIz':'No\x20skills\x20installed','eMxjc':function(_0x16ed80,_0x4b5593){return _0x16ed80>_0x4b5593;},'VJKnQ':function(_0x4a7166,_0x210ab4,_0x1c4486){return _0x4a7166(_0x210ab4,_0x1c4486);},'XJdyy':function(_0x219f99,_0x2ea09a){return _0x219f99>_0x2ea09a;},'Gzpih':_0x2b3380(0x22c),'OZYXv':'\x0a---\x20Profiles\x20---','TqxMV':function(_0x22e805){return _0x22e805();},'mxeQR':function(_0x1acd74,_0x474bfe){return _0x1acd74===_0x474bfe;},'nNHiN':_0x2b3380(0x1ce),'YHCIr':_0x2b3380(0x22a),'Nhevf':_0x2b3380(0x20d),'svEOt':_0x2b3380(0x1ff),'OSqyW':function(_0x54960d,_0x47c1f5){return _0x54960d(_0x47c1f5);},'HPHJq':function(_0x5b6e64,_0x82c847){return _0x5b6e64(_0x82c847);}};console[_0x2b3380(0x1d3)](_0x1eb723[_0x2b3380(0x205)]);const _0x54673e=process[_0x2b3380(0x1ea)](),_0x467335=getRangerDir();if(!_0x1eb723['uOxkc'](existsSync,_0x467335)){console['log'](_0x2b3380(0x209)+link(_0x54673e,bold(basename(_0x54673e)))),console[_0x2b3380(0x1d3)](_0x2b3380(0x1d5)),console[_0x2b3380(0x1d3)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x2b3380(0x209)+link(_0x54673e,_0x1eb723[_0x2b3380(0x21e)](bold,_0x1eb723[_0x2b3380(0x1fe)](basename,_0x54673e))));const _0x52bb73=getCurrentVersion(),_0x5cb31a=getLatestVersion();if(_0x5cb31a['version']&&_0x1eb723[_0x2b3380(0x22d)](_0x5cb31a[_0x2b3380(0x223)],_0x52bb73))console['log'](_0x2b3380(0x229)+_0x52bb73+_0x2b3380(0x1f7)+_0x5cb31a[_0x2b3380(0x223)]+')'),console['log'](_0x2b3380(0x222));else _0x5cb31a['version']?console[_0x2b3380(0x1d3)](_0x2b3380(0x229)+_0x52bb73+_0x2b3380(0x1d9)):console[_0x2b3380(0x1d3)]('Version:\x20'+_0x52bb73);const _0x2057d8=await _0x1eb723[_0x2b3380(0x1e8)](getToken);if(_0x2057d8){const _0x36f8c0=await _0x1eb723['VpeTa'](getCurrentUser,_0x2057d8);_0x36f8c0['success']?console['log']('Organization:\x20'+bold(_0x36f8c0[_0x2b3380(0x1d6)][_0x2b3380(0x1d7)])):(console['log'](_0x2b3380(0x1ef)),console[_0x2b3380(0x1d3)](_0x2b3380(0x218)));}else console['log'](_0x2b3380(0x1c7)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x2b3380(0x1d3)]('API\x20Environment:\x20'+_0x1eb723['ulMOB'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x1eb723[_0x2b3380(0x1fd)](getApiBaseUrl)));console[_0x2b3380(0x1d3)](_0x2b3380(0x221));const _0x314581=await _0x1eb723[_0x2b3380(0x212)](getOpencodePluginStatus);if(_0x1eb723[_0x2b3380(0x1d0)](_0x314581[_0x2b3380(0x1d1)],_0x2b3380(0x213)))console[_0x2b3380(0x1d3)]('\x20\x20'+_0x1eb723[_0x2b3380(0x207)](bold,_0x2b3380(0x1e9))+_0x2b3380(0x1cf)),_0x314581[_0x2b3380(0x216)]&&console[_0x2b3380(0x1d3)]('\x20\x20'+_0x314581[_0x2b3380(0x216)]);else _0x1eb723['hylEh'](_0x314581[_0x2b3380(0x1d1)],_0x2b3380(0x22b))?(console['log']('\x20\x20Not\x20configured'),_0x314581[_0x2b3380(0x216)]&&console['log']('\x20\x20'+_0x314581[_0x2b3380(0x216)]),console[_0x2b3380(0x1d3)](_0x1eb723['EFYYI'])):console['log'](_0x2b3380(0x1f2));console[_0x2b3380(0x1d3)](_0x1eb723['nlxqr']);const _0x22bf4c=await _0x1eb723[_0x2b3380(0x202)](getPluginInfo,_0x2b3380(0x201));if(_0x22bf4c){const _0x51b832=_0x22bf4c['scope']||_0x2b3380(0x1f0),_0x30422f=_0x22bf4c['enabled']?'enabled':_0x1eb723[_0x2b3380(0x1f6)];console['log']('\x20\x20'+bold(_0x1eb723[_0x2b3380(0x1c5)])+':\x20installed\x20('+_0x51b832+',\x20'+_0x30422f+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x2b3380(0x1d3)](_0x1eb723['GWBWP']);console['log'](_0x1eb723[_0x2b3380(0x1c4)]);const {project:_0x4cfc30,user:_0x32667e}=await _0x1eb723['zHGbt'](getInstalledSkills),_0xefc1ef=_0x4cfc30['filter'](_0x142081=>RANGER_MANAGED_SKILLS[_0x2b3380(0x1d2)](_0x142081['name'])),_0x435903=_0x32667e['filter'](_0x173db8=>RANGER_MANAGED_SKILLS['includes'](_0x173db8['name'])),_0x3cf995=_0xefc1ef[_0x2b3380(0x225)]+_0x435903['length'];if(_0x3cf995===0x0)console['log'](_0x1eb723[_0x2b3380(0x200)]),console[_0x2b3380(0x1d3)](_0x2b3380(0x21c));else{if(_0x1eb723['eMxjc'](_0xefc1ef['length'],0x0)){console['log'](_0x2b3380(0x1c3));for(const _0x438ba3 of _0xefc1ef){console[_0x2b3380(0x1d3)](_0x2b3380(0x1df)+bold(_0x438ba3['displayName'])+':\x20'+_0x1eb723[_0x2b3380(0x21b)](link,_0x438ba3[_0x2b3380(0x20a)],_0x1eb723['vyKkk'](basename,_0x438ba3[_0x2b3380(0x20a)])));}}if(_0x1eb723['XJdyy'](_0x435903[_0x2b3380(0x225)],0x0)){console[_0x2b3380(0x1d3)](_0x1eb723['Gzpih']);for(const _0x4bfde8 of _0x435903){console['log'](_0x2b3380(0x1df)+_0x1eb723[_0x2b3380(0x1e3)](bold,_0x4bfde8['displayName'])+':\x20'+link(_0x4bfde8[_0x2b3380(0x20a)],basename(_0x4bfde8['path'])));}}}console['log'](_0x1eb723['OZYXv']);const {envs:_0x1712c7,activeEnv:_0x1ecb62}=await _0x1eb723[_0x2b3380(0x1ed)](getEnvironments);if(_0x1eb723['mxeQR'](_0x1712c7[_0x2b3380(0x225)],0x0))console['log'](_0x1eb723['nNHiN']),console['log'](_0x2b3380(0x1e0));else{for(const _0x528e88 of _0x1712c7){const _0x3744f6=_0x528e88[_0x2b3380(0x1eb)]?_0x1eb723['YHCIr']:'',_0x4d30f7=_0x528e88['hasEncryptedAuth']?_0x2b3380(0x215):_0x528e88[_0x2b3380(0x21f)]?_0x1eb723[_0x2b3380(0x1de)]:_0x1eb723['svEOt'];console[_0x2b3380(0x1d3)]('\x20\x20'+_0x1eb723['OSqyW'](bold,_0x528e88['name'])+_0x3744f6),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x4d30f7),_0x1eb723[_0x2b3380(0x22d)](_0x528e88[_0x2b3380(0x206)],'(not\x20found)')&&console['log'](_0x2b3380(0x1c6)+link(_0x528e88[_0x2b3380(0x206)],_0x1eb723[_0x2b3380(0x228)](basename,_0x528e88[_0x2b3380(0x206)])));}!_0x1ecb62&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x1712c7['map'](_0x45e6f8=>_0x45e6f8['name'])[_0x2b3380(0x208)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
function _0x1841(){const _0xce1298=['settings.json','eKggh','No\x20skills\x20installed','displayName','toString','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20setup\x20--opencode','pipe','name','Bllft','hKjda','Version:\x20','tjKae','\x20\x20Project-level:','\x1b]8;;\x07','2683782cCoOMj','UyOEz','filter','plugin','ranger@trailhead','10062150EOFIXw','zlGrY','\x20\x20Not\x20configured','AOwId','UiXrS','4128219FRNygX','auth.json','enabled','\x0a---\x20OpenCode\x20Plugin\x20---','110488ZwIUFm','520AwSjOi','HJgeZ','disabled','match','debug','@ranger-testing/opencode-plugin','\x20(latest:\x20','join','zsbcf','XVjON','close','RbsyX','SKILL.md','parse','264abPHxf','WiLIJ','No\x20profiles\x20configured','ktzif','settingsPath','details','\x1b]8;;file://','stdout','\x1b[0m','\x0a\x20\x20No\x20active\x20profile\x20set','includes',':\x20installed\x20(','isArray','log','trim','ignore','ojRVR','\x20\x20Run:\x20ranger\x20setup\x20[token]','3852672ikvvof','24845AuFeKa','1QbUoUz','kmgRV','TVRMp','all','\x0a📊\x20Ranger\x20Status\x0a','push','RzXNg','user','hoRhg','\x20plugin(s)\x20configured','not_configured','xsWCX','unknown','VJuhz','path','\x20\x20\x20\x20Auth:\x20','isDirectory','map','length','(not\x20found)','1063638fcnnIw','opencode','\x20\x20\x20\x20Settings:\x20','Oivlx','rJyMX','\x20\x20\x20\x20','bIGtc','UuLUk','version','none','status','MoQxj','configured'];_0x1841=function(){return _0xce1298;};return _0x1841();}const _0x1adf53=_0x403d;(function(_0x2b4994,_0x26793f){const _0x443892=_0x403d,_0x5b6c19=_0x2b4994();while(!![]){try{const _0x417627=parseInt(_0x443892(0x72))/0x1*(-parseInt(_0x443892(0x86))/0x2)+-parseInt(_0x443892(0xa2))/0x3+-parseInt(_0x443892(0xb1))/0x4*(-parseInt(_0x443892(0x71))/0x5)+-parseInt(_0x443892(0x70))/0x6+-parseInt(_0x443892(0xb0))/0x7*(-parseInt(_0x443892(0xbf))/0x8)+parseInt(_0x443892(0xac))/0x9+parseInt(_0x443892(0xa7))/0xa;if(_0x417627===_0x26793f)break;else _0x5b6c19['push'](_0x5b6c19['shift']());}catch(_0x4e61ad){_0x5b6c19['push'](_0x5b6c19['shift']());}}}(_0x1841,0x89817));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';function _0x403d(_0xbb2d6b,_0x4e125e){_0xbb2d6b=_0xbb2d6b-0x68;const _0x184118=_0x1841();let _0x403dcf=_0x184118[_0xbb2d6b];return _0x403dcf;}import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x358a0f=>'\x1b[1m'+_0x358a0f+_0x1adf53(0xc7),link=(_0x356468,_0x4de6bc)=>_0x1adf53(0xc5)+_0x356468+'\x07'+(_0x4de6bc||_0x356468)+_0x1adf53(0xa1);async function getOpencodePluginStatus(){const _0x3a952f=_0x1adf53,_0x2ad5d7={'NCXXc':'not_installed','hawYA':_0x3a952f(0x92),'AOwId':function(_0x44ed5e,_0x33c737){return _0x44ed5e>_0x33c737;},'ktzif':function(_0x509a93,_0x4e5a2a){return _0x509a93>_0x4e5a2a;},'TDkHT':function(_0x25966b,_0x1a1b60){return _0x25966b(_0x1a1b60);},'WqhCh':'not_configured','IpfCC':'pipe','Shcgc':_0x3a952f(0xbb)};return new Promise(_0x276f9a=>{const _0xbfee7c=_0x3a952f,_0x96ba6={'OXTSg':function(_0x53de3a,_0x2c0b25){return _0x53de3a(_0x2c0b25);},'tjKae':_0x2ad5d7['hawYA'],'Vamzv':function(_0x4b986c,_0x399e49){const _0x390e24=_0x403d;return _0x2ad5d7[_0x390e24(0xaa)](_0x4b986c,_0x399e49);},'LpTWp':function(_0x34bf73,_0x1ef712){const _0x5ac306=_0x403d;return _0x2ad5d7[_0x5ac306(0xc2)](_0x34bf73,_0x1ef712);},'Bllft':function(_0x280c14,_0x3b5e9a){return _0x2ad5d7['TDkHT'](_0x280c14,_0x3b5e9a);},'HZJpP':_0x2ad5d7['WqhCh']},_0x293eab=spawn(_0xbfee7c(0x87),[_0xbfee7c(0xb5),'config'],{'stdio':[_0xbfee7c(0x6d),_0xbfee7c(0x9a),_0x2ad5d7['IpfCC']]});let _0x3a8bf5='';_0x293eab[_0xbfee7c(0xc6)]?.['on']('data',_0x79d07c=>{_0x3a8bf5+=_0x79d07c['toString']();}),_0x293eab['stderr']?.['on']('data',_0x508221=>{const _0x1b610a=_0xbfee7c;_0x3a8bf5+=_0x508221[_0x1b610a(0x97)]();}),_0x293eab['on']('error',()=>{_0x276f9a({'status':_0x2ad5d7['NCXXc']});}),_0x293eab['on'](_0x2ad5d7['Shcgc'],_0xb188ff=>{const _0x58b494=_0xbfee7c;if(_0xb188ff!==0x0){_0x276f9a({'status':'not_installed'});return;}const _0x3be250=_0x3a8bf5['trim']();let _0x3287a7=null;if(_0x3be250)try{_0x3287a7=JSON['parse'](_0x3be250);}catch{const _0x23c19c=_0x3be250[_0x58b494(0xb4)](/\{[\s\S]*\}$/);if(_0x23c19c)try{_0x3287a7=JSON[_0x58b494(0xbe)](_0x23c19c[0x0]);}catch{_0x3287a7=null;}}const _0x5b071f=Array[_0x58b494(0x6a)](_0x3287a7?.[_0x58b494(0xa5)])?_0x3287a7?.[_0x58b494(0xa5)]:[],_0x122584=_0x5b071f['some'](_0x5ed9ab=>{const _0xb15545=_0x58b494;if(typeof _0x5ed9ab!=='string')return![];return _0x5ed9ab['includes'](_0xb15545(0xb6))||_0x5ed9ab[_0xb15545(0x68)]('opencode-plugin');});if(_0x122584){_0x96ba6['OXTSg'](_0x276f9a,{'status':_0x96ba6[_0x58b494(0x9f)],'details':_0x96ba6['Vamzv'](_0x5b071f['length'],0x0)?_0x5b071f['length']+_0x58b494(0x7b):undefined});return;}if(_0x96ba6['LpTWp'](_0x5b071f[_0x58b494(0x84)],0x0)){_0x96ba6[_0x58b494(0x9c)](_0x276f9a,{'status':_0x58b494(0x7c),'details':_0x5b071f['length']+'\x20plugin(s)\x20configured'});return;}_0x276f9a({'status':_0x96ba6['HZJpP']});});});}async function getSkillsFromDir(_0x5a5edd,_0x3768dc){const _0xbe79f7=_0x1adf53,_0x40a2b8={'axZiV':function(_0x4fb036,_0x31d292){return _0x4fb036(_0x31d292);},'RzXNg':function(_0x147e0c,_0x265b4e,_0x1ed946){return _0x147e0c(_0x265b4e,_0x1ed946);},'rJyMX':function(_0x4952b6,_0x52fac7){return _0x4952b6(_0x52fac7);},'tXpgt':'utf-8'};if(!_0x40a2b8['axZiV'](existsSync,_0x5a5edd))return[];const _0x59d1a5=[];try{const _0x5d637a=await _0x40a2b8[_0xbe79f7(0x78)](readdir,_0x5a5edd,{'withFileTypes':!![]});for(const _0x26d8b1 of _0x5d637a){if(_0x26d8b1[_0xbe79f7(0x82)]()){const _0x340d88=join(_0x5a5edd,_0x26d8b1['name'],_0xbe79f7(0xbd));if(_0x40a2b8[_0xbe79f7(0x8a)](existsSync,_0x340d88)){let _0x4ae458=_0x26d8b1[_0xbe79f7(0x9b)];try{const _0x2b14cc=await readFile(_0x340d88,_0x40a2b8['tXpgt']),_0x3763f2=_0x2b14cc['match'](/name:\s*(.+)/);_0x3763f2&&(_0x4ae458=_0x3763f2[0x1][_0xbe79f7(0x6c)]());}catch{}_0x59d1a5[_0xbe79f7(0x77)]({'name':_0x26d8b1['name'],'displayName':_0x4ae458,'path':_0x340d88,'level':_0x3768dc});}}}}catch{return[];}return _0x59d1a5;}async function getInstalledSkills(){const _0x424133=_0x1adf53,_0x1141f9={'MoQxj':function(_0x5c8d15,_0x3505c9,_0x2844e6){return _0x5c8d15(_0x3505c9,_0x2844e6);},'JLMwN':function(_0x1599bf){return _0x1599bf();},'xsWCX':function(_0x1ed481){return _0x1ed481();}},[_0x43fe39,_0x5938d7]=await Promise[_0x424133(0x75)]([_0x1141f9[_0x424133(0x91)](getSkillsFromDir,_0x1141f9['JLMwN'](getProjectSkillsDir),'project'),_0x1141f9[_0x424133(0x91)](getSkillsFromDir,_0x1141f9[_0x424133(0x7d)](getUserSkillsDir),_0x424133(0x79))]);return{'project':_0x43fe39,'user':_0x5938d7};}async function getEnvironments(){const _0x24d5b7=_0x1adf53,_0x3c628b={'ojRVR':function(_0x577cb5,_0x235814){return _0x577cb5(_0x235814);},'HJgeZ':function(_0x5ae4d1,_0x2e75c1,_0x1e02ff){return _0x5ae4d1(_0x2e75c1,_0x1e02ff);},'yWGBh':function(_0x3f1c6f,_0x377dcd){return _0x3f1c6f(_0x377dcd);},'VJuhz':function(_0x5dd3ff,_0x30043d){return _0x5dd3ff===_0x30043d;},'kmgRV':function(_0x1311d4){return _0x1311d4();}},{envNames:_0x22a4ba,activeEnv:_0x54119e}=await getEnvNames(),_0x574392=_0x3c628b[_0x24d5b7(0x73)](getRangerDir);if(!_0x3c628b['ojRVR'](existsSync,_0x574392))return{'envs':[],'activeEnv':null};const _0x3bd0ae=_0x22a4ba[_0x24d5b7(0x83)](_0x12b596=>{const _0x5e5e99=_0x24d5b7,_0x6f4af1=_0x3c628b[_0x5e5e99(0x6e)](getEnvDir,_0x12b596),_0x3b49b5=_0x3c628b[_0x5e5e99(0xb2)](join,_0x6f4af1,_0x5e5e99(0x93)),_0x9882=_0x3c628b['HJgeZ'](join,_0x6f4af1,_0x5e5e99(0xad)),_0x59599a=join(_0x6f4af1,'auth.json.enc');return{'name':_0x12b596,'settingsPath':existsSync(_0x3b49b5)?_0x3b49b5:_0x5e5e99(0x85),'hasPlaintextAuth':_0x3c628b['yWGBh'](existsSync,_0x9882),'hasEncryptedAuth':existsSync(_0x59599a),'isActive':_0x3c628b[_0x5e5e99(0x7f)](_0x12b596,_0x54119e)};});return{'envs':_0x3bd0ae,'activeEnv':_0x54119e};}export async function status(){const _0x4954be=_0x1adf53,_0x2f56cd={'chkry':_0x4954be(0x76),'zlGrY':function(_0x52d715,_0x10ff9e){return _0x52d715(_0x10ff9e);},'XVjON':function(_0x49222f,_0x8f93ed,_0x4e046d){return _0x49222f(_0x8f93ed,_0x4e046d);},'vmyjW':function(_0x4b928e){return _0x4b928e();},'PKoQP':function(_0x22619c){return _0x22619c();},'WiLIJ':function(_0x20b39a){return _0x20b39a();},'clpUk':function(_0x5e813a){return _0x5e813a();},'YpTMK':_0x4954be(0xaf),'nWmDl':'@ranger-testing/opencode-plugin','hoRhg':function(_0x54b28f,_0x48f575){return _0x54b28f===_0x48f575;},'TVRMp':'not_configured','MaMaG':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','UyOEz':function(_0x2e190e,_0x15893d){return _0x2e190e(_0x15893d);},'DpOqy':_0x4954be(0xa6),'hKjda':_0x4954be(0xae),'UuLUk':'\x20\x20Not\x20installed','ygCVA':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','UiXrS':_0x4954be(0x95),'eKggh':_0x4954be(0xa0),'RbsyX':function(_0x431b59,_0x8c629){return _0x431b59(_0x8c629);},'IvbhX':function(_0x528cfd,_0xaa4a2f){return _0x528cfd>_0xaa4a2f;},'Oivlx':'\x20\x20User-level:','MVqXE':function(_0x1a26c0,_0xaf415d){return _0x1a26c0(_0xaf415d);},'jpNnh':function(_0x37e0db,_0x3a6458,_0x1d97a9){return _0x37e0db(_0x3a6458,_0x1d97a9);},'bIGtc':function(_0x4e8270,_0x15f6e9){return _0x4e8270(_0x15f6e9);},'zsbcf':'\x20(active)'};console[_0x4954be(0x6b)](_0x2f56cd['chkry']);const _0x7e3659=process['cwd'](),_0x38a66e=getRangerDir();if(!existsSync(_0x38a66e)){console[_0x4954be(0x6b)]('Root:\x20'+link(_0x7e3659,bold(_0x2f56cd['zlGrY'](basename,_0x7e3659)))),console[_0x4954be(0x6b)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+_0x2f56cd[_0x4954be(0xba)](link,_0x7e3659,bold(_0x2f56cd['zlGrY'](basename,_0x7e3659))));const _0x133e7b=_0x2f56cd['vmyjW'](getCurrentVersion),_0x59e5dc=getLatestVersion();if(_0x59e5dc['version']&&_0x59e5dc[_0x4954be(0x8e)]!==_0x133e7b)console['log'](_0x4954be(0x9e)+_0x133e7b+_0x4954be(0xb7)+_0x59e5dc['version']+')'),console[_0x4954be(0x6b)]('\x20\x20Run:\x20ranger\x20update');else _0x59e5dc[_0x4954be(0x8e)]?console['log'](_0x4954be(0x9e)+_0x133e7b+_0x4954be(0x98)):console['log']('Version:\x20'+_0x133e7b);const _0x11645d=await _0x2f56cd['PKoQP'](getToken);if(_0x11645d){const _0x278f15=await _0x2f56cd[_0x4954be(0xa8)](getCurrentUser,_0x11645d);_0x278f15['success']?console['log']('Organization:\x20'+_0x2f56cd[_0x4954be(0xa8)](bold,_0x278f15['user']['organizationName'])):(console[_0x4954be(0x6b)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x4954be(0x6b)](_0x4954be(0x6f)));}else console[_0x4954be(0x6b)]('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x4954be(0x6b)]('API\x20Environment:\x20'+_0x2f56cd[_0x4954be(0xc0)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x2f56cd['clpUk'](getApiBaseUrl)));console[_0x4954be(0x6b)](_0x2f56cd['YpTMK']);const _0x381d19=await getOpencodePluginStatus();if(_0x381d19[_0x4954be(0x90)]===_0x4954be(0x92))console[_0x4954be(0x6b)]('\x20\x20'+bold(_0x2f56cd['nWmDl'])+':\x20configured'),_0x381d19['details']&&console['log']('\x20\x20'+_0x381d19['details']);else _0x2f56cd[_0x4954be(0x7a)](_0x381d19[_0x4954be(0x90)],_0x2f56cd[_0x4954be(0x74)])?(console['log'](_0x4954be(0xa9)),_0x381d19['details']&&console[_0x4954be(0x6b)]('\x20\x20'+_0x381d19[_0x4954be(0xc4)]),console[_0x4954be(0x6b)](_0x4954be(0x99))):console['log'](_0x2f56cd['MaMaG']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0xc1ce61=await _0x2f56cd[_0x4954be(0xa3)](getPluginInfo,_0x2f56cd['DpOqy']);if(_0xc1ce61){const _0x47b67d=_0xc1ce61['scope']||_0x4954be(0x7e),_0x155f14=_0xc1ce61['enabled']?_0x2f56cd[_0x4954be(0x9d)]:_0x4954be(0xb3);console['log']('\x20\x20'+bold('ranger@trailhead')+_0x4954be(0x69)+_0x47b67d+',\x20'+_0x155f14+')');}else console[_0x4954be(0x6b)](_0x2f56cd[_0x4954be(0x8d)]),console[_0x4954be(0x6b)](_0x2f56cd['ygCVA']);console[_0x4954be(0x6b)]('\x0a---\x20Skills\x20---');const {project:_0x24e83d,user:_0x13fada}=await getInstalledSkills(),_0x2d7fd4=_0x24e83d[_0x4954be(0xa4)](_0xb29119=>RANGER_MANAGED_SKILLS[_0x4954be(0x68)](_0xb29119['name'])),_0x141b33=_0x13fada['filter'](_0x1ea885=>RANGER_MANAGED_SKILLS['includes'](_0x1ea885['name'])),_0x2a396e=_0x2d7fd4['length']+_0x141b33[_0x4954be(0x84)];if(_0x2f56cd['hoRhg'](_0x2a396e,0x0))console['log'](_0x2f56cd[_0x4954be(0xab)]),console[_0x4954be(0x6b)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x2d7fd4[_0x4954be(0x84)]>0x0){console[_0x4954be(0x6b)](_0x2f56cd[_0x4954be(0x94)]);for(const _0x36b6c1 of _0x2d7fd4){console['log'](_0x4954be(0x8b)+bold(_0x36b6c1[_0x4954be(0x96)])+':\x20'+link(_0x36b6c1[_0x4954be(0x80)],_0x2f56cd['RbsyX'](basename,_0x36b6c1['path'])));}}if(_0x2f56cd['IvbhX'](_0x141b33[_0x4954be(0x84)],0x0)){console['log'](_0x2f56cd[_0x4954be(0x89)]);for(const _0x1c3297 of _0x141b33){console['log'](_0x4954be(0x8b)+_0x2f56cd['MVqXE'](bold,_0x1c3297['displayName'])+':\x20'+_0x2f56cd['jpNnh'](link,_0x1c3297[_0x4954be(0x80)],_0x2f56cd[_0x4954be(0x8c)](basename,_0x1c3297['path'])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x2fe950,activeEnv:_0x4dc856}=await getEnvironments();if(_0x2fe950[_0x4954be(0x84)]===0x0)console['log'](_0x4954be(0xc1)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x52dbd4 of _0x2fe950){const _0x527ad9=_0x52dbd4['isActive']?_0x2f56cd[_0x4954be(0xb9)]:'',_0x36b551=_0x52dbd4['hasEncryptedAuth']?'encrypted':_0x52dbd4['hasPlaintextAuth']?'plaintext':_0x4954be(0x8f);console['log']('\x20\x20'+bold(_0x52dbd4[_0x4954be(0x9b)])+_0x527ad9),console['log'](_0x4954be(0x81)+_0x36b551),_0x52dbd4['settingsPath']!==_0x4954be(0x85)&&console[_0x4954be(0x6b)](_0x4954be(0x88)+_0x2f56cd['jpNnh'](link,_0x52dbd4[_0x4954be(0xc3)],_0x2f56cd[_0x4954be(0xbc)](basename,_0x52dbd4['settingsPath'])));}!_0x4dc856&&(console['log'](_0x4954be(0xc8)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x2fe950[_0x4954be(0x83)](_0x36d2aa=>_0x36d2aa[_0x4954be(0x9b)])[_0x4954be(0xb8)](',\x20')+')'));}console[_0x4954be(0x6b)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x263d55,_0x7b5125){const _0x137af5=_0x2c54,_0x203fc9=_0x263d55();while(!![]){try{const _0x45ed2e=parseInt(_0x137af5(0xc6))/0x1+-parseInt(_0x137af5(0x94))/0x2+-parseInt(_0x137af5(0xcf))/0x3*(-parseInt(_0x137af5(0xd2))/0x4)+-parseInt(_0x137af5(0x8c))/0x5*(parseInt(_0x137af5(0x89))/0x6)+-parseInt(_0x137af5(0xb5))/0x7*(parseInt(_0x137af5(0x8d))/0x8)+parseInt(_0x137af5(0xd3))/0x9+-parseInt(_0x137af5(0xce))/0xa*(-parseInt(_0x137af5(0x87))/0xb);if(_0x45ed2e===_0x7b5125)break;else _0x203fc9['push'](_0x203fc9['shift']());}catch(_0x1563f9){_0x203fc9['push'](_0x203fc9['shift']());}}}(_0x4977,0x413ba));function _0x4977(){const _0x55f32e=['raxEE','xiGKW','121786aqsnKp','CHukW','@latest','join','push','\x0a✅\x20Update\x20complete!','length','kakZi','ufVMU','stdio','update','kill','aHXaF','.gitignore','\x0aCould\x20not\x20check\x20latest\x20version:\x20','npm','kyaYd','381584vjMJBk','qndri','split','GROBx','kyLrw','sxJXl','BbWAB','ignore','20qfQwBE','3xNnDCG','✓\x20Migrated\x20active\x20profile\x20file','platform','872792UHHyaZ','471393WKxbTQ','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','MuFdJ','\x20\x20Failed\x20to\x20reinstall\x20','glhQp','766601zhrkCl','project','2134866QIhGcB','error','claude','5FKsyUB','8Pxnlul','WzvAr','log','EzNIK','EENry','close','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','302276SNZqaY','utf-8','Opxcu','version','DJuar','endsWith','OkrCG','install','pcpVe','EffJW','warn','vHoUQ','opencode','inherit','CjBmK',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','RJlca','PaxhD','qzMyp','\x20skill\x20','QdGiC','timeoutMs','ranger@trailhead','Claude\x20plugin\x20update\x20failed\x20for\x20','findIndex','qxtQs','dwMDG','user','active-profile.txt','trim','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'];_0x4977=function(){return _0x55f32e;};return _0x4977();}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x2c54(_0x3957b9,_0x3392df){_0x3957b9=_0x3957b9-0x87;const _0x49778c=_0x4977();let _0x2c5448=_0x49778c[_0x3957b9];return _0x2c5448;}async function runCommand(_0x498561,_0x4b3297,_0x4d05dc){const _0x3229fd=_0x2c54,_0x541713={'glhQp':function(_0x3b2bb3,_0xb48c68){return _0x3b2bb3(_0xb48c68);},'yLcwC':function(_0x307bc6,_0x250507,_0x2d1b81,_0x3f18fd){return _0x307bc6(_0x250507,_0x2d1b81,_0x3f18fd);},'Tnluo':_0x3229fd(0xcd),'aHXaF':_0x3229fd(0xa1),'DJuar':'win32','CjBmK':'close','OkrCG':_0x3229fd(0x8a)};return new Promise(_0x27cbb2=>{const _0x48f39a=_0x3229fd,_0x57b591={'qndri':function(_0x364ca4,_0x30966d){const _0x5ee579=_0x2c54;return _0x541713[_0x5ee579(0xd7)](_0x364ca4,_0x30966d);}};let _0x4c7056=![],_0x2e30a6;const _0x393bdf=_0x22239d=>{const _0x2ff1e5=_0x2c54;if(_0x4c7056)return;_0x4c7056=!![],_0x2e30a6&&_0x57b591[_0x2ff1e5(0xc7)](clearTimeout,_0x2e30a6),_0x27cbb2(_0x22239d);},_0x50eba1=_0x541713['yLcwC'](spawn,_0x498561,_0x4b3297,{'stdio':[_0x541713['Tnluo'],_0x4d05dc?.[_0x48f39a(0xbe)]??_0x48f39a(0xa1),_0x4d05dc?.[_0x48f39a(0xbe)]??_0x541713[_0x48f39a(0xc1)]],'shell':process[_0x48f39a(0xd1)]===_0x541713[_0x48f39a(0x98)]});_0x2e30a6=_0x4d05dc?.[_0x48f39a(0xa9)]?setTimeout(()=>{const _0x2120a6=_0x48f39a;_0x50eba1[_0x2120a6(0xc0)](),_0x50eba1['unref'](),_0x393bdf(![]);},_0x4d05dc[_0x48f39a(0xa9)]):undefined,_0x50eba1['on'](_0x541713[_0x48f39a(0xa2)],_0x577c79=>{_0x393bdf(_0x577c79===0x0);}),_0x50eba1['on'](_0x541713[_0x48f39a(0x9a)],()=>{_0x393bdf(![]);});});}async function runInstall(){const _0x514ff3=_0x2c54,_0x27488f={'vhuxb':function(_0x1cbd57,_0x325ac3){return _0x1cbd57(_0x325ac3);},'Ydftn':function(_0x1b3fae,_0xbe8252){return _0x1b3fae===_0xbe8252;},'PaxhD':function(_0x4c9604,_0x9b24e3,_0x254f66,_0x44f07b){return _0x4c9604(_0x9b24e3,_0x254f66,_0x44f07b);},'EffJW':_0x514ff3(0xc4),'LetAP':_0x514ff3(0x9b),'kyLrw':'win32','vHoUQ':_0x514ff3(0x92),'pcpVe':_0x514ff3(0x8a)};return new Promise(_0x3ce29b=>{const _0x35deb6=_0x514ff3,_0x4fbf80={'BbWAB':function(_0x4c9103,_0xbaf04e){return _0x27488f['vhuxb'](_0x4c9103,_0xbaf04e);},'MuFdJ':function(_0x1c2071,_0x484cc1){return _0x27488f['Ydftn'](_0x1c2071,_0x484cc1);}};console[_0x35deb6(0x8f)]('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x1cc215=_0x27488f[_0x35deb6(0xa5)](spawn,_0x27488f[_0x35deb6(0x9d)],[_0x27488f['LetAP'],'-g',PACKAGE_NAME+_0x35deb6(0xb7)],{'stdio':[_0x35deb6(0xcd),'inherit','inherit'],'shell':process['platform']===_0x27488f[_0x35deb6(0xca)]});_0x1cc215['on'](_0x27488f[_0x35deb6(0x9f)],_0x4dff12=>{const _0x457626=_0x35deb6;_0x4fbf80[_0x457626(0xcc)](_0x3ce29b,_0x4fbf80[_0x457626(0xd5)](_0x4dff12,0x0));}),_0x1cc215['on'](_0x27488f[_0x35deb6(0x9c)],()=>{const _0x5965ff=_0x35deb6;_0x4fbf80[_0x5965ff(0xcc)](_0x3ce29b,![]);});});}async function updateClaudeMarketplace(){const _0x42432c=_0x2c54,_0x16ca82={'TjZZK':function(_0x57ed25,_0x4988b8,_0x426461,_0x3e2b05){return _0x57ed25(_0x4988b8,_0x426461,_0x3e2b05);},'sxJXl':'marketplace','RJlca':_0x42432c(0xbf),'wvVKm':'trailhead','Qpfro':_0x42432c(0xd4)},_0x21b957=await _0x16ca82['TjZZK'](runCommand,_0x42432c(0x8b),['plugin',_0x16ca82[_0x42432c(0xcb)],_0x16ca82[_0x42432c(0xa4)],_0x16ca82['wvVKm']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x21b957)throw new Error(_0x16ca82['Qpfro']);}async function updateClaudePlugin(_0x5c4626){const _0x5cca33=_0x2c54,_0x3bde40={'kakZi':'update','PgzYt':'--scope','AXvJr':function(_0x2f2c85,_0x2bd93f,_0x2a1196,_0x45904f){return _0x2f2c85(_0x2bd93f,_0x2a1196,_0x45904f);},'YDrRK':_0x5cca33(0x8b),'GvcsI':function(_0x2e6776,_0x119ca7){return _0x2e6776??_0x119ca7;},'qzMyp':_0x5cca33(0xaf)},_0x1c250c=['plugin',_0x3bde40[_0x5cca33(0xbc)],_0x5cca33(0xaa)];_0x5c4626&&_0x1c250c['push'](_0x3bde40['PgzYt'],_0x5c4626);const _0x30b2f4=await _0x3bde40['AXvJr'](runCommand,_0x3bde40['YDrRK'],_0x1c250c,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x30b2f4){const _0x5339b5=_0x3bde40['GvcsI'](_0x5c4626,_0x3bde40[_0x5cca33(0xa6)]);throw new Error(_0x5cca33(0xab)+_0x5339b5+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0xcddc09,_0x21110a,_0x1ea5c0){const _0x4364a6={'pTWqX':function(_0x1af966,_0x6b001b){return _0x1af966(_0x6b001b);}},_0x3747d3=_0x1ea5c0==='opencode'?getOpencodeSkillsDir(_0x21110a):_0x4364a6['pTWqX'](getSkillsDir,_0x21110a),_0x4b8ba6=join(_0x3747d3,_0xcddc09);return existsSync(_0x4b8ba6);}async function reinstallSkills(_0x54912a){const _0x4b6ac8=_0x2c54,_0x525d0b={'kyaYd':'project','EENry':'user','REsfi':function(_0x4738ec,_0x5786a5,_0x3c5a5b,_0x180363){return _0x4738ec(_0x5786a5,_0x3c5a5b,_0x180363);},'pwyFn':_0x4b6ac8(0x8b),'Opxcu':_0x4b6ac8(0xa0),'xHEpk':function(_0x4930d7,_0x1f71ac,_0x14854c){return _0x4930d7(_0x1f71ac,_0x14854c);},'ufVMU':function(_0x25aabe,_0x48874e){return _0x25aabe===_0x48874e;}},_0x242384=[_0x525d0b[_0x4b6ac8(0xc5)],_0x525d0b[_0x4b6ac8(0x91)]],_0x95103d=[];for(const _0x1238a5 of _0x242384){for(const _0xa396f of RANGER_MANAGED_SKILLS){_0x525d0b['REsfi'](isSkillInstalled,_0xa396f,_0x1238a5,'claude')&&_0x95103d[_0x4b6ac8(0xb9)]({'skillName':_0xa396f,'level':_0x1238a5,'platform':_0x525d0b['pwyFn']}),_0x525d0b['REsfi'](isSkillInstalled,_0xa396f,_0x1238a5,_0x525d0b[_0x4b6ac8(0x96)])&&_0x95103d[_0x4b6ac8(0xb9)]({'skillName':_0xa396f,'level':_0x1238a5,'platform':_0x525d0b[_0x4b6ac8(0x96)]});}}for(const _0x24c066 of _0x242384){for(const _0x2dea9d of DEPRECATED_SKILLS){await _0x525d0b['xHEpk'](removeSkill,_0x2dea9d,_0x24c066);}}if(_0x525d0b[_0x4b6ac8(0xbd)](_0x95103d[_0x4b6ac8(0xbb)],0x0)){console['log'](_0x4b6ac8(0xb2));return;}console[_0x4b6ac8(0x8f)]('\x0aReinstalling\x20'+_0x95103d[_0x4b6ac8(0xbb)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x111b1c,level:_0x574e3b,platform:_0x2ae2ff}of _0x95103d){try{await installSkill(_0x111b1c,{'level':_0x574e3b,'cliVersion':_0x54912a,'platform':_0x2ae2ff});}catch(_0x9556f0){console['warn'](_0x4b6ac8(0xd6)+_0x2ae2ff+'\x20'+_0x574e3b+_0x4b6ac8(0xa7)+_0x111b1c+':',_0x9556f0);}}}async function ensureActiveProfileGitignored(){const _0x2773bb=_0x2c54,_0x3b1305={'JcJBs':function(_0x1b3004,_0x2ab72f,_0x518a31){return _0x1b3004(_0x2ab72f,_0x518a31);},'GROBx':_0x2773bb(0xc2),'uzMAj':function(_0x4ce2ab,_0x5bf5a4){return _0x4ce2ab(_0x5bf5a4);},'QdGiC':function(_0x10117c,_0x356fc4,_0x1cc439){return _0x10117c(_0x356fc4,_0x1cc439);},'WzvAr':'active-profile.txt','SwMNv':_0x2773bb(0x95)},_0x1cf2ce=_0x3b1305['JcJBs'](join,getRangerDir(),_0x3b1305[_0x2773bb(0xc9)]);if(!_0x3b1305['uzMAj'](existsSync,_0x1cf2ce))return![];let _0x4c4242='';try{_0x4c4242=await _0x3b1305[_0x2773bb(0xa8)](readFile,_0x1cf2ce,_0x2773bb(0x95));}catch{return![];}const _0x275489=_0x4c4242[_0x2773bb(0xc8)](/\r?\n/);if(_0x275489['some'](_0x8ba336=>_0x8ba336[_0x2773bb(0xb1)]()===_0x2773bb(0xb0)))return![];let _0x58ae7c=_0x275489[_0x2773bb(0xac)](_0x340c77=>_0x340c77[_0x2773bb(0xb1)]()==='active-feature.txt');_0x58ae7c===-0x1&&(_0x58ae7c=_0x275489[_0x2773bb(0xbb)]);_0x275489['splice'](_0x58ae7c,0x0,_0x3b1305[_0x2773bb(0x8e)]);let _0x355eab=_0x275489[_0x2773bb(0xb8)]('\x0a');!_0x355eab[_0x2773bb(0x99)]('\x0a')&&(_0x355eab+='\x0a');try{await writeFile(_0x1cf2ce,_0x355eab,_0x3b1305['SwMNv']);}catch{return![];}return!![];}export async function update(){const _0x2ea9b8=_0x2c54,_0x4f5906={'xiGKW':function(_0xa665ac){return _0xa665ac();},'EzNIK':'Attempting\x20install\x20anyway...','VHrhM':'\x0aSuccessfully\x20installed\x20latest\x20version.','dwMDG':function(_0x5567a2,_0x479aa6){return _0x5567a2===_0x479aa6;},'EGtxR':function(_0x5dc91f,_0x5da2a7){return _0x5dc91f(_0x5da2a7);},'raxEE':function(_0x2bfef7,_0x3f8c5a){return _0x2bfef7(_0x3f8c5a);},'CHukW':'ranger@trailhead','IoEpa':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','qxtQs':_0x2ea9b8(0xd0),'fCWUm':_0x2ea9b8(0xba)},_0x3b17f2=_0x4f5906['xiGKW'](getCurrentVersion);console[_0x2ea9b8(0x8f)]('\x0aCurrent\x20version:\x20'+_0x3b17f2),console[_0x2ea9b8(0x8f)]('Checking\x20for\x20updates...');const _0x81cca7=_0x4f5906[_0x2ea9b8(0xb4)](getLatestVersion);let _0x47fa53=_0x3b17f2;if(!_0x81cca7[_0x2ea9b8(0x97)]){console[_0x2ea9b8(0x9e)](_0x2ea9b8(0xc3)+_0x81cca7[_0x2ea9b8(0x8a)]),console[_0x2ea9b8(0x8f)](_0x4f5906[_0x2ea9b8(0x90)]);const _0x892a7c=await _0x4f5906[_0x2ea9b8(0xb4)](runInstall);if(_0x892a7c)console[_0x2ea9b8(0x8f)](_0x4f5906['VHrhM']),_0x47fa53=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x81cca7['error']);}else{const _0x22c4dc=_0x81cca7[_0x2ea9b8(0x97)];console['log']('Latest\x20version:\x20\x20'+_0x22c4dc);const _0x31d6a8=compareVersions(_0x3b17f2,_0x22c4dc);if(_0x4f5906['dwMDG'](_0x31d6a8,0x0))console[_0x2ea9b8(0x8f)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x31d6a8<0x0)console['log']('\x0aYour\x20version\x20('+_0x3b17f2+_0x2ea9b8(0xa3)+_0x22c4dc+').');else{const _0x15a993=await runInstall();if(_0x15a993)console[_0x2ea9b8(0x8f)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x22c4dc),_0x47fa53=_0x22c4dc;else throw new Error('Update\x20failed.');}}}await _0x4f5906['EGtxR'](reinstallSkills,_0x47fa53);const _0x115b0a=await isMarketplaceAdded('trailhead'),_0x322624=await _0x4f5906['raxEE'](isPluginInstalled,_0x4f5906[_0x2ea9b8(0xb6)]);_0x115b0a&&(await updateClaudeMarketplace(),console[_0x2ea9b8(0x8f)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x322624){const _0x2179d1=await getPluginInfo(_0x4f5906['CHukW']);_0x4f5906[_0x2ea9b8(0xae)](_0x2179d1?.['scope'],_0x2ea9b8(0x88))?(await _0x4f5906[_0x2ea9b8(0xb3)](updateClaudePlugin,_0x2ea9b8(0x88)),console['log'](_0x2ea9b8(0x93))):(await updateClaudePlugin(),console['log'](_0x4f5906['IoEpa']));}const _0x1dcb87=await migrateActiveProfileFile();_0x1dcb87&&console['log'](_0x4f5906[_0x2ea9b8(0xad)]);const _0x29b7d9=await ensureActiveProfileGitignored();console['log'](_0x4f5906['fCWUm']);}
|
|
1
|
+
const _0x5bd908=_0x52bd;(function(_0x4b34d6,_0x3baf3a){const _0x28983e=_0x52bd,_0x488622=_0x4b34d6();while(!![]){try{const _0x5ecce9=parseInt(_0x28983e(0xbd))/0x1*(-parseInt(_0x28983e(0xb2))/0x2)+-parseInt(_0x28983e(0x9b))/0x3*(parseInt(_0x28983e(0xd6))/0x4)+-parseInt(_0x28983e(0x98))/0x5*(parseInt(_0x28983e(0xe9))/0x6)+parseInt(_0x28983e(0xba))/0x7+parseInt(_0x28983e(0xbc))/0x8+-parseInt(_0x28983e(0x97))/0x9*(-parseInt(_0x28983e(0x9e))/0xa)+parseInt(_0x28983e(0xa6))/0xb*(parseInt(_0x28983e(0xe6))/0xc);if(_0x5ecce9===_0x3baf3a)break;else _0x488622['push'](_0x488622['shift']());}catch(_0x202522){_0x488622['push'](_0x488622['shift']());}}}(_0x3298,0x283a7));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x52bd(_0x3c59fd,_0x2f8d53){_0x3c59fd=_0x3c59fd-0x95;const _0x32982f=_0x3298();let _0x52bd8f=_0x32982f[_0x3c59fd];return _0x52bd8f;}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';function _0x3298(){const _0x3255f9=['\x0aCurrent\x20version:\x20','sjRmr','1371034QKNbyR','CUtoe','310960eqmucD','289031EhzkSd','PuuKD','qnRNp','Claude\x20plugin\x20update\x20failed\x20for\x20','eEgxD','opencode','ignore','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','\x20skill\x20','trim','plugin','\x0a✅\x20Update\x20complete!','TRGMv','gkcnU','claude','WLiDm','\x0aCould\x20not\x20check\x20latest\x20version:\x20','Latest\x20version:\x20\x20','\x0aReinstalling\x20','inherit','vswnv','alpha','local','JxIVI','latest','4BiiIkQ','mUqqW','Ozevn','push','\x0aSuccessfully\x20updated\x20to\x20version\x20','timeoutMs','ocPpe','Prerelease\x20channel\x20detected\x20(@','log','Checking\x20for\x20updates...','split','Update\x20failed:\x20','scope','skqFv','WFwqk','warn','12JffurF','kill','Ywtbe','19770PTIjeo','error','\x0aSuccessfully\x20installed\x20latest\x20version.','knVLr','version','JtAlK','QfvxM','9DaFVLD','365tNhUrn','--scope','uywSO','950541oKZIjz','utf-8','trailhead','2711590gFtRXn','marketplace','project','gYUCY','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','close','ranger@trailhead','Attempting\x20install\x20anyway...','5558267sdbuic','stdio','EmqSQ','user','update','xYfMc','endsWith','length','yJkHc','win32','EfEoE','npm','2lCakQT','active-profile.txt','DAOuo','\x0aInstalling\x20','platform','hiCgE'];_0x3298=function(){return _0x3255f9;};return _0x3298();}import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x108c21,_0x42ab72,_0x10055f){const _0x8fc21c={'vswnv':function(_0x58648d,_0x59983c){return _0x58648d(_0x59983c);},'hiCgE':function(_0x18c23b,_0xc19268){return _0x18c23b(_0xc19268);},'sjRmr':function(_0x5647e0,_0x2a76de){return _0x5647e0===_0x2a76de;},'ookeS':'error'};return new Promise(_0x49d16a=>{const _0x2013b1=_0x52bd;let _0x144a13=![],_0x2e696b;const _0x447a1a=_0x2fb1d3=>{if(_0x144a13)return;_0x144a13=!![],_0x2e696b&&_0x8fc21c['vswnv'](clearTimeout,_0x2e696b),_0x8fc21c['vswnv'](_0x49d16a,_0x2fb1d3);},_0x570a06=spawn(_0x108c21,_0x42ab72,{'stdio':['ignore',_0x10055f?.[_0x2013b1(0xa7)]??'inherit',_0x10055f?.[_0x2013b1(0xa7)]??'inherit'],'cwd':_0x10055f?.['cwd'],'shell':process[_0x2013b1(0xb6)]==='win32'});_0x2e696b=_0x10055f?.[_0x2013b1(0xdb)]?setTimeout(()=>{const _0x112c61=_0x2013b1;_0x570a06[_0x112c61(0xe7)](),_0x570a06['unref'](),_0x8fc21c[_0x112c61(0xd1)](_0x447a1a,![]);},_0x10055f[_0x2013b1(0xdb)]):undefined,_0x570a06['on'](_0x2013b1(0xa3),_0x3e4dc4=>{const _0x55b9b2=_0x2013b1;_0x8fc21c[_0x55b9b2(0xb7)](_0x447a1a,_0x8fc21c[_0x55b9b2(0xb9)](_0x3e4dc4,0x0));}),_0x570a06['on'](_0x8fc21c['ookeS'],()=>{_0x447a1a(![]);});});}export function resolveDistTag(_0xf24739){const _0x590a6d=_0x52bd,_0x442a82={'gkcnU':'beta','YaZdw':'latest'};if(/-alpha\./i['test'](_0xf24739))return _0x590a6d(0xd2);if(/-beta\./i['test'](_0xf24739))return _0x442a82[_0x590a6d(0xca)];if(/-rc\./i['test'](_0xf24739))return'rc';return _0x442a82['YaZdw'];}async function runInstall(_0x40fb99=_0x5bd908(0xd5)){const _0x2d106f=_0x5bd908,_0x10ae65={'jiVzD':function(_0x426ea3,_0x86731d){return _0x426ea3(_0x86731d);},'JtAlK':function(_0x19f819,_0x894dd5,_0x19b3fb,_0x15552c){return _0x19f819(_0x894dd5,_0x19b3fb,_0x15552c);},'mUqqW':'inherit','yJkHc':_0x2d106f(0xa3)};return new Promise(_0x50d4f7=>{const _0x17c1e9=_0x2d106f,_0x520336={'eEgxD':function(_0x3192b3,_0x3ac58e){return _0x10ae65['jiVzD'](_0x3192b3,_0x3ac58e);},'Ywtbe':function(_0x4c49ca,_0x444bc2){return _0x4c49ca===_0x444bc2;}};console[_0x17c1e9(0xde)](_0x17c1e9(0xb5)+PACKAGE_NAME+'@'+_0x40fb99+'...\x0a');const _0x1583ff=_0x10ae65[_0x17c1e9(0x95)](spawn,_0x17c1e9(0xb1),['install','-g',PACKAGE_NAME+'@'+_0x40fb99],{'stdio':[_0x17c1e9(0xc3),_0x10ae65[_0x17c1e9(0xd7)],_0x17c1e9(0xd0)],'shell':process['platform']===_0x17c1e9(0xaf)});_0x1583ff['on'](_0x10ae65[_0x17c1e9(0xae)],_0x2be8fa=>{const _0x49d646=_0x17c1e9;_0x520336[_0x49d646(0xc1)](_0x50d4f7,_0x520336[_0x49d646(0xe8)](_0x2be8fa,0x0));}),_0x1583ff['on'](_0x17c1e9(0xea),()=>{_0x50d4f7(![]);});});}async function updateClaudeMarketplace(){const _0x301b61=_0x5bd908,_0x54ad5d={'DAOuo':_0x301b61(0x9d),'gYUCY':_0x301b61(0xc4)},_0x1ecd53=await runCommand('claude',[_0x301b61(0xc7),_0x301b61(0x9f),_0x301b61(0xaa),_0x54ad5d[_0x301b61(0xb4)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x1ecd53)throw new Error(_0x54ad5d[_0x301b61(0xa1)]);}async function updateClaudePlugin(_0x239821=_0x5bd908(0xa9)){const _0x3fbc6b=_0x5bd908,_0x2254e9={'Ozevn':_0x3fbc6b(0xaa),'WBzYr':'ranger@trailhead','skqFv':_0x3fbc6b(0x99),'ZdAgA':function(_0x15fd57,_0xbb6ebe,_0xee6724,_0x1f917f){return _0x15fd57(_0xbb6ebe,_0xee6724,_0x1f917f);},'QfvxM':function(_0x48560e,_0x50e6d7){return _0x48560e===_0x50e6d7;}},_0x3a61ee=[_0x3fbc6b(0xc7),_0x2254e9[_0x3fbc6b(0xd8)],_0x2254e9['WBzYr']];_0x239821!=='user'&&_0x3a61ee[_0x3fbc6b(0xd9)](_0x2254e9[_0x3fbc6b(0xe3)],_0x239821);const _0x4bbfa1=await _0x2254e9['ZdAgA'](runCommand,_0x3fbc6b(0xcb),_0x3a61ee,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x239821===_0x3fbc6b(0xa0)||_0x2254e9[_0x3fbc6b(0x96)](_0x239821,_0x3fbc6b(0xd3))?getProjectRoot():undefined});if(!_0x4bbfa1)throw new Error(_0x3fbc6b(0xc0)+_0x239821+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x182fa7,_0x2493af,_0x4ab745){const _0x598189=_0x5bd908,_0x2f3535={'PuuKD':function(_0xe4242,_0x1933d9){return _0xe4242===_0x1933d9;},'FbboE':function(_0x23a190,_0x26e68a){return _0x23a190(_0x26e68a);},'TRGMv':function(_0x3523e9,_0x5be6ec){return _0x3523e9(_0x5be6ec);},'JxIVI':function(_0x3fef63,_0xa0e3c){return _0x3fef63(_0xa0e3c);}},_0x1b6af8=_0x2f3535[_0x598189(0xbe)](_0x4ab745,_0x598189(0xc2))?_0x2f3535['FbboE'](getOpencodeSkillsDir,_0x2493af):_0x2f3535[_0x598189(0xc9)](getSkillsDir,_0x2493af),_0x1d3916=join(_0x1b6af8,_0x182fa7);return _0x2f3535[_0x598189(0xd4)](existsSync,_0x1d3916);}async function reinstallSkills(_0x187140){const _0xb0e2e3=_0x5bd908,_0x5d73fb={'TysJi':'user','uywSO':'claude','PjgSj':function(_0x138584,_0x3fb448,_0x5ec660){return _0x138584(_0x3fb448,_0x5ec660);},'OuomO':function(_0x5103f9,_0xee9d0d,_0x423291){return _0x5103f9(_0xee9d0d,_0x423291);}},_0x53f126=[_0xb0e2e3(0xa0),_0x5d73fb['TysJi']],_0x3aecd8=[];for(const _0x1eab88 of _0x53f126){for(const _0x49fdc8 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x49fdc8,_0x1eab88,_0x5d73fb[_0xb0e2e3(0x9a)])&&_0x3aecd8['push']({'skillName':_0x49fdc8,'level':_0x1eab88,'platform':'claude'}),isSkillInstalled(_0x49fdc8,_0x1eab88,_0xb0e2e3(0xc2))&&_0x3aecd8['push']({'skillName':_0x49fdc8,'level':_0x1eab88,'platform':_0xb0e2e3(0xc2)});}}for(const _0x4d2ccf of _0x53f126){for(const _0x2fef3d of DEPRECATED_SKILLS){await _0x5d73fb['PjgSj'](removeSkill,_0x2fef3d,_0x4d2ccf);}}if(_0x3aecd8['length']===0x0){console['log']('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log'](_0xb0e2e3(0xcf)+_0x3aecd8[_0xb0e2e3(0xad)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x31886d,level:_0x1f0671,platform:_0x1b4675}of _0x3aecd8){try{await _0x5d73fb['OuomO'](installSkill,_0x31886d,{'level':_0x1f0671,'cliVersion':_0x187140,'platform':_0x1b4675});}catch(_0x46c5bf){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x1b4675+'\x20'+_0x1f0671+_0xb0e2e3(0xc5)+_0x31886d+':',_0x46c5bf);}}}async function ensureActiveProfileGitignored(){const _0x1c97e4=_0x5bd908,_0x3b25a6={'WLiDm':function(_0x47b394,_0x2cdf01,_0x5cf6a7){return _0x47b394(_0x2cdf01,_0x5cf6a7);},'gtvoi':function(_0x4cfdd6){return _0x4cfdd6();},'LiYZB':'.gitignore','knVLr':function(_0xb6a6bd,_0x4257ff){return _0xb6a6bd(_0x4257ff);}},_0xad40bc=_0x3b25a6[_0x1c97e4(0xcc)](join,_0x3b25a6['gtvoi'](getRangerDir),_0x3b25a6['LiYZB']);if(!_0x3b25a6[_0x1c97e4(0xec)](existsSync,_0xad40bc))return![];let _0x1f7981='';try{_0x1f7981=await readFile(_0xad40bc,'utf-8');}catch{return![];}const _0x41f78c=_0x1f7981[_0x1c97e4(0xe0)](/\r?\n/);if(_0x41f78c['some'](_0x48a429=>_0x48a429[_0x1c97e4(0xc6)]()===_0x1c97e4(0xb3)))return![];let _0x37c1bb=_0x41f78c['findIndex'](_0x18778c=>_0x18778c['trim']()==='active-feature.txt');_0x37c1bb===-0x1&&(_0x37c1bb=_0x41f78c['length']);_0x41f78c['splice'](_0x37c1bb,0x0,_0x1c97e4(0xb3));let _0x21654a=_0x41f78c['join']('\x0a');!_0x21654a[_0x1c97e4(0xac)]('\x0a')&&(_0x21654a+='\x0a');try{await writeFile(_0xad40bc,_0x21654a,_0x1c97e4(0x9c));}catch{return![];}return!![];}export async function update(){const _0x41062b=_0x5bd908,_0x1fc689={'PlbTt':function(_0x3c2730){return _0x3c2730();},'EmqSQ':function(_0x19d68a){return _0x19d68a();},'hKcfT':_0x41062b(0xa5),'xYfMc':'Update\x20failed.','ocPpe':function(_0x46266b,_0x46190a){return _0x46266b(_0x46190a);},'DYspj':'trailhead','bxYHH':_0x41062b(0xa4),'qnRNp':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','OAoWS':_0x41062b(0xa9),'itviC':function(_0x122d6f,_0xed422e){return _0x122d6f(_0xed422e);},'qBAUQ':'project','zDceB':'\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','CUtoe':'\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','NAjYd':_0x41062b(0xa2),'EfEoE':function(_0x543c2a){return _0x543c2a();},'WFwqk':'\x0a✅\x20Update\x20complete!'},_0x2e8fd3=_0x1fc689['PlbTt'](getCurrentVersion);console['log'](_0x41062b(0xb8)+_0x2e8fd3);const _0x5f5b23=resolveDistTag(_0x2e8fd3);if(_0x5f5b23!=='latest'){console[_0x41062b(0xde)](_0x41062b(0xdd)+_0x5f5b23+').\x20Staying\x20on\x20'+_0x5f5b23+'\x20—\x20reinstalling\x20@'+_0x5f5b23+'...');const _0x4cd612=await runInstall(_0x5f5b23);if(!_0x4cd612)throw new Error('Update\x20failed\x20for\x20@'+_0x5f5b23+'\x20channel.');const _0x229397=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x5f5b23+'.'),await reinstallSkills(_0x229397),await ensureActiveProfileGitignored(),console[_0x41062b(0xde)](_0x41062b(0xc8));return;}console[_0x41062b(0xde)](_0x41062b(0xdf));const _0x41d46a=_0x1fc689[_0x41062b(0xa8)](getLatestVersion);let _0x2e6c5c=_0x2e8fd3;if(!_0x41d46a[_0x41062b(0xed)]){console[_0x41062b(0xe5)](_0x41062b(0xcd)+_0x41d46a['error']),console['log'](_0x1fc689['hKcfT']);const _0x20c63e=await runInstall();if(_0x20c63e)console['log'](_0x41062b(0xeb)),_0x2e6c5c=getCurrentVersion();else throw new Error(_0x41062b(0xe1)+_0x41d46a[_0x41062b(0xea)]);}else{const _0x4ac0a3=_0x41d46a[_0x41062b(0xed)];console[_0x41062b(0xde)](_0x41062b(0xce)+_0x4ac0a3);const _0x2789b6=compareVersions(_0x2e8fd3,_0x4ac0a3);if(_0x2789b6===0x0)console[_0x41062b(0xde)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x2789b6<0x0)console[_0x41062b(0xde)]('\x0aYour\x20version\x20('+_0x2e8fd3+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x4ac0a3+').');else{const _0x1faade=await _0x1fc689['PlbTt'](runInstall);if(_0x1faade)console[_0x41062b(0xde)](_0x41062b(0xda)+_0x4ac0a3),_0x2e6c5c=_0x4ac0a3;else throw new Error(_0x1fc689[_0x41062b(0xab)]);}}}await _0x1fc689['ocPpe'](reinstallSkills,_0x2e6c5c);const _0xf05bfb=await _0x1fc689[_0x41062b(0xdc)](isMarketplaceAdded,_0x1fc689['DYspj']),_0x1fecd1=await isPluginInstalled(_0x1fc689['bxYHH']);_0xf05bfb&&(await updateClaudeMarketplace(),console['log'](_0x1fc689[_0x41062b(0xbf)]));if(_0x1fecd1){const _0xa0377c=await getPluginInfo(_0x1fc689['bxYHH']),_0x1ccca5=_0xa0377c?.[_0x41062b(0xe2)]??_0x1fc689['OAoWS'];await _0x1fc689['itviC'](updateClaudePlugin,_0x1ccca5);if(_0x1ccca5===_0x1fc689['qBAUQ'])console[_0x41062b(0xde)](_0x1fc689['zDceB']);else _0x1ccca5==='local'?console[_0x41062b(0xde)](_0x1fc689[_0x41062b(0xbb)]):console[_0x41062b(0xde)](_0x1fc689['NAjYd']);}const _0x1aec9f=await _0x1fc689[_0x41062b(0xb0)](ensureActiveProfileGitignored);console['log'](_0x1fc689[_0x41062b(0xe4)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22b52f,_0x434c5f){const _0x56d05a=_0x2e70,_0x221c35=_0x22b52f();while(!![]){try{const _0x3b8752=-parseInt(_0x56d05a(0xca))/0x1*(-parseInt(_0x56d05a(0xc3))/0x2)+parseInt(_0x56d05a(0xed))/0x3*(-parseInt(_0x56d05a(0xee))/0x4)+-parseInt(_0x56d05a(0xc5))/0x5*(-parseInt(_0x56d05a(0xd6))/0x6)+-parseInt(_0x56d05a(0xe2))/0x7*(-parseInt(_0x56d05a(0xd7))/0x8)+-parseInt(_0x56d05a(0xcf))/0x9+parseInt(_0x56d05a(0xd8))/0xa+-parseInt(_0x56d05a(0xce))/0xb;if(_0x3b8752===_0x434c5f)break;else _0x221c35['push'](_0x221c35['shift']());}catch(_0x139d42){_0x221c35['push'](_0x221c35['shift']());}}}(_0x1a8e,0xcac09));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';function _0x2e70(_0x3e1d36,_0x47f8d9){_0x3e1d36=_0x3e1d36-0xc3;const _0x1a8e43=_0x1a8e();let _0x2e70d8=_0x1a8e43[_0x3e1d36];return _0x2e70d8;}import{getEnvNames}from'./env.js';export async function updateEnv(_0x366e4d,_0x4f79e7,_0x2324ae){const _0x27df7a=_0x2e70,_0x40d283={'zIuAi':function(_0x403ba3,_0x128844){return _0x403ba3(_0x128844);},'yqMwY':function(_0x10785d,_0x5c46fc){return _0x10785d===_0x5c46fc;},'lvJkj':_0x27df7a(0xcb),'sWUQM':function(_0x179009,_0x49e40d){return _0x179009===_0x49e40d;},'FnYqu':function(_0x3a908c,_0x469989){return _0x3a908c+_0x469989;},'PHURe':function(_0xf80c5a,_0x731468){return _0xf80c5a+_0x731468;},'dlkxX':function(_0xcfa42f){return _0xcfa42f();},'uNOHB':function(_0x39d476,_0x3c8e61,_0x5c68ed){return _0x39d476(_0x3c8e61,_0x5c68ed);},'kTasz':_0x27df7a(0xec),'JaIjq':function(_0xd9a79e,_0x5c3345){return _0xd9a79e instanceof _0x5c3345;},'pdEAB':'\x20\x20Falling\x20back\x20to\x20headed\x20browser...','LVGXq':function(_0x34abdd,_0x4962ab){return _0x34abdd+_0x4962ab;},'gERKr':function(_0x2905f9,_0x43c077,_0x4551cf){return _0x2905f9(_0x43c077,_0x4551cf);}},_0x48eb7e=await _0x40d283[_0x27df7a(0xe0)](fetchCloudProfile,_0x366e4d);if(!_0x48eb7e){const {envTypes:_0x573600}=await getEnvNames(),_0x273eb4=_0x573600[_0x366e4d];(_0x40d283[_0x27df7a(0xe9)](_0x273eb4,'legacy')||_0x40d283['yqMwY'](_0x273eb4,_0x40d283['lvJkj'])||_0x40d283[_0x27df7a(0xdd)](_0x273eb4,'ci'))&&(console['error'](_0x27df7a(0xc6)+_0x366e4d+_0x27df7a(0xcc)+'Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a'+'\x0a'+(_0x27df7a(0xf2)+_0x366e4d+'\x0a')),process[_0x27df7a(0xd0)](0x1));}!_0x48eb7e&&(console[_0x27df7a(0xdc)](_0x40d283[_0x27df7a(0xc7)](_0x40d283['PHURe'](_0x27df7a(0xd9)+_0x366e4d+'\x22\x20found.\x0a'+'Create\x20it\x20with:\x0a','\x0a'),_0x27df7a(0xf2)+_0x366e4d+'\x0a')),process[_0x27df7a(0xd0)](0x1));const _0x3f2016=await _0x40d283[_0x27df7a(0xdf)](fetchAuthConfig)[_0x27df7a(0xc4)](()=>null),_0x50c51d=_0x48eb7e[_0x27df7a(0xe5)]&&_0x3f2016?_0x40d283[_0x27df7a(0xd3)](resolveAuthEnvironmentLocally,_0x3f2016,_0x48eb7e[_0x27df7a(0xe5)]):null;if(_0x48eb7e[_0x27df7a(0xe5)]&&_0x50c51d){console[_0x27df7a(0xe6)](_0x27df7a(0xda)+_0x366e4d+_0x27df7a(0xe8));try{const _0x17b680=await serverSideLogin(_0x366e4d,{'force':!![]});if(_0x17b680[_0x27df7a(0xf1)]==='success'){console[_0x27df7a(0xe6)]('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x366e4d+'\x22.');return;}_0x17b680['status']===_0x27df7a(0xea)?console[_0x27df7a(0xe6)](_0x40d283[_0x27df7a(0xe3)]):(_0x17b680['test_output']&&(console['log']('\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:'),console[_0x27df7a(0xe6)](_0x17b680[_0x27df7a(0xc9)])),console['log'](_0x27df7a(0xf0)));}catch(_0x163049){console[_0x27df7a(0xe6)]('\x20\x20Server-side\x20login\x20error:\x20'+(_0x40d283[_0x27df7a(0xe1)](_0x163049,Error)?_0x163049['message']:String(_0x163049))),console['log'](_0x40d283[_0x27df7a(0xd5)]);}}const _0xa4bbde=_0x48eb7e[_0x27df7a(0xcd)]??{},_0x3e1599=_0xa4bbde[_0x27df7a(0xe4)],_0x605942=_0xa4bbde[_0x27df7a(0xd4)],_0x53e10a=_0x50c51d?{..._0x50c51d,'setupHeaders':_0x3e1599??_0x50c51d['setupHeaders']}:_0x605942?{'key':_0x48eb7e[_0x27df7a(0xe5)]??'','domains':[_0x605942],'setupHeaders':_0x3e1599}:null;!_0x53e10a&&(console[_0x27df7a(0xdc)](_0x40d283[_0x27df7a(0xc7)]('Profile\x20\x22'+_0x366e4d+_0x27df7a(0xef)+_0x27df7a(0xdb)+'\x0a','\x20\x20ranger\x20profile\x20add\x20'+_0x366e4d+'\x0a')),process['exit'](0x1)),(!process[_0x27df7a(0xd2)]['isTTY']||!process[_0x27df7a(0xe7)]['isTTY'])&&(console['error'](_0x40d283['LVGXq'](_0x27df7a(0xd1)+_0x366e4d+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a','Run\x20`ranger\x20profile\x20update\x20'+_0x366e4d+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process['exit'](0x1)),console['log'](_0x27df7a(0xc8)+_0x366e4d+'\x22\x20via\x20headed\x20browser...'),await _0x40d283[_0x27df7a(0xeb)](manualBrowserLogin,_0x48eb7e,_0x53e10a),console['log'](_0x27df7a(0xde)+_0x366e4d+'\x22.');}function _0x1a8e(){const _0x54fbd6=['95320TwcKqj','\x22\x20has\x20no\x20environment_key\x20and\x20no\x20baseUrl\x20set\x20—\x20there\x27s\x20nothing\x20to\x20refresh\x20against.\x0a','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','status','\x20\x20ranger\x20profile\x20add\x20','24VQmCFA','catch','2707555fmjrMG','Profile\x20\x22','FnYqu','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','test_output','96283hCnHiu','local','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','settings','19720338wUXJXq','9664047aCpyCD','exit','Can\x27t\x20refresh\x20\x22','stdin','uNOHB','baseUrl','pdEAB','12wBqBZp','29888vWLPNT','9965520MWbTUc','No\x20profile\x20named\x20\x22','Refreshing\x20session\x20for\x20\x22','Re-create\x20it\x20with:\x0a','error','sWUQM','✓\x20Session\x20refreshed\x20for\x20\x22','dlkxX','zIuAi','JaIjq','1848snuqLf','kTasz','setupHeaders','environmentKey','log','stdout','\x22\x20via\x20server-side\x20login...','yqMwY','not_configured','gERKr','\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','66fzCbVZ'];_0x1a8e=function(){return _0x54fbd6;};return _0x1a8e();}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x196d5c,_0x376cb5){const _0x51d867=_0xb569,_0x565d14=_0x196d5c();while(!![]){try{const _0xb0cfdb=-parseInt(_0x51d867(0x1bc))/0x1+parseInt(_0x51d867(0x1c2))/0x2*(parseInt(_0x51d867(0x1c1))/0x3)+-parseInt(_0x51d867(0x1b1))/0x4+-parseInt(_0x51d867(0x1b7))/0x5*(parseInt(_0x51d867(0x1b2))/0x6)+-parseInt(_0x51d867(0x1c4))/0x7*(parseInt(_0x51d867(0x1c3))/0x8)+-parseInt(_0x51d867(0x1b5))/0x9*(-parseInt(_0x51d867(0x1b4))/0xa)+-parseInt(_0x51d867(0x1b8))/0xb*(-parseInt(_0x51d867(0x1ba))/0xc);if(_0xb0cfdb===_0x376cb5)break;else _0x565d14['push'](_0x565d14['shift']());}catch(_0x1950ea){_0x565d14['push'](_0x565d14['shift']());}}}(_0x23be,0x62e1d));import{join}from'path';import{existsSync}from'fs';function _0x23be(){const _0x20ca87=['\x0a✓\x20Now\x20using\x20profile\x20\x22','10buXcyf','4193523nvufmC','settings.json','19815rthPNy','16344537UTfnyk','DSKNb','12XoiDdF','LBToA','772581iqAXai','status','Profile\x20\x22','log','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','137409jwShRF','16vxFIAH','8jDJmyt','4630829MAajrI','1266424JkjMDm','246oKktVA'];_0x23be=function(){return _0x20ca87;};return _0x23be();}import{getEnvDir}from'./utils/settings.js';function _0xb569(_0x34abd5,_0x21e05e){_0x34abd5=_0x34abd5-0x1b1;const _0x23bec6=_0x23be();let _0xb56973=_0x23bec6[_0x34abd5];return _0xb56973;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x386891){const _0x13b1a0=_0xb569,_0x22f7eb={'ZuImY':function(_0x55b015,_0x5b20c7){return _0x55b015(_0x5b20c7);},'SekWN':function(_0x4b3288,_0x9eac60){return _0x4b3288(_0x9eac60);},'DSKNb':function(_0x303aa3,_0x4b79b6){return _0x303aa3(_0x4b79b6);},'gCNaW':function(_0x229d04,_0x201b8a){return _0x229d04 instanceof _0x201b8a;},'yhthM':function(_0x271a93,_0x1e413f){return _0x271a93===_0x1e413f;},'LBToA':function(_0x5bc259,_0x2846cb){return _0x5bc259+_0x2846cb;}},_0x20fdb6=_0x22f7eb['ZuImY'](getEnvDir,_0x386891),_0x1139ab=join(_0x20fdb6,_0x13b1a0(0x1b6)),_0x24cd53=_0x22f7eb['SekWN'](existsSync,_0x20fdb6)&&_0x22f7eb['DSKNb'](existsSync,_0x1139ab);if(_0x24cd53){await writeActiveProfileName(_0x386891),console[_0x13b1a0(0x1bf)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x386891+'\x22');return;}let _0x3966be=null,_0x4db894=![];try{_0x3966be=await fetchCloudProfile(_0x386891);if(!_0x3966be)_0x4db894=!![];}catch(_0x2fc379){_0x22f7eb['gCNaW'](_0x2fc379,ApiError)&&_0x22f7eb['yhthM'](_0x2fc379[_0x13b1a0(0x1bd)],0x194)&&(_0x4db894=!![]);}if(_0x4db894)throw new Error(_0x22f7eb[_0x13b1a0(0x1bb)](_0x13b1a0(0x1be)+_0x386891+_0x13b1a0(0x1c0),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20')+('`ranger\x20profile\x20add\x20'+_0x386891+'`\x20to\x20create\x20one.'));await _0x22f7eb[_0x13b1a0(0x1b9)](writeActiveProfileName,_0x386891),console['log'](_0x13b1a0(0x1b3)+_0x386891+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x44b6cc=_0x1ad4;function _0x3b9d(){const _0x237245=['4842112XWaGrx','56NWYixf','AzWbW','39696LutLzJ','active-profile.txt','686gCHYRs','5790630cdGAuW','LddaR','utf-8','8RdaFjb','889128xUJIIr','6379659zfOjuZ','260aCXrDc','27955WrYpkZ','1405QrBqxD'];_0x3b9d=function(){return _0x237245;};return _0x3b9d();}function _0x1ad4(_0x4d9713,_0x3a2fe2){_0x4d9713=_0x4d9713-0x157;const _0x3b9dfb=_0x3b9d();let _0x1ad47c=_0x3b9dfb[_0x4d9713];return _0x1ad47c;}(function(_0x5a168c,_0x31eec4){const _0x1be09f=_0x1ad4,_0x544e42=_0x5a168c();while(!![]){try{const _0x1789f5=parseInt(_0x1be09f(0x15a))/0x1*(-parseInt(_0x1be09f(0x15c))/0x2)+-parseInt(_0x1be09f(0x165))/0x3+parseInt(_0x1be09f(0x158))/0x4*(parseInt(_0x1be09f(0x159))/0x5)+-parseInt(_0x1be09f(0x15e))/0x6*(-parseInt(_0x1be09f(0x160))/0x7)+parseInt(_0x1be09f(0x164))/0x8*(parseInt(_0x1be09f(0x157))/0x9)+-parseInt(_0x1be09f(0x161))/0xa+-parseInt(_0x1be09f(0x15b))/0xb;if(_0x1789f5===_0x31eec4)break;else _0x544e42['push'](_0x544e42['shift']());}catch(_0x3eb55b){_0x544e42['push'](_0x544e42['shift']());}}}(_0x3b9d,0x5945f));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0x44b6cc(0x15f),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function readLegacyActiveProfileFile(){const _0x5bfbe1=_0x44b6cc,_0x1fd30b={'AzWbW':function(_0xe976fc,_0x3283fc,_0x57ceee){return _0xe976fc(_0x3283fc,_0x57ceee);},'aQdcS':function(_0x35e497){return _0x35e497();},'DEdSq':function(_0xc97e85,_0x57f330){return _0xc97e85(_0x57f330);}},_0x2a6693=[_0x1fd30b[_0x5bfbe1(0x15d)](join,_0x1fd30b['aQdcS'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),_0x1fd30b[_0x5bfbe1(0x15d)](join,getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),_0x1fd30b[_0x5bfbe1(0x15d)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE),join(_0x1fd30b['aQdcS'](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x52fc0f of _0x2a6693){if(_0x1fd30b['DEdSq'](existsSync,_0x52fc0f))return _0x52fc0f;}return null;}export async function readActiveProfileName(){const _0x4f8466=_0x44b6cc,_0x2adb82={'LddaR':function(_0x464c23){return _0x464c23();}},_0x193add=readLastProfile(process['cwd']());if(_0x193add)return _0x193add;const _0x1a459b=_0x2adb82[_0x4f8466(0x162)](readLegacyActiveProfileFile);if(!_0x1a459b)return null;try{return(await readFile(_0x1a459b,_0x4f8466(0x163)))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x23e849){const _0x1f6572={'NHjSV':function(_0x376cba,_0xd8d34f,_0x4bc059){return _0x376cba(_0xd8d34f,_0x4bc059);}};_0x1f6572['NHjSV'](writeLastProfile,process['cwd'](),_0x23e849);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x5f2726=_0x5945;(function(_0x203860,_0x24515c){const _0x4cf61a=_0x5945,_0x2e168f=_0x203860();while(!![]){try{const _0x342617=parseInt(_0x4cf61a(0x128))/0x1*(parseInt(_0x4cf61a(0x10c))/0x2)+parseInt(_0x4cf61a(0x134))/0x3*(parseInt(_0x4cf61a(0x110))/0x4)+parseInt(_0x4cf61a(0x138))/0x5+parseInt(_0x4cf61a(0x124))/0x6+parseInt(_0x4cf61a(0x13c))/0x7+parseInt(_0x4cf61a(0x13b))/0x8+-parseInt(_0x4cf61a(0x132))/0x9;if(_0x342617===_0x24515c)break;else _0x2e168f['push'](_0x2e168f['shift']());}catch(_0x4604e8){_0x2e168f['push'](_0x2e168f['shift']());}}}(_0x4cda,0x6a7ed));import{delimiter,join}from'path';function _0x5945(_0x432c8b,_0x34fec0){_0x432c8b=_0x432c8b-0x105;const _0x4cdafa=_0x4cda();let _0x5945da=_0x4cdafa[_0x432c8b];return _0x5945da;}import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR=_0x5f2726(0x107),AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME','TMPDIR',_0x5f2726(0x12c),_0x5f2726(0x129),'USERPROFILE','APPDATA',_0x5f2726(0x11b),'XDG_CACHE_HOME',_0x5f2726(0x119),_0x5f2726(0x106),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x5f2726(0x13a),_0x5f2726(0x11c),'npm_config_cache','NPM_CONFIG_CACHE','npm_config_userconfig','NPM_CONFIG_USERCONFIG',_0x5f2726(0x121),_0x5f2726(0x123),'npm_config_registry','NPM_CONFIG_REGISTRY','DEBUG','NODE_ENV',_0x5f2726(0x120),_0x5f2726(0x116),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}','$PATH',_0x5f2726(0x11a)];function parseCustomHeaders(_0x32c377){const _0x342e47=_0x5f2726,_0x5efdc6={'lsgJz':function(_0x24d056,_0x12e2d4){return _0x24d056+_0x12e2d4;}};if(!_0x32c377)return[];return _0x32c377['split'](/\r?\n/)[_0x342e47(0x130)](_0x4a885d=>_0x4a885d[_0x342e47(0x113)]())[_0x342e47(0x114)](Boolean)[_0x342e47(0x130)](_0x21f0b1=>{const _0x59c1af=_0x342e47,_0x4dc882=_0x21f0b1[_0x59c1af(0x12e)](':');if(_0x4dc882===-0x1)return null;const _0x11eef9=_0x21f0b1[_0x59c1af(0x126)](0x0,_0x4dc882)['trim'](),_0x32964c=_0x21f0b1[_0x59c1af(0x126)](_0x5efdc6[_0x59c1af(0x133)](_0x4dc882,0x1))[_0x59c1af(0x113)]();if(!_0x11eef9)return null;return[_0x11eef9,_0x32964c];})['filter'](_0x395f70=>_0x395f70!==null);}export function getAgentPathHealthWarning(_0x1171a1,_0xeb72b1=process[_0x5f2726(0x108)]){const _0x5741ce=_0x5f2726,_0x52e7e9={'eUsPH':function(_0x25846f,_0x1047b5){return _0x25846f===_0x1047b5;},'rfYbl':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','HNqeS':_0x5741ce(0x117),'xHPlH':function(_0x2e308c,_0x342927){return _0x2e308c!==_0x342927;},'Dvtun':function(_0x9fd53a,_0x4f30f0){return _0x9fd53a&&_0x4f30f0;},'LzRwQ':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','KCthj':_0x5741ce(0x125)},_0x1a284c=[],_0xdc00ab=(_0x1171a1||'')[_0x5741ce(0x115)](delimiter)[_0x5741ce(0x114)](Boolean);_0x52e7e9[_0x5741ce(0x109)](_0xdc00ab['length'],0x0)&&_0x1a284c[_0x5741ce(0x12b)](_0x52e7e9['rfYbl']);UNEXPANDED_PATH_TOKEN_PATTERNS[_0x5741ce(0x127)](_0x20e6d3=>(_0x1171a1||'')[_0x5741ce(0x122)](_0x20e6d3))&&_0x1a284c['push'](_0x52e7e9[_0x5741ce(0x112)]);if(_0x52e7e9[_0x5741ce(0x11f)](_0xeb72b1,_0x5741ce(0x131))){const _0xa5cfa4=_0xdc00ab[_0x5741ce(0x122)](_0x5741ce(0x12a)),_0x4a3467=_0xdc00ab['includes'](_0x5741ce(0x10e));_0x52e7e9[_0x5741ce(0x136)](!_0xa5cfa4,!_0x4a3467)&&_0x1a284c['push'](_0x52e7e9[_0x5741ce(0x11e)]);}if(_0x1a284c['length']===0x0)return null;return{'summary':_0x52e7e9['KCthj'],'issues':_0x1a284c};}function _0x4cda(){const _0x281f18=['true','from','48dtaIvL','ranger-claude-tmp','/bin','env','164HkJuUQ','WMmfT','HNqeS','trim','filter','split','RANGER_DISABLE_MCP','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','BBbyv','XDG_CONFIG_HOME','%PATH%','LOCALAPPDATA','CHROMIUM_BIN','entries','LzRwQ','xHPlH','RANGER_TEST_SKIP_BROWSER_WAIT','npm_config_prefix','includes','NPM_CONFIG_PREFIX','4921368VqhxKk','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','slice','some','22281gdAZJS','TEMP','/usr/bin','push','TMP','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','indexOf','x-ranger-','map','win32','22397355QcHHfS','lsgJz','27444pyUSia','TMPDIR','Dvtun','fromEntries','3524515cJmcPT','sessionToken','CHROME_BIN','3335384obaTOF','510538okwiqx','metadata','PLAYWRIGHT_BROWSERS_PATH','ANTHROPIC_CUSTOM_HEADERS','platform','eUsPH'];_0x4cda=function(){return _0x281f18;};return _0x4cda();}export function buildAgentEnv(_0x1b6d74){const _0x42051a=_0x5f2726,_0x4d1242={'Dixdh':_0x42051a(0x12d),'XXNKU':'TMP','WMmfT':_0x42051a(0x129),'BBbyv':function(_0x44d70a,_0x18e582,_0x4256be){return _0x44d70a(_0x18e582,_0x4256be);},'sedDX':function(_0x201f18,_0x5106b7){return _0x201f18===_0x5106b7;}};if(_0x1b6d74['byokEnabled'])return Object[_0x42051a(0x137)](Object['entries'](process[_0x42051a(0x10f)])[_0x42051a(0x114)](_0x14a6c7=>typeof _0x14a6c7[0x1]==='string'));if(!_0x1b6d74[_0x42051a(0x139)])throw new Error(_0x4d1242['Dixdh']);const _0x183998={'ANTHROPIC_API_KEY':_0x1b6d74['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0x42051a(0x10a)};for(const _0x154cbb of AGENT_ENV_PASSTHROUGH_KEYS){const _0x591ce1=process[_0x42051a(0x10f)][_0x154cbb];_0x591ce1&&!['TMPDIR',_0x4d1242['XXNKU'],_0x4d1242[_0x42051a(0x111)]][_0x42051a(0x122)](_0x154cbb)&&(_0x183998[_0x154cbb]=_0x591ce1);}const _0x35f382=_0x4d1242[_0x42051a(0x118)](join,tmpdir(),_0x42051a(0x10d));try{mkdirSync(_0x35f382,{'recursive':!![]});}catch{}_0x183998[_0x42051a(0x135)]=_0x35f382,_0x183998[_0x4d1242['XXNKU']]=_0x35f382,_0x183998[_0x42051a(0x129)]=_0x35f382;const _0xd46e9=parseCustomHeaders(process[_0x42051a(0x10f)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x35d25a=new Map(_0xd46e9),_0x1ba113=new Set(_0xd46e9['map'](([_0x51f80e])=>_0x51f80e['toLowerCase']()));if(_0x1b6d74['metadata'])for(const [_0x25658c,_0x2e3cbf]of Object['entries'](_0x1b6d74[_0x42051a(0x105)])){if(_0x2e3cbf==null||_0x4d1242['sedDX'](_0x2e3cbf,''))continue;const _0x3218c3=_0x42051a(0x12f)+_0x25658c;!_0x1ba113['has'](_0x3218c3['toLowerCase']())&&(_0x35d25a['set'](_0x3218c3,_0x2e3cbf),_0x1ba113['add'](_0x3218c3['toLowerCase']()));}const _0xf87501=Array[_0x42051a(0x10b)](_0x35d25a[_0x42051a(0x11d)]())[_0x42051a(0x130)](([_0x3c6e6a,_0x37d65e])=>_0x3c6e6a+':\x20'+_0x37d65e)['join']('\x0a');return _0xf87501&&(_0x183998[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0xf87501),_0x183998;}
|