@ranger-testing/ranger-cli 2.1.5 → 2.1.6
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/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/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/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/verifyInBrowser.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d6d87,_0x55540f){const _0x5eba8f=_0x3795,_0x3f6996=_0x4d6d87();while(!![]){try{const _0x28e3c2=parseInt(_0x5eba8f(0xf5))/0x1*(parseInt(_0x5eba8f(0xe5))/0x2)+parseInt(_0x5eba8f(0xfa))/0x3*(parseInt(_0x5eba8f(0xf3))/0x4)+-parseInt(_0x5eba8f(0xef))/0x5+parseInt(_0x5eba8f(0xf2))/0x6+parseInt(_0x5eba8f(0xfc))/0x7+-parseInt(_0x5eba8f(0xe9))/0x8+-parseInt(_0x5eba8f(0xed))/0x9*(-parseInt(_0x5eba8f(0xfb))/0xa);if(_0x28e3c2===_0x55540f)break;else _0x3f6996['push'](_0x3f6996['shift']());}catch(_0x4a6173){_0x3f6996['push'](_0x3f6996['shift']());}}}(_0x1741,0x9abb2));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x1741(){const _0x2f2eb0=['string','alloc','733836OuvFLX','50cwmrfn','7963102CQtpDA','trackCommandEnd','UFLSS','Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session','YNJAK','mdxXi','90078DxuSIO','bUIbZ','name',')\x20and\x20the\x20token\x20`','10129704iVIrGw','currentSessionId','RANGER_SKIP_VERIFICATION','featureId','311481NbEMns','size','3580075LjIryO','IvBPM',':\x0a\x0a','4356438tDPvPV','8NwsgKI','input','2sxXckB','stop_hook_active','transcript_path'];_0x1741=function(){return _0x2f2eb0;};return _0x1741();}import{getSessionEntry}from'../utils/sessionCache.js';function _0x3795(_0x4551db,_0x5be033){_0x4551db=_0x4551db-0xe1;const _0x1741d1=_0x1741();let _0x379500=_0x1741d1[_0x4551db];return _0x379500;}import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x166504){const _0x5153e7=_0x3795,_0x19ae8a={'rHUHv':function(_0x3f3a60,_0x253be7){return _0x3f3a60(_0x253be7);},'uaXBz':function(_0x21bd41,_0x33283c){return _0x21bd41===_0x33283c;},'fWcoX':_0x5153e7(0xf8),'DQjjd':function(_0x27685a,_0x541c01,_0x446332,_0x129d8f){return _0x27685a(_0x541c01,_0x446332,_0x129d8f);},'UFLSS':function(_0x424a7b,_0x31ac7b){return _0x424a7b(_0x31ac7b);},'Omlil':function(_0x304f79,_0x8b13ea,_0x54bd3f,_0xae5947){return _0x304f79(_0x8b13ea,_0x54bd3f,_0xae5947);},'KFfjO':function(_0x3135f5){return _0x3135f5();},'zoDQF':function(_0x40e20e,_0x477ccf,_0xa8bf3){return _0x40e20e(_0x477ccf,_0xa8bf3);},'AqCjg':function(_0x14c4a7,_0x4d8314,_0x389801,_0x34e88a){return _0x14c4a7(_0x4d8314,_0x389801,_0x34e88a);},'WoTOv':'block','aIqUF':function(_0x15f0b6,_0x417175,_0x5564fe,_0x1263f2){return _0x15f0b6(_0x417175,_0x5564fe,_0x1263f2);},'oPnSe':function(_0x505220,_0x565156,_0x51ee95,_0x4ed892){return _0x505220(_0x565156,_0x51ee95,_0x4ed892);}},_0x298bd9=await _0x19ae8a['rHUHv'](getEnabledHookContext,_0x166504),_0x230c63=_0x298bd9?.['sessionId']??null,_0x31aa38=Boolean(_0x298bd9?.['input']?.[_0x5153e7(0xf6)]),_0x5290c7=_0x19ae8a['uaXBz'](typeof _0x298bd9?.['input']?.[_0x5153e7(0xf7)],_0x19ae8a['fWcoX'])?_0x298bd9[_0x5153e7(0xf4)][_0x5153e7(0xf7)]:null;let _0x287b3b=!![];if(!_0x230c63){await _0x19ae8a['DQjjd'](trackStop,_0x230c63,![],_0x287b3b);return;}try{const _0xb1b2bc=_0x19ae8a[_0x5153e7(0xe1)](getSessionEntry,_0x230c63);if(!_0xb1b2bc){await _0x19ae8a['Omlil'](trackStop,_0x230c63,!![],_0x287b3b);return;}const _0xe44221='https://dashboard.ranger.net/features/'+_0xb1b2bc['featureId'],_0x55fb44=_0x5153e7(0xeb),_0x368314=await _0x19ae8a['KFfjO'](getToken),_0x3bd6af=!_0x31aa38;let _0x4169e6=null,_0x53a5f2=null;const _0x48fc85=_0x31aa38&&await _0x19ae8a['zoDQF'](transcriptHasToken,_0x5290c7,_0x55fb44),_0x1065f5=await _0x19ae8a['zoDQF'](transcriptHasToken,_0x5290c7,_0xe44221);if(_0x368314)try{const _0x2c7b22=await getFeature(_0xb1b2bc[_0x5153e7(0xec)]);_0x4169e6=_0x2c7b22[_0x5153e7(0xe7)]??null,_0x53a5f2=_0x2c7b22[_0x5153e7(0xea)]??null;}catch{}if(_0x368314&&_0x53a5f2)try{await concludeSession(_0xb1b2bc[_0x5153e7(0xec)],_0x53a5f2);}catch(_0x458e1c){if(_0x48fc85){await _0x19ae8a['AqCjg'](trackStop,_0x230c63,!![],_0x287b3b);return;}_0x287b3b=![];const _0x3d3c37=_0x458e1c instanceof Error?_0x458e1c['message']:_0x19ae8a['rHUHv'](String,_0x458e1c),_0x43bbf2={'decision':_0x19ae8a['WoTOv'],'reason':_0x5153e7(0xe2)+(_0x4169e6?'\x20for\x20\x22'+_0x4169e6+'\x22':'')+_0x5153e7(0xf1)+_0x3d3c37+'\x0a\x0aThis\x20is\x20most\x20likely\x20due\x20to\x20pending\x20scenarios\x20that\x20need\x20to\x20be\x20verified.\x20Please\x20resolve\x20the\x20issue\x20or\x20resume\x20later\x20with:\x0a\x20\x20ranger\x20resume\x0a\x0aIf\x20you\x20are\x20extremely\x20sure\x20this\x20is\x20the\x20user\x27s\x20requirement\x20and\x20want\x20to\x20skip\x20verification\x20for\x20now,\x20send\x20a\x20final\x20message\x20that\x20includes\x20the\x20feature\x20review\x20link\x20('+_0xe44221+_0x5153e7(0xe8)+_0x55fb44+'`,\x20then\x20run\x20/exit\x20again.'};console['log'](JSON['stringify'](_0x43bbf2)),await _0x19ae8a['aIqUF'](trackStop,_0x230c63,!![],_0x287b3b);return;}await trackStop(_0x230c63,!![],_0x287b3b);return;}catch{await _0x19ae8a['oPnSe'](trackStop,_0x230c63,!![],_0x287b3b);return;}}async function trackStop(_0x2c47d2,_0x52e3ae,_0x5a2784){const _0xcfaf20=_0x3795,_0x42dfb6={'qrcbZ':function(_0xfe0540,_0x2d76b3){return _0xfe0540(_0x2d76b3);},'mdxXi':'hook:stop','YNJAK':'success'};try{const _0x3ab916=_0x42dfb6['qrcbZ'](createTelemetryCollector,_0x42dfb6[_0xcfaf20(0xe4)]);await _0x3ab916['trackCommandStart']({'sessionId':_0x2c47d2??undefined,'hooksEnabled':_0x52e3ae,'stopAllowed':_0x5a2784}),await _0x3ab916[_0xcfaf20(0xfd)](_0x42dfb6[_0xcfaf20(0xe3)]);}catch{}}async function transcriptHasToken(_0x5482a4,_0x55ca6e){const _0x364072=_0x3795,_0x4ef140={'bUIbZ':function(_0x53e062,_0x548d90,_0x50e987){return _0x53e062(_0x548d90,_0x50e987);}};if(!_0x5482a4)return![];const _0x540931=await _0x4ef140[_0x364072(0xe6)](readTranscriptTail,_0x5482a4,0x30d40);return _0x540931?_0x540931['includes'](_0x55ca6e):![];}async function readTranscriptTail(_0x283217,_0x476ddb){const _0x14d101=_0x3795,_0x365986={'IvBPM':function(_0x3ee3c3,_0x270222){return _0x3ee3c3<=_0x270222;},'IhNpj':function(_0x3a7621,_0x56fd08){return _0x3a7621-_0x56fd08;},'sYlGQ':'utf8'};let _0xb36079=null;try{_0xb36079=await open(_0x283217,'r');const _0x2e459c=await _0xb36079['stat'](),_0x39ec48=Math['min'](_0x2e459c[_0x14d101(0xee)],_0x476ddb);if(_0x365986[_0x14d101(0xf0)](_0x39ec48,0x0))return'';const _0xb28779=Buffer[_0x14d101(0xf9)](_0x39ec48);return await _0xb36079['read'](_0xb28779,0x0,_0x39ec48,_0x365986['IhNpj'](_0x2e459c['size'],_0x39ec48)),_0xb28779['toString'](_0x365986['sYlGQ']);}catch{return null;}finally{try{await _0xb36079?.['close']();}catch{}}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23e776,_0x14aa4a){var _0x5e7c24=_0x15c5,_0x3b7747=_0x23e776();while(!![]){try{var _0xf66c4b=parseInt(_0x5e7c24(0x16c))/0x1+-parseInt(_0x5e7c24(0x173))/0x2+parseInt(_0x5e7c24(0x16a))/0x3*(-parseInt(_0x5e7c24(0x169))/0x4)+parseInt(_0x5e7c24(0x172))/0x5*(parseInt(_0x5e7c24(0x168))/0x6)+parseInt(_0x5e7c24(0x16d))/0x7*(-parseInt(_0x5e7c24(0x170))/0x8)+parseInt(_0x5e7c24(0x171))/0x9*(parseInt(_0x5e7c24(0x16f))/0xa)+parseInt(_0x5e7c24(0x16b))/0xb*(-parseInt(_0x5e7c24(0x16e))/0xc);if(_0xf66c4b===_0x14aa4a)break;else _0x3b7747['push'](_0x3b7747['shift']());}catch(_0x18d8ee){_0x3b7747['push'](_0x3b7747['shift']());}}}(_0x50ee,0xe1cd9));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';function _0x15c5(_0x4b6829,_0x8d2e0a){_0x4b6829=_0x4b6829-0x168;var _0x50eea2=_0x50ee();var _0x15c568=_0x50eea2[_0x4b6829];return _0x15c568;}export{envList}from'./env.js';export{hook}from'./hook.js';function _0x50ee(){var _0x1c1937=['141016ockqav','9WxXMvf','4092455ehZpHZ','348746guGMmi','6FkiAvM','19124VAgaBF','237dwsxJx','2128313ywmcsB','1694457ScCaBJ','574ldgfBH','48PuuPCB','11833590FqTQXu'];_0x50ee=function(){return _0x1c1937;};return _0x50ee();}export{setupCi}from'./setupCi.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x247a(_0x1b682b,_0x4ea6ae){_0x1b682b=_0x1b682b-0x149;const _0x3489dd=_0x3489();let _0x247a80=_0x3489dd[_0x1b682b];return _0x247a80;}(function(_0x1e09a0,_0x43f109){const _0x3a9b13=_0x247a,_0x222a0b=_0x1e09a0();while(!![]){try{const _0x205ca9=-parseInt(_0x3a9b13(0x14b))/0x1*(parseInt(_0x3a9b13(0x151))/0x2)+parseInt(_0x3a9b13(0x14e))/0x3+parseInt(_0x3a9b13(0x157))/0x4*(-parseInt(_0x3a9b13(0x152))/0x5)+-parseInt(_0x3a9b13(0x159))/0x6*(parseInt(_0x3a9b13(0x155))/0x7)+-parseInt(_0x3a9b13(0x14a))/0x8*(-parseInt(_0x3a9b13(0x14f))/0x9)+-parseInt(_0x3a9b13(0x15a))/0xa+-parseInt(_0x3a9b13(0x149))/0xb*(-parseInt(_0x3a9b13(0x158))/0xc);if(_0x205ca9===_0x43f109)break;else _0x222a0b['push'](_0x222a0b['shift']());}catch(_0x4c3e3e){_0x222a0b['push'](_0x222a0b['shift']());}}}(_0x3489,0xd2583));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3489(){const _0x5f3a29=['UhyZK','fzFjl','2208816tSDFrt','207esTuct','user','216902OKOUib','745pfVpqk','success','Login\x20failed:\x20','892129tRMnOf','\x0a✅\x20Logged\x20in\x20to\x20','36948lQmkff','312528QoMMzs','12LiFyeY','13219260dTjgAA','stdout','1320kBSNNv','398648XkyuZo','11WaEZhx'];_0x3489=function(){return _0x5f3a29;};return _0x3489();}import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x1c9461=_0x247a,_0x564de4={'fzFjl':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','kVkMz':function(_0x284408){return _0x284408();},'apcfc':function(_0xf1c678,_0x2a90ab){return _0xf1c678(_0x2a90ab);},'UhyZK':function(_0x5313fd,_0x34f22e){return _0x5313fd instanceof _0x34f22e;}},_0x3d0957=process['stdin']['isTTY']&&process[_0x1c9461(0x15b)]['isTTY'];if(!_0x3d0957)throw new Error(_0x564de4[_0x1c9461(0x14d)]);try{const _0x23002a=await _0x564de4['kVkMz'](runDeviceAuthFlow),_0x5e978f=await _0x564de4['apcfc'](getCurrentUser,_0x23002a);_0x5e978f[_0x1c9461(0x153)]?console['log'](_0x1c9461(0x156)+_0x5e978f[_0x1c9461(0x150)]['organizationName']):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0xaa5095){throw new Error(_0x1c9461(0x154)+(_0x564de4[_0x1c9461(0x14c)](_0xaa5095,Error)?_0xaa5095['message']:_0xaa5095));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x47bf6d,_0x3f052d){const _0x235c99=_0x5128,_0x1525f8=_0x47bf6d();while(!![]){try{const _0x4d24c5=-parseInt(_0x235c99(0xc0))/0x1+parseInt(_0x235c99(0xaf))/0x2+parseInt(_0x235c99(0xb7))/0x3*(parseInt(_0x235c99(0xc9))/0x4)+-parseInt(_0x235c99(0xbf))/0x5*(-parseInt(_0x235c99(0xc1))/0x6)+-parseInt(_0x235c99(0xb3))/0x7*(parseInt(_0x235c99(0x9c))/0x8)+-parseInt(_0x235c99(0xca))/0x9*(-parseInt(_0x235c99(0xc5))/0xa)+parseInt(_0x235c99(0xb2))/0xb;if(_0x4d24c5===_0x3f052d)break;else _0x1525f8['push'](_0x1525f8['shift']());}catch(_0xe20849){_0x1525f8['push'](_0x1525f8['shift']());}}}(_0x3e80,0xb1b5c));import{join}from'path';import{existsSync}from'fs';import _0xa83ea3 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x5128(_0x517f0a,_0x40e4e6){_0x517f0a=_0x517f0a-0x8a;const _0x3e80de=_0x3e80();let _0x5128ce=_0x3e80de[_0x517f0a];return _0x5128ce;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x3e80(){const _0x21190d=['confirm','rZwPl','gkZOG','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','includes','output','vFotG','error','❌\x20Failed\x20to\x20add\x20marketplace:','marketplace','plugin','vRrJo','.claude','WlNBA','✓\x20Claude\x20Code\x20plugin\x20enabled','nVHod','❌\x20Failed\x20to\x20install\x20plugin:','1343334IMhUIw','SKILL.md','ranger@trailhead','3521639gpypSz','9914051gTcGUD','JjKgp','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','3777PYeBdo','✓\x20Marketplace\x20already\x20added','success','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','unFxb','already\x20enabled','log','gqobH','572940mSNyde','537207cosfzn','6yzrQjN','prompt','--scope','nEwBc','10qjNzuW','qHXWW','⚠\x20Failed\x20to\x20enable\x20plugin:','pluginScope','2828kmBfPv','6163947OqBzSE','AVWFA','\x20level)...\x0a','ranger','gSDBz','YNwWl','project','trailhead','HBjjp','vWXWe','Would\x20you\x20like\x20to\x20install\x20skills?','list','user','Where\x20should\x20the\x20plugin\x20be\x20installed?','User\x20(available\x20in\x20all\x20your\x20projects)','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','wantsSkillup','cqZBF','KAcwX','8WtpmPY'];_0x3e80=function(){return _0x21190d;};return _0x3e80();}export async function ensureClaudePlugin(_0xa29b72){const _0xfa7466=_0x5128,_0x11a58f={'gqobH':'ranger@trailhead','vRrJo':_0xfa7466(0xb6),'AVWFA':function(_0x7644c5){return _0x7644c5();},'tDBUr':_0xfa7466(0x94),'gkZOG':_0xfa7466(0xc8),'JjKgp':_0xfa7466(0x95),'HBjjp':'project','nVHod':function(_0x27fbd0,_0x315430){return _0x27fbd0(_0x315430);},'IBnti':_0xfa7466(0x90),'dKnar':function(_0x3e9dec,_0x3a0042){return _0x3e9dec(_0x3a0042);},'VUVIB':_0xfa7466(0xa7),'VRWsK':'add','fFejY':'ranger-testing/trailhead','KAcwX':_0xfa7466(0xa6),'rZwPl':'\x0aYou\x20can\x20install\x20manually\x20with:','vWXWe':'plugin','roeEG':'install','unFxb':_0xfa7466(0xc3),'WlNBA':_0xfa7466(0xae),'YNwWl':_0xfa7466(0x98),'wFazI':'enable','qHXWW':function(_0x57c49e,_0x2f1f6f,_0x4d63dc){return _0x57c49e(_0x2f1f6f,_0x4d63dc);},'tLHFU':_0xfa7466(0xbc),'ChDHS':_0xfa7466(0xac)},_0x4fd9c3=await isPluginInstalled(_0x11a58f['gqobH']);if(_0x4fd9c3)return console[_0xfa7466(0xbd)](_0x11a58f[_0xfa7466(0xa9)]),![];const _0x303f92=existsSync(join(_0x11a58f[_0xfa7466(0x8a)](getProjectRoot),_0xfa7466(0xaa)));let _0x114c8a;if(_0xa29b72)_0x114c8a=_0xa29b72;else{if(_0x303f92)_0x114c8a='project';else{console[_0xfa7466(0xbd)](_0xfa7466(0xba));const _0x1c160e=await _0xa83ea3['prompt']([{'type':_0x11a58f['tDBUr'],'name':_0x11a58f[_0xfa7466(0x9f)],'message':_0xfa7466(0x96),'choices':[{'name':_0xfa7466(0x97),'value':_0x11a58f[_0xfa7466(0xb4)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x11a58f[_0xfa7466(0x91)]}],'default':_0x11a58f[_0xfa7466(0xb4)]}]);_0x114c8a=_0x1c160e[_0xfa7466(0xc8)];}}console['log'](_0xfa7466(0xb5)+_0x114c8a+_0xfa7466(0x8b));const _0x4b9895=await _0x11a58f[_0xfa7466(0xad)](isMarketplaceAdded,_0x11a58f['IBnti']);let _0x1a8561=_0x4b9895;if(_0x4b9895)console[_0xfa7466(0xbd)](_0xfa7466(0xb8));else{const _0x50183d=await _0x11a58f['dKnar'](runClaudeCommand,[_0xfa7466(0xa8),_0x11a58f['VUVIB'],_0x11a58f['VRWsK'],_0x11a58f['fFejY']]);!_0x50183d['success']?(console[_0xfa7466(0xa5)](_0x11a58f[_0xfa7466(0x9b)],_0x50183d[_0xfa7466(0xa5)]),console[_0xfa7466(0xbd)](_0x11a58f['rZwPl']),console[_0xfa7466(0xbd)](_0xfa7466(0xa0)),console['log'](_0xfa7466(0xa1)+_0x114c8a)):_0x1a8561=!![];}if(_0x1a8561){const _0x1c5d9c=await runClaudeCommand([_0x11a58f[_0xfa7466(0x92)],_0x11a58f['roeEG'],_0xfa7466(0xb1),_0x11a58f[_0xfa7466(0xbb)],_0x114c8a]);if(!_0x1c5d9c[_0xfa7466(0xb9)])console[_0xfa7466(0xa5)](_0x11a58f[_0xfa7466(0xab)],_0x1c5d9c[_0xfa7466(0xa5)]),console[_0xfa7466(0xbd)](_0x11a58f[_0xfa7466(0x9e)]),console[_0xfa7466(0xbd)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x114c8a);else{console[_0xfa7466(0xbd)](_0x11a58f[_0xfa7466(0x8e)]);const _0x3d4579=[_0x11a58f['vWXWe'],_0x11a58f['wFazI'],_0x11a58f[_0xfa7466(0xbe)]];_0x114c8a===_0x11a58f['HBjjp']&&_0x3d4579['push'](_0xfa7466(0xc3),_0x11a58f[_0xfa7466(0x91)]);const _0x3a1f76=await _0x11a58f[_0xfa7466(0xc6)](runClaudeCommand,_0x3d4579,{'captureOutput':!![]}),_0x2ace95=_0x3a1f76[_0xfa7466(0xa3)]?.[_0xfa7466(0xa2)](_0x11a58f['tLHFU']);!_0x3a1f76['success']&&!_0x2ace95?console[_0xfa7466(0xa5)](_0xfa7466(0xc7),_0x3a1f76[_0xfa7466(0xa5)]):console['log'](_0x11a58f['ChDHS']);}}return!![];}export async function ensureClaudeSkills(_0x4f35ab){const _0x1c135e=_0x5128,_0x3bc8f7={'vFotG':function(_0x2bc181,_0x3d93cf,_0x2ded20,_0x541781){return _0x2bc181(_0x3d93cf,_0x2ded20,_0x541781);},'PmKfb':'user','cqZBF':_0x1c135e(0xb0),'zKFxC':function(_0x47f816,_0x2e0477){return _0x47f816(_0x2e0477);},'LwzGN':function(_0x2b8e39,_0x4d669c){return _0x2b8e39||_0x4d669c;},'nEwBc':function(_0x5723dc,_0x416a2f,_0x4e1bad){return _0x5723dc(_0x416a2f,_0x4e1bad);},'JVaLm':function(_0x3a4553){return _0x3a4553();},'SAIfp':_0x1c135e(0xaa),'PuzrH':_0x1c135e(0x8f),'HjxPV':_0x1c135e(0x9d),'tvVfl':_0x1c135e(0x99),'gSDBz':_0x1c135e(0x93)},_0x5f06fa=existsSync(_0x3bc8f7[_0x1c135e(0xa4)](join,getSkillsDir(_0x3bc8f7['PmKfb']),_0x1c135e(0x8c),_0x3bc8f7[_0x1c135e(0x9a)])),_0x2765d8=_0x3bc8f7['zKFxC'](existsSync,_0x3bc8f7[_0x1c135e(0xa4)](join,getSkillsDir(_0x1c135e(0x8f)),_0x1c135e(0x8c),_0x3bc8f7[_0x1c135e(0x9a)]));if(_0x3bc8f7['LwzGN'](_0x5f06fa,_0x2765d8))return console[_0x1c135e(0xbd)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x577281=existsSync(_0x3bc8f7[_0x1c135e(0xc4)](join,_0x3bc8f7['JVaLm'](getProjectRoot),_0x3bc8f7['SAIfp']));let _0x5957ca=!![];if(_0x4f35ab)await skillup({'autoInstall':_0x4f35ab,'suppressUsage':!![]});else{if(_0x577281)await skillup({'autoInstall':_0x3bc8f7['PuzrH'],'suppressUsage':!![]});else{const _0x3c18ee=await _0xa83ea3[_0x1c135e(0xc2)]([{'type':_0x3bc8f7['HjxPV'],'name':_0x3bc8f7['tvVfl'],'message':_0x3bc8f7[_0x1c135e(0x8d)],'default':!![]}]);_0x5957ca=_0x3c18ee['wantsSkillup'],_0x5957ca&&await _0x3bc8f7['zKFxC'](skillup,{'suppressUsage':!![]});}}return _0x5957ca;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cdb76,_0x1565ea){const _0x43ff79=_0x305a,_0xa96005=_0x5cdb76();while(!![]){try{const _0x2aa61a=parseInt(_0x43ff79(0x1d7))/0x1+parseInt(_0x43ff79(0x1e2))/0x2*(-parseInt(_0x43ff79(0x1eb))/0x3)+-parseInt(_0x43ff79(0x1cf))/0x4+-parseInt(_0x43ff79(0x1d4))/0x5+parseInt(_0x43ff79(0x1d8))/0x6+parseInt(_0x43ff79(0x1d9))/0x7*(-parseInt(_0x43ff79(0x1e1))/0x8)+-parseInt(_0x43ff79(0x1df))/0x9*(-parseInt(_0x43ff79(0x1ea))/0xa);if(_0x2aa61a===_0x1565ea)break;else _0xa96005['push'](_0xa96005['shift']());}catch(_0x54bec9){_0xa96005['push'](_0xa96005['shift']());}}}(_0x2268,0x255ad));function _0x305a(_0x576700,_0x1af754){_0x576700=_0x576700-0x1cd;const _0x226863=_0x2268();let _0x305a52=_0x226863[_0x576700];return _0x305a52;}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x4e1599 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x163001){const _0x14bca9=_0x305a,_0x58fe49={'dEaKc':function(_0x2b3f33,_0x330e78,_0x244f8c){return _0x2b3f33(_0x330e78,_0x244f8c);},'RJyNy':function(_0x29ceac,_0x2d7200){return _0x29ceac(_0x2d7200);},'vAUdH':'project','hkKJN':_0x14bca9(0x1e4),'QqfnH':'list','IhSct':'Where\x20should\x20the\x20plugin\x20be\x20installed?','wuGcs':function(_0x27d22c,_0x496311,_0x13a6c7){return _0x27d22c(_0x496311,_0x13a6c7);},'GFseE':_0x14bca9(0x1e6),'KHaJT':'https://opencode.ai/config.json','hjVee':function(_0xa05756,_0xd8ea51,_0x18d69b){return _0xa05756(_0xd8ea51,_0x18d69b);},'zYhKT':'utf-8','UAqBK':_0x14bca9(0x1db),'wWilQ':_0x14bca9(0x1cd),'lVzDO':function(_0x25bc0d,_0x1b576e,_0xc8227){return _0x25bc0d(_0x1b576e,_0xc8227);},'JqOCX':_0x14bca9(0x1e7)},_0x5f5a67=existsSync(_0x58fe49[_0x14bca9(0x1e9)](join,_0x58fe49[_0x14bca9(0x1da)](getOpencodeConfigDir,_0x58fe49[_0x14bca9(0x1e0)]),'opencode.json'));let _0x390b4e;if(_0x163001)_0x390b4e=_0x163001;else{if(_0x5f5a67)_0x390b4e='project';else{console[_0x14bca9(0x1e5)](_0x58fe49['hkKJN']);const _0x338d3e=await _0x4e1599['prompt']([{'type':_0x58fe49['QqfnH'],'name':'pluginScope','message':_0x58fe49['IhSct'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x14bca9(0x1ce)},{'name':_0x14bca9(0x1d2),'value':'project'}],'default':'user'}]);_0x390b4e=_0x338d3e[_0x14bca9(0x1de)];}}const _0x519a11=_0x58fe49[_0x14bca9(0x1d3)](join,getOpencodeConfigDir(_0x390b4e),_0x14bca9(0x1ec)),_0x2655ea=_0x58fe49['GFseE'],_0x5e1ddb=_0x58fe49[_0x14bca9(0x1dc)];let _0x8917c1={};if(existsSync(_0x519a11))try{const _0x1fea81=await _0x58fe49[_0x14bca9(0x1e3)](readFile,_0x519a11,_0x58fe49[_0x14bca9(0x1d6)]);_0x8917c1=JSON['parse'](_0x1fea81);}catch(_0x455e21){return console[_0x14bca9(0x1d0)](_0x14bca9(0x1d5)),{'configured':![],'scope':_0x390b4e,'error':_0x58fe49['UAqBK'],'details':_0x455e21};}const _0x22287=Array[_0x14bca9(0x1e8)](_0x8917c1['plugin'])?_0x8917c1[_0x14bca9(0x1d1)]:[];if(_0x22287['includes'](_0x2655ea))return console['log'](_0x58fe49['wWilQ']),{'configured':![],'scope':_0x390b4e};return _0x8917c1['$schema']=_0x8917c1[_0x14bca9(0x1dd)]||_0x5e1ddb,_0x8917c1[_0x14bca9(0x1d1)]=[..._0x22287,_0x2655ea],await _0x58fe49['lVzDO'](mkdir,_0x58fe49['RJyNy'](getOpencodeConfigDir,_0x390b4e),{'recursive':!![]}),await _0x58fe49[_0x14bca9(0x1e9)](writeFile,_0x519a11,JSON['stringify'](_0x8917c1,null,0x2)+'\x0a'),console['log'](_0x58fe49['JqOCX']),{'configured':!![],'scope':_0x390b4e};}function _0x2268(){const _0x332174=['191817TIBBrM','opencode.json','✓\x20OpenCode\x20plugin\x20already\x20configured','user','1209320loAFmX','error','plugin','Project\x20(shared\x20with\x20team\x20via\x20git)','wuGcs','1166315OByWfw','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','zYhKT','208667dHxcwd','1329780uqfVvt','77xXxEmd','RJyNy','Failed\x20to\x20read\x20opencode.json','KHaJT','$schema','pluginScope','3065940ICvZCr','vAUdH','214648ugHCCk','4WXnRbu','hjVee','\x0a📦\x20OpenCode\x20Plugin\x0a','log','@ranger-testing/opencode-plugin','✓\x20OpenCode\x20plugin\x20configured','isArray','dEaKc','20hAhZrE'];_0x2268=function(){return _0x332174;};return _0x2268();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33f296,_0xc68a7a){const _0x1aa28e=_0x2f52,_0x51f04b=_0x33f296();while(!![]){try{const _0x30902d=-parseInt(_0x1aa28e(0x11c))/0x1+-parseInt(_0x1aa28e(0x117))/0x2+parseInt(_0x1aa28e(0x116))/0x3*(-parseInt(_0x1aa28e(0x131))/0x4)+parseInt(_0x1aa28e(0x14f))/0x5+-parseInt(_0x1aa28e(0x139))/0x6+-parseInt(_0x1aa28e(0x14b))/0x7*(parseInt(_0x1aa28e(0x140))/0x8)+parseInt(_0x1aa28e(0x153))/0x9*(parseInt(_0x1aa28e(0x14d))/0xa);if(_0x30902d===_0xc68a7a)break;else _0x51f04b['push'](_0x51f04b['shift']());}catch(_0x300fec){_0x51f04b['push'](_0x51f04b['shift']());}}}(_0x1727,0x8a2e5));import{mkdir,readFile,readdir}from'fs/promises';function _0x2f52(_0x1fba5e,_0x1dbfdf){_0x1fba5e=_0x1fba5e-0x116;const _0x17276c=_0x1727();let _0x2f52eb=_0x17276c[_0x1fba5e];return _0x2f52eb;}import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';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(_0x46d260){const _0x5caa5f=_0x2f52,_0x384a9f={'nuqQv':function(_0x1516ad){return _0x1516ad();},'jxxUx':function(_0x51b6c9,_0x31fce8,_0x57b846){return _0x51b6c9(_0x31fce8,_0x57b846);},'oWJfD':function(_0x405bfc,_0x25b548,_0x42afc4){return _0x405bfc(_0x25b548,_0x42afc4);},'lLzrE':function(_0x463efc,_0x46fd2f){return _0x463efc(_0x46fd2f);},'mvcRj':function(_0x331041,_0x2fdbab,_0x461385){return _0x331041(_0x2fdbab,_0x461385);},'NJcVq':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x4ea94d=_0x384a9f[_0x5caa5f(0x122)](getRangerDir),_0x3e29aa=_0x384a9f['jxxUx'](join,_0x4ea94d,'ci');if(_0x46d260){const _0x2716b0=_0x384a9f[_0x5caa5f(0x14c)](join,_0x3e29aa,_0x46d260);return{'name':_0x46d260,'path':_0x2716b0};}if(!_0x384a9f['lLzrE'](existsSync,_0x3e29aa))throw new Error(_0x5caa5f(0x143)+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');const _0x22eccf=await _0x384a9f['mvcRj'](readdir,_0x3e29aa,{'withFileTypes':!![]}),_0x397d25=_0x22eccf['filter'](_0x5e346b=>_0x5e346b[_0x5caa5f(0x118)]())['map'](_0x51fbde=>_0x51fbde[_0x5caa5f(0x147)]);if(_0x397d25[_0x5caa5f(0x146)]===0x0)throw new Error('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x384a9f['NJcVq']);if(_0x397d25[_0x5caa5f(0x146)]===0x1){const _0xeb0e42=_0x397d25[0x0];return console[_0x5caa5f(0x12e)](_0x5caa5f(0x121)+_0xeb0e42),{'name':_0xeb0e42,'path':join(_0x3e29aa,_0xeb0e42)};}throw new Error(_0x5caa5f(0x133)+_0x397d25['join'](',\x20')+_0x5caa5f(0x148));}async function installPluginNonInteractive(){const _0x1c3b1d=_0x2f52,_0x500899={'lTUvL':function(_0x21a0ba,_0x3aa154){return _0x21a0ba(_0x3aa154);},'TZlxQ':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','ICxqM':_0x1c3b1d(0x13f),'eXFCQ':_0x1c3b1d(0x124),'UPsQy':'marketplace','DIKIQ':_0x1c3b1d(0x12c),'DPBeX':_0x1c3b1d(0x129),'OolIF':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','UkjEE':_0x1c3b1d(0x12b),'YDXNm':'Failed\x20to\x20install\x20plugin:'},_0x54382c=await _0x500899['lTUvL'](isPluginInstalled,_0x1c3b1d(0x11b));if(_0x54382c)return console['log'](_0x500899['TZlxQ']),![];console[_0x1c3b1d(0x12e)](_0x1c3b1d(0x123));const _0x41ef96=await isMarketplaceAdded('trailhead');let _0x5435d1=_0x41ef96;if(_0x41ef96)console['log'](_0x500899[_0x1c3b1d(0x155)]);else{const _0x5c2bad=await _0x500899['lTUvL'](runClaudeCommand,[_0x500899[_0x1c3b1d(0x141)],_0x500899['UPsQy'],_0x1c3b1d(0x11d),_0x500899[_0x1c3b1d(0x150)]]);!_0x5c2bad['success']?(console[_0x1c3b1d(0x14e)](_0x500899[_0x1c3b1d(0x144)],_0x5c2bad[_0x1c3b1d(0x14e)]),console[_0x1c3b1d(0x12e)](_0x500899[_0x1c3b1d(0x13d)])):_0x5435d1=!![];}if(_0x5435d1){const _0x3b3dd5=await runClaudeCommand([_0x500899[_0x1c3b1d(0x141)],_0x500899['UkjEE'],_0x1c3b1d(0x11b),_0x1c3b1d(0x151),_0x1c3b1d(0x119)]);!_0x3b3dd5['success']?(console[_0x1c3b1d(0x14e)](_0x500899[_0x1c3b1d(0x156)],_0x3b3dd5[_0x1c3b1d(0x14e)]),console[_0x1c3b1d(0x12e)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0xbaaa45,_0x37c113,_0x2ce745){const _0x31c066=_0x2f52,_0x1b3a00={'VPtzQ':_0x31c066(0x11e),'PfzeL':'auth','uJZsh':'dir_setup','EdCfa':function(_0x3a01f9,_0x25347f){return _0x3a01f9(_0x25347f);},'DWNFO':_0x31c066(0x135),'uFopm':_0x31c066(0x126),'irxSG':'profile_activate','uiSfu':function(_0x4e361a,_0x40dd92,_0x3e36cd){return _0x4e361a(_0x40dd92,_0x3e36cd);},'ToLyK':function(_0x589aa2,_0x2908c5){return _0x589aa2(_0x2908c5);},'iOJoS':function(_0x47b7f8){return _0x47b7f8();},'yudYX':function(_0x2b5073,_0x97b89f){return _0x2b5073(_0x97b89f);},'ZXdXq':_0x31c066(0x125),'eZlPn':'✓\x20Auth\x20state\x20found','HhbUw':function(_0x1fed47,_0xb19424){return _0x1fed47(_0xb19424);},'jmPDX':'skills','GaXhS':function(_0x2e1954,_0x20943d){return _0x2e1954(_0x20943d);},'AHJoK':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x149)]),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['PfzeL']),await authenticate(_0xbaaa45),_0x2ce745?.[_0x31c066(0x13b)]('auth'),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['uJZsh']);const {path:_0x5a758d,installed:_0x8aa47f}=await ensureRangerDir();await _0x1b3a00[_0x31c066(0x142)](writeRangerGitignore,_0x5a758d);const _0x37f061=join(_0x5a758d,_0x31c066(0x11f));!existsSync(_0x37f061)&&await mkdir(_0x37f061,{'recursive':!![]});_0x2ce745?.[_0x31c066(0x13b)]('dir_setup',{'installed':_0x8aa47f}),_0x2ce745?.[_0x31c066(0x12f)](_0x31c066(0x126));let _0xad3201=![];_0x37c113?.['skipChromium']?console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x14a)]):_0xad3201=await ensureChromium();_0x2ce745?.['trackPhaseEnd'](_0x1b3a00[_0x31c066(0x130)],{'installed':_0xad3201,'skipped':!!_0x37c113?.['skipChromium']}),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['irxSG']);const _0x7d6e9d=await findCiProfile(_0x37c113?.[_0x31c066(0x132)]);let _0x26dc96=![];_0x37c113?.['baseUrl']&&(await mkdir(_0x7d6e9d['path'],{'recursive':!![]}),await _0x1b3a00['uiSfu'](saveSettings,_0x7d6e9d['name'],{'baseUrl':_0x37c113[_0x31c066(0x12a)],'headless':!![]}),console[_0x31c066(0x12e)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x37c113['baseUrl']),_0x26dc96=!![]);const _0x71af43=join(_0x7d6e9d[_0x31c066(0x152)],'settings.json');if(!existsSync(_0x71af43)&&!_0x26dc96)throw new Error('CI\x20profile\x20\x22'+_0x7d6e9d[_0x31c066(0x147)]+_0x31c066(0x12d));const _0x239bd9=join(_0x7d6e9d['path'],'auth.json'),_0x1c785c=_0x1b3a00['uiSfu'](join,_0x7d6e9d[_0x31c066(0x152)],'auth.json.enc'),_0x314605=existsSync(_0x239bd9),_0x34969e=_0x1b3a00[_0x31c066(0x134)](existsSync,_0x1c785c);if(_0x34969e)try{const _0xf3feaa=await _0x1b3a00['iOJoS'](getToken);if(!_0xf3feaa)throw new Error(_0x31c066(0x138));const _0x49768a=await _0x1b3a00[_0x31c066(0x11a)](readFile,_0x1c785c);decrypt(_0x49768a,_0xf3feaa),console[_0x31c066(0x12e)](_0x1b3a00['ZXdXq']);}catch(_0x53525d){const _0x47323b=_0x53525d instanceof Error?_0x53525d['message']:String(_0x53525d);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x7d6e9d['name']+_0x31c066(0x136)+_0x47323b);}else _0x314605?console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x120)]):console['log'](_0x31c066(0x13c));await _0x1b3a00[_0x31c066(0x154)](writeActiveProfileName,_0x7d6e9d[_0x31c066(0x147)]),console[_0x31c066(0x12e)](_0x31c066(0x128)+_0x7d6e9d[_0x31c066(0x147)]),_0x2ce745?.['trackPhaseEnd'](_0x1b3a00['irxSG'],{'profileName':_0x7d6e9d['name'],'hasAuth':_0x314605,'hasEncryptedAuth':_0x34969e,'createdSettings':_0x26dc96}),_0x2ce745?.[_0x31c066(0x12f)](_0x31c066(0x124));const _0x400522=await _0x1b3a00[_0x31c066(0x145)](installPluginNonInteractive);_0x2ce745?.[_0x31c066(0x13b)](_0x31c066(0x124),{'installed':_0x400522}),_0x2ce745?.['trackPhaseStart'](_0x1b3a00[_0x31c066(0x127)]),await _0x1b3a00[_0x31c066(0x137)](skillup,{'autoInstall':'project'}),_0x2ce745?.[_0x31c066(0x13b)](_0x31c066(0x13a)),console['log'](_0x1b3a00[_0x31c066(0x13e)]);}function _0x1727(){const _0x310bdf=['AHJoK','✓\x20Marketplace\x20already\x20added','64920ERNEQP','eXFCQ','EdCfa','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','DPBeX','iOJoS','length','name','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','VPtzQ','DWNFO','266qOEgdU','oWJfD','6100ZjvEJv','error','4640355uIsHZn','DIKIQ','--scope','path','34119IwZZnT','HhbUw','ICxqM','YDXNm','4359CzRwfy','1600250jreLqO','isDirectory','project','yudYX','ranger@trailhead','464988wqMGlC','add','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','sessions','eZlPn','Auto-detected\x20CI\x20profile:\x20','nuqQv','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','plugin','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','chromium','jmPDX','✓\x20Active\x20profile:\x20','Failed\x20to\x20add\x20marketplace:','baseUrl','install','ranger-testing/trailhead','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','log','trackPhaseStart','uFopm','2752BxyZph','profile','Multiple\x20CI\x20profiles\x20found:\x20','ToLyK','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x22:\x20','GaXhS','No\x20API\x20token\x20available\x20for\x20decryption','608670gtQBpn','skills','trackPhaseEnd','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','OolIF'];_0x1727=function(){return _0x310bdf;};return _0x1727();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cfb47,_0x2ccba5){const _0x519493=_0x5567,_0x2f9f95=_0x2cfb47();while(!![]){try{const _0x288158=parseInt(_0x519493(0x1ba))/0x1+parseInt(_0x519493(0x1c6))/0x2+-parseInt(_0x519493(0x1d5))/0x3+parseInt(_0x519493(0x1d2))/0x4+-parseInt(_0x519493(0x1bf))/0x5*(parseInt(_0x519493(0x1c3))/0x6)+-parseInt(_0x519493(0x1c9))/0x7+parseInt(_0x519493(0x1d1))/0x8;if(_0x288158===_0x2ccba5)break;else _0x2f9f95['push'](_0x2f9f95['shift']());}catch(_0x417469){_0x2f9f95['push'](_0x2f9f95['shift']());}}}(_0x32b3,0x7374b));function _0x5567(_0x586585,_0x167680){_0x586585=_0x586585-0x1b8;const _0x32b366=_0x32b3();let _0x5567b9=_0x32b366[_0x586585];return _0x5567b9;}import{basename}from'path';import _0x2ef4ef from'inquirer';import{getToken}from'./utils/keychain.js';function _0x32b3(){const _0x4eac6e=['/.claude/skills/','user','6SmuwIz','\x20successfully!\x0a','project','1887318CNSHBV','QRwMF','message','4756640GTtqgU','ranger','cCYxM','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','dbQAL','This\x20project\x20only\x20(','log','\x20<your-api-token>','4030288tcpAKn','1923108UmnRxS','KXSxq','Where\x20should\x20skills\x20be\x20installed?','2538501ugzGUs','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','\x0a✅\x20Installed\x20','\x20--opencode','cZMee','\x20\x202.\x20Run:\x20ranger\x20setup','project-level','/skills/','cqAOD','519898glBdlj','ghpMU','split','To\x20get\x20started:','OxFed','2247630EEatNU','opencode'];_0x32b3=function(){return _0x4eac6e;};return _0x32b3();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x780d3f={}){const _0x141d5e=_0x5567,_0x19363e={'Framu':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','DBrjp':'claude','OxFed':function(_0x5c2218){return _0x5c2218();},'cCYxM':function(_0x25e43b,_0x17c472){return _0x25e43b===_0x17c472;},'KXSxq':_0x141d5e(0x1d8),'AwVch':_0x141d5e(0x1c0),'IgAiq':function(_0x169aa2){return _0x169aa2();},'cqAOD':_0x141d5e(0x1c2),'cZMee':_0x141d5e(0x1d4),'blfyB':_0x141d5e(0x1c5),'NTKLj':'\x0a📦\x20Installing\x20skills...\x0a','izosS':_0x141d5e(0x1ca),'eTBjg':function(_0x56a460,_0x34461b){return _0x56a460>_0x34461b;},'UhhnK':'user-level','dbQAL':function(_0xacf267,_0x32fe1a){return _0xacf267>_0x32fe1a;},'QRwMF':'To\x20use:','ghpMU':_0x141d5e(0x1d6),'KJZmJ':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x141d5e(0x1cf)](_0x19363e['Framu']);const _0x16171e=_0x780d3f['platform']??_0x19363e['DBrjp'],_0x233af4=await _0x19363e['OxFed'](getToken);if(!_0x233af4){const _0x520359='5|1|3|4|0|2'[_0x141d5e(0x1bc)]('|');let _0x559e37=0x0;while(!![]){switch(_0x520359[_0x559e37++]){case'0':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x19363e[_0x141d5e(0x1cb)](_0x16171e,'opencode')?_0x19363e['KXSxq']:'')+'\x0a');continue;case'1':console[_0x141d5e(0x1cf)](_0x141d5e(0x1bd));continue;case'2':return;case'3':console[_0x141d5e(0x1cf)](_0x141d5e(0x1cc));continue;case'4':console[_0x141d5e(0x1cf)](_0x141d5e(0x1da)+(_0x19363e[_0x141d5e(0x1cb)](_0x16171e,_0x19363e['AwVch'])?_0x19363e[_0x141d5e(0x1d3)]:'')+_0x141d5e(0x1d0));continue;case'5':console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;}break;}}console[_0x141d5e(0x1cf)]('✓\x20Found\x20API\x20token');const _0x11cfe2=_0x19363e['IgAiq'](getProjectRoot),_0x5d4cf5=basename(_0x11cfe2),_0x5aa695=_0x16171e===_0x19363e['AwVch']?getOpencodeConfigDir(_0x19363e['cqAOD'])+_0x141d5e(0x1b8):_0x19363e['OxFed'](getClaudeConfigDir)+'/skills/',_0x5bf3f9=_0x19363e['cCYxM'](_0x16171e,_0x141d5e(0x1c0))?_0x11cfe2+'/.opencode/skills/':_0x11cfe2+_0x141d5e(0x1c1),_0x263ebc=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x5a3bb2;if(_0x780d3f['autoInstall'])_0x5a3bb2=_0x780d3f['autoInstall'];else{if(_0x263ebc){const _0x5ce22a=await _0x2ef4ef['prompt']([{'type':'list','name':'installLevel','message':_0x19363e[_0x141d5e(0x1d9)],'choices':[{'name':'All\x20projects\x20('+_0x5aa695+')','value':'user'},{'name':_0x141d5e(0x1ce)+_0x5bf3f9+')','value':_0x141d5e(0x1c5)}]}]);_0x5a3bb2=_0x5ce22a['installLevel'];}else _0x5a3bb2=_0x19363e['blfyB'],console[_0x141d5e(0x1cf)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x5bf3f9+')');}let _0x5abc05=0x0;const _0x424830=_0x19363e[_0x141d5e(0x1be)](getCurrentVersion);console[_0x141d5e(0x1cf)](_0x19363e['NTKLj']);try{const _0x1f4923=await installSkill(_0x19363e['izosS'],{'cliVersion':_0x424830,'level':_0x5a3bb2,'platform':_0x16171e});_0x1f4923&&_0x5abc05++;}catch(_0x361b82){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x361b82 instanceof Error?_0x361b82[_0x141d5e(0x1c8)]:_0x361b82);}if(_0x19363e['eTBjg'](_0x5abc05,0x0)){const _0x52038f=_0x19363e[_0x141d5e(0x1cb)](_0x5a3bb2,_0x19363e[_0x141d5e(0x1b9)])?_0x19363e['UhhnK']:_0x141d5e(0x1db);console['log'](_0x141d5e(0x1d7)+_0x5abc05+'\x20'+_0x52038f+'\x20skill'+(_0x19363e[_0x141d5e(0x1cd)](_0x5abc05,0x1)?'s':'')+_0x141d5e(0x1c4)),!_0x780d3f['suppressUsage']&&(console[_0x141d5e(0x1cf)](_0x19363e[_0x141d5e(0x1c7)]),_0x19363e[_0x141d5e(0x1cb)](_0x16171e,_0x19363e['AwVch'])?console[_0x141d5e(0x1cf)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x141d5e(0x1cf)](_0x19363e[_0x141d5e(0x1bb)]));}else console[_0x141d5e(0x1cf)](_0x19363e['KJZmJ']);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x933dd=_0x416b;(function(_0x1e0e24,_0x30b43b){const _0x25b535=_0x416b,_0x4451c6=_0x1e0e24();while(!![]){try{const _0x33f5cc=parseInt(_0x25b535(0x102))/0x1*(-parseInt(_0x25b535(0xc9))/0x2)+-parseInt(_0x25b535(0xc4))/0x3*(-parseInt(_0x25b535(0xf3))/0x4)+-parseInt(_0x25b535(0xc7))/0x5*(parseInt(_0x25b535(0x110))/0x6)+-parseInt(_0x25b535(0xbc))/0x7+parseInt(_0x25b535(0xcf))/0x8+parseInt(_0x25b535(0x118))/0x9+parseInt(_0x25b535(0xc0))/0xa*(parseInt(_0x25b535(0xcc))/0xb);if(_0x33f5cc===_0x30b43b)break;else _0x4451c6['push'](_0x4451c6['shift']());}catch(_0x5da4d4){_0x4451c6['push'](_0x4451c6['shift']());}}}(_0x121c,0x9664c));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x1f261d 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';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x2fd3e2=>'\x1b[1m'+_0x2fd3e2+_0x933dd(0xcb);function _0x416b(_0x1d92e3,_0x3c7d97){_0x1d92e3=_0x1d92e3-0xbc;const _0x121ca5=_0x121c();let _0x416b39=_0x121ca5[_0x1d92e3];return _0x416b39;}function getPlaywrightVersion(){const _0x2fe9d2=_0x933dd,_0x2a8914={'sQFmU':function(_0x58df48,_0x2666ac){return _0x58df48(_0x2666ac);}};try{const _0x56d2ff=require[_0x2fe9d2(0x131)](_0x2fe9d2(0xf7)),_0xc445e2=_0x2a8914[_0x2fe9d2(0x11d)](require,_0x56d2ff);return _0xc445e2['version'];}catch{return null;}}function installChromiumBinary(_0x572643){const _0x1f0b96=_0x933dd,_0x2d8147={'Voptm':function(_0x536d80,_0x7f6010){return _0x536d80===_0x7f6010;},'cKkSe':function(_0x1ac169,_0x1f3d2d){return _0x1ac169(_0x1f3d2d);},'uQEDV':'chromium','lskRJ':'install','uxXDn':function(_0x50a2c9,_0x54bb35,_0x3dcdbe,_0x2b08e6){return _0x50a2c9(_0x54bb35,_0x3dcdbe,_0x2b08e6);},'jRIiO':_0x1f0b96(0x121),'gDwSE':_0x1f0b96(0x129),'ipHoc':'close','wkCdo':'error'};return new Promise((_0x1bf2d8,_0x505776)=>{const _0x2c4509=_0x1f0b96,_0x3a5b53={'ErNkx':function(_0x2e28a5,_0x58d72b){const _0x4cb999=_0x416b;return _0x2d8147[_0x4cb999(0xf6)](_0x2e28a5,_0x58d72b);},'eIpvW':function(_0xad8d67,_0x59e178){const _0x18834e=_0x416b;return _0x2d8147[_0x18834e(0xc8)](_0xad8d67,_0x59e178);}},_0x231f65=_0x572643?['playwright@'+_0x572643,_0x2c4509(0x10c),_0x2d8147[_0x2c4509(0x133)]]:['playwright',_0x2d8147[_0x2c4509(0x123)],_0x2d8147[_0x2c4509(0x133)]],_0x3a36b8=_0x2d8147[_0x2c4509(0xe7)](spawn,'npx',_0x231f65,{'stdio':_0x2d8147[_0x2c4509(0x10b)],'shell':process[_0x2c4509(0xe3)]===_0x2d8147[_0x2c4509(0xee)]});_0x3a36b8['on'](_0x2d8147[_0x2c4509(0x119)],_0x85ef93=>{const _0x1a22a9=_0x2c4509;_0x3a5b53[_0x1a22a9(0x12c)](_0x85ef93,0x0)?_0x1bf2d8():_0x505776(new Error(_0x1a22a9(0xce)+_0x85ef93));}),_0x3a36b8['on'](_0x2d8147['wkCdo'],_0x53b0b1=>{const _0x27d32f=_0x2c4509;_0x3a5b53[_0x27d32f(0xe0)](_0x505776,_0x53b0b1);});});}export async function authenticate(_0x5cc769){const _0x300406=_0x933dd,_0x12a019={'JORjk':function(_0xf02add,_0x3eabe7){return _0xf02add(_0x3eabe7);},'QfZwn':'existing_token','CtQii':function(_0x11ed16){return _0x11ed16();},'yXbLm':function(_0x558f1a,_0x5ca1f6){return _0x558f1a(_0x5ca1f6);},'IWiMb':_0x300406(0xbe),'WXsRQ':'provided_token'};if(!_0x5cc769){const _0x172bbd=await getToken();if(_0x172bbd){const _0x484d5c=await _0x12a019['JORjk'](getCurrentUser,_0x172bbd);if(_0x484d5c['success'])return console['log'](_0x300406(0x11f)+_0x484d5c[_0x300406(0x109)][_0x300406(0xbf)]),{'token':_0x172bbd,'method':_0x12a019['QfZwn']};}try{_0x5cc769=await _0x12a019['CtQii'](runDeviceAuthFlow);}catch(_0x18cd9c){throw new Error(_0x300406(0x124)+(_0x18cd9c instanceof Error?_0x18cd9c[_0x300406(0xcd)]:_0x18cd9c));}const _0x130cec=await _0x12a019[_0x300406(0x11e)](getCurrentUser,_0x5cc769);if(!_0x130cec['success'])throw new Error(_0x300406(0x12b)+_0x130cec['error']);return console[_0x300406(0x103)](_0x300406(0x108)+_0x130cec[_0x300406(0x109)][_0x300406(0xbf)]),{'token':_0x5cc769,'method':'device_auth'};}console[_0x300406(0x103)](_0x300406(0xdd));const _0x2ce1f4=await _0x12a019[_0x300406(0xd7)](getCurrentUser,_0x5cc769);if(!_0x2ce1f4[_0x300406(0xfe)]){if(_0x2ce1f4['status'])throw new Error(_0x300406(0x124)+_0x2ce1f4[_0x300406(0x11b)]+_0x300406(0x101));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2ce1f4['error']+_0x300406(0xd8));}return console[_0x300406(0x103)]('✓\x20Authenticated\x20to\x20'+_0x2ce1f4['user']['organizationName']),await storeToken(_0x5cc769),console[_0x300406(0x103)](process['env']['GITHUB_ENV']?_0x300406(0xc3):_0x12a019[_0x300406(0x127)]),{'token':_0x5cc769,'method':_0x12a019[_0x300406(0x106)]};}export async function ensureRangerDir(){const _0x528535=_0x933dd,_0x427a90={'crGPe':function(_0x5d9830){return _0x5d9830();},'KVOqV':'.ranger','Jrgsw':function(_0x5d6506){return _0x5d6506();},'DyPAA':function(_0x219d43,_0x5e23e7,_0x4b16e6){return _0x219d43(_0x5e23e7,_0x4b16e6);}},_0x14251a=_0x427a90['crGPe'](findGitRoot),_0x1d9bbc=_0x14251a?join(_0x14251a,_0x427a90[_0x528535(0xe5)]):_0x427a90[_0x528535(0x112)](getRangerDir);return!existsSync(_0x1d9bbc)?(await _0x427a90[_0x528535(0xc1)](mkdir,_0x1d9bbc,{'recursive':!![]}),console[_0x528535(0x103)](_0x528535(0xc2)),{'path':_0x1d9bbc,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1d9bbc,'installed':![]});}export async function ensureChromium(){const _0xe41a5c=_0x933dd,_0x53bdc5={'zVZvJ':_0xe41a5c(0x12f),'tTehA':'install','JahIX':_0xe41a5c(0x11a),'fCJEW':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','OJISF':_0xe41a5c(0x113),'ukmeu':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','ujeSf':_0xe41a5c(0xf5)};let _0xe81186=![];try{const _0xe6389b=chromium[_0xe41a5c(0x105)]();_0xe81186=existsSync(_0xe6389b);}catch{_0xe81186=![];}if(_0xe81186)return console['log'](_0x53bdc5[_0xe41a5c(0x132)]),![];const _0xe82fc5=getPlaywrightVersion(),_0x239a9c=process[_0xe41a5c(0x126)][_0xe41a5c(0xdb)]&&process['stdout']['isTTY'];let _0x2b39bf=!![];if(_0x239a9c){const {install:_0x508279}=await _0x1f261d[_0xe41a5c(0x107)]([{'type':'confirm','name':_0x53bdc5['tTehA'],'message':_0xe82fc5?_0xe41a5c(0xeb)+_0xe82fc5+_0xe41a5c(0x111):_0x53bdc5['JahIX'],'default':!![]}]);_0x2b39bf=_0x508279;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0xe82fc5?'\x20'+_0xe82fc5:'')+'...');if(_0x2b39bf){console[_0xe41a5c(0x103)](_0xe41a5c(0xe8));try{await installChromiumBinary(_0xe82fc5),console[_0xe41a5c(0x103)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x440320){console[_0xe41a5c(0x11b)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x440320 instanceof Error?_0x440320['message']:_0x440320),console[_0xe41a5c(0x103)](_0x53bdc5['fCJEW']),_0xe82fc5?console['log']('\x20\x20npx\x20playwright@'+_0xe82fc5+'\x20install\x20chromium'):console[_0xe41a5c(0x103)](_0x53bdc5[_0xe41a5c(0xfa)]);}}else console['log'](_0x53bdc5['ukmeu']),console['log'](_0x53bdc5['ujeSf']),_0xe82fc5?console[_0xe41a5c(0x103)]('\x20\x20npx\x20playwright@'+_0xe82fc5+'\x20install\x20chromium'):console[_0xe41a5c(0x103)](_0xe41a5c(0x113));return!![];}export async function writeRangerGitignore(_0x66f2da){const _0x5e0c91=_0x933dd,_0x5588b8={'YGXOu':_0x5e0c91(0xd6),'buRdp':function(_0x430b53,_0x23cd79,_0x286388){return _0x430b53(_0x23cd79,_0x286388);}},_0x488a39=join(_0x66f2da,_0x5588b8['YGXOu']),_0xd31860='\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 _0x5588b8['buRdp'](writeFile,_0x488a39,_0xd31860),console['log'](_0x5e0c91(0x115));}function _0x121c(){const _0x581b32=['lskRJ','Authentication\x20failed:\x20','stdout','stdin','IWiMb','use\x20until\x20the\x20session\x20expires.\x0a','win32','✓\x20Local\x20profile\x20already\x20exists','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','ErNkx','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','No\x20git\x20repository\x20found','✓\x20Playwright\x20Chromium\x20browser\x20found','qOoUk','resolve','zVZvJ','uQEDV','6056491MPvluG','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','✓\x20Stored\x20credentials\x20locally','organizationName','2650120Zlxdek','DyPAA','✓\x20Created\x20.ranger/\x20directory','✓\x20Exported\x20credentials\x20for\x20CI','3CcgzmV','local','skipped','5XEjDkx','cKkSe','2WStYIg','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','\x1b[0m','55uwNxnk','message','Installation\x20failed\x20with\x20exit\x20code\x20','6097824smNJFL','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','LMjUk','\x0a🚀\x20Ranger\x20Setup\x0a','alGmi','trackPhaseError','.gitignore','yXbLm','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','qsbdU','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','isTTY','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','Validating\x20API\x20token...','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','eIpvW','trackPhaseStart','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','platform','profile','KVOqV','ranger\x20profile\x20add\x20local','uxXDn','\x0aInstalling\x20Chromium\x20browser...\x0a','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','skills','The\x20required\x20version\x20(','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','icGWC','gDwSE','ranger','/ranger:enable','force','zMusc','1202956eGtRPC','\x0aIn\x20Claude\x20Code,\x20run\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','Voptm','playwright/package.json','skipChromium','iCKIs','OJISF','vFdij','plugin','VYSey','success','trackPhaseEnd','method','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','992183dLKyOY','log','scope','executablePath','WXsRQ','prompt','✓\x20Authenticated\x20to\x20','user','rKBdy','jRIiO','install','wantsProfile','OrgKE','rHXyS','4294518Ozaztq',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','Jrgsw','\x20\x20npx\x20playwright\x20install\x20chromium','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','✓\x20Created\x20.ranger/.gitignore','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','url','7210206TpoGjd','ipHoc','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','error','chromium','sQFmU','JORjk','✓\x20Already\x20authenticated\x20to\x20','sGLJU','inherit','warn'];_0x121c=function(){return _0x581b32;};return _0x121c();}function printProfileSetupLaterInstructions(){const _0x274ba6=_0x933dd,_0x4fd1b7={'kwRgA':function(_0x326f49,_0x2f9c66){return _0x326f49(_0x2f9c66);},'vFdij':_0x274ba6(0xe6)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x4fd1b7['kwRgA'](bold,_0x4fd1b7[_0x274ba6(0xfb)])),console[_0x274ba6(0x103)](_0x274ba6(0xd1));}async function ensureLocalEnv(_0x4dfdd0,_0x40e9cd){const _0x3b56f8=_0x933dd,_0x2f02b6={'XAHiG':function(_0x2ffda6,_0x5324b0,_0x189073){return _0x2ffda6(_0x5324b0,_0x189073);},'rKBdy':_0x3b56f8(0xc5),'zMusc':_0x3b56f8(0x12a),'elfjy':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','TQZcn':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','icGWC':_0x3b56f8(0x128),'Eksnp':_0x3b56f8(0x114),'sGLJU':function(_0x3185d2){return _0x3185d2();},'nYCBK':'\x0a❌\x20Profile\x20setup\x20failed:','VYSey':function(_0x5e2aad){return _0x5e2aad();}};if(!findGitRoot())return console['log'](_0x3b56f8(0xda)),{'ready':![],'skipped':!![]};if(_0x2f02b6['XAHiG'](findExistingEnv,_0x2f02b6[_0x3b56f8(0x10a)],{'locations':[_0x2f02b6['rKBdy']]}))return console['log'](_0x2f02b6[_0x3b56f8(0xf2)]),{'ready':!![],'skipped':![]};const _0x4734fe=process[_0x3b56f8(0x126)][_0x3b56f8(0xdb)]&&process['stdout']['isTTY'];if(_0x4734fe&&!_0x4dfdd0?.[_0x3b56f8(0x117)]){console['log'](_0x3b56f8(0xd0)),console['log'](_0x2f02b6['elfjy']),console['log'](_0x2f02b6['TQZcn']),console['log'](_0x2f02b6[_0x3b56f8(0xed)]),console[_0x3b56f8(0x103)](_0x2f02b6['Eksnp']);const {wantsProfile:_0x5e01fa}=await _0x1f261d['prompt']([{'type':'confirm','name':_0x3b56f8(0x10d),'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x5e01fa)return _0x2f02b6[_0x3b56f8(0x120)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv('local',{'url':_0x4dfdd0?.['url'],'force':_0x4dfdd0?.['force']},_0x40e9cd),{'ready':!![],'skipped':![]};}catch(_0xe60c72){return console[_0x3b56f8(0x11b)](_0x2f02b6['nYCBK'],_0xe60c72 instanceof Error?_0xe60c72[_0x3b56f8(0xcd)]:_0xe60c72),_0x2f02b6[_0x3b56f8(0xfd)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x3716d9,_0x24b9da,_0x3887ae){const _0x27ff84=_0x933dd,_0x16e583={'TDMoO':_0x27ff84(0xd3),'cpQPF':_0x27ff84(0x12d),'PzasF':'git_check','qsbdU':function(_0x5b6fcd){return _0x5b6fcd();},'nbcrd':_0x27ff84(0x12e),'MFPMC':_0x27ff84(0xca),'rHXyS':'auth','dHDUY':function(_0x4fbb93,_0x5c24bb){return _0x4fbb93(_0x5c24bb);},'sPRTA':_0x27ff84(0x11c),'eBkKk':_0x27ff84(0xe2),'OrgKE':'plugin','qOoUk':function(_0x3d96c9,_0xcfd9ff,_0xc8ff9f){return _0x3d96c9(_0xcfd9ff,_0xc8ff9f);},'XFPve':function(_0x232536,_0x57fbef){return _0x232536 instanceof _0x57fbef;},'iCKIs':'skills','LMjUk':_0x27ff84(0xe4),'alGmi':_0x27ff84(0x116),'skmes':_0x27ff84(0xf0)};console['log'](_0x16e583['TDMoO']);const _0x44a21e=process['stdin'][_0x27ff84(0xdb)]&&process[_0x27ff84(0x125)][_0x27ff84(0xdb)];!_0x44a21e&&!_0x24b9da?.[_0x27ff84(0x104)]&&(console[_0x27ff84(0x103)](_0x16e583['cpQPF']),_0x24b9da={..._0x24b9da,'scope':'user'});_0x3887ae?.[_0x27ff84(0xe1)](_0x16e583['PzasF']);if(!_0x16e583[_0x27ff84(0xd9)](findGitRoot)){await _0x3887ae?.[_0x27ff84(0xd5)]('git_check',new Error(_0x16e583['nbcrd']));throw new Error(_0x16e583['MFPMC']);}_0x3887ae?.[_0x27ff84(0xff)](_0x16e583['PzasF']);const _0x8dd532=!existsSync(getRangerDir()),{path:_0x4cdbf4}=await _0x16e583['qsbdU'](ensureRangerDir);_0x3887ae?.['trackPhaseStart'](_0x16e583[_0x27ff84(0x10f)]);const _0x3a64b3=await _0x16e583['dHDUY'](authenticate,_0x3716d9);_0x3887ae?.['trackPhaseEnd'](_0x16e583[_0x27ff84(0x10f)],{'isFirstRun':_0x8dd532,'method':_0x3a64b3[_0x27ff84(0x100)]}),_0x3887ae?.['trackPhaseStart'](_0x16e583['sPRTA']);_0x24b9da?.[_0x27ff84(0xf8)]?console['log'](_0x16e583['eBkKk']):await ensureChromium();_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0x11c),{'isFirstRun':_0x8dd532,'skipped':!!_0x24b9da?.[_0x27ff84(0xf8)]}),await writeRangerGitignore(_0x4cdbf4),console[_0x27ff84(0x103)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x1c0b46=_0x24b9da?.[_0x27ff84(0x104)],_0x5bf95f=_0x24b9da?.['opencode']??![];let _0xb09d23=null;_0x5bf95f?(_0x3887ae?.[_0x27ff84(0xe1)](_0x27ff84(0xfc)),_0xb09d23=await _0x16e583['dHDUY'](ensureOpencodePluginConfig,_0x1c0b46),_0x3887ae?.['trackPhaseEnd'](_0x16e583[_0x27ff84(0x10e)],{'isFirstRun':_0x8dd532,'opencode':!![]})):(_0x3887ae?.[_0x27ff84(0xe1)](_0x27ff84(0xfc)),await ensureClaudePlugin(_0x1c0b46),_0x3887ae?.['trackPhaseEnd'](_0x27ff84(0xfc),{'isFirstRun':_0x8dd532}));if(_0x5bf95f&&_0xb09d23){_0x3887ae?.['trackPhaseStart'](_0x27ff84(0xea));try{await _0x16e583['qOoUk'](installSkill,_0x27ff84(0xef),{'level':_0xb09d23[_0x27ff84(0x104)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x3887ae?.['trackPhaseEnd']('skills',{'isFirstRun':_0x8dd532,'opencode':!![]});}catch(_0x55ef95){console[_0x27ff84(0x122)](_0x27ff84(0xe9),_0x16e583['XFPve'](_0x55ef95,Error)?_0x55ef95['message']:_0x55ef95),_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0xea),{'isFirstRun':_0x8dd532,'opencode':!![],'failed':!![]});}}else _0x3887ae?.['trackPhaseStart'](_0x16e583[_0x27ff84(0xf9)]),await _0x16e583['dHDUY'](ensureClaudeSkills,_0x1c0b46),_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0xea),{'isFirstRun':_0x8dd532});if(!_0x44a21e&&!_0x24b9da?.[_0x27ff84(0x117)])console[_0x27ff84(0x103)](_0x27ff84(0xbd)),console[_0x27ff84(0x103)]('\x20\x20'+_0x16e583['dHDUY'](bold,_0x27ff84(0xe6))+'\x0a');else{_0x3887ae?.['trackPhaseStart'](_0x16e583['LMjUk']);const _0x1b6c64=await _0x16e583[_0x27ff84(0x130)](ensureLocalEnv,{'url':_0x24b9da?.[_0x27ff84(0x117)],'force':_0x24b9da?.[_0x27ff84(0xf1)]},_0x3887ae);_0x3887ae?.[_0x27ff84(0xff)](_0x16e583[_0x27ff84(0xd2)],{'isFirstRun':_0x8dd532,'profileReady':_0x1b6c64['ready'],'userSkipped':_0x1b6c64[_0x27ff84(0xc6)]}),_0x1b6c64['ready']&&console[_0x27ff84(0x103)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x5bf95f)console[_0x27ff84(0x103)](_0x27ff84(0xde)),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x27ff84(0xdc)),console[_0x27ff84(0x103)](_0x16e583[_0x27ff84(0xd4)]);else{const _0x3b4661=_0x16e583['dHDUY'](bold,_0x16e583['skmes']);console['log'](_0x27ff84(0xf4)+_0x3b4661+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x27ff84(0xec)+_0x27ff84(0xdf));}}
|
|
1
|
+
function _0x1612(_0x4be04e,_0xafb220){_0x4be04e=_0x4be04e-0x19f;const _0x11991d=_0x1199();let _0x161278=_0x11991d[_0x4be04e];return _0x161278;}const _0x459500=_0x1612;(function(_0x918425,_0x1ecc43){const _0x18ac32=_0x1612,_0x15f8ff=_0x918425();while(!![]){try{const _0x28842b=-parseInt(_0x18ac32(0x1eb))/0x1*(-parseInt(_0x18ac32(0x1c5))/0x2)+parseInt(_0x18ac32(0x1af))/0x3+-parseInt(_0x18ac32(0x1d5))/0x4+parseInt(_0x18ac32(0x19f))/0x5+parseInt(_0x18ac32(0x1c7))/0x6+parseInt(_0x18ac32(0x1d1))/0x7*(-parseInt(_0x18ac32(0x1d7))/0x8)+-parseInt(_0x18ac32(0x1f2))/0x9;if(_0x28842b===_0x1ecc43)break;else _0x15f8ff['push'](_0x15f8ff['shift']());}catch(_0x28eaae){_0x15f8ff['push'](_0x15f8ff['shift']());}}}(_0x1199,0xb2de8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x26aa00 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';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x11c18d=>'\x1b[1m'+_0x11c18d+_0x459500(0x1be);function getPlaywrightVersion(){const _0x4bc7f4=_0x459500,_0x14333a={'gcxdG':_0x4bc7f4(0x1b9),'zByDN':function(_0x29e94f,_0x2fb737){return _0x29e94f(_0x2fb737);}};try{const _0x15a4cc=require['resolve'](_0x14333a[_0x4bc7f4(0x1ea)]),_0x561b54=_0x14333a['zByDN'](require,_0x15a4cc);return _0x561b54['version'];}catch{return null;}}function installChromiumBinary(_0x45d23c){const _0x159da1=_0x459500,_0x3063f9={'xhslA':function(_0x1e69cf,_0x1d3cdc){return _0x1e69cf(_0x1d3cdc);},'kAyuP':function(_0x3b355f,_0x4def32){return _0x3b355f===_0x4def32;},'IkEUq':'install','FzQCr':'chromium','KNIWx':_0x159da1(0x1f3),'nxGtf':function(_0x4c25f0,_0x96f99e,_0x5a1b28,_0x133aae){return _0x4c25f0(_0x96f99e,_0x5a1b28,_0x133aae);},'hECqK':'npx','xdpyI':_0x159da1(0x200),'ptSFd':'close'};return new Promise((_0xc16592,_0x2632e)=>{const _0x1d76f4=_0x159da1,_0x28c7ec={'LGcQP':function(_0x5ea7cf,_0x2b6caa){return _0x3063f9['kAyuP'](_0x5ea7cf,_0x2b6caa);},'itGaB':function(_0x5bdd08,_0x4042c2){return _0x5bdd08(_0x4042c2);}},_0x914fa3=_0x45d23c?[_0x1d76f4(0x1ef)+_0x45d23c,_0x3063f9[_0x1d76f4(0x1c6)],_0x3063f9['FzQCr']]:[_0x3063f9[_0x1d76f4(0x1aa)],_0x3063f9[_0x1d76f4(0x1c6)],_0x3063f9['FzQCr']],_0xb0dabf=_0x3063f9[_0x1d76f4(0x1da)](spawn,_0x3063f9['hECqK'],_0x914fa3,{'stdio':_0x3063f9['xdpyI'],'shell':_0x3063f9[_0x1d76f4(0x1fb)](process['platform'],_0x1d76f4(0x1ca))});_0xb0dabf['on'](_0x3063f9[_0x1d76f4(0x208)],_0x590340=>{const _0x532074=_0x1d76f4;_0x28c7ec[_0x532074(0x1cb)](_0x590340,0x0)?_0xc16592():_0x28c7ec['itGaB'](_0x2632e,new Error(_0x532074(0x1f0)+_0x590340));}),_0xb0dabf['on'](_0x1d76f4(0x1c0),_0xc03327=>{_0x3063f9['xhslA'](_0x2632e,_0xc03327);});});}export async function authenticate(_0x5e0885){const _0x2db778=_0x459500,_0x5a6a33={'JrMlK':function(_0x4344b2){return _0x4344b2();},'ZRNHu':'existing_token','IWOzi':function(_0x2838cb,_0x5d564a){return _0x2838cb(_0x5d564a);},'xqzPQ':'Validating\x20API\x20token...','ApJJc':'✓\x20Exported\x20credentials\x20for\x20CI','UGGpW':_0x2db778(0x1d0)};if(!_0x5e0885){const _0x27fbf8=await _0x5a6a33[_0x2db778(0x1cd)](getToken);if(_0x27fbf8){const _0x5a0d6c=await getCurrentUser(_0x27fbf8);if(_0x5a0d6c['success'])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x5a0d6c[_0x2db778(0x1f1)]['organizationName']),{'token':_0x27fbf8,'method':_0x5a6a33['ZRNHu']};}try{_0x5e0885=await runDeviceAuthFlow();}catch(_0x253667){throw new Error(_0x2db778(0x20a)+(_0x253667 instanceof Error?_0x253667['message']:_0x253667));}const _0x14f7d7=await _0x5a6a33['IWOzi'](getCurrentUser,_0x5e0885);if(!_0x14f7d7[_0x2db778(0x206)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x14f7d7['error']);return console['log'](_0x2db778(0x1f5)+_0x14f7d7['user'][_0x2db778(0x1e1)]),{'token':_0x5e0885,'method':_0x2db778(0x1a6)};}console[_0x2db778(0x1d6)](_0x5a6a33['xqzPQ']);const _0x136da8=await getCurrentUser(_0x5e0885);if(!_0x136da8[_0x2db778(0x206)]){if(_0x136da8[_0x2db778(0x1b0)])throw new Error('Authentication\x20failed:\x20'+_0x136da8['error']+_0x2db778(0x1cc));else throw new Error(_0x2db778(0x1bf)+_0x136da8[_0x2db778(0x1c0)]+_0x2db778(0x1b1));}return console[_0x2db778(0x1d6)]('✓\x20Authenticated\x20to\x20'+_0x136da8[_0x2db778(0x1f1)]['organizationName']),await _0x5a6a33[_0x2db778(0x1b6)](storeToken,_0x5e0885),console['log'](process[_0x2db778(0x1ba)][_0x2db778(0x1e0)]?_0x5a6a33['ApJJc']:_0x2db778(0x1f4)),{'token':_0x5e0885,'method':_0x5a6a33[_0x2db778(0x1c9)]};}function _0x1199(){const _0x22b0bc=['plugin','rWpTv','inherit','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','eynoS','\x0a❌\x20Profile\x20setup\x20failed:','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','tpQVZ','success','auth','ptSFd','HkJhJ','Authentication\x20failed:\x20','IGlab','6597870hzMhfG','\x20\x20npx\x20playwright\x20install\x20chromium','OGOyS','prompt','peVtS','ujaIz','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','device_auth','stdin','TboHd','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','KNIWx','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','Mogkf','\x20and\x20prompt\x20the\x20coding','FZYyX','1835115fFBFQh','status','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','zxScQ','trackPhaseStart','trackPhaseEnd','force','IWOzi','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','qIBut','playwright/package.json','env','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','\x20install\x20chromium','chromium','\x1b[0m','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','error','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','The\x20required\x20version\x20(','\x0aInstalling\x20Chromium\x20browser...\x0a','confirm','362tvgwgW','IkEUq','4722222RrfWDw','url','UGGpW','win32','LGcQP','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','JrMlK','git_check','isTTY','provided_token','4711UBPtFP','NcGvf','WcwrQ','sRWRH','3354960PXYnHZ','log','16832ONUOLX','scope','profile','nxGtf','wantsProfile','stdout','skills','jtVcE','✓\x20Created\x20.ranger/.gitignore','GITHUB_ENV','organizationName','method','cVIkT','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','hUFtD','SPeMI','ZdxuY','\x0a🚀\x20Ranger\x20Setup\x0a','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','gcxdG','4567QxSGuP','local','DGWoY','ckZyl','playwright@','Installation\x20failed\x20with\x20exit\x20code\x20','user','5018067DZmsye','playwright','✓\x20Stored\x20credentials\x20locally','✓\x20Authenticated\x20to\x20','✓\x20.ranger/\x20directory\x20already\x20exists','hdcEN','ready','\x0aIn\x20Claude\x20Code,\x20run\x20','ranger\x20profile\x20add\x20local','kAyuP','\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','bdEOt'];_0x1199=function(){return _0x22b0bc;};return _0x1199();}export async function ensureRangerDir(){const _0x3bd94b=_0x459500,_0x3ded88={'QTkkW':function(_0x5b58ec,_0x1d9484,_0x3dc6bf){return _0x5b58ec(_0x1d9484,_0x3dc6bf);},'WcwrQ':'.ranger','RLlbp':function(_0xa6daa2){return _0xa6daa2();},'qIBut':function(_0x59ca8e,_0x3243f7){return _0x59ca8e(_0x3243f7);},'eynoS':_0x3bd94b(0x1f6)},_0x44d8b1=findGitRoot(),_0x2f9c58=_0x44d8b1?_0x3ded88['QTkkW'](join,_0x44d8b1,_0x3ded88[_0x3bd94b(0x1d3)]):_0x3ded88['RLlbp'](getRangerDir);return!_0x3ded88[_0x3bd94b(0x1b8)](existsSync,_0x2f9c58)?(await mkdir(_0x2f9c58,{'recursive':!![]}),console[_0x3bd94b(0x1d6)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x2f9c58,'installed':!![]}):(console[_0x3bd94b(0x1d6)](_0x3ded88[_0x3bd94b(0x202)]),{'path':_0x2f9c58,'installed':![]});}export async function ensureChromium(){const _0x554c0a=_0x459500,_0xe9ba09={'FAdAP':'✓\x20Playwright\x20Chromium\x20browser\x20found','jtVcE':function(_0x5c2694){return _0x5c2694();},'tpQVZ':'confirm','pNVHN':_0x554c0a(0x1a5),'ZKPaC':_0x554c0a(0x1c3),'NcGvf':function(_0xfe7968,_0x58dd4f){return _0xfe7968(_0x58dd4f);},'jfgwO':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','OdWfW':_0x554c0a(0x1a0)};let _0x223865=![];try{const _0x1b9cf1=chromium['executablePath']();_0x223865=existsSync(_0x1b9cf1);}catch{_0x223865=![];}if(_0x223865)return console[_0x554c0a(0x1d6)](_0xe9ba09['FAdAP']),![];const _0x479659=_0xe9ba09[_0x554c0a(0x1de)](getPlaywrightVersion),_0x36c1f0=process[_0x554c0a(0x1a7)][_0x554c0a(0x1cf)]&&process['stdout']['isTTY'];let _0x73e0ca=!![];if(_0x36c1f0){const {install:_0xc99644}=await _0x26aa00[_0x554c0a(0x1a2)]([{'type':_0xe9ba09[_0x554c0a(0x205)],'name':'install','message':_0x479659?_0x554c0a(0x1c2)+_0x479659+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0xe9ba09['pNVHN'],'default':!![]}]);_0x73e0ca=_0xc99644;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x479659?'\x20'+_0x479659:'')+'...');if(_0x73e0ca){console[_0x554c0a(0x1d6)](_0xe9ba09['ZKPaC']);try{await _0xe9ba09[_0x554c0a(0x1d2)](installChromiumBinary,_0x479659),console[_0x554c0a(0x1d6)](_0x554c0a(0x1a9));}catch(_0xf3a515){console[_0x554c0a(0x1c0)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0xf3a515 instanceof Error?_0xf3a515['message']:_0xf3a515),console[_0x554c0a(0x1d6)](_0xe9ba09['jfgwO']),_0x479659?console['log']('\x20\x20npx\x20playwright@'+_0x479659+_0x554c0a(0x1bc)):console[_0x554c0a(0x1d6)]('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console[_0x554c0a(0x1d6)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),_0x479659?console['log']('\x20\x20npx\x20playwright@'+_0x479659+'\x20install\x20chromium'):console[_0x554c0a(0x1d6)](_0xe9ba09['OdWfW']);return!![];}export async function writeRangerGitignore(_0x525f0a){const _0x253e35=_0x459500,_0x3d0511={'ckZyl':_0x253e35(0x1df)},_0x33aa2e=join(_0x525f0a,'.gitignore'),_0x57a614=_0x253e35(0x1fc);await writeFile(_0x33aa2e,_0x57a614),console[_0x253e35(0x1d6)](_0x3d0511[_0x253e35(0x1ee)]);}function printProfileSetupLaterInstructions(){const _0x3c8648=_0x459500,_0x5b0a0f={'SaRKX':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','DGWoY':function(_0x1d469a,_0x4d07db){return _0x1d469a(_0x4d07db);}};console[_0x3c8648(0x1d6)](_0x5b0a0f['SaRKX']),console['log']('\x20\x20'+_0x5b0a0f[_0x3c8648(0x1ed)](bold,_0x3c8648(0x1fa))),console[_0x3c8648(0x1d6)]('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}async function ensureLocalEnv(_0x2b2cdf,_0xfa12cc){const _0x1fb0c6=_0x459500,_0x5bc6f6={'ujaIz':function(_0x411f7b,_0x3c3217,_0x5d3529){return _0x411f7b(_0x3c3217,_0x5d3529);},'TboHd':_0x1fb0c6(0x1ec),'bDAjW':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','SPeMI':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','bdEOt':'use\x20until\x20the\x20session\x20expires.\x0a','FZYyX':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','PXGCb':_0x1fb0c6(0x1c4),'cVIkT':_0x1fb0c6(0x1db),'IGlab':function(_0x551a37){return _0x551a37();},'KDNHw':function(_0x5731f2,_0x1eb30b,_0x128e7f,_0x58667f){return _0x5731f2(_0x1eb30b,_0x128e7f,_0x58667f);}};if(!findGitRoot())return console[_0x1fb0c6(0x1d6)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x5bc6f6[_0x1fb0c6(0x1a4)](findExistingEnv,_0x5bc6f6['TboHd'],{'locations':[_0x1fb0c6(0x1ec)]}))return console[_0x1fb0c6(0x1d6)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x546657=process[_0x1fb0c6(0x1a7)][_0x1fb0c6(0x1cf)]&&process[_0x1fb0c6(0x1dc)]['isTTY'];if(_0x546657&&!_0x2b2cdf?.['url']){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log'](_0x5bc6f6['bDAjW']),console['log'](_0x5bc6f6[_0x1fb0c6(0x1e6)]),console['log'](_0x5bc6f6[_0x1fb0c6(0x1fd)]),console['log'](_0x5bc6f6[_0x1fb0c6(0x1ae)]);const {wantsProfile:_0x40e729}=await _0x26aa00[_0x1fb0c6(0x1a2)]([{'type':_0x5bc6f6['PXGCb'],'name':_0x5bc6f6[_0x1fb0c6(0x1e3)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x40e729)return _0x5bc6f6[_0x1fb0c6(0x20b)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x5bc6f6['KDNHw'](addEnv,_0x5bc6f6[_0x1fb0c6(0x1a8)],{'url':_0x2b2cdf?.[_0x1fb0c6(0x1c8)],'force':_0x2b2cdf?.['force']},_0xfa12cc),{'ready':!![],'skipped':![]};}catch(_0x42c196){return console['error'](_0x1fb0c6(0x203),_0x42c196 instanceof Error?_0x42c196['message']:_0x42c196),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x206310,_0x355141,_0x1faa87){const _0xbc4dfe=_0x459500,_0x27efa8={'bYxqF':'user','dNsCe':_0xbc4dfe(0x1ce),'YlGoR':function(_0x3da4b5,_0x6d27e8){return _0x3da4b5(_0x6d27e8);},'weRsc':function(_0x1dc201){return _0x1dc201();},'GVLGN':_0xbc4dfe(0x207),'hUFtD':'chromium','ZdxuY':_0xbc4dfe(0x1ab),'peVtS':'plugin','dTRtP':function(_0x3dde69,_0x662dcc){return _0x3dde69(_0x662dcc);},'rWpTv':'skills','HkJhJ':function(_0xa019a1,_0x35363f,_0x5d772f){return _0xa019a1(_0x35363f,_0x5d772f);},'SiNOc':'ranger','hdcEN':function(_0x38cbef){return _0x38cbef();},'xqLeb':'ranger\x20profile\x20add\x20local','zxScQ':_0xbc4dfe(0x201),'Mogkf':_0xbc4dfe(0x1bb),'sRWRH':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','qPiPz':function(_0xa922be,_0x1df8d7){return _0xa922be(_0x1df8d7);},'MlAyv':'/ranger:enable','OGOyS':function(_0x26f60a,_0x3a9806){return _0x26f60a+_0x3a9806;}};console[_0xbc4dfe(0x1d6)](_0xbc4dfe(0x1e8));const _0x5a6347=process[_0xbc4dfe(0x1a7)]['isTTY']&&process[_0xbc4dfe(0x1dc)][_0xbc4dfe(0x1cf)];!_0x5a6347&&!_0x355141?.[_0xbc4dfe(0x1d8)]&&(console[_0xbc4dfe(0x1d6)]('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x355141={..._0x355141,'scope':_0x27efa8['bYxqF']});_0x1faa87?.[_0xbc4dfe(0x1b3)]('git_check');if(!findGitRoot()){await _0x1faa87?.['trackPhaseError'](_0x27efa8['dNsCe'],new Error('No\x20git\x20repository\x20found'));throw new Error(_0xbc4dfe(0x1e9));}_0x1faa87?.['trackPhaseEnd'](_0x27efa8['dNsCe']);const _0x8182c=!_0x27efa8['YlGoR'](existsSync,_0x27efa8['weRsc'](getRangerDir)),{path:_0x53fd57}=await ensureRangerDir();_0x1faa87?.['trackPhaseStart'](_0x27efa8['GVLGN']);const _0x5f50ba=await authenticate(_0x206310);_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x207),{'isFirstRun':_0x8182c,'method':_0x5f50ba[_0xbc4dfe(0x1e2)]}),_0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8[_0xbc4dfe(0x1e5)]);_0x355141?.['skipChromium']?console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1e7)]):await _0x27efa8['weRsc'](ensureChromium);_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x1bd),{'isFirstRun':_0x8182c,'skipped':!!_0x355141?.['skipChromium']}),await writeRangerGitignore(_0x53fd57),console[_0xbc4dfe(0x1d6)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0xc7fb52=_0x355141?.[_0xbc4dfe(0x1d8)],_0x32b914=_0x355141?.['opencode']??![];let _0x3483a7=null;_0x32b914?(_0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8[_0xbc4dfe(0x1a3)]),_0x3483a7=await _0x27efa8['dTRtP'](ensureOpencodePluginConfig,_0xc7fb52),_0x1faa87?.['trackPhaseEnd'](_0x27efa8['peVtS'],{'isFirstRun':_0x8182c,'opencode':!![]})):(_0x1faa87?.['trackPhaseStart'](_0x27efa8['peVtS']),await ensureClaudePlugin(_0xc7fb52),_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x1fe),{'isFirstRun':_0x8182c}));if(_0x32b914&&_0x3483a7){_0x1faa87?.['trackPhaseStart'](_0x27efa8[_0xbc4dfe(0x1ff)]);try{await _0x27efa8[_0xbc4dfe(0x209)](installSkill,_0x27efa8['SiNOc'],{'level':_0x3483a7['scope'],'cliVersion':_0x27efa8[_0xbc4dfe(0x1f7)](getCurrentVersion),'platform':'opencode'}),_0x1faa87?.[_0xbc4dfe(0x1b4)](_0x27efa8['rWpTv'],{'isFirstRun':_0x8182c,'opencode':!![]});}catch(_0x544741){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x544741 instanceof Error?_0x544741['message']:_0x544741),_0x1faa87?.['trackPhaseEnd'](_0xbc4dfe(0x1dd),{'isFirstRun':_0x8182c,'opencode':!![],'failed':!![]});}}else _0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8['rWpTv']),await ensureClaudeSkills(_0xc7fb52),_0x1faa87?.[_0xbc4dfe(0x1b4)]('skills',{'isFirstRun':_0x8182c});if(!_0x5a6347&&!_0x355141?.['url'])console['log'](_0xbc4dfe(0x1b7)),console['log']('\x20\x20'+bold(_0x27efa8['xqLeb'])+'\x0a');else{_0x1faa87?.['trackPhaseStart'](_0xbc4dfe(0x1d9));const _0x14d8e7=await ensureLocalEnv({'url':_0x355141?.[_0xbc4dfe(0x1c8)],'force':_0x355141?.[_0xbc4dfe(0x1b5)]},_0x1faa87);_0x1faa87?.['trackPhaseEnd']('profile',{'isFirstRun':_0x8182c,'profileReady':_0x14d8e7[_0xbc4dfe(0x1f8)],'userSkipped':_0x14d8e7['skipped']}),_0x14d8e7['ready']&&console[_0xbc4dfe(0x1d6)](_0xbc4dfe(0x1e4));}if(_0x32b914)console['log'](_0x27efa8[_0xbc4dfe(0x1b2)]),console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1ac)]),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1d4)]);else{const _0x23ede4=_0x27efa8['qPiPz'](bold,_0x27efa8['MlAyv']);console['log'](_0x27efa8[_0xbc4dfe(0x1a1)](_0xbc4dfe(0x1f9)+_0x23ede4+_0xbc4dfe(0x1ad),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0xbc4dfe(0x204)+_0xbc4dfe(0x1c1));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e2ecf=_0x1aa3;(function(_0x3a5014,_0x3ce99e){const _0x350576=_0x1aa3,_0x2d0194=_0x3a5014();while(!![]){try{const _0x2e2322=parseInt(_0x350576(0xd2))/0x1+-parseInt(_0x350576(0x10e))/0x2*(-parseInt(_0x350576(0xfa))/0x3)+parseInt(_0x350576(0x117))/0x4+-parseInt(_0x350576(0xfb))/0x5*(-parseInt(_0x350576(0xcc))/0x6)+-parseInt(_0x350576(0x101))/0x7*(-parseInt(_0x350576(0xe3))/0x8)+-parseInt(_0x350576(0x109))/0x9+-parseInt(_0x350576(0xb9))/0xa*(parseInt(_0x350576(0xbe))/0xb);if(_0x2e2322===_0x3ce99e)break;else _0x2d0194['push'](_0x2d0194['shift']());}catch(_0x21a339){_0x2d0194['push'](_0x2d0194['shift']());}}}(_0x45ad,0x72fd5));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';function _0x1aa3(_0x2bba6c,_0x6cb708){_0x2bba6c=_0x2bba6c-0xaf;const _0x45ada0=_0x45ad();let _0x1aa30d=_0x45ada0[_0x2bba6c];return _0x1aa30d;}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x4b26f3=>'\x1b[1m'+_0x4b26f3+_0x4e2ecf(0xf5),link=(_0xfea85d,_0x3b2887)=>'\x1b]8;;file://'+_0xfea85d+'\x07'+(_0x3b2887||_0xfea85d)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4776bd=_0x4e2ecf,_0x40bf3b={'NbqAw':function(_0x1b6a81,_0xcbc62e){return _0x1b6a81(_0xcbc62e);},'JNYza':'not_configured','mRmFl':_0x4776bd(0xdc),'Opnyv':function(_0x57b74b,_0x1d8e32,_0x16e863,_0x3f7c9b){return _0x57b74b(_0x1d8e32,_0x16e863,_0x3f7c9b);},'vAtCO':'opencode','OLamI':'config','kzyta':_0x4776bd(0x10a),'YQFoH':_0x4776bd(0xc9)};return new Promise(_0x5e16d3=>{const _0x480ca3=_0x4776bd,_0x511604={'FMrhy':_0x40bf3b[_0x480ca3(0xd6)]},_0x328e0a=_0x40bf3b[_0x480ca3(0x115)](spawn,_0x40bf3b['vAtCO'],['debug',_0x40bf3b['OLamI']],{'stdio':[_0x480ca3(0xf7),'pipe','pipe']});let _0x5b5e1a='';_0x328e0a[_0x480ca3(0xd0)]?.['on']('data',_0x2a28b9=>{const _0x380640=_0x480ca3;_0x5b5e1a+=_0x2a28b9[_0x380640(0x10f)]();}),_0x328e0a[_0x480ca3(0x118)]?.['on'](_0x480ca3(0xcd),_0x328b35=>{const _0x3a76dd=_0x480ca3;_0x5b5e1a+=_0x328b35[_0x3a76dd(0x10f)]();}),_0x328e0a['on'](_0x40bf3b['kzyta'],()=>{_0x5e16d3({'status':_0x511604['FMrhy']});}),_0x328e0a['on'](_0x40bf3b['YQFoH'],_0x14220a=>{const _0x543dce=_0x480ca3,_0x1b4c88={'coMdu':_0x543dce(0x111)};if(_0x14220a!==0x0){_0x5e16d3({'status':_0x543dce(0xdc)});return;}const _0x52cb77=_0x5b5e1a['trim']();let _0x49e9d5=null;if(_0x52cb77)try{_0x49e9d5=JSON['parse'](_0x52cb77);}catch{const _0x4daf1e=_0x52cb77[_0x543dce(0xb4)](/\{[\s\S]*\}$/);if(_0x4daf1e)try{_0x49e9d5=JSON[_0x543dce(0xb0)](_0x4daf1e[0x0]);}catch{_0x49e9d5=null;}}const _0x179344=Array[_0x543dce(0xbc)](_0x49e9d5?.[_0x543dce(0xf3)])?_0x49e9d5?.['plugin']:[],_0x4f56fa=_0x179344['some'](_0x577ff8=>{const _0x3aaf64=_0x543dce;if(typeof _0x577ff8!=='string')return![];return _0x577ff8['includes']('@ranger-testing/opencode-plugin')||_0x577ff8['includes'](_0x1b4c88[_0x3aaf64(0x114)]);});if(_0x4f56fa){_0x40bf3b['NbqAw'](_0x5e16d3,{'status':_0x543dce(0xf2),'details':_0x179344['length']>0x0?_0x179344[_0x543dce(0x107)]+_0x543dce(0xfd):undefined});return;}if(_0x179344['length']>0x0){_0x40bf3b[_0x543dce(0xf0)](_0x5e16d3,{'status':_0x40bf3b[_0x543dce(0xeb)],'details':_0x179344['length']+_0x543dce(0xfd)});return;}_0x40bf3b[_0x543dce(0xf0)](_0x5e16d3,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x24342d,_0x5483c6){const _0x188a55=_0x4e2ecf,_0x4c03d5={'uYeQO':function(_0x54ead9,_0x5cc9fb){return _0x54ead9(_0x5cc9fb);},'oKVsp':function(_0x283999,_0x359b75,_0x4c619f,_0x304580){return _0x283999(_0x359b75,_0x4c619f,_0x304580);},'CCnet':'SKILL.md','kveXJ':function(_0x26b14f,_0x455c2d,_0x276c9a){return _0x26b14f(_0x455c2d,_0x276c9a);}};if(!_0x4c03d5['uYeQO'](existsSync,_0x24342d))return[];const _0x4d0e14=[];try{const _0x1cd9ef=await readdir(_0x24342d,{'withFileTypes':!![]});for(const _0x371c7e of _0x1cd9ef){if(_0x371c7e[_0x188a55(0xb8)]()){const _0x21760b=_0x4c03d5[_0x188a55(0xb7)](join,_0x24342d,_0x371c7e[_0x188a55(0xdb)],_0x4c03d5[_0x188a55(0x102)]);if(existsSync(_0x21760b)){let _0x3d0196=_0x371c7e[_0x188a55(0xdb)];try{const _0x207ee4=await _0x4c03d5[_0x188a55(0xd3)](readFile,_0x21760b,'utf-8'),_0x5c93b5=_0x207ee4[_0x188a55(0xb4)](/name:\s*(.+)/);_0x5c93b5&&(_0x3d0196=_0x5c93b5[0x1]['trim']());}catch{}_0x4d0e14['push']({'name':_0x371c7e[_0x188a55(0xdb)],'displayName':_0x3d0196,'path':_0x21760b,'level':_0x5483c6});}}}}catch{return[];}return _0x4d0e14;}function _0x45ad(){const _0x392141=['uJtBH','project','encrypted','disabled','length','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','1121427WcuFFA','error','zoUoi','thEPF','details','1237526vVVapk','toString','\x20\x20Run:\x20ranger\x20update','opencode-plugin','rLEUe','No\x20profiles\x20configured','coMdu','Opnyv','\x20\x20\x20\x20Settings:\x20','432528fdBaUv','stderr','ocjTj','includes','parse','mNblU','ZAeuv','himZd','match','\x20(latest:\x20','CvqeE','oKVsp','isDirectory','16322270uSJsWx','cwd','user','isArray','path','11YcspBi','Version:\x20','ewlwA','ranger@trailhead','kWvbl','No\x20skills\x20installed','filter','OOCtg','Organization:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','lyowf','close','log',':\x20configured','636SzjaHc','data','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','map','stdout','eaHjg','543350UvyCpC','kveXJ','isActive','status','mRmFl','\x0a---\x20Skills\x20---','\x20\x20\x20\x20Auth:\x20','kWELz','API\x20Environment:\x20','name','not_installed','CQBYl','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','settingsPath','\x20\x20Run:\x20ranger\x20skillup','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','vfExH','32YoTnYw','displayName','JnORv','\x20\x20Not\x20installed','hasPlaintextAuth','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Not\x20configured','join','JNYza','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20setup\x20[token]','(not\x20found)','DEBUG','NbqAw','lAGdE','configured','plugin','none','\x1b[0m','WmFTj','ignore','\x0a---\x20Profiles\x20---','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','3VYDieN','22585HvdwKe','gCTWb','\x20plugin(s)\x20configured','API\x20URL:\x20','not_configured','ogBdp','837865FXHszV','CCnet'];_0x45ad=function(){return _0x392141;};return _0x45ad();}async function getInstalledSkills(){const _0x49361e=_0x4e2ecf,_0x3148f2={'rLEUe':function(_0x438686,_0x2047ad,_0x2cee83){return _0x438686(_0x2047ad,_0x2cee83);},'CvqeE':_0x49361e(0x104),'rsXSN':function(_0x4a1706){return _0x4a1706();}},[_0x5288f6,_0x5117f3]=await Promise['all']([_0x3148f2[_0x49361e(0x112)](getSkillsFromDir,getProjectSkillsDir(),_0x3148f2[_0x49361e(0xb6)]),getSkillsFromDir(_0x3148f2['rsXSN'](getUserSkillsDir),_0x49361e(0xbb))]);return{'project':_0x5288f6,'user':_0x5117f3};}async function getEnvironments(){const _0x2e4b55=_0x4e2ecf,_0x2c305d={'wubSk':'settings.json','OTjya':function(_0x38e721,_0x5980ba){return _0x38e721(_0x5980ba);},'iJaiV':function(_0x267bb6,_0x4b751d){return _0x267bb6===_0x4b751d;}},{envNames:_0xc638ea,activeEnv:_0x3420db}=await getEnvNames(),_0x14ba61=getRangerDir();if(!existsSync(_0x14ba61))return{'envs':[],'activeEnv':null};const _0x59674e=_0xc638ea[_0x2e4b55(0xcf)](_0x50b9a9=>{const _0x4a53eb=_0x2e4b55,_0x39fce3=getEnvDir(_0x50b9a9),_0x43f517=join(_0x39fce3,_0x2c305d['wubSk']),_0x22a82f=join(_0x39fce3,'auth.json'),_0x1c6507=join(_0x39fce3,'auth.json.enc');return{'name':_0x50b9a9,'settingsPath':_0x2c305d['OTjya'](existsSync,_0x43f517)?_0x43f517:_0x4a53eb(0xee),'hasPlaintextAuth':existsSync(_0x22a82f),'hasEncryptedAuth':_0x2c305d['OTjya'](existsSync,_0x1c6507),'isActive':_0x2c305d['iJaiV'](_0x50b9a9,_0x3420db)};});return{'envs':_0x59674e,'activeEnv':_0x3420db};}export async function status(){const _0x51b418=_0x4e2ecf,_0x5bf406={'OOCtg':function(_0x1cae35,_0x468ddb){return _0x1cae35(_0x468ddb);},'JnORv':function(_0x14bb7b,_0x44b485,_0x2548ed){return _0x14bb7b(_0x44b485,_0x2548ed);},'ewlwA':function(_0x545b32,_0x46c53f){return _0x545b32(_0x46c53f);},'gCTWb':function(_0x160124){return _0x160124();},'thEPF':function(_0x1cab4a){return _0x1cab4a();},'KyJyd':function(_0xefe8fd){return _0xefe8fd();},'uBvDY':'\x0a---\x20OpenCode\x20Plugin\x20---','ZAeuv':_0x51b418(0xf2),'XoFpX':function(_0x1385fc,_0x4a1c33){return _0x1385fc===_0x4a1c33;},'zoUoi':_0x51b418(0xff),'lyowf':_0x51b418(0xe9),'jpwCZ':_0x51b418(0xde),'CQBYl':function(_0x5e01f4,_0x14302d){return _0x5e01f4(_0x14302d);},'eVWEu':'unknown','himZd':'enabled','Jgwul':_0x51b418(0xc1),'ZDpyA':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','ocjTj':_0x51b418(0xd7),'NqVPP':function(_0x107495,_0x2ce572){return _0x107495===_0x2ce572;},'kWELz':_0x51b418(0xc3),'lAGdE':function(_0xfaeee,_0x23866b){return _0xfaeee>_0x23866b;},'ogBdp':'\x20\x20User-level:','eaHjg':function(_0x3423f1,_0x1b2a95){return _0x3423f1(_0x1b2a95);},'mNblU':_0x51b418(0xf8),'kWvbl':function(_0xf3609c,_0x47d570){return _0xf3609c===_0x47d570;},'eFKfb':_0x51b418(0x113),'vfExH':'plaintext','NTOwd':function(_0x78b97d,_0xbbdd8c){return _0x78b97d!==_0xbbdd8c;},'WmFTj':'(not\x20found)','uJtBH':function(_0x3236fa,_0xa26c1b,_0x3c6bdf){return _0x3236fa(_0xa26c1b,_0x3c6bdf);},'nGoxV':function(_0x400d97,_0x18853a){return _0x400d97(_0x18853a);}};console['log']('\x0a📊\x20Ranger\x20Status\x0a');const _0x4de0f6=process[_0x51b418(0xba)](),_0x555174=getRangerDir();if(!_0x5bf406[_0x51b418(0xc5)](existsSync,_0x555174)){console[_0x51b418(0xca)]('Root:\x20'+_0x5bf406[_0x51b418(0xe5)](link,_0x4de0f6,_0x5bf406['ewlwA'](bold,_0x5bf406[_0x51b418(0xc0)](basename,_0x4de0f6)))),console[_0x51b418(0xca)](_0x51b418(0xf9)),console[_0x51b418(0xca)](_0x51b418(0xe1));return;}console[_0x51b418(0xca)]('Root:\x20'+link(_0x4de0f6,bold(_0x5bf406[_0x51b418(0xc5)](basename,_0x4de0f6))));const _0x53ba01=getCurrentVersion(),_0x8570b=_0x5bf406[_0x51b418(0xfc)](getLatestVersion);if(_0x8570b&&_0x8570b!==_0x53ba01)console['log'](_0x51b418(0xbf)+_0x53ba01+_0x51b418(0xb5)+_0x8570b+')'),console['log'](_0x51b418(0x110));else _0x8570b?console[_0x51b418(0xca)]('Version:\x20'+_0x53ba01+_0x51b418(0xec)):console['log'](_0x51b418(0xbf)+_0x53ba01);const _0x1f54df=await _0x5bf406['gCTWb'](getToken);if(_0x1f54df){const _0x172fce=await getCurrentUser(_0x1f54df);_0x172fce['success']?console[_0x51b418(0xca)](_0x51b418(0xc6)+bold(_0x172fce['user']['organizationName'])):(console[_0x51b418(0xca)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x51b418(0xca)](_0x51b418(0xed)));}else console[_0x51b418(0xca)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x51b418(0xed));process['env'][_0x51b418(0xef)]&&(console['log'](_0x51b418(0xda)+_0x5bf406[_0x51b418(0x10c)](getCurrentEnvironment)),console[_0x51b418(0xca)](_0x51b418(0xfe)+_0x5bf406['KyJyd'](getApiBaseUrl)));console[_0x51b418(0xca)](_0x5bf406['uBvDY']);const _0x45b565=await _0x5bf406['gCTWb'](getOpencodePluginStatus);if(_0x45b565[_0x51b418(0xd5)]===_0x5bf406[_0x51b418(0xb2)])console['log']('\x20\x20'+_0x5bf406[_0x51b418(0xc0)](bold,'@ranger-testing/opencode-plugin')+_0x51b418(0xcb)),_0x45b565[_0x51b418(0x10d)]&&console[_0x51b418(0xca)]('\x20\x20'+_0x45b565['details']);else _0x5bf406['XoFpX'](_0x45b565[_0x51b418(0xd5)],_0x5bf406[_0x51b418(0x10b)])?(console['log'](_0x5bf406[_0x51b418(0xc8)]),_0x45b565[_0x51b418(0x10d)]&&console[_0x51b418(0xca)]('\x20\x20'+_0x45b565['details']),console[_0x51b418(0xca)](_0x51b418(0xe8))):console[_0x51b418(0xca)](_0x5bf406['jpwCZ']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x2b4eb4=await _0x5bf406[_0x51b418(0xdd)](getPluginInfo,_0x51b418(0xc1));if(_0x2b4eb4){const _0x3fb43e=_0x2b4eb4['scope']||_0x5bf406['eVWEu'],_0x20de91=_0x2b4eb4['enabled']?_0x5bf406[_0x51b418(0xb3)]:_0x51b418(0x106);console['log']('\x20\x20'+_0x5bf406[_0x51b418(0xc5)](bold,_0x5bf406['Jgwul'])+':\x20installed\x20('+_0x3fb43e+',\x20'+_0x20de91+')');}else console['log'](_0x51b418(0xe6)),console['log'](_0x5bf406['ZDpyA']);console[_0x51b418(0xca)](_0x5bf406[_0x51b418(0x119)]);const {project:_0x6fa40f,user:_0x1f3287}=await getInstalledSkills(),_0xc3fd6b=_0x6fa40f['filter'](_0xab2062=>RANGER_MANAGED_SKILLS[_0x51b418(0xaf)](_0xab2062[_0x51b418(0xdb)])),_0x3ef988=_0x1f3287[_0x51b418(0xc4)](_0x4126c5=>RANGER_MANAGED_SKILLS['includes'](_0x4126c5['name'])),_0x2c3629=_0xc3fd6b[_0x51b418(0x107)]+_0x3ef988[_0x51b418(0x107)];if(_0x5bf406['NqVPP'](_0x2c3629,0x0))console['log'](_0x5bf406[_0x51b418(0xd9)]),console['log'](_0x51b418(0xe0));else{if(_0xc3fd6b['length']>0x0){console[_0x51b418(0xca)]('\x20\x20Project-level:');for(const _0x1d1d18 of _0xc3fd6b){console[_0x51b418(0xca)]('\x20\x20\x20\x20'+bold(_0x1d1d18[_0x51b418(0xe4)])+':\x20'+_0x5bf406[_0x51b418(0xe5)](link,_0x1d1d18[_0x51b418(0xbd)],basename(_0x1d1d18[_0x51b418(0xbd)])));}}if(_0x5bf406[_0x51b418(0xf1)](_0x3ef988[_0x51b418(0x107)],0x0)){console['log'](_0x5bf406[_0x51b418(0x100)]);for(const _0x3c9c6c of _0x3ef988){console['log']('\x20\x20\x20\x20'+bold(_0x3c9c6c[_0x51b418(0xe4)])+':\x20'+link(_0x3c9c6c[_0x51b418(0xbd)],_0x5bf406[_0x51b418(0xd1)](basename,_0x3c9c6c['path'])));}}}console['log'](_0x5bf406[_0x51b418(0xb1)]);const {envs:_0x324388,activeEnv:_0x42628c}=await _0x5bf406[_0x51b418(0x10c)](getEnvironments);if(_0x5bf406[_0x51b418(0xc2)](_0x324388['length'],0x0))console['log'](_0x5bf406['eFKfb']),console[_0x51b418(0xca)](_0x51b418(0xce));else{for(const _0x174721 of _0x324388){const _0x5861df=_0x174721[_0x51b418(0xd4)]?'\x20(active)':'',_0x299bda=_0x174721['hasEncryptedAuth']?_0x51b418(0x105):_0x174721[_0x51b418(0xe7)]?_0x5bf406[_0x51b418(0xe2)]:_0x51b418(0xf4);console['log']('\x20\x20'+bold(_0x174721['name'])+_0x5861df),console['log'](_0x51b418(0xd8)+_0x299bda),_0x5bf406['NTOwd'](_0x174721[_0x51b418(0xdf)],_0x5bf406[_0x51b418(0xf6)])&&console['log'](_0x51b418(0x116)+_0x5bf406[_0x51b418(0x103)](link,_0x174721[_0x51b418(0xdf)],_0x5bf406['nGoxV'](basename,_0x174721['settingsPath'])));}!_0x42628c&&(console[_0x51b418(0xca)](_0x51b418(0xc7)),console['log'](_0x51b418(0x108)+_0x324388['map'](_0x1b99c8=>_0x1b99c8[_0x51b418(0xdb)])[_0x51b418(0xea)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
function _0x3195(_0x372de8,_0x5e58ed){_0x372de8=_0x372de8-0x1e6;const _0x3d905e=_0x3d90();let _0x3195d9=_0x3d905e[_0x372de8];return _0x3195d9;}const _0x592d58=_0x3195;(function(_0x32dd88,_0x1f4125){const _0x3463b1=_0x3195,_0x44df14=_0x32dd88();while(!![]){try{const _0x3e9e22=-parseInt(_0x3463b1(0x22c))/0x1*(-parseInt(_0x3463b1(0x223))/0x2)+parseInt(_0x3463b1(0x225))/0x3+parseInt(_0x3463b1(0x251))/0x4*(-parseInt(_0x3463b1(0x229))/0x5)+parseInt(_0x3463b1(0x245))/0x6*(parseInt(_0x3463b1(0x24b))/0x7)+-parseInt(_0x3463b1(0x1e6))/0x8*(parseInt(_0x3463b1(0x23c))/0x9)+-parseInt(_0x3463b1(0x1fd))/0xa*(-parseInt(_0x3463b1(0x231))/0xb)+-parseInt(_0x3463b1(0x208))/0xc*(parseInt(_0x3463b1(0x1fe))/0xd);if(_0x3e9e22===_0x1f4125)break;else _0x44df14['push'](_0x44df14['shift']());}catch(_0x3a8f51){_0x44df14['push'](_0x44df14['shift']());}}}(_0x3d90,0xbf722));function _0x3d90(){const _0x5db431=['36bGUxBg','config','\x20\x20\x20\x20','utf-8','log','ZPsqn','twzhe','disabled','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','organizationName','dQMKk','\x1b[1m','push','plaintext','hasEncryptedAuth','yhilE','LRAEs','success','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','(not\x20found)','znJrA','user','fLWUt','\x20\x20Run:\x20ranger\x20setup\x20--opencode','ucrdx','PYGkc','encrypted','4jJlhLk','JzOPZ','569688kpwcuf','ZNHkS','bdgIh','\x20\x20Run:\x20ranger\x20update','31805aCTCWk','not_configured','join','378722OdOTNh','plugin','\x20(latest:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','version','649JQaWAO','isDirectory','auth.json','\x20(active)','GOwFG','yJOxY','YRGgH','map','name','enabled','\x0a📊\x20Ranger\x20Status\x0a','211995eWTkCh','includes','settings.json','Version:\x20','stdout','lqUbp','GNGrm','dRKGN','dmpRT','5286BxTagW','nbice','lQCTw','path','details',':\x20installed\x20(','4403cEUKbT','\x0a---\x20Skills\x20---','data','close','\x20\x20Not\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]','416jnsFSu','not_installed','Root:\x20','RntKp','SoLjb','length','56xZmXEM','OWFla','\x0a---\x20Profiles\x20---','toString','filter','trim','displayName','\x0a---\x20OpenCode\x20Plugin\x20---','ignore','vFcLq','some','HDeHG','ranger@trailhead','cwd','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','settingsPath','none','match','\x20plugin(s)\x20configured','opencode','Gyojh','project','22490qgDbsH','102219LDmiRM','DEBUG','pipe','Organization:\x20','configured','AUjuG','NbxZG','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','HQpBk','No\x20profiles\x20configured'];_0x3d90=function(){return _0x5db431;};return _0x3d90();}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=_0x1648dd=>_0x592d58(0x213)+_0x1648dd+'\x1b[0m',link=(_0x2300dc,_0x39fdb7)=>'\x1b]8;;file://'+_0x2300dc+'\x07'+(_0x39fdb7||_0x2300dc)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0xbd3329=_0x592d58,_0x54a28f={'cnXXv':'not_installed','WoFvx':function(_0x23fb22,_0x206b74){return _0x23fb22(_0x206b74);},'kFRla':function(_0x3f35c2,_0x382a65){return _0x3f35c2>_0x382a65;},'BiuNW':function(_0x46723e,_0x28a4c2){return _0x46723e(_0x28a4c2);},'odbcQ':function(_0x27fa25,_0xe0fc4){return _0x27fa25(_0xe0fc4);},'fLWUt':_0xbd3329(0x22a),'znJrA':function(_0x404b94,_0x303293,_0x5d5179,_0x5b8252){return _0x404b94(_0x303293,_0x5d5179,_0x5b8252);},'fVdQk':'debug','UCGoM':'pipe','fqarR':_0xbd3329(0x24d),'MDOrV':'error'};return new Promise(_0x2953bf=>{const _0x15e540=_0xbd3329,_0x1d93bc=_0x54a28f[_0x15e540(0x21c)](spawn,_0x15e540(0x1fa),[_0x54a28f['fVdQk'],_0x15e540(0x209)],{'stdio':[_0x15e540(0x1ee),_0x15e540(0x200),_0x54a28f['UCGoM']]});let _0x487b9a='';_0x1d93bc[_0x15e540(0x240)]?.['on'](_0x54a28f['fqarR'],_0x3b9a84=>{_0x487b9a+=_0x3b9a84['toString']();}),_0x1d93bc['stderr']?.['on']('data',_0x4f95b2=>{const _0x1e0b87=_0x15e540;_0x487b9a+=_0x4f95b2[_0x1e0b87(0x1e9)]();}),_0x1d93bc['on'](_0x54a28f['MDOrV'],()=>{const _0x1cb650=_0x15e540;_0x2953bf({'status':_0x1cb650(0x252)});}),_0x1d93bc['on'](_0x15e540(0x24e),_0x34d4b3=>{const _0x568606=_0x15e540,_0x2b6088={'bYLwa':function(_0x3e1674,_0x2e0aab){return _0x3e1674!==_0x2e0aab;},'WwUuw':'@ranger-testing/opencode-plugin','fiXwG':'opencode-plugin'};if(_0x34d4b3!==0x0){_0x2953bf({'status':_0x54a28f['cnXXv']});return;}const _0x590610=_0x487b9a['trim']();let _0x5d866d=null;if(_0x590610)try{_0x5d866d=JSON['parse'](_0x590610);}catch{const _0x127349=_0x590610[_0x568606(0x1f8)](/\{[\s\S]*\}$/);if(_0x127349)try{_0x5d866d=JSON['parse'](_0x127349[0x0]);}catch{_0x5d866d=null;}}const _0xc9391b=Array['isArray'](_0x5d866d?.[_0x568606(0x22d)])?_0x5d866d?.[_0x568606(0x22d)]:[],_0x19248e=_0xc9391b[_0x568606(0x1f0)](_0x5e140a=>{const _0x614357=_0x568606;if(_0x2b6088['bYLwa'](typeof _0x5e140a,'string'))return![];return _0x5e140a['includes'](_0x2b6088['WwUuw'])||_0x5e140a[_0x614357(0x23d)](_0x2b6088['fiXwG']);});if(_0x19248e){_0x54a28f['WoFvx'](_0x2953bf,{'status':'configured','details':_0xc9391b[_0x568606(0x256)]>0x0?_0xc9391b[_0x568606(0x256)]+_0x568606(0x1f9):undefined});return;}if(_0x54a28f['kFRla'](_0xc9391b[_0x568606(0x256)],0x0)){_0x54a28f['BiuNW'](_0x2953bf,{'status':_0x568606(0x22a),'details':_0xc9391b[_0x568606(0x256)]+_0x568606(0x1f9)});return;}_0x54a28f['odbcQ'](_0x2953bf,{'status':_0x54a28f[_0x568606(0x21e)]});});});}async function getSkillsFromDir(_0x4ab1c6,_0x142ab9){const _0x58c36d=_0x592d58,_0x54ac03={'mluFK':function(_0x3639ba,_0x57b1e7){return _0x3639ba(_0x57b1e7);},'dRKGN':function(_0x154871,_0x372006,_0x33d9da){return _0x154871(_0x372006,_0x33d9da);},'GOwFG':function(_0x3f5c60,_0x4ab3c4,_0x59b579,_0x212d0d){return _0x3f5c60(_0x4ab3c4,_0x59b579,_0x212d0d);},'lqUbp':function(_0x19e5fb,_0x122842){return _0x19e5fb(_0x122842);},'GzFWR':_0x58c36d(0x20b)};if(!_0x54ac03['mluFK'](existsSync,_0x4ab1c6))return[];const _0x42c38f=[];try{const _0x22a7e6=await _0x54ac03[_0x58c36d(0x243)](readdir,_0x4ab1c6,{'withFileTypes':!![]});for(const _0x14313b of _0x22a7e6){if(_0x14313b[_0x58c36d(0x232)]()){const _0x1c7778=_0x54ac03[_0x58c36d(0x235)](join,_0x4ab1c6,_0x14313b['name'],'SKILL.md');if(_0x54ac03[_0x58c36d(0x241)](existsSync,_0x1c7778)){let _0x21e10c=_0x14313b[_0x58c36d(0x239)];try{const _0x3726c2=await readFile(_0x1c7778,_0x54ac03['GzFWR']),_0x3b4eeb=_0x3726c2['match'](/name:\s*(.+)/);_0x3b4eeb&&(_0x21e10c=_0x3b4eeb[0x1][_0x58c36d(0x1eb)]());}catch{}_0x42c38f[_0x58c36d(0x214)]({'name':_0x14313b[_0x58c36d(0x239)],'displayName':_0x21e10c,'path':_0x1c7778,'level':_0x142ab9});}}}}catch{return[];}return _0x42c38f;}async function getInstalledSkills(){const _0x58c447=_0x592d58,_0x13543a={'PYGkc':function(_0x444d20,_0x3812a8,_0x527eae){return _0x444d20(_0x3812a8,_0x527eae);},'zHGJY':_0x58c447(0x1fc)},[_0x466763,_0x448ba8]=await Promise['all']([_0x13543a[_0x58c447(0x221)](getSkillsFromDir,getProjectSkillsDir(),_0x13543a['zHGJY']),_0x13543a['PYGkc'](getSkillsFromDir,getUserSkillsDir(),_0x58c447(0x21d))]);return{'project':_0x466763,'user':_0x448ba8};}async function getEnvironments(){const _0x303ddb=_0x592d58,_0x23b48b={'OWFla':function(_0x232608,_0x1f0075,_0xe89814){return _0x232608(_0x1f0075,_0xe89814);},'nbice':_0x303ddb(0x21b),'twzhe':function(_0xf335b8,_0x49f9a6){return _0xf335b8(_0x49f9a6);},'bdgIh':function(_0x36c466){return _0x36c466();}},{envNames:_0x4f8c75,activeEnv:_0x4240ec}=await _0x23b48b[_0x303ddb(0x227)](getEnvNames),_0x343239=_0x23b48b[_0x303ddb(0x227)](getRangerDir);if(!existsSync(_0x343239))return{'envs':[],'activeEnv':null};const _0x3580d=_0x4f8c75['map'](_0xd17f5d=>{const _0x3e9038=_0x303ddb,_0x395b45=getEnvDir(_0xd17f5d),_0x13ce81=_0x23b48b['OWFla'](join,_0x395b45,_0x3e9038(0x23e)),_0x17c304=_0x23b48b[_0x3e9038(0x1e7)](join,_0x395b45,_0x3e9038(0x233)),_0x459e49=_0x23b48b[_0x3e9038(0x1e7)](join,_0x395b45,'auth.json.enc');return{'name':_0xd17f5d,'settingsPath':existsSync(_0x13ce81)?_0x13ce81:_0x23b48b[_0x3e9038(0x246)],'hasPlaintextAuth':existsSync(_0x17c304),'hasEncryptedAuth':_0x23b48b[_0x3e9038(0x20e)](existsSync,_0x459e49),'isActive':_0xd17f5d===_0x4240ec};});return{'envs':_0x3580d,'activeEnv':_0x4240ec};}export async function status(){const _0x28c5fd=_0x592d58,_0x115dc5={'ZPsqn':function(_0x30fecb,_0x3ed29f){return _0x30fecb(_0x3ed29f);},'ZNHkS':function(_0x35206d,_0x42ee68,_0x4a55b3){return _0x35206d(_0x42ee68,_0x4a55b3);},'eGcbL':function(_0x444f28,_0x1882b1,_0x3b1af0){return _0x444f28(_0x1882b1,_0x3b1af0);},'ucrdx':function(_0xe39446){return _0xe39446();},'lQCTw':function(_0x3efc00,_0xeb24d7){return _0x3efc00!==_0xeb24d7;},'Gyojh':function(_0x18d5a4){return _0x18d5a4();},'vFcLq':function(_0x3782b,_0x4e4ae3){return _0x3782b(_0x4e4ae3);},'HDeHG':_0x28c5fd(0x202),'yhilE':function(_0x444589,_0x208060){return _0x444589===_0x208060;},'dmpRT':_0x28c5fd(0x24f),'YRGgH':_0x28c5fd(0x21f),'GNGrm':_0x28c5fd(0x21a),'LRAEs':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','NbxZG':'enabled','yJOxY':_0x28c5fd(0x20f),'Wuujl':_0x28c5fd(0x1f2),'Maqyv':function(_0x2f4c28,_0x2b2c41){return _0x2f4c28+_0x2b2c41;},'RntKp':function(_0x22cad2,_0x1d0e77){return _0x22cad2(_0x1d0e77);},'AUjuG':function(_0x35c87e,_0x322dcc){return _0x35c87e(_0x322dcc);},'JzOPZ':function(_0x32c099,_0xa7290e){return _0x32c099>_0xa7290e;},'JOtas':_0x28c5fd(0x207),'GEsXr':_0x28c5fd(0x234),'SoLjb':function(_0x4ab2e0,_0x1fb6b5){return _0x4ab2e0!==_0x1fb6b5;},'HQpBk':'(not\x20found)','dQMKk':function(_0x124a59,_0x2cb044,_0x3f8adc){return _0x124a59(_0x2cb044,_0x3f8adc);},'DWxRa':function(_0x5553b3,_0x10a118){return _0x5553b3(_0x10a118);}};console[_0x28c5fd(0x20c)](_0x28c5fd(0x23b));const _0x4b9277=process[_0x28c5fd(0x1f3)](),_0x38e6f1=getRangerDir();if(!_0x115dc5[_0x28c5fd(0x20d)](existsSync,_0x38e6f1)){console['log']('Root:\x20'+_0x115dc5[_0x28c5fd(0x226)](link,_0x4b9277,bold(basename(_0x4b9277)))),console[_0x28c5fd(0x20c)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x28c5fd(0x20c)](_0x28c5fd(0x210));return;}console['log'](_0x28c5fd(0x253)+_0x115dc5['eGcbL'](link,_0x4b9277,bold(basename(_0x4b9277))));const _0xcc4368=_0x115dc5['ucrdx'](getCurrentVersion),_0x5914be=getLatestVersion();if(_0x5914be[_0x28c5fd(0x230)]&&_0x115dc5[_0x28c5fd(0x247)](_0x5914be['version'],_0xcc4368))console[_0x28c5fd(0x20c)](_0x28c5fd(0x23f)+_0xcc4368+_0x28c5fd(0x22e)+_0x5914be[_0x28c5fd(0x230)]+')'),console[_0x28c5fd(0x20c)](_0x28c5fd(0x228));else _0x5914be[_0x28c5fd(0x230)]?console['log'](_0x28c5fd(0x23f)+_0xcc4368+_0x28c5fd(0x1f4)):console[_0x28c5fd(0x20c)](_0x28c5fd(0x23f)+_0xcc4368);const _0x534350=await _0x115dc5[_0x28c5fd(0x1fb)](getToken);if(_0x534350){const _0x370ea5=await _0x115dc5[_0x28c5fd(0x1ef)](getCurrentUser,_0x534350);_0x370ea5[_0x28c5fd(0x219)]?console[_0x28c5fd(0x20c)](_0x28c5fd(0x201)+_0x115dc5[_0x28c5fd(0x1ef)](bold,_0x370ea5['user'][_0x28c5fd(0x211)])):(console[_0x28c5fd(0x20c)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x28c5fd(0x20c)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x28c5fd(0x250));process['env'][_0x28c5fd(0x1ff)]&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+_0x115dc5[_0x28c5fd(0x220)](getApiBaseUrl)));console[_0x28c5fd(0x20c)](_0x28c5fd(0x1ed));const _0x57c2ba=await getOpencodePluginStatus();if(_0x57c2ba['status']===_0x115dc5[_0x28c5fd(0x1f1)])console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x57c2ba[_0x28c5fd(0x249)]&&console[_0x28c5fd(0x20c)]('\x20\x20'+_0x57c2ba[_0x28c5fd(0x249)]);else _0x115dc5[_0x28c5fd(0x217)](_0x57c2ba['status'],_0x28c5fd(0x22a))?(console['log'](_0x115dc5[_0x28c5fd(0x244)]),_0x57c2ba[_0x28c5fd(0x249)]&&console[_0x28c5fd(0x20c)]('\x20\x20'+_0x57c2ba['details']),console['log'](_0x115dc5[_0x28c5fd(0x237)])):console['log'](_0x115dc5[_0x28c5fd(0x242)]);console['log'](_0x115dc5[_0x28c5fd(0x218)]);const _0x95f4d7=await getPluginInfo(_0x28c5fd(0x1f2));if(_0x95f4d7){const _0x4918dc=_0x95f4d7['scope']||'unknown',_0x5002db=_0x95f4d7[_0x28c5fd(0x23a)]?_0x115dc5[_0x28c5fd(0x204)]:_0x115dc5[_0x28c5fd(0x236)];console['log']('\x20\x20'+_0x115dc5['ZPsqn'](bold,_0x115dc5['Wuujl'])+_0x28c5fd(0x24a)+_0x4918dc+',\x20'+_0x5002db+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x28c5fd(0x20c)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x28c5fd(0x20c)](_0x28c5fd(0x24c));const {project:_0x43b6a6,user:_0x3d9a4f}=await getInstalledSkills(),_0x7c844=_0x43b6a6[_0x28c5fd(0x1ea)](_0x145a4f=>RANGER_MANAGED_SKILLS[_0x28c5fd(0x23d)](_0x145a4f[_0x28c5fd(0x239)])),_0x29d06e=_0x3d9a4f['filter'](_0x20025d=>RANGER_MANAGED_SKILLS[_0x28c5fd(0x23d)](_0x20025d['name'])),_0x11f53a=_0x115dc5['Maqyv'](_0x7c844[_0x28c5fd(0x256)],_0x29d06e['length']);if(_0x11f53a===0x0)console['log']('No\x20skills\x20installed'),console[_0x28c5fd(0x20c)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x7c844[_0x28c5fd(0x256)]>0x0){console[_0x28c5fd(0x20c)]('\x20\x20Project-level:');for(const _0x5adb6f of _0x7c844){console['log'](_0x28c5fd(0x20a)+_0x115dc5[_0x28c5fd(0x254)](bold,_0x5adb6f[_0x28c5fd(0x1ec)])+':\x20'+link(_0x5adb6f[_0x28c5fd(0x248)],_0x115dc5[_0x28c5fd(0x203)](basename,_0x5adb6f[_0x28c5fd(0x248)])));}}if(_0x115dc5[_0x28c5fd(0x224)](_0x29d06e['length'],0x0)){console['log']('\x20\x20User-level:');for(const _0x206536 of _0x29d06e){console['log']('\x20\x20\x20\x20'+bold(_0x206536['displayName'])+':\x20'+link(_0x206536['path'],basename(_0x206536['path'])));}}}console['log'](_0x28c5fd(0x1e8));const {envs:_0x157247,activeEnv:_0x36abbd}=await _0x115dc5[_0x28c5fd(0x220)](getEnvironments);if(_0x157247['length']===0x0)console['log'](_0x115dc5['JOtas']),console[_0x28c5fd(0x20c)](_0x28c5fd(0x205));else{for(const _0x1d2141 of _0x157247){const _0x4536e9=_0x1d2141['isActive']?_0x115dc5['GEsXr']:'',_0x2ba375=_0x1d2141[_0x28c5fd(0x216)]?_0x28c5fd(0x222):_0x1d2141['hasPlaintextAuth']?_0x28c5fd(0x215):_0x28c5fd(0x1f7);console['log']('\x20\x20'+bold(_0x1d2141[_0x28c5fd(0x239)])+_0x4536e9),console[_0x28c5fd(0x20c)]('\x20\x20\x20\x20Auth:\x20'+_0x2ba375),_0x115dc5[_0x28c5fd(0x255)](_0x1d2141['settingsPath'],_0x115dc5[_0x28c5fd(0x206)])&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x115dc5[_0x28c5fd(0x212)](link,_0x1d2141['settingsPath'],_0x115dc5['DWxRa'](basename,_0x1d2141[_0x28c5fd(0x1f6)])));}!_0x36abbd&&(console[_0x28c5fd(0x20c)](_0x28c5fd(0x22f)),console[_0x28c5fd(0x20c)](_0x28c5fd(0x1f5)+_0x157247[_0x28c5fd(0x238)](_0x59a09f=>_0x59a09f[_0x28c5fd(0x239)])[_0x28c5fd(0x22b)](',\x20')+')'));}console['log']('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5c441b,_0x3f8354){const _0x1885c8=_0xa647,_0xa3c949=_0x5c441b();while(!![]){try{const _0x4119c5=parseInt(_0x1885c8(0x16e))/0x1+parseInt(_0x1885c8(0x14e))/0x2+-parseInt(_0x1885c8(0x13d))/0x3*(parseInt(_0x1885c8(0x13c))/0x4)+-parseInt(_0x1885c8(0x161))/0x5+parseInt(_0x1885c8(0x155))/0x6*(-parseInt(_0x1885c8(0x151))/0x7)+parseInt(_0x1885c8(0x140))/0x8+-parseInt(_0x1885c8(0x165))/0x9;if(_0x4119c5===_0x3f8354)break;else _0xa3c949['push'](_0xa3c949['shift']());}catch(_0x4db9ff){_0xa3c949['push'](_0xa3c949['shift']());}}}(_0x2c12,0x3caa7));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';function _0xa647(_0x8da85,_0xbe5b8b){_0x8da85=_0x8da85-0x134;const _0x2c12b9=_0x2c12();let _0xa64760=_0x2c12b9[_0x8da85];return _0xa64760;}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x8aa724=_0xa647,_0x10c683={'cDJRJ':_0x8aa724(0x13a),'vWPtd':'close'};return new Promise(_0x5ec068=>{const _0xbe8dd8=_0x8aa724;console['log'](_0xbe8dd8(0x15d)+PACKAGE_NAME+'@latest...\x0a');const _0x4526e0=spawn(_0xbe8dd8(0x166),[_0xbe8dd8(0x141),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x10c683['cDJRJ'],'shell':process['platform']===_0xbe8dd8(0x142)});_0x4526e0['on'](_0x10c683['vWPtd'],_0x43b49e=>{_0x5ec068(_0x43b49e===0x0);}),_0x4526e0['on'](_0xbe8dd8(0x136),()=>{_0x5ec068(![]);});});}async function updateClaudeMarketplace(){const _0x36fe38=_0xa647,_0x58d28d={'roXZe':function(_0x46e490,_0x1ad70c){return _0x46e490(_0x1ad70c);},'EEsdY':function(_0x341c94,_0x2bbddf){return _0x341c94(_0x2bbddf);},'qVtAF':function(_0x44a9da,_0x24e56b){return _0x44a9da===_0x24e56b;},'UdDlc':'claude','hZmxn':_0x36fe38(0x139),'UaqLv':function(_0x221e76,_0x3a9864){return _0x221e76===_0x3a9864;},'dLuSJ':_0x36fe38(0x142),'zNcNd':'close','KOLTl':_0x36fe38(0x136)};return new Promise(_0x34de7a=>{const _0x20acbe=_0x36fe38,_0x614c04={'HDvuO':function(_0x1ab50e,_0x32f642){return _0x58d28d['EEsdY'](_0x1ab50e,_0x32f642);},'OHdcI':function(_0xc11e75,_0x47a390){const _0x49ba3d=_0xa647;return _0x58d28d[_0x49ba3d(0x16a)](_0xc11e75,_0x47a390);}},_0x35e33a=spawn(_0x58d28d[_0x20acbe(0x15c)],['plugin',_0x58d28d['hZmxn'],_0x20acbe(0x16d),_0x20acbe(0x154)],{'stdio':_0x20acbe(0x148),'shell':_0x58d28d['UaqLv'](process['platform'],_0x58d28d[_0x20acbe(0x15a)])});_0x35e33a['on'](_0x58d28d[_0x20acbe(0x159)],_0x3d219c=>{const _0x435a7c=_0x20acbe;_0x614c04[_0x435a7c(0x14a)](_0x34de7a,_0x614c04['OHdcI'](_0x3d219c,0x0));}),_0x35e33a['on'](_0x58d28d[_0x20acbe(0x14c)],()=>{const _0x3cf8e8=_0x20acbe;_0x58d28d[_0x3cf8e8(0x14b)](_0x34de7a,![]);});});}async function updateClaudePlugin(_0x59fc70){const _0x48becc={'vxraQ':function(_0x4a8cc2,_0xfeacfb){return _0x4a8cc2(_0xfeacfb);},'hZcEN':'--scope','GSbpp':function(_0x19e5e9,_0x47ccd5){return _0x19e5e9===_0x47ccd5;},'WINEQ':'win32'};return new Promise(_0xcdafcd=>{const _0x397bc8=_0xa647,_0x19d1cd={'JFyXH':function(_0x290318,_0x33b523){return _0x290318(_0x33b523);}},_0x238f7a=[_0x397bc8(0x158),'update','ranger@trailhead'];_0x59fc70&&_0x238f7a['push'](_0x48becc['hZcEN'],_0x59fc70);const _0x5bddf7=spawn('claude',_0x238f7a,{'stdio':'pipe','shell':_0x48becc[_0x397bc8(0x153)](process['platform'],_0x48becc[_0x397bc8(0x14d)])});_0x5bddf7['on']('close',_0x4da166=>{_0x19d1cd['JFyXH'](_0xcdafcd,_0x4da166===0x0);}),_0x5bddf7['on'](_0x397bc8(0x136),()=>{_0x48becc['vxraQ'](_0xcdafcd,![]);});});}function isSkillInstalled(_0x1a242e,_0x5f575f,_0x536273){const _0x3fe700=_0xa647,_0x276a97={'alNeB':function(_0x46f6ab,_0x105cf1){return _0x46f6ab===_0x105cf1;},'STohy':function(_0x30a23,_0x1a03ff){return _0x30a23(_0x1a03ff);}},_0x1c75d5=_0x276a97[_0x3fe700(0x156)](_0x536273,_0x3fe700(0x13e))?_0x276a97[_0x3fe700(0x137)](getOpencodeSkillsDir,_0x5f575f):_0x276a97['STohy'](getSkillsDir,_0x5f575f),_0x222f71=join(_0x1c75d5,_0x1a242e);return existsSync(_0x222f71);}async function reinstallSkills(_0xdd9e06){const _0x3f42a8=_0xa647,_0x544906={'uFYeL':'user','aqizE':function(_0x236fbe,_0x5ccd6e,_0x325ad7,_0x4e6e0b){return _0x236fbe(_0x5ccd6e,_0x325ad7,_0x4e6e0b);},'asqls':'claude','eqMeF':_0x3f42a8(0x16b),'qhRrF':function(_0x5795eb,_0x367298,_0x475365){return _0x5795eb(_0x367298,_0x475365);}},_0x17c0ae=['project',_0x544906[_0x3f42a8(0x145)]],_0x23a932=[];for(const _0x1dbddf of _0x17c0ae){for(const _0x19e4ed of RANGER_MANAGED_SKILLS){_0x544906['aqizE'](isSkillInstalled,_0x19e4ed,_0x1dbddf,_0x3f42a8(0x13b))&&_0x23a932['push']({'skillName':_0x19e4ed,'level':_0x1dbddf,'platform':_0x544906[_0x3f42a8(0x150)]}),isSkillInstalled(_0x19e4ed,_0x1dbddf,_0x3f42a8(0x13e))&&_0x23a932['push']({'skillName':_0x19e4ed,'level':_0x1dbddf,'platform':'opencode'});}}for(const _0x1559d4 of _0x17c0ae){for(const _0x18d17c of DEPRECATED_SKILLS){await removeSkill(_0x18d17c,_0x1559d4);}}if(_0x23a932[_0x3f42a8(0x15e)]===0x0){console[_0x3f42a8(0x149)](_0x544906[_0x3f42a8(0x13f)]);return;}console['log'](_0x3f42a8(0x152)+_0x23a932['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x45b047,level:_0x13f07d,platform:_0x5206ce}of _0x23a932){try{await _0x544906[_0x3f42a8(0x143)](installSkill,_0x45b047,{'level':_0x13f07d,'cliVersion':_0xdd9e06,'platform':_0x5206ce});}catch(_0x32bcae){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5206ce+'\x20'+_0x13f07d+_0x3f42a8(0x16c)+_0x45b047+':',_0x32bcae);}}}function _0x2c12(){const _0x6e6efb=['roXZe','KOLTl','WINEQ','789954XvwHyO','Claude\x20plugin\x20updated\x20(project\x20scope).','asqls','604723QaoLjw','\x0aReinstalling\x20','GSbpp','trailhead','6Tzxfiv','alNeB','mHJTL','plugin','zNcNd','dLuSJ','IijtX','UdDlc','\x0aInstalling\x20','length','RJSnh','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','737380tZHuzd','active-profile.txt','endsWith','jPMaG','2373030QtBBGm','npm','uLKoS','TSfEY','Checking\x20for\x20updates...','qVtAF','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','\x20skill\x20','update','271916QJbEtT','trim','\x0a✅\x20Update\x20complete!','EuGRh','error','STohy','\x0aYour\x20version\x20(','marketplace','inherit','claude','4CkdLxj','884883YpkKSQ','opencode','eqMeF','2992720SoOucT','install','win32','qhRrF','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','uFYeL','splice','@latest','pipe','log','HDvuO'];_0x2c12=function(){return _0x6e6efb;};return _0x2c12();}async function ensureActiveProfileGitignored(){const _0x336193=_0xa647,_0x40a6d4={'TSfEY':function(_0x28efff,_0x274bed,_0x783232){return _0x28efff(_0x274bed,_0x783232);},'ktJfs':function(_0x1c6454){return _0x1c6454();},'jPMaG':'.gitignore','EuGRh':function(_0x1731b5,_0x224946){return _0x1731b5(_0x224946);},'kRxxo':function(_0x3973da,_0x13a236,_0x142a52){return _0x3973da(_0x13a236,_0x142a52);},'RJSnh':'utf-8'},_0x3037a3=_0x40a6d4[_0x336193(0x168)](join,_0x40a6d4['ktJfs'](getRangerDir),_0x40a6d4[_0x336193(0x164)]);if(!_0x40a6d4[_0x336193(0x135)](existsSync,_0x3037a3))return![];let _0x1a591a='';try{_0x1a591a=await _0x40a6d4['kRxxo'](readFile,_0x3037a3,_0x40a6d4['RJSnh']);}catch{return![];}const _0x594760=_0x1a591a['split'](/\r?\n/);if(_0x594760['some'](_0x14698c=>_0x14698c[_0x336193(0x16f)]()==='active-profile.txt'))return![];let _0x531b6d=_0x594760['findIndex'](_0x1e5959=>_0x1e5959['trim']()==='active-feature.txt');_0x531b6d===-0x1&&(_0x531b6d=_0x594760[_0x336193(0x15e)]);_0x594760[_0x336193(0x146)](_0x531b6d,0x0,_0x336193(0x162));let _0x266cbb=_0x594760['join']('\x0a');!_0x266cbb[_0x336193(0x163)]('\x0a')&&(_0x266cbb+='\x0a');try{await writeFile(_0x3037a3,_0x266cbb,_0x40a6d4[_0x336193(0x15f)]);}catch{return![];}return!![];}export async function update(){const _0x39640b=_0xa647,_0x4f0f07={'mHJTL':function(_0x2f6d3e){return _0x2f6d3e();},'IijtX':'Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','OiAbo':function(_0x2fdaad,_0x298aa6){return _0x2fdaad===_0x298aa6;},'TpdMg':function(_0x227284){return _0x227284();},'jDwBe':_0x39640b(0x154),'uLKoS':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','sNkkc':_0x39640b(0x144),'NvtmG':function(_0x403ec7,_0x562b7d){return _0x403ec7(_0x562b7d);},'zMqKG':_0x39640b(0x134)},_0x59aed8=_0x4f0f07[_0x39640b(0x157)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x59aed8),console[_0x39640b(0x149)](_0x39640b(0x169));const _0x3fb159=getLatestVersion();if(!_0x3fb159)throw new Error(_0x4f0f07[_0x39640b(0x15b)]);console['log']('Latest\x20version:\x20\x20'+_0x3fb159);const _0xfaf41=compareVersions(_0x59aed8,_0x3fb159);let _0x5e81cb=_0x59aed8;if(_0x4f0f07['OiAbo'](_0xfaf41,0x0))console['log'](_0x39640b(0x160));else{if(_0xfaf41<0x0)console[_0x39640b(0x149)](_0x39640b(0x138)+_0x59aed8+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3fb159+').');else{const _0x47852e=await _0x4f0f07['TpdMg'](runInstall);if(_0x47852e)console[_0x39640b(0x149)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x3fb159),_0x5e81cb=_0x3fb159;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+_0x39640b(0x147));}}await reinstallSkills(_0x5e81cb);const _0x1e7ea9=await isMarketplaceAdded(_0x4f0f07['jDwBe']),_0x41537e=await isPluginInstalled('ranger@trailhead');if(_0x1e7ea9){const _0x2d9788=await updateClaudeMarketplace();_0x2d9788&&console[_0x39640b(0x149)](_0x4f0f07[_0x39640b(0x167)]);}if(_0x41537e){const _0x3ec996=await updateClaudePlugin();_0x3ec996&&console[_0x39640b(0x149)](_0x4f0f07['sNkkc']);const _0x23b064=await _0x4f0f07['NvtmG'](updateClaudePlugin,'project');_0x23b064&&console['log']((_0x3ec996?'':'\x0a')+_0x39640b(0x14f));}const _0x2cbea2=await migrateActiveProfileFile();_0x2cbea2&&console[_0x39640b(0x149)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x36b583=await ensureActiveProfileGitignored();console['log'](_0x4f0f07['zMqKG']);}
|
|
1
|
+
(function(_0x5a9444,_0x456a53){const _0x39ff44=_0x370b,_0x1b0b1e=_0x5a9444();while(!![]){try{const _0x556028=parseInt(_0x39ff44(0x16d))/0x1*(parseInt(_0x39ff44(0x140))/0x2)+-parseInt(_0x39ff44(0x16a))/0x3+-parseInt(_0x39ff44(0x163))/0x4*(parseInt(_0x39ff44(0x156))/0x5)+-parseInt(_0x39ff44(0x158))/0x6*(parseInt(_0x39ff44(0x160))/0x7)+parseInt(_0x39ff44(0x138))/0x8+-parseInt(_0x39ff44(0x142))/0x9+parseInt(_0x39ff44(0x16f))/0xa*(parseInt(_0x39ff44(0x13a))/0xb);if(_0x556028===_0x456a53)break;else _0x1b0b1e['push'](_0x1b0b1e['shift']());}catch(_0x45a10d){_0x1b0b1e['push'](_0x1b0b1e['shift']());}}}(_0x24a7,0x90004));import{spawn}from'child_process';function _0x24a7(){const _0x451b6c=['utf-8','push','xvIhf','log','length','npm','active-feature.txt','active-profile.txt','platform','vVEXV','10qbpPiW','ShfoY','12Pxzyzk','findIndex','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','hdDwf','inherit','pyDqd','error','ranger@trailhead','129402oOfjdV','CeDAU','.gitignore','956428kCrqfn','\x20skill\x20','FEQUA','naRAi','version','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','--scope','589779YdLjDS','\x0aSuccessfully\x20installed\x20latest\x20version.','pLaKN','1001911lIZnhx','\x0a✅\x20Update\x20complete!','702310hZqTCc','BGQZZ','GHftP','opencode','\x0aReinstalling\x20','xFhJG','win32','8557728GHyody','close','55DYbUwq','pipe','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','hoGpk','Update\x20failed.','claude','2OkXVps','\x0aYour\x20version\x20(','10090575iVqvjV','warn','xcEDF','rvyyb','tYXwW','splice','Update\x20failed:\x20','wdLFz','HBraC','JMREa'];_0x24a7=function(){return _0x451b6c;};return _0x24a7();}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';function _0x370b(_0x305b65,_0x444e40){_0x305b65=_0x305b65-0x134;const _0x24a7c8=_0x24a7();let _0x370b38=_0x24a7c8[_0x305b65];return _0x370b38;}import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x102b88=_0x370b,_0x4120f2={'cVogC':function(_0x5af102,_0x2c01f5){return _0x5af102(_0x2c01f5);},'rvyyb':_0x102b88(0x15c),'rVJqX':_0x102b88(0x137)};return new Promise(_0x40d0af=>{const _0x4ae8bb=_0x102b88;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x13ed10=spawn(_0x4ae8bb(0x151),['install','-g',PACKAGE_NAME+'@latest'],{'stdio':_0x4120f2[_0x4ae8bb(0x145)],'shell':process[_0x4ae8bb(0x154)]===_0x4120f2['rVJqX']});_0x13ed10['on'](_0x4ae8bb(0x139),_0x224ad3=>{_0x4120f2['cVogC'](_0x40d0af,_0x224ad3===0x0);}),_0x13ed10['on'](_0x4ae8bb(0x15e),()=>{_0x40d0af(![]);});});}async function updateClaudeMarketplace(){const _0x25775d={'UCKcD':'plugin','paNFO':'marketplace','qFSOu':'pipe'};return new Promise(_0x25c5a3=>{const _0x4edcb6=_0x370b,_0x450669={'vVEXV':function(_0x329d02,_0x56204a){return _0x329d02===_0x56204a;}},_0x2c5183=spawn(_0x4edcb6(0x13f),[_0x25775d['UCKcD'],_0x25775d['paNFO'],'update','trailhead'],{'stdio':_0x25775d['qFSOu'],'shell':process[_0x4edcb6(0x154)]==='win32'});_0x2c5183['on']('close',_0x3f2c00=>{const _0x36a101=_0x4edcb6;_0x25c5a3(_0x450669[_0x36a101(0x155)](_0x3f2c00,0x0));}),_0x2c5183['on']('error',()=>{_0x25c5a3(![]);});});}async function updateClaudePlugin(_0x17f1b9){const _0x2d2be2=_0x370b,_0x5b558d={'wdLFz':'update','pLaKN':_0x2d2be2(0x15f),'pyDqd':_0x2d2be2(0x169),'EKsib':function(_0x33db18,_0x258a3f,_0x54bd60,_0x5901e5){return _0x33db18(_0x258a3f,_0x54bd60,_0x5901e5);},'JMREa':'claude','xFhJG':function(_0x4cabb6,_0x1ba66f){return _0x4cabb6===_0x1ba66f;},'hoGpk':'close'};return new Promise(_0x4cb0fa=>{const _0x4d05f3=_0x2d2be2,_0x47e22a=['plugin',_0x5b558d[_0x4d05f3(0x149)],_0x5b558d[_0x4d05f3(0x16c)]];_0x17f1b9&&_0x47e22a['push'](_0x5b558d[_0x4d05f3(0x15d)],_0x17f1b9);const _0x2140ea=_0x5b558d['EKsib'](spawn,_0x5b558d[_0x4d05f3(0x14b)],_0x47e22a,{'stdio':_0x4d05f3(0x13b),'shell':_0x5b558d[_0x4d05f3(0x136)](process['platform'],_0x4d05f3(0x137))});_0x2140ea['on'](_0x5b558d[_0x4d05f3(0x13d)],_0xdfb533=>{_0x4cb0fa(_0xdfb533===0x0);}),_0x2140ea['on']('error',()=>{_0x4cb0fa(![]);});});}function isSkillInstalled(_0xc23973,_0x24b7f4,_0x4f4f88){const _0x27b9aa=_0x370b,_0x8a5afc={'FEQUA':function(_0xa8aaab,_0x50e7e9){return _0xa8aaab(_0x50e7e9);},'qOuwc':function(_0x1d3122,_0x4a87a8,_0x10066c){return _0x1d3122(_0x4a87a8,_0x10066c);},'ShfoY':function(_0x55cb1d,_0xe91b88){return _0x55cb1d(_0xe91b88);}},_0x325410=_0x4f4f88===_0x27b9aa(0x134)?_0x8a5afc[_0x27b9aa(0x165)](getOpencodeSkillsDir,_0x24b7f4):getSkillsDir(_0x24b7f4),_0x1b16e8=_0x8a5afc['qOuwc'](join,_0x325410,_0xc23973);return _0x8a5afc[_0x27b9aa(0x157)](existsSync,_0x1b16e8);}async function reinstallSkills(_0x3daad0){const _0x17b401=_0x370b,_0x5f7a33={'BGQZZ':function(_0x35e275,_0x1c4b6b,_0x153e19,_0x16ac57){return _0x35e275(_0x1c4b6b,_0x153e19,_0x16ac57);},'naRAi':_0x17b401(0x134),'mNOol':function(_0x170e2a,_0x44bfc0,_0x2f6f90){return _0x170e2a(_0x44bfc0,_0x2f6f90);}},_0x53cdab=['project','user'],_0x561de0=[];for(const _0x3d0c6c of _0x53cdab){for(const _0x2136aa of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x2136aa,_0x3d0c6c,_0x17b401(0x13f))&&_0x561de0[_0x17b401(0x14d)]({'skillName':_0x2136aa,'level':_0x3d0c6c,'platform':'claude'}),_0x5f7a33[_0x17b401(0x170)](isSkillInstalled,_0x2136aa,_0x3d0c6c,_0x5f7a33['naRAi'])&&_0x561de0['push']({'skillName':_0x2136aa,'level':_0x3d0c6c,'platform':_0x5f7a33[_0x17b401(0x166)]});}}for(const _0x36dfcf of _0x53cdab){for(const _0x469cfd of DEPRECATED_SKILLS){await _0x5f7a33['mNOol'](removeSkill,_0x469cfd,_0x36dfcf);}}if(_0x561de0[_0x17b401(0x150)]===0x0){console[_0x17b401(0x14f)](_0x17b401(0x13c));return;}console[_0x17b401(0x14f)](_0x17b401(0x135)+_0x561de0['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1c603f,level:_0x18032b,platform:_0x55d0c2}of _0x561de0){try{await installSkill(_0x1c603f,{'level':_0x18032b,'cliVersion':_0x3daad0,'platform':_0x55d0c2});}catch(_0x577e55){console[_0x17b401(0x143)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x55d0c2+'\x20'+_0x18032b+_0x17b401(0x164)+_0x1c603f+':',_0x577e55);}}}async function ensureActiveProfileGitignored(){const _0x1eede2=_0x370b,_0x56a89d={'xcEDF':function(_0x20e852){return _0x20e852();},'xrRQJ':_0x1eede2(0x162),'ZJGZo':'utf-8','CeDAU':function(_0x46ba4d,_0x3c1786){return _0x46ba4d===_0x3c1786;}},_0x283c06=join(_0x56a89d[_0x1eede2(0x144)](getRangerDir),_0x56a89d['xrRQJ']);if(!existsSync(_0x283c06))return![];let _0x10b380='';try{_0x10b380=await readFile(_0x283c06,_0x56a89d['ZJGZo']);}catch{return![];}const _0xac4dba=_0x10b380['split'](/\r?\n/);if(_0xac4dba['some'](_0x45ce62=>_0x45ce62['trim']()===_0x1eede2(0x153)))return![];let _0x1de8dc=_0xac4dba[_0x1eede2(0x159)](_0x23e582=>_0x23e582['trim']()===_0x1eede2(0x152));_0x56a89d[_0x1eede2(0x161)](_0x1de8dc,-0x1)&&(_0x1de8dc=_0xac4dba[_0x1eede2(0x150)]);_0xac4dba[_0x1eede2(0x147)](_0x1de8dc,0x0,'active-profile.txt');let _0x86fabd=_0xac4dba['join']('\x0a');!_0x86fabd['endsWith']('\x0a')&&(_0x86fabd+='\x0a');try{await writeFile(_0x283c06,_0x86fabd,_0x1eede2(0x14c));}catch{return![];}return!![];}export async function update(){const _0x36ff6a=_0x370b,_0x25d0da={'tXLZA':'Checking\x20for\x20updates...','hdDwf':function(_0x8fa71c){return _0x8fa71c();},'xvIhf':'Attempting\x20install\x20anyway...','pHMCo':function(_0x3cf7bf,_0x1e70aa){return _0x3cf7bf===_0x1e70aa;},'lTntF':_0x36ff6a(0x15f),'HBraC':_0x36ff6a(0x15a),'tYXwW':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','GHftP':function(_0x49aed4,_0x186d72){return _0x49aed4(_0x186d72);},'RJAGb':'project','wWbuR':'✓\x20Migrated\x20active\x20profile\x20file'},_0x20cd94=getCurrentVersion();console[_0x36ff6a(0x14f)]('\x0aCurrent\x20version:\x20'+_0x20cd94),console[_0x36ff6a(0x14f)](_0x25d0da['tXLZA']);const _0x88e816=_0x25d0da[_0x36ff6a(0x15b)](getLatestVersion);let _0x1a00a8=_0x20cd94;if(!_0x88e816['version']){console[_0x36ff6a(0x143)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x88e816['error']),console[_0x36ff6a(0x14f)](_0x25d0da[_0x36ff6a(0x14e)]);const _0x3c0ff2=await runInstall();if(_0x3c0ff2)console[_0x36ff6a(0x14f)](_0x36ff6a(0x16b)),_0x1a00a8=getCurrentVersion();else throw new Error(_0x36ff6a(0x148)+_0x88e816[_0x36ff6a(0x15e)]);}else{const _0x3641a6=_0x88e816[_0x36ff6a(0x167)];console['log']('Latest\x20version:\x20\x20'+_0x3641a6);const _0xcfb6be=compareVersions(_0x20cd94,_0x3641a6);if(_0x25d0da['pHMCo'](_0xcfb6be,0x0))console['log'](_0x36ff6a(0x168));else{if(_0xcfb6be<0x0)console[_0x36ff6a(0x14f)](_0x36ff6a(0x141)+_0x20cd94+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3641a6+').');else{const _0x678dd=await _0x25d0da['hdDwf'](runInstall);if(_0x678dd)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x3641a6),_0x1a00a8=_0x3641a6;else throw new Error(_0x36ff6a(0x13e));}}}await reinstallSkills(_0x1a00a8);const _0x1d3448=await isMarketplaceAdded('trailhead'),_0x1be9be=await isPluginInstalled(_0x25d0da['lTntF']);if(_0x1d3448){const _0x352705=await updateClaudeMarketplace();_0x352705&&console['log'](_0x25d0da[_0x36ff6a(0x14a)]);}if(_0x1be9be){const _0x379c9e=await updateClaudePlugin();_0x379c9e&&console['log'](_0x25d0da[_0x36ff6a(0x146)]);const _0x2ad44f=await _0x25d0da[_0x36ff6a(0x171)](updateClaudePlugin,_0x25d0da['RJAGb']);_0x2ad44f&&console[_0x36ff6a(0x14f)]((_0x379c9e?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x5842b7=await migrateActiveProfileFile();_0x5842b7&&console['log'](_0x25d0da['wWbuR']);const _0x4e482e=await ensureActiveProfileGitignored();console['log'](_0x36ff6a(0x16e));}
|