@ranger-testing/ranger-cli 2.1.4 → 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
|
-
|
|
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
|
-
(function(
|
|
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 _0xe9c477=_0x5c08;(function(_0x3ce1e0,_0x294b37){const _0x36fe47=_0x5c08,_0x38127c=_0x3ce1e0();while(!![]){try{const _0xf8d7a=-parseInt(_0x36fe47(0x18c))/0x1*(parseInt(_0x36fe47(0x1a8))/0x2)+-parseInt(_0x36fe47(0x163))/0x3*(parseInt(_0x36fe47(0x1a3))/0x4)+parseInt(_0x36fe47(0x18a))/0x5+-parseInt(_0x36fe47(0x157))/0x6+parseInt(_0x36fe47(0x19d))/0x7+-parseInt(_0x36fe47(0x161))/0x8+parseInt(_0x36fe47(0x15c))/0x9;if(_0xf8d7a===_0x294b37)break;else _0x38127c['push'](_0x38127c['shift']());}catch(_0x4b0e52){_0x38127c['push'](_0x38127c['shift']());}}}(_0x4c90,0xb3543));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x259226 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';function _0x4c90(){const _0x465dca=['nNftN','\x0a🚀\x20Ranger\x20Setup\x0a','Validating\x20API\x20token...','4610025WhbpqD','isTTY','yZRvF','\x20\x20npx\x20playwright@','opencode','2964528VnbBIi','✓\x20Exported\x20credentials\x20for\x20CI','1890243CSyuTR','xMoqh','MZcUi','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','stdin','log','GITHUB_ENV','Installation\x20failed\x20with\x20exit\x20code\x20','BdpJO','skipChromium','RkfcS','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','✓\x20Already\x20authenticated\x20to\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','stdout','oHSpb','mgZTA','fsOJR','npx','✓\x20Authenticated\x20to\x20','gyExr','\x20\x20npx\x20playwright\x20install\x20chromium','auth','qESYU','chromium','mgbbW','YYocM','ranger','error','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','install','FKukx','JrVey','success','organizationName','mzbvx','skills','✓\x20Local\x20profile\x20already\x20exists','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','5721295GEVKyf','trackPhaseStart','22853YlUQRw','SkGso','prompt','executablePath','plugin','kPGtj','warn','fMqGf','\x1b[0m','XOZNe','ExbkB','force','message','wantsProfile','QLfXY','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','UiRID','8554217mUDlzD','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','uamqW','/ranger:enable','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','playwright','8EMzzua','EGFrw','fZxQe','LqHCx','close','34iucEbc','method','skipped','bMnso','ggEVr','AJOpk','url','env','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','user','gAvIw','AUXmT','fPWmJ','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','ranger\x20profile\x20add\x20local','sKEKy','No\x20git\x20repository\x20found','AHAqb','Authentication\x20failed:\x20','use\x20until\x20the\x20session\x20expires.\x0a','trackPhaseEnd','kNcpA','Hlafr','QvJbG','qbNkG','eVOCF','qMeQC','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','platform','git_check','lZySo','qcpvy','LqEWV','748530NBgIIo','CpTUy'];_0x4c90=function(){return _0x465dca;};return _0x4c90();}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';function _0x5c08(_0x47fcac,_0x1b16fc){_0x47fcac=_0x47fcac-0x155;const _0x4c900c=_0x4c90();let _0x5c08ec=_0x4c900c[_0x47fcac];return _0x5c08ec;}const require=createRequire(import.meta.url),bold=_0x1e67f1=>'\x1b[1m'+_0x1e67f1+_0xe9c477(0x194);function getPlaywrightVersion(){const _0x199a5f=_0xe9c477,_0x390908={'qcpvy':'playwright/package.json','lZySo':function(_0x2e7ecd,_0x44b36f){return _0x2e7ecd(_0x44b36f);}};try{const _0x18a6b4=require['resolve'](_0x390908[_0x199a5f(0x155)]),_0x275031=_0x390908[_0x199a5f(0x1c7)](require,_0x18a6b4);return _0x275031['version'];}catch{return null;}}function installChromiumBinary(_0x14d6e4){const _0x464989=_0xe9c477,_0x4855fa={'HNZbJ':_0x464989(0x181),'LqHCx':_0x464989(0x17b),'oNgNW':_0x464989(0x175),'kNcpA':'inherit','RkfcS':function(_0x1da76c,_0x12512c){return _0x1da76c===_0x12512c;},'oHSpb':'win32','nNRVu':_0x464989(0x17f)};return new Promise((_0x302191,_0x48e959)=>{const _0x1c450e=_0x464989,_0x4b0d24=_0x14d6e4?['playwright@'+_0x14d6e4,_0x4855fa['HNZbJ'],_0x4855fa[_0x1c450e(0x1a6)]]:[_0x1c450e(0x1a2),'install','chromium'],_0x7ef821=spawn(_0x4855fa['oNgNW'],_0x4b0d24,{'stdio':_0x4855fa[_0x1c450e(0x1be)],'shell':_0x4855fa[_0x1c450e(0x16d)](process[_0x1c450e(0x1c5)],_0x4855fa[_0x1c450e(0x172)])});_0x7ef821['on'](_0x1c450e(0x1a7),_0x6e0c83=>{const _0x371598=_0x1c450e;_0x6e0c83===0x0?_0x302191():_0x48e959(new Error(_0x371598(0x16a)+_0x6e0c83));}),_0x7ef821['on'](_0x4855fa['nNRVu'],_0x46eb6a=>{_0x48e959(_0x46eb6a);});});}export async function authenticate(_0x225b5b){const _0x5e04e3=_0xe9c477,_0x5aa5ba={'fsOJR':function(_0x4d2bc0,_0x1ab7c9){return _0x4d2bc0(_0x1ab7c9);},'ajbSv':'existing_token','QLfXY':function(_0x7ccad8,_0x503cbd){return _0x7ccad8(_0x503cbd);},'AHAqb':'device_auth'};if(!_0x225b5b){const _0x546127=await getToken();if(_0x546127){const _0xaa1b0b=await _0x5aa5ba[_0x5e04e3(0x174)](getCurrentUser,_0x546127);if(_0xaa1b0b['success'])return console[_0x5e04e3(0x168)](_0x5e04e3(0x16f)+_0xaa1b0b[_0x5e04e3(0x1b2)]['organizationName']),{'token':_0x546127,'method':_0x5aa5ba['ajbSv']};}try{_0x225b5b=await runDeviceAuthFlow();}catch(_0x42dead){throw new Error(_0x5e04e3(0x1bb)+(_0x42dead instanceof Error?_0x42dead[_0x5e04e3(0x198)]:_0x42dead));}const _0x339535=await _0x5aa5ba['QLfXY'](getCurrentUser,_0x225b5b);if(!_0x339535[_0x5e04e3(0x184)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x339535[_0x5e04e3(0x17f)]);return console['log'](_0x5e04e3(0x176)+_0x339535['user']['organizationName']),{'token':_0x225b5b,'method':_0x5aa5ba[_0x5e04e3(0x1ba)]};}console[_0x5e04e3(0x168)](_0x5e04e3(0x15b));const _0x44da74=await getCurrentUser(_0x225b5b);if(!_0x44da74[_0x5e04e3(0x184)]){if(_0x44da74['status'])throw new Error(_0x5e04e3(0x1bb)+_0x44da74[_0x5e04e3(0x17f)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x5e04e3(0x1a1)+_0x44da74[_0x5e04e3(0x17f)]+_0x5e04e3(0x1b1));}return console['log'](_0x5e04e3(0x176)+_0x44da74[_0x5e04e3(0x1b2)][_0x5e04e3(0x185)]),await _0x5aa5ba[_0x5e04e3(0x19a)](storeToken,_0x225b5b),console['log'](process[_0x5e04e3(0x1af)][_0x5e04e3(0x169)]?_0x5e04e3(0x162):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x225b5b,'method':'provided_token'};}export async function ensureRangerDir(){const _0x26fa27=_0xe9c477,_0x3bc079={'nlsDz':function(_0xf187e3){return _0xf187e3();},'gAvIw':function(_0x5968ec,_0x211b97){return _0x5968ec(_0x211b97);},'mgZTA':function(_0x3eab1a,_0x5c9dfb,_0x65c19){return _0x3eab1a(_0x5c9dfb,_0x65c19);},'MYBjG':'✓\x20Created\x20.ranger/\x20directory'},_0x1180e7=findGitRoot(),_0x154504=_0x1180e7?join(_0x1180e7,'.ranger'):_0x3bc079['nlsDz'](getRangerDir);return!_0x3bc079[_0x26fa27(0x1b3)](existsSync,_0x154504)?(await _0x3bc079[_0x26fa27(0x173)](mkdir,_0x154504,{'recursive':!![]}),console['log'](_0x3bc079['MYBjG']),{'path':_0x154504,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x154504,'installed':![]});}export async function ensureChromium(){const _0x1c03a1=_0xe9c477,_0x34fcc0={'MdtEJ':function(_0x67baf7,_0x250b8b){return _0x67baf7(_0x250b8b);},'FKukx':_0x1c03a1(0x170),'JRJMs':function(_0x4561de){return _0x4561de();},'gyExr':'confirm','kPGtj':_0x1c03a1(0x181),'XOZNe':_0x1c03a1(0x1b6),'XIHVu':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','mzbvx':_0x1c03a1(0x1c4),'bMnso':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','uamqW':_0x1c03a1(0x178)};let _0x5f8ae9=![];try{const _0x402991=chromium[_0x1c03a1(0x18f)]();_0x5f8ae9=_0x34fcc0['MdtEJ'](existsSync,_0x402991);}catch{_0x5f8ae9=![];}if(_0x5f8ae9)return console[_0x1c03a1(0x168)](_0x34fcc0[_0x1c03a1(0x182)]),![];const _0x27d4fc=_0x34fcc0['JRJMs'](getPlaywrightVersion),_0x54b572=process[_0x1c03a1(0x167)]['isTTY']&&process[_0x1c03a1(0x171)]['isTTY'];let _0x451493=!![];if(_0x54b572){const {install:_0x56dea7}=await _0x259226[_0x1c03a1(0x18e)]([{'type':_0x34fcc0[_0x1c03a1(0x177)],'name':_0x34fcc0[_0x1c03a1(0x191)],'message':_0x27d4fc?'The\x20required\x20version\x20('+_0x27d4fc+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x34fcc0[_0x1c03a1(0x195)],'default':!![]}]);_0x451493=_0x56dea7;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x27d4fc?'\x20'+_0x27d4fc:'')+'...');if(_0x451493){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x27d4fc),console[_0x1c03a1(0x168)](_0x34fcc0['XIHVu']);}catch(_0x1f73f9){console['error'](_0x34fcc0[_0x1c03a1(0x186)],_0x1f73f9 instanceof Error?_0x1f73f9[_0x1c03a1(0x198)]:_0x1f73f9),console[_0x1c03a1(0x168)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x27d4fc?console[_0x1c03a1(0x168)](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x1c03a1(0x178));}}else console[_0x1c03a1(0x168)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0x34fcc0[_0x1c03a1(0x1ab)]),_0x27d4fc?console['log'](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x34fcc0[_0x1c03a1(0x19f)]);return!![];}export async function writeRangerGitignore(_0x5839d1){const _0x5b0de0=_0xe9c477,_0x52c5dd={'ggEVr':function(_0x32b36e,_0x34c7a8,_0xad0eb5){return _0x32b36e(_0x34c7a8,_0xad0eb5);},'yZRvF':function(_0x3436bb,_0x17ee80,_0x5455d6){return _0x3436bb(_0x17ee80,_0x5455d6);}},_0x4e866d=_0x52c5dd[_0x5b0de0(0x1ac)](join,_0x5839d1,'.gitignore'),_0x482078='\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 _0x52c5dd[_0x5b0de0(0x15e)](writeFile,_0x4e866d,_0x482078),console['log']('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x3fe4e7=_0xe9c477,_0x208914={'qMeQC':function(_0xc4178e,_0x37cfa8){return _0xc4178e(_0x37cfa8);},'qESYU':_0x3fe4e7(0x1b7),'LnPLO':_0x3fe4e7(0x180)};console[_0x3fe4e7(0x168)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x208914[_0x3fe4e7(0x1c3)](bold,_0x208914[_0x3fe4e7(0x17a)])),console[_0x3fe4e7(0x168)](_0x208914['LnPLO']);}async function ensureLocalEnv(_0x176e49,_0x10bc6b){const _0x581715=_0xe9c477,_0x1b90d3={'eVOCF':function(_0x53a969){return _0x53a969();},'JrVey':function(_0x101259,_0x5797a9,_0x3e6e61){return _0x101259(_0x5797a9,_0x3e6e61);},'nNftN':'local','DQTvb':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','qbNkG':_0x581715(0x1bc),'MkDqz':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','GXWXy':'confirm','YYocM':_0x581715(0x199),'LqEWV':function(_0x24a5f){return _0x24a5f();},'bqpNH':function(_0x55ce3d,_0x42c143,_0x31c065,_0x636eec){return _0x55ce3d(_0x42c143,_0x31c065,_0x636eec);},'SkGso':'\x0a❌\x20Profile\x20setup\x20failed:','QvJbG':function(_0x3929a5,_0x4b47ae){return _0x3929a5 instanceof _0x4b47ae;}};if(!_0x1b90d3[_0x581715(0x1c2)](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x1b90d3[_0x581715(0x183)](findExistingEnv,_0x1b90d3['nNftN'],{'locations':[_0x1b90d3[_0x581715(0x159)]]}))return console['log'](_0x581715(0x188)),{'ready':!![],'skipped':![]};const _0x401bca=process['stdin']['isTTY']&&process[_0x581715(0x171)][_0x581715(0x15d)];if(_0x401bca&&!_0x176e49?.[_0x581715(0x1ae)]){console[_0x581715(0x168)](_0x1b90d3['DQTvb']),console['log'](_0x581715(0x1b0)),console[_0x581715(0x168)](_0x581715(0x189)),console['log'](_0x1b90d3[_0x581715(0x1c1)]),console['log'](_0x1b90d3['MkDqz']);const {wantsProfile:_0xf1520a}=await _0x259226['prompt']([{'type':_0x1b90d3['GXWXy'],'name':_0x1b90d3[_0x581715(0x17d)],'message':_0x581715(0x16e),'default':!![]}]);if(!_0xf1520a)return _0x1b90d3[_0x581715(0x156)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x1b90d3['bqpNH'](addEnv,_0x1b90d3['nNftN'],{'url':_0x176e49?.['url'],'force':_0x176e49?.[_0x581715(0x197)]},_0x10bc6b),{'ready':!![],'skipped':![]};}catch(_0x19a8fc){return console['error'](_0x1b90d3[_0x581715(0x18d)],_0x1b90d3[_0x581715(0x1c0)](_0x19a8fc,Error)?_0x19a8fc['message']:_0x19a8fc),_0x1b90d3['eVOCF'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x452ad2,_0x3fdb2e,_0x6d7619){const _0x31d34f=_0xe9c477,_0x3b4524={'CpTUy':_0x31d34f(0x15a),'MZcUi':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','kNXCX':'git_check','fMqGf':_0x31d34f(0x1b9),'vwQdn':_0x31d34f(0x19e),'mgbbW':function(_0x43ba55,_0x1627fd){return _0x43ba55(_0x1627fd);},'fZxQe':function(_0x322861){return _0x322861();},'Hlafr':_0x31d34f(0x179),'ExbkB':_0x31d34f(0x17b),'sKEKy':function(_0x49b5fc){return _0x49b5fc();},'AJOpk':_0x31d34f(0x190),'xMoqh':function(_0x1b03c7,_0x54e50d){return _0x1b03c7&&_0x54e50d;},'UiRID':_0x31d34f(0x187),'BdpJO':function(_0x39eee2,_0x37f28a,_0x58e17e){return _0x39eee2(_0x37f28a,_0x58e17e);},'rFQah':_0x31d34f(0x1b7),'AUXmT':function(_0x1d523a,_0x103296,_0x241294){return _0x1d523a(_0x103296,_0x241294);},'dXtzX':'profile','IIQUy':_0x31d34f(0x166),'EGFrw':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','fPWmJ':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console['log'](_0x3b4524[_0x31d34f(0x158)]);const _0xf85a9e=process['stdin'][_0x31d34f(0x15d)]&&process['stdout']['isTTY'];!_0xf85a9e&&!_0x3fdb2e?.['scope']&&(console['log'](_0x3b4524[_0x31d34f(0x165)]),_0x3fdb2e={..._0x3fdb2e,'scope':'user'});_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x1c6));if(!findGitRoot()){await _0x6d7619?.['trackPhaseError'](_0x3b4524['kNXCX'],new Error(_0x3b4524[_0x31d34f(0x193)]));throw new Error(_0x3b4524['vwQdn']);}_0x6d7619?.[_0x31d34f(0x1bd)](_0x3b4524['kNXCX']);const _0x3075ba=!_0x3b4524['mgbbW'](existsSync,_0x3b4524[_0x31d34f(0x1a5)](getRangerDir)),{path:_0x2dbe7c}=await _0x3b4524['fZxQe'](ensureRangerDir);_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x179));const _0x10434f=await _0x3b4524[_0x31d34f(0x17c)](authenticate,_0x452ad2);_0x6d7619?.['trackPhaseEnd'](_0x3b4524[_0x31d34f(0x1bf)],{'isFirstRun':_0x3075ba,'method':_0x10434f[_0x31d34f(0x1a9)]}),_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x196)]);_0x3fdb2e?.['skipChromium']?console[_0x31d34f(0x168)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x3b4524[_0x31d34f(0x1b8)](ensureChromium);_0x6d7619?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3075ba,'skipped':!!_0x3fdb2e?.[_0x31d34f(0x16c)]}),await writeRangerGitignore(_0x2dbe7c),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x86191f=_0x3fdb2e?.['scope'],_0x5337af=_0x3fdb2e?.[_0x31d34f(0x160)]??![];let _0x2974ce=null;_0x5337af?(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x1ad)]),_0x2974ce=await ensureOpencodePluginConfig(_0x86191f),_0x6d7619?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3075ba,'opencode':!![]})):(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['AJOpk']),await ensureClaudePlugin(_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('plugin',{'isFirstRun':_0x3075ba}));if(_0x3b4524[_0x31d34f(0x164)](_0x5337af,_0x2974ce)){_0x6d7619?.['trackPhaseStart'](_0x3b4524[_0x31d34f(0x19c)]);try{await _0x3b4524[_0x31d34f(0x16b)](installSkill,_0x31d34f(0x17e),{'level':_0x2974ce['scope'],'cliVersion':getCurrentVersion(),'platform':_0x31d34f(0x160)}),_0x6d7619?.['trackPhaseEnd']('skills',{'isFirstRun':_0x3075ba,'opencode':!![]});}catch(_0x47619f){console[_0x31d34f(0x192)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x47619f instanceof Error?_0x47619f[_0x31d34f(0x198)]:_0x47619f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba,'opencode':!![],'failed':!![]});}}else _0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['UiRID']),await _0x3b4524[_0x31d34f(0x17c)](ensureClaudeSkills,_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba});if(!_0xf85a9e&&!_0x3fdb2e?.[_0x31d34f(0x1ae)])console['log'](_0x31d34f(0x19b)),console['log']('\x20\x20'+bold(_0x3b4524['rFQah'])+'\x0a');else{_0x6d7619?.['trackPhaseStart']('profile');const _0xfce09e=await _0x3b4524[_0x31d34f(0x1b4)](ensureLocalEnv,{'url':_0x3fdb2e?.[_0x31d34f(0x1ae)],'force':_0x3fdb2e?.[_0x31d34f(0x197)]},_0x6d7619);_0x6d7619?.['trackPhaseEnd'](_0x3b4524['dXtzX'],{'isFirstRun':_0x3075ba,'profileReady':_0xfce09e['ready'],'userSkipped':_0xfce09e[_0x31d34f(0x1aa)]}),_0xfce09e['ready']&&console[_0x31d34f(0x168)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x5337af)console[_0x31d34f(0x168)](_0x3b4524['IIQUy']),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1a4)]),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1b5)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0xb01b62=bold(_0x31d34f(0x1a0));console['log']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0xb01b62+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
|
|
1
|
+
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 _0x195f95=_0xb971;(function(_0x323aa8,_0x465c04){const _0x2aa33f=_0xb971,_0x4972b4=_0x323aa8();while(!![]){try{const _0x551c34=parseInt(_0x2aa33f(0x7c))/0x1+parseInt(_0x2aa33f(0xc1))/0x2*(parseInt(_0x2aa33f(0xb3))/0x3)+-parseInt(_0x2aa33f(0x7d))/0x4+parseInt(_0x2aa33f(0x7e))/0x5+parseInt(_0x2aa33f(0xb7))/0x6*(parseInt(_0x2aa33f(0x89))/0x7)+-parseInt(_0x2aa33f(0x9a))/0x8+-parseInt(_0x2aa33f(0x9e))/0x9;if(_0x551c34===_0x465c04)break;else _0x4972b4['push'](_0x4972b4['shift']());}catch(_0x2771ec){_0x4972b4['push'](_0x4972b4['shift']());}}}(_0x7597,0x8577b));import{readFile,readdir}from'fs/promises';function _0xb971(_0x5570ec,_0x319baa){_0x5570ec=_0x5570ec-0x6b;const _0x759789=_0x7597();let _0xb97147=_0x759789[_0x5570ec];return _0xb97147;}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=_0x171ede=>_0x195f95(0x92)+_0x171ede+_0x195f95(0xa0),link=(_0x316eb4,_0x3dfb54)=>'\x1b]8;;file://'+_0x316eb4+'\x07'+(_0x3dfb54||_0x316eb4)+_0x195f95(0xa4);async function getOpencodePluginStatus(){const _0x2f915c=_0x195f95,_0x2caa6f={'gzTJo':function(_0xc28fa2,_0x4f94c3){return _0xc28fa2(_0x4f94c3);},'vCtHA':function(_0x39b698,_0x46253e){return _0x39b698!==_0x46253e;},'rKeUu':'opencode-plugin','JYQhm':function(_0x481ee5,_0x1732e9){return _0x481ee5>_0x1732e9;},'aPGcv':function(_0x4eb5e6,_0x2a362e){return _0x4eb5e6(_0x2a362e);},'vIezM':function(_0x4e829d,_0x2065bd){return _0x4e829d(_0x2065bd);},'bgcHi':_0x2f915c(0x84),'CQfxP':'debug','bnrZs':'pipe','dcQyf':_0x2f915c(0x80),'EBOSz':_0x2f915c(0x8b)};return new Promise(_0x5444b5=>{const _0x5450b0=_0x2f915c,_0x425655={'HlHSt':function(_0x99bed2,_0x5ce2d9){return _0x2caa6f['vCtHA'](_0x99bed2,_0x5ce2d9);},'oIiAo':_0x2caa6f[_0x5450b0(0xce)],'Jpkdf':function(_0x14aead,_0x130546){const _0x3e1687=_0x5450b0;return _0x2caa6f[_0x3e1687(0xc6)](_0x14aead,_0x130546);},'qQAcZ':function(_0x53bdbb,_0x462aaf){return _0x2caa6f['aPGcv'](_0x53bdbb,_0x462aaf);},'EaArY':function(_0x47ef7f,_0x1d8604){const _0x3368c8=_0x5450b0;return _0x2caa6f[_0x3368c8(0x7a)](_0x47ef7f,_0x1d8604);}},_0x380bc6=spawn(_0x2caa6f[_0x5450b0(0x8e)],[_0x2caa6f[_0x5450b0(0xa1)],_0x5450b0(0xcb)],{'stdio':[_0x5450b0(0x97),'pipe',_0x2caa6f['bnrZs']]});let _0x53132b='';_0x380bc6[_0x5450b0(0x9f)]?.['on'](_0x2caa6f['dcQyf'],_0x2f5f68=>{const _0x3997ec=_0x5450b0;_0x53132b+=_0x2f5f68[_0x3997ec(0xa2)]();}),_0x380bc6[_0x5450b0(0x9c)]?.['on'](_0x2caa6f['dcQyf'],_0x31eaf8=>{_0x53132b+=_0x31eaf8['toString']();}),_0x380bc6['on']('error',()=>{const _0x257465=_0x5450b0;_0x2caa6f[_0x257465(0xc2)](_0x5444b5,{'status':'not_installed'});}),_0x380bc6['on'](_0x2caa6f['EBOSz'],_0x390b17=>{const _0x1ec7f4=_0x5450b0;if(_0x390b17!==0x0){_0x5444b5({'status':_0x1ec7f4(0x93)});return;}const _0xa4b55=_0x53132b['trim']();let _0x1e8289=null;if(_0xa4b55)try{_0x1e8289=JSON['parse'](_0xa4b55);}catch{const _0x3febe6=_0xa4b55['match'](/\{[\s\S]*\}$/);if(_0x3febe6)try{_0x1e8289=JSON['parse'](_0x3febe6[0x0]);}catch{_0x1e8289=null;}}const _0x5866ce=Array['isArray'](_0x1e8289?.['plugin'])?_0x1e8289?.[_0x1ec7f4(0x83)]:[],_0x2255da=_0x5866ce['some'](_0x1899ed=>{const _0x2ba1a8=_0x1ec7f4;if(_0x425655['HlHSt'](typeof _0x1899ed,_0x2ba1a8(0x96)))return![];return _0x1899ed[_0x2ba1a8(0x78)](_0x2ba1a8(0xb4))||_0x1899ed[_0x2ba1a8(0x78)](_0x425655['oIiAo']);});if(_0x2255da){_0x5444b5({'status':_0x1ec7f4(0xb2),'details':_0x425655[_0x1ec7f4(0xd1)](_0x5866ce['length'],0x0)?_0x5866ce[_0x1ec7f4(0x88)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x425655[_0x1ec7f4(0xd1)](_0x5866ce[_0x1ec7f4(0x88)],0x0)){_0x425655[_0x1ec7f4(0xc5)](_0x5444b5,{'status':'not_configured','details':_0x5866ce[_0x1ec7f4(0x88)]+_0x1ec7f4(0xc3)});return;}_0x425655['EaArY'](_0x5444b5,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x1f273e,_0x1f150d){const _0x5a9337=_0x195f95,_0x302a6f={'eGrUw':function(_0x48f573,_0x4a4420,_0x39ea43,_0x4c4dc6){return _0x48f573(_0x4a4420,_0x39ea43,_0x4c4dc6);},'KLFXN':function(_0x2cc034,_0xd9ac4f,_0x25ef8d){return _0x2cc034(_0xd9ac4f,_0x25ef8d);}};if(!existsSync(_0x1f273e))return[];const _0x14d9f7=[];try{const _0x4f2f84=await readdir(_0x1f273e,{'withFileTypes':!![]});for(const _0x399f5f of _0x4f2f84){if(_0x399f5f['isDirectory']()){const _0x51418a=_0x302a6f[_0x5a9337(0x94)](join,_0x1f273e,_0x399f5f['name'],_0x5a9337(0xb8));if(existsSync(_0x51418a)){let _0x441fcd=_0x399f5f[_0x5a9337(0xb0)];try{const _0x3112bd=await _0x302a6f[_0x5a9337(0xb6)](readFile,_0x51418a,'utf-8'),_0x3fc2e5=_0x3112bd[_0x5a9337(0xae)](/name:\s*(.+)/);_0x3fc2e5&&(_0x441fcd=_0x3fc2e5[0x1][_0x5a9337(0xa7)]());}catch{}_0x14d9f7['push']({'name':_0x399f5f['name'],'displayName':_0x441fcd,'path':_0x51418a,'level':_0x1f150d});}}}}catch{return[];}return _0x14d9f7;}async function getInstalledSkills(){const _0x35a37c=_0x195f95,_0x2c645e={'cDfiO':function(_0xf7a059,_0xba0fd1,_0xb61c63){return _0xf7a059(_0xba0fd1,_0xb61c63);},'zDpOU':_0x35a37c(0xc9),'ckNed':function(_0x24dc14){return _0x24dc14();}},[_0x2b1d3f,_0x49d639]=await Promise['all']([_0x2c645e[_0x35a37c(0xb5)](getSkillsFromDir,getProjectSkillsDir(),_0x2c645e['zDpOU']),_0x2c645e['cDfiO'](getSkillsFromDir,_0x2c645e['ckNed'](getUserSkillsDir),'user')]);return{'project':_0x2b1d3f,'user':_0x49d639};}async function getEnvironments(){const _0x40246c=_0x195f95,_0x50edf0={'spDBd':function(_0x435d80,_0x80676c){return _0x435d80(_0x80676c);},'pqIby':'settings.json','knONd':function(_0x414f90,_0x51ea6c,_0x4c1d49){return _0x414f90(_0x51ea6c,_0x4c1d49);},'NwTiI':'auth.json','rwVlC':'(not\x20found)','iClKB':function(_0x5ef48b){return _0x5ef48b();}},{envNames:_0x1b840b,activeEnv:_0x54d284}=await _0x50edf0['iClKB'](getEnvNames),_0x411832=getRangerDir();if(!existsSync(_0x411832))return{'envs':[],'activeEnv':null};const _0x56436e=_0x1b840b[_0x40246c(0xba)](_0x33bedf=>{const _0x2cf34f=_0x40246c,_0x215376=_0x50edf0[_0x2cf34f(0x9d)](getEnvDir,_0x33bedf),_0xb62b01=join(_0x215376,_0x50edf0[_0x2cf34f(0x87)]),_0x259da1=_0x50edf0[_0x2cf34f(0x72)](join,_0x215376,_0x50edf0['NwTiI']),_0x10934d=join(_0x215376,'auth.json.enc');return{'name':_0x33bedf,'settingsPath':_0x50edf0['spDBd'](existsSync,_0xb62b01)?_0xb62b01:_0x50edf0['rwVlC'],'hasPlaintextAuth':existsSync(_0x259da1),'hasEncryptedAuth':existsSync(_0x10934d),'isActive':_0x33bedf===_0x54d284};});return{'envs':_0x56436e,'activeEnv':_0x54d284};}function _0x7597(){const _0x570976=['WunsP','No\x20skills\x20installed','Jpkdf','plaintext','\x0a\x20\x20No\x20active\x20profile\x20set','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','enabled','displayName','status','cDJnH','knONd','sbnPM','Version:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]','log','RGdbO','includes','\x0a📊\x20Ranger\x20Status\x0a','vIezM','Organization:\x20','473327eMEzCS','2071412EtfLUu','1357150tMSjIl','\x20\x20Run:\x20ranger\x20skillup','data','hpupf','RdzFe','plugin','opencode','(not\x20found)','path','pqIby','length','469AqHqYO','FOmhv','close','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a---\x20Skills\x20---','bgcHi','user','\x20\x20User-level:','KLFgs','\x1b[1m','not_installed','eGrUw','No\x20profiles\x20configured','string','ignore','DEBUG','LYsym','4329448QoIDOf','\x20\x20\x20\x20Settings:\x20','stderr','spDBd','3709305LwXkcD','stdout','\x1b[0m','CQfxP','toString','success','\x1b]8;;\x07','scope','filter','trim','details','HLZiT','hasPlaintextAuth','\x20\x20Project-level:','RtLzv','\x0a---\x20Profiles\x20---','match','\x20\x20Not\x20installed','name','\x20\x20Run:\x20ranger\x20update','configured','1934337EtAElS','@ranger-testing/opencode-plugin','cDfiO','KLFXN','56268MOTkvi','SKILL.md','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','map','tKsNK','bjnRD','\x20(active)','\x20\x20Not\x20configured','GwbzL','Root:\x20','2eEvSmN','gzTJo','\x20plugin(s)\x20configured','isActive','qQAcZ','JYQhm',':\x20configured','settingsPath','project','API\x20Environment:\x20','config','hasEncryptedAuth','\x0a---\x20OpenCode\x20Plugin\x20---','rKeUu'];_0x7597=function(){return _0x570976;};return _0x7597();}export async function status(){const _0x318c14=_0x195f95,_0x30e77e={'bjnRD':function(_0x23ad29,_0x104a65){return _0x23ad29(_0x104a65);},'wjgMv':function(_0x4f08e6,_0x4bd9ad,_0x4d5b00){return _0x4f08e6(_0x4bd9ad,_0x4d5b00);},'RGdbO':function(_0x84b3ef,_0x3d7fb9){return _0x84b3ef(_0x3d7fb9);},'ukxEN':function(_0x1aed0f,_0x49ced5){return _0x1aed0f!==_0x49ced5;},'RtLzv':function(_0x18e0e4){return _0x18e0e4();},'WunsP':function(_0x1a0a92,_0x3e9282){return _0x1a0a92===_0x3e9282;},'sbnPM':'configured','iZPBS':'@ranger-testing/opencode-plugin','FOmhv':function(_0x47750a,_0x4fa48d){return _0x47750a===_0x4fa48d;},'RdzFe':'not_configured','LYsym':_0x318c14(0x8c),'HLZiT':'ranger@trailhead','VZIqX':_0x318c14(0x6e),'KLFgs':_0x318c14(0xaf),'tKsNK':_0x318c14(0x8d),'CdFfP':function(_0x5d24c3){return _0x5d24c3();},'RoxkH':function(_0x5bf060,_0x36d53b){return _0x5bf060+_0x36d53b;},'cDJnH':_0x318c14(0xd0),'EqtwZ':function(_0x10ad1d,_0x50adae){return _0x10ad1d>_0x50adae;},'GwbzL':function(_0x38bfa5,_0x398a87,_0x3a75d4){return _0x38bfa5(_0x398a87,_0x3a75d4);},'brglD':function(_0x5cff75,_0x4b0fc5){return _0x5cff75(_0x4b0fc5);},'hpupf':function(_0x3a11e5,_0x191c1a,_0x2f93d5){return _0x3a11e5(_0x191c1a,_0x2f93d5);},'jmTzP':function(_0x5518d7){return _0x5518d7();},'iiFUD':_0x318c14(0x95),'ghQUY':_0x318c14(0x6b),'Tczpi':_0x318c14(0x85)};console['log'](_0x318c14(0x79));const _0x4c8b49=process['cwd'](),_0x7a32a8=getRangerDir();if(!_0x30e77e[_0x318c14(0xbc)](existsSync,_0x7a32a8)){console[_0x318c14(0x76)](_0x318c14(0xc0)+_0x30e77e['wjgMv'](link,_0x4c8b49,bold(basename(_0x4c8b49)))),console[_0x318c14(0x76)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x318c14(0xc0)+link(_0x4c8b49,_0x30e77e[_0x318c14(0xbc)](bold,_0x30e77e[_0x318c14(0x77)](basename,_0x4c8b49))));const _0xa050e4=getCurrentVersion(),_0xde048d=getLatestVersion();if(_0xde048d&&_0x30e77e['ukxEN'](_0xde048d,_0xa050e4))console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4+'\x20(latest:\x20'+_0xde048d+')'),console['log'](_0x318c14(0xb1));else _0xde048d?console['log']('Version:\x20'+_0xa050e4+'\x20(up\x20to\x20date)'):console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4);const _0x3ed4f1=await _0x30e77e[_0x318c14(0xac)](getToken);if(_0x3ed4f1){const _0x49f9d1=await getCurrentUser(_0x3ed4f1);_0x49f9d1[_0x318c14(0xa3)]?console['log'](_0x318c14(0x7b)+bold(_0x49f9d1[_0x318c14(0x8f)]['organizationName'])):(console['log'](_0x318c14(0x6d)),console[_0x318c14(0x76)](_0x318c14(0x75)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x318c14(0x75));process['env'][_0x318c14(0x98)]&&(console[_0x318c14(0x76)](_0x318c14(0xca)+getCurrentEnvironment()),console[_0x318c14(0x76)]('API\x20URL:\x20'+_0x30e77e['RtLzv'](getApiBaseUrl)));console[_0x318c14(0x76)](_0x318c14(0xcd));const _0x23cb27=await getOpencodePluginStatus();if(_0x30e77e[_0x318c14(0xcf)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x73)]))console['log']('\x20\x20'+_0x30e77e['RGdbO'](bold,_0x30e77e['iZPBS'])+_0x318c14(0xc7)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]);else _0x30e77e[_0x318c14(0x8a)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x82)])?(console['log'](_0x318c14(0xbe)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]),console[_0x318c14(0x76)](_0x30e77e[_0x318c14(0x99)])):console[_0x318c14(0x76)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x344f43=await getPluginInfo(_0x30e77e[_0x318c14(0xa9)]);if(_0x344f43){const _0x5342c9=_0x344f43[_0x318c14(0xa5)]||'unknown',_0x264579=_0x344f43['enabled']?_0x30e77e['VZIqX']:'disabled';console[_0x318c14(0x76)]('\x20\x20'+bold('ranger@trailhead')+':\x20installed\x20('+_0x5342c9+',\x20'+_0x264579+')');}else console['log'](_0x30e77e[_0x318c14(0x91)]),console[_0x318c14(0x76)](_0x318c14(0xb9));console['log'](_0x30e77e[_0x318c14(0xbb)]);const {project:_0x5ae53f,user:_0x548968}=await _0x30e77e['CdFfP'](getInstalledSkills),_0x92028e=_0x5ae53f['filter'](_0x1eada6=>RANGER_MANAGED_SKILLS[_0x318c14(0x78)](_0x1eada6['name'])),_0x3bb24=_0x548968[_0x318c14(0xa6)](_0x1c2641=>RANGER_MANAGED_SKILLS['includes'](_0x1c2641['name'])),_0xb94201=_0x30e77e['RoxkH'](_0x92028e[_0x318c14(0x88)],_0x3bb24[_0x318c14(0x88)]);if(_0xb94201===0x0)console['log'](_0x30e77e[_0x318c14(0x71)]),console['log'](_0x318c14(0x7f));else{if(_0x30e77e['EqtwZ'](_0x92028e[_0x318c14(0x88)],0x0)){console['log'](_0x318c14(0xab));for(const _0x5ddbb3 of _0x92028e){console['log']('\x20\x20\x20\x20'+bold(_0x5ddbb3['displayName'])+':\x20'+_0x30e77e[_0x318c14(0xbf)](link,_0x5ddbb3[_0x318c14(0x86)],_0x30e77e['brglD'](basename,_0x5ddbb3[_0x318c14(0x86)])));}}if(_0x3bb24['length']>0x0){console[_0x318c14(0x76)](_0x318c14(0x90));for(const _0x2da03c of _0x3bb24){console['log']('\x20\x20\x20\x20'+bold(_0x2da03c[_0x318c14(0x6f)])+':\x20'+_0x30e77e[_0x318c14(0x81)](link,_0x2da03c[_0x318c14(0x86)],_0x30e77e[_0x318c14(0xbc)](basename,_0x2da03c['path'])));}}}console['log'](_0x318c14(0xad));const {envs:_0x4b049f,activeEnv:_0x358a7a}=await _0x30e77e['jmTzP'](getEnvironments);if(_0x30e77e['FOmhv'](_0x4b049f[_0x318c14(0x88)],0x0))console[_0x318c14(0x76)](_0x30e77e['iiFUD']),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x4ed885 of _0x4b049f){const _0x2e959a=_0x4ed885[_0x318c14(0xc4)]?_0x318c14(0xbd):'',_0x256d30=_0x4ed885[_0x318c14(0xcc)]?'encrypted':_0x4ed885[_0x318c14(0xaa)]?_0x30e77e['ghQUY']:'none';console[_0x318c14(0x76)]('\x20\x20'+bold(_0x4ed885['name'])+_0x2e959a),console[_0x318c14(0x76)]('\x20\x20\x20\x20Auth:\x20'+_0x256d30),_0x4ed885[_0x318c14(0xc8)]!==_0x30e77e['Tczpi']&&console['log'](_0x318c14(0x9b)+_0x30e77e['wjgMv'](link,_0x4ed885[_0x318c14(0xc8)],_0x30e77e[_0x318c14(0x77)](basename,_0x4ed885[_0x318c14(0xc8)])));}!_0x358a7a&&(console['log'](_0x318c14(0x6c)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x4b049f['map'](_0xe9afc0=>_0xe9afc0[_0x318c14(0xb0)])['join'](',\x20')+')'));}console[_0x318c14(0x76)]('');}
|
|
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(_0x438247,_0x3fed15){const _0x515abc=_0x225c,_0x2c76e6=_0x438247();while(!![]){try{const _0x480a1a=-parseInt(_0x515abc(0x16a))/0x1*(parseInt(_0x515abc(0x15a))/0x2)+-parseInt(_0x515abc(0x152))/0x3*(parseInt(_0x515abc(0x159))/0x4)+parseInt(_0x515abc(0x165))/0x5+-parseInt(_0x515abc(0x14a))/0x6*(parseInt(_0x515abc(0x14b))/0x7)+parseInt(_0x515abc(0x157))/0x8+-parseInt(_0x515abc(0x154))/0x9*(parseInt(_0x515abc(0x14d))/0xa)+-parseInt(_0x515abc(0x16d))/0xb*(-parseInt(_0x515abc(0x162))/0xc);if(_0x480a1a===_0x3fed15)break;else _0x2c76e6['push'](_0x2c76e6['shift']());}catch(_0x5799ac){_0x2c76e6['push'](_0x2c76e6['shift']());}}}(_0xeafd,0xe487f));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';function _0xeafd(){const _0x153c58=['ranger@trailhead',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','159066lXbdpn','7TAylFt','Latest\x20version:\x20\x20','74090jyjsdD','push','log','close','trim','926910qzmPms','error','1881VrmYxY','\x20\x20Failed\x20to\x20reinstall\x20','Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','5285704xEPkWa','\x0a✅\x20Update\x20complete!','20ogUrVR','178gGkURR','win32','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','pNvlf','NdlTi','fPcTJ','update','--scope','516peHyTo','QDyZK','endsWith','2295535pCQkBq','opencode','.gitignore','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','inherit','14734JnMjwA','ATzJn','npm','1086547WAXAHQ','claude','NVMPh','active-feature.txt','platform','bKeyM','install','hEFcB','Claude\x20plugin\x20updated\x20(project\x20scope).','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','CsSBj','length','plugin','IEbaD','project','split','NAKPk','GQpAz','LoUMr','trailhead','warn','EEBWt','LkKxH','\x0aInstalling\x20','✓\x20Migrated\x20active\x20profile\x20file'];_0xeafd=function(){return _0x153c58;};return _0xeafd();}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';function _0x225c(_0x28c1da,_0x10f703){_0x28c1da=_0x28c1da-0x139;const _0xeafd2d=_0xeafd();let _0x225ccc=_0xeafd2d[_0x28c1da];return _0x225ccc;}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 _0x4fa571=_0x225c,_0x108b8f={'gvtTx':function(_0x5aa96b,_0x3dbc92){return _0x5aa96b(_0x3dbc92);},'YIqHK':_0x4fa571(0x16c),'rmhWV':_0x4fa571(0x169),'NdlTi':'error'};return new Promise(_0x38ea48=>{const _0x30fe97=_0x4fa571,_0x478238={'bKzuW':function(_0x2b597e,_0x1ab84c){return _0x108b8f['gvtTx'](_0x2b597e,_0x1ab84c);}};console['log'](_0x30fe97(0x146)+PACKAGE_NAME+'@latest...\x0a');const _0x147395=spawn(_0x108b8f['YIqHK'],[_0x30fe97(0x173),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x108b8f['rmhWV'],'shell':process['platform']===_0x30fe97(0x15b)});_0x147395['on'](_0x30fe97(0x150),_0x34604d=>{_0x38ea48(_0x34604d===0x0);}),_0x147395['on'](_0x108b8f[_0x30fe97(0x15e)],()=>{_0x478238['bKzuW'](_0x38ea48,![]);});});}async function updateClaudeMarketplace(){const _0x1b507f=_0x225c,_0x5cdb2d={'EEBWt':function(_0x3e1d1e,_0x4e042d){return _0x3e1d1e(_0x4e042d);},'NVMPh':'claude','rclJl':_0x1b507f(0x142),'jzSQa':function(_0x4278fe,_0x520834){return _0x4278fe===_0x520834;},'JtVJk':'win32','LUvDb':'error'};return new Promise(_0xcf8fd6=>{const _0x476d29=_0x1b507f,_0x1ab02d={'QDyZK':function(_0xf9d413,_0x40d829){const _0x25b7fd=_0x225c;return _0x5cdb2d[_0x25b7fd(0x144)](_0xf9d413,_0x40d829);}},_0x27f30f=spawn(_0x5cdb2d[_0x476d29(0x16f)],[_0x476d29(0x13b),'marketplace',_0x476d29(0x160),_0x5cdb2d['rclJl']],{'stdio':'pipe','shell':_0x5cdb2d['jzSQa'](process['platform'],_0x5cdb2d['JtVJk'])});_0x27f30f['on']('close',_0x17f0fc=>{const _0x1c29e4=_0x476d29;_0x1ab02d[_0x1c29e4(0x163)](_0xcf8fd6,_0x17f0fc===0x0);}),_0x27f30f['on'](_0x5cdb2d['LUvDb'],()=>{_0xcf8fd6(![]);});});}async function updateClaudePlugin(_0x2ce002){const _0x57801a=_0x225c,_0x368c95={'REevZ':'pipe','TrLKI':function(_0x3370fb,_0x2f985b){return _0x3370fb===_0x2f985b;},'MiBkb':_0x57801a(0x153)};return new Promise(_0x40a3f3=>{const _0x3a7c5e=_0x57801a,_0x1790e0=['plugin',_0x3a7c5e(0x160),_0x3a7c5e(0x148)];_0x2ce002&&_0x1790e0[_0x3a7c5e(0x14e)](_0x3a7c5e(0x161),_0x2ce002);const _0x49779b=spawn(_0x3a7c5e(0x16e),_0x1790e0,{'stdio':_0x368c95['REevZ'],'shell':_0x368c95['TrLKI'](process[_0x3a7c5e(0x171)],_0x3a7c5e(0x15b))});_0x49779b['on'](_0x3a7c5e(0x150),_0x1d1eff=>{_0x40a3f3(_0x1d1eff===0x0);}),_0x49779b['on'](_0x368c95['MiBkb'],()=>{_0x40a3f3(![]);});});}function isSkillInstalled(_0x2c2338,_0xd9db97,_0x448763){const _0x5246bc=_0x225c,_0x10c442={'fPcTJ':function(_0x3869bb,_0x429707){return _0x3869bb===_0x429707;},'CeKZy':_0x5246bc(0x166),'NAKPk':function(_0xefb4a4,_0x337199){return _0xefb4a4(_0x337199);},'fGBfB':function(_0xc27475,_0x549534){return _0xc27475(_0x549534);}},_0x207cc1=_0x10c442[_0x5246bc(0x15f)](_0x448763,_0x10c442['CeKZy'])?getOpencodeSkillsDir(_0xd9db97):_0x10c442[_0x5246bc(0x13f)](getSkillsDir,_0xd9db97),_0x20c6c3=join(_0x207cc1,_0x2c2338);return _0x10c442['fGBfB'](existsSync,_0x20c6c3);}async function reinstallSkills(_0x4eb536){const _0x20cf66=_0x225c,_0x1e4fa1={'IEbaD':_0x20cf66(0x16e),'mwbSG':'opencode','hlTcp':function(_0x30443a,_0x294610,_0x1a4838){return _0x30443a(_0x294610,_0x1a4838);},'GQpAz':_0x20cf66(0x176),'CsSBj':function(_0x5b6bb0,_0x40fe1a,_0x2a3918){return _0x5b6bb0(_0x40fe1a,_0x2a3918);}},_0x4fa88c=[_0x20cf66(0x13d),'user'],_0x39abd1=[];for(const _0x550bd8 of _0x4fa88c){for(const _0x37466b of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1[_0x20cf66(0x13c)])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1[_0x20cf66(0x13c)]}),isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1['mwbSG'])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1['mwbSG']});}}for(const _0x5ad43e of _0x4fa88c){for(const _0x22ba99 of DEPRECATED_SKILLS){await _0x1e4fa1['hlTcp'](removeSkill,_0x22ba99,_0x5ad43e);}}if(_0x39abd1[_0x20cf66(0x13a)]===0x0){console[_0x20cf66(0x14f)](_0x1e4fa1[_0x20cf66(0x140)]);return;}console['log']('\x0aReinstalling\x20'+_0x39abd1[_0x20cf66(0x13a)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x307ed5,level:_0x5b99c5,platform:_0x42c251}of _0x39abd1){try{await _0x1e4fa1[_0x20cf66(0x139)](installSkill,_0x307ed5,{'level':_0x5b99c5,'cliVersion':_0x4eb536,'platform':_0x42c251});}catch(_0x3f65d1){console[_0x20cf66(0x143)](_0x20cf66(0x155)+_0x42c251+'\x20'+_0x5b99c5+'\x20skill\x20'+_0x307ed5+':',_0x3f65d1);}}}async function ensureActiveProfileGitignored(){const _0x2d09ec=_0x225c,_0x1cb4f9={'LoUMr':function(_0x4366ea,_0x51be38){return _0x4366ea(_0x51be38);},'mdSwQ':function(_0x5bdc6c,_0x49a87f,_0xea4bbd){return _0x5bdc6c(_0x49a87f,_0xea4bbd);},'bKeyM':'utf-8','NrfGJ':function(_0x53fefb,_0x318f36){return _0x53fefb===_0x318f36;},'ayspM':'active-profile.txt'},_0x24131c=join(getRangerDir(),_0x2d09ec(0x167));if(!_0x1cb4f9[_0x2d09ec(0x141)](existsSync,_0x24131c))return![];let _0x5b21ed='';try{_0x5b21ed=await _0x1cb4f9['mdSwQ'](readFile,_0x24131c,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}const _0x3a4e27=_0x5b21ed[_0x2d09ec(0x13e)](/\r?\n/);if(_0x3a4e27['some'](_0xafc259=>_0xafc259[_0x2d09ec(0x151)]()==='active-profile.txt'))return![];let _0x256808=_0x3a4e27['findIndex'](_0x3fb59b=>_0x3fb59b[_0x2d09ec(0x151)]()===_0x2d09ec(0x170));_0x1cb4f9['NrfGJ'](_0x256808,-0x1)&&(_0x256808=_0x3a4e27['length']);_0x3a4e27['splice'](_0x256808,0x0,_0x1cb4f9['ayspM']);let _0x24a129=_0x3a4e27['join']('\x0a');!_0x24a129[_0x2d09ec(0x164)]('\x0a')&&(_0x24a129+='\x0a');try{await writeFile(_0x24131c,_0x24a129,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}return!![];}export async function update(){const _0x494c39=_0x225c,_0x536db6={'ATzJn':'Checking\x20for\x20updates...','pNvlf':function(_0x508ab4){return _0x508ab4();},'vtwuq':function(_0x3fb7c2,_0x4b7ca0,_0x5839a2){return _0x3fb7c2(_0x4b7ca0,_0x5839a2);},'SAYfu':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','JuIIQ':function(_0x2728c7,_0x14b36b){return _0x2728c7<_0x14b36b;},'LkKxH':function(_0x4f8799){return _0x4f8799();},'hEFcB':function(_0x14f960,_0xe6a52a){return _0x14f960(_0xe6a52a);},'RIuVn':_0x494c39(0x13d)},_0x46f69c=getCurrentVersion();console[_0x494c39(0x14f)]('\x0aCurrent\x20version:\x20'+_0x46f69c),console['log'](_0x536db6[_0x494c39(0x16b)]);const _0x11806d=_0x536db6['pNvlf'](getLatestVersion);if(!_0x11806d)throw new Error(_0x494c39(0x156));console['log'](_0x494c39(0x14c)+_0x11806d);const _0x5713f4=_0x536db6['vtwuq'](compareVersions,_0x46f69c,_0x11806d);let _0x18ed6f=_0x46f69c;if(_0x5713f4===0x0)console[_0x494c39(0x14f)](_0x536db6['SAYfu']);else{if(_0x536db6['JuIIQ'](_0x5713f4,0x0))console['log']('\x0aYour\x20version\x20('+_0x46f69c+_0x494c39(0x149)+_0x11806d+').');else{const _0x2c3ba9=await _0x536db6[_0x494c39(0x145)](runInstall);if(_0x2c3ba9)console[_0x494c39(0x14f)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x11806d),_0x18ed6f=_0x11806d;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+'@latest');}}await _0x536db6['hEFcB'](reinstallSkills,_0x18ed6f);const _0x8f184c=await isMarketplaceAdded('trailhead'),_0x43e760=await isPluginInstalled(_0x494c39(0x148));if(_0x8f184c){const _0x30b6a7=await updateClaudeMarketplace();_0x30b6a7&&console[_0x494c39(0x14f)](_0x494c39(0x15c));}if(_0x43e760){const _0x2d1e8c=await _0x536db6[_0x494c39(0x15d)](updateClaudePlugin);_0x2d1e8c&&console[_0x494c39(0x14f)](_0x494c39(0x168));const _0x559c43=await _0x536db6[_0x494c39(0x174)](updateClaudePlugin,_0x536db6['RIuVn']);_0x559c43&&console[_0x494c39(0x14f)]((_0x2d1e8c?'':'\x0a')+_0x494c39(0x175));}const _0x8c312=await _0x536db6['pNvlf'](migrateActiveProfileFile);_0x8c312&&console['log'](_0x494c39(0x147));const _0x19d278=await ensureActiveProfileGitignored();console[_0x494c39(0x14f)](_0x494c39(0x158));}
|
|
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));}
|