@ranger-testing/ranger-cli 2.3.0 → 2.3.2
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 -0
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.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/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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d8413,_0x3f8e7f){const _0x3ebb7c=_0x4685,_0x4fe2a2=_0x2d8413();while(!![]){try{const _0x436b12=-parseInt(_0x3ebb7c(0x10d))/0x1+-parseInt(_0x3ebb7c(0x10b))/0x2*(-parseInt(_0x3ebb7c(0x115))/0x3)+parseInt(_0x3ebb7c(0x109))/0x4+parseInt(_0x3ebb7c(0x117))/0x5+parseInt(_0x3ebb7c(0x10e))/0x6+parseInt(_0x3ebb7c(0x116))/0x7*(parseInt(_0x3ebb7c(0x113))/0x8)+parseInt(_0x3ebb7c(0x103))/0x9*(-parseInt(_0x3ebb7c(0x107))/0xa);if(_0x436b12===_0x3f8e7f)break;else _0x4fe2a2['push'](_0x4fe2a2['shift']());}catch(_0x14f92f){_0x4fe2a2['push'](_0x4fe2a2['shift']());}}}(_0xfdad,0x9574e));function _0xfdad(){const _0x4d5a85=['963436raQkiM','6011520ddYgMa','log','NQLzu','IlAVg','success','56jOroUc','session_id','1553190rRnetJ','809851TlcrfS','5354385fgWskT','13621806wYLLMM','iRHjI','qllTA','DasjZ','20FBIKRg','JFYYs','2738280SfTDmw','main','4HmGLPm','trackCommandStart'];_0xfdad=function(){return _0x4d5a85;};return _0xfdad();}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x4685(_0x2be0fb,_0x134fd7){_0x2be0fb=_0x2be0fb-0x103;const _0xfdad23=_0xfdad();let _0x468582=_0xfdad23[_0x2be0fb];return _0x468582;}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=================================================================';export async function sessionStart(_0x33b3cd){const _0xeb024a=_0x4685,_0x2cd485={'IlAVg':'source','LeylV':function(_0x2aac7b,_0x2ebde2){return _0x2aac7b&&_0x2ebde2;},'NQLzu':function(_0x475c72,_0x53f575,_0x661be7){return _0x475c72(_0x53f575,_0x661be7);},'iRHjI':function(_0x482e42,_0x6247a){return _0x482e42(_0x6247a);},'DasjZ':'hook:session-start','qllTA':_0xeb024a(0x10a),'yxVEK':'SessionStart','JFYYs':function(_0x2a5301,_0x45df2b){return _0x2a5301+_0x45df2b;}};let _0x3c53f0=_0x33b3cd||'',_0x35123a;if(!_0x33b3cd){let _0x226e1c='';for await(const _0x164fa6 of process['stdin']){_0x226e1c+=_0x164fa6;}try{const _0x4ec6be=JSON['parse'](_0x226e1c);_0x3c53f0=_0x4ec6be[_0xeb024a(0x114)]||'',_0x35123a=_0x4ec6be[_0x2cd485[_0xeb024a(0x111)]];}catch{}const _0x11559b=process['env']['CLAUDE_ENV_FILE'];if(_0x2cd485['LeylV'](_0x11559b,_0x3c53f0))try{await _0x2cd485[_0xeb024a(0x110)](appendFile,_0x11559b,'export\x20CLAUDE_SESSION_ID=\x22'+_0x3c53f0+'\x22\x0a');}catch{}}if(_0x3c53f0){shouldAutoEnableAfterClear(_0x35123a)&&_0x2cd485[_0xeb024a(0x104)](autoEnableAfterClear,_0x3c53f0);initBranchTracking(_0x3c53f0);const _0x3443a1=isSessionEnabled(_0x3c53f0);try{const _0x36b228=createTelemetryCollector(_0x2cd485[_0xeb024a(0x106)]);await _0x36b228[_0xeb024a(0x10c)]({'sessionId':_0x3c53f0,'hooksEnabled':_0x3443a1}),await _0x36b228['trackCommandEnd'](_0xeb024a(0x112));}catch{}if(_0x3443a1){const _0x57a4cb=getCurrentBranch(),_0x2fd631=_0x57a4cb&&_0x57a4cb!==_0x2cd485[_0xeb024a(0x105)]&&_0x57a4cb!=='master'?'\x20(Branch:\x20'+_0x57a4cb+')':'',_0x3223dc={'hookSpecificOutput':{'hookEventName':_0x2cd485['yxVEK'],'additionalContext':_0x2cd485[_0xeb024a(0x108)](RANGER_AUTO_ENABLED_PROMPT,_0x2fd631)}};console[_0xeb024a(0x10f)](JSON['stringify'](_0x3223dc));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xba328b,_0x5a8548){const _0x241fa9=_0xfe9a,_0x1529b6=_0xba328b();while(!![]){try{const _0x117c50=parseInt(_0x241fa9(0xf7))/0x1+parseInt(_0x241fa9(0x10b))/0x2+-parseInt(_0x241fa9(0x101))/0x3+parseInt(_0x241fa9(0xfd))/0x4+-parseInt(_0x241fa9(0xfb))/0x5+-parseInt(_0x241fa9(0xf5))/0x6+parseInt(_0x241fa9(0x103))/0x7;if(_0x117c50===_0x5a8548)break;else _0x1529b6['push'](_0x1529b6['shift']());}catch(_0x2ebaa0){_0x1529b6['push'](_0x1529b6['shift']());}}}(_0x3adf,0x660b9));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0xfe9a(_0x3603e6,_0x5cccb7){_0x3603e6=_0x3603e6-0xf5;const _0x3adf0c=_0x3adf();let _0xfe9ae4=_0x3adf0c[_0x3603e6];return _0xfe9ae4;}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x3adf(){const _0x56c5fd=['2980215nujMlA','sessionId','773468hrWdmn','featureId','https://dashboard.ranger.net/features/','log','1867026YHjdwE','currentSessionId','7757680VDSQbW','incomplete','ZJDLT','HpgDT','success','some','trackCommandStart','blocked','965828tSHvGn','2438820fliOzz','status','258311anAduu','filter','closed','hook:stop'];_0x3adf=function(){return _0x56c5fd;};return _0x3adf();}export async function stopHook(_0x190a15){const _0x1a2ab0=_0xfe9a,_0x50b655={'ZJDLT':function(_0x1b1394,_0x28ea22){return _0x1b1394(_0x28ea22);},'Bysqy':function(_0x2ec679,_0x489de7,_0x2e7453,_0x4f9f9f){return _0x2ec679(_0x489de7,_0x2e7453,_0x4f9f9f);},'MBjAW':function(_0x3bf3fd){return _0x3bf3fd();},'HpgDT':function(_0x7a3934,_0x1108ad){return _0x7a3934&&_0x1108ad;},'gqDhP':function(_0x5f27a0,_0x3b7162,_0x447dac,_0x1ba9bf){return _0x5f27a0(_0x3b7162,_0x447dac,_0x1ba9bf);}},_0x4db23f=await _0x50b655['ZJDLT'](getEnabledHookContext,_0x190a15),_0x16ec79=_0x4db23f?.[_0x1a2ab0(0xfc)]??null;let _0x4513e6=!![];if(!_0x16ec79){await _0x50b655['Bysqy'](trackStop,_0x16ec79,![],_0x4513e6);return;}try{const _0x58b0bc=_0x50b655[_0x1a2ab0(0x105)](getSessionEntry,_0x16ec79);if(!_0x58b0bc){await trackStop(_0x16ec79,!![],_0x4513e6);return;}const _0x3e266d=await _0x50b655['MBjAW'](getToken),_0xc86170=_0x1a2ab0(0xff)+_0x58b0bc[_0x1a2ab0(0xfe)];let _0xe368a9=null,_0x166ead=![],_0x2eac1b=![];if(_0x3e266d)try{const _0x17ba72=await getFeature(_0x58b0bc['featureId']);_0xe368a9=_0x17ba72[_0x1a2ab0(0x102)]??null;const _0xfe9ece=_0x17ba72['checklistItems'][_0x1a2ab0(0xf8)](_0x2890e5=>_0x2890e5[_0x1a2ab0(0xfc)]===_0xe368a9);_0x166ead=_0xfe9ece[_0x1a2ab0(0x108)](_0x554820=>_0x554820[_0x1a2ab0(0xf6)]!=='verified'&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0x10a)&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0xf9)&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0x104)),_0x2eac1b=_0xfe9ece[_0x1a2ab0(0x108)](_0x42b908=>_0x42b908[_0x1a2ab0(0xf6)]==='verification_in_progress');}catch{}if(_0x50b655[_0x1a2ab0(0x106)](_0x3e266d,_0xe368a9)&&_0x166ead){if(!_0x2eac1b&&_0x50b655['ZJDLT'](shouldShowStopReminder,_0x16ec79)){const _0x395a16={'hookSpecificOutput':{'hookEventName':'Stop','additionalContext':'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'+_0xc86170}};console[_0x1a2ab0(0x100)](JSON['stringify'](_0x395a16));}}if(_0x50b655['HpgDT'](_0x3e266d,_0xe368a9)&&!_0x166ead)try{await concludeSession(_0x58b0bc['featureId'],_0xe368a9);}catch{}await trackStop(_0x16ec79,!![],_0x4513e6);return;}catch{await _0x50b655['gqDhP'](trackStop,_0x16ec79,!![],_0x4513e6);return;}}async function trackStop(_0x2ae0fc,_0x37c93d,_0x63080c){const _0x5059e1=_0xfe9a;try{const _0x287e1f=createTelemetryCollector(_0x5059e1(0xfa));await _0x287e1f[_0x5059e1(0x109)]({'sessionId':_0x2ae0fc??undefined,'hooksEnabled':_0x37c93d,'stopAllowed':_0x63080c}),await _0x287e1f['trackCommandEnd'](_0x5059e1(0x107));}catch{}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x79ce25,_0x596c61){var _0x26b186=_0x3aa2,_0x596e2=_0x79ce25();while(!![]){try{var _0x43f807=-parseInt(_0x26b186(0x152))/0x1+parseInt(_0x26b186(0x14f))/0x2+parseInt(_0x26b186(0x14d))/0x3*(-parseInt(_0x26b186(0x14e))/0x4)+parseInt(_0x26b186(0x14c))/0x5*(parseInt(_0x26b186(0x150))/0x6)+-parseInt(_0x26b186(0x149))/0x7*(-parseInt(_0x26b186(0x14b))/0x8)+-parseInt(_0x26b186(0x151))/0x9*(parseInt(_0x26b186(0x147))/0xa)+-parseInt(_0x26b186(0x14a))/0xb*(parseInt(_0x26b186(0x148))/0xc);if(_0x43f807===_0x596c61)break;else _0x596e2['push'](_0x596e2['shift']());}catch(_0x304a42){_0x596e2['push'](_0x596e2['shift']());}}}(_0x535b,0x256d2));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';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';function _0x3aa2(_0x3974d3,_0x50aae2){_0x3974d3=_0x3974d3-0x147;var _0x535b0b=_0x535b();var _0x3aa255=_0x535b0b[_0x3974d3];return _0x3aa255;}function _0x535b(){var _0x3cd265=['56199tqCZzo','4eceHbA','311782lBkdFm','1014618AOPdQs','120762uMjptT','197735mLJegs','80qOqVMi','10212fbMgUi','7lUizEN','451vRxezN','1496056eSuqkd','5NqdMix'];_0x535b=function(){return _0x3cd265;};return _0x535b();}export{setupCi}from'./setupCi.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7a02b0,_0x4b4765){const _0x3b2ea1=_0x5869,_0x629711=_0x7a02b0();while(!![]){try{const _0x263b04=parseInt(_0x3b2ea1(0x6d))/0x1*(parseInt(_0x3b2ea1(0x77))/0x2)+parseInt(_0x3b2ea1(0x78))/0x3+-parseInt(_0x3b2ea1(0x6f))/0x4+-parseInt(_0x3b2ea1(0x76))/0x5+parseInt(_0x3b2ea1(0x74))/0x6+-parseInt(_0x3b2ea1(0x6e))/0x7+parseInt(_0x3b2ea1(0x79))/0x8*(-parseInt(_0x3b2ea1(0x70))/0x9);if(_0x263b04===_0x4b4765)break;else _0x629711['push'](_0x629711['shift']());}catch(_0x4d7811){_0x629711['push'](_0x629711['shift']());}}}(_0x232f,0xf0477));function _0x5869(_0x3e2d60,_0x2e89ee){_0x3e2d60=_0x3e2d60-0x6a;const _0x232f59=_0x232f();let _0x5869a0=_0x232f59[_0x3e2d60];return _0x5869a0;}function _0x232f(){const _0x39e897=['452336WQWiwb','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','message','Login\x20failed:\x20','\x0a✅\x20API\x20key\x20stored\x20successfully','isTTY','log','390319bvisWA','8438682TKfRlO','187456jqQibM','279DYeoYb','stdout','stdin','ojnUM','8889126yVCLyF','success','3531835wCCiMh','8CxbYke','4958835JYFmCX'];_0x232f=function(){return _0x39e897;};return _0x232f();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x7b8666=_0x5869,_0x2c44d2={'ojnUM':function(_0x57d228){return _0x57d228();},'aSyGh':function(_0x50033e,_0x59b4ba){return _0x50033e(_0x59b4ba);},'egYGX':_0x7b8666(0x6a)},_0x5f59ae=process[_0x7b8666(0x72)][_0x7b8666(0x6b)]&&process[_0x7b8666(0x71)][_0x7b8666(0x6b)];if(!_0x5f59ae)throw new Error(_0x7b8666(0x7a));try{const _0x23f28d=await _0x2c44d2[_0x7b8666(0x73)](runDeviceAuthFlow),_0xcbb25e=await _0x2c44d2['aSyGh'](getCurrentUser,_0x23f28d);_0xcbb25e[_0x7b8666(0x75)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0xcbb25e['user']['organizationName']):console[_0x7b8666(0x6c)](_0x2c44d2['egYGX']);}catch(_0x7111a){throw new Error(_0x7b8666(0x7c)+(_0x7111a instanceof Error?_0x7111a[_0x7b8666(0x7b)]:_0x7111a));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x2012(){const _0xe16f49=['log','321584CMvMqF','ZAmAU','pluginScope','output','wantsSkillup','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','411mgyylc','2038400hgnHnw','aXRAU','ranger@trailhead','wRRWu','✓\x20Ranger\x20skills\x20already\x20installed','RZgqu','VFWYE','2209400LZCwjE','vMMMX','leWsZ','282760dtpSEB','8972CkIJiU','kkLWc','SKILL.md','ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','6756qFYbFS','install','sMLwy','5455UtOcjZ','yYAAL','XFqCH','User\x20(available\x20in\x20all\x20your\x20projects)','user','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','error','xSZrE','2793vuggDT','306WbkGdf','includes','.claude','YqDek','\x20level)...\x0a','already\x20enabled','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','\x0aYou\x20can\x20install\x20manually\x20with:','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','prompt','nLKoK','Where\x20should\x20the\x20plugin\x20be\x20installed?','rRuIN','vXJmO','confirm','IVZZB','project'];_0x2012=function(){return _0xe16f49;};return _0x2012();}(function(_0x1e2d76,_0x24e7a3){const _0x4c2ee6=_0x28cb,_0x4ae23a=_0x1e2d76();while(!![]){try{const _0x2d105d=-parseInt(_0x4c2ee6(0x199))/0x1+-parseInt(_0x4c2ee6(0x1b4))/0x2+parseInt(_0x4c2ee6(0x1ba))/0x3*(-parseInt(_0x4c2ee6(0x191))/0x4)+-parseInt(_0x4c2ee6(0x1bb))/0x5+-parseInt(_0x4c2ee6(0x196))/0x6*(-parseInt(_0x4c2ee6(0x1a1))/0x7)+-parseInt(_0x4c2ee6(0x1c2))/0x8+-parseInt(_0x4c2ee6(0x1a2))/0x9*(-parseInt(_0x4c2ee6(0x190))/0xa);if(_0x2d105d===_0x24e7a3)break;else _0x4ae23a['push'](_0x4ae23a['shift']());}catch(_0xfff93d){_0x4ae23a['push'](_0x4ae23a['shift']());}}}(_0x2012,0x3dd51));import{join}from'path';import{existsSync}from'fs';import _0x504dfa from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x54f051){const _0x329a55=_0x28cb,_0x53a4af={'ZAmAU':function(_0x1b2a17,_0x246806){return _0x1b2a17(_0x246806);},'rRuIN':_0x329a55(0x1b9),'aXRAU':_0x329a55(0x1a4),'nLKoK':_0x329a55(0x1b2),'YqDek':'list','nZLar':_0x329a55(0x1b6),'SaMaM':_0x329a55(0x1ad),'Wbfcc':_0x329a55(0x19d),'RZgqu':'Project\x20(shared\x20with\x20team\x20via\x20git)','aYXfS':'trailhead','jtUPs':_0x329a55(0x194),'XFqCH':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','yYAAL':'plugin','vXJmO':_0x329a55(0x197),'VBMLT':_0x329a55(0x1bd),'IjAoT':'❌\x20Failed\x20to\x20install\x20plugin:','IVZZB':_0x329a55(0x1a9),'ZKeiU':_0x329a55(0x1a7),'VQkZF':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x198371=await _0x53a4af['ZAmAU'](isPluginInstalled,_0x329a55(0x1bd));if(_0x198371)return console['log'](_0x53a4af[_0x329a55(0x1ae)]),![];const _0x319bfb=existsSync(join(getProjectRoot(),_0x53a4af[_0x329a55(0x1bc)]));let _0x3e2576;if(_0x54f051)_0x3e2576=_0x54f051;else{if(_0x319bfb)_0x3e2576=_0x53a4af['nLKoK'];else{console['log'](_0x329a55(0x1aa));const _0x1cad56=await _0x504dfa[_0x329a55(0x1ab)]([{'type':_0x53a4af[_0x329a55(0x1a5)],'name':_0x53a4af['nZLar'],'message':_0x53a4af['SaMaM'],'choices':[{'name':_0x329a55(0x19c),'value':_0x53a4af['Wbfcc']},{'name':_0x53a4af[_0x329a55(0x1c0)],'value':_0x53a4af[_0x329a55(0x1ac)]}],'default':'user'}]);_0x3e2576=_0x1cad56[_0x329a55(0x1b6)];}}console['log'](_0x329a55(0x19e)+_0x3e2576+_0x329a55(0x1a6));const _0x1cd6a8=await _0x53a4af[_0x329a55(0x1b5)](isMarketplaceAdded,_0x53a4af['aYXfS']);let _0x54d943=_0x1cd6a8;if(_0x1cd6a8)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0xcfbefa=await _0x53a4af['ZAmAU'](runClaudeCommand,['plugin','marketplace','add',_0x53a4af['jtUPs']]);!_0xcfbefa['success']?(console['error']('❌\x20Failed\x20to\x20add\x20marketplace:',_0xcfbefa['error']),console[_0x329a55(0x1b3)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x53a4af[_0x329a55(0x19b)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x3e2576)):_0x54d943=!![];}if(_0x54d943){const _0x91669a=await runClaudeCommand([_0x53a4af[_0x329a55(0x19a)],_0x53a4af[_0x329a55(0x1af)],_0x53a4af['VBMLT'],'--scope',_0x3e2576]);if(!_0x91669a['success'])console['error'](_0x53a4af['IjAoT'],_0x91669a['error']),console['log'](_0x53a4af[_0x329a55(0x1b1)]),console['log'](_0x329a55(0x1a8)+_0x3e2576);else{console[_0x329a55(0x1b3)](_0x329a55(0x195));const _0x54852d=[_0x53a4af[_0x329a55(0x19a)],'enable','ranger@trailhead'];_0x3e2576===_0x329a55(0x1b2)&&_0x54852d['push']('--scope',_0x53a4af[_0x329a55(0x1ac)]);const _0x30fab9=await runClaudeCommand(_0x54852d,{'captureOutput':!![]}),_0x62aa8c=_0x30fab9[_0x329a55(0x1b7)]?.[_0x329a55(0x1a3)](_0x53a4af['ZKeiU']);!_0x30fab9['success']&&!_0x62aa8c?console[_0x329a55(0x19f)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x30fab9['error']):console['log'](_0x53a4af['VQkZF']);}}return!![];}function _0x28cb(_0x53c30c,_0x1e29be){_0x53c30c=_0x53c30c-0x18e;const _0x2012cf=_0x2012();let _0x28cbd3=_0x2012cf[_0x53c30c];return _0x28cbd3;}export async function ensureClaudeSkills(_0x39712c){const _0x2cfa66=_0x28cb,_0x32a9a1={'sMLwy':function(_0x4314c4,_0x4a2bd9){return _0x4314c4(_0x4a2bd9);},'gVpBI':'ranger','vMMMX':function(_0x448a10,_0x590447,_0x10e5f2,_0x4b2249){return _0x448a10(_0x590447,_0x10e5f2,_0x4b2249);},'haAwH':function(_0x4a1aac,_0x528b0e){return _0x4a1aac(_0x528b0e);},'VFWYE':_0x2cfa66(0x193),'TAdtl':function(_0x592a48,_0x2e9d3a){return _0x592a48||_0x2e9d3a;},'lBMKd':_0x2cfa66(0x1bf),'sBCfJ':function(_0x45bbef,_0x1a6888){return _0x45bbef(_0x1a6888);},'wRRWu':function(_0x3c3e40,_0x250853,_0x83c9c3){return _0x3c3e40(_0x250853,_0x83c9c3);},'xSZrE':function(_0xc888cc){return _0xc888cc();},'dvghZ':'.claude','kkLWc':function(_0x22ad2a,_0x1f8473){return _0x22ad2a(_0x1f8473);},'leWsZ':'wantsSkillup'},_0x184835=_0x32a9a1[_0x2cfa66(0x198)](existsSync,join(getSkillsDir('user'),_0x32a9a1['gVpBI'],_0x2cfa66(0x193))),_0x428f93=_0x32a9a1['sMLwy'](existsSync,_0x32a9a1[_0x2cfa66(0x18e)](join,_0x32a9a1['haAwH'](getSkillsDir,_0x2cfa66(0x1b2)),_0x32a9a1['gVpBI'],_0x32a9a1[_0x2cfa66(0x1c1)]));if(_0x32a9a1['TAdtl'](_0x184835,_0x428f93))return console['log'](_0x32a9a1['lBMKd']),![];const _0x56494e=_0x32a9a1['sBCfJ'](existsSync,_0x32a9a1[_0x2cfa66(0x1be)](join,_0x32a9a1[_0x2cfa66(0x1a0)](getProjectRoot),_0x32a9a1['dvghZ']));let _0x5b8be5=!![];if(_0x39712c)await skillup({'autoInstall':_0x39712c,'suppressUsage':!![]});else{if(_0x56494e)await _0x32a9a1[_0x2cfa66(0x192)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x3f407f=await _0x504dfa[_0x2cfa66(0x1ab)]([{'type':_0x2cfa66(0x1b0),'name':_0x32a9a1[_0x2cfa66(0x18f)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x5b8be5=_0x3f407f[_0x2cfa66(0x1b8)],_0x5b8be5&&await skillup({'suppressUsage':!![]});}}return _0x5b8be5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x42e4(_0x213951,_0x549612){_0x213951=_0x213951-0xbd;const _0x2c6998=_0x2c69();let _0x42e470=_0x2c6998[_0x213951];return _0x42e470;}(function(_0x41d69d,_0x10ba14){const _0x5aa796=_0x42e4,_0x2f8aa8=_0x41d69d();while(!![]){try{const _0x47fb9c=-parseInt(_0x5aa796(0xca))/0x1+-parseInt(_0x5aa796(0xd2))/0x2*(-parseInt(_0x5aa796(0xdb))/0x3)+parseInt(_0x5aa796(0xc5))/0x4*(parseInt(_0x5aa796(0xcd))/0x5)+parseInt(_0x5aa796(0xc7))/0x6+parseInt(_0x5aa796(0xbd))/0x7+-parseInt(_0x5aa796(0xce))/0x8+parseInt(_0x5aa796(0xda))/0x9*(-parseInt(_0x5aa796(0xd7))/0xa);if(_0x47fb9c===_0x10ba14)break;else _0x2f8aa8['push'](_0x2f8aa8['shift']());}catch(_0x2a2b9f){_0x2f8aa8['push'](_0x2f8aa8['shift']());}}}(_0x2c69,0xf0869));function _0x2c69(){const _0x2972c3=['prompt','user','271179ptaTZs','389052NzQglW','AyGSr','✓\x20OpenCode\x20plugin\x20configured','opencode.json','Where\x20should\x20the\x20plugin\x20be\x20installed?','list','5907930RTJmqw','yDdtS','$schema','JcuCj','sApKw','Failed\x20to\x20read\x20opencode.json','https://opencode.ai/config.json','PqVKb','67400tptIkC','project','11788314gKevue','User\x20(available\x20in\x20all\x20your\x20projects)','ojUJf','906495UFpewK','stringify','parse','330JDDKeV','14429936FBOqDm','XtEQo','✓\x20OpenCode\x20plugin\x20already\x20configured','\x0a📦\x20OpenCode\x20Plugin\x0a','10NyotLY','log','plugin','iJtEA','UIkNr','290kiMuxi'];_0x2c69=function(){return _0x2972c3;};return _0x2c69();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x1dc5c6 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5afd8e){const _0x594090=_0x42e4,_0x5b9f47={'JcuCj':_0x594090(0xc6),'czwUL':_0x594090(0xd1),'vmaer':_0x594090(0xe0),'AyGSr':'pluginScope','iJtEA':_0x594090(0xdf),'ARTVX':_0x594090(0xd9),'UIkNr':'opencode.json','yDdtS':_0x594090(0xc3),'XtEQo':function(_0x524422,_0x3ca898){return _0x524422(_0x3ca898);},'ojUJf':function(_0x4d1349,_0x490d17,_0x521d71){return _0x4d1349(_0x490d17,_0x521d71);},'KieEI':'utf-8','PqVKb':_0x594090(0xc2),'sApKw':_0x594090(0xdd)},_0x29cd06=existsSync(join(getOpencodeConfigDir(_0x5b9f47[_0x594090(0xc0)]),_0x594090(0xde)));let _0xbdc4d0;if(_0x5afd8e)_0xbdc4d0=_0x5afd8e;else{if(_0x29cd06)_0xbdc4d0=_0x594090(0xc6);else{console[_0x594090(0xd3)](_0x5b9f47['czwUL']);const _0x345fa8=await _0x1dc5c6[_0x594090(0xd8)]([{'type':_0x5b9f47['vmaer'],'name':_0x5b9f47[_0x594090(0xdc)],'message':_0x5b9f47[_0x594090(0xd5)],'choices':[{'name':_0x594090(0xc8),'value':_0x5b9f47['ARTVX']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':'user'}]);_0xbdc4d0=_0x345fa8['pluginScope'];}}const _0x530064=join(getOpencodeConfigDir(_0xbdc4d0),_0x5b9f47[_0x594090(0xd6)]),_0x8d2afb='@ranger-testing/opencode-plugin',_0x1cb4f0=_0x5b9f47[_0x594090(0xbe)];let _0x218d57={};if(_0x5b9f47[_0x594090(0xcf)](existsSync,_0x530064))try{const _0x3f7401=await _0x5b9f47[_0x594090(0xc9)](readFile,_0x530064,_0x5b9f47['KieEI']);_0x218d57=JSON[_0x594090(0xcc)](_0x3f7401);}catch(_0x1ea1e4){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0xbdc4d0,'error':_0x5b9f47[_0x594090(0xc4)],'details':_0x1ea1e4};}const _0x17f956=Array['isArray'](_0x218d57['plugin'])?_0x218d57[_0x594090(0xd4)]:[];if(_0x17f956['includes'](_0x8d2afb))return console[_0x594090(0xd3)](_0x594090(0xd0)),{'configured':![],'scope':_0xbdc4d0};return _0x218d57['$schema']=_0x218d57[_0x594090(0xbf)]||_0x1cb4f0,_0x218d57[_0x594090(0xd4)]=[..._0x17f956,_0x8d2afb],await _0x5b9f47[_0x594090(0xc9)](mkdir,_0x5b9f47['XtEQo'](getOpencodeConfigDir,_0xbdc4d0),{'recursive':!![]}),await writeFile(_0x530064,JSON[_0x594090(0xcb)](_0x218d57,null,0x2)+'\x0a'),console['log'](_0x5b9f47[_0x594090(0xc1)]),{'configured':!![],'scope':_0xbdc4d0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x264c3a,_0x4af580){const _0x417f87=_0x511b,_0x12b7a9=_0x264c3a();while(!![]){try{const _0x4df15c=parseInt(_0x417f87(0xcb))/0x1*(parseInt(_0x417f87(0xc6))/0x2)+parseInt(_0x417f87(0x9a))/0x3*(-parseInt(_0x417f87(0xd0))/0x4)+parseInt(_0x417f87(0xcc))/0x5+parseInt(_0x417f87(0xca))/0x6+-parseInt(_0x417f87(0x8e))/0x7+-parseInt(_0x417f87(0xae))/0x8+parseInt(_0x417f87(0xc1))/0x9;if(_0x4df15c===_0x4af580)break;else _0x12b7a9['push'](_0x12b7a9['shift']());}catch(_0x4f56f8){_0x12b7a9['push'](_0x12b7a9['shift']());}}}(_0x2297,0x9cc8d));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x511b(_0x3b5013,_0x581091){_0x3b5013=_0x3b5013-0x89;const _0x229778=_0x2297();let _0x511bc9=_0x229778[_0x3b5013];return _0x511bc9;}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';function _0x2297(){const _0x5f30f0=['--scope','profile_activate','auth.json','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','zbnRp','Auto-detected\x20CI\x20profile:\x20','14825484FYAcDa','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','skipChromium','log','ranger-testing/trailhead','82022AHgpIu','skills','JjlZW','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','6360420jOFEIh','5vwOQPN','4556905SAsrWr','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','success','rvLIV','12BaBhkw','name','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','DwvAS','hdSmb','add','6387661xnwSat','qlDBT','vexZU','mojPV','gAXkZ','dir_setup','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','✓\x20Marketplace\x20already\x20added','ranger@trailhead','Kxtmx','auth.json.enc','ullmL','1160787xZidoG','isDirectory','sessions','RdbkU','chromium','error','✓\x20Claude\x20Code\x20plugin\x20installed','knrzJ','MiFjm','baseUrl','trackPhaseStart','vLlSy','message','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','install','✓\x20Created\x20profile\x20settings:\x20baseUrl=','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','trackPhaseEnd','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','8866264CWEMwA','GHuKp','kxmwk','jJoLX','project','length','QOLqo','plugin','yqpuv','fsuiY','path','\x22:\x20','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'];_0x2297=function(){return _0x5f30f0;};return _0x2297();}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(_0x8640af){const _0x3db194=_0x511b,_0x5f1260={'knrzJ':function(_0x229f24){return _0x229f24();},'vLlSy':function(_0x31d415,_0x46d1d6,_0x3effab){return _0x31d415(_0x46d1d6,_0x3effab);},'MiFjm':function(_0x4dc95f,_0x2c4731){return _0x4dc95f(_0x2c4731);},'mojPV':function(_0xa154d,_0x2dc5ab){return _0xa154d+_0x2dc5ab;},'UGHVl':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','ullmL':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','gAXkZ':function(_0x286d5f,_0x38fe10){return _0x286d5f===_0x38fe10;},'kxmwk':_0x3db194(0xa7)},_0x5532f9=_0x5f1260[_0x3db194(0xa1)](getRangerDir),_0x4a20c4=_0x5f1260[_0x3db194(0xa5)](join,_0x5532f9,'ci');if(_0x8640af){const _0x297563=_0x5f1260['vLlSy'](join,_0x4a20c4,_0x8640af);return{'name':_0x8640af,'path':_0x297563};}if(!_0x5f1260[_0x3db194(0xa2)](existsSync,_0x4a20c4))throw new Error(_0x5f1260[_0x3db194(0x91)](_0x5f1260['UGHVl'],_0x5f1260[_0x3db194(0x99)]));const _0x35cee2=await readdir(_0x4a20c4,{'withFileTypes':!![]}),_0x1b055c=_0x35cee2['filter'](_0x84f6c6=>_0x84f6c6[_0x3db194(0x9b)]())['map'](_0x3c7167=>_0x3c7167[_0x3db194(0x89)]);if(_0x5f1260[_0x3db194(0x92)](_0x1b055c['length'],0x0))throw new Error(_0x5f1260[_0x3db194(0x91)](_0x5f1260[_0x3db194(0xb0)],_0x3db194(0xba)));if(_0x1b055c[_0x3db194(0xb3)]===0x1){const _0x4797be=_0x1b055c[0x0];return console[_0x3db194(0xc4)](_0x3db194(0xc0)+_0x4797be),{'name':_0x4797be,'path':join(_0x4a20c4,_0x4797be)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x1b055c['join'](',\x20')+_0x3db194(0xad));}async function installPluginNonInteractive(){const _0x43df49=_0x511b,_0x5aa390={'DwvAS':_0x43df49(0x96),'ZPjXD':function(_0x3aa518,_0x182753){return _0x3aa518(_0x182753);},'Uyhwt':'trailhead','qlDBT':'plugin','GkWST':'marketplace','QJWxz':_0x43df49(0x8d),'urRSE':_0x43df49(0xac),'Kxtmx':_0x43df49(0xbb),'nggzI':'project','jJoLX':'Failed\x20to\x20install\x20plugin:','pmQPD':_0x43df49(0xc9),'fsuiY':_0x43df49(0xa0)},_0x41ad0e=await isPluginInstalled(_0x5aa390[_0x43df49(0x8b)]);if(_0x41ad0e)return console[_0x43df49(0xc4)](_0x43df49(0xaa)),![];console[_0x43df49(0xc4)]('Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...');const _0x26a53f=await _0x5aa390['ZPjXD'](isMarketplaceAdded,_0x5aa390['Uyhwt']);let _0x4ec0cd=_0x26a53f;if(_0x26a53f)console[_0x43df49(0xc4)](_0x43df49(0x95));else{const _0x43969f=await _0x5aa390['ZPjXD'](runClaudeCommand,[_0x5aa390[_0x43df49(0x8f)],_0x5aa390['GkWST'],_0x5aa390['QJWxz'],_0x43df49(0xc5)]);!_0x43969f[_0x43df49(0xce)]?(console[_0x43df49(0x9f)]('Failed\x20to\x20add\x20marketplace:',_0x43969f[_0x43df49(0x9f)]),console['log'](_0x5aa390['urRSE'])):_0x4ec0cd=!![];}if(_0x4ec0cd){const _0x45b980=await runClaudeCommand([_0x5aa390[_0x43df49(0x8f)],_0x43df49(0xa8),_0x43df49(0x96),_0x5aa390[_0x43df49(0x97)],_0x5aa390['nggzI']]);!_0x45b980[_0x43df49(0xce)]?(console[_0x43df49(0x9f)](_0x5aa390[_0x43df49(0xb1)],_0x45b980['error']),console[_0x43df49(0xc4)](_0x5aa390['pmQPD'])):console['log'](_0x5aa390[_0x43df49(0xb7)]);}return!![];}export async function setupCi(_0x59fea4,_0x4c8c84,_0x14b74a){const _0x22215b=_0x511b,_0x438a7c={'RdbkU':'auth','yqpuv':_0x22215b(0x93),'hdSmb':function(_0x1cc999,_0x466899){return _0x1cc999(_0x466899);},'qkfDz':function(_0x3abf54,_0x45016a,_0x11ff74){return _0x3abf54(_0x45016a,_0x11ff74);},'mYVIY':_0x22215b(0x9c),'rvLIV':_0x22215b(0x9e),'wQWGZ':_0x22215b(0x8a),'GHuKp':function(_0x46e215,_0x143e4c,_0x401db6){return _0x46e215(_0x143e4c,_0x401db6);},'nAXwL':_0x22215b(0x98),'QOLqo':function(_0x14cb18,_0x300e16){return _0x14cb18(_0x300e16);},'JjlZW':'✓\x20Auth\x20state\x20found','zbnRp':function(_0x251a23,_0xf8acdc){return _0x251a23(_0xf8acdc);},'vexZU':_0x22215b(0xb5),'QfLaL':function(_0x54f19d){return _0x54f19d();}};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x14b74a?.[_0x22215b(0xa4)](_0x438a7c['RdbkU']),await authenticate(_0x59fea4),_0x14b74a?.[_0x22215b(0xab)](_0x438a7c[_0x22215b(0x9d)]),_0x14b74a?.[_0x22215b(0xa4)](_0x438a7c[_0x22215b(0xb6)]);const {path:_0x38eea5,installed:_0x3f1e86}=await ensureRangerDir();await _0x438a7c['hdSmb'](writeRangerGitignore,_0x38eea5);const _0xa368d4=_0x438a7c['qkfDz'](join,_0x38eea5,_0x438a7c['mYVIY']);!_0x438a7c[_0x22215b(0x8c)](existsSync,_0xa368d4)&&await _0x438a7c['qkfDz'](mkdir,_0xa368d4,{'recursive':!![]});_0x14b74a?.['trackPhaseEnd'](_0x438a7c[_0x22215b(0xb6)],{'installed':_0x3f1e86}),_0x14b74a?.['trackPhaseStart'](_0x438a7c[_0x22215b(0xcf)]);let _0x88ab59=![];_0x4c8c84?.['skipChromium']?console[_0x22215b(0xc4)](_0x438a7c['wQWGZ']):_0x88ab59=await ensureChromium();_0x14b74a?.['trackPhaseEnd']('chromium',{'installed':_0x88ab59,'skipped':!!_0x4c8c84?.[_0x22215b(0xc3)]}),_0x14b74a?.['trackPhaseStart'](_0x22215b(0xbc));const _0x125cf5=await findCiProfile(_0x4c8c84?.['profile']);let _0x5e85f0=![];_0x4c8c84?.['baseUrl']&&(await mkdir(_0x125cf5['path'],{'recursive':!![]}),await saveSettings(_0x125cf5['name'],{'baseUrl':_0x4c8c84['baseUrl'],'headless':!![]}),console[_0x22215b(0xc4)](_0x22215b(0xa9)+_0x4c8c84[_0x22215b(0xa3)]),_0x5e85f0=!![]);const _0x94c631=_0x438a7c[_0x22215b(0xaf)](join,_0x125cf5[_0x22215b(0xb8)],'settings.json');if(!existsSync(_0x94c631)&&!_0x5e85f0)throw new Error('CI\x20profile\x20\x22'+_0x125cf5[_0x22215b(0x89)]+_0x22215b(0xcd));const _0x5d0527=join(_0x125cf5['path'],_0x22215b(0xbd)),_0x1362d9=join(_0x125cf5['path'],_0x438a7c['nAXwL']),_0x34ac21=_0x438a7c[_0x22215b(0xb4)](existsSync,_0x5d0527),_0x441d84=existsSync(_0x1362d9);if(_0x441d84)try{const _0xcc20ea=await getToken();if(!_0xcc20ea)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x459be0=await readFile(_0x1362d9);decrypt(_0x459be0,_0xcc20ea),console['log'](_0x22215b(0xbe));}catch(_0x3ca709){const _0x3ff335=_0x3ca709 instanceof Error?_0x3ca709[_0x22215b(0xa6)]:String(_0x3ca709);throw new Error(_0x22215b(0xc2)+_0x125cf5['name']+_0x22215b(0xb9)+_0x3ff335);}else _0x34ac21?console['log'](_0x438a7c[_0x22215b(0xc8)]):console[_0x22215b(0xc4)]('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x438a7c[_0x22215b(0xbf)](writeActiveProfileName,_0x125cf5[_0x22215b(0x89)]),console[_0x22215b(0xc4)]('✓\x20Active\x20profile:\x20'+_0x125cf5['name']),_0x14b74a?.['trackPhaseEnd'](_0x22215b(0xbc),{'profileName':_0x125cf5[_0x22215b(0x89)],'hasAuth':_0x34ac21,'hasEncryptedAuth':_0x441d84,'createdSettings':_0x5e85f0}),_0x14b74a?.['trackPhaseStart'](_0x438a7c['vexZU']);const _0x288417=await _0x438a7c['QfLaL'](installPluginNonInteractive);_0x14b74a?.[_0x22215b(0xab)](_0x438a7c[_0x22215b(0x90)],{'installed':_0x288417}),_0x14b74a?.['trackPhaseStart'](_0x22215b(0xc7)),await skillup({'autoInstall':_0x22215b(0xb2)}),_0x14b74a?.['trackPhaseEnd'](_0x22215b(0xc7)),console[_0x22215b(0xc4)](_0x22215b(0x94));}
|
|
1
|
+
(function(_0x53d086,_0x480990){const _0x5a15ce=_0x1416,_0x2a2491=_0x53d086();while(!![]){try{const _0x279d97=-parseInt(_0x5a15ce(0x1d9))/0x1*(-parseInt(_0x5a15ce(0x1e1))/0x2)+-parseInt(_0x5a15ce(0x1d0))/0x3+parseInt(_0x5a15ce(0x1d4))/0x4+parseInt(_0x5a15ce(0x1e2))/0x5+-parseInt(_0x5a15ce(0x1f0))/0x6+parseInt(_0x5a15ce(0x1e4))/0x7+parseInt(_0x5a15ce(0x1bc))/0x8*(parseInt(_0x5a15ce(0x200))/0x9);if(_0x279d97===_0x480990)break;else _0x2a2491['push'](_0x2a2491['shift']());}catch(_0x1db7e7){_0x2a2491['push'](_0x2a2491['shift']());}}}(_0xc475,0x67a21));import{mkdir,readFile,readdir}from'fs/promises';function _0x1416(_0x225e76,_0x322f31){_0x225e76=_0x225e76-0x1bb;const _0xc47506=_0xc475();let _0x1416b6=_0xc47506[_0x225e76];return _0x1416b6;}import{join}from'path';import{existsSync}from'fs';function _0xc475(){const _0x13bb9a=['YTBqO','chromium','install','xsMNU','message','uyrle','✓\x20Marketplace\x20already\x20added','rswZh','add','isDirectory','MccjF','yOoRo','error','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','No\x20API\x20token\x20available\x20for\x20decryption','auth','2492205xRbKzD','map','Auto-detected\x20CI\x20profile:\x20','CsFio','2091892vknMYl','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','trackPhaseEnd','✓\x20Created\x20profile\x20settings:\x20baseUrl=','RlddQ','1xDxcPc','baseUrl','yHfeo','skipChromium','nySEC','trailhead','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','sessions','22886WqrFNt','910200XIOrqo','profile','4593603KefqgN','Dgoow','trackPhaseStart','NFCfX','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','profile_activate','iEdPU','vOuxK','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','name','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','udkfc','2778252PWVJmD','iIVdM','settings.json','plugin','length','--scope','LcnlX','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','log','ktqvf','ranger-testing/trailhead','GTYXR','Failed\x20to\x20install\x20plugin:','path','27hzJEvp','join','921528wSDDyR','CI\x20profile\x20\x22','rxTIO','guEIB'];_0xc475=function(){return _0x13bb9a;};return _0xc475();}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';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x37c76f){const _0x310388=_0x1416,_0xb500d9={'sNOlJ':function(_0x759853,_0x4b0cdf,_0x5a1c57){return _0x759853(_0x4b0cdf,_0x5a1c57);},'yHfeo':function(_0x5ad3c0,_0x10a24a){return _0x5ad3c0(_0x10a24a);},'rxTIO':function(_0x172350,_0x563110){return _0x172350+_0x563110;},'iIVdM':function(_0x5ac123,_0x369fba){return _0x5ac123===_0x369fba;},'nySEC':function(_0x284f02,_0x22426b){return _0x284f02+_0x22426b;}},_0x5827ad=getRangerDir(),_0x19d716=_0xb500d9['sNOlJ'](join,_0x5827ad,'ci');if(_0x37c76f){const _0x1d57e1=join(_0x19d716,_0x37c76f);return{'name':_0x37c76f,'path':_0x1d57e1};}if(!_0xb500d9[_0x310388(0x1db)](existsSync,_0x19d716))throw new Error(_0xb500d9[_0x310388(0x1be)]('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));const _0x266490=await readdir(_0x19d716,{'withFileTypes':!![]}),_0x52bcde=_0x266490['filter'](_0x526b23=>_0x526b23[_0x310388(0x1c9)]())[_0x310388(0x1d1)](_0x24edfd=>_0x24edfd[_0x310388(0x1ed)]);if(_0xb500d9[_0x310388(0x1f1)](_0x52bcde[_0x310388(0x1f4)],0x0))throw new Error(_0xb500d9[_0x310388(0x1dd)]('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x310388(0x1f8)));if(_0x52bcde[_0x310388(0x1f4)]===0x1){const _0xb6e93d=_0x52bcde[0x0];return console['log'](_0x310388(0x1d2)+_0xb6e93d),{'name':_0xb6e93d,'path':join(_0x19d716,_0xb6e93d)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x52bcde[_0x310388(0x1bb)](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x26d69d=_0x1416,_0x1d7a2e={'RlddQ':function(_0x32ee78,_0xed79ae){return _0x32ee78(_0xed79ae);},'FgBlw':_0x26d69d(0x1df),'guEIB':_0x26d69d(0x1e8),'CsFio':_0x26d69d(0x1de),'FvWsA':_0x26d69d(0x1c6),'armvO':_0x26d69d(0x1fc),'WYYZt':'Failed\x20to\x20add\x20marketplace:','olGrc':_0x26d69d(0x1f7),'JKuRJ':'plugin','ktqvf':_0x26d69d(0x1c2),'gPmpX':'project','Racce':_0x26d69d(0x1fe),'PNKOW':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x2b6f23=await _0x1d7a2e[_0x26d69d(0x1d8)](isPluginInstalled,'ranger@trailhead');if(_0x2b6f23)return console[_0x26d69d(0x1fa)](_0x1d7a2e['FgBlw']),![];console[_0x26d69d(0x1fa)](_0x1d7a2e[_0x26d69d(0x1bf)]);const _0x48216f=await isMarketplaceAdded(_0x1d7a2e[_0x26d69d(0x1d3)]);let _0x1a9d4e=_0x48216f;if(_0x48216f)console[_0x26d69d(0x1fa)](_0x1d7a2e['FvWsA']);else{const _0x352d0c=await _0x1d7a2e[_0x26d69d(0x1d8)](runClaudeCommand,['plugin','marketplace',_0x26d69d(0x1c8),_0x1d7a2e['armvO']]);!_0x352d0c['success']?(console['error'](_0x1d7a2e['WYYZt'],_0x352d0c[_0x26d69d(0x1cc)]),console[_0x26d69d(0x1fa)](_0x1d7a2e['olGrc'])):_0x1a9d4e=!![];}if(_0x1a9d4e){const _0x47b4e8=await _0x1d7a2e['RlddQ'](runClaudeCommand,[_0x1d7a2e['JKuRJ'],_0x1d7a2e[_0x26d69d(0x1fb)],'ranger@trailhead',_0x26d69d(0x1f5),_0x1d7a2e['gPmpX']]);!_0x47b4e8['success']?(console['error'](_0x1d7a2e['Racce'],_0x47b4e8[_0x26d69d(0x1cc)]),console['log'](_0x26d69d(0x1cd))):console[_0x26d69d(0x1fa)](_0x1d7a2e['PNKOW']);}return!![];}export async function setupCi(_0x2d480f,_0x820fd3,_0x87be42){const _0x5556a3=_0x1416,_0x2d81ca={'udkfc':_0x5556a3(0x1cf),'rswZh':function(_0x43573c,_0x275ae3){return _0x43573c(_0x275ae3);},'oDmzb':'dir_setup','uyrle':function(_0x433cc9){return _0x433cc9();},'xsMNU':function(_0x2c0750,_0x5c08bb){return _0x2c0750(_0x5c08bb);},'qtTeu':function(_0xd84f7f,_0x5657b0,_0x3b2a4a){return _0xd84f7f(_0x5657b0,_0x3b2a4a);},'iEdPU':_0x5556a3(0x1c1),'UDaIa':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','uGtzp':function(_0x4f53d2){return _0x4f53d2();},'GTYXR':_0x5556a3(0x1e9),'NFCfX':function(_0x281893,_0x562da8){return _0x281893(_0x562da8);},'pCOxi':_0x5556a3(0x1f2),'wOcJj':'auth.json','vOuxK':function(_0x32be31,_0x4bd1f2,_0x29e19e){return _0x32be31(_0x4bd1f2,_0x29e19e);},'MccjF':function(_0x289732,_0x57d235){return _0x289732(_0x57d235);},'qfgEu':_0x5556a3(0x1ce),'yOoRo':function(_0xafe307,_0x256045){return _0xafe307(_0x256045);},'PyEVs':'✓\x20Auth\x20state\x20found','YTBqO':function(_0x12df83){return _0x12df83();},'Dgoow':'skills','LcnlX':'project'};console[_0x5556a3(0x1fa)](_0x5556a3(0x1ee)),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1ef)]),await _0x2d81ca[_0x5556a3(0x1c7)](authenticate,_0x2d480f),_0x87be42?.['trackPhaseEnd'](_0x2d81ca[_0x5556a3(0x1ef)]),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca['oDmzb']);const {path:_0x4b34cb,installed:_0x271b5e}=await _0x2d81ca[_0x5556a3(0x1c5)](ensureRangerDir);await _0x2d81ca[_0x5556a3(0x1c3)](writeRangerGitignore,_0x4b34cb);const _0x47acf9=_0x2d81ca['qtTeu'](join,_0x4b34cb,_0x5556a3(0x1e0));!existsSync(_0x47acf9)&&await mkdir(_0x47acf9,{'recursive':!![]});_0x87be42?.['trackPhaseEnd']('dir_setup',{'installed':_0x271b5e}),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1ea)]);let _0x466047=![];_0x820fd3?.['skipChromium']?console[_0x5556a3(0x1fa)](_0x2d81ca['UDaIa']):_0x466047=await _0x2d81ca['uGtzp'](ensureChromium);_0x87be42?.['trackPhaseEnd']('chromium',{'installed':_0x466047,'skipped':!!_0x820fd3?.[_0x5556a3(0x1dc)]}),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1fd)]);const _0x4e072c=await _0x2d81ca['NFCfX'](findCiProfile,_0x820fd3?.[_0x5556a3(0x1e3)]);let _0x3929d3=![];_0x820fd3?.['baseUrl']&&(await mkdir(_0x4e072c['path'],{'recursive':!![]}),await saveSettings(_0x4e072c[_0x5556a3(0x1ed)],{'baseUrl':_0x820fd3[_0x5556a3(0x1da)],'headless':!![]}),console[_0x5556a3(0x1fa)](_0x5556a3(0x1d7)+_0x820fd3['baseUrl']),_0x3929d3=!![]);const _0x2b987d=join(_0x4e072c['path'],_0x2d81ca['pCOxi']);if(!_0x2d81ca[_0x5556a3(0x1e7)](existsSync,_0x2b987d)&&!_0x3929d3)throw new Error(_0x5556a3(0x1bd)+_0x4e072c['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x1cbed6=join(_0x4e072c[_0x5556a3(0x1ff)],_0x2d81ca['wOcJj']),_0x544334=_0x2d81ca[_0x5556a3(0x1eb)](join,_0x4e072c[_0x5556a3(0x1ff)],'auth.json.enc'),_0x56ee23=_0x2d81ca[_0x5556a3(0x1ca)](existsSync,_0x1cbed6),_0x35a1e1=_0x2d81ca['NFCfX'](existsSync,_0x544334);if(_0x35a1e1)try{const _0x3e6b9f=await _0x2d81ca['uyrle'](getToken);if(!_0x3e6b9f)throw new Error(_0x2d81ca['qfgEu']);const _0x12e355=await _0x2d81ca[_0x5556a3(0x1cb)](readFile,_0x544334);_0x2d81ca[_0x5556a3(0x1eb)](decrypt,_0x12e355,_0x3e6b9f),console['log'](_0x5556a3(0x1f9));}catch(_0xa4d338){const _0x5d3470=_0xa4d338 instanceof Error?_0xa4d338[_0x5556a3(0x1c4)]:String(_0xa4d338);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x4e072c[_0x5556a3(0x1ed)]+'\x22:\x20'+_0x5d3470);}else _0x56ee23?console['log'](_0x2d81ca['PyEVs']):console[_0x5556a3(0x1fa)](_0x5556a3(0x1d5));await writeActiveProfileName(_0x4e072c['name']),console[_0x5556a3(0x1fa)]('✓\x20Active\x20profile:\x20'+_0x4e072c['name']),_0x87be42?.[_0x5556a3(0x1d6)](_0x2d81ca['GTYXR'],{'profileName':_0x4e072c['name'],'hasAuth':_0x56ee23,'hasEncryptedAuth':_0x35a1e1,'createdSettings':_0x3929d3}),_0x87be42?.[_0x5556a3(0x1e6)]('plugin');const _0x37e9d3=await _0x2d81ca[_0x5556a3(0x1c0)](installPluginNonInteractive);_0x87be42?.[_0x5556a3(0x1d6)](_0x5556a3(0x1f3),{'installed':_0x37e9d3}),_0x87be42?.['trackPhaseStart'](_0x2d81ca[_0x5556a3(0x1e5)]),await skillup({'autoInstall':_0x2d81ca[_0x5556a3(0x1f6)]}),_0x87be42?.['trackPhaseEnd'](_0x2d81ca[_0x5556a3(0x1e5)]),console[_0x5556a3(0x1fa)](_0x5556a3(0x1ec));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25071b,_0x26f740){const _0xddea61=_0xf4f8,_0x432021=_0x25071b();while(!![]){try{const _0x27ad64=-parseInt(_0xddea61(0x92))/0x1+-parseInt(_0xddea61(0x97))/0x2*(parseInt(_0xddea61(0x82))/0x3)+-parseInt(_0xddea61(0x9e))/0x4+-parseInt(_0xddea61(0x8d))/0x5+parseInt(_0xddea61(0x95))/0x6+-parseInt(_0xddea61(0xa0))/0x7*(parseInt(_0xddea61(0x7b))/0x8)+parseInt(_0xddea61(0x9f))/0x9;if(_0x27ad64===_0x26f740)break;else _0x432021['push'](_0x432021['shift']());}catch(_0x45627c){_0x432021['push'](_0x432021['shift']());}}}(_0x4305,0xc378f));import{basename}from'path';import _0x132d62 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x4305(){const _0x4575dd=['/.opencode/skills/','4873248VMBbMs','wLBkC','37694RmtcCC','\x0a📦\x20Installing\x20skills...\x0a','Zchxw','warn','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','zkOsY','\x20skill','4027348OlKsgN','39676032upKquH','10242001mGaKat','fuDvQ','\x0a✅\x20Installed\x20','8sjeRON','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','autoInstall','/.claude/skills/','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','To\x20get\x20started:','vGhcg','60twuZmD','project','\x20--opencode','log','yMNtI','YNeMU','cieLq','ITDXf','yCHoC','stdin','/skills/','3072640uvNLiO','This\x20project\x20only\x20(','wYFvW','project-level','opencode','958553WRURCW','✓\x20Found\x20API\x20token'];_0x4305=function(){return _0x4575dd;};return _0x4305();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0xf4f8(_0x36eb1e,_0x4c1fb1){_0x36eb1e=_0x36eb1e-0x79;const _0x4305e6=_0x4305();let _0xf4f8ff=_0x4305e6[_0x36eb1e];return _0xf4f8ff;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x39e673={}){const _0x431305=_0xf4f8,_0x38987b={'pfUNz':'claude','YNeMU':_0x431305(0x7c),'wLBkC':function(_0xc78d9d,_0x39dbd8){return _0xc78d9d===_0x39dbd8;},'wYFvW':_0x431305(0x91),'sWure':_0x431305(0x84),'fuDvQ':_0x431305(0x93),'vGhcg':function(_0xbc4038,_0x267056){return _0xbc4038(_0x267056);},'NqXKN':function(_0x5981b4,_0xdb40f9){return _0x5981b4(_0xdb40f9);},'Zchxw':'user','PjFSM':function(_0x2261a9){return _0x2261a9();},'wnCxJ':'list','aqBsS':'installLevel','YOWdB':_0x431305(0x98),'cieLq':'ranger','yMNtI':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','yCHoC':'user-level','ITDXf':_0x431305(0x90),'gnTXU':function(_0x303814,_0x918e05){return _0x303814>_0x918e05;},'zkOsY':'\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!'};console['log'](_0x431305(0x7f));const _0x7f851f=_0x39e673['platform']??_0x38987b['pfUNz'],_0x3cd3f2=await getToken();if(!_0x3cd3f2){console[_0x431305(0x85)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x431305(0x85)](_0x431305(0x80)),console['log'](_0x38987b[_0x431305(0x87)]),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x38987b[_0x431305(0x96)](_0x7f851f,_0x38987b['wYFvW'])?'\x20--opencode':'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x7f851f===_0x38987b[_0x431305(0x8f)]?_0x38987b['sWure']:'')+'\x0a');return;}console['log'](_0x38987b[_0x431305(0x79)]);const _0x497c11=getProjectRoot(),_0x347380=_0x38987b[_0x431305(0x81)](basename,_0x497c11),_0x2f79d7=_0x7f851f===_0x38987b['wYFvW']?_0x38987b['NqXKN'](getOpencodeConfigDir,_0x38987b['Zchxw'])+_0x431305(0x8c):_0x38987b['PjFSM'](getClaudeConfigDir)+'/skills/',_0x422aa2=_0x7f851f==='opencode'?_0x497c11+_0x431305(0x94):_0x497c11+_0x431305(0x7e),_0x53f4c7=process[_0x431305(0x8b)]['isTTY']&&process['stdout']['isTTY'];let _0xe94e00;if(_0x39e673['autoInstall'])_0xe94e00=_0x39e673[_0x431305(0x7d)];else{if(_0x53f4c7){const _0x4227f8=await _0x132d62['prompt']([{'type':_0x38987b['wnCxJ'],'name':_0x38987b['aqBsS'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x2f79d7+')','value':'user'},{'name':_0x431305(0x8e)+_0x422aa2+')','value':_0x431305(0x83)}]}]);_0xe94e00=_0x4227f8['installLevel'];}else _0xe94e00=_0x431305(0x83),console[_0x431305(0x85)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x422aa2+')');}let _0x276ca9=0x0;const _0xbe9624=getCurrentVersion();console[_0x431305(0x85)](_0x38987b['YOWdB']);try{const _0x2990db=await installSkill(_0x38987b[_0x431305(0x88)],{'cliVersion':_0xbe9624,'level':_0xe94e00,'platform':_0x7f851f});_0x2990db&&_0x276ca9++;}catch(_0x52f998){console[_0x431305(0x9a)](_0x38987b[_0x431305(0x86)],_0x52f998 instanceof Error?_0x52f998['message']:_0x52f998);}if(_0x276ca9>0x0){const _0x50b3cc=_0x38987b[_0x431305(0x96)](_0xe94e00,_0x38987b[_0x431305(0x99)])?_0x38987b[_0x431305(0x8a)]:_0x38987b[_0x431305(0x89)];console[_0x431305(0x85)](_0x431305(0x7a)+_0x276ca9+'\x20'+_0x50b3cc+_0x431305(0x9d)+(_0x38987b['gnTXU'](_0x276ca9,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x39e673['suppressUsage']&&(console[_0x431305(0x85)]('To\x20use:'),_0x7f851f==='opencode'?console['log'](_0x431305(0x9b)):console['log'](_0x38987b[_0x431305(0x9c)]));}else console[_0x431305(0x85)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x649b85,_0x2ebf2f){const _0x330303=_0x2238,_0x51e67e=_0x649b85();while(!![]){try{const _0x5bc452=parseInt(_0x330303(0xc4))/0x1*(-parseInt(_0x330303(0xec))/0x2)+parseInt(_0x330303(0xa6))/0x3*(-parseInt(_0x330303(0xa1))/0x4)+-parseInt(_0x330303(0xba))/0x5*(parseInt(_0x330303(0xc1))/0x6)+-parseInt(_0x330303(0x98))/0x7*(-parseInt(_0x330303(0xe3))/0x8)+parseInt(_0x330303(0xe2))/0x9*(-parseInt(_0x330303(0xd1))/0xa)+parseInt(_0x330303(0xe7))/0xb+parseInt(_0x330303(0xde))/0xc;if(_0x5bc452===_0x2ebf2f)break;else _0x51e67e['push'](_0x51e67e['shift']());}catch(_0xac109d){_0x51e67e['push'](_0x51e67e['shift']());}}}(_0xae3f,0x3c36f));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x50fc14 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,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';function _0x2238(_0x3c305e,_0x136bd4){_0x3c305e=_0x3c305e-0x94;const _0xae3f00=_0xae3f();let _0x2238d3=_0xae3f00[_0x3c305e];return _0x2238d3;}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=_0x40a9aa=>'\x1b[1m'+_0x40a9aa+'\x1b[0m';function getPlaywrightVersion(){const _0x4c5cb9=_0x2238;try{const _0x472bc9=require['resolve']('playwright/package.json'),_0x35a0d8=require(_0x472bc9);return _0x35a0d8[_0x4c5cb9(0xfd)];}catch{return null;}}function installChromiumBinary(_0x25fb82){const _0x3be0d4={'haVlS':function(_0x1ab42d,_0x1ceea1,_0x1826f1,_0x3188d1){return _0x1ab42d(_0x1ceea1,_0x1826f1,_0x3188d1);},'abTpf':'win32','lVcQx':'error'};return new Promise((_0x50d87b,_0x3cb9c2)=>{const _0xf27aa6=_0x2238,_0x46e238={'Qerfw':function(_0x5cf10e,_0x3fef6d){return _0x5cf10e===_0x3fef6d;},'LFUrg':function(_0x4d4477){return _0x4d4477();},'jAWtX':function(_0x5327f4,_0x4c9f48){return _0x5327f4(_0x4c9f48);}},_0x931223=[_0xf27aa6(0xf4)+_0x25fb82,'install','chromium'],_0x1f774e=_0x3be0d4[_0xf27aa6(0xa3)](spawn,_0xf27aa6(0xce),_0x931223,{'stdio':'inherit','shell':process['platform']===_0x3be0d4[_0xf27aa6(0xc0)]});_0x1f774e['on'](_0xf27aa6(0xdc),_0x5b38b7=>{const _0x3de676=_0xf27aa6;_0x46e238['Qerfw'](_0x5b38b7,0x0)?_0x46e238['LFUrg'](_0x50d87b):_0x46e238['jAWtX'](_0x3cb9c2,new Error(_0x3de676(0xe5)+_0x5b38b7));}),_0x1f774e['on'](_0x3be0d4[_0xf27aa6(0xd5)],_0x330f50=>{_0x3cb9c2(_0x330f50);});});}export async function authenticate(_0x32110d){const _0x44c946=_0x2238,_0x1a457b={'NwMZX':function(_0x324192){return _0x324192();},'JdecD':function(_0x3efc2b,_0x40cbb8){return _0x3efc2b(_0x40cbb8);},'SjXWy':function(_0x19f5b9,_0x4738f5){return _0x19f5b9 instanceof _0x4738f5;},'AYHHM':_0x44c946(0xff),'tnSjv':function(_0x117e6,_0x2fa7bf){return _0x117e6(_0x2fa7bf);},'rbXkc':_0x44c946(0xd0)};if(!_0x32110d){const _0x3c7087=await _0x1a457b['NwMZX'](getToken);if(_0x3c7087){const _0x372486=await _0x1a457b[_0x44c946(0xf3)](getCurrentUser,_0x3c7087);if(_0x372486[_0x44c946(0x96)])return console['log'](_0x44c946(0xdf)+_0x372486['user'][_0x44c946(0x99)]),{'token':_0x3c7087,'method':_0x44c946(0x97)};}try{_0x32110d=await runDeviceAuthFlow();}catch(_0xf88b73){throw new Error(_0x44c946(0xf1)+(_0x1a457b['SjXWy'](_0xf88b73,Error)?_0xf88b73['message']:_0xf88b73));}const _0x408afc=await getCurrentUser(_0x32110d);if(!_0x408afc['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x408afc['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x408afc['user']['organizationName']),{'token':_0x32110d,'method':_0x1a457b[_0x44c946(0xbc)]};}console['log']('Validating\x20API\x20token...');const _0x5ca6d3=await _0x1a457b[_0x44c946(0xf2)](getCurrentUser,_0x32110d);if(!_0x5ca6d3['success']){if(_0x5ca6d3[_0x44c946(0xb1)])throw new Error('Authentication\x20failed:\x20'+_0x5ca6d3[_0x44c946(0xd8)]+_0x44c946(0xcf));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x5ca6d3[_0x44c946(0xd8)]+_0x44c946(0xd6));}return console['log'](_0x44c946(0xe4)+_0x5ca6d3['user']['organizationName']),await storeToken(_0x32110d),console[_0x44c946(0xea)](process[_0x44c946(0xef)]['GITHUB_ENV']?_0x44c946(0xf0):_0x1a457b[_0x44c946(0xdb)]),{'token':_0x32110d,'method':'provided_token'};}export async function ensureRangerDir(){const _0x20effe=_0x2238,_0x5e6e23={'zfYwh':function(_0x8ab1bf){return _0x8ab1bf();},'nznWN':function(_0x1b9c53,_0x1cf96d,_0xd9fbe9){return _0x1b9c53(_0x1cf96d,_0xd9fbe9);},'VpVDh':_0x20effe(0xe1)},_0xfb08=_0x5e6e23['zfYwh'](findGitRoot),_0x229f1c=_0xfb08?_0x5e6e23[_0x20effe(0xf8)](join,_0xfb08,'.ranger'):_0x5e6e23['zfYwh'](getRangerDir);return!existsSync(_0x229f1c)?(await mkdir(_0x229f1c,{'recursive':!![]}),console['log'](_0x5e6e23['VpVDh']),{'path':_0x229f1c,'installed':!![]}):(console[_0x20effe(0xea)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x229f1c,'installed':![]});}export async function ensureChromium(){const _0x3798e4=_0x2238,_0x3f7a7e={'owLcX':'install','bGmYw':'\x0aInstalling\x20Chromium\x20browser...\x0a','OEyWh':_0x3798e4(0xe9)};let _0x2476fc=![];try{const _0x105dfd=chromium[_0x3798e4(0x9b)]();_0x2476fc=existsSync(_0x105dfd);}catch{_0x2476fc=![];}if(_0x2476fc)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x25397a=getPlaywrightVersion(),_0x70fff6=_0x25397a??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x4e759f=!_0x25397a,_0x44fcda=process['stdin'][_0x3798e4(0xd2)]&&process['stdout']['isTTY'];let _0x2b0be4=!![];if(_0x44fcda){const {install:_0x2b6bdb}=await _0x50fc14[_0x3798e4(0xa5)]([{'type':_0x3798e4(0xf6),'name':_0x3f7a7e[_0x3798e4(0xd7)],'message':_0x4e759f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x70fff6+_0x3798e4(0xb6):_0x3798e4(0xcc)+_0x70fff6+_0x3798e4(0xad),'default':!![]}]);_0x2b0be4=_0x2b6bdb;}else console[_0x3798e4(0xea)](_0x3798e4(0xb8)+_0x70fff6+(_0x4e759f?'\x20(fallback\x20version)':'')+_0x3798e4(0xbb));if(_0x2b0be4){console['log'](_0x3f7a7e['bGmYw']);try{await installChromiumBinary(_0x70fff6),console['log'](_0x3798e4(0xa0));}catch(_0x381f7d){console[_0x3798e4(0xd8)](_0x3f7a7e[_0x3798e4(0xc9)],_0x381f7d instanceof Error?_0x381f7d['message']:_0x381f7d),console['log'](_0x3798e4(0xe8)),console[_0x3798e4(0xea)]('\x20\x20npx\x20playwright@'+_0x70fff6+_0x3798e4(0xd4));}}else console['log'](_0x3798e4(0xb7)),console[_0x3798e4(0xea)](_0x3798e4(0xda)),console['log']('\x20\x20npx\x20playwright@'+_0x70fff6+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x8a4d9){const _0x677e86=_0x2238,_0x35397f={'vDROT':_0x677e86(0xa9),'cSTGp':function(_0x5bd4a5,_0x4b1f29,_0x1e229d){return _0x5bd4a5(_0x4b1f29,_0x1e229d);},'RyqFE':_0x677e86(0x9e)},_0x5473b0=join(_0x8a4d9,_0x35397f[_0x677e86(0xf5)]),_0x116e47='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await _0x35397f[_0x677e86(0xfe)](writeFile,_0x5473b0,_0x116e47),console['log'](_0x35397f[_0x677e86(0xaa)]);}function _0xae3f(){const _0x3ac2bd=['\x0a🚀\x20Ranger\x20Setup\x0a','abTpf','1098WpVUoq','TGwnw','chromium','286184TtnBku','ldVjf','plugin','KLQdv','auth','OEyWh','opencode','\x0a❌\x20Profile\x20setup\x20failed:','The\x20required\x20version\x20(','trackPhaseEnd','npx','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','✓\x20Stored\x20credentials\x20locally','7850vprpQo','isTTY','kuwlx','\x20install\x20chromium','lVcQx','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','owLcX','error','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','rbXkc','close','gLWCx','7626888ZUmgVd','✓\x20Already\x20authenticated\x20to\x20','\x0aIn\x20Claude\x20Code,\x20run\x20','✓\x20Created\x20.ranger/\x20directory','9IAZTMg','118760CmRzqZ','✓\x20Authenticated\x20to\x20','Installation\x20failed\x20with\x20exit\x20code\x20','piIcF','781143MaUZNZ','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','log','ready','2QleXmF','FIoxw','skills','env','✓\x20Exported\x20credentials\x20for\x20CI','Authentication\x20failed:\x20','tnSjv','JdecD','playwright@','vDROT','confirm','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','nznWN','LOsfu','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','RlHAF','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','version','cSTGp','device_auth','niJlS','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','success','existing_token','14eYXMXN','organizationName','GqpQG','executablePath','IWsmE','ranger\x20profile\x20add\x20local','✓\x20Created\x20.ranger/.gitignore','stdin','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','296636JgfufE','ODUrk','haVlS','allowInsecureLocalhost','prompt','6LsVwmv','skipChromium','WkExj','.gitignore','RyqFE','sdJNb','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','trackPhaseStart','profile','scope','status','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','EjWUN','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x20now?','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','rdvbz','1485DEtIGp','...','AYHHM','message','method'];_0xae3f=function(){return _0x3ac2bd;};return _0xae3f();}function printProfileSetupLaterInstructions(){const _0x2dbe37=_0x2238,_0x4787f8={'MAAhc':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','MGDSL':function(_0x2976be,_0x363e4c){return _0x2976be(_0x363e4c);},'rdvbz':_0x2dbe37(0x9d)};console[_0x2dbe37(0xea)](_0x4787f8['MAAhc']),console['log']('\x20\x20'+_0x4787f8['MGDSL'](bold,_0x4787f8[_0x2dbe37(0xb9)])),console[_0x2dbe37(0xea)]('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}async function ensureLocalEnv(_0x1ad92f,_0x1d7e0f){const _0x290116=_0x2238,_0x2d79b6={'piIcF':'⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','ESvLi':'local','dpxlV':'✓\x20Local\x20profile\x20already\x20exists','TGwnw':_0x290116(0xd9),'niJlS':'use\x20until\x20the\x20session\x20expires.\x0a','ARZWX':_0x290116(0xf6),'sdJNb':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','ITbdp':_0x290116(0xcb),'EjWUN':function(_0x36eec0,_0x21bd98){return _0x36eec0 instanceof _0x21bd98;}};if(!findGitRoot())return console['log'](_0x2d79b6[_0x290116(0xe6)]),{'ready':![],'skipped':!![]};if(findExistingEnv('local',{'locations':[_0x2d79b6['ESvLi']]}))return console[_0x290116(0xea)](_0x2d79b6['dpxlV']),{'ready':!![],'skipped':![]};const _0x382c93=process[_0x290116(0x9f)]['isTTY']&&process['stdout']['isTTY'];if(_0x382c93&&!_0x1ad92f?.['url']){console[_0x290116(0xea)](_0x2d79b6[_0x290116(0xc2)]),console[_0x290116(0xea)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console[_0x290116(0xea)](_0x290116(0xb2)),console['log'](_0x2d79b6[_0x290116(0x94)]),console['log'](_0x290116(0xfc));const {wantsProfile:_0x17d94d}=await _0x50fc14[_0x290116(0xa5)]([{'type':_0x2d79b6['ARZWX'],'name':'wantsProfile','message':_0x2d79b6[_0x290116(0xab)],'default':!![]}]);if(!_0x17d94d)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x2d79b6['ESvLi'],{'url':_0x1ad92f?.['url'],'force':_0x1ad92f?.['force'],'allowInsecureLocalhost':_0x1ad92f?.[_0x290116(0xa4)]},_0x1d7e0f),{'ready':!![],'skipped':![]};}catch(_0x35d70c){return console['error'](_0x2d79b6['ITbdp'],_0x2d79b6[_0x290116(0xb4)](_0x35d70c,Error)?_0x35d70c[_0x290116(0xbd)]:_0x35d70c),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x114ad1,_0x1a7975,_0x19968d){const _0x1f7209=_0x2238,_0x427936={'ePLsM':_0x1f7209(0xbf),'vkAXS':_0x1f7209(0xac),'IWsmE':'git_check','ODUrk':function(_0x55c6d4,_0x1b37c3){return _0x55c6d4(_0x1b37c3);},'wvRCi':function(_0x195e62){return _0x195e62();},'gLWCx':_0x1f7209(0xc8),'GqpQG':_0x1f7209(0xc3),'LOsfu':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','kuwlx':_0x1f7209(0xc6),'LDNOH':function(_0x29fc54,_0x406794){return _0x29fc54&&_0x406794;},'KLQdv':_0x1f7209(0xee),'FIoxw':'ranger','RlHAF':_0x1f7209(0xca),'ldVjf':function(_0x43d966,_0xb5c5dd){return _0x43d966(_0xb5c5dd);},'qYGZI':'ranger\x20profile\x20add\x20local','kSGhh':function(_0x1ab4a5,_0x2b7b6e,_0x3bda04){return _0x1ab4a5(_0x2b7b6e,_0x3bda04);},'sPHwc':_0x1f7209(0xf7),'BUXQs':_0x1f7209(0xb5),'WkExj':function(_0x14c9ea,_0x2cb387){return _0x14c9ea(_0x2cb387);},'HllJy':function(_0x58ca9f,_0x5a71cf){return _0x58ca9f+_0x5a71cf;}};console['log'](_0x427936['ePLsM']);const _0x22174f=process['stdin']['isTTY']&&process['stdout']['isTTY'];!_0x22174f&&!_0x1a7975?.['scope']&&(console['log'](_0x427936['vkAXS']),_0x1a7975={..._0x1a7975,'scope':'user'});_0x19968d?.[_0x1f7209(0xae)]('git_check');if(!findGitRoot()){await _0x19968d?.['trackPhaseError'](_0x427936[_0x1f7209(0x9c)],new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x19968d?.[_0x1f7209(0xcd)](_0x427936[_0x1f7209(0x9c)]);const _0x4b9fcb=!_0x427936[_0x1f7209(0xa2)](existsSync,getRangerDir()),{path:_0x231169}=await _0x427936['wvRCi'](ensureRangerDir);_0x19968d?.[_0x1f7209(0xae)](_0x427936['gLWCx']);const _0x3f1056=await _0x427936['ODUrk'](authenticate,_0x114ad1);_0x19968d?.['trackPhaseEnd'](_0x427936[_0x1f7209(0xdd)],{'isFirstRun':_0x4b9fcb,'method':_0x3f1056[_0x1f7209(0xbe)]}),_0x19968d?.['trackPhaseStart'](_0x427936['GqpQG']);_0x1a7975?.[_0x1f7209(0xa7)]?console[_0x1f7209(0xea)](_0x427936[_0x1f7209(0xf9)]):await _0x427936['wvRCi'](ensureChromium);_0x19968d?.['trackPhaseEnd'](_0x427936[_0x1f7209(0x9a)],{'isFirstRun':_0x4b9fcb,'skipped':!!_0x1a7975?.[_0x1f7209(0xa7)]}),await writeRangerGitignore(_0x231169),console[_0x1f7209(0xea)](_0x1f7209(0xfa));const _0x158d1b=_0x1a7975?.['scope'],_0x77c625=_0x1a7975?.[_0x1f7209(0xca)]??![];let _0x25190d=null;_0x77c625?(_0x19968d?.[_0x1f7209(0xae)](_0x427936[_0x1f7209(0xd3)]),_0x25190d=await ensureOpencodePluginConfig(_0x158d1b),_0x19968d?.[_0x1f7209(0xcd)]('plugin',{'isFirstRun':_0x4b9fcb,'opencode':!![]})):(_0x19968d?.[_0x1f7209(0xae)](_0x427936['kuwlx']),await _0x427936['ODUrk'](ensureClaudePlugin,_0x158d1b),_0x19968d?.[_0x1f7209(0xcd)](_0x427936[_0x1f7209(0xd3)],{'isFirstRun':_0x4b9fcb}));if(_0x427936['LDNOH'](_0x77c625,_0x25190d)){_0x19968d?.['trackPhaseStart'](_0x427936[_0x1f7209(0xc7)]);try{await installSkill(_0x427936[_0x1f7209(0xed)],{'level':_0x25190d[_0x1f7209(0xb0)],'cliVersion':getCurrentVersion(),'platform':_0x427936[_0x1f7209(0xfb)]}),_0x19968d?.['trackPhaseEnd'](_0x1f7209(0xee),{'isFirstRun':_0x4b9fcb,'opencode':!![]});}catch(_0x3fc752){console['warn'](_0x1f7209(0xb3),_0x3fc752 instanceof Error?_0x3fc752['message']:_0x3fc752),_0x19968d?.['trackPhaseEnd'](_0x1f7209(0xee),{'isFirstRun':_0x4b9fcb,'opencode':!![],'failed':!![]});}}else _0x19968d?.['trackPhaseStart'](_0x427936[_0x1f7209(0xc7)]),await ensureClaudeSkills(_0x158d1b),_0x19968d?.[_0x1f7209(0xcd)](_0x427936[_0x1f7209(0xc7)],{'isFirstRun':_0x4b9fcb});if(!_0x22174f&&!_0x1a7975?.['url'])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x1f7209(0xea)]('\x20\x20'+_0x427936[_0x1f7209(0xc5)](bold,_0x427936['qYGZI'])+'\x0a');else{_0x19968d?.[_0x1f7209(0xae)](_0x1f7209(0xaf));const _0x54ea10=await _0x427936['kSGhh'](ensureLocalEnv,{'url':_0x1a7975?.['url'],'force':_0x1a7975?.['force'],'allowInsecureLocalhost':_0x1a7975?.[_0x1f7209(0xa4)]},_0x19968d);_0x19968d?.[_0x1f7209(0xcd)](_0x1f7209(0xaf),{'isFirstRun':_0x4b9fcb,'profileReady':_0x54ea10[_0x1f7209(0xeb)],'userSkipped':_0x54ea10['skipped']}),_0x54ea10[_0x1f7209(0xeb)]&&console[_0x1f7209(0xea)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x77c625)console[_0x1f7209(0xea)](_0x427936['sPHwc']),console['log'](_0x1f7209(0x95)),console[_0x1f7209(0xea)](_0x427936['BUXQs']),console[_0x1f7209(0xea)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x2b567c=_0x427936[_0x1f7209(0xa8)](bold,'/ranger:enable');console[_0x1f7209(0xea)](_0x427936['HllJy'](_0x1f7209(0xe0)+_0x2b567c+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
|
|
1
|
+
const _0x4597ab=_0x40ee;(function(_0x46eb65,_0x45c22b){const _0x8a2a93=_0x40ee,_0x551c70=_0x46eb65();while(!![]){try{const _0x769d71=-parseInt(_0x8a2a93(0x8f))/0x1+parseInt(_0x8a2a93(0x7c))/0x2*(-parseInt(_0x8a2a93(0x81))/0x3)+parseInt(_0x8a2a93(0xa7))/0x4+parseInt(_0x8a2a93(0xdb))/0x5+-parseInt(_0x8a2a93(0xa4))/0x6+parseInt(_0x8a2a93(0x67))/0x7+parseInt(_0x8a2a93(0xd9))/0x8;if(_0x769d71===_0x45c22b)break;else _0x551c70['push'](_0x551c70['shift']());}catch(_0x53b8e0){_0x551c70['push'](_0x551c70['shift']());}}}(_0x3336,0x772ac));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x26e0b5 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x40ee(_0x17a3ad,_0x2c391d){_0x17a3ad=_0x17a3ad-0x67;const _0x33365e=_0x3336();let _0x40ee48=_0x33365e[_0x17a3ad];return _0x40ee48;}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=_0x4597ab(0x70),bold=_0x20533e=>_0x4597ab(0xbc)+_0x20533e+_0x4597ab(0xa9);function getPlaywrightVersion(){const _0x45cf3d=_0x4597ab,_0x257c29={'weRJU':'playwright/package.json'};try{const _0x26ae9c=require[_0x45cf3d(0xbb)](_0x257c29[_0x45cf3d(0x6d)]),_0x5eccc1=require(_0x26ae9c);return _0x5eccc1[_0x45cf3d(0x8d)];}catch{return null;}}function installChromiumBinary(_0x4beaa3){const _0x4f74ac=_0x4597ab,_0x5b5a38={'Lrxqg':_0x4f74ac(0x84),'FphWU':'win32'};return new Promise((_0x5e953d,_0x2963ec)=>{const _0x22e50e=_0x4f74ac,_0x9bcc66={'NXdne':function(_0x154b0b,_0x402617){return _0x154b0b(_0x402617);}},_0x494e47=['playwright@'+_0x4beaa3,_0x22e50e(0x91),_0x5b5a38[_0x22e50e(0x7a)]],_0x2250c9=spawn(_0x22e50e(0x9d),_0x494e47,{'stdio':_0x22e50e(0xd6),'shell':process['platform']===_0x5b5a38['FphWU']});_0x2250c9['on'](_0x22e50e(0xca),_0xeb30d4=>{_0xeb30d4===0x0?_0x5e953d():_0x9bcc66['NXdne'](_0x2963ec,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0xeb30d4));}),_0x2250c9['on'](_0x22e50e(0xa5),_0x53ffbf=>{_0x2963ec(_0x53ffbf);});});}export async function authenticate(_0x58d0c5){const _0x801c65=_0x4597ab,_0x3e3322={'akpTv':function(_0xe567a4,_0x233379){return _0xe567a4(_0x233379);},'hncZx':function(_0x3d7938){return _0x3d7938();},'kqeCh':function(_0x5ca630,_0x5079a1){return _0x5ca630 instanceof _0x5079a1;},'MmRTY':_0x801c65(0xc3),'Itxkp':_0x801c65(0xb4),'XbzWM':_0x801c65(0xb2)};if(!_0x58d0c5){const _0x13dc4a=await getToken();if(_0x13dc4a){const _0x7d317f=await _0x3e3322[_0x801c65(0x6f)](getCurrentUser,_0x13dc4a);if(_0x7d317f[_0x801c65(0x85)])return console[_0x801c65(0xce)]('✓\x20Already\x20authenticated\x20to\x20'+_0x7d317f[_0x801c65(0xa1)]['organizationName']),{'token':_0x13dc4a,'method':_0x801c65(0x77)};}try{_0x58d0c5=await _0x3e3322[_0x801c65(0xc6)](runDeviceAuthFlow);}catch(_0x1b9a13){throw new Error(_0x801c65(0xc4)+(_0x3e3322['kqeCh'](_0x1b9a13,Error)?_0x1b9a13['message']:_0x1b9a13));}const _0x17306a=await getCurrentUser(_0x58d0c5);if(!_0x17306a['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x17306a['error']);return console[_0x801c65(0xce)]('✓\x20Authenticated\x20to\x20'+_0x17306a[_0x801c65(0xa1)]['organizationName']),{'token':_0x58d0c5,'method':_0x801c65(0x75)};}console['log'](_0x3e3322[_0x801c65(0x6e)]);const _0x264e8a=await getCurrentUser(_0x58d0c5);if(!_0x264e8a['success']){if(_0x264e8a[_0x801c65(0xa3)])throw new Error('Authentication\x20failed:\x20'+_0x264e8a[_0x801c65(0xa5)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x264e8a['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x801c65(0xce)]('✓\x20Authenticated\x20to\x20'+_0x264e8a['user']['organizationName']),await storeToken(_0x58d0c5),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x3e3322[_0x801c65(0xa6)]),{'token':_0x58d0c5,'method':_0x3e3322['XbzWM']};}export async function ensureRangerDir(){const _0x2e1a74=_0x4597ab,_0x506254={'CoNrH':function(_0x17dd85){return _0x17dd85();},'tJCdJ':function(_0x5470ea){return _0x5470ea();},'ehnHP':function(_0x4accac,_0x1fbaf9){return _0x4accac(_0x1fbaf9);},'MGIlx':function(_0x11f709,_0x410d72,_0x4c7a59){return _0x11f709(_0x410d72,_0x4c7a59);},'ecLbm':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x4183ab=_0x506254['CoNrH'](findGitRoot),_0x2163a0=_0x4183ab?join(_0x4183ab,_0x2e1a74(0xac)):_0x506254[_0x2e1a74(0xc0)](getRangerDir);return!_0x506254['ehnHP'](existsSync,_0x2163a0)?(await _0x506254['MGIlx'](mkdir,_0x2163a0,{'recursive':!![]}),console['log'](_0x2e1a74(0x71)),{'path':_0x2163a0,'installed':!![]}):(console[_0x2e1a74(0xce)](_0x506254[_0x2e1a74(0xda)]),{'path':_0x2163a0,'installed':![]});}export async function ensureChromium(){const _0x2186b5=_0x4597ab,_0x58e2ab={'KOGer':function(_0x3f13c6,_0x537b51){return _0x3f13c6(_0x537b51);},'IGXRS':function(_0x415c29,_0x5ad853){return _0x415c29??_0x5ad853;},'LGeod':'install','KdgEY':_0x2186b5(0x8a),'PsOmT':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','KuJCB':_0x2186b5(0xd1),'aMgyi':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ismrH':_0x2186b5(0x7e)};let _0xa675d7=![];try{const _0x377b49=chromium[_0x2186b5(0x8c)]();_0xa675d7=_0x58e2ab[_0x2186b5(0xbe)](existsSync,_0x377b49);}catch{_0xa675d7=![];}if(_0xa675d7)return console[_0x2186b5(0xce)](_0x2186b5(0x6c)),![];const _0x59f73b=getPlaywrightVersion(),_0x21a3d8=_0x58e2ab['IGXRS'](_0x59f73b,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x5db219=!_0x59f73b,_0x2fe442=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x4121d2=!![];if(_0x2fe442){const {install:_0x1a8588}=await _0x26e0b5['prompt']([{'type':_0x2186b5(0xc9),'name':_0x58e2ab['LGeod'],'message':_0x5db219?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x21a3d8+'\x20now?':_0x2186b5(0x98)+_0x21a3d8+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x4121d2=_0x1a8588;}else console[_0x2186b5(0xce)](_0x2186b5(0x83)+_0x21a3d8+(_0x5db219?_0x58e2ab[_0x2186b5(0xb8)]:'')+_0x2186b5(0x94));if(_0x4121d2){console[_0x2186b5(0xce)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x58e2ab[_0x2186b5(0xbe)](installChromiumBinary,_0x21a3d8),console['log'](_0x58e2ab['PsOmT']);}catch(_0x151fb0){console['error'](_0x58e2ab[_0x2186b5(0x9a)],_0x151fb0 instanceof Error?_0x151fb0['message']:_0x151fb0),console[_0x2186b5(0xce)](_0x58e2ab['aMgyi']),console['log']('\x20\x20npx\x20playwright@'+_0x21a3d8+_0x2186b5(0x72));}}else console['log'](_0x2186b5(0xd0)),console['log'](_0x58e2ab['ismrH']),console[_0x2186b5(0xce)](_0x2186b5(0xbf)+_0x21a3d8+_0x2186b5(0x72));return!![];}export async function writeRangerGitignore(_0x75bac4){const _0x41ec8b=_0x4597ab,_0x18e3c2={'SQSet':function(_0x609d0,_0x29fc17,_0x1269e1){return _0x609d0(_0x29fc17,_0x1269e1);},'wpcZM':'✓\x20Created\x20.ranger/.gitignore'},_0x5172cd=join(_0x75bac4,'.gitignore'),_0x415835=_0x41ec8b(0xd7);await _0x18e3c2[_0x41ec8b(0xd3)](writeFile,_0x5172cd,_0x415835),console['log'](_0x18e3c2[_0x41ec8b(0x7d)]);}function printProfileSetupLaterInstructions(){const _0x194a30=_0x4597ab,_0x20c899={'MdjgV':_0x194a30(0xb6),'gwDDB':function(_0x573fd4,_0x22160e){return _0x573fd4(_0x22160e);}};console['log'](_0x20c899['MdjgV']),console['log']('\x20\x20'+_0x20c899['gwDDB'](bold,'ranger\x20profile\x20add\x20local')),console[_0x194a30(0xce)]('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}function _0x3336(){const _0x10831d=['install','xjIXy','NAurs','...','allowInsecureLocalhost','ranger','srSxS','The\x20required\x20version\x20(','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','KuJCB','ZcirP','tlOrk','npx','LSBLS','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','skipChromium','user','\x20and\x20prompt\x20the\x20coding','status','5650386CviPGN','error','Itxkp','2725184oWHesj','Xgmeb','\x1b[0m','fFFJX','MhXcH','.ranger','QNcuU','OKDAg','message','oNbbY','tcSHq','provided_token','profile','✓\x20Stored\x20credentials\x20locally','qkFYa','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','kJeGp','KdgEY','isTTY','ranger\x20profile\x20add\x20local','resolve','\x1b[1m','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','KOGer','\x20\x20npx\x20playwright@','tJCdJ','skills','git_check','Validating\x20API\x20token...','Authentication\x20failed:\x20','stdin','hncZx','MXncx','use\x20until\x20the\x20session\x20expires.\x0a','confirm','close','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','opencode','scope','log','hqhjT','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','oVxtJ','SQSet','ready','\x0aIn\x20Claude\x20Code,\x20run\x20','inherit','\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','force','10124568pbOYHu','ecLbm','2892080dophTS','method','3895801irhkxS','mCLup','JjaPk','trackPhaseStart','auth','✓\x20Playwright\x20Chromium\x20browser\x20found','weRJU','MmRTY','akpTv','1.58.2','✓\x20Created\x20.ranger/\x20directory','\x20install\x20chromium','/ranger:enable','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','device_auth','trackPhaseEnd','existing_token','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','local','Lrxqg','skipped','2GsBXzx','wpcZM','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','qECmU','plugin','2462133nMnfnD','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','chromium','success','trackPhaseError','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','stdout','No\x20git\x20repository\x20found','\x20(fallback\x20version)','tDala','executablePath','version','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','831276GQgmyj','ZRdzC'];_0x3336=function(){return _0x10831d;};return _0x3336();}async function ensureLocalEnv(_0x2751e5,_0x5a0995){const _0x5368d6=_0x4597ab,_0x4c0ce8={'WWYkE':function(_0xf99fb9){return _0xf99fb9();},'mCLup':_0x5368d6(0x99),'NAurs':_0x5368d6(0x79),'TjoCR':'✓\x20Local\x20profile\x20already\x20exists','mkwab':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','efTLl':_0x5368d6(0xcb),'QNcuU':_0x5368d6(0xc8),'hqhjT':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','adLfT':_0x5368d6(0xc9),'MfvMz':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','wUTIj':function(_0x209c63){return _0x209c63();},'MXncx':function(_0x43e770,_0x10e390,_0x9dd6d2,_0x2b8ac7){return _0x43e770(_0x10e390,_0x9dd6d2,_0x2b8ac7);},'YJSpn':'\x0a❌\x20Profile\x20setup\x20failed:'};if(!_0x4c0ce8['WWYkE'](findGitRoot))return console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0x68)]),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x5368d6(0x79),{'locations':[_0x4c0ce8[_0x5368d6(0x93)]]}))return console[_0x5368d6(0xce)](_0x4c0ce8['TjoCR']),{'ready':!![],'skipped':![]};const _0x36d880=process[_0x5368d6(0xc5)][_0x5368d6(0xb9)]&&process[_0x5368d6(0x88)]['isTTY'];if(_0x36d880&&!_0x2751e5?.['url']){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log'](_0x4c0ce8['mkwab']),console[_0x5368d6(0xce)](_0x4c0ce8['efTLl']),console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0xad)]),console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0xcf)]);const {wantsProfile:_0x3e2321}=await _0x26e0b5['prompt']([{'type':_0x4c0ce8['adLfT'],'name':'wantsProfile','message':_0x4c0ce8['MfvMz'],'default':!![]}]);if(!_0x3e2321)return _0x4c0ce8['wUTIj'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x4c0ce8[_0x5368d6(0xc7)](addEnv,_0x4c0ce8['NAurs'],{'url':_0x2751e5?.['url'],'force':_0x2751e5?.[_0x5368d6(0xd8)],'allowInsecureLocalhost':_0x2751e5?.['allowInsecureLocalhost']},_0x5a0995),{'ready':!![],'skipped':![]};}catch(_0x479278){return console[_0x5368d6(0xa5)](_0x4c0ce8['YJSpn'],_0x479278 instanceof Error?_0x479278['message']:_0x479278),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x573426,_0x28355a,_0x8637c2){const _0x1f6328=_0x4597ab,_0x2aa5cd={'LSBLS':'\x0a🚀\x20Ranger\x20Setup\x0a','Xgmeb':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','ZcirP':_0x1f6328(0xa1),'QjNuB':'git_check','oNbbY':function(_0x3d3715){return _0x3d3715();},'qkFYa':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','srSxS':function(_0x581de5,_0x54a556){return _0x581de5(_0x54a556);},'JjaPk':function(_0x2ffff9){return _0x2ffff9();},'devIV':function(_0x56737c){return _0x56737c();},'oVxtJ':_0x1f6328(0x6b),'tDala':_0x1f6328(0x84),'ZRdzC':_0x1f6328(0x9f),'fFFJX':_0x1f6328(0x80),'kJeGp':function(_0x8121,_0x123491){return _0x8121(_0x123491);},'TnCSv':function(_0xd117e4,_0xbd4784){return _0xd117e4&&_0xbd4784;},'OKDAg':_0x1f6328(0xc1),'JwTjs':_0x1f6328(0x96),'xjIXy':_0x1f6328(0xcc),'qECmU':function(_0x4ed44c,_0x1958bc){return _0x4ed44c instanceof _0x1958bc;},'tcSHq':_0x1f6328(0x87),'sFfiv':_0x1f6328(0xb3),'xujzd':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','tlOrk':function(_0x33cba2,_0x3d6127){return _0x33cba2+_0x3d6127;},'LIGEr':function(_0x5ccc03,_0x443038){return _0x5ccc03+_0x443038;},'MhXcH':function(_0x983d1d,_0x43ad6e){return _0x983d1d+_0x43ad6e;}};console['log'](_0x2aa5cd[_0x1f6328(0x9e)]);const _0x39077b=process['stdin']['isTTY']&&process['stdout'][_0x1f6328(0xb9)];!_0x39077b&&!_0x28355a?.[_0x1f6328(0xcd)]&&(console['log'](_0x2aa5cd[_0x1f6328(0xa8)]),_0x28355a={..._0x28355a,'scope':_0x2aa5cd[_0x1f6328(0x9b)]});_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd['QjNuB']);if(!_0x2aa5cd[_0x1f6328(0xb0)](findGitRoot)){await _0x8637c2?.[_0x1f6328(0x86)](_0x1f6328(0xc2),new Error(_0x1f6328(0x89)));throw new Error(_0x2aa5cd[_0x1f6328(0xb5)]);}_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc2));const _0x1d0589=!_0x2aa5cd['srSxS'](existsSync,_0x2aa5cd[_0x1f6328(0x69)](getRangerDir)),{path:_0x1aa31c}=await _0x2aa5cd['devIV'](ensureRangerDir);_0x8637c2?.['trackPhaseStart'](_0x1f6328(0x6b));const _0x50e7a6=await authenticate(_0x573426);_0x8637c2?.['trackPhaseEnd'](_0x2aa5cd[_0x1f6328(0xd2)],{'isFirstRun':_0x1d0589,'method':_0x50e7a6[_0x1f6328(0xdc)]}),_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0x8b)]);_0x28355a?.[_0x1f6328(0xa0)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium();_0x8637c2?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x1d0589,'skipped':!!_0x28355a?.[_0x1f6328(0xa0)]}),await writeRangerGitignore(_0x1aa31c),console['log'](_0x2aa5cd[_0x1f6328(0x90)]);const _0x175a93=_0x28355a?.['scope'],_0x223b67=_0x28355a?.[_0x1f6328(0xcc)]??![];let _0x272984=null;_0x223b67?(_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0xaa)]),_0x272984=await _0x2aa5cd['kJeGp'](ensureOpencodePluginConfig,_0x175a93),_0x8637c2?.[_0x1f6328(0x76)](_0x2aa5cd['fFFJX'],{'isFirstRun':_0x1d0589,'opencode':!![]})):(_0x8637c2?.['trackPhaseStart'](_0x2aa5cd[_0x1f6328(0xaa)]),await _0x2aa5cd[_0x1f6328(0x97)](ensureClaudePlugin,_0x175a93),_0x8637c2?.['trackPhaseEnd'](_0x2aa5cd[_0x1f6328(0xaa)],{'isFirstRun':_0x1d0589}));if(_0x2aa5cd['TnCSv'](_0x223b67,_0x272984)){_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd['OKDAg']);try{await installSkill(_0x2aa5cd['JwTjs'],{'level':_0x272984[_0x1f6328(0xcd)],'cliVersion':_0x2aa5cd['oNbbY'](getCurrentVersion),'platform':_0x2aa5cd[_0x1f6328(0x92)]}),_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc1),{'isFirstRun':_0x1d0589,'opencode':!![]});}catch(_0x3d3fc0){console['warn'](_0x1f6328(0x8e),_0x2aa5cd[_0x1f6328(0x7f)](_0x3d3fc0,Error)?_0x3d3fc0[_0x1f6328(0xaf)]:_0x3d3fc0),_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc1),{'isFirstRun':_0x1d0589,'opencode':!![],'failed':!![]});}}else _0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0xae)]),await _0x2aa5cd[_0x1f6328(0xb7)](ensureClaudeSkills,_0x175a93),_0x8637c2?.['trackPhaseEnd']('skills',{'isFirstRun':_0x1d0589});if(!_0x39077b&&!_0x28355a?.['url'])console['log'](_0x2aa5cd[_0x1f6328(0xb1)]),console['log']('\x20\x20'+_0x2aa5cd[_0x1f6328(0x97)](bold,_0x1f6328(0xba))+'\x0a');else{_0x8637c2?.['trackPhaseStart'](_0x2aa5cd['sFfiv']);const _0x502dc3=await ensureLocalEnv({'url':_0x28355a?.['url'],'force':_0x28355a?.['force'],'allowInsecureLocalhost':_0x28355a?.[_0x1f6328(0x95)]},_0x8637c2);_0x8637c2?.[_0x1f6328(0x76)](_0x2aa5cd['sFfiv'],{'isFirstRun':_0x1d0589,'profileReady':_0x502dc3['ready'],'userSkipped':_0x502dc3[_0x1f6328(0x7b)]}),_0x502dc3[_0x1f6328(0xd4)]&&console[_0x1f6328(0xce)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x223b67)console['log'](_0x1f6328(0x82)),console[_0x1f6328(0xce)](_0x2aa5cd['xujzd']),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x1f6328(0xbd));else{const _0x44a9ec=bold(_0x1f6328(0x73));console[_0x1f6328(0xce)](_0x2aa5cd[_0x1f6328(0x9c)](_0x2aa5cd['LIGEr'](_0x2aa5cd[_0x1f6328(0xab)](_0x1f6328(0xd5)+_0x44a9ec+_0x1f6328(0xa2),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x1f6328(0x78)),_0x1f6328(0x74)));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x599a81=_0x5e56;function _0x1907(){const _0x478eab=['trim','XZpGw','\x20\x20Run:\x20ranger\x20update','ignore','sDcet','26138gXnyRA','DEBUG','\x0a---\x20Skills\x20---','not_configured','Root:\x20','API\x20Environment:\x20','\x20\x20\x20\x20Settings:\x20','\x1b]8;;file://','join','plwQW','@ranger-testing/opencode-plugin','No\x20profiles\x20configured','name','isArray','stderr','jHodp','mOWCH','not_installed','details','xnZzP','plaintext','vivaL','parse','data','auth.json.enc','965286grOUKT','user','GwMfK','\x20\x20Run:\x20ranger\x20setup\x20[token]','552Oesjkz','hfYWc','unknown','NgOVH','success','dsOUb','close','671442ePipHl','\x1b[1m','\x0a\x20\x20No\x20active\x20profile\x20set','log','\x20(latest:\x20','isActive','271557czhYvM','ANvzN','error','REWrA','plugin','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','CsfZa','arymP','higAL','1264326HDIuLi','\x20\x20Run:\x20ranger\x20setup\x20--opencode','kFwIH','Organization:\x20','debug','path','\x20\x20Project-level:','\x20\x20\x20\x20','864OfrgkV','ibAAj','HtdQm','none','version','push','settingsPath','\x20\x20Not\x20installed','encrypted','\x20\x20Not\x20configured','displayName','10715JfHQTm','20ANzLxM','match','scope','hasPlaintextAuth','length','\x0a---\x20OpenCode\x20Plugin\x20---','includes','map','gSZGe','enabled','env','KahrM','RTzui','cwd','Version:\x20','Qusde','pipe','yaTti','No\x20skills\x20installed','4765050NDEXkt','LoEcN','filter','eYFTJ','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','API\x20URL:\x20','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available'];_0x1907=function(){return _0x478eab;};return _0x1907();}(function(_0x4d9dd2,_0x4c8b7b){const _0x44fdfc=_0x5e56,_0x648cee=_0x4d9dd2();while(!![]){try{const _0x4032b1=-parseInt(_0x44fdfc(0xe6))/0x1+-parseInt(_0x44fdfc(0xef))/0x2+parseInt(_0x44fdfc(0xe0))/0x3+-parseInt(_0x44fdfc(0xd9))/0x4*(parseInt(_0x44fdfc(0x102))/0x5)+-parseInt(_0x44fdfc(0xd5))/0x6+-parseInt(_0x44fdfc(0xbc))/0x7*(-parseInt(_0x44fdfc(0xf7))/0x8)+parseInt(_0x44fdfc(0xb0))/0x9*(parseInt(_0x44fdfc(0x103))/0xa);if(_0x4032b1===_0x4c8b7b)break;else _0x648cee['push'](_0x648cee['shift']());}catch(_0x1b93f1){_0x648cee['push'](_0x648cee['shift']());}}}(_0x1907,0x4f813));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x5e56(_0x241dab,_0x5727b7){_0x241dab=_0x241dab-0xa4;const _0x1907f0=_0x1907();let _0x5e56ac=_0x1907f0[_0x241dab];return _0x5e56ac;}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=_0x52e395=>_0x599a81(0xe1)+_0x52e395+'\x1b[0m',link=(_0x8df8d8,_0x34bf7f)=>_0x599a81(0xc3)+_0x8df8d8+'\x07'+(_0x34bf7f||_0x8df8d8)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4976bd=_0x599a81,_0x5b113c={'higAL':_0x4976bd(0xcd),'ouAwV':'not_configured','qhjwl':_0x4976bd(0xf3),'qyrEw':'config','arymP':_0x4976bd(0xba),'ANvzN':'pipe','KahrM':_0x4976bd(0xe8),'yaTti':_0x4976bd(0xdf)};return new Promise(_0x378003=>{const _0x47dded=_0x4976bd,_0x2cb498={'YJxac':_0x5b113c[_0x47dded(0xee)],'plwQW':'configured','eYFTJ':function(_0x4961d1,_0x21ab9c){return _0x4961d1(_0x21ab9c);},'MLztZ':_0x5b113c['ouAwV']},_0x149b85=spawn('opencode',[_0x5b113c['qhjwl'],_0x5b113c['qyrEw']],{'stdio':[_0x5b113c[_0x47dded(0xed)],_0x47dded(0xad),_0x5b113c[_0x47dded(0xe7)]]});let _0x52c8b2='';_0x149b85['stdout']?.['on']('data',_0x4ac0d6=>{_0x52c8b2+=_0x4ac0d6['toString']();}),_0x149b85[_0x47dded(0xca)]?.['on'](_0x47dded(0xd3),_0x3a568e=>{_0x52c8b2+=_0x3a568e['toString']();}),_0x149b85['on'](_0x5b113c[_0x47dded(0xa8)],()=>{_0x378003({'status':'not_installed'});}),_0x149b85['on'](_0x5b113c[_0x47dded(0xae)],_0x3ab211=>{const _0x489a36=_0x47dded,_0x3e0287={'DViVb':function(_0x521d2e,_0x2454b8){return _0x521d2e!==_0x2454b8;},'zpwKl':_0x489a36(0xc6),'MSwGI':'opencode-plugin'};if(_0x3ab211!==0x0){_0x378003({'status':_0x2cb498['YJxac']});return;}const _0x2c10bc=_0x52c8b2['trim']();let _0x2c8b60=null;if(_0x2c10bc)try{_0x2c8b60=JSON[_0x489a36(0xd2)](_0x2c10bc);}catch{const _0x32f8b4=_0x2c10bc[_0x489a36(0x104)](/\{[\s\S]*\}$/);if(_0x32f8b4)try{_0x2c8b60=JSON[_0x489a36(0xd2)](_0x32f8b4[0x0]);}catch{_0x2c8b60=null;}}const _0x4741b3=Array[_0x489a36(0xc9)](_0x2c8b60?.[_0x489a36(0xea)])?_0x2c8b60?.[_0x489a36(0xea)]:[],_0x34b996=_0x4741b3['some'](_0x372085=>{const _0x12a87c=_0x489a36;if(_0x3e0287['DViVb'](typeof _0x372085,'string'))return![];return _0x372085[_0x12a87c(0x109)](_0x3e0287['zpwKl'])||_0x372085[_0x12a87c(0x109)](_0x3e0287['MSwGI']);});if(_0x34b996){_0x378003({'status':_0x2cb498[_0x489a36(0xc5)],'details':_0x4741b3['length']>0x0?_0x4741b3['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4741b3['length']>0x0){_0x2cb498[_0x489a36(0xb3)](_0x378003,{'status':_0x489a36(0xbf),'details':_0x4741b3['length']+'\x20plugin(s)\x20configured'});return;}_0x378003({'status':_0x2cb498['MLztZ']});});});}async function getSkillsFromDir(_0x324f79,_0x2ff991){const _0x45b872=_0x599a81,_0x3dd1e8={'hfYWc':function(_0x3a1d6b,_0x437c72){return _0x3a1d6b(_0x437c72);},'bjzcI':function(_0x365ffd,_0x53290b){return _0x365ffd(_0x53290b);},'FTtXP':function(_0x20f2ad,_0x16114d,_0x4df440){return _0x20f2ad(_0x16114d,_0x4df440);}};if(!_0x3dd1e8[_0x45b872(0xda)](existsSync,_0x324f79))return[];const _0x3d77db=[];try{const _0x35db9d=await readdir(_0x324f79,{'withFileTypes':!![]});for(const _0x45ed68 of _0x35db9d){if(_0x45ed68['isDirectory']()){const _0x4462bd=join(_0x324f79,_0x45ed68['name'],'SKILL.md');if(_0x3dd1e8['bjzcI'](existsSync,_0x4462bd)){let _0xd60b9e=_0x45ed68['name'];try{const _0x1f8857=await _0x3dd1e8['FTtXP'](readFile,_0x4462bd,'utf-8'),_0x3a09d9=_0x1f8857['match'](/name:\s*(.+)/);_0x3a09d9&&(_0xd60b9e=_0x3a09d9[0x1][_0x45b872(0xb7)]());}catch{}_0x3d77db[_0x45b872(0xfc)]({'name':_0x45ed68['name'],'displayName':_0xd60b9e,'path':_0x4462bd,'level':_0x2ff991});}}}}catch{return[];}return _0x3d77db;}async function getInstalledSkills(){const _0x5aef51=_0x599a81,_0x2ccd89={'Qusde':function(_0x45d0da){return _0x45d0da();},'tHwzQ':'user'},[_0xec7349,_0x1f5edf]=await Promise['all']([getSkillsFromDir(_0x2ccd89[_0x5aef51(0xac)](getProjectSkillsDir),'project'),getSkillsFromDir(_0x2ccd89['Qusde'](getUserSkillsDir),_0x2ccd89['tHwzQ'])]);return{'project':_0xec7349,'user':_0x1f5edf};}async function getEnvironments(){const _0x40bf20=_0x599a81,_0xa0cc38={'GwMfK':'settings.json','loRBU':function(_0x386237,_0x3557eb,_0x151610){return _0x386237(_0x3557eb,_0x151610);},'PGMrk':'auth.json','pOdNL':function(_0x17dfb3,_0x5bc11f,_0x560d23){return _0x17dfb3(_0x5bc11f,_0x560d23);},'CsfZa':function(_0x42fd6c,_0x4769e3){return _0x42fd6c(_0x4769e3);},'XZpGw':'(not\x20found)','tuvyt':function(_0x14abba,_0x372efd){return _0x14abba===_0x372efd;},'mOWCH':function(_0x5d516b){return _0x5d516b();},'NgOVH':function(_0x4182a0,_0x339d57){return _0x4182a0(_0x339d57);}},{envNames:_0x4ef7f4,activeEnv:_0x5cac8d}=await getEnvNames(),_0x507764=_0xa0cc38[_0x40bf20(0xcc)](getRangerDir);if(!_0xa0cc38[_0x40bf20(0xdc)](existsSync,_0x507764))return{'envs':[],'activeEnv':null};const _0x2b128c=_0x4ef7f4[_0x40bf20(0xa4)](_0x4e76b5=>{const _0x29e59a=_0x40bf20,_0x5ec262=getEnvDir(_0x4e76b5),_0xd4a9a=join(_0x5ec262,_0xa0cc38[_0x29e59a(0xd7)]),_0x6604d4=_0xa0cc38['loRBU'](join,_0x5ec262,_0xa0cc38['PGMrk']),_0xdb8c19=_0xa0cc38['pOdNL'](join,_0x5ec262,_0x29e59a(0xd4));return{'name':_0x4e76b5,'settingsPath':_0xa0cc38['CsfZa'](existsSync,_0xd4a9a)?_0xd4a9a:_0xa0cc38[_0x29e59a(0xb8)],'hasPlaintextAuth':existsSync(_0x6604d4),'hasEncryptedAuth':_0xa0cc38[_0x29e59a(0xec)](existsSync,_0xdb8c19),'isActive':_0xa0cc38['tuvyt'](_0x4e76b5,_0x5cac8d)};});return{'envs':_0x2b128c,'activeEnv':_0x5cac8d};}export async function status(){const _0x48001e=_0x599a81,_0x3772d2={'emXGh':'\x0a📊\x20Ranger\x20Status\x0a','dsOUb':function(_0x12c6cd){return _0x12c6cd();},'REWrA':function(_0x238d90,_0x4433c6){return _0x238d90(_0x4433c6);},'kFwIH':'configured','FwRLz':'@ranger-testing/opencode-plugin','PkNDn':function(_0x4b0c26,_0x18a506){return _0x4b0c26===_0x18a506;},'oESZT':_0x48001e(0x100),'DheKY':_0x48001e(0xf0),'vivaL':'ranger@trailhead','xnZzP':'enabled','HtdQm':'disabled','Fmmbk':_0x48001e(0xfe),'zVRkM':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','RTzui':_0x48001e(0xf5),'nCwey':function(_0x8de489,_0x284ef1){return _0x8de489(_0x284ef1);},'jHodp':function(_0x3a26c7,_0x47fbac,_0x4d3796){return _0x3a26c7(_0x47fbac,_0x4d3796);},'sDcet':function(_0x47aa74,_0x588962){return _0x47aa74(_0x588962);},'ibAAj':function(_0x220a3f,_0x4373f2){return _0x220a3f(_0x4373f2);},'QuHHj':function(_0x472299,_0x71e780){return _0x472299(_0x71e780);},'LoEcN':function(_0x49a9a8,_0x47d12d){return _0x49a9a8===_0x47d12d;},'CzzdO':_0x48001e(0xff),'gSZGe':'(not\x20found)','zULSi':function(_0x52891c,_0x2d5d1c){return _0x52891c(_0x2d5d1c);}};console[_0x48001e(0xe3)](_0x3772d2['emXGh']);const _0x19946b=process[_0x48001e(0xaa)](),_0x67b28b=_0x3772d2[_0x48001e(0xde)](getRangerDir);if(!_0x3772d2[_0x48001e(0xe9)](existsSync,_0x67b28b)){console[_0x48001e(0xe3)](_0x48001e(0xc0)+link(_0x19946b,_0x3772d2[_0x48001e(0xe9)](bold,basename(_0x19946b)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x48001e(0xb4));return;}console['log'](_0x48001e(0xc0)+link(_0x19946b,bold(basename(_0x19946b))));const _0x3eda20=getCurrentVersion(),_0x237efa=_0x3772d2['dsOUb'](getLatestVersion);if(_0x237efa['version']&&_0x237efa['version']!==_0x3eda20)console['log']('Version:\x20'+_0x3eda20+_0x48001e(0xe4)+_0x237efa['version']+')'),console['log'](_0x48001e(0xb9));else _0x237efa[_0x48001e(0xfb)]?console['log'](_0x48001e(0xab)+_0x3eda20+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x3eda20);const _0x283001=await _0x3772d2['dsOUb'](getToken);if(_0x283001){const _0x3334ff=await _0x3772d2[_0x48001e(0xe9)](getCurrentUser,_0x283001);_0x3334ff[_0x48001e(0xdd)]?console[_0x48001e(0xe3)](_0x48001e(0xf2)+_0x3772d2[_0x48001e(0xe9)](bold,_0x3334ff[_0x48001e(0xd6)]['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x48001e(0xe3)](_0x48001e(0xd8)));}else console[_0x48001e(0xe3)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x48001e(0xd8));process[_0x48001e(0xa7)][_0x48001e(0xbd)]&&(console['log'](_0x48001e(0xc1)+_0x3772d2[_0x48001e(0xde)](getCurrentEnvironment)),console[_0x48001e(0xe3)](_0x48001e(0xb5)+getApiBaseUrl()));console[_0x48001e(0xe3)](_0x48001e(0x108));const _0xfe6add=await getOpencodePluginStatus();if(_0xfe6add['status']===_0x3772d2[_0x48001e(0xf1)])console['log']('\x20\x20'+bold(_0x3772d2['FwRLz'])+':\x20configured'),_0xfe6add[_0x48001e(0xce)]&&console['log']('\x20\x20'+_0xfe6add['details']);else _0x3772d2['PkNDn'](_0xfe6add['status'],'not_configured')?(console[_0x48001e(0xe3)](_0x3772d2['oESZT']),_0xfe6add['details']&&console['log']('\x20\x20'+_0xfe6add['details']),console['log'](_0x3772d2['DheKY'])):console['log'](_0x48001e(0xb6));console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0xa37a2c=await getPluginInfo(_0x3772d2['vivaL']);if(_0xa37a2c){const _0x2f59b2=_0xa37a2c[_0x48001e(0x105)]||_0x48001e(0xdb),_0x466507=_0xa37a2c[_0x48001e(0xa6)]?_0x3772d2[_0x48001e(0xcf)]:_0x3772d2[_0x48001e(0xf9)];console['log']('\x20\x20'+bold(_0x3772d2[_0x48001e(0xd1)])+':\x20installed\x20('+_0x2f59b2+',\x20'+_0x466507+')');}else console['log'](_0x3772d2['Fmmbk']),console['log'](_0x3772d2['zVRkM']);console[_0x48001e(0xe3)](_0x48001e(0xbe));const {project:_0x2dfe4b,user:_0xc5baaf}=await getInstalledSkills(),_0x228ada=_0x2dfe4b['filter'](_0x35570b=>RANGER_MANAGED_SKILLS['includes'](_0x35570b[_0x48001e(0xc8)])),_0x37b674=_0xc5baaf[_0x48001e(0xb2)](_0xabd53f=>RANGER_MANAGED_SKILLS['includes'](_0xabd53f['name'])),_0x47c8de=_0x228ada[_0x48001e(0x107)]+_0x37b674[_0x48001e(0x107)];if(_0x47c8de===0x0)console[_0x48001e(0xe3)](_0x48001e(0xaf)),console[_0x48001e(0xe3)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x228ada['length']>0x0){console[_0x48001e(0xe3)](_0x3772d2[_0x48001e(0xa9)]);for(const _0x40f306 of _0x228ada){console[_0x48001e(0xe3)]('\x20\x20\x20\x20'+_0x3772d2['nCwey'](bold,_0x40f306['displayName'])+':\x20'+_0x3772d2[_0x48001e(0xcb)](link,_0x40f306['path'],_0x3772d2[_0x48001e(0xbb)](basename,_0x40f306['path'])));}}if(_0x37b674['length']>0x0){console[_0x48001e(0xe3)]('\x20\x20User-level:');for(const _0xb1dff6 of _0x37b674){console['log'](_0x48001e(0xf6)+_0x3772d2[_0x48001e(0xf8)](bold,_0xb1dff6[_0x48001e(0x101)])+':\x20'+_0x3772d2['jHodp'](link,_0xb1dff6[_0x48001e(0xf4)],_0x3772d2['QuHHj'](basename,_0xb1dff6[_0x48001e(0xf4)])));}}}console[_0x48001e(0xe3)]('\x0a---\x20Profiles\x20---');const {envs:_0x4df39b,activeEnv:_0x36e610}=await getEnvironments();if(_0x3772d2[_0x48001e(0xb1)](_0x4df39b['length'],0x0))console['log'](_0x48001e(0xc7)),console[_0x48001e(0xe3)](_0x48001e(0xeb));else{for(const _0x5ace7f of _0x4df39b){const _0x52db02=_0x5ace7f[_0x48001e(0xe5)]?'\x20(active)':'',_0x3aae45=_0x5ace7f['hasEncryptedAuth']?_0x3772d2['CzzdO']:_0x5ace7f[_0x48001e(0x106)]?_0x48001e(0xd0):_0x48001e(0xfa);console['log']('\x20\x20'+bold(_0x5ace7f['name'])+_0x52db02),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x3aae45),_0x5ace7f['settingsPath']!==_0x3772d2[_0x48001e(0xa5)]&&console[_0x48001e(0xe3)](_0x48001e(0xc2)+link(_0x5ace7f[_0x48001e(0xfd)],_0x3772d2['zULSi'](basename,_0x5ace7f[_0x48001e(0xfd)])));}!_0x36e610&&(console['log'](_0x48001e(0xe2)),console[_0x48001e(0xe3)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x4df39b['map'](_0x5057ff=>_0x5057ff[_0x48001e(0xc8)])[_0x48001e(0xc4)](',\x20')+')'));}console[_0x48001e(0xe3)]('');}
|
|
1
|
+
const _0x3e5953=_0xb334;function _0xb334(_0x30f085,_0x166b5d){_0x30f085=_0x30f085-0x1f0;const _0x2f30f1=_0x2f30();let _0xb3348b=_0x2f30f1[_0x30f085];return _0xb3348b;}(function(_0x1cae2b,_0x44a337){const _0x160d78=_0xb334,_0x5247a5=_0x1cae2b();while(!![]){try{const _0x14a8f0=parseInt(_0x160d78(0x217))/0x1+-parseInt(_0x160d78(0x1ff))/0x2+-parseInt(_0x160d78(0x210))/0x3+-parseInt(_0x160d78(0x216))/0x4*(parseInt(_0x160d78(0x240))/0x5)+parseInt(_0x160d78(0x22a))/0x6+parseInt(_0x160d78(0x239))/0x7+parseInt(_0x160d78(0x211))/0x8;if(_0x14a8f0===_0x44a337)break;else _0x5247a5['push'](_0x5247a5['shift']());}catch(_0x4a5ce3){_0x5247a5['push'](_0x5247a5['shift']());}}}(_0x2f30,0x8f0d7));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xd6f6dc=>_0x3e5953(0x214)+_0xd6f6dc+_0x3e5953(0x233),link=(_0x342cc2,_0xde77ee)=>_0x3e5953(0x1fe)+_0x342cc2+'\x07'+(_0xde77ee||_0x342cc2)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x3c8854=_0x3e5953,_0x1cd082={'oENyc':function(_0x4a9af7,_0x181b4d){return _0x4a9af7!==_0x181b4d;},'fVgab':function(_0x159902,_0x1ae195){return _0x159902(_0x1ae195);},'oSRwi':_0x3c8854(0x20f),'jInhG':_0x3c8854(0x235),'nLaEB':function(_0xcd2742,_0x30c343){return _0xcd2742>_0x30c343;},'QUonH':_0x3c8854(0x20d),'JJjYg':function(_0x34899c,_0x3ba314,_0x1465a2,_0x3e7d3c){return _0x34899c(_0x3ba314,_0x1465a2,_0x3e7d3c);},'NCdCz':'opencode','RXkps':'ignore','tSIgX':'pipe','bcZQf':_0x3c8854(0x245)};return new Promise(_0x1be8b4=>{const _0x3c802b=_0x3c8854,_0x4052f2={'alQdh':_0x1cd082['oSRwi']},_0x182baf=_0x1cd082['JJjYg'](spawn,_0x1cd082[_0x3c802b(0x223)],[_0x3c802b(0x238),'config'],{'stdio':[_0x1cd082['RXkps'],_0x1cd082[_0x3c802b(0x21f)],_0x3c802b(0x20c)]});let _0x3aa170='';_0x182baf[_0x3c802b(0x1f5)]?.['on'](_0x3c802b(0x232),_0x2b3b9f=>{_0x3aa170+=_0x2b3b9f['toString']();}),_0x182baf[_0x3c802b(0x200)]?.['on'](_0x3c802b(0x232),_0x1e88a0=>{_0x3aa170+=_0x1e88a0['toString']();}),_0x182baf['on'](_0x3c802b(0x1fb),()=>{_0x1be8b4({'status':_0x4052f2['alQdh']});}),_0x182baf['on'](_0x1cd082['bcZQf'],_0x1dd673=>{const _0x49cc68=_0x3c802b,_0x5e5a5d={'xrqlu':'@ranger-testing/opencode-plugin','bkTFa':_0x49cc68(0x221)};if(_0x1cd082['oENyc'](_0x1dd673,0x0)){_0x1cd082[_0x49cc68(0x204)](_0x1be8b4,{'status':_0x1cd082[_0x49cc68(0x20e)]});return;}const _0x36dc45=_0x3aa170[_0x49cc68(0x248)]();let _0x500746=null;if(_0x36dc45)try{_0x500746=JSON[_0x49cc68(0x24d)](_0x36dc45);}catch{const _0x3fd884=_0x36dc45[_0x49cc68(0x225)](/\{[\s\S]*\}$/);if(_0x3fd884)try{_0x500746=JSON['parse'](_0x3fd884[0x0]);}catch{_0x500746=null;}}const _0x32fe33=Array[_0x49cc68(0x1f2)](_0x500746?.[_0x49cc68(0x206)])?_0x500746?.['plugin']:[],_0x4a0235=_0x32fe33[_0x49cc68(0x24e)](_0x10e685=>{const _0x175ac5=_0x49cc68;if(typeof _0x10e685!==_0x175ac5(0x1fa))return![];return _0x10e685['includes'](_0x5e5a5d[_0x175ac5(0x207)])||_0x10e685['includes'](_0x5e5a5d[_0x175ac5(0x230)]);});if(_0x4a0235){_0x1be8b4({'status':_0x1cd082['jInhG'],'details':_0x1cd082['nLaEB'](_0x32fe33['length'],0x0)?_0x32fe33['length']+_0x49cc68(0x23d):undefined});return;}if(_0x32fe33[_0x49cc68(0x226)]>0x0){_0x1be8b4({'status':_0x1cd082[_0x49cc68(0x219)],'details':_0x32fe33[_0x49cc68(0x226)]+'\x20plugin(s)\x20configured'});return;}_0x1be8b4({'status':_0x1cd082[_0x49cc68(0x219)]});});});}async function getSkillsFromDir(_0x3d96ec,_0xf73933){const _0x5dd0c2=_0x3e5953,_0xe9b1bf={'JagsN':function(_0x2f5f1c,_0x7718b1,_0x4b418d,_0x6b1104){return _0x2f5f1c(_0x7718b1,_0x4b418d,_0x6b1104);},'iideM':'SKILL.md','eqIJw':function(_0x3356f9,_0x32c3d0,_0x2d959f){return _0x3356f9(_0x32c3d0,_0x2d959f);}};if(!existsSync(_0x3d96ec))return[];const _0x696e13=[];try{const _0x345494=await readdir(_0x3d96ec,{'withFileTypes':!![]});for(const _0x27f095 of _0x345494){if(_0x27f095[_0x5dd0c2(0x220)]()){const _0x3a2678=_0xe9b1bf['JagsN'](join,_0x3d96ec,_0x27f095[_0x5dd0c2(0x22f)],_0xe9b1bf[_0x5dd0c2(0x23f)]);if(existsSync(_0x3a2678)){let _0x279e59=_0x27f095['name'];try{const _0x40f883=await _0xe9b1bf['eqIJw'](readFile,_0x3a2678,'utf-8'),_0x424f20=_0x40f883['match'](/name:\s*(.+)/);_0x424f20&&(_0x279e59=_0x424f20[0x1][_0x5dd0c2(0x248)]());}catch{}_0x696e13['push']({'name':_0x27f095['name'],'displayName':_0x279e59,'path':_0x3a2678,'level':_0xf73933});}}}}catch{return[];}return _0x696e13;}async function getInstalledSkills(){const _0x538f37=_0x3e5953,_0x437406={'VNhZU':function(_0x2bbe6e,_0x52ff19,_0xaacaa){return _0x2bbe6e(_0x52ff19,_0xaacaa);},'Svyha':'project','YoeoI':function(_0x42df52,_0x42da4b,_0x2b2827){return _0x42df52(_0x42da4b,_0x2b2827);},'oMNOM':function(_0x2449aa){return _0x2449aa();}},[_0x25c3a1,_0x5da5f2]=await Promise['all']([_0x437406[_0x538f37(0x24a)](getSkillsFromDir,getProjectSkillsDir(),_0x437406['Svyha']),_0x437406[_0x538f37(0x243)](getSkillsFromDir,_0x437406[_0x538f37(0x1f0)](getUserSkillsDir),_0x538f37(0x244))]);return{'project':_0x25c3a1,'user':_0x5da5f2};}function _0x2f30(){const _0x3aea89=['length','\x20\x20Run:\x20ranger\x20setup\x20--opencode','includes','ranger@trailhead','3520266fgQcKA','bUHtB','JzaYe','dPntQ','KveOf','name','bkTFa','jwGcx','data','\x1b[0m','hasEncryptedAuth','configured','@ranger-testing/opencode-plugin','WtTbS','debug','102816SVrOOO','filter','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20\x20\x20Auth:\x20','\x20plugin(s)\x20configured','settingsPath','iideM','10XxCAht','API\x20Environment:\x20','XSlzu','YoeoI','user','close','auth.json','version','trim','huXJb','VNhZU','DvXXH','iUgqW','parse','some','\x20\x20Not\x20installed','enabled','oMNOM','JYugC','isArray','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20\x20\x20','stdout','Version:\x20','KXQqI','\x0a---\x20Claude\x20Code\x20Plugin\x20---','disabled','string','error','wsslY','mIpzd','\x1b]8;;file://','2119506iqwUBf','stderr','isActive','cwd','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','fVgab','env','plugin','xrqlu','Organization:\x20','mtlPJ','API\x20URL:\x20','(not\x20found)','pipe','not_configured','oSRwi','not_installed','2048016rcdyrt','10847600VgvrES','TcARY','UArNC','\x1b[1m','log','375364ZtovME','558701JSkhGC','Root:\x20','QUonH','ETbmz','details',':\x20configured','fsuTQ','\x20(up\x20to\x20date)','tSIgX','isDirectory','opencode-plugin','hasPlaintextAuth','NCdCz','plaintext','match'];_0x2f30=function(){return _0x3aea89;};return _0x2f30();}async function getEnvironments(){const _0x4687d3=_0x3e5953,_0x34f445={'jwGcx':function(_0x16ed97,_0x4d26bf){return _0x16ed97(_0x4d26bf);},'DvXXH':function(_0x295634,_0x5a6a15,_0x4a039a){return _0x295634(_0x5a6a15,_0x4a039a);},'wsslY':'settings.json','iUgqW':function(_0x597af7,_0x598964,_0xcd7f70){return _0x597af7(_0x598964,_0xcd7f70);},'bUHtB':_0x4687d3(0x246),'GgwJD':'auth.json.enc','huXJb':function(_0x60899c,_0x399385){return _0x60899c(_0x399385);},'UArNC':function(_0x47ba95,_0x904181){return _0x47ba95===_0x904181;},'DWTTF':function(_0xb2cef5){return _0xb2cef5();},'JYugC':function(_0x1b2377,_0x32af13){return _0x1b2377(_0x32af13);}},{envNames:_0x4d794c,activeEnv:_0x3705a7}=await _0x34f445['DWTTF'](getEnvNames),_0x22f958=getRangerDir();if(!_0x34f445[_0x4687d3(0x1f1)](existsSync,_0x22f958))return{'envs':[],'activeEnv':null};const _0x3339f3=_0x4d794c['map'](_0x3544cd=>{const _0x31e0af=_0x4687d3,_0x4641ad=_0x34f445['jwGcx'](getEnvDir,_0x3544cd),_0x5bf200=_0x34f445[_0x31e0af(0x24b)](join,_0x4641ad,_0x34f445[_0x31e0af(0x1fc)]),_0x469fdf=_0x34f445[_0x31e0af(0x24c)](join,_0x4641ad,_0x34f445[_0x31e0af(0x22b)]),_0x542b53=join(_0x4641ad,_0x34f445['GgwJD']);return{'name':_0x3544cd,'settingsPath':_0x34f445[_0x31e0af(0x249)](existsSync,_0x5bf200)?_0x5bf200:'(not\x20found)','hasPlaintextAuth':_0x34f445[_0x31e0af(0x231)](existsSync,_0x469fdf),'hasEncryptedAuth':existsSync(_0x542b53),'isActive':_0x34f445[_0x31e0af(0x213)](_0x3544cd,_0x3705a7)};});return{'envs':_0x3339f3,'activeEnv':_0x3705a7};}export async function status(){const _0x1c9c6b=_0x3e5953,_0x392b86={'JzaYe':'\x0a📊\x20Ranger\x20Status\x0a','dgtOG':function(_0x1762d0,_0x423ac4,_0x385a9b){return _0x1762d0(_0x423ac4,_0x385a9b);},'dPntQ':function(_0x152632){return _0x152632();},'mmWdH':'configured','XSlzu':_0x1c9c6b(0x236),'KveOf':function(_0x2d52f1,_0x2545d5){return _0x2d52f1===_0x2545d5;},'fXQdR':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','gLOuu':_0x1c9c6b(0x1f8),'WtTbS':function(_0x40d0e5,_0x306f4f){return _0x40d0e5(_0x306f4f);},'uRWym':_0x1c9c6b(0x229),'mtlPJ':'unknown','fsuTQ':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','fICDo':function(_0xa106df,_0x3a7da1){return _0xa106df+_0x3a7da1;},'YTeBo':'No\x20skills\x20installed','LiBmO':function(_0x27cc96,_0x3f032c){return _0x27cc96>_0x3f032c;},'mIpzd':'\x20\x20Project-level:','CefXp':'\x20\x20User-level:','KXQqI':function(_0x4efa46,_0x1bd7bf,_0x117cb5){return _0x4efa46(_0x1bd7bf,_0x117cb5);},'uRTGm':function(_0x5d752a,_0x3442a5){return _0x5d752a(_0x3442a5);},'IdoVH':'\x0a---\x20Profiles\x20---','zRSCa':function(_0x398284,_0x2a9885){return _0x398284===_0x2a9885;},'ETbmz':'encrypted','OYtnR':_0x1c9c6b(0x20b),'TcARY':function(_0x286802,_0x2e5a42){return _0x286802(_0x2e5a42);}};console['log'](_0x392b86[_0x1c9c6b(0x22c)]);const _0x32b1b4=process[_0x1c9c6b(0x202)](),_0x18f166=getRangerDir();if(!existsSync(_0x18f166)){console['log'](_0x1c9c6b(0x218)+link(_0x32b1b4,bold(basename(_0x32b1b4)))),console['log'](_0x1c9c6b(0x1f3)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x1c9c6b(0x218)+_0x392b86['dgtOG'](link,_0x32b1b4,bold(basename(_0x32b1b4))));const _0x32ae21=_0x392b86[_0x1c9c6b(0x22d)](getCurrentVersion),_0x936747=getLatestVersion();if(_0x936747[_0x1c9c6b(0x247)]&&_0x936747[_0x1c9c6b(0x247)]!==_0x32ae21)console['log'](_0x1c9c6b(0x1f6)+_0x32ae21+'\x20(latest:\x20'+_0x936747['version']+')'),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20update');else _0x936747[_0x1c9c6b(0x247)]?console[_0x1c9c6b(0x215)]('Version:\x20'+_0x32ae21+_0x1c9c6b(0x21e)):console['log']('Version:\x20'+_0x32ae21);const _0x1e86f4=await getToken();if(_0x1e86f4){const _0x11db00=await getCurrentUser(_0x1e86f4);_0x11db00['success']?console['log'](_0x1c9c6b(0x208)+bold(_0x11db00['user']['organizationName'])):(console[_0x1c9c6b(0x215)](_0x1c9c6b(0x203)),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x1c9c6b(0x205)]['DEBUG']&&(console[_0x1c9c6b(0x215)](_0x1c9c6b(0x241)+_0x392b86[_0x1c9c6b(0x22d)](getCurrentEnvironment)),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x20a)+getApiBaseUrl()));console[_0x1c9c6b(0x215)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x101621=await getOpencodePluginStatus();if(_0x101621['status']===_0x392b86['mmWdH'])console[_0x1c9c6b(0x215)]('\x20\x20'+bold(_0x392b86[_0x1c9c6b(0x242)])+_0x1c9c6b(0x21c)),_0x101621['details']&&console[_0x1c9c6b(0x215)]('\x20\x20'+_0x101621[_0x1c9c6b(0x21b)]);else _0x392b86[_0x1c9c6b(0x22e)](_0x101621['status'],'not_configured')?(console['log']('\x20\x20Not\x20configured'),_0x101621[_0x1c9c6b(0x21b)]&&console['log']('\x20\x20'+_0x101621[_0x1c9c6b(0x21b)]),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x227))):console[_0x1c9c6b(0x215)](_0x392b86['fXQdR']);console['log'](_0x392b86['gLOuu']);const _0xcc5e31=await _0x392b86['WtTbS'](getPluginInfo,_0x392b86['uRWym']);if(_0xcc5e31){const _0x5920a9=_0xcc5e31['scope']||_0x392b86[_0x1c9c6b(0x209)],_0x3b9e8d=_0xcc5e31[_0x1c9c6b(0x250)]?_0x1c9c6b(0x250):_0x1c9c6b(0x1f9);console['log']('\x20\x20'+bold(_0x392b86['uRWym'])+':\x20installed\x20('+_0x5920a9+',\x20'+_0x3b9e8d+')');}else console['log'](_0x1c9c6b(0x24f)),console[_0x1c9c6b(0x215)](_0x392b86[_0x1c9c6b(0x21d)]);console['log']('\x0a---\x20Skills\x20---');const {project:_0x59a52b,user:_0x5d3c5e}=await getInstalledSkills(),_0x642e34=_0x59a52b[_0x1c9c6b(0x23a)](_0x665341=>RANGER_MANAGED_SKILLS['includes'](_0x665341[_0x1c9c6b(0x22f)])),_0xae2ef0=_0x5d3c5e['filter'](_0x5601ab=>RANGER_MANAGED_SKILLS[_0x1c9c6b(0x228)](_0x5601ab[_0x1c9c6b(0x22f)])),_0x33a370=_0x392b86['fICDo'](_0x642e34['length'],_0xae2ef0[_0x1c9c6b(0x226)]);if(_0x33a370===0x0)console['log'](_0x392b86['YTeBo']),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x392b86['LiBmO'](_0x642e34[_0x1c9c6b(0x226)],0x0)){console[_0x1c9c6b(0x215)](_0x392b86[_0x1c9c6b(0x1fd)]);for(const _0x44adfc of _0x642e34){console[_0x1c9c6b(0x215)](_0x1c9c6b(0x1f4)+_0x392b86[_0x1c9c6b(0x237)](bold,_0x44adfc['displayName'])+':\x20'+link(_0x44adfc['path'],_0x392b86[_0x1c9c6b(0x237)](basename,_0x44adfc['path'])));}}if(_0xae2ef0[_0x1c9c6b(0x226)]>0x0){console['log'](_0x392b86['CefXp']);for(const _0x12a88c of _0xae2ef0){console[_0x1c9c6b(0x215)]('\x20\x20\x20\x20'+bold(_0x12a88c['displayName'])+':\x20'+_0x392b86['KXQqI'](link,_0x12a88c['path'],_0x392b86['uRTGm'](basename,_0x12a88c['path'])));}}}console['log'](_0x392b86['IdoVH']);const {envs:_0x78b573,activeEnv:_0x24eb0a}=await _0x392b86['dPntQ'](getEnvironments);if(_0x392b86['zRSCa'](_0x78b573[_0x1c9c6b(0x226)],0x0))console[_0x1c9c6b(0x215)]('No\x20profiles\x20configured'),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x23b));else{for(const _0x3fe103 of _0x78b573){const _0x1a7d27=_0x3fe103[_0x1c9c6b(0x201)]?'\x20(active)':'',_0x8acc84=_0x3fe103[_0x1c9c6b(0x234)]?_0x392b86[_0x1c9c6b(0x21a)]:_0x3fe103[_0x1c9c6b(0x222)]?_0x1c9c6b(0x224):'none';console['log']('\x20\x20'+bold(_0x3fe103[_0x1c9c6b(0x22f)])+_0x1a7d27),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x23c)+_0x8acc84),_0x3fe103[_0x1c9c6b(0x23e)]!==_0x392b86['OYtnR']&&console[_0x1c9c6b(0x215)]('\x20\x20\x20\x20Settings:\x20'+_0x392b86[_0x1c9c6b(0x1f7)](link,_0x3fe103[_0x1c9c6b(0x23e)],_0x392b86[_0x1c9c6b(0x212)](basename,_0x3fe103['settingsPath'])));}!_0x24eb0a&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x78b573['map'](_0x2f4b4e=>_0x2f4b4e['name'])['join'](',\x20')+')'));}console[_0x1c9c6b(0x215)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4e9d51,_0x663f6d){const _0x1b2de7=_0x5f5c,_0x3bf0de=_0x4e9d51();while(!![]){try{const _0x559a99=parseInt(_0x1b2de7(0xbd))/0x1+-parseInt(_0x1b2de7(0xe1))/0x2*(-parseInt(_0x1b2de7(0xec))/0x3)+-parseInt(_0x1b2de7(0xcb))/0x4+parseInt(_0x1b2de7(0xc9))/0x5+parseInt(_0x1b2de7(0xd4))/0x6*(-parseInt(_0x1b2de7(0xf3))/0x7)+parseInt(_0x1b2de7(0xb7))/0x8*(-parseInt(_0x1b2de7(0xe6))/0x9)+parseInt(_0x1b2de7(0xdc))/0xa;if(_0x559a99===_0x663f6d)break;else _0x3bf0de['push'](_0x3bf0de['shift']());}catch(_0x1d44cc){_0x3bf0de['push'](_0x3bf0de['shift']());}}}(_0x4b40,0x86d77));import{spawn}from'child_process';import{existsSync}from'fs';function _0x5f5c(_0x40c30e,_0x222c68){_0x40c30e=_0x40c30e-0xb3;const _0x4b40f9=_0x4b40();let _0x5f5c73=_0x4b40f9[_0x40c30e];return _0x5f5c73;}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';function _0x4b40(){const _0x3f7bb0=['jmHMC','56ztAAmm','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','UqybH','EYtWj','FfWjR','\x0a✅\x20Update\x20complete!','595167HLPXXO','NnslC','join','TFxMC','geCJM','✓\x20Migrated\x20active\x20profile\x20file','@latest','CjZCL','.gitignore','log','iTfKb','QgjDN','3848680PmNYAf','FoLVj','3054284HVCPgR','error','@latest...\x0a','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','update','seiaJ','GfWMX','marketplace','install','24AENZCb','YuJxr','claude','push','\x0aInstalling\x20','qoyTV','project','\x20skill\x20','2736400qVIfjb','WceMW','zQFNv','\x0aYour\x20version\x20(','DCdCc','4Gmjzse','iLLdf','\x0aSuccessfully\x20updated\x20to\x20version\x20','bsWmf','plugin','1270989nAbxqk','cohNP','platform','opencode','\x0aSuccessfully\x20installed\x20latest\x20version.','\x0aReinstalling\x20','1584273SboBUO','HvFgL','qeeTw','ranger@trailhead','trim','LgOTf','SxsUR','683018nzZxab','close','iGWYm','length','--scope','SrnaN','pipe'];_0x4b40=function(){return _0x3f7bb0;};return _0x4b40();}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 _0x354567=_0x5f5c,_0x377499={'clRcR':function(_0xefdab8,_0x106772,_0x3d317e,_0x547bad){return _0xefdab8(_0x106772,_0x3d317e,_0x547bad);},'XOLsN':'npm','SxsUR':_0x354567(0xd3),'FfWjR':'inherit','YuJxr':'win32'};return new Promise(_0x1f45eb=>{const _0x3e08e3=_0x354567;console[_0x3e08e3(0xc6)](_0x3e08e3(0xd8)+PACKAGE_NAME+_0x3e08e3(0xcd));const _0x5aa4c5=_0x377499['clRcR'](spawn,_0x377499['XOLsN'],[_0x377499[_0x3e08e3(0xf2)],'-g',PACKAGE_NAME+_0x3e08e3(0xc3)],{'stdio':_0x377499[_0x3e08e3(0xbb)],'shell':process[_0x3e08e3(0xe8)]===_0x377499[_0x3e08e3(0xd5)]});_0x5aa4c5['on'](_0x3e08e3(0xf4),_0x2ccf39=>{_0x1f45eb(_0x2ccf39===0x0);}),_0x5aa4c5['on']('error',()=>{_0x1f45eb(![]);});});}async function updateClaudeMarketplace(){const _0x1769be=_0x5f5c,_0x3a6a35={'UqybH':_0x1769be(0xd6),'FoLVj':'update','LgOTf':'trailhead','seiaJ':'win32','zQFNv':_0x1769be(0xf4),'uButG':_0x1769be(0xcc)};return new Promise(_0x2b8ac9=>{const _0x252d3e=_0x1769be,_0x37ca95=spawn(_0x3a6a35[_0x252d3e(0xb9)],['plugin',_0x252d3e(0xd2),_0x3a6a35[_0x252d3e(0xca)],_0x3a6a35[_0x252d3e(0xf1)]],{'stdio':'pipe','shell':process['platform']===_0x3a6a35[_0x252d3e(0xd0)]});_0x37ca95['on'](_0x3a6a35[_0x252d3e(0xde)],_0xdf900b=>{_0x2b8ac9(_0xdf900b===0x0);}),_0x37ca95['on'](_0x3a6a35['uButG'],()=>{_0x2b8ac9(![]);});});}async function updateClaudePlugin(_0xf47cff){const _0x40f6a2=_0x5f5c,_0x1f7ba9={'geCJM':function(_0x2ed037,_0xd5ce7a){return _0x2ed037(_0xd5ce7a);},'bvqHg':_0x40f6a2(0xe5),'HvFgL':_0x40f6a2(0xef),'ygNPH':_0x40f6a2(0xb3),'WceMW':_0x40f6a2(0xf4)};return new Promise(_0x4af6a1=>{const _0x52e472=_0x40f6a2,_0x59b4df={'mEXoG':function(_0x4b262e,_0x52c425){return _0x4b262e===_0x52c425;},'iGWYm':function(_0x19eeb7,_0x324d6e){const _0x1fa7d4=_0x5f5c;return _0x1f7ba9[_0x1fa7d4(0xc1)](_0x19eeb7,_0x324d6e);}},_0x1a38c7=[_0x1f7ba9['bvqHg'],_0x52e472(0xcf),_0x1f7ba9[_0x52e472(0xed)]];_0xf47cff&&_0x1a38c7['push'](_0x1f7ba9['ygNPH'],_0xf47cff);const _0xa302cc=spawn('claude',_0x1a38c7,{'stdio':_0x52e472(0xb5),'shell':process[_0x52e472(0xe8)]==='win32'});_0xa302cc['on'](_0x1f7ba9[_0x52e472(0xdd)],_0x5e615a=>{_0x4af6a1(_0x59b4df['mEXoG'](_0x5e615a,0x0));}),_0xa302cc['on'](_0x52e472(0xcc),()=>{const _0x43f2c3=_0x52e472;_0x59b4df[_0x43f2c3(0xf5)](_0x4af6a1,![]);});});}function isSkillInstalled(_0x50b612,_0x5ce078,_0x30d1d8){const _0x25e59c={'JBwld':function(_0x4fd065,_0x76ac37){return _0x4fd065(_0x76ac37);}},_0x4b1e90=_0x30d1d8==='opencode'?getOpencodeSkillsDir(_0x5ce078):getSkillsDir(_0x5ce078),_0x28e87d=join(_0x4b1e90,_0x50b612);return _0x25e59c['JBwld'](existsSync,_0x28e87d);}async function reinstallSkills(_0x554cd2){const _0x311762=_0x5f5c,_0x7a8cc0={'dTwBM':function(_0x5d4304,_0x257391,_0x5babca,_0x284322){return _0x5d4304(_0x257391,_0x5babca,_0x284322);},'bsWmf':_0x311762(0xd6),'iTfKb':function(_0x509b9b,_0x100d35,_0x2e0cc6,_0x3aa527){return _0x509b9b(_0x100d35,_0x2e0cc6,_0x3aa527);},'qeeTw':_0x311762(0xe9)},_0xc9fb10=[_0x311762(0xda),'user'],_0x170389=[];for(const _0x725cdb of _0xc9fb10){for(const _0x5906d0 of RANGER_MANAGED_SKILLS){_0x7a8cc0['dTwBM'](isSkillInstalled,_0x5906d0,_0x725cdb,'claude')&&_0x170389[_0x311762(0xd7)]({'skillName':_0x5906d0,'level':_0x725cdb,'platform':_0x7a8cc0[_0x311762(0xe4)]}),_0x7a8cc0[_0x311762(0xc7)](isSkillInstalled,_0x5906d0,_0x725cdb,'opencode')&&_0x170389[_0x311762(0xd7)]({'skillName':_0x5906d0,'level':_0x725cdb,'platform':_0x7a8cc0[_0x311762(0xee)]});}}for(const _0xef3406 of _0xc9fb10){for(const _0x1815d5 of DEPRECATED_SKILLS){await removeSkill(_0x1815d5,_0xef3406);}}if(_0x170389[_0x311762(0xf6)]===0x0){console[_0x311762(0xc6)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log'](_0x311762(0xeb)+_0x170389[_0x311762(0xf6)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x412711,level:_0x2ee8d6,platform:_0xbb9208}of _0x170389){try{await installSkill(_0x412711,{'level':_0x2ee8d6,'cliVersion':_0x554cd2,'platform':_0xbb9208});}catch(_0x80ea9){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0xbb9208+'\x20'+_0x2ee8d6+_0x311762(0xdb)+_0x412711+':',_0x80ea9);}}}async function ensureActiveProfileGitignored(){const _0x18db2e=_0x5f5c,_0x1a2ed7={'cohNP':function(_0xeed7d2,_0x3e0d45,_0x57b1e1){return _0xeed7d2(_0x3e0d45,_0x57b1e1);},'QgjDN':function(_0x11fade){return _0x11fade();},'CjZCL':function(_0x3b85e6,_0x2201e5){return _0x3b85e6(_0x2201e5);},'jmHMC':'utf-8','ZYkaB':function(_0x2b8bce,_0x396c2d){return _0x2b8bce===_0x396c2d;}},_0x281348=_0x1a2ed7['cohNP'](join,_0x1a2ed7[_0x18db2e(0xc8)](getRangerDir),_0x18db2e(0xc5));if(!_0x1a2ed7[_0x18db2e(0xc4)](existsSync,_0x281348))return![];let _0xadd64='';try{_0xadd64=await _0x1a2ed7[_0x18db2e(0xe7)](readFile,_0x281348,_0x1a2ed7[_0x18db2e(0xb6)]);}catch{return![];}const _0x5efd43=_0xadd64['split'](/\r?\n/);if(_0x5efd43['some'](_0x52c63a=>_0x52c63a[_0x18db2e(0xf0)]()==='active-profile.txt'))return![];let _0x232662=_0x5efd43['findIndex'](_0x1cf6e2=>_0x1cf6e2['trim']()==='active-feature.txt');_0x1a2ed7['ZYkaB'](_0x232662,-0x1)&&(_0x232662=_0x5efd43[_0x18db2e(0xf6)]);_0x5efd43['splice'](_0x232662,0x0,'active-profile.txt');let _0x4cb970=_0x5efd43[_0x18db2e(0xbf)]('\x0a');!_0x4cb970['endsWith']('\x0a')&&(_0x4cb970+='\x0a');try{await writeFile(_0x281348,_0x4cb970,_0x1a2ed7[_0x18db2e(0xb6)]);}catch{return![];}return!![];}export async function update(){const _0x5ea871=_0x5f5c,_0x508f64={'YxPZW':'Checking\x20for\x20updates...','IPMIN':'Attempting\x20install\x20anyway...','DCdCc':function(_0x4ccfec,_0x3e9866,_0x25ef36){return _0x4ccfec(_0x3e9866,_0x25ef36);},'NnslC':function(_0x5bcef7,_0x2aceb5){return _0x5bcef7===_0x2aceb5;},'TFxMC':_0x5ea871(0xb8),'peSep':function(_0xcc16d3,_0x5252d8){return _0xcc16d3<_0x5252d8;},'SrnaN':function(_0x332a95){return _0x332a95();},'iLLdf':'Update\x20failed.','qoyTV':function(_0x101673,_0x4c9a0e){return _0x101673(_0x4c9a0e);},'EYtWj':_0x5ea871(0xef),'iqBDa':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','PEFjt':_0x5ea871(0xce),'GfWMX':function(_0x1b8f04,_0x5b0849){return _0x1b8f04(_0x5b0849);},'USNha':_0x5ea871(0xc2),'wofsi':function(_0x5439a3){return _0x5439a3();}},_0x4dbdfe=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x4dbdfe),console['log'](_0x508f64['YxPZW']);const _0x718ee8=getLatestVersion();let _0x59c1ca=_0x4dbdfe;if(!_0x718ee8['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x718ee8[_0x5ea871(0xcc)]),console['log'](_0x508f64['IPMIN']);const _0x261263=await runInstall();if(_0x261263)console[_0x5ea871(0xc6)](_0x5ea871(0xea)),_0x59c1ca=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x718ee8['error']);}else{const _0x3a4053=_0x718ee8['version'];console[_0x5ea871(0xc6)]('Latest\x20version:\x20\x20'+_0x3a4053);const _0x1599f3=_0x508f64[_0x5ea871(0xe0)](compareVersions,_0x4dbdfe,_0x3a4053);if(_0x508f64[_0x5ea871(0xbe)](_0x1599f3,0x0))console[_0x5ea871(0xc6)](_0x508f64[_0x5ea871(0xc0)]);else{if(_0x508f64['peSep'](_0x1599f3,0x0))console['log'](_0x5ea871(0xdf)+_0x4dbdfe+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3a4053+').');else{const _0x2673b3=await _0x508f64[_0x5ea871(0xb4)](runInstall);if(_0x2673b3)console['log'](_0x5ea871(0xe3)+_0x3a4053),_0x59c1ca=_0x3a4053;else throw new Error(_0x508f64[_0x5ea871(0xe2)]);}}}await _0x508f64[_0x5ea871(0xd9)](reinstallSkills,_0x59c1ca);const _0x398f90=await isMarketplaceAdded('trailhead'),_0x17ae8d=await isPluginInstalled(_0x508f64[_0x5ea871(0xba)]);if(_0x398f90){const _0x4152cc=await updateClaudeMarketplace();_0x4152cc&&console[_0x5ea871(0xc6)](_0x508f64['iqBDa']);}if(_0x17ae8d){const _0x1800d9=await updateClaudePlugin();_0x1800d9&&console['log'](_0x508f64['PEFjt']);const _0x494492=await _0x508f64[_0x5ea871(0xd1)](updateClaudePlugin,'project');_0x494492&&console['log']((_0x1800d9?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x4398f3=await _0x508f64['SrnaN'](migrateActiveProfileFile);_0x4398f3&&console['log'](_0x508f64['USNha']);const _0x2aea7d=await _0x508f64['wofsi'](ensureActiveProfileGitignored);console[_0x5ea871(0xc6)](_0x5ea871(0xbc));}
|
|
1
|
+
(function(_0x59f44b,_0x12a14c){const _0x267e58=_0x3881,_0xb36bd2=_0x59f44b();while(!![]){try{const _0x4ff808=parseInt(_0x267e58(0x1c6))/0x1*(-parseInt(_0x267e58(0x1ea))/0x2)+parseInt(_0x267e58(0x1d9))/0x3*(-parseInt(_0x267e58(0x1ef))/0x4)+parseInt(_0x267e58(0x1e0))/0x5+-parseInt(_0x267e58(0x1d1))/0x6*(-parseInt(_0x267e58(0x1f1))/0x7)+parseInt(_0x267e58(0x1c1))/0x8*(parseInt(_0x267e58(0x1bf))/0x9)+parseInt(_0x267e58(0x1c9))/0xa+-parseInt(_0x267e58(0x1e5))/0xb*(parseInt(_0x267e58(0x1c5))/0xc);if(_0x4ff808===_0x12a14c)break;else _0xb36bd2['push'](_0xb36bd2['shift']());}catch(_0x2c681d){_0xb36bd2['push'](_0xb36bd2['shift']());}}}(_0x5d51,0xdc4d9));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';function _0x5d51(){const _0x2a0fc1=['6uUpcDY','rElxd','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','Update\x20failed.','trim','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','AMTho','mWmbN','590385sblIUl','some','fKpfK','inherit','keTnF','sNowk','push','2541795wQyxZL','Checking\x20for\x20updates...','\x0aInstalling\x20','cmqxm','active-profile.txt','12496BqlIbt','plugin','xuCNe','rsTVr','pipe','458EOxQSR','.gitignore','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','user','@latest...\x0a','4cqQfmE','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','253463SNNqoX','split','trailhead','yQLFI','teqWR','ZadLu','uEigv','zyMIT','\x0aReinstalling\x20','DdlvA','platform','length','claude','\x20ranger-managed\x20skill(s)...','error','oRIlV','99801hQTWxi','\x0aSuccessfully\x20updated\x20to\x20version\x20','808VCgOln','close','--scope','\x20skill\x20','2088kTqIfP','2427uzkOGb','GGjRs','\x0aCurrent\x20version:\x20','1880460QGLmyI','ranger@trailhead','✓\x20Migrated\x20active\x20profile\x20file','project','version','warn','splice','log'];_0x5d51=function(){return _0x2a0fc1;};return _0x5d51();}async function runInstall(){const _0x2ffaa4={'cmqxm':function(_0x3a7600,_0x59605b){return _0x3a7600(_0x59605b);},'RWIul':function(_0xae5c0f,_0x6dbbb1){return _0xae5c0f===_0x6dbbb1;},'sRfut':'npm','qvNHH':'close'};return new Promise(_0x1a3f34=>{const _0x396a70=_0x3881,_0x142d08={'oRIlV':function(_0x3a3000,_0x197b4b){return _0x3a3000(_0x197b4b);}};console['log'](_0x396a70(0x1e2)+PACKAGE_NAME+_0x396a70(0x1ee));const _0x55bc37=spawn(_0x2ffaa4['sRfut'],['install','-g',PACKAGE_NAME+'@latest'],{'stdio':_0x396a70(0x1dc),'shell':process['platform']==='win32'});_0x55bc37['on'](_0x2ffaa4['qvNHH'],_0x3df84c=>{const _0x5caf90=_0x396a70;_0x2ffaa4[_0x5caf90(0x1e3)](_0x1a3f34,_0x2ffaa4['RWIul'](_0x3df84c,0x0));}),_0x55bc37['on']('error',()=>{const _0x3806b7=_0x396a70;_0x142d08[_0x3806b7(0x1be)](_0x1a3f34,![]);});});}async function updateClaudeMarketplace(){const _0x3046d2=_0x3881,_0x56d923={'rElxd':function(_0x30d79d,_0x516cd3){return _0x30d79d===_0x516cd3;},'UUpzh':function(_0x57f5b2,_0xae5b76,_0x3ea3f2,_0x514e81){return _0x57f5b2(_0xae5b76,_0x3ea3f2,_0x514e81);},'SauoF':_0x3046d2(0x1bb),'CJcYu':'update','yQLFI':'win32','hXnWu':_0x3046d2(0x1bd)};return new Promise(_0x528ce3=>{const _0x158baa=_0x3046d2,_0x29e6f1=_0x56d923['UUpzh'](spawn,_0x56d923['SauoF'],[_0x158baa(0x1e6),'marketplace',_0x56d923['CJcYu'],'trailhead'],{'stdio':'pipe','shell':process[_0x158baa(0x1b9)]===_0x56d923[_0x158baa(0x1b2)]});_0x29e6f1['on']('close',_0x27b9a8=>{const _0x59eaa5=_0x158baa;_0x528ce3(_0x56d923[_0x59eaa5(0x1d2)](_0x27b9a8,0x0));}),_0x29e6f1['on'](_0x56d923['hXnWu'],()=>{_0x528ce3(![]);});});}async function updateClaudePlugin(_0x1afda0){const _0x5b4207=_0x3881,_0x3d0601={'RiEGP':_0x5b4207(0x1ca),'MiJaj':_0x5b4207(0x1c3),'uEigv':function(_0x4edc47,_0x4a1879,_0x4b18b0,_0x244fe6){return _0x4edc47(_0x4a1879,_0x4b18b0,_0x244fe6);},'keTnF':_0x5b4207(0x1e9),'sNowk':_0x5b4207(0x1bd)};return new Promise(_0x29e5c9=>{const _0x250d65=_0x5b4207,_0x29a54e={'Gksme':function(_0x1e5cf4,_0x14e21e){return _0x1e5cf4===_0x14e21e;}},_0x9934e9=[_0x250d65(0x1e6),'update',_0x3d0601['RiEGP']];_0x1afda0&&_0x9934e9['push'](_0x3d0601['MiJaj'],_0x1afda0);const _0x4f5c8d=_0x3d0601[_0x250d65(0x1b5)](spawn,'claude',_0x9934e9,{'stdio':_0x3d0601[_0x250d65(0x1dd)],'shell':process[_0x250d65(0x1b9)]==='win32'});_0x4f5c8d['on'](_0x250d65(0x1c2),_0x45d994=>{_0x29e5c9(_0x29a54e['Gksme'](_0x45d994,0x0));}),_0x4f5c8d['on'](_0x3d0601[_0x250d65(0x1de)],()=>{_0x29e5c9(![]);});});}function isSkillInstalled(_0x14013d,_0xd5cf05,_0x4f070d){const _0x45d5d8={'hbKaR':function(_0x291a77,_0x253c18){return _0x291a77(_0x253c18);},'kjePr':function(_0x44db00,_0x1206d7,_0x501083){return _0x44db00(_0x1206d7,_0x501083);}},_0x19ce1d=_0x4f070d==='opencode'?getOpencodeSkillsDir(_0xd5cf05):_0x45d5d8['hbKaR'](getSkillsDir,_0xd5cf05),_0x4ed66f=_0x45d5d8['kjePr'](join,_0x19ce1d,_0x14013d);return existsSync(_0x4ed66f);}function _0x3881(_0x5b3ad1,_0x12d5bb){_0x5b3ad1=_0x5b3ad1-0x1b2;const _0x5d51a8=_0x5d51();let _0x3881cc=_0x5d51a8[_0x5b3ad1];return _0x3881cc;}async function reinstallSkills(_0x1a06e9){const _0x7cf0b8=_0x3881,_0x61b999={'mbFSf':function(_0x10a3e5,_0x440c6e,_0x16c5ef,_0x1d8a0c){return _0x10a3e5(_0x440c6e,_0x16c5ef,_0x1d8a0c);},'dgsvs':'claude','rsTVr':'opencode','XfuOY':function(_0x1b4617,_0x31d1fb,_0x3757ec){return _0x1b4617(_0x31d1fb,_0x3757ec);},'zyMIT':function(_0xe2f36b,_0xfd0b26){return _0xe2f36b===_0xfd0b26;},'DdlvA':_0x7cf0b8(0x1ec)},_0x4d0a0f=[_0x7cf0b8(0x1cc),_0x7cf0b8(0x1ed)],_0x2af74a=[];for(const _0x558525 of _0x4d0a0f){for(const _0xbd5732 of RANGER_MANAGED_SKILLS){_0x61b999['mbFSf'](isSkillInstalled,_0xbd5732,_0x558525,'claude')&&_0x2af74a['push']({'skillName':_0xbd5732,'level':_0x558525,'platform':_0x61b999['dgsvs']}),isSkillInstalled(_0xbd5732,_0x558525,'opencode')&&_0x2af74a[_0x7cf0b8(0x1df)]({'skillName':_0xbd5732,'level':_0x558525,'platform':_0x61b999[_0x7cf0b8(0x1e8)]});}}for(const _0x36ced1 of _0x4d0a0f){for(const _0x52ee67 of DEPRECATED_SKILLS){await _0x61b999['XfuOY'](removeSkill,_0x52ee67,_0x36ced1);}}if(_0x61b999[_0x7cf0b8(0x1b6)](_0x2af74a[_0x7cf0b8(0x1ba)],0x0)){console[_0x7cf0b8(0x1d0)](_0x61b999[_0x7cf0b8(0x1b8)]);return;}console['log'](_0x7cf0b8(0x1b7)+_0x2af74a[_0x7cf0b8(0x1ba)]+_0x7cf0b8(0x1bc));for(const {skillName:_0x2968c4,level:_0x5ef3ed,platform:_0x52b375}of _0x2af74a){try{await _0x61b999['XfuOY'](installSkill,_0x2968c4,{'level':_0x5ef3ed,'cliVersion':_0x1a06e9,'platform':_0x52b375});}catch(_0x2670e6){console[_0x7cf0b8(0x1ce)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x52b375+'\x20'+_0x5ef3ed+_0x7cf0b8(0x1c4)+_0x2968c4+':',_0x2670e6);}}}async function ensureActiveProfileGitignored(){const _0x5a1781=_0x3881,_0x48a7e9={'GGjRs':function(_0x4432bd){return _0x4432bd();},'wUzht':_0x5a1781(0x1eb),'ELAFa':function(_0x54e3ef,_0x35bc56){return _0x54e3ef(_0x35bc56);},'xuCNe':function(_0x4d4c08,_0x206fec,_0xbc5e67){return _0x4d4c08(_0x206fec,_0xbc5e67);},'Srfja':function(_0x2d156b,_0x577c4f,_0x34c0c0,_0x2e721f){return _0x2d156b(_0x577c4f,_0x34c0c0,_0x2e721f);}},_0x4bd9e1=join(_0x48a7e9[_0x5a1781(0x1c7)](getRangerDir),_0x48a7e9['wUzht']);if(!_0x48a7e9['ELAFa'](existsSync,_0x4bd9e1))return![];let _0x4821d3='';try{_0x4821d3=await _0x48a7e9[_0x5a1781(0x1e7)](readFile,_0x4bd9e1,'utf-8');}catch{return![];}const _0x34b218=_0x4821d3[_0x5a1781(0x1f2)](/\r?\n/);if(_0x34b218[_0x5a1781(0x1da)](_0xa013ec=>_0xa013ec['trim']()==='active-profile.txt'))return![];let _0x47102f=_0x34b218['findIndex'](_0x4811bc=>_0x4811bc[_0x5a1781(0x1d5)]()==='active-feature.txt');_0x47102f===-0x1&&(_0x47102f=_0x34b218[_0x5a1781(0x1ba)]);_0x34b218[_0x5a1781(0x1cf)](_0x47102f,0x0,_0x5a1781(0x1e4));let _0x3a6ca6=_0x34b218['join']('\x0a');!_0x3a6ca6['endsWith']('\x0a')&&(_0x3a6ca6+='\x0a');try{await _0x48a7e9['Srfja'](writeFile,_0x4bd9e1,_0x3a6ca6,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x50523b=_0x3881,_0x209aff={'teqWR':function(_0x35bdbc){return _0x35bdbc();},'hjdFz':'Attempting\x20install\x20anyway...','ZadLu':_0x50523b(0x1d4),'lVjaC':function(_0x3fc140,_0x116209){return _0x3fc140(_0x116209);},'mWmbN':function(_0x5d5a29,_0x28a65e){return _0x5d5a29(_0x28a65e);},'AMTho':_0x50523b(0x1d3),'pvxvq':_0x50523b(0x1cc),'fKpfK':function(_0x36b2d7){return _0x36b2d7();}},_0x1fa925=_0x209aff[_0x50523b(0x1b3)](getCurrentVersion);console['log'](_0x50523b(0x1c8)+_0x1fa925),console[_0x50523b(0x1d0)](_0x50523b(0x1e1));const _0x232c25=getLatestVersion();let _0x3e2296=_0x1fa925;if(!_0x232c25[_0x50523b(0x1cd)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x232c25[_0x50523b(0x1bd)]),console[_0x50523b(0x1d0)](_0x209aff['hjdFz']);const _0x56d2d2=await _0x209aff[_0x50523b(0x1b3)](runInstall);if(_0x56d2d2)console[_0x50523b(0x1d0)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x3e2296=_0x209aff[_0x50523b(0x1b3)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x232c25[_0x50523b(0x1bd)]);}else{const _0x40bd0e=_0x232c25[_0x50523b(0x1cd)];console[_0x50523b(0x1d0)]('Latest\x20version:\x20\x20'+_0x40bd0e);const _0x27c80e=compareVersions(_0x1fa925,_0x40bd0e);if(_0x27c80e===0x0)console[_0x50523b(0x1d0)](_0x50523b(0x1f0));else{if(_0x27c80e<0x0)console[_0x50523b(0x1d0)]('\x0aYour\x20version\x20('+_0x1fa925+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x40bd0e+').');else{const _0x7c60f8=await runInstall();if(_0x7c60f8)console[_0x50523b(0x1d0)](_0x50523b(0x1c0)+_0x40bd0e),_0x3e2296=_0x40bd0e;else throw new Error(_0x209aff[_0x50523b(0x1b4)]);}}}await _0x209aff['lVjaC'](reinstallSkills,_0x3e2296);const _0x4d26e1=await _0x209aff['lVjaC'](isMarketplaceAdded,_0x50523b(0x1f3)),_0x295022=await _0x209aff[_0x50523b(0x1d8)](isPluginInstalled,'ranger@trailhead');if(_0x4d26e1){const _0x363216=await updateClaudeMarketplace();_0x363216&&console[_0x50523b(0x1d0)](_0x50523b(0x1d6));}if(_0x295022){const _0x1b7f1e=await updateClaudePlugin();_0x1b7f1e&&console['log'](_0x209aff[_0x50523b(0x1d7)]);const _0x54e234=await updateClaudePlugin(_0x209aff['pvxvq']);_0x54e234&&console[_0x50523b(0x1d0)]((_0x1b7f1e?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x1bdea1=await migrateActiveProfileFile();_0x1bdea1&&console['log'](_0x50523b(0x1cb));const _0x293238=await _0x209aff[_0x50523b(0x1db)](ensureActiveProfileGitignored);console['log']('\x0a✅\x20Update\x20complete!');}
|