@ranger-testing/ranger-cli 2.4.6 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/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/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/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/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- 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/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/build/skills/ranger/SKILL.md +38 -41
- package/build/skills/ranger/create.md +5 -13
- package/build/skills/ranger/feedback.md +3 -3
- package/build/skills/ranger/start.md +13 -13
- package/build/skills/ranger/verify.md +15 -28
- package/package.json +5 -3
- package/scripts/postinstall.js +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1474d4,_0x57233f){const _0x4b14b5=_0x4239,_0xe70a5c=_0x1474d4();while(!![]){try{const _0x74cbab=-parseInt(_0x4b14b5(0x1c2))/0x1*(parseInt(_0x4b14b5(0x1cd))/0x2)+-parseInt(_0x4b14b5(0x1c0))/0x3+-parseInt(_0x4b14b5(0x1c8))/0x4+-parseInt(_0x4b14b5(0x1c6))/0x5*(-parseInt(_0x4b14b5(0x1bc))/0x6)+-parseInt(_0x4b14b5(0x1c4))/0x7+parseInt(_0x4b14b5(0x1cc))/0x8+parseInt(_0x4b14b5(0x1bd))/0x9*(parseInt(_0x4b14b5(0x1c3))/0xa);if(_0x74cbab===_0x57233f)break;else _0xe70a5c['push'](_0xe70a5c['shift']());}catch(_0x359a40){_0xe70a5c['push'](_0xe70a5c['shift']());}}}(_0x291b,0x7df00));function _0x4239(_0x1cddcf,_0x2d46b6){_0x1cddcf=_0x1cddcf-0x1b7;const _0x291b4d=_0x291b();let _0x4239e0=_0x291b4d[_0x1cddcf];return _0x4239e0;}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';function _0x291b(){const _0x522e5e=['209162HXNpno','2517840csYjrC','1248296drcrfa','env','2478020vIlcku','\x20(Branch:\x20','1386688GslAPR','RyHZA','export\x20CLAUDE_SESSION_ID=\x22','master','7914624PKFCPG','8WzegvE','hook:session-start','JUBdN','log','main','trackCommandEnd','6dSmsaB','27NZAGUI','CLAUDE_ENV_FILE','success','1088388DaAHNc','session_id'];_0x291b=function(){return _0x522e5e;};return _0x291b();}export async function sessionStart(_0x178384){const _0x1e1e67=_0x4239,_0x53636e={'yDncA':function(_0xb49765,_0x919011){return _0xb49765&&_0x919011;},'RyHZA':function(_0x11fecf,_0x3d1e25){return _0x11fecf(_0x3d1e25);},'UzNmo':_0x1e1e67(0x1bf),'JUBdN':function(_0x521e92){return _0x521e92();}};let _0x1f75c1=_0x178384||'',_0x28bb98;if(!_0x178384){let _0x29244b='';for await(const _0x12594b of process['stdin']){_0x29244b+=_0x12594b;}try{const _0x245c47=JSON['parse'](_0x29244b);_0x1f75c1=_0x245c47[_0x1e1e67(0x1c1)]||'',_0x28bb98=_0x245c47['source'];}catch{}const _0x9d163=process[_0x1e1e67(0x1c5)][_0x1e1e67(0x1be)];if(_0x53636e['yDncA'](_0x9d163,_0x1f75c1))try{await appendFile(_0x9d163,_0x1e1e67(0x1ca)+_0x1f75c1+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x1f75c1){shouldAutoEnableAfterClear(_0x28bb98)&&_0x53636e['RyHZA'](autoEnableAfterClear,_0x1f75c1);initBranchTracking(_0x1f75c1);const _0x410ef9=isSessionEnabled(_0x1f75c1);try{const _0x359440=_0x53636e[_0x1e1e67(0x1c9)](createTelemetryCollector,_0x1e1e67(0x1b7));await _0x359440['trackCommandStart']({'sessionId':_0x1f75c1,'hooksEnabled':_0x410ef9}),await _0x359440[_0x1e1e67(0x1bb)](_0x53636e['UzNmo']);}catch{}if(_0x410ef9){const _0xd88362=_0x53636e[_0x1e1e67(0x1b8)](getCurrentBranch),_0x3bba59=_0xd88362&&_0xd88362!==_0x1e1e67(0x1ba)&&_0xd88362!==_0x1e1e67(0x1cb)?_0x1e1e67(0x1c7)+_0xd88362+')':'',_0x195ada={'hookSpecificOutput':{'hookEventName':'SessionStart','additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x3bba59}};console[_0x1e1e67(0x1b9)](JSON['stringify'](_0x195ada));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4efbe3,_0x16bf1a){const _0x4165a7=_0x1fd8,_0x210dc8=_0x4efbe3();while(!![]){try{const _0x13c250=-parseInt(_0x4165a7(0x1de))/0x1*(-parseInt(_0x4165a7(0x1ec))/0x2)+parseInt(_0x4165a7(0x1e8))/0x3*(parseInt(_0x4165a7(0x1ef))/0x4)+parseInt(_0x4165a7(0x1f0))/0x5+parseInt(_0x4165a7(0x1eb))/0x6*(-parseInt(_0x4165a7(0x1e9))/0x7)+parseInt(_0x4165a7(0x1df))/0x8+-parseInt(_0x4165a7(0x1e0))/0x9+-parseInt(_0x4165a7(0x1e3))/0xa;if(_0x13c250===_0x16bf1a)break;else _0x210dc8['push'](_0x210dc8['shift']());}catch(_0x16bbe0){_0x210dc8['push'](_0x210dc8['shift']());}}}(_0x4844,0x3e550));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x4844(){const _0x2f8613=['QhNge','trackCommandStart','https://dashboard.ranger.net/features/','closed','featureId','fzeZS','Stop','incomplete','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','filter','7Rauyno','3525096vfpbKw','54144dZcJUc','currentSessionId','sessionId','5245500uNDMCJ','sDDxx','blocked','hook:stop','fKGoR','117870BTVqDG','35BIlJaz','some','475830unNPjA','55894KfHgZA','status','kQqgo','40eBUXmr','766185lGLzaP'];_0x4844=function(){return _0x2f8613;};return _0x4844();}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x6bc95a){const _0x2d4023=_0x1fd8,_0x351862={'sDDxx':function(_0xb878b4,_0x98a56f){return _0xb878b4(_0x98a56f);},'QhNge':function(_0x273452,_0x48153a,_0x35c6c0,_0x2bea70){return _0x273452(_0x48153a,_0x35c6c0,_0x2bea70);},'kQqgo':function(_0xdb1f0a,_0x409a70){return _0xdb1f0a(_0x409a70);},'OQGlE':_0x2d4023(0x1da),'fKGoR':function(_0x569ed6,_0x4bfff4){return _0x569ed6&&_0x4bfff4;}},_0x5d7580=await _0x351862[_0x2d4023(0x1e4)](getEnabledHookContext,_0x6bc95a),_0x2681f9=_0x5d7580?.[_0x2d4023(0x1e2)]??null;let _0x1c3016=!![];if(!_0x2681f9){await _0x351862['QhNge'](trackStop,_0x2681f9,![],_0x1c3016);return;}try{const _0xe30be4=getSessionEntry(_0x2681f9);if(!_0xe30be4){await _0x351862[_0x2d4023(0x1f1)](trackStop,_0x2681f9,!![],_0x1c3016);return;}const _0x358095=await getToken(),_0x16faa=_0x2d4023(0x1f3)+_0xe30be4[_0x2d4023(0x1f5)];let _0x2e6097=null,_0x2fe353=![],_0x19a25b=![];if(_0x358095)try{const _0x5db996=await _0x351862[_0x2d4023(0x1ee)](getFeature,_0xe30be4['featureId']);_0x2e6097=_0x5db996[_0x2d4023(0x1e1)]??null;const _0x5702d4=_0x5db996['checklistItems'][_0x2d4023(0x1dd)](_0x34f117=>_0x34f117[_0x2d4023(0x1e2)]===_0x2e6097);_0x2fe353=_0x5702d4[_0x2d4023(0x1ea)](_0x599e59=>_0x599e59['status']!=='verified'&&_0x599e59[_0x2d4023(0x1ed)]!==_0x2d4023(0x1e5)&&_0x599e59['status']!==_0x2d4023(0x1f4)&&_0x599e59[_0x2d4023(0x1ed)]!==_0x2d4023(0x1db)),_0x19a25b=_0x5702d4[_0x2d4023(0x1ea)](_0x17260b=>_0x17260b['status']==='verification_in_progress');}catch{}if(_0x358095&&_0x2e6097&&_0x2fe353){if(!_0x19a25b&&shouldShowStopReminder(_0x2681f9)){const _0x566520={'hookSpecificOutput':{'hookEventName':_0x351862['OQGlE'],'additionalContext':_0x2d4023(0x1dc)+_0x16faa}};console['log'](JSON['stringify'](_0x566520));}}if(_0x351862[_0x2d4023(0x1e7)](_0x358095,_0x2e6097)&&!_0x2fe353)try{await concludeSession(_0xe30be4['featureId'],_0x2e6097);}catch{}await _0x351862['QhNge'](trackStop,_0x2681f9,!![],_0x1c3016);return;}catch{await trackStop(_0x2681f9,!![],_0x1c3016);return;}}function _0x1fd8(_0x3b4d4a,_0x2c6104){_0x3b4d4a=_0x3b4d4a-0x1da;const _0x484426=_0x4844();let _0x1fd850=_0x484426[_0x3b4d4a];return _0x1fd850;}async function trackStop(_0x47a722,_0x14f23d,_0x3b3e63){const _0x5d8a92=_0x1fd8,_0x2635ba={'IRaIR':function(_0x3a52cc,_0x370aad){return _0x3a52cc(_0x370aad);},'fzeZS':'success'};try{const _0x22ac06=_0x2635ba['IRaIR'](createTelemetryCollector,_0x5d8a92(0x1e6));await _0x22ac06[_0x5d8a92(0x1f2)]({'sessionId':_0x47a722??undefined,'hooksEnabled':_0x14f23d,'stopAllowed':_0x3b3e63}),await _0x22ac06['trackCommandEnd'](_0x2635ba[_0x5d8a92(0x1f6)]);}catch{}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d2a31,_0x2f88cc){var _0x26492f=_0x4134,_0x2ae603=_0x2d2a31();while(!![]){try{var _0x211df0=-parseInt(_0x26492f(0x1b5))/0x1+-parseInt(_0x26492f(0x1b7))/0x2*(parseInt(_0x26492f(0x1bd))/0x3)+-parseInt(_0x26492f(0x1b4))/0x4*(parseInt(_0x26492f(0x1be))/0x5)+-parseInt(_0x26492f(0x1bb))/0x6*(parseInt(_0x26492f(0x1b8))/0x7)+parseInt(_0x26492f(0x1b9))/0x8*(-parseInt(_0x26492f(0x1bc))/0x9)+-parseInt(_0x26492f(0x1ba))/0xa+parseInt(_0x26492f(0x1b6))/0xb;if(_0x211df0===_0x2f88cc)break;else _0x2ae603['push'](_0x2ae603['shift']());}catch(_0x595b6b){_0x2ae603['push'](_0x2ae603['shift']());}}}(_0x5490,0x6318c));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';function _0x4134(_0x58eef8,_0x15961f){_0x58eef8=_0x58eef8-0x1b4;var _0x549006=_0x5490();var _0x4134f4=_0x549006[_0x58eef8];return _0x4134f4;}export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';function _0x5490(){var _0x4511f4=['18717IIxIDl','1928215DzcnYg','4WxSRiy','40884yrLnkG','31546394cGdLFA','192SynmvV','3283ZFbvlX','24hsGIkm','4792490xIxqkl','3888XxARaY','1959966rbRgGI'];_0x5490=function(){return _0x4511f4;};return _0x5490();}
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b61a7,_0x1e59eb){const _0x5c5b47=_0xaa57,_0x2b37e7=_0x2b61a7();while(!![]){try{const _0x385a35=parseInt(_0x5c5b47(0xb3))/0x1*(parseInt(_0x5c5b47(0xb1))/0x2)+parseInt(_0x5c5b47(0xb8))/0x3+-parseInt(_0x5c5b47(0xb7))/0x4*(parseInt(_0x5c5b47(0xb9))/0x5)+-parseInt(_0x5c5b47(0xae))/0x6+-parseInt(_0x5c5b47(0xb4))/0x7+-parseInt(_0x5c5b47(0xaa))/0x8*(-parseInt(_0x5c5b47(0xac))/0x9)+-parseInt(_0x5c5b47(0xb0))/0xa;if(_0x385a35===_0x1e59eb)break;else _0x2b37e7['push'](_0x2b37e7['shift']());}catch(_0x52b5b2){_0x2b37e7['push'](_0x2b37e7['shift']());}}}(_0x54a6,0x339ce));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0xaa57(_0x3547c1,_0x5e888f){_0x3547c1=_0x3547c1-0xaa;const _0x54a6e4=_0x54a6();let _0xaa57bb=_0x54a6e4[_0x3547c1];return _0xaa57bb;}export async function login(){const _0x5ae135=_0xaa57,_0x22734e={'cmkkt':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'},_0x35a286=process['stdin'][_0x5ae135(0xb6)]&&process['stdout']['isTTY'];if(!_0x35a286)throw new Error(_0x22734e[_0x5ae135(0xb5)]);try{const _0x16a737=await runDeviceAuthFlow(),_0x4e97ef=await getCurrentUser(_0x16a737);_0x4e97ef[_0x5ae135(0xab)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x4e97ef['user']['organizationName']):console[_0x5ae135(0xb2)](_0x5ae135(0xad));}catch(_0x5e5e20){throw new Error('Login\x20failed:\x20'+(_0x5e5e20 instanceof Error?_0x5e5e20[_0x5ae135(0xaf)]:_0x5e5e20));}}function _0x54a6(){const _0x1fdd3d=['\x0a✅\x20API\x20key\x20stored\x20successfully','453084XjScQz','message','634980svkauL','2YMWOty','log','206290fgArqe','1185338cSJpzY','cmkkt','isTTY','356kUEmqs','854481WgjeMn','4805fMXPNp','913312STkPJC','success','9YQnahH'];_0x54a6=function(){return _0x1fdd3d;};return _0x54a6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b5eec,_0x16fc4d){const _0x151696=_0xfe0b,_0x39d965=_0x1b5eec();while(!![]){try{const _0x36c51a=parseInt(_0x151696(0x142))/0x1+parseInt(_0x151696(0x141))/0x2*(-parseInt(_0x151696(0x14a))/0x3)+-parseInt(_0x151696(0x13b))/0x4+-parseInt(_0x151696(0x13f))/0x5+parseInt(_0x151696(0x14c))/0x6*(parseInt(_0x151696(0x15c))/0x7)+parseInt(_0x151696(0x154))/0x8*(parseInt(_0x151696(0x13c))/0x9)+parseInt(_0x151696(0x15e))/0xa;if(_0x36c51a===_0x16fc4d)break;else _0x39d965['push'](_0x39d965['shift']());}catch(_0x13fc5b){_0x39d965['push'](_0x39d965['shift']());}}}(_0x5942,0x20dbf));import{join}from'path';import{existsSync}from'fs';function _0xfe0b(_0x4c5ff6,_0x200640){_0x4c5ff6=_0x4c5ff6-0x12c;const _0x594238=_0x5942();let _0xfe0b00=_0x594238[_0x4c5ff6];return _0xfe0b00;}import _0x224eda from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x5942(){const _0x360605=['SKILL.md','6eJnZgL','nLLBH','prompt','includes','IJqFD','plugin','✓\x20Marketplace\x20already\x20added','tGyHn','8inxbBT','CCBBO','Project\x20(shared\x20with\x20team\x20via\x20git)','\x0aYou\x20can\x20install\x20manually\x20with:','list','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','already\x20enabled','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','846475qDAIvo','error','3395390VZjCJz','mglQk','log','.claude','✓\x20Ranger\x20skills\x20already\x20installed','❌\x20Failed\x20to\x20install\x20plugin:','ZkPBN','ranger@trailhead','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','ElKKN','Where\x20should\x20the\x20plugin\x20be\x20installed?','yYAJS','vJnwW','wantsSkillup','DmFuf','output','tOTzg','927500rBBbRV','1253871WWpNRr','success','✓\x20Claude\x20Code\x20plugin\x20enabled','978875hJmHuO','jRMCH','142uRJisx','210461iKcPWJ','NAFsa','alzMj','confirm','QrLWJ','eQJiT','push','project','10479TrvjVV'];_0x5942=function(){return _0x360605;};return _0x5942();}export async function ensureClaudePlugin(_0xa6af28){const _0x36681a=_0xfe0b,_0x41b6fe={'yYAJS':function(_0x4aafae,_0x1abbc5){return _0x4aafae(_0x1abbc5);},'icdtL':_0x36681a(0x131),'ElKKN':_0x36681a(0x149),'tGyHn':_0x36681a(0x15b),'hcIUJ':_0x36681a(0x158),'PSXto':_0x36681a(0x134),'tOTzg':'User\x20(available\x20in\x20all\x20your\x20projects)','hZpho':'user','aWkFO':_0x36681a(0x156),'yjoXx':'trailhead','eQJiT':'marketplace','alzMj':'add','nLLBH':'ranger-testing/trailhead','mglQk':'❌\x20Failed\x20to\x20add\x20marketplace:','EzYrO':'\x0aYou\x20can\x20install\x20manually\x20with:','vJnwW':_0x36681a(0x151),'CCBBO':'enable','dIVsM':'--scope','fqSNn':_0x36681a(0x15a),'gmxpQ':_0x36681a(0x13e)},_0x4795b8=await _0x41b6fe['yYAJS'](isPluginInstalled,_0x41b6fe['icdtL']);if(_0x4795b8)return console[_0x36681a(0x12c)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x210245=existsSync(join(getProjectRoot(),_0x36681a(0x12d)));let _0x2f9a58;if(_0xa6af28)_0x2f9a58=_0xa6af28;else{if(_0x210245)_0x2f9a58=_0x41b6fe['ElKKN'];else{console['log'](_0x41b6fe[_0x36681a(0x153)]);const _0xb47c4e=await _0x224eda[_0x36681a(0x14e)]([{'type':_0x41b6fe['hcIUJ'],'name':'pluginScope','message':_0x41b6fe['PSXto'],'choices':[{'name':_0x41b6fe[_0x36681a(0x13a)],'value':_0x41b6fe['hZpho']},{'name':_0x41b6fe['aWkFO'],'value':_0x41b6fe[_0x36681a(0x133)]}],'default':_0x41b6fe['hZpho']}]);_0x2f9a58=_0xb47c4e['pluginScope'];}}console[_0x36681a(0x12c)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x2f9a58+'\x20level)...\x0a');const _0x2b2a85=await isMarketplaceAdded(_0x41b6fe['yjoXx']);let _0x287391=_0x2b2a85;if(_0x2b2a85)console['log'](_0x36681a(0x152));else{const _0x4ffbf0=await runClaudeCommand(['plugin',_0x41b6fe[_0x36681a(0x147)],_0x41b6fe[_0x36681a(0x144)],_0x41b6fe[_0x36681a(0x14d)]]);!_0x4ffbf0[_0x36681a(0x13d)]?(console[_0x36681a(0x15d)](_0x41b6fe[_0x36681a(0x15f)],_0x4ffbf0[_0x36681a(0x15d)]),console[_0x36681a(0x12c)](_0x41b6fe['EzYrO']),console[_0x36681a(0x12c)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x36681a(0x12c)](_0x36681a(0x132)+_0x2f9a58)):_0x287391=!![];}if(_0x287391){const _0x3321d6=await _0x41b6fe[_0x36681a(0x135)](runClaudeCommand,['plugin','install',_0x36681a(0x131),'--scope',_0x2f9a58]);if(!_0x3321d6['success'])console[_0x36681a(0x15d)](_0x36681a(0x12f),_0x3321d6['error']),console['log'](_0x36681a(0x157)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2f9a58);else{console[_0x36681a(0x12c)](_0x36681a(0x159));const _0x3335cf=[_0x41b6fe[_0x36681a(0x136)],_0x41b6fe[_0x36681a(0x155)],'ranger@trailhead'];_0x2f9a58==='project'&&_0x3335cf[_0x36681a(0x148)](_0x41b6fe['dIVsM'],_0x41b6fe[_0x36681a(0x133)]);const _0x5ab7c7=await runClaudeCommand(_0x3335cf,{'captureOutput':!![]}),_0x2a78cd=_0x5ab7c7[_0x36681a(0x139)]?.[_0x36681a(0x14f)](_0x41b6fe['fqSNn']);!_0x5ab7c7[_0x36681a(0x13d)]&&!_0x2a78cd?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x5ab7c7['error']):console[_0x36681a(0x12c)](_0x41b6fe['gmxpQ']);}}return!![];}export async function ensureClaudeSkills(_0x240cdc){const _0x32a917=_0xfe0b,_0xce9729={'QrLWJ':function(_0x4babd2,_0x4b5590){return _0x4babd2(_0x4b5590);},'IJqFD':function(_0xa6e9a9,_0x1cd789,_0x29dd99,_0x4686ac){return _0xa6e9a9(_0x1cd789,_0x29dd99,_0x4686ac);},'jRMCH':_0x32a917(0x149),'DmFuf':'ranger','OkpQV':function(_0x5346b9,_0x5241cd){return _0x5346b9||_0x5241cd;},'rWCRc':_0x32a917(0x12e),'NAFsa':function(_0x2b1083,_0x471eb6,_0x3f1efa){return _0x2b1083(_0x471eb6,_0x3f1efa);},'BAZsE':function(_0xf7358c){return _0xf7358c();},'GeARZ':'.claude','ExUtv':_0x32a917(0x145),'lcQKQ':'wantsSkillup','ZkPBN':function(_0x2a3bce,_0x581862){return _0x2a3bce(_0x581862);}},_0x51f0d0=_0xce9729[_0x32a917(0x146)](existsSync,_0xce9729[_0x32a917(0x150)](join,getSkillsDir('user'),'ranger',_0x32a917(0x14b))),_0xbdd230=_0xce9729['QrLWJ'](existsSync,_0xce9729[_0x32a917(0x150)](join,getSkillsDir(_0xce9729[_0x32a917(0x140)]),_0xce9729[_0x32a917(0x138)],_0x32a917(0x14b)));if(_0xce9729['OkpQV'](_0x51f0d0,_0xbdd230))return console['log'](_0xce9729['rWCRc']),![];const _0x80305d=_0xce9729['QrLWJ'](existsSync,_0xce9729[_0x32a917(0x143)](join,_0xce9729['BAZsE'](getProjectRoot),_0xce9729['GeARZ']));let _0x199171=!![];if(_0x240cdc)await skillup({'autoInstall':_0x240cdc,'suppressUsage':!![]});else{if(_0x80305d)await skillup({'autoInstall':_0xce9729[_0x32a917(0x140)],'suppressUsage':!![]});else{const _0x23ad6b=await _0x224eda[_0x32a917(0x14e)]([{'type':_0xce9729['ExUtv'],'name':_0xce9729['lcQKQ'],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x199171=_0x23ad6b[_0x32a917(0x137)],_0x199171&&await _0xce9729[_0x32a917(0x130)](skillup,{'suppressUsage':!![]});}}return _0x199171;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x183c1e,_0x5c3302){const _0x207206=_0x546c,_0x34d413=_0x183c1e();while(!![]){try{const _0x32fb01=-parseInt(_0x207206(0x173))/0x1*(parseInt(_0x207206(0x15b))/0x2)+-parseInt(_0x207206(0x15e))/0x3*(-parseInt(_0x207206(0x169))/0x4)+-parseInt(_0x207206(0x171))/0x5*(-parseInt(_0x207206(0x167))/0x6)+parseInt(_0x207206(0x15f))/0x7+-parseInt(_0x207206(0x16b))/0x8+-parseInt(_0x207206(0x158))/0x9+-parseInt(_0x207206(0x160))/0xa*(parseInt(_0x207206(0x16c))/0xb);if(_0x32fb01===_0x5c3302)break;else _0x34d413['push'](_0x34d413['shift']());}catch(_0x13bbbe){_0x34d413['push'](_0x34d413['shift']());}}}(_0x2a56,0x8d909));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x2a56(){const _0x240303=['\x0a📦\x20OpenCode\x20Plugin\x0a','https://opencode.ai/config.json','prompt','6OYZNVe','project','20XePYjt','user','1255328IaNDee','53471PXuIkU','list','BTYIZ','YGvIS','log','4186225FIxjDg','RuPpQ','2SOIyif','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','✓\x20OpenCode\x20plugin\x20configured','2689875PbrkUo','opencode.json','Mhkgd','67190YPfJkC','error','Ubxbr','393981VsTkGX','903539Ieigxs','1070tEYsfj','plugin','pluginScope','Project\x20(shared\x20with\x20team\x20via\x20git)'];_0x2a56=function(){return _0x240303;};return _0x2a56();}function _0x546c(_0x197e6e,_0x5d3436){_0x197e6e=_0x197e6e-0x156;const _0x2a5608=_0x2a56();let _0x546c09=_0x2a5608[_0x197e6e];return _0x546c09;}import _0x385a50 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x425767){const _0x4ffd0d=_0x546c,_0x15e942={'McyiE':function(_0x11c569,_0x25e248){return _0x11c569(_0x25e248);},'BTYIZ':function(_0x17351f,_0xe6ff61,_0x345e4a){return _0x17351f(_0xe6ff61,_0x345e4a);},'wdgOE':_0x4ffd0d(0x164),'Ubxbr':_0x4ffd0d(0x16d),'aRBSt':_0x4ffd0d(0x162),'fxqZG':'User\x20(available\x20in\x20all\x20your\x20projects)','RuPpQ':'opencode.json','YGvIS':_0x4ffd0d(0x156),'Mhkgd':'Failed\x20to\x20read\x20opencode.json'},_0x15f264=_0x15e942['McyiE'](existsSync,_0x15e942[_0x4ffd0d(0x16e)](join,getOpencodeConfigDir(_0x4ffd0d(0x168)),_0x4ffd0d(0x159)));let _0x3d4f97;if(_0x425767)_0x3d4f97=_0x425767;else{if(_0x15f264)_0x3d4f97='project';else{console[_0x4ffd0d(0x170)](_0x15e942['wdgOE']);const _0x2f913d=await _0x385a50[_0x4ffd0d(0x166)]([{'type':_0x15e942[_0x4ffd0d(0x15d)],'name':_0x15e942['aRBSt'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x15e942['fxqZG'],'value':'user'},{'name':_0x4ffd0d(0x163),'value':'project'}],'default':_0x4ffd0d(0x16a)}]);_0x3d4f97=_0x2f913d[_0x4ffd0d(0x162)];}}const _0x153ac8=join(getOpencodeConfigDir(_0x3d4f97),_0x15e942[_0x4ffd0d(0x172)]),_0x1945e9='@ranger-testing/opencode-plugin',_0x4eedc4=_0x4ffd0d(0x165);let _0x446923={};if(existsSync(_0x153ac8))try{const _0x32403b=await readFile(_0x153ac8,'utf-8');_0x446923=JSON['parse'](_0x32403b);}catch(_0x294037){return console[_0x4ffd0d(0x15c)](_0x15e942[_0x4ffd0d(0x16f)]),{'configured':![],'scope':_0x3d4f97,'error':_0x15e942[_0x4ffd0d(0x15a)],'details':_0x294037};}const _0x3687f4=Array['isArray'](_0x446923[_0x4ffd0d(0x161)])?_0x446923[_0x4ffd0d(0x161)]:[];if(_0x3687f4['includes'](_0x1945e9))return console[_0x4ffd0d(0x170)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x3d4f97};return _0x446923['$schema']=_0x446923['$schema']||_0x4eedc4,_0x446923['plugin']=[..._0x3687f4,_0x1945e9],await mkdir(getOpencodeConfigDir(_0x3d4f97),{'recursive':!![]}),await writeFile(_0x153ac8,JSON['stringify'](_0x446923,null,0x2)+'\x0a'),console[_0x4ffd0d(0x170)](_0x4ffd0d(0x157)),{'configured':!![],'scope':_0x3d4f97};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x40cd29,_0x1217c3){const _0x34d37c=_0x270d,_0x189a88=_0x40cd29();while(!![]){try{const _0x1bd6ea=-parseInt(_0x34d37c(0x11e))/0x1*(-parseInt(_0x34d37c(0x12c))/0x2)+parseInt(_0x34d37c(0x115))/0x3*(-parseInt(_0x34d37c(0x111))/0x4)+parseInt(_0x34d37c(0x109))/0x5*(-parseInt(_0x34d37c(0x108))/0x6)+parseInt(_0x34d37c(0x122))/0x7+-parseInt(_0x34d37c(0x136))/0x8*(parseInt(_0x34d37c(0x114))/0x9)+-parseInt(_0x34d37c(0x11d))/0xa*(-parseInt(_0x34d37c(0x12a))/0xb)+parseInt(_0x34d37c(0x10e))/0xc;if(_0x1bd6ea===_0x1217c3)break;else _0x189a88['push'](_0x189a88['shift']());}catch(_0x4a8c66){_0x189a88['push'](_0x189a88['shift']());}}}(_0x159c,0xd27ae));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x159c(){const _0x50eecc=['ranger-testing/trailhead','jPvwT','SHeaU','filter','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','Failed\x20to\x20install\x20plugin:','path','trackPhaseStart','add','Failed\x20to\x20add\x20marketplace:','Cvaez','plugin','IaAsI','GQvGV','ZDdGp','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','brQDO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','project','6zdiUiJ','1949095jnNBDu','dir_setup','BNHsL','zypYU','exLHK','19886448TSjmlK','baseUrl','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','4TNzUaI','skipChromium','JWhaN','23175AnAJqu','1821813fxHIFZ','QMrUY','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','LHDvd','ARmKb','marketplace','bgyUu','length','10jqsUOl','7TmLvas','chromium','ICUvc','KZSYg','1495459GlxjOw','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','isDirectory','sessions','log','uWaNG','profile_activate','success','1056781XRCzdT','trackPhaseEnd','431994ovBRZs','auth.json.enc','error','scAmr','miNIG','QXqdj','mGKJC','name','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','Mjgqv','5032XDYKwl','settings.json','✓\x20Claude\x20Code\x20plugin\x20installed','trailhead'];_0x159c=function(){return _0x50eecc;};return _0x159c();}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';function _0x270d(_0x359284,_0x375202){_0x359284=_0x359284-0xf5;const _0x159c3b=_0x159c();let _0x270d96=_0x159c3b[_0x359284];return _0x270d96;}import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x2d4ebb){const _0x336bc8=_0x270d,_0x24257e={'nuzJQ':function(_0xaa6fb6){return _0xaa6fb6();},'ICUvc':function(_0xf65743,_0x514bab,_0x9661fb){return _0xf65743(_0x514bab,_0x9661fb);},'exLHK':function(_0x217ab1,_0x40dbc5){return _0x217ab1+_0x40dbc5;},'SHeaU':_0x336bc8(0x102),'ARmKb':function(_0x4858f0,_0x262307){return _0x4858f0===_0x262307;},'Cvaez':function(_0x190002,_0x1d8d2c){return _0x190002===_0x1d8d2c;}},_0x500044=_0x24257e['nuzJQ'](getRangerDir),_0x552f84=join(_0x500044,'ci');if(_0x2d4ebb){const _0x462d24=_0x24257e[_0x336bc8(0x120)](join,_0x552f84,_0x2d4ebb);return{'name':_0x2d4ebb,'path':_0x462d24};}if(!existsSync(_0x552f84))throw new Error(_0x24257e[_0x336bc8(0x10d)](_0x336bc8(0x106),_0x24257e[_0x336bc8(0xf5)]));const _0x315c28=await readdir(_0x552f84,{'withFileTypes':!![]}),_0x4f0eba=_0x315c28[_0x336bc8(0xf6)](_0x4e1ec1=>_0x4e1ec1[_0x336bc8(0x124)]())['map'](_0x2a5882=>_0x2a5882[_0x336bc8(0x133)]);if(_0x24257e[_0x336bc8(0x119)](_0x4f0eba[_0x336bc8(0x11c)],0x0))throw new Error(_0x24257e['exLHK'](_0x336bc8(0x103),_0x336bc8(0x102)));if(_0x24257e[_0x336bc8(0xfd)](_0x4f0eba[_0x336bc8(0x11c)],0x1)){const _0x138f86=_0x4f0eba[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x138f86),{'name':_0x138f86,'path':join(_0x552f84,_0x138f86)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x4f0eba['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x191b55=_0x270d,_0x545228={'WglqU':function(_0x263890,_0x4ad841){return _0x263890(_0x4ad841);},'JWhaN':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','Zmpld':_0x191b55(0x11a),'GQvGV':_0x191b55(0xfb),'vNnmv':_0x191b55(0x13a),'KZSYg':_0x191b55(0xfc),'DBgHQ':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Mjgqv':_0x191b55(0xfe),'BNHsL':'--scope','IaAsI':'project','ZDdGp':_0x191b55(0xf8),'bgyUu':_0x191b55(0x138)},_0x8c0aa6=await _0x545228['WglqU'](isPluginInstalled,'ranger@trailhead');if(_0x8c0aa6)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x191b55(0x126)](_0x545228[_0x191b55(0x113)]);const _0x1e0ee7=await isMarketplaceAdded(_0x191b55(0x139));let _0x308d3f=_0x1e0ee7;if(_0x1e0ee7)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x11cb61=await runClaudeCommand(['plugin',_0x545228['Zmpld'],_0x545228[_0x191b55(0x100)],_0x545228['vNnmv']]);!_0x11cb61['success']?(console['error'](_0x545228[_0x191b55(0x121)],_0x11cb61[_0x191b55(0x12e)]),console['log'](_0x545228['DBgHQ'])):_0x308d3f=!![];}if(_0x308d3f){const _0x2cd2d1=await runClaudeCommand([_0x545228[_0x191b55(0x135)],'install','ranger@trailhead',_0x545228[_0x191b55(0x10b)],_0x545228[_0x191b55(0xff)]]);!_0x2cd2d1[_0x191b55(0x129)]?(console['error'](_0x545228[_0x191b55(0x101)],_0x2cd2d1[_0x191b55(0x12e)]),console[_0x191b55(0x126)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x545228[_0x191b55(0x11b)]);}return!![];}export async function setupCi(_0x3cdf40,_0x5e8962,_0x5f1c91){const _0x2585c8=_0x270d,_0x31ed41={'brQDO':_0x2585c8(0x110),'cBiTa':'auth','LHDvd':function(_0x203e53,_0x101b69){return _0x203e53(_0x101b69);},'yBwjp':function(_0x1e17b7){return _0x1e17b7();},'QMrUY':function(_0xf8d067,_0x5210e1,_0x1e03f1){return _0xf8d067(_0x5210e1,_0x1e03f1);},'scAmr':_0x2585c8(0x10a),'QMWdm':'chromium','dXYVE':function(_0x18bd84,_0x5af8c8){return _0x18bd84(_0x5af8c8);},'zypYU':function(_0x4f09fd,_0x5f0d22){return _0x4f09fd(_0x5f0d22);},'QXqdj':_0x2585c8(0x12d),'mGKJC':function(_0x2f0a35,_0x36f25b){return _0x2f0a35(_0x36f25b);},'miNIG':_0x2585c8(0x123),'mPqcD':function(_0x406913,_0x4a8521){return _0x406913 instanceof _0x4a8521;},'jPvwT':_0x2585c8(0xfe),'uWaNG':'skills'};console[_0x2585c8(0x126)](_0x31ed41[_0x2585c8(0x104)]),_0x5f1c91?.[_0x2585c8(0xfa)](_0x31ed41['cBiTa']),await _0x31ed41[_0x2585c8(0x118)](authenticate,_0x3cdf40),_0x5f1c91?.['trackPhaseEnd']('auth'),_0x5f1c91?.[_0x2585c8(0xfa)](_0x2585c8(0x10a));const {path:_0x3e1fcd,installed:_0xc4ac0c}=await _0x31ed41['yBwjp'](ensureRangerDir);await _0x31ed41[_0x2585c8(0x118)](writeRangerGitignore,_0x3e1fcd);const _0x2e494c=_0x31ed41['QMrUY'](join,_0x3e1fcd,_0x2585c8(0x125));!_0x31ed41[_0x2585c8(0x118)](existsSync,_0x2e494c)&&await _0x31ed41['QMrUY'](mkdir,_0x2e494c,{'recursive':!![]});_0x5f1c91?.[_0x2585c8(0x12b)](_0x31ed41[_0x2585c8(0x12f)],{'installed':_0xc4ac0c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41['QMWdm']);let _0x132221=![];_0x5e8962?.[_0x2585c8(0x112)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x132221=await ensureChromium();_0x5f1c91?.[_0x2585c8(0x12b)](_0x2585c8(0x11f),{'installed':_0x132221,'skipped':!!_0x5e8962?.['skipChromium']}),_0x5f1c91?.['trackPhaseStart']('profile_activate');const _0x1f4513=await _0x31ed41['dXYVE'](findCiProfile,_0x5e8962?.['profile']);let _0x3b935c=![];_0x5e8962?.[_0x2585c8(0x10f)]&&(await mkdir(_0x1f4513['path'],{'recursive':!![]}),await saveSettings(_0x1f4513['name'],{'baseUrl':_0x5e8962[_0x2585c8(0x10f)],'headless':!![]}),console[_0x2585c8(0x126)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x5e8962[_0x2585c8(0x10f)]),_0x3b935c=!![]);const _0x2fb7f6=_0x31ed41['QMrUY'](join,_0x1f4513[_0x2585c8(0xf9)],_0x2585c8(0x137));if(!_0x31ed41[_0x2585c8(0x10c)](existsSync,_0x2fb7f6)&&!_0x3b935c)throw new Error('CI\x20profile\x20\x22'+_0x1f4513[_0x2585c8(0x133)]+_0x2585c8(0x134));const _0x58acef=_0x31ed41['QMrUY'](join,_0x1f4513['path'],'auth.json'),_0x18be45=join(_0x1f4513[_0x2585c8(0xf9)],_0x31ed41[_0x2585c8(0x131)]),_0x2b50dc=_0x31ed41[_0x2585c8(0x132)](existsSync,_0x58acef),_0x4278d3=existsSync(_0x18be45);if(_0x4278d3)try{const _0x455ad6=await getToken();if(!_0x455ad6)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2d70a8=await readFile(_0x18be45);_0x31ed41[_0x2585c8(0x116)](decrypt,_0x2d70a8,_0x455ad6),console['log'](_0x31ed41[_0x2585c8(0x130)]);}catch(_0xa88f0c){const _0x55b09b=_0x31ed41['mPqcD'](_0xa88f0c,Error)?_0xa88f0c['message']:String(_0xa88f0c);throw new Error(_0x2585c8(0x117)+_0x1f4513['name']+'\x22:\x20'+_0x55b09b);}else _0x2b50dc?console['log']('✓\x20Auth\x20state\x20found'):console[_0x2585c8(0x126)](_0x2585c8(0xf7));await writeActiveProfileName(_0x1f4513[_0x2585c8(0x133)]),console['log']('✓\x20Active\x20profile:\x20'+_0x1f4513[_0x2585c8(0x133)]),_0x5f1c91?.['trackPhaseEnd'](_0x2585c8(0x128),{'profileName':_0x1f4513[_0x2585c8(0x133)],'hasAuth':_0x2b50dc,'hasEncryptedAuth':_0x4278d3,'createdSettings':_0x3b935c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41[_0x2585c8(0x13b)]);const _0x3ae714=await installPluginNonInteractive();_0x5f1c91?.['trackPhaseEnd'](_0x31ed41['jPvwT'],{'installed':_0x3ae714}),_0x5f1c91?.[_0x2585c8(0xfa)]('skills'),await skillup({'autoInstall':_0x2585c8(0x107)}),_0x5f1c91?.['trackPhaseEnd'](_0x31ed41[_0x2585c8(0x127)]),console[_0x2585c8(0x126)](_0x2585c8(0x105));}
|
|
1
|
+
(function(_0x4e7088,_0x53c0ad){const _0x59b882=_0x22c6,_0x2e83bd=_0x4e7088();while(!![]){try{const _0x3d5de2=-parseInt(_0x59b882(0x168))/0x1*(parseInt(_0x59b882(0x131))/0x2)+parseInt(_0x59b882(0x13d))/0x3*(parseInt(_0x59b882(0x132))/0x4)+parseInt(_0x59b882(0x126))/0x5*(-parseInt(_0x59b882(0x160))/0x6)+-parseInt(_0x59b882(0x136))/0x7+parseInt(_0x59b882(0x142))/0x8*(parseInt(_0x59b882(0x139))/0x9)+parseInt(_0x59b882(0x169))/0xa*(-parseInt(_0x59b882(0x140))/0xb)+parseInt(_0x59b882(0x129))/0xc*(parseInt(_0x59b882(0x155))/0xd);if(_0x3d5de2===_0x53c0ad)break;else _0x2e83bd['push'](_0x2e83bd['shift']());}catch(_0x848330){_0x2e83bd['push'](_0x2e83bd['shift']());}}}(_0x56ac,0xab338));function _0x22c6(_0x25bb4d,_0x38e1ea){_0x25bb4d=_0x25bb4d-0x124;const _0x56ac49=_0x56ac();let _0x22c672=_0x56ac49[_0x25bb4d];return _0x22c672;}import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x56ac(){const _0x333fbd=['xPzYV','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','RRWcK','7481740gFPeRA','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','ialzD','3231OPmVaD','settings.json','add','FSuKh','71313zhYRmh','Multiple\x20CI\x20profiles\x20found:\x20','plugin','14223ypqXwD','lGrbu','29576tICMwh','error','hkpQg','marketplace','--scope','CSHWT','OLehj','success','tbBrx','path','Apwhp','skipChromium','log','length','Failed\x20to\x20install\x20plugin:','project','auth','map','profile','18102227rgwmRa','dBLra','ranger@trailhead','ranger-testing/trailhead','trackPhaseStart','✓\x20Auth\x20state\x20found','auth.json.enc','dir_setup','tszTv','Failed\x20to\x20add\x20marketplace:','message','108JbPvjl','skills','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','profile_activate','TsFWe','Auto-detected\x20CI\x20profile:\x20','✓\x20Marketplace\x20already\x20added','hEfbz','245ryCGLV','10100BYdpAJ','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','279085pCmnix','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','name','24whubKJ','XkBdS','baseUrl','TCdED','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','trackPhaseEnd','SGtal','KJwtE','4138bvtiOG','80vQrZap'];_0x56ac=function(){return _0x333fbd;};return _0x56ac();}import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x114cfe){const _0x4851ca=_0x22c6,_0x4f4ba7={'TsFWe':function(_0x3764f4,_0x5e6c47){return _0x3764f4+_0x5e6c47;},'edFMD':function(_0x44e81d,_0x24893b,_0x5d240c){return _0x44e81d(_0x24893b,_0x5d240c);},'cafXM':function(_0x1c47b4,_0x13984a){return _0x1c47b4+_0x13984a;},'LlLlf':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x2709a8=getRangerDir(),_0x53111e=join(_0x2709a8,'ci');if(_0x114cfe){const _0x170c61=join(_0x53111e,_0x114cfe);return{'name':_0x114cfe,'path':_0x170c61};}if(!existsSync(_0x53111e))throw new Error(_0x4f4ba7[_0x4851ca(0x164)]('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4851ca(0x12d)));const _0x3e6fea=await _0x4f4ba7['edFMD'](readdir,_0x53111e,{'withFileTypes':!![]}),_0xd3cb7e=_0x3e6fea['filter'](_0x551154=>_0x551154['isDirectory']())[_0x4851ca(0x153)](_0x7ecc9f=>_0x7ecc9f['name']);if(_0xd3cb7e[_0x4851ca(0x14f)]===0x0)throw new Error(_0x4f4ba7['cafXM']('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4f4ba7['LlLlf']));if(_0xd3cb7e['length']===0x1){const _0x832de4=_0xd3cb7e[0x0];return console['log'](_0x4851ca(0x165)+_0x832de4),{'name':_0x832de4,'path':join(_0x53111e,_0x832de4)};}throw new Error(_0x4851ca(0x13e)+_0xd3cb7e['join'](',\x20')+_0x4851ca(0x162));}async function installPluginNonInteractive(){const _0xb28b96=_0x22c6,_0x4b141a={'DVCiz':function(_0x4af6f0,_0x182e90){return _0x4af6f0(_0x182e90);},'uoNul':_0xb28b96(0x157),'SGtal':_0xb28b96(0x125),'qhlLa':function(_0x1f7c55,_0x5ddc3b){return _0x1f7c55(_0x5ddc3b);},'lGrbu':_0xb28b96(0x16a),'ialzD':function(_0x5ae941,_0x289719){return _0x5ae941(_0x289719);},'SfBBA':_0xb28b96(0x145),'zIDeW':_0xb28b96(0x158),'KJwtE':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','XkBdS':function(_0x44aeef,_0x2f7075){return _0x44aeef(_0x2f7075);},'cstTI':'project'},_0xf9e195=await _0x4b141a['DVCiz'](isPluginInstalled,_0x4b141a['uoNul']);if(_0xf9e195)return console['log'](_0x4b141a[_0xb28b96(0x12f)]),![];console[_0xb28b96(0x14e)](_0xb28b96(0x134));const _0x122d75=await _0x4b141a['qhlLa'](isMarketplaceAdded,_0x4b141a[_0xb28b96(0x141)]);let _0x4cca79=_0x122d75;if(_0x122d75)console['log'](_0xb28b96(0x166));else{const _0x5e4aec=await _0x4b141a[_0xb28b96(0x138)](runClaudeCommand,['plugin',_0x4b141a['SfBBA'],_0xb28b96(0x13b),_0x4b141a['zIDeW']]);!_0x5e4aec[_0xb28b96(0x149)]?(console[_0xb28b96(0x143)](_0xb28b96(0x15e),_0x5e4aec['error']),console[_0xb28b96(0x14e)](_0x4b141a[_0xb28b96(0x130)])):_0x4cca79=!![];}if(_0x4cca79){const _0x60027e=await _0x4b141a[_0xb28b96(0x12a)](runClaudeCommand,[_0xb28b96(0x13f),'install',_0x4b141a['uoNul'],_0xb28b96(0x146),_0x4b141a['cstTI']]);!_0x60027e[_0xb28b96(0x149)]?(console[_0xb28b96(0x143)](_0xb28b96(0x150),_0x60027e['error']),console[_0xb28b96(0x14e)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console[_0xb28b96(0x14e)]('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0x503170,_0x55b71f,_0x174467){const _0x2185cf=_0x22c6,_0x17025f={'nRxqd':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','VdNLV':_0x2185cf(0x152),'mbzym':'dir_setup','tbBrx':function(_0x43ef0f){return _0x43ef0f();},'OLehj':function(_0x4c9e41,_0x16d90a){return _0x4c9e41(_0x16d90a);},'FSuKh':function(_0x52543d,_0x13ac8b,_0x39c102){return _0x52543d(_0x13ac8b,_0x39c102);},'tszTv':function(_0x205538,_0x52e7a0,_0x4842ec){return _0x205538(_0x52e7a0,_0x4842ec);},'hkpQg':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','bLnLr':'chromium','bOTgY':_0x2185cf(0x13a),'YhOXq':function(_0x195477,_0x449cd6,_0x1f5665){return _0x195477(_0x449cd6,_0x1f5665);},'xPzYV':'auth.json','TCdED':_0x2185cf(0x15b),'CaFqz':function(_0x347d6a){return _0x347d6a();},'oIXSg':_0x2185cf(0x124),'GfNPs':function(_0x59d688,_0x17300c){return _0x59d688 instanceof _0x17300c;},'hEfbz':_0x2185cf(0x15a),'ZsxmN':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','RRWcK':function(_0x2b3f1,_0x47f706){return _0x2b3f1(_0x47f706);},'Apwhp':'profile_activate','rYcIz':'plugin','dBLra':_0x2185cf(0x151),'CSHWT':_0x2185cf(0x161)};console['log'](_0x17025f['nRxqd']),_0x174467?.['trackPhaseStart'](_0x17025f['VdNLV']),await authenticate(_0x503170),_0x174467?.['trackPhaseEnd'](_0x17025f['VdNLV']),_0x174467?.['trackPhaseStart'](_0x17025f['mbzym']);const {path:_0x74c907,installed:_0x278d9c}=await _0x17025f[_0x2185cf(0x14a)](ensureRangerDir);await _0x17025f['OLehj'](writeRangerGitignore,_0x74c907);const _0x1b0665=_0x17025f[_0x2185cf(0x13c)](join,_0x74c907,'sessions');!_0x17025f[_0x2185cf(0x148)](existsSync,_0x1b0665)&&await _0x17025f[_0x2185cf(0x15d)](mkdir,_0x1b0665,{'recursive':!![]});_0x174467?.['trackPhaseEnd'](_0x2185cf(0x15c),{'installed':_0x278d9c}),_0x174467?.['trackPhaseStart']('chromium');let _0x2efd1e=![];_0x55b71f?.[_0x2185cf(0x14d)]?console['log'](_0x17025f[_0x2185cf(0x144)]):_0x2efd1e=await ensureChromium();_0x174467?.[_0x2185cf(0x12e)](_0x17025f['bLnLr'],{'installed':_0x2efd1e,'skipped':!!_0x55b71f?.[_0x2185cf(0x14d)]}),_0x174467?.[_0x2185cf(0x159)](_0x2185cf(0x163));const _0x1591c4=await _0x17025f['OLehj'](findCiProfile,_0x55b71f?.[_0x2185cf(0x154)]);let _0x1c9880=![];_0x55b71f?.[_0x2185cf(0x12b)]&&(await mkdir(_0x1591c4[_0x2185cf(0x14b)],{'recursive':!![]}),await _0x17025f['tszTv'](saveSettings,_0x1591c4[_0x2185cf(0x128)],{'baseUrl':_0x55b71f['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x55b71f['baseUrl']),_0x1c9880=!![]);const _0x52471c=_0x17025f[_0x2185cf(0x15d)](join,_0x1591c4[_0x2185cf(0x14b)],_0x17025f['bOTgY']);if(!existsSync(_0x52471c)&&!_0x1c9880)throw new Error('CI\x20profile\x20\x22'+_0x1591c4['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x2edfc1=_0x17025f['YhOXq'](join,_0x1591c4['path'],_0x17025f[_0x2185cf(0x133)]),_0x5eabda=join(_0x1591c4['path'],_0x17025f[_0x2185cf(0x12c)]),_0x40d7dc=_0x17025f['OLehj'](existsSync,_0x2edfc1),_0xde7015=_0x17025f[_0x2185cf(0x148)](existsSync,_0x5eabda);if(_0xde7015)try{const _0xce0f9f=await _0x17025f['CaFqz'](getToken);if(!_0xce0f9f)throw new Error(_0x17025f['oIXSg']);const _0x5189a8=await readFile(_0x5eabda);decrypt(_0x5189a8,_0xce0f9f),console[_0x2185cf(0x14e)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x240ac4){const _0x320b28=_0x17025f['GfNPs'](_0x240ac4,Error)?_0x240ac4[_0x2185cf(0x15f)]:String(_0x240ac4);throw new Error(_0x2185cf(0x137)+_0x1591c4['name']+'\x22:\x20'+_0x320b28);}else _0x40d7dc?console['log'](_0x17025f[_0x2185cf(0x167)]):console['log'](_0x17025f['ZsxmN']);await _0x17025f[_0x2185cf(0x135)](writeActiveProfileName,_0x1591c4['name']),console[_0x2185cf(0x14e)]('✓\x20Active\x20profile:\x20'+_0x1591c4[_0x2185cf(0x128)]),_0x174467?.[_0x2185cf(0x12e)](_0x17025f[_0x2185cf(0x14c)],{'profileName':_0x1591c4[_0x2185cf(0x128)],'hasAuth':_0x40d7dc,'hasEncryptedAuth':_0xde7015,'createdSettings':_0x1c9880}),_0x174467?.['trackPhaseStart']('plugin');const _0x7b9aef=await installPluginNonInteractive();_0x174467?.['trackPhaseEnd'](_0x17025f['rYcIz'],{'installed':_0x7b9aef}),_0x174467?.[_0x2185cf(0x159)]('skills'),await skillup({'autoInstall':_0x17025f[_0x2185cf(0x156)]}),_0x174467?.['trackPhaseEnd'](_0x17025f[_0x2185cf(0x147)]),console['log'](_0x2185cf(0x127));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x204656,_0x4bf81c){const _0x142e4c=_0x1e3b,_0x147291=_0x204656();while(!![]){try{const _0x278b42=-parseInt(_0x142e4c(0x1bd))/0x1*(parseInt(_0x142e4c(0x1db))/0x2)+-parseInt(_0x142e4c(0x1c5))/0x3+parseInt(_0x142e4c(0x1d7))/0x4*(parseInt(_0x142e4c(0x1c8))/0x5)+-parseInt(_0x142e4c(0x1c7))/0x6+-parseInt(_0x142e4c(0x1df))/0x7*(-parseInt(_0x142e4c(0x1c4))/0x8)+-parseInt(_0x142e4c(0x1d3))/0x9*(parseInt(_0x142e4c(0x1e2))/0xa)+-parseInt(_0x142e4c(0x1dc))/0xb*(-parseInt(_0x142e4c(0x1d4))/0xc);if(_0x278b42===_0x4bf81c)break;else _0x147291['push'](_0x147291['shift']());}catch(_0x3c1d9b){_0x147291['push'](_0x147291['shift']());}}}(_0x5f50,0xd1ace));import{basename}from'path';import _0x3fb076 from'inquirer';function _0x1e3b(_0x39aaf1,_0x2f6008){_0x39aaf1=_0x39aaf1-0x1b6;const _0x5f50e2=_0x5f50();let _0x1e3b4f=_0x5f50e2[_0x39aaf1];return _0x1e3b4f;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x5f50(){const _0x2bdabe=['LlFRL','/skills/','1|2|5|0|3|4','38XVmVZs','35716153XUZCfd','rzHVH','/.opencode/skills/','2198dIWKEg','This\x20project\x20only\x20(','BfqmC','4261580xfoXFo','\x0a📦\x20Installing\x20skills...\x0a','isTTY','\x20skill','user','prompt','amwdY','To\x20use:','ACuic','74497gingDM','FTpIw','uUTqA','azjMO','\x20successfully!\x0a','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','list','22696UTlLwA','147444NGnEXD','\x0a✅\x20Installed\x20','7698732RCypNh','5QCoUic','installLevel','ooojd','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','message','iTIbA','opencode','csrFF','DDWCB','Where\x20should\x20skills\x20be\x20installed?','HzZGu','27UJneHo','12ryDMCy','log','raFLi','2989104okfSPH'];_0x5f50=function(){return _0x2bdabe;};return _0x5f50();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x53a5e7={}){const _0x148d53=_0x1e3b,_0x377a54={'csrFF':'claude','FTpIw':_0x148d53(0x1da),'amwdY':function(_0x445709,_0x34ec80){return _0x445709===_0x34ec80;},'gzGYS':_0x148d53(0x1ce),'bVFBR':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','ooojd':'✓\x20Found\x20API\x20token','LlFRL':function(_0xa15e4e,_0x4f12d5){return _0xa15e4e(_0x4f12d5);},'iTIbA':_0x148d53(0x1b8),'PKEzM':function(_0x723143){return _0x723143();},'tQYQw':function(_0x476352,_0x388cf5){return _0x476352===_0x388cf5;},'uUTqA':_0x148d53(0x1c3),'DDWCB':_0x148d53(0x1c9),'azjMO':_0x148d53(0x1d1),'BfqmC':'project','ACuic':'ranger','HzZGu':function(_0x11a888,_0x23d781){return _0x11a888 instanceof _0x23d781;},'raFLi':'user-level','GBPhK':'project-level','rzHVH':_0x148d53(0x1bb),'bouyg':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','EQqLO':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x148d53(0x1d5)](_0x148d53(0x1cb));const _0x437e92=_0x53a5e7['platform']??_0x377a54[_0x148d53(0x1cf)],_0x22aa7b=await getToken();if(!_0x22aa7b){const _0xbe651f=_0x377a54[_0x148d53(0x1be)]['split']('|');let _0x319dad=0x0;while(!![]){switch(_0xbe651f[_0x319dad++]){case'0':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x377a54[_0x148d53(0x1ba)](_0x437e92,_0x377a54['gzGYS'])?'\x20--opencode':'')+'\x20<your-api-token>');continue;case'1':console['log'](_0x377a54['bVFBR']);continue;case'2':console['log']('To\x20get\x20started:');continue;case'3':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x437e92===_0x148d53(0x1ce)?'\x20--opencode':'')+'\x0a');continue;case'4':return;case'5':console[_0x148d53(0x1d5)](_0x148d53(0x1c2));continue;}break;}}console[_0x148d53(0x1d5)](_0x377a54[_0x148d53(0x1ca)]);const _0x1c0e8e=getProjectRoot(),_0x33b692=_0x377a54[_0x148d53(0x1d8)](basename,_0x1c0e8e),_0x572741=_0x377a54['amwdY'](_0x437e92,_0x377a54['gzGYS'])?_0x377a54[_0x148d53(0x1d8)](getOpencodeConfigDir,_0x377a54[_0x148d53(0x1cd)])+_0x148d53(0x1d9):_0x377a54['PKEzM'](getClaudeConfigDir)+'/skills/',_0x54433a=_0x377a54['tQYQw'](_0x437e92,_0x377a54['gzGYS'])?_0x1c0e8e+_0x148d53(0x1de):_0x1c0e8e+'/.claude/skills/',_0x40730b=process['stdin'][_0x148d53(0x1b6)]&&process['stdout'][_0x148d53(0x1b6)];let _0x36fd47;if(_0x53a5e7['autoInstall'])_0x36fd47=_0x53a5e7['autoInstall'];else{if(_0x40730b){const _0x26750f=await _0x3fb076[_0x148d53(0x1b9)]([{'type':_0x377a54[_0x148d53(0x1bf)],'name':_0x377a54[_0x148d53(0x1d0)],'message':_0x377a54[_0x148d53(0x1c0)],'choices':[{'name':'All\x20projects\x20('+_0x572741+')','value':'user'},{'name':_0x148d53(0x1e0)+_0x54433a+')','value':_0x377a54[_0x148d53(0x1e1)]}]}]);_0x36fd47=_0x26750f[_0x148d53(0x1c9)];}else _0x36fd47='project',console[_0x148d53(0x1d5)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x54433a+')');}let _0x358248=0x0;const _0x1dde0b=getCurrentVersion();console['log'](_0x148d53(0x1e3));try{const _0x54b2c5=await installSkill(_0x377a54[_0x148d53(0x1bc)],{'cliVersion':_0x1dde0b,'level':_0x36fd47,'platform':_0x437e92});_0x54b2c5&&_0x358248++;}catch(_0x35e68b){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x377a54[_0x148d53(0x1d2)](_0x35e68b,Error)?_0x35e68b[_0x148d53(0x1cc)]:_0x35e68b);}if(_0x358248>0x0){const _0xcd5ca0=_0x377a54[_0x148d53(0x1ba)](_0x36fd47,'user')?_0x377a54[_0x148d53(0x1d6)]:_0x377a54['GBPhK'];console[_0x148d53(0x1d5)](_0x148d53(0x1c6)+_0x358248+'\x20'+_0xcd5ca0+_0x148d53(0x1b7)+(_0x358248>0x1?'s':'')+_0x148d53(0x1c1)),!_0x53a5e7['suppressUsage']&&(console[_0x148d53(0x1d5)](_0x377a54[_0x148d53(0x1dd)]),_0x437e92===_0x148d53(0x1ce)?console['log'](_0x377a54['bouyg']):console[_0x148d53(0x1d5)]('\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!'));}else console[_0x148d53(0x1d5)](_0x377a54['EQqLO']);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xa4df6f=_0x1ddf;(function(_0x399780,_0x3cf7c7){const _0x1bb421=_0x1ddf,_0x372f9f=_0x399780();while(!![]){try{const _0x57474d=parseInt(_0x1bb421(0xc0))/0x1+-parseInt(_0x1bb421(0x80))/0x2*(-parseInt(_0x1bb421(0x89))/0x3)+parseInt(_0x1bb421(0xcf))/0x4+parseInt(_0x1bb421(0xbd))/0x5*(-parseInt(_0x1bb421(0x98))/0x6)+-parseInt(_0x1bb421(0xc6))/0x7*(parseInt(_0x1bb421(0xc7))/0x8)+-parseInt(_0x1bb421(0x8e))/0x9+parseInt(_0x1bb421(0x8a))/0xa;if(_0x57474d===_0x3cf7c7)break;else _0x372f9f['push'](_0x372f9f['shift']());}catch(_0x55142d){_0x372f9f['push'](_0x372f9f['shift']());}}}(_0x2520,0xcd71e));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2eb4b6 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 _0x2520(){const _0x32e16b=['8195HYxePA','chromium','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','600359XBGnjL','git_check','iTKnc','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','provided_token','GvcEo','324436cEfAUT','104SWDntM','error','cNHqd','\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','url','/ranger:enable','organizationName','use\x20until\x20the\x20session\x20expires.\x0a','6673828BvfooC','stdout','NdCgi','GEGfF','kSPSJ','CzqiE','ready','platform','eLsIo','ranger\x20profile\x20add\x20local','qWwpg','SjZMK','jSWzG','QDDbz','confirm','trackPhaseStart','Lqbon','\x20(fallback\x20version)','allowInsecureLocalhost','skills','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','existing_token','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','XZbLZ','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','OGSFX','2uKzizs','\x20install\x20chromium','jifWn','skipChromium','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','trackPhaseEnd','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','337467wGfgjr','9446490jAyplV','\x1b[1m','plugin','stdin','1906083NwHvSr','profile','install','GITHUB_ENV','resolve','prompt','fwmIg','log','\x20now?','fAKzJ','6114bcDzlu','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aIn\x20Claude\x20Code,\x20run\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','executablePath','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','isTTY',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','vfCER','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','VRlBJ','GFQws','abnyk','JEvSE','\x20\x20npx\x20playwright@','success','TPhXp','message','vOQaJ','tzkHb','vYQpS','OShco','The\x20required\x20version\x20(','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','status','inherit','opencode','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','cTnIv','playwright/package.json','aoGFc','env','user','JnEGZ','BzqJY','✓\x20.ranger/\x20directory\x20already\x20exists'];_0x2520=function(){return _0x32e16b;};return _0x2520();}import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x1ddf(_0x3d4de1,_0x50676f){_0x3d4de1=_0x3d4de1-0x75;const _0x252013=_0x2520();let _0x1ddfcc=_0x252013[_0x3d4de1];return _0x1ddfcc;}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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x297966=>_0xa4df6f(0x8b)+_0x297966+'\x1b[0m';function getPlaywrightVersion(){const _0x4177a5=_0xa4df6f,_0x221cb2={'pwKts':function(_0x2d5c51,_0x23d133){return _0x2d5c51(_0x23d133);}};try{const _0x35eb2a=require[_0x4177a5(0x92)](_0x4177a5(0xb6)),_0x54a81e=_0x221cb2['pwKts'](require,_0x35eb2a);return _0x54a81e['version'];}catch{return null;}}function installChromiumBinary(_0x4c6207){const _0x427fa3=_0xa4df6f,_0x656d5={'jSWzG':function(_0x45cd0e){return _0x45cd0e();},'wlGcj':_0x427fa3(0x90),'vYQpS':'close'};return new Promise((_0x32114a,_0x5d14fc)=>{const _0x44f05a=_0x427fa3,_0x20a563=['playwright@'+_0x4c6207,_0x656d5['wlGcj'],'chromium'],_0x4b4a0a=spawn('npx',_0x20a563,{'stdio':_0x44f05a(0xb2),'shell':process[_0x44f05a(0xd6)]==='win32'});_0x4b4a0a['on'](_0x656d5[_0x44f05a(0xad)],_0x5130f4=>{const _0x238ced=_0x44f05a;_0x5130f4===0x0?_0x656d5[_0x238ced(0xdb)](_0x32114a):_0x5d14fc(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x5130f4));}),_0x4b4a0a['on'](_0x44f05a(0xc8),_0x11d4a2=>{_0x5d14fc(_0x11d4a2);});});}export async function authenticate(_0x36f050){const _0x4169ad=_0xa4df6f,_0x3a3af5={'MTpgi':_0x4169ad(0x7b),'bwrwv':function(_0x5b3899,_0x2b61f8){return _0x5b3899 instanceof _0x2b61f8;},'qWwpg':function(_0x2fa7b9,_0x1eb997){return _0x2fa7b9(_0x1eb997);},'JEvSE':'device_auth','VRlBJ':'Validating\x20API\x20token...','tzkHb':'✓\x20Exported\x20credentials\x20for\x20CI','Lqbon':'✓\x20Stored\x20credentials\x20locally','FGzUh':_0x4169ad(0xc4)};if(!_0x36f050){const _0x25fa44=await getToken();if(_0x25fa44){const _0x429f62=await getCurrentUser(_0x25fa44);if(_0x429f62[_0x4169ad(0xa8)])return console[_0x4169ad(0x95)]('✓\x20Already\x20authenticated\x20to\x20'+_0x429f62[_0x4169ad(0xb9)][_0x4169ad(0xcd)]),{'token':_0x25fa44,'method':_0x3a3af5['MTpgi']};}try{_0x36f050=await runDeviceAuthFlow();}catch(_0x40ac55){throw new Error('Authentication\x20failed:\x20'+(_0x3a3af5['bwrwv'](_0x40ac55,Error)?_0x40ac55['message']:_0x40ac55));}const _0x1f1ee2=await _0x3a3af5[_0x4169ad(0xd9)](getCurrentUser,_0x36f050);if(!_0x1f1ee2[_0x4169ad(0xa8)])throw new Error(_0x4169ad(0xc3)+_0x1f1ee2[_0x4169ad(0xc8)]);return console[_0x4169ad(0x95)]('✓\x20Authenticated\x20to\x20'+_0x1f1ee2[_0x4169ad(0xb9)]['organizationName']),{'token':_0x36f050,'method':_0x3a3af5[_0x4169ad(0xa6)]};}console[_0x4169ad(0x95)](_0x3a3af5[_0x4169ad(0xa3)]);const _0x4afcce=await getCurrentUser(_0x36f050);if(!_0x4afcce[_0x4169ad(0xa8)]){if(_0x4afcce[_0x4169ad(0xb1)])throw new Error('Authentication\x20failed:\x20'+_0x4afcce['error']+_0x4169ad(0x84));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4afcce['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x4afcce[_0x4169ad(0xb9)]['organizationName']),await storeToken(_0x36f050),console[_0x4169ad(0x95)](process[_0x4169ad(0xb8)][_0x4169ad(0x91)]?_0x3a3af5[_0x4169ad(0xac)]:_0x3a3af5[_0x4169ad(0x75)]),{'token':_0x36f050,'method':_0x3a3af5['FGzUh']};}export async function ensureRangerDir(){const _0x502c97=_0xa4df6f,_0x3ae5e3={'cTnIv':function(_0x594968){return _0x594968();},'jifWn':function(_0x3fb49d,_0x4980c9,_0x19f097){return _0x3fb49d(_0x4980c9,_0x19f097);},'TPhXp':function(_0x37df93,_0x4de62d){return _0x37df93(_0x4de62d);},'iTKnc':_0x502c97(0xbc)},_0x4e169a=_0x3ae5e3[_0x502c97(0xb5)](findGitRoot),_0x369e77=_0x4e169a?_0x3ae5e3[_0x502c97(0x82)](join,_0x4e169a,'.ranger'):getRangerDir();return!_0x3ae5e3[_0x502c97(0xa9)](existsSync,_0x369e77)?(await mkdir(_0x369e77,{'recursive':!![]}),console[_0x502c97(0x95)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x369e77,'installed':!![]}):(console['log'](_0x3ae5e3[_0x502c97(0xc2)]),{'path':_0x369e77,'installed':![]});}export async function ensureChromium(){const _0x5a2341=_0xa4df6f,_0x52b270={'OShco':function(_0x44c4cb,_0x24690e){return _0x44c4cb(_0x24690e);},'mLmIn':_0x5a2341(0x7a),'fDyXa':function(_0x4b42eb){return _0x4b42eb();},'SjZMK':'confirm','ODWcz':'install','BSfct':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','CkVcA':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','jWQIR':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZZelO':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x332ea5=![];try{const _0x71f0c6=chromium[_0x5a2341(0x9d)]();_0x332ea5=_0x52b270[_0x5a2341(0xae)](existsSync,_0x71f0c6);}catch{_0x332ea5=![];}if(_0x332ea5)return console['log'](_0x52b270['mLmIn']),![];const _0x33954d=_0x52b270['fDyXa'](getPlaywrightVersion),_0x2590fe=_0x33954d??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x14aab8=!_0x33954d,_0x1a6ea4=process[_0x5a2341(0x8d)]['isTTY']&&process[_0x5a2341(0xd0)]['isTTY'];let _0x3495ad=!![];if(_0x1a6ea4){const {install:_0x215639}=await _0x2eb4b6[_0x5a2341(0x93)]([{'type':_0x52b270[_0x5a2341(0xda)],'name':_0x52b270['ODWcz'],'message':_0x14aab8?_0x5a2341(0x79)+_0x2590fe+_0x5a2341(0x96):_0x5a2341(0xaf)+_0x2590fe+_0x5a2341(0xa0),'default':!![]}]);_0x3495ad=_0x215639;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x2590fe+(_0x14aab8?_0x5a2341(0x76):'')+'...');if(_0x3495ad){console[_0x5a2341(0x95)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x2590fe),console[_0x5a2341(0x95)](_0x52b270['BSfct']);}catch(_0x2e2474){console['error'](_0x52b270['CkVcA'],_0x2e2474 instanceof Error?_0x2e2474[_0x5a2341(0xaa)]:_0x2e2474),console[_0x5a2341(0x95)](_0x52b270['jWQIR']),console['log'](_0x5a2341(0xa7)+_0x2590fe+_0x5a2341(0x81));}}else console['log'](_0x52b270['ZZelO']),console['log'](_0x5a2341(0x9b)),console[_0x5a2341(0x95)]('\x20\x20npx\x20playwright@'+_0x2590fe+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x5e9dd7){const _0x189f83=_0xa4df6f,_0x1b1007={'JPfng':'.gitignore','CzqiE':function(_0x38393b,_0x186232,_0x3594f2){return _0x38393b(_0x186232,_0x3594f2);}},_0x2de7e0=join(_0x5e9dd7,_0x1b1007['JPfng']),_0x675561=_0x189f83(0xca);await _0x1b1007[_0x189f83(0xd4)](writeFile,_0x2de7e0,_0x675561),console[_0x189f83(0x95)]('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x20ecd5=_0xa4df6f,_0x429b46={'GEGfF':_0x20ecd5(0xd8),'kSPSJ':_0x20ecd5(0xb4)};console[_0x20ecd5(0x95)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x20ecd5(0x95)]('\x20\x20'+bold(_0x429b46[_0x20ecd5(0xd2)])),console['log'](_0x429b46[_0x20ecd5(0xd3)]);}async function ensureLocalEnv(_0x3fa2ef,_0x11a7b0){const _0x2a5f51=_0xa4df6f,_0x38e9c3={'petHH':_0x2a5f51(0xbf),'mPpBy':function(_0x27f17e,_0x4d275c,_0x10159d){return _0x27f17e(_0x4d275c,_0x10159d);},'fAKzJ':'local','jZLRp':_0x2a5f51(0x85),'eLsIo':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','GvcEo':_0x2a5f51(0x9c),'cNHqd':_0x2a5f51(0xdd),'NdCgi':'wantsProfile','tnrcp':function(_0x5e4b7e,_0x5980cd,_0x3ce7ab,_0x59700f){return _0x5e4b7e(_0x5980cd,_0x3ce7ab,_0x59700f);},'GFQws':'\x0a❌\x20Profile\x20setup\x20failed:','vOQaJ':function(_0x1fc813){return _0x1fc813();}};if(!findGitRoot())return console['log'](_0x38e9c3['petHH']),{'ready':![],'skipped':!![]};if(_0x38e9c3['mPpBy'](findExistingEnv,_0x38e9c3['fAKzJ'],{'locations':[_0x38e9c3[_0x2a5f51(0x97)]]}))return console[_0x2a5f51(0x95)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x364bab=process[_0x2a5f51(0x8d)]['isTTY']&&process[_0x2a5f51(0xd0)]['isTTY'];if(_0x364bab&&!_0x3fa2ef?.['url']){console[_0x2a5f51(0x95)](_0x38e9c3['jZLRp']),console['log'](_0x2a5f51(0x7c)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xd7)]),console['log'](_0x2a5f51(0xce)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xc5)]);const {wantsProfile:_0x319757}=await _0x2eb4b6['prompt']([{'type':_0x38e9c3[_0x2a5f51(0xc9)],'name':_0x38e9c3[_0x2a5f51(0xd1)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x319757)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x38e9c3['tnrcp'](addEnv,'local',{'url':_0x3fa2ef?.['url'],'force':_0x3fa2ef?.['force'],'allowInsecureLocalhost':_0x3fa2ef?.[_0x2a5f51(0x77)]},_0x11a7b0),{'ready':!![],'skipped':![]};}catch(_0x37da4d){return console['error'](_0x38e9c3[_0x2a5f51(0xa4)],_0x37da4d instanceof Error?_0x37da4d['message']:_0x37da4d),_0x38e9c3[_0x2a5f51(0xab)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x2d5575,_0x1b6e6e,_0x35359a){const _0x20e98d=_0xa4df6f,_0x399bd1={'XZbLZ':'\x0a🚀\x20Ranger\x20Setup\x0a','xXfIw':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','abnyk':_0x20e98d(0xb9),'aoGFc':_0x20e98d(0xc1),'rOfzE':function(_0x79272c){return _0x79272c();},'OGSFX':function(_0x3c6613,_0x33922c){return _0x3c6613(_0x33922c);},'oShyx':'auth','nQFXJ':'chromium','fwmIg':_0x20e98d(0x86),'BzqJY':_0x20e98d(0x8c),'eBcDP':function(_0x5d7ac5,_0x1fa50f){return _0x5d7ac5(_0x1fa50f);},'VGXxF':'skills','uUQSP':function(_0x52109d,_0x188c9e,_0x37d261){return _0x52109d(_0x188c9e,_0x37d261);},'BkbPE':function(_0x211779,_0x36a1c5){return _0x211779(_0x36a1c5);},'QDDbz':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','vfCER':_0x20e98d(0x88),'ojPaB':_0x20e98d(0x9e),'JnEGZ':_0x20e98d(0xcc),'WOrou':function(_0x4fd207,_0x505011){return _0x4fd207+_0x505011;}};console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x7d)]);const _0x2520e3=process[_0x20e98d(0x8d)]['isTTY']&&process['stdout'][_0x20e98d(0x9f)];!_0x2520e3&&!_0x1b6e6e?.['scope']&&(console['log'](_0x399bd1['xXfIw']),_0x1b6e6e={..._0x1b6e6e,'scope':_0x399bd1[_0x20e98d(0xa5)]});_0x35359a?.[_0x20e98d(0xde)]('git_check');if(!findGitRoot()){await _0x35359a?.['trackPhaseError']('git_check',new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x35359a?.['trackPhaseEnd'](_0x399bd1[_0x20e98d(0xb7)]);const _0xc68a23=!existsSync(_0x399bd1['rOfzE'](getRangerDir)),{path:_0x47879b}=await ensureRangerDir();_0x35359a?.[_0x20e98d(0xde)]('auth');const _0x2cb24a=await _0x399bd1[_0x20e98d(0x7f)](authenticate,_0x2d5575);_0x35359a?.['trackPhaseEnd'](_0x399bd1['oShyx'],{'isFirstRun':_0xc68a23,'method':_0x2cb24a['method']}),_0x35359a?.['trackPhaseStart'](_0x399bd1['nQFXJ']);_0x1b6e6e?.[_0x20e98d(0x83)]?console[_0x20e98d(0x95)](_0x20e98d(0xb0)):await ensureChromium();_0x35359a?.['trackPhaseEnd'](_0x20e98d(0xbe),{'isFirstRun':_0xc68a23,'skipped':!!_0x1b6e6e?.['skipChromium']}),await writeRangerGitignore(_0x47879b),console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x94)]);const _0x15a8ba=_0x1b6e6e?.['scope'],_0x49f201=_0x1b6e6e?.[_0x20e98d(0xb3)]??![];let _0x4e2e63=null;_0x49f201?(_0x35359a?.[_0x20e98d(0xde)](_0x399bd1[_0x20e98d(0xbb)]),_0x4e2e63=await _0x399bd1['eBcDP'](ensureOpencodePluginConfig,_0x15a8ba),_0x35359a?.[_0x20e98d(0x87)]('plugin',{'isFirstRun':_0xc68a23,'opencode':!![]})):(_0x35359a?.['trackPhaseStart'](_0x399bd1[_0x20e98d(0xbb)]),await ensureClaudePlugin(_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8c),{'isFirstRun':_0xc68a23}));if(_0x49f201&&_0x4e2e63){_0x35359a?.['trackPhaseStart'](_0x399bd1['VGXxF']);try{await _0x399bd1['uUQSP'](installSkill,'ranger',{'level':_0x4e2e63['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x35359a?.[_0x20e98d(0x87)](_0x20e98d(0x78),{'isFirstRun':_0xc68a23,'opencode':!![]});}catch(_0x76b346){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x76b346 instanceof Error?_0x76b346[_0x20e98d(0xaa)]:_0x76b346),_0x35359a?.[_0x20e98d(0x87)]('skills',{'isFirstRun':_0xc68a23,'opencode':!![],'failed':!![]});}}else _0x35359a?.['trackPhaseStart'](_0x20e98d(0x78)),await _0x399bd1['BkbPE'](ensureClaudeSkills,_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x78),{'isFirstRun':_0xc68a23});if(!_0x2520e3&&!_0x1b6e6e?.['url'])console['log'](_0x399bd1[_0x20e98d(0xdc)]),console[_0x20e98d(0x95)]('\x20\x20'+_0x399bd1['eBcDP'](bold,_0x20e98d(0xd8))+'\x0a');else{_0x35359a?.['trackPhaseStart']('profile');const _0x2c4b1f=await ensureLocalEnv({'url':_0x1b6e6e?.[_0x20e98d(0xcb)],'force':_0x1b6e6e?.['force'],'allowInsecureLocalhost':_0x1b6e6e?.[_0x20e98d(0x77)]},_0x35359a);_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8f),{'isFirstRun':_0xc68a23,'profileReady':_0x2c4b1f[_0x20e98d(0xd5)],'userSkipped':_0x2c4b1f['skipped']}),_0x2c4b1f['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x49f201)console['log'](_0x399bd1[_0x20e98d(0xa1)]),console[_0x20e98d(0x95)](_0x20e98d(0xa2)),console[_0x20e98d(0x95)](_0x20e98d(0x7e)),console['log'](_0x399bd1['ojPaB']);else{const _0x33a07b=bold(_0x399bd1[_0x20e98d(0xba)]);console['log'](_0x399bd1['WOrou'](_0x20e98d(0x9a)+_0x33a07b+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x20e98d(0x99));}}
|
|
1
|
+
const _0x5941bc=_0x8386;(function(_0x883480,_0x28dfe1){const _0x2359bd=_0x8386,_0x21b95d=_0x883480();while(!![]){try{const _0x1737ab=parseInt(_0x2359bd(0x15a))/0x1+parseInt(_0x2359bd(0x153))/0x2+-parseInt(_0x2359bd(0x140))/0x3+-parseInt(_0x2359bd(0x157))/0x4*(-parseInt(_0x2359bd(0x14d))/0x5)+parseInt(_0x2359bd(0x12f))/0x6+-parseInt(_0x2359bd(0x16d))/0x7*(parseInt(_0x2359bd(0x145))/0x8)+-parseInt(_0x2359bd(0x121))/0x9;if(_0x1737ab===_0x28dfe1)break;else _0x21b95d['push'](_0x21b95d['shift']());}catch(_0x1ec036){_0x21b95d['push'](_0x21b95d['shift']());}}}(_0x1cd0,0x88336));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x8386(_0x3ea0b9,_0x4c8ba7){_0x3ea0b9=_0x3ea0b9-0x11a;const _0x1cd0f8=_0x1cd0();let _0x83860b=_0x1cd0f8[_0x3ea0b9];return _0x83860b;}import _0x1be0a5 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x1cd0(){const _0x724e94=['profile','jHTIF','Authentication\x20failed:\x20','XDiUh','inherit','plugin','stdout','local','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','ViNLL','opencode','ranger\x20profile\x20add\x20local','ugwId','SCLOZ','\x20(fallback\x20version)','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','3117585srWCfY','organizationName','success','isTTY','hIgKf','400HEDykG','ready','version','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x20now?','iIBjC','WYPVO','.gitignore','216635yHAzey','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','FBgiC','allowInsecureLocalhost','geRNu','\x0a⚠\x20Skipping\x20Chromium\x20installation.','1002428fWQoaX','chromium','close','\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','60ZBQgWi','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','warn','1051715MjZZqU','CujwL','log','skills','Validating\x20API\x20token...','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','oeNKQ','GVSaG','\x0a🚀\x20Ranger\x20Setup\x0a','install','skipChromium','Vfawd','message','EhvNd','user','✓\x20Created\x20.ranger/.gitignore','resolve','error','HCIgs','35644AENuIG','CEGKx','HAbYz','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipped','auth','git_check','YchSe','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','✓\x20Local\x20profile\x20already\x20exists','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','VFGYX','cWFJq','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','playwright@','url','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','dZCSM','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','FixYa','cXcCY','executablePath','kKqBq','scope','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','confirm','DIXQA','\x1b[0m','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20\x20npx\x20playwright@','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','wuHOk','ihmgV','prompt','trackPhaseEnd','✓\x20Authenticated\x20to\x20','bOHih','GUYnT','4491639uQCFUQ','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','trackPhaseStart','AOCyk','ayAkT','\x20install\x20chromium','gvnMd','EmIin','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','method','✓\x20Stored\x20credentials\x20locally','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ynHsy','Wrccb','887460lAYMkq'];_0x1cd0=function(){return _0x724e94;};return _0x1cd0();}import{addEnv}from'./addEnv.js';import{getRangerDir,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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x61de39=>'\x1b[1m'+_0x61de39+_0x5941bc(0x189);function getPlaywrightVersion(){const _0x5176b8=_0x5941bc,_0x2bb234={'DIXQA':'playwright/package.json'};try{const _0x5683d3=require[_0x5176b8(0x16a)](_0x2bb234[_0x5176b8(0x188)]),_0x367741=require(_0x5683d3);return _0x367741[_0x5176b8(0x147)];}catch{return null;}}function installChromiumBinary(_0x416795){const _0x54adde=_0x5941bc,_0xda22a5={'ynHsy':function(_0x521f3b,_0x29f181){return _0x521f3b(_0x29f181);},'pebgK':'install','oeNKQ':'chromium','ZGZlk':'npx','kzjJL':function(_0x20046f,_0x29b4b4){return _0x20046f===_0x29b4b4;},'YCGRc':_0x54adde(0x155),'qLSwq':'error'};return new Promise((_0x2649dd,_0x1ab4b3)=>{const _0xd7259a=_0x54adde,_0x3235ab={'GUYnT':function(_0x4dad66,_0x25d76b){const _0x2ee8e7=_0x8386;return _0xda22a5[_0x2ee8e7(0x12d)](_0x4dad66,_0x25d76b);}},_0x49633d=[_0xd7259a(0x17c)+_0x416795,_0xda22a5['pebgK'],_0xda22a5[_0xd7259a(0x160)]],_0xd00246=spawn(_0xda22a5['ZGZlk'],_0x49633d,{'stdio':['ignore',_0xd7259a(0x134),_0xd7259a(0x134)],'shell':_0xda22a5['kzjJL'](process['platform'],'win32')});_0xd00246['on'](_0xda22a5['YCGRc'],_0x425c2c=>{const _0x5e06dc=_0xd7259a;_0x425c2c===0x0?_0x2649dd():_0x3235ab[_0x5e06dc(0x120)](_0x1ab4b3,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x425c2c));}),_0xd00246['on'](_0xda22a5['qLSwq'],_0x59787a=>{_0x3235ab['GUYnT'](_0x1ab4b3,_0x59787a);});});}export async function authenticate(_0x27b3a1){const _0x5f1354=_0x5941bc,_0x571e6a={'XDiUh':function(_0x47ad77){return _0x47ad77();},'SCLOZ':'existing_token','VMhzU':_0x5f1354(0x15e),'EhvNd':'provided_token'};if(!_0x27b3a1){const _0x2baa36=await _0x571e6a[_0x5f1354(0x133)](getToken);if(_0x2baa36){const _0x480958=await getCurrentUser(_0x2baa36);if(_0x480958[_0x5f1354(0x142)])return console[_0x5f1354(0x15c)]('✓\x20Already\x20authenticated\x20to\x20'+_0x480958['user'][_0x5f1354(0x141)]),{'token':_0x2baa36,'method':_0x571e6a[_0x5f1354(0x13d)]};}try{_0x27b3a1=await runDeviceAuthFlow();}catch(_0x3d7134){throw new Error(_0x5f1354(0x132)+(_0x3d7134 instanceof Error?_0x3d7134[_0x5f1354(0x166)]:_0x3d7134));}const _0x488e3d=await getCurrentUser(_0x27b3a1);if(!_0x488e3d[_0x5f1354(0x142)])throw new Error(_0x5f1354(0x175)+_0x488e3d['error']);return console['log'](_0x5f1354(0x11e)+_0x488e3d['user']['organizationName']),{'token':_0x27b3a1,'method':'device_auth'};}console['log'](_0x571e6a['VMhzU']);const _0x47b9fb=await getCurrentUser(_0x27b3a1);if(!_0x47b9fb[_0x5f1354(0x142)]){if(_0x47b9fb['status'])throw new Error('Authentication\x20failed:\x20'+_0x47b9fb[_0x5f1354(0x16b)]+_0x5f1354(0x14e));else throw new Error(_0x5f1354(0x170)+_0x47b9fb['error']+_0x5f1354(0x13f));}return console[_0x5f1354(0x15c)](_0x5f1354(0x11e)+_0x47b9fb[_0x5f1354(0x168)][_0x5f1354(0x141)]),await storeToken(_0x27b3a1),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x5f1354(0x12b)),{'token':_0x27b3a1,'method':_0x571e6a[_0x5f1354(0x167)]};}export async function ensureRangerDir(){const _0x34e56b=_0x5941bc,_0xe0105c={'HAbYz':function(_0x1a0f92){return _0x1a0f92();},'CEGKx':function(_0x2e2dec,_0x183882,_0x1edace){return _0x2e2dec(_0x183882,_0x1edace);},'geRNu':'.ranger'},_0x3e31d4=_0xe0105c[_0x34e56b(0x16f)](findGitRoot),_0x1dff0c=_0x3e31d4?_0xe0105c['CEGKx'](join,_0x3e31d4,_0xe0105c[_0x34e56b(0x151)]):_0xe0105c[_0x34e56b(0x16f)](getRangerDir);return!existsSync(_0x1dff0c)?(await _0xe0105c[_0x34e56b(0x16e)](mkdir,_0x1dff0c,{'recursive':!![]}),console[_0x34e56b(0x15c)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x1dff0c,'installed':!![]}):(console[_0x34e56b(0x15c)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1dff0c,'installed':![]});}export async function ensureChromium(){const _0x7f803f=_0x5941bc,_0x57855a={'Vfawd':function(_0x45b1cd,_0x1c8278){return _0x45b1cd(_0x1c8278);},'IAmfJ':'✓\x20Playwright\x20Chromium\x20browser\x20found','bOHih':function(_0x4e730d,_0x3d8530){return _0x4e730d??_0x3d8530;},'gvnMd':'confirm','otwGG':_0x7f803f(0x163),'kYjvx':function(_0xd74672,_0x294492){return _0xd74672(_0x294492);},'ihmgV':_0x7f803f(0x15f),'cWFJq':_0x7f803f(0x18a),'YZQvi':_0x7f803f(0x152),'CujwL':_0x7f803f(0x17b)};let _0x9cded4=![];try{const _0x132ff4=chromium[_0x7f803f(0x183)]();_0x9cded4=_0x57855a[_0x7f803f(0x165)](existsSync,_0x132ff4);}catch{_0x9cded4=![];}if(_0x9cded4)return console['log'](_0x57855a['IAmfJ']),![];const _0xe6547c=getPlaywrightVersion(),_0x12da67=_0x57855a[_0x7f803f(0x11f)](_0xe6547c,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x429ace=!_0xe6547c,_0x2ca446=process['stdin'][_0x7f803f(0x143)]&&process[_0x7f803f(0x136)]['isTTY'];let _0x3e26c2=!![];if(_0x2ca446){const {install:_0x51f78d}=await _0x1be0a5[_0x7f803f(0x11c)]([{'type':_0x57855a[_0x7f803f(0x127)],'name':_0x57855a['otwGG'],'message':_0x429ace?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x12da67+_0x7f803f(0x149):'The\x20required\x20version\x20('+_0x12da67+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x3e26c2=_0x51f78d;}else console[_0x7f803f(0x15c)](_0x7f803f(0x180)+_0x12da67+(_0x429ace?_0x7f803f(0x13e):'')+'...');if(_0x3e26c2){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x57855a['kYjvx'](installChromiumBinary,_0x12da67),console[_0x7f803f(0x15c)](_0x57855a[_0x7f803f(0x11b)]);}catch(_0x50b40b){console['error'](_0x57855a[_0x7f803f(0x17a)],_0x50b40b instanceof Error?_0x50b40b['message']:_0x50b40b),console[_0x7f803f(0x15c)](_0x7f803f(0x148)),console[_0x7f803f(0x15c)](_0x7f803f(0x18c)+_0x12da67+_0x7f803f(0x126));}}else console[_0x7f803f(0x15c)](_0x57855a['YZQvi']),console['log'](_0x57855a[_0x7f803f(0x15b)]),console['log'](_0x7f803f(0x18c)+_0x12da67+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3a6d09){const _0x5c6044=_0x5941bc,_0x231c98={'ULTjO':_0x5c6044(0x169)},_0x550d11=join(_0x3a6d09,_0x5c6044(0x14c)),_0x7e5253=_0x5c6044(0x156);await writeFile(_0x550d11,_0x7e5253),console[_0x5c6044(0x15c)](_0x231c98['ULTjO']);}function printProfileSetupLaterInstructions(){const _0x4102fb=_0x5941bc,_0x2991bf={'FBgiC':function(_0xb95655,_0x478c36){return _0xb95655(_0x478c36);},'ayAkT':'ranger\x20profile\x20add\x20local','EpFnz':_0x4102fb(0x186)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x4102fb(0x15c)]('\x20\x20'+_0x2991bf[_0x4102fb(0x14f)](bold,_0x2991bf[_0x4102fb(0x125)])),console[_0x4102fb(0x15c)](_0x2991bf['EpFnz']);}async function ensureLocalEnv(_0xb90b8e,_0x483afa){const _0x315928=_0x5941bc,_0x12d917={'jVRqx':_0x315928(0x137),'jHTIF':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','YchSe':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','cXcCY':'use\x20until\x20the\x20session\x20expires.\x0a','nQrMM':_0x315928(0x177),'AOCyk':_0x315928(0x187),'UDvii':'wantsProfile','EhkYB':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','kKqBq':function(_0x3f468e){return _0x3f468e();},'XdZlA':function(_0x546d40,_0x220957){return _0x546d40 instanceof _0x220957;}};if(!findGitRoot())return console[_0x315928(0x15c)](_0x315928(0x122)),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x12d917['jVRqx'],{'locations':[_0x315928(0x137)]}))return console[_0x315928(0x15c)](_0x315928(0x176)),{'ready':!![],'skipped':![]};const _0x193239=process['stdin']['isTTY']&&process[_0x315928(0x136)]['isTTY'];if(_0x193239&&!_0xb90b8e?.['url']){console[_0x315928(0x15c)](_0x12d917[_0x315928(0x131)]),console[_0x315928(0x15c)](_0x12d917[_0x315928(0x174)]),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x315928(0x15c)](_0x12d917[_0x315928(0x182)]),console['log'](_0x12d917['nQrMM']);const {wantsProfile:_0x19e178}=await _0x1be0a5[_0x315928(0x11c)]([{'type':_0x12d917[_0x315928(0x124)],'name':_0x12d917['UDvii'],'message':_0x12d917['EhkYB'],'default':!![]}]);if(!_0x19e178)return _0x12d917[_0x315928(0x184)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x12d917['jVRqx'],{'url':_0xb90b8e?.['url'],'force':_0xb90b8e?.['force'],'allowInsecureLocalhost':_0xb90b8e?.[_0x315928(0x150)]},_0x483afa),{'ready':!![],'skipped':![]};}catch(_0x416179){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x12d917['XdZlA'](_0x416179,Error)?_0x416179[_0x315928(0x166)]:_0x416179),_0x12d917['kKqBq'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x2f50dc,_0x12bfc1,_0x535b18){const _0x4e9117=_0x5941bc,_0x5b9a82={'VFGYX':function(_0x1f04ff){return _0x1f04ff();},'wuHOk':'No\x20git\x20repository\x20found','OAsYL':_0x4e9117(0x178),'iIBjC':_0x4e9117(0x173),'Snceu':function(_0x26a50f){return _0x26a50f();},'hIgKf':_0x4e9117(0x172),'Wrccb':_0x4e9117(0x154),'HCIgs':function(_0x29ee9,_0x415526){return _0x29ee9(_0x415526);},'fitdq':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','WYPVO':_0x4e9117(0x135),'GVSaG':function(_0x5e99f5,_0x5e3220){return _0x5e99f5(_0x5e3220);},'yKCPj':'ranger','ILVTM':_0x4e9117(0x13a),'ugwId':_0x4e9117(0x158),'HzUbQ':function(_0x41ad92,_0x211b1b){return _0x41ad92 instanceof _0x211b1b;},'ViNLL':_0x4e9117(0x15d),'fvDup':function(_0x5410b4,_0x5dd21e,_0x1045b4){return _0x5410b4(_0x5dd21e,_0x1045b4);},'LfYmC':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','dZCSM':_0x4e9117(0x12c),'EmIin':'/ranger:enable','FixYa':function(_0x18d841,_0x42e2f7){return _0x18d841+_0x42e2f7;}};console['log'](_0x4e9117(0x162));const _0x434d59=process['stdin'][_0x4e9117(0x143)]&&process[_0x4e9117(0x136)][_0x4e9117(0x143)];!_0x434d59&&!_0x12bfc1?.[_0x4e9117(0x185)]&&(console['log']('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x12bfc1={..._0x12bfc1,'scope':'user'});_0x535b18?.[_0x4e9117(0x123)]('git_check');if(!_0x5b9a82[_0x4e9117(0x179)](findGitRoot)){await _0x535b18?.['trackPhaseError'](_0x4e9117(0x173),new Error(_0x5b9a82[_0x4e9117(0x11a)]));throw new Error(_0x5b9a82['OAsYL']);}_0x535b18?.[_0x4e9117(0x11d)](_0x5b9a82[_0x4e9117(0x14a)]);const _0x54872b=!existsSync(_0x5b9a82['Snceu'](getRangerDir)),{path:_0x1d9695}=await _0x5b9a82['VFGYX'](ensureRangerDir);_0x535b18?.[_0x4e9117(0x123)](_0x5b9a82[_0x4e9117(0x144)]);const _0x287fe5=await authenticate(_0x2f50dc);_0x535b18?.[_0x4e9117(0x11d)](_0x5b9a82[_0x4e9117(0x144)],{'isFirstRun':_0x54872b,'method':_0x287fe5[_0x4e9117(0x12a)]}),_0x535b18?.[_0x4e9117(0x123)](_0x5b9a82[_0x4e9117(0x12e)]);_0x12bfc1?.[_0x4e9117(0x164)]?console[_0x4e9117(0x15c)](_0x4e9117(0x129)):await _0x5b9a82['Snceu'](ensureChromium);_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x12e)],{'isFirstRun':_0x54872b,'skipped':!!_0x12bfc1?.[_0x4e9117(0x164)]}),await _0x5b9a82[_0x4e9117(0x16c)](writeRangerGitignore,_0x1d9695),console[_0x4e9117(0x15c)](_0x5b9a82['fitdq']);const _0x7d5d6b=_0x12bfc1?.['scope'],_0x25bff7=_0x12bfc1?.['opencode']??![];let _0xd7927b=null;_0x25bff7?(_0x535b18?.['trackPhaseStart']('plugin'),_0xd7927b=await ensureOpencodePluginConfig(_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82['WYPVO'],{'isFirstRun':_0x54872b,'opencode':!![]})):(_0x535b18?.['trackPhaseStart']('plugin'),await _0x5b9a82[_0x4e9117(0x161)](ensureClaudePlugin,_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x14b)],{'isFirstRun':_0x54872b}));if(_0x25bff7&&_0xd7927b){_0x535b18?.['trackPhaseStart'](_0x4e9117(0x15d));try{await installSkill(_0x5b9a82['yKCPj'],{'level':_0xd7927b[_0x4e9117(0x185)],'cliVersion':getCurrentVersion(),'platform':_0x5b9a82['ILVTM']}),_0x535b18?.[_0x4e9117(0x11d)](_0x4e9117(0x15d),{'isFirstRun':_0x54872b,'opencode':!![]});}catch(_0x3bcea9){console[_0x4e9117(0x159)](_0x5b9a82[_0x4e9117(0x13c)],_0x5b9a82['HzUbQ'](_0x3bcea9,Error)?_0x3bcea9['message']:_0x3bcea9),_0x535b18?.['trackPhaseEnd'](_0x5b9a82['ViNLL'],{'isFirstRun':_0x54872b,'opencode':!![],'failed':!![]});}}else _0x535b18?.[_0x4e9117(0x123)]('skills'),await ensureClaudeSkills(_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x139)],{'isFirstRun':_0x54872b});if(!_0x434d59&&!_0x12bfc1?.[_0x4e9117(0x17d)])console[_0x4e9117(0x15c)]('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x4e9117(0x15c)]('\x20\x20'+_0x5b9a82['GVSaG'](bold,_0x4e9117(0x13b))+'\x0a');else{_0x535b18?.['trackPhaseStart'](_0x4e9117(0x130));const _0x226402=await _0x5b9a82['fvDup'](ensureLocalEnv,{'url':_0x12bfc1?.[_0x4e9117(0x17d)],'force':_0x12bfc1?.['force'],'allowInsecureLocalhost':_0x12bfc1?.['allowInsecureLocalhost']},_0x535b18);_0x535b18?.['trackPhaseEnd']('profile',{'isFirstRun':_0x54872b,'profileReady':_0x226402[_0x4e9117(0x146)],'userSkipped':_0x226402[_0x4e9117(0x171)]}),_0x226402[_0x4e9117(0x146)]&&console['log'](_0x4e9117(0x18d));}if(_0x25bff7)console[_0x4e9117(0x15c)](_0x5b9a82['LfYmC']),console[_0x4e9117(0x15c)](_0x5b9a82[_0x4e9117(0x17f)]),console[_0x4e9117(0x15c)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x4e9117(0x15c)](_0x4e9117(0x17e));else{const _0x470631=_0x5b9a82[_0x4e9117(0x161)](bold,_0x5b9a82[_0x4e9117(0x128)]);console['log'](_0x5b9a82[_0x4e9117(0x181)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x470631+'\x20and\x20prompt\x20the\x20coding'+_0x4e9117(0x138),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x4e9117(0x18b));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x485d6c=_0x258d;function _0x19cf(){const _0x48084d=['organizationName','\x20\x20\x20\x20Settings:\x20','string','1119760NnksgE','displayName','cwd','aHPCk','auth.json.enc','\x20\x20User-level:','length','KUIwf','plaintext','ignore','6029jNaRZe','Version:\x20','wADcz','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','259vWzGHy','name','map','(not\x20found)','API\x20URL:\x20','project','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x0a📊\x20Ranger\x20Status\x0a','enabled','90981Ybdpth','sVdUL','\x1b[1m','BpYPF','\x20\x20Not\x20installed','\x0a---\x20Skills\x20---','GiClP','parse','Qhphu','zUszj','version','\x20(up\x20to\x20date)','trim','1157364UyvpcX','filter','success','20WGDZsI','SKILL.md','scope','mxFwd','MkXpp','146mKiPLM','\x20\x20\x20\x20','hkhfg','log','Root:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','auth.json','QBrCt',':\x20configured','isArray','\x1b]8;;\x07','path','not_installed','\x20plugin(s)\x20configured','PVYwK','some','jrlLa','oCFJi','pdYUo','error','ZillO','Organization:\x20','GiJOk','hasEncryptedAuth','close','10wBfNxm','GMCQl','unknown','MEQRs','details','DgnUv','match','Qlfwt','\x20\x20Run:\x20ranger\x20setup\x20--opencode','13928893lIvkhs','VIrnK','\x20(active)','ksELP','klUSf','env','includes','uHJam','91880VXNWNT','isActive','status','XKCTp','@ranger-testing/opencode-plugin','ehFGs','disabled','JhCdB','utf-8','LUrSy','toString','API\x20Token:\x20✗\x20Not\x20found','XcqVJ','3734244PeQdCY'];_0x19cf=function(){return _0x48084d;};return _0x19cf();}(function(_0x211641,_0x389c9c){const _0x2ab8f0=_0x258d,_0x47612c=_0x211641();while(!![]){try{const _0x89dc6b=parseInt(_0x2ab8f0(0xec))/0x1*(-parseInt(_0x2ab8f0(0x10e))/0x2)+parseInt(_0x2ab8f0(0xf9))/0x3*(-parseInt(_0x2ab8f0(0x109))/0x4)+-parseInt(_0x2ab8f0(0x149))/0x5+-parseInt(_0x2ab8f0(0x106))/0x6+-parseInt(_0x2ab8f0(0xf0))/0x7*(parseInt(_0x2ab8f0(0x138))/0x8)+parseInt(_0x2ab8f0(0x145))/0x9+parseInt(_0x2ab8f0(0x127))/0xa*(parseInt(_0x2ab8f0(0x130))/0xb);if(_0x89dc6b===_0x389c9c)break;else _0x47612c['push'](_0x47612c['shift']());}catch(_0x1523ea){_0x47612c['push'](_0x47612c['shift']());}}}(_0x19cf,0x3c754));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';function _0x258d(_0x1ec3b5,_0x4003d4){_0x1ec3b5=_0x1ec3b5-0xe7;const _0x19cf17=_0x19cf();let _0x258d2c=_0x19cf17[_0x1ec3b5];return _0x258d2c;}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';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x2292b7=>_0x485d6c(0xfb)+_0x2292b7+'\x1b[0m',link=(_0x3fd319,_0x323b5a)=>'\x1b]8;;file://'+_0x3fd319+'\x07'+(_0x323b5a||_0x3fd319)+_0x485d6c(0x118);async function getOpencodePluginStatus(){const _0x503468=_0x485d6c,_0x4f2948={'AhYXd':function(_0x45b1c8,_0xdc0fbc){return _0x45b1c8!==_0xdc0fbc;},'uHJam':'configured','LUrSy':function(_0x2e6c13,_0x51ecc8){return _0x2e6c13>_0x51ecc8;},'SedbP':'not_configured','GiJOk':'opencode','HGuqG':'debug','MkXpp':_0x503468(0xeb),'XcqVJ':'pipe','Qlfwt':'data','bUOAj':_0x503468(0x121)};return new Promise(_0xfe2f0=>{const _0xb62203=_0x503468,_0x1a165f={'ehFGs':function(_0x2aca20,_0x10b423){return _0x2aca20(_0x10b423);},'JhCdB':_0xb62203(0x11a)},_0x21e653=spawn(_0x4f2948[_0xb62203(0x124)],[_0x4f2948['HGuqG'],'config'],{'stdio':[_0x4f2948[_0xb62203(0x10d)],_0x4f2948[_0xb62203(0x144)],'pipe']});let _0xf274c1='';_0x21e653['stdout']?.['on']('data',_0x105398=>{const _0x1a9eff=_0xb62203;_0xf274c1+=_0x105398[_0x1a9eff(0x142)]();}),_0x21e653['stderr']?.['on'](_0x4f2948[_0xb62203(0x12e)],_0x329882=>{const _0x51bb76=_0xb62203;_0xf274c1+=_0x329882[_0x51bb76(0x142)]();}),_0x21e653['on'](_0x4f2948['bUOAj'],()=>{const _0x424599=_0xb62203;_0x1a165f[_0x424599(0x13d)](_0xfe2f0,{'status':_0x1a165f[_0x424599(0x13f)]});}),_0x21e653['on'](_0xb62203(0x126),_0x10de9c=>{const _0xf2b996=_0xb62203,_0x1f1d8d={'pdYUo':_0xf2b996(0x148),'KIKXZ':_0xf2b996(0x13c)};if(_0x4f2948['AhYXd'](_0x10de9c,0x0)){_0xfe2f0({'status':'not_installed'});return;}const _0x392817=_0xf274c1[_0xf2b996(0x105)]();let _0x8bb765=null;if(_0x392817)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x392817);}catch{const _0x39da8e=_0x392817[_0xf2b996(0x12d)](/\{[\s\S]*\}$/);if(_0x39da8e)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x39da8e[0x0]);}catch{_0x8bb765=null;}}const _0x58c57c=Array[_0xf2b996(0x117)](_0x8bb765?.['plugin'])?_0x8bb765?.['plugin']:[],_0x3c5f19=_0x58c57c[_0xf2b996(0x11d)](_0x1be161=>{const _0x1ad0d9=_0xf2b996;if(typeof _0x1be161!==_0x1f1d8d[_0x1ad0d9(0x120)])return![];return _0x1be161[_0x1ad0d9(0x136)](_0x1f1d8d['KIKXZ'])||_0x1be161['includes']('opencode-plugin');});if(_0x3c5f19){_0xfe2f0({'status':_0x4f2948[_0xf2b996(0x137)],'details':_0x4f2948[_0xf2b996(0x141)](_0x58c57c[_0xf2b996(0xe8)],0x0)?_0x58c57c['length']+_0xf2b996(0x11b):undefined});return;}if(_0x58c57c['length']>0x0){_0xfe2f0({'status':'not_configured','details':_0x58c57c['length']+_0xf2b996(0x11b)});return;}_0xfe2f0({'status':_0x4f2948['SedbP']});});});}async function getSkillsFromDir(_0x1f9c26,_0xcc4783){const _0x58ddab=_0x485d6c,_0x5c2947={'DgnUv':function(_0xe70fef,_0x393617){return _0xe70fef(_0x393617);},'zUszj':function(_0x3c5fef,_0x35e1eb,_0x49e1a2){return _0x3c5fef(_0x35e1eb,_0x49e1a2);},'PTnwd':function(_0x40fd6a,_0xf7dab,_0x306a6c,_0x3f0948){return _0x40fd6a(_0xf7dab,_0x306a6c,_0x3f0948);},'HXvFL':_0x58ddab(0x140)};if(!_0x5c2947[_0x58ddab(0x12c)](existsSync,_0x1f9c26))return[];const _0xaa9048=[];try{const _0x375ca3=await _0x5c2947[_0x58ddab(0x102)](readdir,_0x1f9c26,{'withFileTypes':!![]});for(const _0x21407f of _0x375ca3){if(_0x21407f['isDirectory']()){const _0x174cfd=_0x5c2947['PTnwd'](join,_0x1f9c26,_0x21407f[_0x58ddab(0xf1)],_0x58ddab(0x10a));if(existsSync(_0x174cfd)){let _0x490044=_0x21407f['name'];try{const _0x27be86=await readFile(_0x174cfd,_0x5c2947['HXvFL']),_0x6aebe6=_0x27be86['match'](/name:\s*(.+)/);_0x6aebe6&&(_0x490044=_0x6aebe6[0x1]['trim']());}catch{}_0xaa9048['push']({'name':_0x21407f['name'],'displayName':_0x490044,'path':_0x174cfd,'level':_0xcc4783});}}}}catch{return[];}return _0xaa9048;}async function getInstalledSkills(){const _0x4e5eae=_0x485d6c,_0x348ad9={'UPXnY':function(_0x21f5e2,_0x2efbfe,_0x376f14){return _0x21f5e2(_0x2efbfe,_0x376f14);},'sVdUL':_0x4e5eae(0xf5),'hkhfg':function(_0x34909f){return _0x34909f();}},[_0x37ce7d,_0x3defa2]=await Promise['all']([_0x348ad9['UPXnY'](getSkillsFromDir,getProjectSkillsDir(),_0x348ad9[_0x4e5eae(0xfa)]),_0x348ad9['UPXnY'](getSkillsFromDir,_0x348ad9[_0x4e5eae(0x110)](getUserSkillsDir),'user')]);return{'project':_0x37ce7d,'user':_0x3defa2};}async function getEnvironments(){const _0x24db1e=_0x485d6c,_0x4362e0={'mxFwd':function(_0x25214e,_0x5a5dcd){return _0x25214e(_0x5a5dcd);},'ktYRa':function(_0x4b8bd1,_0x575826,_0x23cd8b){return _0x4b8bd1(_0x575826,_0x23cd8b);},'GMCQl':'settings.json','jrlLa':function(_0x19c8d4,_0x25a92f,_0x1b3973){return _0x19c8d4(_0x25a92f,_0x1b3973);},'VIrnK':_0x24db1e(0x114),'MEQRs':_0x24db1e(0x14d),'vyFjR':'(not\x20found)','ksELP':function(_0x34e624,_0x2d838c){return _0x34e624(_0x2d838c);},'Qhphu':function(_0x28f010,_0x32da1d){return _0x28f010===_0x32da1d;},'GiClP':function(_0x43fdc7){return _0x43fdc7();}},{envNames:_0x3f4337,activeEnv:_0x34c3dc}=await _0x4362e0[_0x24db1e(0xff)](getEnvNames),_0x244e36=getRangerDir();if(!_0x4362e0[_0x24db1e(0x133)](existsSync,_0x244e36))return{'envs':[],'activeEnv':null};const _0x76b9c1=_0x3f4337[_0x24db1e(0xf2)](_0x229db4=>{const _0x4f3b5e=_0x24db1e,_0x40dc50=_0x4362e0[_0x4f3b5e(0x10c)](getEnvDir,_0x229db4),_0x342671=_0x4362e0['ktYRa'](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x128)]),_0xdc49bf=_0x4362e0[_0x4f3b5e(0x11e)](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x131)]),_0x3fbabc=join(_0x40dc50,_0x4362e0[_0x4f3b5e(0x12a)]);return{'name':_0x229db4,'settingsPath':existsSync(_0x342671)?_0x342671:_0x4362e0['vyFjR'],'hasPlaintextAuth':_0x4362e0[_0x4f3b5e(0x10c)](existsSync,_0xdc49bf),'hasEncryptedAuth':_0x4362e0['ksELP'](existsSync,_0x3fbabc),'isActive':_0x4362e0[_0x4f3b5e(0x101)](_0x229db4,_0x34c3dc)};});return{'envs':_0x76b9c1,'activeEnv':_0x34c3dc};}export async function status(){const _0x22d37a=_0x485d6c,_0x32dd26={'WUYES':function(_0x361213,_0x4e27c5,_0x3ba820){return _0x361213(_0x4e27c5,_0x3ba820);},'klUSf':function(_0x37a25e,_0x518246){return _0x37a25e(_0x518246);},'XKCTp':function(_0x3ed2b6,_0x59efdc){return _0x3ed2b6!==_0x59efdc;},'PVYwK':function(_0x5124bf){return _0x5124bf();},'OrMfA':'\x0a---\x20OpenCode\x20Plugin\x20---','KUIwf':function(_0x9d7101,_0x54456a){return _0x9d7101===_0x54456a;},'wAbDh':_0x22d37a(0x13c),'NaFxe':function(_0x5b9c52,_0x2c451a){return _0x5b9c52===_0x2c451a;},'BpYPF':'not_configured','JkInI':'\x20\x20Not\x20configured','aHPCk':_0x22d37a(0x12f),'ZGTMZ':function(_0x2a48bf,_0x4c8a44){return _0x2a48bf(_0x4c8a44);},'wLHeG':'ranger@trailhead','ZeeXZ':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','ZillO':_0x22d37a(0xfe),'WGuXO':function(_0x43c120,_0x4e4fae){return _0x43c120+_0x4e4fae;},'oCFJi':function(_0x14d313,_0x4eadeb,_0x27eb3e){return _0x14d313(_0x4eadeb,_0x27eb3e);},'QBrCt':function(_0x49021c,_0x125445){return _0x49021c(_0x125445);},'wADcz':function(_0x51b524,_0x706ca0){return _0x51b524>_0x706ca0;},'STioP':function(_0x33ecd5,_0x5b3fb8){return _0x33ecd5(_0x5b3fb8);},'lCHdd':_0x22d37a(0x132),'rLPrP':'none','NYiyF':_0x22d37a(0xf3)};console['log'](_0x22d37a(0xf7));const _0x49cace=process[_0x22d37a(0x14b)](),_0x38e0aa=getRangerDir();if(!existsSync(_0x38e0aa)){console['log'](_0x22d37a(0x112)+_0x32dd26['WUYES'](link,_0x49cace,bold(_0x32dd26['klUSf'](basename,_0x49cace)))),console['log'](_0x22d37a(0xef)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x49cace,bold(basename(_0x49cace))));const _0x1ccd9d=getCurrentVersion(),_0x4144f5=getLatestVersion();if(_0x4144f5[_0x22d37a(0x103)]&&_0x32dd26[_0x22d37a(0x13b)](_0x4144f5[_0x22d37a(0x103)],_0x1ccd9d))console[_0x22d37a(0x111)]('Version:\x20'+_0x1ccd9d+'\x20(latest:\x20'+_0x4144f5['version']+')'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20update');else _0x4144f5[_0x22d37a(0x103)]?console['log']('Version:\x20'+_0x1ccd9d+_0x22d37a(0x104)):console[_0x22d37a(0x111)](_0x22d37a(0xed)+_0x1ccd9d);const _0x3ffeba=await getToken();if(_0x3ffeba){const _0x20b84b=await _0x32dd26[_0x22d37a(0x134)](getCurrentUser,_0x3ffeba);_0x20b84b[_0x22d37a(0x108)]?console[_0x22d37a(0x111)](_0x22d37a(0x123)+bold(_0x20b84b['user'][_0x22d37a(0x146)])):(console['log'](_0x22d37a(0xf6)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x22d37a(0x111)](_0x22d37a(0x143)),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x22d37a(0x135)]['DEBUG']&&(console[_0x22d37a(0x111)]('API\x20Environment:\x20'+_0x32dd26[_0x22d37a(0x11c)](getCurrentEnvironment)),console['log'](_0x22d37a(0xf4)+getApiBaseUrl()));console[_0x22d37a(0x111)](_0x32dd26['OrMfA']);const _0x7cf884=await _0x32dd26['PVYwK'](getOpencodePluginStatus);if(_0x32dd26[_0x22d37a(0xe9)](_0x7cf884[_0x22d37a(0x13a)],'configured'))console['log']('\x20\x20'+bold(_0x32dd26['wAbDh'])+_0x22d37a(0x116)),_0x7cf884['details']&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']);else _0x32dd26['NaFxe'](_0x7cf884[_0x22d37a(0x13a)],_0x32dd26[_0x22d37a(0xfc)])?(console['log'](_0x32dd26['JkInI']),_0x7cf884[_0x22d37a(0x12b)]&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']),console['log'](_0x32dd26[_0x22d37a(0x14c)])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x22d37a(0x111)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3b900f=await _0x32dd26['ZGTMZ'](getPluginInfo,_0x32dd26['wLHeG']);if(_0x3b900f){const _0x14c0cc=_0x3b900f[_0x22d37a(0x10b)]||_0x22d37a(0x129),_0x5ad7fd=_0x3b900f[_0x22d37a(0xf8)]?_0x22d37a(0xf8):_0x22d37a(0x13e);console[_0x22d37a(0x111)]('\x20\x20'+_0x32dd26['klUSf'](bold,_0x32dd26['wLHeG'])+':\x20installed\x20('+_0x14c0cc+',\x20'+_0x5ad7fd+')');}else console['log'](_0x22d37a(0xfd)),console[_0x22d37a(0x111)](_0x32dd26['ZeeXZ']);console['log'](_0x32dd26[_0x22d37a(0x122)]);const {project:_0x47a2ba,user:_0x437865}=await getInstalledSkills(),_0x74a75d=_0x47a2ba['filter'](_0x397b1b=>RANGER_MANAGED_SKILLS['includes'](_0x397b1b['name'])),_0x1c20b2=_0x437865[_0x22d37a(0x107)](_0x553b01=>RANGER_MANAGED_SKILLS[_0x22d37a(0x136)](_0x553b01[_0x22d37a(0xf1)])),_0x3b54c9=_0x32dd26['WGuXO'](_0x74a75d['length'],_0x1c20b2[_0x22d37a(0xe8)]);if(_0x3b54c9===0x0)console['log']('No\x20skills\x20installed'),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x74a75d['length']>0x0){console[_0x22d37a(0x111)]('\x20\x20Project-level:');for(const _0x22bfc3 of _0x74a75d){console[_0x22d37a(0x111)](_0x22d37a(0x10f)+bold(_0x22bfc3[_0x22d37a(0x14a)])+':\x20'+_0x32dd26[_0x22d37a(0x11f)](link,_0x22bfc3['path'],_0x32dd26[_0x22d37a(0x115)](basename,_0x22bfc3[_0x22d37a(0x119)])));}}if(_0x32dd26[_0x22d37a(0xee)](_0x1c20b2[_0x22d37a(0xe8)],0x0)){console[_0x22d37a(0x111)](_0x22d37a(0xe7));for(const _0x2b246c of _0x1c20b2){console['log'](_0x22d37a(0x10f)+_0x32dd26['STioP'](bold,_0x2b246c['displayName'])+':\x20'+link(_0x2b246c[_0x22d37a(0x119)],basename(_0x2b246c[_0x22d37a(0x119)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x1de8a8,activeEnv:_0x32f5bf}=await getEnvironments();if(_0x1de8a8[_0x22d37a(0xe8)]===0x0)console['log']('No\x20profiles\x20configured'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x1a6138 of _0x1de8a8){const _0x456832=_0x1a6138[_0x22d37a(0x139)]?_0x32dd26['lCHdd']:'',_0x7a3f66=_0x1a6138[_0x22d37a(0x125)]?'encrypted':_0x1a6138['hasPlaintextAuth']?_0x22d37a(0xea):_0x32dd26['rLPrP'];console['log']('\x20\x20'+bold(_0x1a6138[_0x22d37a(0xf1)])+_0x456832),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x7a3f66),_0x32dd26['XKCTp'](_0x1a6138['settingsPath'],_0x32dd26['NYiyF'])&&console['log'](_0x22d37a(0x147)+_0x32dd26['oCFJi'](link,_0x1a6138['settingsPath'],basename(_0x1a6138['settingsPath'])));}!_0x32f5bf&&(console[_0x22d37a(0x111)](_0x22d37a(0x113)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x1de8a8['map'](_0x47fe5d=>_0x47fe5d[_0x22d37a(0xf1)])['join'](',\x20')+')'));}console[_0x22d37a(0x111)]('');}
|
|
1
|
+
const _0x5eef4b=_0x3101;(function(_0x24baf2,_0x204792){const _0x2ce747=_0x3101,_0x58ec68=_0x24baf2();while(!![]){try{const _0x5bed65=parseInt(_0x2ce747(0x163))/0x1*(-parseInt(_0x2ce747(0x187))/0x2)+-parseInt(_0x2ce747(0x17b))/0x3*(parseInt(_0x2ce747(0x122))/0x4)+-parseInt(_0x2ce747(0x14e))/0x5+parseInt(_0x2ce747(0x13c))/0x6*(parseInt(_0x2ce747(0x12d))/0x7)+parseInt(_0x2ce747(0x12f))/0x8*(parseInt(_0x2ce747(0x159))/0x9)+-parseInt(_0x2ce747(0x137))/0xa+parseInt(_0x2ce747(0x189))/0xb;if(_0x5bed65===_0x204792)break;else _0x58ec68['push'](_0x58ec68['shift']());}catch(_0x59cd7c){_0x58ec68['push'](_0x58ec68['shift']());}}}(_0x1850,0x9045e));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';function _0x3101(_0x7a9c84,_0x193c0b){_0x7a9c84=_0x7a9c84-0x11f;const _0x1850c1=_0x1850();let _0x310137=_0x1850c1[_0x7a9c84];return _0x310137;}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';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x107318=>'\x1b[1m'+_0x107318+'\x1b[0m',link=(_0x240a21,_0x546115)=>_0x5eef4b(0x12e)+_0x240a21+'\x07'+(_0x546115||_0x240a21)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4fbd07=_0x5eef4b,_0x5bd6ef={'wkiyS':function(_0x53c51f,_0x37ca55){return _0x53c51f(_0x37ca55);},'YNIYI':_0x4fbd07(0x152),'KeuHq':_0x4fbd07(0x15c),'YCMPA':_0x4fbd07(0x175),'rAIRK':_0x4fbd07(0x135),'ewuEM':function(_0x121962,_0x55a26d){return _0x121962!==_0x55a26d;},'kJleK':function(_0x387923,_0x1153df){return _0x387923>_0x1153df;},'HszAe':'debug','ovBcP':_0x4fbd07(0x14b),'qPGoF':_0x4fbd07(0x18a)};return new Promise(_0x1528b9=>{const _0x55d277=_0x4fbd07,_0x35fdd3={'FnfIj':_0x5bd6ef[_0x55d277(0x162)],'drpsP':_0x5bd6ef[_0x55d277(0x181)],'BLnVZ':_0x5bd6ef[_0x55d277(0x15b)],'OYmub':function(_0x436abc,_0x2e5cf5){return _0x5bd6ef['ewuEM'](_0x436abc,_0x2e5cf5);},'WunVn':function(_0x34971a,_0x2e5e1d){const _0x1e0ee4=_0x55d277;return _0x5bd6ef[_0x1e0ee4(0x121)](_0x34971a,_0x2e5e1d);},'ZAAiS':_0x5bd6ef[_0x55d277(0x156)],'eQvgl':'configured','oIKag':function(_0x3bf152,_0x14e208){return _0x5bd6ef['kJleK'](_0x3bf152,_0x14e208);}},_0xf2264f=spawn('opencode',[_0x5bd6ef['HszAe'],_0x55d277(0x149)],{'stdio':['ignore',_0x5bd6ef['ovBcP'],_0x5bd6ef['ovBcP']]});let _0x7400c8='';_0xf2264f['stdout']?.['on']('data',_0x49d9c9=>{_0x7400c8+=_0x49d9c9['toString']();}),_0xf2264f['stderr']?.['on']('data',_0x26df5c=>{_0x7400c8+=_0x26df5c['toString']();}),_0xf2264f['on'](_0x5bd6ef[_0x55d277(0x178)],()=>{const _0x3d24be=_0x55d277;_0x5bd6ef['wkiyS'](_0x1528b9,{'status':_0x5bd6ef[_0x3d24be(0x156)]});}),_0xf2264f['on'](_0x55d277(0x165),_0xac5c83=>{const _0x496e74=_0x55d277;if(_0x35fdd3[_0x496e74(0x173)](_0xac5c83,0x0)){_0x35fdd3[_0x496e74(0x123)](_0x1528b9,{'status':_0x35fdd3['ZAAiS']});return;}const _0x589bef=_0x7400c8[_0x496e74(0x132)]();let _0x29f196=null;if(_0x589bef)try{_0x29f196=JSON[_0x496e74(0x17a)](_0x589bef);}catch{const _0x4c7417=_0x589bef[_0x496e74(0x16e)](/\{[\s\S]*\}$/);if(_0x4c7417)try{_0x29f196=JSON[_0x496e74(0x17a)](_0x4c7417[0x0]);}catch{_0x29f196=null;}}const _0x49d9d8=Array[_0x496e74(0x161)](_0x29f196?.[_0x496e74(0x172)])?_0x29f196?.['plugin']:[],_0x2899c8=_0x49d9d8['some'](_0x58a455=>{const _0x4f9c32=_0x496e74;if(typeof _0x58a455!==_0x35fdd3[_0x4f9c32(0x176)])return![];return _0x58a455['includes'](_0x35fdd3['drpsP'])||_0x58a455['includes'](_0x35fdd3[_0x4f9c32(0x184)]);});if(_0x2899c8){_0x1528b9({'status':_0x35fdd3[_0x496e74(0x171)],'details':_0x35fdd3['oIKag'](_0x49d9d8[_0x496e74(0x16f)],0x0)?_0x49d9d8['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x49d9d8[_0x496e74(0x16f)]>0x0){_0x35fdd3[_0x496e74(0x123)](_0x1528b9,{'status':_0x496e74(0x126),'details':_0x49d9d8[_0x496e74(0x16f)]+'\x20plugin(s)\x20configured'});return;}_0x1528b9({'status':_0x496e74(0x126)});});});}async function getSkillsFromDir(_0x377a05,_0x6d69ad){const _0x3892c3=_0x5eef4b,_0x190f1b={'eVPAu':function(_0x3f7665,_0x2b3913){return _0x3f7665(_0x2b3913);},'hynnU':function(_0x165731,_0x3e30cc,_0x3c5310){return _0x165731(_0x3e30cc,_0x3c5310);},'QTtIu':_0x3892c3(0x13d),'JHWRb':_0x3892c3(0x177)};if(!_0x190f1b[_0x3892c3(0x13a)](existsSync,_0x377a05))return[];const _0x3a6e96=[];try{const _0x1d0c71=await _0x190f1b['hynnU'](readdir,_0x377a05,{'withFileTypes':!![]});for(const _0x2dc6cc of _0x1d0c71){if(_0x2dc6cc[_0x3892c3(0x17d)]()){const _0x236a5b=join(_0x377a05,_0x2dc6cc[_0x3892c3(0x142)],_0x190f1b[_0x3892c3(0x154)]);if(existsSync(_0x236a5b)){let _0x3ffbd0=_0x2dc6cc['name'];try{const _0x310beb=await _0x190f1b[_0x3892c3(0x168)](readFile,_0x236a5b,_0x190f1b[_0x3892c3(0x140)]),_0x22eb60=_0x310beb['match'](/name:\s*(.+)/);_0x22eb60&&(_0x3ffbd0=_0x22eb60[0x1]['trim']());}catch{}_0x3a6e96[_0x3892c3(0x130)]({'name':_0x2dc6cc['name'],'displayName':_0x3ffbd0,'path':_0x236a5b,'level':_0x6d69ad});}}}}catch{return[];}return _0x3a6e96;}async function getInstalledSkills(){const _0x2a1de4=_0x5eef4b,_0x5bf531={'xbYrk':_0x2a1de4(0x182)},[_0x415ac7,_0x4e056d]=await Promise[_0x2a1de4(0x16d)]([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),_0x5bf531['xbYrk'])]);return{'project':_0x415ac7,'user':_0x4e056d};}async function getEnvironments(){const _0x570eb7=_0x5eef4b,_0x35cad2={'lAakz':function(_0x22c288,_0x662ca){return _0x22c288(_0x662ca);},'Vyudz':function(_0x267176,_0x39737e,_0x2e6bfc){return _0x267176(_0x39737e,_0x2e6bfc);},'AwArY':_0x570eb7(0x153),'hTXdd':function(_0x21acd8,_0x274000){return _0x21acd8(_0x274000);},'dPZjw':function(_0x622acc){return _0x622acc();}},{envNames:_0x43c791,activeEnv:_0x459a9f}=await _0x35cad2['dPZjw'](getEnvNames),_0x3a4bfa=getRangerDir();if(!_0x35cad2['lAakz'](existsSync,_0x3a4bfa))return{'envs':[],'activeEnv':null};const _0x43875e=_0x43c791[_0x570eb7(0x17c)](_0x3496bf=>{const _0x4d0b78=_0x570eb7,_0xb611bd=_0x35cad2[_0x4d0b78(0x13e)](getEnvDir,_0x3496bf),_0xfb67ad=join(_0xb611bd,_0x4d0b78(0x15f)),_0x38f0ce=_0x35cad2[_0x4d0b78(0x164)](join,_0xb611bd,'auth.json'),_0x361c02=_0x35cad2[_0x4d0b78(0x164)](join,_0xb611bd,_0x4d0b78(0x180));return{'name':_0x3496bf,'settingsPath':_0x35cad2[_0x4d0b78(0x13e)](existsSync,_0xfb67ad)?_0xfb67ad:_0x35cad2[_0x4d0b78(0x133)],'hasPlaintextAuth':_0x35cad2['hTXdd'](existsSync,_0x38f0ce),'hasEncryptedAuth':_0x35cad2[_0x4d0b78(0x124)](existsSync,_0x361c02),'isActive':_0x3496bf===_0x459a9f};});return{'envs':_0x43875e,'activeEnv':_0x459a9f};}export async function status(){const _0x5dfe1e=_0x5eef4b,_0x58fe11={'DeSuc':function(_0xfbe25c){return _0xfbe25c();},'nLZvG':function(_0x398474,_0x1ee32b){return _0x398474(_0x1ee32b);},'lwbxh':function(_0x4fae58,_0xe67908,_0x576e81){return _0x4fae58(_0xe67908,_0x576e81);},'gpBmJ':function(_0x94a550){return _0x94a550();},'LGmmW':function(_0x1e0859){return _0x1e0859();},'jzomp':function(_0x42d440,_0x309f38){return _0x42d440===_0x309f38;},'MXyzx':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','jvJYj':_0x5dfe1e(0x14f),'Dcxti':'unknown','snniz':_0x5dfe1e(0x174),'RxPSc':'\x0a---\x20Skills\x20---','llBrv':function(_0x13b1c1,_0x1dc261){return _0x13b1c1+_0x1dc261;},'RENHH':_0x5dfe1e(0x15d),'VoiJO':_0x5dfe1e(0x188),'fWAdk':function(_0x3f27e6,_0x56caed){return _0x3f27e6(_0x56caed);},'kItyt':function(_0x220b35,_0x202363){return _0x220b35>_0x202363;},'SeKLf':_0x5dfe1e(0x160),'vyRyY':function(_0x4c7878,_0xd36b38){return _0x4c7878===_0xd36b38;},'WSZUB':'\x20(active)','sCWLv':_0x5dfe1e(0x13b),'mQiEx':_0x5dfe1e(0x12b),'OqvWe':'(not\x20found)','Lglww':function(_0x554b4e,_0x576ecd,_0x1b43c9){return _0x554b4e(_0x576ecd,_0x1b43c9);}};console['log'](_0x5dfe1e(0x12c));const _0x4e39c9=process['cwd'](),_0x49a16a=_0x58fe11['DeSuc'](getRangerDir);if(!_0x58fe11[_0x5dfe1e(0x128)](existsSync,_0x49a16a)){console['log']('Root:\x20'+link(_0x4e39c9,bold(basename(_0x4e39c9)))),console['log'](_0x5dfe1e(0x170)),console[_0x5dfe1e(0x185)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x5dfe1e(0x185)]('Root:\x20'+_0x58fe11['lwbxh'](link,_0x4e39c9,bold(_0x58fe11[_0x5dfe1e(0x128)](basename,_0x4e39c9))));const _0x26c718=getCurrentVersion(),_0x26ce0b=_0x58fe11['gpBmJ'](getLatestVersion);if(_0x26ce0b[_0x5dfe1e(0x169)]&&_0x26ce0b['version']!==_0x26c718)console[_0x5dfe1e(0x185)]('Version:\x20'+_0x26c718+'\x20(latest:\x20'+_0x26ce0b['version']+')'),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x146));else _0x26ce0b[_0x5dfe1e(0x169)]?console['log']('Version:\x20'+_0x26c718+_0x5dfe1e(0x183)):console[_0x5dfe1e(0x185)]('Version:\x20'+_0x26c718);const _0x1f2d55=await getToken();if(_0x1f2d55){const _0x34df9c=await getCurrentUser(_0x1f2d55);_0x34df9c[_0x5dfe1e(0x186)]?console[_0x5dfe1e(0x185)](_0x5dfe1e(0x144)+_0x58fe11['nLZvG'](bold,_0x34df9c['user']['organizationName'])):(console['log'](_0x5dfe1e(0x147)),console['log'](_0x5dfe1e(0x139)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x5dfe1e(0x139));process['env']['DEBUG']&&(console['log'](_0x5dfe1e(0x179)+getCurrentEnvironment()),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x158)+_0x58fe11[_0x5dfe1e(0x138)](getApiBaseUrl)));console[_0x5dfe1e(0x185)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x3992fe=await getOpencodePluginStatus();if(_0x58fe11['jzomp'](_0x3992fe['status'],_0x5dfe1e(0x157)))console['log']('\x20\x20'+_0x58fe11[_0x5dfe1e(0x128)](bold,'@ranger-testing/opencode-plugin')+':\x20configured'),_0x3992fe[_0x5dfe1e(0x148)]&&console[_0x5dfe1e(0x185)]('\x20\x20'+_0x3992fe[_0x5dfe1e(0x148)]);else _0x58fe11['jzomp'](_0x3992fe['status'],_0x5dfe1e(0x126))?(console['log'](_0x5dfe1e(0x14d)),_0x3992fe['details']&&console['log']('\x20\x20'+_0x3992fe[_0x5dfe1e(0x148)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x17e)]);console[_0x5dfe1e(0x185)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x5da060=await getPluginInfo(_0x58fe11['jvJYj']);if(_0x5da060){const _0x2612ac=_0x5da060['scope']||_0x58fe11['Dcxti'],_0x12ab94=_0x5da060['enabled']?'enabled':'disabled';console['log']('\x20\x20'+bold(_0x5dfe1e(0x14f))+_0x5dfe1e(0x150)+_0x2612ac+',\x20'+_0x12ab94+')');}else console['log'](_0x58fe11[_0x5dfe1e(0x17f)]),console['log'](_0x5dfe1e(0x129));console['log'](_0x58fe11['RxPSc']);const {project:_0x58a040,user:_0x10c90f}=await getInstalledSkills(),_0x4c207c=_0x58a040['filter'](_0x51815c=>RANGER_MANAGED_SKILLS[_0x5dfe1e(0x15a)](_0x51815c[_0x5dfe1e(0x142)])),_0x353454=_0x10c90f[_0x5dfe1e(0x141)](_0x15213e=>RANGER_MANAGED_SKILLS['includes'](_0x15213e[_0x5dfe1e(0x142)])),_0x5f3972=_0x58fe11['llBrv'](_0x4c207c['length'],_0x353454[_0x5dfe1e(0x16f)]);if(_0x5f3972===0x0)console[_0x5dfe1e(0x185)](_0x58fe11['RENHH']),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x166));else{if(_0x4c207c['length']>0x0){console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x134)]);for(const _0x3ccfff of _0x4c207c){console[_0x5dfe1e(0x185)]('\x20\x20\x20\x20'+_0x58fe11['fWAdk'](bold,_0x3ccfff[_0x5dfe1e(0x120)])+':\x20'+_0x58fe11['lwbxh'](link,_0x3ccfff['path'],_0x58fe11[_0x5dfe1e(0x12a)](basename,_0x3ccfff[_0x5dfe1e(0x14c)])));}}if(_0x58fe11[_0x5dfe1e(0x16a)](_0x353454['length'],0x0)){console['log'](_0x5dfe1e(0x15e));for(const _0x43ce3f of _0x353454){console[_0x5dfe1e(0x185)](_0x5dfe1e(0x131)+bold(_0x43ce3f[_0x5dfe1e(0x120)])+':\x20'+link(_0x43ce3f[_0x5dfe1e(0x14c)],_0x58fe11['fWAdk'](basename,_0x43ce3f[_0x5dfe1e(0x14c)])));}}}console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x136)]);const {envs:_0x153e4f,activeEnv:_0x42204a}=await getEnvironments();if(_0x58fe11[_0x5dfe1e(0x13f)](_0x153e4f[_0x5dfe1e(0x16f)],0x0))console['log'](_0x5dfe1e(0x151)),console['log'](_0x5dfe1e(0x143));else{for(const _0x506a01 of _0x153e4f){const _0x3f9016=_0x506a01['isActive']?_0x58fe11[_0x5dfe1e(0x167)]:'',_0x3305f6=_0x506a01[_0x5dfe1e(0x14a)]?_0x58fe11[_0x5dfe1e(0x127)]:_0x506a01['hasPlaintextAuth']?_0x58fe11['mQiEx']:'none';console['log']('\x20\x20'+bold(_0x506a01[_0x5dfe1e(0x142)])+_0x3f9016),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x16c)+_0x3305f6),_0x506a01[_0x5dfe1e(0x16b)]!==_0x58fe11[_0x5dfe1e(0x125)]&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x58fe11[_0x5dfe1e(0x155)](link,_0x506a01['settingsPath'],basename(_0x506a01['settingsPath'])));}!_0x42204a&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x5dfe1e(0x11f)+_0x153e4f['map'](_0x825ce6=>_0x825ce6[_0x5dfe1e(0x142)])[_0x5dfe1e(0x145)](',\x20')+')'));}console['log']('');}function _0x1850(){const _0x25e872=['API\x20Environment:\x20','parse','3UqtHDS','map','isDirectory','MXyzx','snniz','auth.json.enc','YCMPA','user','\x20(up\x20to\x20date)','BLnVZ','log','success','1714946jLekAL','\x20\x20Project-level:','18650841MTRUpN','error','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','displayName','wkiyS','1405176vGQiZC','WunVn','hTXdd','OqvWe','not_configured','sCWLv','nLZvG','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','fWAdk','plaintext','\x0a📊\x20Ranger\x20Status\x0a','91cAgfof','\x1b]8;;file://','8AnHORo','push','\x20\x20\x20\x20','trim','AwArY','VoiJO','opencode-plugin','SeKLf','8717910buttDn','LGmmW','\x20\x20Run:\x20ranger\x20setup\x20[token]','eVPAu','encrypted','494346GlwhjF','SKILL.md','lAakz','vyRyY','JHWRb','filter','name','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','Organization:\x20','join','\x20\x20Run:\x20ranger\x20update','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','details','config','hasEncryptedAuth','pipe','path','\x20\x20Not\x20configured','5105185GYGHKX','ranger@trailhead',':\x20installed\x20(','No\x20profiles\x20configured','not_installed','(not\x20found)','QTtIu','Lglww','YNIYI','configured','API\x20URL:\x20','8333307WLYpIO','includes','rAIRK','string','No\x20skills\x20installed','\x20\x20User-level:','settings.json','\x0a---\x20Profiles\x20---','isArray','KeuHq','1MjbULN','Vyudz','close','\x20\x20Run:\x20ranger\x20skillup','WSZUB','hynnU','version','kItyt','settingsPath','\x20\x20\x20\x20Auth:\x20','all','match','length','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','eQvgl','plugin','OYmub','\x20\x20Not\x20installed','@ranger-testing/opencode-plugin','FnfIj','utf-8','qPGoF'];_0x1850=function(){return _0x25e872;};return _0x1850();}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x81c05d,_0x42298f){const _0x2164b6=_0x5ee8,_0x4f663e=_0x81c05d();while(!![]){try{const _0x12de27=parseInt(_0x2164b6(0x1dc))/0x1+parseInt(_0x2164b6(0x1fe))/0x2*(parseInt(_0x2164b6(0x203))/0x3)+parseInt(_0x2164b6(0x1e9))/0x4+-parseInt(_0x2164b6(0x1f3))/0x5*(parseInt(_0x2164b6(0x20a))/0x6)+parseInt(_0x2164b6(0x1fb))/0x7+-parseInt(_0x2164b6(0x1da))/0x8*(-parseInt(_0x2164b6(0x204))/0x9)+-parseInt(_0x2164b6(0x1d6))/0xa*(parseInt(_0x2164b6(0x1d1))/0xb);if(_0x12de27===_0x42298f)break;else _0x4f663e['push'](_0x4f663e['shift']());}catch(_0x374017){_0x4f663e['push'](_0x4f663e['shift']());}}}(_0xea9c,0x72c16));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{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0xb76d55=_0x5ee8,_0x5c747f={'XOKYj':function(_0x3dc9d2,_0x46a0c4){return _0x3dc9d2===_0x46a0c4;},'oPCWw':_0xb76d55(0x1f1),'WfiYG':_0xb76d55(0x1e2),'ZubDd':_0xb76d55(0x1d3)};return new Promise(_0x2a3980=>{const _0x128980=_0xb76d55,_0x41cc63={'yoaBi':function(_0x3ca4d0,_0x4b9443){return _0x3ca4d0(_0x4b9443);},'wpxMF':function(_0x305ec5,_0x64f326){const _0x11246a=_0x5ee8;return _0x5c747f[_0x11246a(0x1de)](_0x305ec5,_0x64f326);}};console[_0x128980(0x1e5)]('\x0aInstalling\x20'+PACKAGE_NAME+_0x128980(0x1eb));const _0x3e7792=spawn(_0x5c747f[_0x128980(0x1dd)],[_0x128980(0x1f9),'-g',PACKAGE_NAME+_0x128980(0x1e7)],{'stdio':'inherit','shell':process[_0x128980(0x208)]==='win32'});_0x3e7792['on'](_0x5c747f['WfiYG'],_0x567bfe=>{_0x41cc63['yoaBi'](_0x2a3980,_0x41cc63['wpxMF'](_0x567bfe,0x0));}),_0x3e7792['on'](_0x5c747f['ZubDd'],()=>{_0x2a3980(![]);});});}async function updateClaudeMarketplace(){const _0x24ff6f=_0x5ee8,_0x36e79f={'NJpku':function(_0x402eca,_0x11fa0b){return _0x402eca(_0x11fa0b);},'TLuKA':function(_0x28bbab,_0x3e9199){return _0x28bbab===_0x3e9199;},'ZlkVg':function(_0x1e9119,_0x18a486,_0x40f8dc,_0x4d0743){return _0x1e9119(_0x18a486,_0x40f8dc,_0x4d0743);},'lhLom':'plugin','HBtmI':_0x24ff6f(0x1e1),'tLsZh':_0x24ff6f(0x1ff),'vZqwX':'win32','fvOOW':'close'};return new Promise(_0x736175=>{const _0x9b2ac7=_0x24ff6f,_0xbfb273={'QsZDs':function(_0x341818,_0x1688dd){return _0x341818(_0x1688dd);}},_0x4da9ec=_0x36e79f['ZlkVg'](spawn,'claude',[_0x36e79f['lhLom'],_0x36e79f['HBtmI'],_0x9b2ac7(0x1ee),_0x36e79f['tLsZh']],{'stdio':_0x9b2ac7(0x1ec),'shell':process[_0x9b2ac7(0x208)]===_0x36e79f[_0x9b2ac7(0x1d4)]});_0x4da9ec['on'](_0x36e79f['fvOOW'],_0x5418e4=>{const _0x150a85=_0x9b2ac7;_0x36e79f['NJpku'](_0x736175,_0x36e79f[_0x150a85(0x1e6)](_0x5418e4,0x0));}),_0x4da9ec['on']('error',()=>{_0xbfb273['QsZDs'](_0x736175,![]);});});}async function updateClaudePlugin(_0x30bad0){const _0x188486=_0x5ee8,_0x40f9ba={'yREmj':function(_0x434b9d,_0x5be433){return _0x434b9d(_0x5be433);},'tWMBr':function(_0x155a7b,_0x3ba51c){return _0x155a7b===_0x3ba51c;},'oaqDQ':function(_0x2ef2ae,_0x52a91b){return _0x2ef2ae(_0x52a91b);},'lpVme':_0x188486(0x1ee),'GIkvZ':'ranger@trailhead','BTBeG':_0x188486(0x1fa),'iYTFP':'claude','qhTKg':_0x188486(0x1d0),'wAqSI':'close','ulhap':'error'};return new Promise(_0x49fa83=>{const _0x29ba99=_0x188486,_0x122682={'yiPBB':function(_0x1b069c,_0x56b92f){return _0x40f9ba['oaqDQ'](_0x1b069c,_0x56b92f);}},_0x59abc3=['plugin',_0x40f9ba[_0x29ba99(0x1e4)],_0x40f9ba[_0x29ba99(0x1fc)]];_0x30bad0&&_0x59abc3['push'](_0x40f9ba['BTBeG'],_0x30bad0);const _0x4f08e1=spawn(_0x40f9ba['iYTFP'],_0x59abc3,{'stdio':'pipe','shell':_0x40f9ba[_0x29ba99(0x207)](process['platform'],_0x40f9ba['qhTKg'])});_0x4f08e1['on'](_0x40f9ba['wAqSI'],_0x5ee4c8=>{const _0x53a4b6=_0x29ba99;_0x40f9ba[_0x53a4b6(0x205)](_0x49fa83,_0x40f9ba[_0x53a4b6(0x207)](_0x5ee4c8,0x0));}),_0x4f08e1['on'](_0x40f9ba[_0x29ba99(0x1df)],()=>{_0x122682['yiPBB'](_0x49fa83,![]);});});}function _0x5ee8(_0x26b905,_0x4a930a){_0x26b905=_0x26b905-0x1cd;const _0xea9c6e=_0xea9c();let _0x5ee84a=_0xea9c6e[_0x26b905];return _0x5ee84a;}function isSkillInstalled(_0x36f698,_0x51da0a,_0x363104){const _0x18cfd3=_0x5ee8,_0x1e66eb={'vfHgS':function(_0x5dd7a1,_0x4aa2aa){return _0x5dd7a1===_0x4aa2aa;},'UfOYv':function(_0x3bf878,_0x2f44e3){return _0x3bf878(_0x2f44e3);},'xudUz':function(_0x443746,_0x1f9fa7){return _0x443746(_0x1f9fa7);},'UyADQ':function(_0x3e9a12,_0x5ee9bd,_0x4d0166){return _0x3e9a12(_0x5ee9bd,_0x4d0166);}},_0x5a6d4c=_0x1e66eb[_0x18cfd3(0x1f8)](_0x363104,'opencode')?_0x1e66eb[_0x18cfd3(0x201)](getOpencodeSkillsDir,_0x51da0a):_0x1e66eb['xudUz'](getSkillsDir,_0x51da0a),_0x18256b=_0x1e66eb[_0x18cfd3(0x1ed)](join,_0x5a6d4c,_0x36f698);return _0x1e66eb[_0x18cfd3(0x201)](existsSync,_0x18256b);}async function reinstallSkills(_0x5235ea){const _0x59ff0f=_0x5ee8,_0xe712a={'sJYiT':'project','lumft':function(_0x2eb3a2,_0x498464,_0xb16d7,_0x5184b8){return _0x2eb3a2(_0x498464,_0xb16d7,_0x5184b8);},'UMoJr':'claude','UynVv':function(_0x29b526,_0x20ac47,_0x457959,_0xb893ed){return _0x29b526(_0x20ac47,_0x457959,_0xb893ed);},'OBWCE':_0x59ff0f(0x202)},_0x461405=[_0xe712a['sJYiT'],'user'],_0x545bf5=[];for(const _0x34d395 of _0x461405){for(const _0x2733f8 of RANGER_MANAGED_SKILLS){_0xe712a['lumft'](isSkillInstalled,_0x2733f8,_0x34d395,_0xe712a['UMoJr'])&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':_0x59ff0f(0x206)}),_0xe712a['UynVv'](isSkillInstalled,_0x2733f8,_0x34d395,'opencode')&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':'opencode'});}}for(const _0x2911b4 of _0x461405){for(const _0x3d383f of DEPRECATED_SKILLS){await removeSkill(_0x3d383f,_0x2911b4);}}if(_0x545bf5['length']===0x0){console[_0x59ff0f(0x1e5)](_0xe712a[_0x59ff0f(0x1cf)]);return;}console['log'](_0x59ff0f(0x1ea)+_0x545bf5[_0x59ff0f(0x1f4)]+_0x59ff0f(0x1d8));for(const {skillName:_0x4e9cb9,level:_0x3b9a49,platform:_0x406f16}of _0x545bf5){try{await installSkill(_0x4e9cb9,{'level':_0x3b9a49,'cliVersion':_0x5235ea,'platform':_0x406f16});}catch(_0x14a713){console['warn'](_0x59ff0f(0x1f2)+_0x406f16+'\x20'+_0x3b9a49+'\x20skill\x20'+_0x4e9cb9+':',_0x14a713);}}}function _0xea9c(){const _0x729d0f=['EBPQM','UfOYv','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','7563zsEXDx','920466TITvqH','yREmj','claude','tWMBr','platform','active-profile.txt','570SlnfXO','version','yhfyu','OBWCE','win32','11PwZkET','split','error','vZqwX','queGx','24350660nRrrpN','some','\x20ranger-managed\x20skill(s)...','Update\x20failed.','40VyYGNY','\x0aSuccessfully\x20installed\x20latest\x20version.','871912QVZWaY','oPCWw','XOKYj','ulhap','qWIZC','marketplace','close','\x0a✅\x20Update\x20complete!','lpVme','log','TLuKA','@latest','utf-8','3139036erLBqd','\x0aReinstalling\x20','@latest...\x0a','pipe','UyADQ','update','project','endsWith','npm','\x20\x20Failed\x20to\x20reinstall\x20','19920FzvKet','length','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','active-feature.txt','vfHgS','install','--scope','6467629orDsxM','GIkvZ','Checking\x20for\x20updates...','152KINmOM','trailhead'];_0xea9c=function(){return _0x729d0f;};return _0xea9c();}async function ensureActiveProfileGitignored(){const _0x45d423=_0x5ee8,_0x2a138e={'queGx':function(_0x1da482){return _0x1da482();},'yhfyu':function(_0x4b59ac,_0x2bd6a2){return _0x4b59ac(_0x2bd6a2);},'yjOQV':function(_0x1914d0,_0x52d918,_0x5b4521){return _0x1914d0(_0x52d918,_0x5b4521);},'EBPQM':_0x45d423(0x1e8),'YSAvH':function(_0x369fd5,_0x3fa4e8,_0x5fb96,_0x536e0f){return _0x369fd5(_0x3fa4e8,_0x5fb96,_0x536e0f);}},_0x18d882=join(_0x2a138e[_0x45d423(0x1d5)](getRangerDir),'.gitignore');if(!_0x2a138e[_0x45d423(0x1ce)](existsSync,_0x18d882))return![];let _0x2ebb4b='';try{_0x2ebb4b=await _0x2a138e['yjOQV'](readFile,_0x18d882,_0x2a138e[_0x45d423(0x200)]);}catch{return![];}const _0x29eb0b=_0x2ebb4b[_0x45d423(0x1d2)](/\r?\n/);if(_0x29eb0b[_0x45d423(0x1d7)](_0x9222ce=>_0x9222ce[_0x45d423(0x1f6)]()==='active-profile.txt'))return![];let _0x48eabf=_0x29eb0b['findIndex'](_0x1225e8=>_0x1225e8['trim']()===_0x45d423(0x1f7));_0x48eabf===-0x1&&(_0x48eabf=_0x29eb0b['length']);_0x29eb0b['splice'](_0x48eabf,0x0,_0x45d423(0x209));let _0x473840=_0x29eb0b['join']('\x0a');!_0x473840[_0x45d423(0x1f0)]('\x0a')&&(_0x473840+='\x0a');try{await _0x2a138e['YSAvH'](writeFile,_0x18d882,_0x473840,_0x2a138e['EBPQM']);}catch{return![];}return!![];}export async function update(){const _0x1f8358=_0x5ee8,_0x59ed24={'dhanu':function(_0x2351fb){return _0x2351fb();},'rirFS':function(_0x24458b){return _0x24458b();},'sGhPB':_0x1f8358(0x1d9),'MOlVo':function(_0x1447ad,_0x4ac49f){return _0x1447ad(_0x4ac49f);},'mYuBw':'trailhead','Czuqf':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ZJZcg':_0x1f8358(0x1ef),'qWIZC':'✓\x20Migrated\x20active\x20profile\x20file'},_0x55db51=getCurrentVersion();console[_0x1f8358(0x1e5)]('\x0aCurrent\x20version:\x20'+_0x55db51),console[_0x1f8358(0x1e5)](_0x1f8358(0x1fd));const _0x5785f9=_0x59ed24['dhanu'](getLatestVersion);let _0x438f59=_0x55db51;if(!_0x5785f9['version']){console['warn'](_0x1f8358(0x1f5)+_0x5785f9['error']),console[_0x1f8358(0x1e5)]('Attempting\x20install\x20anyway...');const _0x4464c0=await runInstall();if(_0x4464c0)console[_0x1f8358(0x1e5)](_0x1f8358(0x1db)),_0x438f59=_0x59ed24['rirFS'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5785f9['error']);}else{const _0x2812b8=_0x5785f9[_0x1f8358(0x1cd)];console[_0x1f8358(0x1e5)]('Latest\x20version:\x20\x20'+_0x2812b8);const _0x35960b=compareVersions(_0x55db51,_0x2812b8);if(_0x35960b===0x0)console[_0x1f8358(0x1e5)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x35960b<0x0)console['log']('\x0aYour\x20version\x20('+_0x55db51+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x2812b8+').');else{const _0x5172c2=await _0x59ed24['rirFS'](runInstall);if(_0x5172c2)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2812b8),_0x438f59=_0x2812b8;else throw new Error(_0x59ed24['sGhPB']);}}}await _0x59ed24['MOlVo'](reinstallSkills,_0x438f59);const _0x7f1d67=await isMarketplaceAdded(_0x59ed24['mYuBw']),_0xf24347=await isPluginInstalled('ranger@trailhead');if(_0x7f1d67){const _0x119168=await updateClaudeMarketplace();_0x119168&&console[_0x1f8358(0x1e5)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0xf24347){const _0x312228=await updateClaudePlugin();_0x312228&&console['log'](_0x59ed24['Czuqf']);const _0x4152f9=await updateClaudePlugin(_0x59ed24['ZJZcg']);_0x4152f9&&console[_0x1f8358(0x1e5)]((_0x312228?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x3cf401=await migrateActiveProfileFile();_0x3cf401&&console['log'](_0x59ed24[_0x1f8358(0x1e0)]);const _0x46bd05=await ensureActiveProfileGitignored();console['log'](_0x1f8358(0x1e3));}
|
|
1
|
+
(function(_0x1fd0e8,_0x55e825){const _0x3b7b01=_0x50d1,_0x507540=_0x1fd0e8();while(!![]){try{const _0x50b6bf=parseInt(_0x3b7b01(0xfd))/0x1*(parseInt(_0x3b7b01(0x101))/0x2)+-parseInt(_0x3b7b01(0x11c))/0x3+-parseInt(_0x3b7b01(0xfb))/0x4*(-parseInt(_0x3b7b01(0x117))/0x5)+parseInt(_0x3b7b01(0xf9))/0x6+-parseInt(_0x3b7b01(0xde))/0x7+-parseInt(_0x3b7b01(0xd3))/0x8*(-parseInt(_0x3b7b01(0xce))/0x9)+-parseInt(_0x3b7b01(0x10e))/0xa;if(_0x50b6bf===_0x55e825)break;else _0x507540['push'](_0x507540['shift']());}catch(_0x45d672){_0x507540['push'](_0x507540['shift']());}}}(_0x4366,0x66e08));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';function _0x50d1(_0x397c84,_0x15f4af){_0x397c84=_0x397c84-0xcc;const _0x43660b=_0x4366();let _0x50d1ce=_0x43660b[_0x397c84];return _0x50d1ce;}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;async function runCommand(_0x53157b,_0x5ab7ea,_0x1e00fe){const _0x4e6800=_0x50d1,_0x34917f={'YtVXu':function(_0xf35fa9,_0x485bcd){return _0xf35fa9(_0x485bcd);},'DuotK':function(_0x53e77c,_0x1de110,_0x53e435,_0x4ff3fa){return _0x53e77c(_0x1de110,_0x53e435,_0x4ff3fa);},'mZKpr':function(_0x334818,_0xb2a188){return _0x334818===_0xb2a188;},'SOxdC':_0x4e6800(0xe7)};return new Promise(_0x134e99=>{const _0x267470=_0x4e6800,_0x370d90={'QKopv':function(_0x5251ac,_0x5a1326){return _0x5251ac(_0x5a1326);},'siKKg':function(_0x14ff30,_0x41a497){const _0x784235=_0x50d1;return _0x34917f[_0x784235(0x110)](_0x14ff30,_0x41a497);}};let _0x1da3e7=![],_0x2583b9;const _0x28d7f0=_0x187292=>{if(_0x1da3e7)return;_0x1da3e7=!![],_0x2583b9&&_0x370d90['QKopv'](clearTimeout,_0x2583b9),_0x134e99(_0x187292);},_0x3ad3c6=_0x34917f['DuotK'](spawn,_0x53157b,_0x5ab7ea,{'stdio':['ignore',_0x1e00fe?.['stdio']??_0x267470(0xee),_0x1e00fe?.[_0x267470(0x11a)]??_0x267470(0xee)],'shell':_0x34917f[_0x267470(0xda)](process[_0x267470(0xe3)],_0x267470(0xeb))});_0x2583b9=_0x1e00fe?.['timeoutMs']?setTimeout(()=>{const _0x1f335a=_0x267470;_0x3ad3c6['kill'](),_0x3ad3c6[_0x1f335a(0xcf)](),_0x370d90[_0x1f335a(0xf1)](_0x28d7f0,![]);},_0x1e00fe[_0x267470(0x11b)]):undefined,_0x3ad3c6['on']('close',_0x2468f8=>{_0x28d7f0(_0x2468f8===0x0);}),_0x3ad3c6['on'](_0x34917f['SOxdC'],()=>{_0x370d90['siKKg'](_0x28d7f0,![]);});});}function _0x4366(){const _0x201741=['\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','trim','24oOXbcG','nPVDe','ceLcn','marketplace','split','wskVf','opencode','mZKpr','npm','\x0aCurrent\x20version:\x20','user','674359YFfWaZ','Attempting\x20install\x20anyway...','OclIX','fugzy','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','platform','ONugC','dqNXJ','UrrAY','error','wdtzh','jzGYg','bCKmn','win32','sEzsM','log','inherit','LtSpT','yldCE','QKopv','RvlvV','XPspI','trailhead','ranger@trailhead','project','\x20skill\x20','findIndex','4387752nXCsfL','claude','865736pzjQOQ','Naldc','107aRuPnJ','Update\x20failed.','.gitignore','Update\x20failed:\x20','11022wypNrH','\x0aReinstalling\x20','utf-8','dLeAq','active-profile.txt','Claude\x20plugin\x20update\x20failed\x20for\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','YcErp','PVoEN','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','some','qRCpV','PYhQP','6498810FQHFsC','push','YtVXu','deNlQ','update','--scope','@latest...\x0a','version','qMDMH','10uzkPZR','FaGuX','@latest','stdio','timeoutMs','1989402fAfbjj','\x20\x20Failed\x20to\x20reinstall\x20',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','230697RAzZBG','unref','splice'];_0x4366=function(){return _0x201741;};return _0x4366();}async function runInstall(){const _0x8096f1=_0x50d1,_0xcdbb8={'ONugC':function(_0x168d49,_0x367fc2){return _0x168d49===_0x367fc2;},'deNlQ':function(_0x188ab1,_0x458557,_0x14f0a5,_0x3d789f){return _0x188ab1(_0x458557,_0x14f0a5,_0x3d789f);},'OclIX':_0x8096f1(0xdb),'xgPAh':'install','VzKGX':'ignore','RvlvV':'inherit'};return new Promise(_0x14f299=>{const _0x2771d3=_0x8096f1,_0x85aaf0={'VekYO':function(_0x4772f5,_0x1487a1){return _0xcdbb8['ONugC'](_0x4772f5,_0x1487a1);}};console[_0x2771d3(0xed)]('\x0aInstalling\x20'+PACKAGE_NAME+_0x2771d3(0x114));const _0x4aff16=_0xcdbb8[_0x2771d3(0x111)](spawn,_0xcdbb8[_0x2771d3(0xe0)],[_0xcdbb8['xgPAh'],'-g',PACKAGE_NAME+_0x2771d3(0x119)],{'stdio':[_0xcdbb8['VzKGX'],'inherit',_0xcdbb8[_0x2771d3(0xf2)]],'shell':_0xcdbb8[_0x2771d3(0xe4)](process[_0x2771d3(0xe3)],'win32')});_0x4aff16['on']('close',_0x14093e=>{_0x14f299(_0x85aaf0['VekYO'](_0x14093e,0x0));}),_0x4aff16['on'](_0x2771d3(0xe7),()=>{_0x14f299(![]);});});}async function updateClaudeMarketplace(){const _0xec5d43=_0x50d1,_0x18ef90={'qMDMH':'plugin','fugzy':_0xec5d43(0x112)},_0xe28253=await runCommand('claude',[_0x18ef90[_0xec5d43(0x116)],_0xec5d43(0xd6),_0x18ef90[_0xec5d43(0xe1)],_0xec5d43(0xf4)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0xe28253)throw new Error(_0xec5d43(0xe2));}async function updateClaudePlugin(_0x1ac9af){const _0x5a3171=_0x50d1,_0x3f1ec7={'PVoEN':'plugin','PYhQP':'ranger@trailhead','FymCy':function(_0x337840,_0x891e30){return _0x337840??_0x891e30;},'wskVf':_0x5a3171(0xdd)},_0x5cde31=[_0x3f1ec7[_0x5a3171(0x109)],_0x5a3171(0x112),_0x3f1ec7[_0x5a3171(0x10d)]];_0x1ac9af&&_0x5cde31[_0x5a3171(0x10f)](_0x5a3171(0x113),_0x1ac9af);const _0x2bcc8e=await runCommand('claude',_0x5cde31,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x2bcc8e){const _0x44553c=_0x3f1ec7['FymCy'](_0x1ac9af,_0x3f1ec7[_0x5a3171(0xd8)]);throw new Error(_0x5a3171(0x106)+_0x44553c+_0x5a3171(0xd1));}}function isSkillInstalled(_0x1b6065,_0x4ad8b9,_0x401ede){const _0x1901d7=_0x50d1,_0x1b1c13={'bCKmn':function(_0x505bc1,_0x1b3f08){return _0x505bc1(_0x1b3f08);},'ceLcn':function(_0x58b245,_0x544997,_0x3e719b){return _0x58b245(_0x544997,_0x3e719b);}},_0x3c5e41=_0x401ede===_0x1901d7(0xd9)?getOpencodeSkillsDir(_0x4ad8b9):_0x1b1c13[_0x1901d7(0xea)](getSkillsDir,_0x4ad8b9),_0x49ec12=_0x1b1c13[_0x1901d7(0xd5)](join,_0x3c5e41,_0x1b6065);return existsSync(_0x49ec12);}async function reinstallSkills(_0x2055a7){const _0x554bda=_0x50d1,_0x212638={'FeEFP':_0x554bda(0xdd),'LtSpT':function(_0x3e1d48,_0x1f9c6f,_0x2991f5,_0x331ba6){return _0x3e1d48(_0x1f9c6f,_0x2991f5,_0x331ba6);},'FaGuX':_0x554bda(0xfa),'dqNXJ':'opencode','zXZXt':function(_0x31ef25,_0x4a19b4,_0x1bfdd3){return _0x31ef25(_0x4a19b4,_0x1bfdd3);}},_0x103318=['project',_0x212638['FeEFP']],_0x1e28cf=[];for(const _0x2a4759 of _0x103318){for(const _0x1e41b9 of RANGER_MANAGED_SKILLS){_0x212638[_0x554bda(0xef)](isSkillInstalled,_0x1e41b9,_0x2a4759,_0x212638[_0x554bda(0x118)])&&_0x1e28cf[_0x554bda(0x10f)]({'skillName':_0x1e41b9,'level':_0x2a4759,'platform':_0x212638['FaGuX']}),_0x212638['LtSpT'](isSkillInstalled,_0x1e41b9,_0x2a4759,_0x212638['dqNXJ'])&&_0x1e28cf[_0x554bda(0x10f)]({'skillName':_0x1e41b9,'level':_0x2a4759,'platform':_0x212638[_0x554bda(0xe5)]});}}for(const _0x11d6d6 of _0x103318){for(const _0x4617ef of DEPRECATED_SKILLS){await _0x212638['zXZXt'](removeSkill,_0x4617ef,_0x11d6d6);}}if(_0x1e28cf['length']===0x0){console[_0x554bda(0xed)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log'](_0x554bda(0x102)+_0x1e28cf['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x55f4e6,level:_0x58e548,platform:_0x4edbf9}of _0x1e28cf){try{await installSkill(_0x55f4e6,{'level':_0x58e548,'cliVersion':_0x2055a7,'platform':_0x4edbf9});}catch(_0x315141){console['warn'](_0x554bda(0xcc)+_0x4edbf9+'\x20'+_0x58e548+_0x554bda(0xf7)+_0x55f4e6+':',_0x315141);}}}async function ensureActiveProfileGitignored(){const _0x233403=_0x50d1,_0x2a479b={'hDnDB':function(_0x361d72){return _0x361d72();},'jgeRz':_0x233403(0xff),'dLeAq':function(_0x5cecae,_0x5a0f90){return _0x5cecae(_0x5a0f90);},'Naldc':function(_0x20065c,_0x5c7d10,_0x3ba0fd){return _0x20065c(_0x5c7d10,_0x3ba0fd);},'qxhvZ':_0x233403(0x103),'NHqjB':function(_0x5c39fa,_0x28c0ee){return _0x5c39fa===_0x28c0ee;},'Ubfea':function(_0x52e5ae,_0x5a4700,_0x44f633,_0x409525){return _0x52e5ae(_0x5a4700,_0x44f633,_0x409525);}},_0x1fd183=join(_0x2a479b['hDnDB'](getRangerDir),_0x2a479b['jgeRz']);if(!_0x2a479b[_0x233403(0x104)](existsSync,_0x1fd183))return![];let _0x1c08ea='';try{_0x1c08ea=await _0x2a479b[_0x233403(0xfc)](readFile,_0x1fd183,_0x2a479b['qxhvZ']);}catch{return![];}const _0x5d1959=_0x1c08ea[_0x233403(0xd7)](/\r?\n/);if(_0x5d1959[_0x233403(0x10b)](_0x16e968=>_0x16e968['trim']()===_0x233403(0x105)))return![];let _0x2ba6bb=_0x5d1959[_0x233403(0xf8)](_0x5370a9=>_0x5370a9[_0x233403(0xd2)]()==='active-feature.txt');_0x2a479b['NHqjB'](_0x2ba6bb,-0x1)&&(_0x2ba6bb=_0x5d1959['length']);_0x5d1959[_0x233403(0xd0)](_0x2ba6bb,0x0,'active-profile.txt');let _0x20294b=_0x5d1959['join']('\x0a');!_0x20294b['endsWith']('\x0a')&&(_0x20294b+='\x0a');try{await _0x2a479b['Ubfea'](writeFile,_0x1fd183,_0x20294b,'utf-8');}catch{return![];}return!![];}export async function update(){const _0xdaccdf=_0x50d1,_0x37746a={'YDvrS':function(_0x5eaef7){return _0x5eaef7();},'YcErp':function(_0x368d82){return _0x368d82();},'qRCpV':'\x0aSuccessfully\x20installed\x20latest\x20version.','UfsXx':function(_0x4baf0f,_0x17089e,_0x306704){return _0x4baf0f(_0x17089e,_0x306704);},'hBLtU':function(_0x23f3ce,_0x3f2734){return _0x23f3ce===_0x3f2734;},'trpji':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','wdtzh':function(_0x3c4a5b){return _0x3c4a5b();},'UrrAY':_0xdaccdf(0xfe),'XPspI':function(_0x165420,_0x5bff88){return _0x165420(_0x5bff88);},'yldCE':'trailhead','nPVDe':_0xdaccdf(0x10a),'sEzsM':function(_0x56fd81,_0x405861){return _0x56fd81(_0x405861);},'jzGYg':function(_0x4d5d2e,_0x542099){return _0x4d5d2e(_0x542099);}},_0x32c39f=getCurrentVersion();console['log'](_0xdaccdf(0xdc)+_0x32c39f),console['log']('Checking\x20for\x20updates...');const _0x1bff84=_0x37746a['YDvrS'](getLatestVersion);let _0x14703b=_0x32c39f;if(!_0x1bff84[_0xdaccdf(0x115)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x1bff84['error']),console[_0xdaccdf(0xed)](_0xdaccdf(0xdf));const _0x1a2e1b=await _0x37746a[_0xdaccdf(0x108)](runInstall);if(_0x1a2e1b)console['log'](_0x37746a[_0xdaccdf(0x10c)]),_0x14703b=getCurrentVersion();else throw new Error(_0xdaccdf(0x100)+_0x1bff84[_0xdaccdf(0xe7)]);}else{const _0x1395ad=_0x1bff84['version'];console[_0xdaccdf(0xed)]('Latest\x20version:\x20\x20'+_0x1395ad);const _0x21a3b3=_0x37746a['UfsXx'](compareVersions,_0x32c39f,_0x1395ad);if(_0x37746a['hBLtU'](_0x21a3b3,0x0))console[_0xdaccdf(0xed)](_0x37746a['trpji']);else{if(_0x21a3b3<0x0)console['log']('\x0aYour\x20version\x20('+_0x32c39f+_0xdaccdf(0xcd)+_0x1395ad+').');else{const _0x5e7677=await _0x37746a[_0xdaccdf(0xe8)](runInstall);if(_0x5e7677)console[_0xdaccdf(0xed)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1395ad),_0x14703b=_0x1395ad;else throw new Error(_0x37746a[_0xdaccdf(0xe6)]);}}}await _0x37746a[_0xdaccdf(0xf3)](reinstallSkills,_0x14703b);const _0x537ac3=await isMarketplaceAdded(_0x37746a[_0xdaccdf(0xf0)]),_0x4a9842=await _0x37746a['XPspI'](isPluginInstalled,'ranger@trailhead');_0x537ac3&&(await updateClaudeMarketplace(),console['log'](_0x37746a[_0xdaccdf(0xd4)]));if(_0x4a9842){const _0x782081=await _0x37746a[_0xdaccdf(0xec)](getPluginInfo,_0xdaccdf(0xf5));_0x37746a['hBLtU'](_0x782081?.['scope'],'project')?(await _0x37746a[_0xdaccdf(0xe9)](updateClaudePlugin,_0xdaccdf(0xf6)),console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).')):(await _0x37746a[_0xdaccdf(0x108)](updateClaudePlugin),console['log'](_0xdaccdf(0x107)));}const _0x13f675=await _0x37746a['YDvrS'](migrateActiveProfileFile);_0x13f675&&console[_0xdaccdf(0xed)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x4d9f91=await _0x37746a['YcErp'](ensureActiveProfileGitignored);console[_0xdaccdf(0xed)]('\x0a✅\x20Update\x20complete!');}
|