@ranger-testing/ranger-cli 2.2.3 → 2.2.4
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/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
(function(_0x496a89,_0x1c6010){const _0x460e64=_0x2bfb,_0x53b6d9=_0x496a89();while(!![]){try{const _0x38865f=parseInt(_0x460e64(0x18b))/0x1*(parseInt(_0x460e64(0x18f))/0x2)+-parseInt(_0x460e64(0x182))/0x3*(-parseInt(_0x460e64(0x17b))/0x4)+parseInt(_0x460e64(0x183))/0x5+parseInt(_0x460e64(0x186))/0x6*(parseInt(_0x460e64(0x17d))/0x7)+-parseInt(_0x460e64(0x187))/0x8+-parseInt(_0x460e64(0x18e))/0x9*(-parseInt(_0x460e64(0x192))/0xa)+parseInt(_0x460e64(0x184))/0xb*(-parseInt(_0x460e64(0x18c))/0xc);if(_0x38865f===_0x1c6010)break;else _0x53b6d9['push'](_0x53b6d9['shift']());}catch(_0x1a6bf3){_0x53b6d9['push'](_0x53b6d9['shift']());}}}(_0x5e7a,0xc264d));import{appendFile}from'fs/promises';function _0x2bfb(_0x1d061c,_0x22846e){_0x1d061c=_0x1d061c-0x17b;const _0x5e7a42=_0x5e7a();let _0x2bfbbd=_0x5e7a42[_0x1d061c];return _0x2bfbbd;}import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';function _0x5e7a(){const _0x324b5=['hJzFR','vYpca','trackCommandEnd','source','63gqOfqO','971565IVIKnU','132zFlbFT','ArvGj','252pRJCVx','8450144HAoxRd','master','SessionStart','env','93PTpojd','1535964UrtrxF','stringify','207ZeCbqO','11422JEiXHT','success','parse','171790mthIog','Nyzfq','\x20(Branch:\x20','144392NWGcKT','stdin','251643xvoGZO'];_0x5e7a=function(){return _0x324b5;};return _0x5e7a();}import{createTelemetryCollector}from'../utils/telemetry.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';export async function sessionStart(_0x498480){const _0x3ea0a6=_0x2bfb,_0x4f41ca={'ArvGj':function(_0x4945f8,_0x1421dc){return _0x4945f8||_0x1421dc;},'vYpca':function(_0x3330ba,_0x1bd2a5){return _0x3330ba(_0x1bd2a5);},'hJzFR':'hook:session-start','ZtPxX':function(_0x4f18bc){return _0x4f18bc();},'qRldq':function(_0x49dc5d,_0x184c5a){return _0x49dc5d!==_0x184c5a;},'CfPoR':_0x3ea0a6(0x188),'Nyzfq':_0x3ea0a6(0x189)};let _0x28cdda=_0x4f41ca[_0x3ea0a6(0x185)](_0x498480,''),_0x37d1eb;if(!_0x498480){let _0x63a5f3='';for await(const _0x48e1c3 of process[_0x3ea0a6(0x17c)]){_0x63a5f3+=_0x48e1c3;}try{const _0xccdbf6=JSON[_0x3ea0a6(0x191)](_0x63a5f3);_0x28cdda=_0xccdbf6['session_id']||'',_0x37d1eb=_0xccdbf6[_0x3ea0a6(0x181)];}catch{}const _0xef1dff=process[_0x3ea0a6(0x18a)]['CLAUDE_ENV_FILE'];if(_0xef1dff&&_0x28cdda)try{await appendFile(_0xef1dff,'export\x20CLAUDE_SESSION_ID=\x22'+_0x28cdda+'\x22\x0a');}catch{}}if(_0x28cdda){shouldAutoEnableAfterClear(_0x37d1eb)&&_0x4f41ca[_0x3ea0a6(0x17f)](autoEnableAfterClear,_0x28cdda);initBranchTracking(_0x28cdda);const _0x1f8ca4=isSessionEnabled(_0x28cdda);try{const _0x2b2a8c=_0x4f41ca['vYpca'](createTelemetryCollector,_0x4f41ca[_0x3ea0a6(0x17e)]);await _0x2b2a8c['trackCommandStart']({'sessionId':_0x28cdda,'hooksEnabled':_0x1f8ca4}),await _0x2b2a8c[_0x3ea0a6(0x180)](_0x3ea0a6(0x190));}catch{}if(_0x1f8ca4){const _0x393d84=_0x4f41ca['ZtPxX'](getCurrentBranch),_0x48ff9f=_0x393d84&&_0x4f41ca['qRldq'](_0x393d84,'main')&&_0x393d84!==_0x4f41ca['CfPoR']?_0x3ea0a6(0x194)+_0x393d84+')':'',_0xc1df0={'hookSpecificOutput':{'hookEventName':_0x4f41ca[_0x3ea0a6(0x193)],'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x48ff9f}};console['log'](JSON[_0x3ea0a6(0x18d)](_0xc1df0));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f0a3d,_0x4b93f9){const _0xc05983=_0x4c89,_0x242169=_0x1f0a3d();while(!![]){try{const _0x2da01d=parseInt(_0xc05983(0x175))/0x1*(parseInt(_0xc05983(0x17c))/0x2)+parseInt(_0xc05983(0x183))/0x3+-parseInt(_0xc05983(0x165))/0x4+parseInt(_0xc05983(0x177))/0x5+parseInt(_0xc05983(0x17a))/0x6+parseInt(_0xc05983(0x185))/0x7*(-parseInt(_0xc05983(0x166))/0x8)+-parseInt(_0xc05983(0x173))/0x9;if(_0x2da01d===_0x4b93f9)break;else _0x242169['push'](_0x242169['shift']());}catch(_0x35cc13){_0x242169['push'](_0x242169['shift']());}}}(_0x1b26,0x9308b));function _0x1b26(){const _0x4c907c=['block','utf8','\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(','sessionId','12713292mPyxzv','includes','733PChbBq','DZQKU','2382950aYcwwF','FsmNN','name','5753610FlZqpo','input','908GOLsUx','EyeCj','cefZb','RANGER_SKIP_VERIFICATION','Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session','string','stop_hook_active','3410190uDoqvX','stringify','10381ywmFqz','read','AOQjD','\x20for\x20\x22','featureId','SygwX','toString','`,\x20then\x20run\x20/exit\x20again.','hook:stop','992236TzSYdi','3464zEFiwf','success','size','jhAZA','log','message','trackCommandEnd','QtZcO','close'];_0x1b26=function(){return _0x4c907c;};return _0x1b26();}import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';function _0x4c89(_0x11ac65,_0x5863e7){_0x11ac65=_0x11ac65-0x165;const _0x1b263c=_0x1b26();let _0x4c899d=_0x1b263c[_0x11ac65];return _0x4c899d;}import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x12a2a0){const _0x465cd2=_0x4c89,_0x4f2abd={'LRyCU':function(_0x1c6e23,_0x43867b){return _0x1c6e23(_0x43867b);},'dLvma':function(_0x4f1382,_0x5611fc){return _0x4f1382(_0x5611fc);},'OfpWw':function(_0xbba5fa,_0x4f4670){return _0xbba5fa===_0x4f4670;},'QtZcO':function(_0x1de74f,_0x33e445,_0x3d2a68,_0x1b5bb3){return _0x1de74f(_0x33e445,_0x3d2a68,_0x1b5bb3);},'DZQKU':function(_0x5573b0,_0x6dc5f,_0x34c4d8,_0x5c2a80){return _0x5573b0(_0x6dc5f,_0x34c4d8,_0x5c2a80);},'EyeCj':function(_0x1f05a3){return _0x1f05a3();},'cefZb':function(_0x33bc39,_0x2f94d1,_0x364e60){return _0x33bc39(_0x2f94d1,_0x364e60);},'jhAZA':function(_0x1d8094,_0x3e4f60){return _0x1d8094(_0x3e4f60);},'NFVja':function(_0x1ed738,_0xb4f14f,_0x13f60b,_0x51f8f4){return _0x1ed738(_0xb4f14f,_0x13f60b,_0x51f8f4);},'QAzXc':function(_0x420fb9,_0x4fc105,_0x8dbb77,_0x459197){return _0x420fb9(_0x4fc105,_0x8dbb77,_0x459197);}},_0x8f7d99=await _0x4f2abd['LRyCU'](getEnabledHookContext,_0x12a2a0),_0x54dd41=_0x8f7d99?.[_0x465cd2(0x172)]??null,_0x4d9561=_0x4f2abd['dLvma'](Boolean,_0x8f7d99?.['input']?.[_0x465cd2(0x182)]),_0x4a4773=_0x4f2abd['OfpWw'](typeof _0x8f7d99?.['input']?.['transcript_path'],_0x465cd2(0x181))?_0x8f7d99[_0x465cd2(0x17b)]['transcript_path']:null;let _0x402ac5=!![];if(!_0x54dd41){await _0x4f2abd[_0x465cd2(0x16d)](trackStop,_0x54dd41,![],_0x402ac5);return;}try{const _0xc2c324=getSessionEntry(_0x54dd41);if(!_0xc2c324){await _0x4f2abd[_0x465cd2(0x176)](trackStop,_0x54dd41,!![],_0x402ac5);return;}const _0x3d95c8='https://dashboard.ranger.net/features/'+_0xc2c324['featureId'],_0x12c3da=_0x465cd2(0x17f),_0x5dabcd=await _0x4f2abd[_0x465cd2(0x17d)](getToken),_0x29973c=!_0x4d9561;let _0x26559=null,_0xf0ea9b=null;const _0x4f5c6b=_0x4d9561&&await transcriptHasToken(_0x4a4773,_0x12c3da),_0x3252ba=await _0x4f2abd['cefZb'](transcriptHasToken,_0x4a4773,_0x3d95c8);if(_0x5dabcd)try{const _0x487ea8=await getFeature(_0xc2c324[_0x465cd2(0x189)]);_0x26559=_0x487ea8[_0x465cd2(0x179)]??null,_0xf0ea9b=_0x487ea8['currentSessionId']??null;}catch{}if(_0x5dabcd&&_0xf0ea9b)try{await _0x4f2abd[_0x465cd2(0x17e)](concludeSession,_0xc2c324[_0x465cd2(0x189)],_0xf0ea9b);}catch(_0x39df29){if(_0x4f5c6b){await _0x4f2abd['QtZcO'](trackStop,_0x54dd41,!![],_0x402ac5);return;}_0x402ac5=![];const _0x1bce34=_0x39df29 instanceof Error?_0x39df29[_0x465cd2(0x16b)]:_0x4f2abd[_0x465cd2(0x169)](String,_0x39df29),_0x4f1c81={'decision':_0x465cd2(0x16f),'reason':_0x465cd2(0x180)+(_0x26559?_0x465cd2(0x188)+_0x26559+'\x22':'')+':\x0a\x0a'+_0x1bce34+_0x465cd2(0x171)+_0x3d95c8+')\x20and\x20the\x20token\x20`'+_0x12c3da+_0x465cd2(0x18c)};console[_0x465cd2(0x16a)](JSON[_0x465cd2(0x184)](_0x4f1c81)),await _0x4f2abd['NFVja'](trackStop,_0x54dd41,!![],_0x402ac5);return;}await trackStop(_0x54dd41,!![],_0x402ac5);return;}catch{await _0x4f2abd['QAzXc'](trackStop,_0x54dd41,!![],_0x402ac5);return;}}async function trackStop(_0x4c8873,_0x5d4da3,_0x16fc07){const _0x2a69a7=_0x4c89,_0x5c37da={'EmSGo':function(_0xb5f09b,_0x23e27f){return _0xb5f09b??_0x23e27f;}};try{const _0x5b1b0c=createTelemetryCollector(_0x2a69a7(0x18d));await _0x5b1b0c['trackCommandStart']({'sessionId':_0x5c37da['EmSGo'](_0x4c8873,undefined),'hooksEnabled':_0x5d4da3,'stopAllowed':_0x16fc07}),await _0x5b1b0c[_0x2a69a7(0x16c)](_0x2a69a7(0x167));}catch{}}async function transcriptHasToken(_0x4f56bb,_0x302418){const _0x170531=_0x4c89;if(!_0x4f56bb)return![];const _0x1119c8=await readTranscriptTail(_0x4f56bb,0x30d40);return _0x1119c8?_0x1119c8[_0x170531(0x174)](_0x302418):![];}async function readTranscriptTail(_0x47af06,_0x36246a){const _0x2ef110=_0x4c89,_0x288984={'SygwX':function(_0x41ee27,_0x466d8b,_0x7cb80f){return _0x41ee27(_0x466d8b,_0x7cb80f);},'hZngM':function(_0x103f4b,_0x10cd00){return _0x103f4b<=_0x10cd00;},'FsmNN':function(_0x534f50,_0x1fdbf5){return _0x534f50-_0x1fdbf5;},'AOQjD':_0x2ef110(0x170)};let _0x15462f=null;try{_0x15462f=await _0x288984[_0x2ef110(0x18a)](open,_0x47af06,'r');const _0xf37b6b=await _0x15462f['stat'](),_0xd5f3f0=Math['min'](_0xf37b6b['size'],_0x36246a);if(_0x288984['hZngM'](_0xd5f3f0,0x0))return'';const _0x26da8e=Buffer['alloc'](_0xd5f3f0);return await _0x15462f[_0x2ef110(0x186)](_0x26da8e,0x0,_0xd5f3f0,_0x288984[_0x2ef110(0x178)](_0xf37b6b[_0x2ef110(0x168)],_0xd5f3f0)),_0x26da8e[_0x2ef110(0x18b)](_0x288984[_0x2ef110(0x187)]);}catch{return null;}finally{try{await _0x15462f?.[_0x2ef110(0x16e)]();}catch{}}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2aca4c,_0x332447){var _0x45222f=_0x5b8b,_0x2dbe5e=_0x2aca4c();while(!![]){try{var _0x138a05=parseInt(_0x45222f(0xf9))/0x1+parseInt(_0x45222f(0xf5))/0x2*(-parseInt(_0x45222f(0xf4))/0x3)+parseInt(_0x45222f(0xf7))/0x4*(parseInt(_0x45222f(0xf1))/0x5)+parseInt(_0x45222f(0xf0))/0x6*(-parseInt(_0x45222f(0xf3))/0x7)+-parseInt(_0x45222f(0xef))/0x8+parseInt(_0x45222f(0xf8))/0x9+parseInt(_0x45222f(0xf2))/0xa*(-parseInt(_0x45222f(0xf6))/0xb);if(_0x138a05===_0x332447)break;else _0x2dbe5e['push'](_0x2dbe5e['shift']());}catch(_0x40b6a1){_0x2dbe5e['push'](_0x2dbe5e['shift']());}}}(_0x2cd7,0x4aa71));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';function _0x2cd7(){var _0x30ff05=['209538GYCqON','10FhEWrd','2930vxMPrX','91QpLfva','5739ZiZOFH','34ncvUZS','17215XQOwLs','920248TRJHNP','2187198laiIjw','599148Vvhsrs','411616QffVQt'];_0x2cd7=function(){return _0x30ff05;};return _0x2cd7();}function _0x5b8b(_0x1157bc,_0xba14ec){_0x1157bc=_0x1157bc-0xef;var _0x2cd73b=_0x2cd7();var _0x5b8b55=_0x2cd73b[_0x1157bc];return _0x5b8b55;}export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x23dc(){const _0x3dfffa=['7592AnBupS','3044196NVMovY','12pnQeLT','isTTY','2337430DpinAI','organizationName','11016MwwRZZ','1505418eLswyk','success','log','221141xnIbrI','3753423teeAwc','6069cKQDeN','user','jqyvQ'];_0x23dc=function(){return _0x3dfffa;};return _0x23dc();}(function(_0x3fb542,_0x4f2718){const _0x1e108b=_0x4559,_0x3f325b=_0x3fb542();while(!![]){try{const _0x550035=-parseInt(_0x1e108b(0x93))/0x1+-parseInt(_0x1e108b(0x90))/0x2+parseInt(_0x1e108b(0x94))/0x3+-parseInt(_0x1e108b(0x8f))/0x4+-parseInt(_0x1e108b(0x8d))/0x5*(-parseInt(_0x1e108b(0x9a))/0x6)+parseInt(_0x1e108b(0x95))/0x7*(-parseInt(_0x1e108b(0x98))/0x8)+parseInt(_0x1e108b(0x99))/0x9;if(_0x550035===_0x4f2718)break;else _0x3f325b['push'](_0x3f325b['shift']());}catch(_0x44e5b3){_0x3f325b['push'](_0x3f325b['shift']());}}}(_0x23dc,0xb0fea));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x4559(_0x72a0a3,_0x3dbfde){_0x72a0a3=_0x72a0a3-0x8c;const _0x23dc71=_0x23dc();let _0x455998=_0x23dc71[_0x72a0a3];return _0x455998;}export async function login(){const _0x6bfa81=_0x4559,_0x4e70b0={'jqyvQ':'\x0a✅\x20API\x20key\x20stored\x20successfully','elXnW':function(_0x5d40ad,_0x2bcba6){return _0x5d40ad instanceof _0x2bcba6;}},_0xba97a7=process['stdin'][_0x6bfa81(0x8c)]&&process['stdout']['isTTY'];if(!_0xba97a7)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x50848a=await runDeviceAuthFlow(),_0x22047e=await getCurrentUser(_0x50848a);_0x22047e[_0x6bfa81(0x91)]?console[_0x6bfa81(0x92)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x22047e[_0x6bfa81(0x96)][_0x6bfa81(0x8e)]):console[_0x6bfa81(0x92)](_0x4e70b0[_0x6bfa81(0x97)]);}catch(_0x56af46){throw new Error('Login\x20failed:\x20'+(_0x4e70b0['elXnW'](_0x56af46,Error)?_0x56af46['message']:_0x56af46));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13d8af,_0x36473c){const _0x28d576=_0x5da6,_0x2309f2=_0x13d8af();while(!![]){try{const _0x5900bc=parseInt(_0x28d576(0x195))/0x1*(-parseInt(_0x28d576(0x17f))/0x2)+parseInt(_0x28d576(0x16f))/0x3+-parseInt(_0x28d576(0x192))/0x4*(parseInt(_0x28d576(0x168))/0x5)+-parseInt(_0x28d576(0x16c))/0x6+parseInt(_0x28d576(0x17d))/0x7+parseInt(_0x28d576(0x181))/0x8*(parseInt(_0x28d576(0x18d))/0x9)+-parseInt(_0x28d576(0x176))/0xa*(parseInt(_0x28d576(0x190))/0xb);if(_0x5900bc===_0x36473c)break;else _0x2309f2['push'](_0x2309f2['shift']());}catch(_0x48a52e){_0x2309f2['push'](_0x2309f2['shift']());}}}(_0x3aab,0xd84f3));function _0x5da6(_0x41f5c6,_0x3b65ed){_0x41f5c6=_0x41f5c6-0x162;const _0x3aabeb=_0x3aab();let _0x5da67d=_0x3aabeb[_0x41f5c6];return _0x5da67d;}import{join}from'path';import{existsSync}from'fs';import _0x35f212 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x21c9ad){const _0x4d2a26=_0x5da6,_0x1615ea={'mIggz':function(_0x90482d,_0x27f5e0){return _0x90482d(_0x27f5e0);},'zrnjM':_0x4d2a26(0x180),'FWKbu':function(_0x60d144,_0x30d398){return _0x60d144(_0x30d398);},'waexP':function(_0x58203a){return _0x58203a();},'fedzs':'list','qqQIA':'User\x20(available\x20in\x20all\x20your\x20projects)','zUgCv':_0x4d2a26(0x16d),'gwYnU':_0x4d2a26(0x171),'BrwFt':'trailhead','JEnhE':'✓\x20Marketplace\x20already\x20added','AsAly':'marketplace','aQxzZ':_0x4d2a26(0x187),'LsrKH':_0x4d2a26(0x16a),'yfYxi':_0x4d2a26(0x173),'VXilx':'--scope','pyoPY':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','pHETz':_0x4d2a26(0x184),'VmPkM':'ranger@trailhead','VxxJj':function(_0x571611,_0x39779f){return _0x571611===_0x39779f;},'chUfv':'already\x20enabled','kYkdg':_0x4d2a26(0x18c)},_0x1ae408=await _0x1615ea['mIggz'](isPluginInstalled,_0x4d2a26(0x193));if(_0x1ae408)return console['log'](_0x1615ea[_0x4d2a26(0x17b)]),![];const _0x1e928d=_0x1615ea['FWKbu'](existsSync,join(_0x1615ea[_0x4d2a26(0x169)](getProjectRoot),_0x4d2a26(0x18b)));let _0x3d9f8d;if(_0x21c9ad)_0x3d9f8d=_0x21c9ad;else{if(_0x1e928d)_0x3d9f8d='project';else{console['log'](_0x4d2a26(0x18f));const _0x890ae6=await _0x35f212[_0x4d2a26(0x17e)]([{'type':_0x1615ea['fedzs'],'name':_0x4d2a26(0x177),'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x1615ea[_0x4d2a26(0x18e)],'value':'user'},{'name':_0x1615ea['zUgCv'],'value':_0x1615ea[_0x4d2a26(0x178)]}],'default':'user'}]);_0x3d9f8d=_0x890ae6[_0x4d2a26(0x177)];}}console[_0x4d2a26(0x16e)](_0x4d2a26(0x189)+_0x3d9f8d+_0x4d2a26(0x174));const _0x5413a0=await isMarketplaceAdded(_0x1615ea['BrwFt']);let _0x2af702=_0x5413a0;if(_0x5413a0)console['log'](_0x1615ea[_0x4d2a26(0x164)]);else{const _0x4e772a=await _0x1615ea[_0x4d2a26(0x179)](runClaudeCommand,['plugin',_0x1615ea['AsAly'],'add',_0x4d2a26(0x163)]);!_0x4e772a[_0x4d2a26(0x191)]?(console[_0x4d2a26(0x17a)](_0x4d2a26(0x16b),_0x4e772a['error']),console[_0x4d2a26(0x16e)](_0x1615ea['aQxzZ']),console['log'](_0x1615ea['LsrKH']),console[_0x4d2a26(0x16e)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x3d9f8d)):_0x2af702=!![];}if(_0x2af702){const _0x2d0eb5=await runClaudeCommand([_0x1615ea[_0x4d2a26(0x172)],_0x4d2a26(0x167),_0x4d2a26(0x193),_0x1615ea['VXilx'],_0x3d9f8d]);if(!_0x2d0eb5[_0x4d2a26(0x191)])console[_0x4d2a26(0x17a)](_0x4d2a26(0x188),_0x2d0eb5[_0x4d2a26(0x17a)]),console[_0x4d2a26(0x16e)](_0x1615ea['aQxzZ']),console[_0x4d2a26(0x16e)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x3d9f8d);else{console[_0x4d2a26(0x16e)](_0x1615ea['pyoPY']);const _0x413f7e=['plugin',_0x1615ea['pHETz'],_0x1615ea['VmPkM']];_0x1615ea[_0x4d2a26(0x162)](_0x3d9f8d,'project')&&_0x413f7e['push'](_0x1615ea[_0x4d2a26(0x166)],_0x4d2a26(0x171));const _0x31f290=await runClaudeCommand(_0x413f7e,{'captureOutput':!![]}),_0x503169=_0x31f290[_0x4d2a26(0x17c)]?.['includes'](_0x1615ea['chUfv']);!_0x31f290['success']&&!_0x503169?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x31f290[_0x4d2a26(0x17a)]):console['log'](_0x1615ea[_0x4d2a26(0x18a)]);}}return!![];}export async function ensureClaudeSkills(_0x47c0f2){const _0x27eef6=_0x5da6,_0x431856={'uxEtr':function(_0x531e7c,_0x38fbe6){return _0x531e7c(_0x38fbe6);},'ffyiW':function(_0x1a8e61,_0x3c7b1c){return _0x1a8e61(_0x3c7b1c);},'VboBq':'ranger','QSkPo':_0x27eef6(0x170),'KaAvf':function(_0x2cab80,_0x2a9bda){return _0x2cab80(_0x2a9bda);},'CnoBz':function(_0x4140fb,_0x591dc4){return _0x4140fb||_0x591dc4;},'GqeQl':function(_0x4ae0a5){return _0x4ae0a5();},'DYdpp':_0x27eef6(0x18b),'jWwBo':_0x27eef6(0x171),'uMaGx':'confirm','FAUsC':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x50ad60=_0x431856['uxEtr'](existsSync,join(_0x431856['ffyiW'](getSkillsDir,'user'),_0x431856[_0x27eef6(0x194)],_0x431856[_0x27eef6(0x186)])),_0x862eef=_0x431856['KaAvf'](existsSync,join(getSkillsDir(_0x27eef6(0x171)),_0x431856[_0x27eef6(0x194)],_0x27eef6(0x170)));if(_0x431856['CnoBz'](_0x50ad60,_0x862eef))return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x1575fc=_0x431856['uxEtr'](existsSync,join(_0x431856[_0x27eef6(0x175)](getProjectRoot),_0x431856[_0x27eef6(0x183)]));let _0x1427ce=!![];if(_0x47c0f2)await _0x431856[_0x27eef6(0x185)](skillup,{'autoInstall':_0x47c0f2,'suppressUsage':!![]});else{if(_0x1575fc)await skillup({'autoInstall':_0x431856[_0x27eef6(0x182)],'suppressUsage':!![]});else{const _0x11655b=await _0x35f212[_0x27eef6(0x17e)]([{'type':_0x431856['uMaGx'],'name':'wantsSkillup','message':_0x431856['FAUsC'],'default':!![]}]);_0x1427ce=_0x11655b[_0x27eef6(0x165)],_0x1427ce&&await skillup({'suppressUsage':!![]});}}return _0x1427ce;}function _0x3aab(){const _0x431bd1=['2VjilCg','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','8rYXrwe','jWwBo','DYdpp','enable','uxEtr','QSkPo','\x0aYou\x20can\x20install\x20manually\x20with:','❌\x20Failed\x20to\x20install\x20plugin:','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','kYkdg','.claude','✓\x20Claude\x20Code\x20plugin\x20enabled','14737428VexdZz','qqQIA','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','44231PZqXWK','success','4DoWlAV','ranger@trailhead','VboBq','1045421DbzwHN','VxxJj','ranger-testing/trailhead','JEnhE','wantsSkillup','VXilx','install','921155msrHfv','waexP','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','❌\x20Failed\x20to\x20add\x20marketplace:','3017496xwRDQL','Project\x20(shared\x20with\x20team\x20via\x20git)','log','2115123gVRZnS','SKILL.md','project','yfYxi','plugin','\x20level)...\x0a','GqeQl','3340kVKDIC','pluginScope','gwYnU','mIggz','error','zrnjM','output','11333364VniggH','prompt'];_0x3aab=function(){return _0x431bd1;};return _0x3aab();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1eea56,_0x5512df){const _0x371df7=_0x4924,_0x18b6e9=_0x1eea56();while(!![]){try{const _0x246dd8=-parseInt(_0x371df7(0x174))/0x1*(-parseInt(_0x371df7(0x165))/0x2)+parseInt(_0x371df7(0x176))/0x3+-parseInt(_0x371df7(0x172))/0x4+parseInt(_0x371df7(0x171))/0x5+-parseInt(_0x371df7(0x170))/0x6+parseInt(_0x371df7(0x16a))/0x7*(parseInt(_0x371df7(0x169))/0x8)+parseInt(_0x371df7(0x15d))/0x9*(-parseInt(_0x371df7(0x161))/0xa);if(_0x246dd8===_0x5512df)break;else _0x18b6e9['push'](_0x18b6e9['shift']());}catch(_0x302829){_0x18b6e9['push'](_0x18b6e9['shift']());}}}(_0x4216,0x65cd7));function _0x4216(){const _0xbd1ca4=['https://opencode.ai/config.json','@ranger-testing/opencode-plugin','✓\x20OpenCode\x20plugin\x20configured','9vyBoZD','Where\x20should\x20the\x20plugin\x20be\x20installed?','plugin','Failed\x20to\x20read\x20opencode.json','5404690HCnndn','parse','PuTyG','PtErw','104plDYat','$schema','project','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','400TJfElD','93863vROYIR','user','pluginScope','log','IjSPi','\x0a📦\x20OpenCode\x20Plugin\x0a','1877214RTNzKo','1872945BiEamM','1215916CQgXFQ','list','3512qhQPhK','User\x20(available\x20in\x20all\x20your\x20projects)','1039911LMTcts','Project\x20(shared\x20with\x20team\x20via\x20git)','isArray','ZZCQy'];_0x4216=function(){return _0xbd1ca4;};return _0x4216();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x188219 from'inquirer';function _0x4924(_0xaf6f8a,_0x39c72d){_0xaf6f8a=_0xaf6f8a-0x157;const _0x42164a=_0x4216();let _0x492446=_0x42164a[_0xaf6f8a];return _0x492446;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x11df40){const _0x991da4=_0x4924,_0x10078a={'PtErw':function(_0x4d41de,_0x366756,_0x2be28d){return _0x4d41de(_0x366756,_0x2be28d);},'PuTyG':function(_0x5823fc,_0x5c11d5){return _0x5823fc(_0x5c11d5);},'rsMuo':'project','IjSPi':_0x991da4(0x16f),'LyKIw':_0x991da4(0x175),'QaElC':_0x991da4(0x15b),'kqicx':_0x991da4(0x15a),'jdQxJ':'utf-8','ZZCQy':_0x991da4(0x160),'pkgtF':function(_0x5889c8,_0x5d78af){return _0x5889c8(_0x5d78af);}},_0x48e931=existsSync(_0x10078a['PtErw'](join,_0x10078a[_0x991da4(0x163)](getOpencodeConfigDir,_0x991da4(0x167)),'opencode.json'));let _0x172172;if(_0x11df40)_0x172172=_0x11df40;else{if(_0x48e931)_0x172172=_0x10078a['rsMuo'];else{console[_0x991da4(0x16d)](_0x10078a[_0x991da4(0x16e)]);const _0x817d52=await _0x188219['prompt']([{'type':_0x991da4(0x173),'name':'pluginScope','message':_0x991da4(0x15e),'choices':[{'name':_0x10078a['LyKIw'],'value':_0x991da4(0x16b)},{'name':_0x991da4(0x157),'value':_0x991da4(0x167)}],'default':_0x991da4(0x16b)}]);_0x172172=_0x817d52[_0x991da4(0x16c)];}}const _0x2901c1=join(getOpencodeConfigDir(_0x172172),'opencode.json'),_0x170eb7=_0x10078a['QaElC'],_0x1df88a=_0x10078a['kqicx'];let _0x44345c={};if(_0x10078a['PuTyG'](existsSync,_0x2901c1))try{const _0x26f713=await readFile(_0x2901c1,_0x10078a['jdQxJ']);_0x44345c=JSON[_0x991da4(0x162)](_0x26f713);}catch(_0x3c9f0c){return console['error'](_0x991da4(0x168)),{'configured':![],'scope':_0x172172,'error':_0x10078a[_0x991da4(0x159)],'details':_0x3c9f0c};}const _0x20a860=Array[_0x991da4(0x158)](_0x44345c['plugin'])?_0x44345c[_0x991da4(0x15f)]:[];if(_0x20a860['includes'](_0x170eb7))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x172172};return _0x44345c[_0x991da4(0x166)]=_0x44345c[_0x991da4(0x166)]||_0x1df88a,_0x44345c['plugin']=[..._0x20a860,_0x170eb7],await mkdir(_0x10078a['pkgtF'](getOpencodeConfigDir,_0x172172),{'recursive':!![]}),await _0x10078a[_0x991da4(0x164)](writeFile,_0x2901c1,JSON['stringify'](_0x44345c,null,0x2)+'\x0a'),console['log'](_0x991da4(0x15c)),{'configured':!![],'scope':_0x172172};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ef66d,_0x1157da){const _0x2cb558=_0x3756,_0x5f0aae=_0x2ef66d();while(!![]){try{const _0x35a575=-parseInt(_0x2cb558(0x17c))/0x1+parseInt(_0x2cb558(0x1ae))/0x2+parseInt(_0x2cb558(0x19b))/0x3+parseInt(_0x2cb558(0x1a6))/0x4*(parseInt(_0x2cb558(0x182))/0x5)+-parseInt(_0x2cb558(0x1b6))/0x6*(parseInt(_0x2cb558(0x1a7))/0x7)+parseInt(_0x2cb558(0x180))/0x8+-parseInt(_0x2cb558(0x1b1))/0x9;if(_0x35a575===_0x1157da)break;else _0x5f0aae['push'](_0x5f0aae['shift']());}catch(_0x3bb0d7){_0x5f0aae['push'](_0x5f0aae['shift']());}}}(_0x3e59,0x5edad));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x3756(_0x307ce0,_0x5be03d){_0x307ce0=_0x307ce0-0x179;const _0x3e5916=_0x3e59();let _0x375690=_0x3e5916[_0x307ce0];return _0x375690;}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x3e59(){const _0x70b697=['132YRJSvY','1456CRvpAD','--scope','SmedM','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','trackPhaseStart','Failed\x20to\x20install\x20plugin:','ANQQL','970654cATuhR','Failed\x20to\x20add\x20marketplace:','uWryR','3862557YKiePD','LPzRF','message','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','success','396rbQHpe','dir_setup','nLfRp','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','CI\x20profile\x20\x22','266656VqGxfs','map','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','LGXsU','189936swzvkG','No\x20API\x20token\x20available\x20for\x20decryption','11485kNNnLs','ranger@trailhead','error','trailhead','Multiple\x20CI\x20profiles\x20found:\x20','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','✓\x20Claude\x20Code\x20plugin\x20installed','length','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','plugin','install','kccti','profile','wkosc','skills','trackPhaseEnd','Auto-detected\x20CI\x20profile:\x20','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','skipChromium','huQhm','sessions','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','LAnlz','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','1539636Wrmfhj','evOHt','name','HtGUq','path','settings.json','log','LJjlQ','mOxrN','✓\x20Created\x20profile\x20settings:\x20baseUrl=','jIqlG'];_0x3e59=function(){return _0x70b697;};return _0x3e59();}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(_0x4a624c){const _0x1b7af1=_0x3756,_0x494293={'nGKDA':function(_0x14b264,_0x2cd360,_0x29a154){return _0x14b264(_0x2cd360,_0x29a154);},'ANQQL':function(_0x39b705,_0x2e37fb){return _0x39b705+_0x2e37fb;},'kccti':function(_0x208e65,_0xb5de7c,_0x35256f){return _0x208e65(_0xb5de7c,_0x35256f);}},_0x454eda=getRangerDir(),_0x350e87=join(_0x454eda,'ci');if(_0x4a624c){const _0x339803=_0x494293['nGKDA'](join,_0x350e87,_0x4a624c);return{'name':_0x4a624c,'path':_0x339803};}if(!existsSync(_0x350e87))throw new Error(_0x494293[_0x1b7af1(0x1ad)](_0x1b7af1(0x17e),'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));const _0x108db0=await readdir(_0x350e87,{'withFileTypes':!![]}),_0x50f1c9=_0x108db0['filter'](_0x5077d8=>_0x5077d8['isDirectory']())[_0x1b7af1(0x17d)](_0x1fcb15=>_0x1fcb15[_0x1b7af1(0x19d)]);if(_0x50f1c9[_0x1b7af1(0x189)]===0x0)throw new Error(_0x1b7af1(0x18a)+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');if(_0x50f1c9['length']===0x1){const _0x11eb94=_0x50f1c9[0x0];return console['log'](_0x1b7af1(0x193)+_0x11eb94),{'name':_0x11eb94,'path':_0x494293[_0x1b7af1(0x18e)](join,_0x350e87,_0x11eb94)};}throw new Error(_0x1b7af1(0x186)+_0x50f1c9['join'](',\x20')+_0x1b7af1(0x198));}async function installPluginNonInteractive(){const _0x1165de=_0x3756,_0x209e69={'SmedM':function(_0x57a856,_0x27f252){return _0x57a856(_0x27f252);},'mEaZv':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','LPzRF':_0x1165de(0x17a),'efUJe':'✓\x20Marketplace\x20already\x20added','nLfRp':_0x1165de(0x18c),'cFEYc':'marketplace','wkosc':_0x1165de(0x1af),'BUHJF':'ranger@trailhead','uWryR':_0x1165de(0x19a),'HlMZV':_0x1165de(0x188)},_0x335172=await _0x209e69[_0x1165de(0x1a9)](isPluginInstalled,_0x1165de(0x183));if(_0x335172)return console[_0x1165de(0x1a1)](_0x209e69['mEaZv']),![];console['log'](_0x209e69[_0x1165de(0x1b2)]);const _0x2c0181=await isMarketplaceAdded(_0x1165de(0x185));let _0x28778e=_0x2c0181;if(_0x2c0181)console['log'](_0x209e69['efUJe']);else{const _0x473ac0=await _0x209e69['SmedM'](runClaudeCommand,[_0x209e69[_0x1165de(0x179)],_0x209e69['cFEYc'],'add','ranger-testing/trailhead']);!_0x473ac0[_0x1165de(0x1b5)]?(console['error'](_0x209e69[_0x1165de(0x190)],_0x473ac0[_0x1165de(0x184)]),console[_0x1165de(0x1a1)](_0x1165de(0x1aa))):_0x28778e=!![];}if(_0x28778e){const _0x1d4155=await _0x209e69[_0x1165de(0x1a9)](runClaudeCommand,['plugin',_0x1165de(0x18d),_0x209e69['BUHJF'],_0x1165de(0x1a8),'project']);!_0x1d4155[_0x1165de(0x1b5)]?(console['error'](_0x1165de(0x1ac),_0x1d4155['error']),console['log'](_0x209e69[_0x1165de(0x1b0)])):console[_0x1165de(0x1a1)](_0x209e69['HlMZV']);}return!![];}export async function setupCi(_0x2ece35,_0xe5d09e,_0x4b44c6){const _0x2850bd=_0x3756,_0x52211e={'FLiBT':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','LJjlQ':'auth','JLorN':function(_0x2ae9dd,_0x3977c1){return _0x2ae9dd(_0x3977c1);},'niOIJ':'chromium','CVWZk':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','mOxrN':function(_0x26dce3){return _0x26dce3();},'jIqlG':function(_0x1ad19d,_0x250054,_0xca2dd){return _0x1ad19d(_0x250054,_0xca2dd);},'LGXsU':'auth.json','HtGUq':function(_0x363f9a,_0xa8cbe9){return _0x363f9a(_0xa8cbe9);},'evOHt':function(_0x1086e,_0x1dd645){return _0x1086e(_0x1dd645);},'Hvdph':'profile_activate','LAnlz':'plugin','dOEOS':'project','huQhm':_0x2850bd(0x191)};console['log'](_0x52211e['FLiBT']),_0x4b44c6?.['trackPhaseStart'](_0x52211e['LJjlQ']),await _0x52211e['JLorN'](authenticate,_0x2ece35),_0x4b44c6?.['trackPhaseEnd'](_0x52211e[_0x2850bd(0x1a2)]),_0x4b44c6?.['trackPhaseStart'](_0x2850bd(0x1b7));const {path:_0x3eaf02,installed:_0x459a14}=await ensureRangerDir();await writeRangerGitignore(_0x3eaf02);const _0x2c9762=join(_0x3eaf02,_0x2850bd(0x197));!existsSync(_0x2c9762)&&await mkdir(_0x2c9762,{'recursive':!![]});_0x4b44c6?.[_0x2850bd(0x192)]('dir_setup',{'installed':_0x459a14}),_0x4b44c6?.[_0x2850bd(0x1ab)](_0x52211e['niOIJ']);let _0x2b92ba=![];_0xe5d09e?.['skipChromium']?console['log'](_0x52211e['CVWZk']):_0x2b92ba=await _0x52211e['mOxrN'](ensureChromium);_0x4b44c6?.['trackPhaseEnd']('chromium',{'installed':_0x2b92ba,'skipped':!!_0xe5d09e?.[_0x2850bd(0x195)]}),_0x4b44c6?.['trackPhaseStart']('profile_activate');const _0xdf5c0d=await findCiProfile(_0xe5d09e?.[_0x2850bd(0x18f)]);let _0x8514a9=![];_0xe5d09e?.['baseUrl']&&(await mkdir(_0xdf5c0d[_0x2850bd(0x19f)],{'recursive':!![]}),await _0x52211e[_0x2850bd(0x1a5)](saveSettings,_0xdf5c0d['name'],{'baseUrl':_0xe5d09e['baseUrl'],'headless':!![]}),console[_0x2850bd(0x1a1)](_0x2850bd(0x1a4)+_0xe5d09e['baseUrl']),_0x8514a9=!![]);const _0x1726a7=_0x52211e['jIqlG'](join,_0xdf5c0d['path'],_0x2850bd(0x1a0));if(!existsSync(_0x1726a7)&&!_0x8514a9)throw new Error(_0x2850bd(0x17b)+_0xdf5c0d['name']+_0x2850bd(0x1b4));const _0x3beea2=_0x52211e[_0x2850bd(0x1a5)](join,_0xdf5c0d[_0x2850bd(0x19f)],_0x52211e[_0x2850bd(0x17f)]),_0x291cdc=join(_0xdf5c0d[_0x2850bd(0x19f)],'auth.json.enc'),_0x495ec7=_0x52211e['HtGUq'](existsSync,_0x3beea2),_0x1d1e31=_0x52211e['HtGUq'](existsSync,_0x291cdc);if(_0x1d1e31)try{const _0x48bb26=await getToken();if(!_0x48bb26)throw new Error(_0x2850bd(0x181));const _0x2b2dc6=await _0x52211e[_0x2850bd(0x19e)](readFile,_0x291cdc);_0x52211e['jIqlG'](decrypt,_0x2b2dc6,_0x48bb26),console['log'](_0x2850bd(0x18b));}catch(_0x4382f3){const _0x5e7aad=_0x4382f3 instanceof Error?_0x4382f3[_0x2850bd(0x1b3)]:String(_0x4382f3);throw new Error(_0x2850bd(0x187)+_0xdf5c0d[_0x2850bd(0x19d)]+'\x22:\x20'+_0x5e7aad);}else _0x495ec7?console['log']('✓\x20Auth\x20state\x20found'):console['log'](_0x2850bd(0x194));await _0x52211e[_0x2850bd(0x19c)](writeActiveProfileName,_0xdf5c0d[_0x2850bd(0x19d)]),console[_0x2850bd(0x1a1)]('✓\x20Active\x20profile:\x20'+_0xdf5c0d[_0x2850bd(0x19d)]),_0x4b44c6?.['trackPhaseEnd'](_0x52211e['Hvdph'],{'profileName':_0xdf5c0d['name'],'hasAuth':_0x495ec7,'hasEncryptedAuth':_0x1d1e31,'createdSettings':_0x8514a9}),_0x4b44c6?.[_0x2850bd(0x1ab)](_0x52211e[_0x2850bd(0x199)]);const _0x35b415=await _0x52211e[_0x2850bd(0x1a3)](installPluginNonInteractive);_0x4b44c6?.['trackPhaseEnd']('plugin',{'installed':_0x35b415}),_0x4b44c6?.['trackPhaseStart'](_0x2850bd(0x191)),await _0x52211e[_0x2850bd(0x19c)](skillup,{'autoInstall':_0x52211e['dOEOS']}),_0x4b44c6?.['trackPhaseEnd'](_0x52211e[_0x2850bd(0x196)]),console[_0x2850bd(0x1a1)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
|
|
1
|
+
(function(_0x59ab3b,_0x358868){const _0x10d4b1=_0x2fc0,_0x8c736=_0x59ab3b();while(!![]){try{const _0x1e5e06=-parseInt(_0x10d4b1(0x1af))/0x1*(-parseInt(_0x10d4b1(0x18e))/0x2)+parseInt(_0x10d4b1(0x1a9))/0x3+parseInt(_0x10d4b1(0x1b3))/0x4*(parseInt(_0x10d4b1(0x18f))/0x5)+parseInt(_0x10d4b1(0x1bc))/0x6+parseInt(_0x10d4b1(0x1c3))/0x7*(parseInt(_0x10d4b1(0x180))/0x8)+parseInt(_0x10d4b1(0x1ba))/0x9*(parseInt(_0x10d4b1(0x1ae))/0xa)+-parseInt(_0x10d4b1(0x1be))/0xb;if(_0x1e5e06===_0x358868)break;else _0x8c736['push'](_0x8c736['shift']());}catch(_0x5a5337){_0x8c736['push'](_0x8c736['shift']());}}}(_0x3bad,0x83942));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x3bad(){const _0x30f353=['\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','--scope','No\x20API\x20token\x20available\x20for\x20decryption','CI\x20profile\x20\x22','uENaD','trackPhaseEnd','isDirectory','PlsVm','YPaNB','trailhead','IStdp','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','✓\x20Created\x20profile\x20settings:\x20baseUrl=','AnAKf','ranger-testing/trailhead','qpIIM','UjeKh','uQiwC','add','marketplace','ohnoi','2894343pPlDol','filter','Failed\x20to\x20add\x20marketplace:','pXCYx','ranger@trailhead','505370NCMRTt','2xwICDW','IPauT','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','3236060GJCzyv','fXmre','iGJWs','sessions','name','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','log','18itiIrR','PtClB','4012554vNsIXP','Achtm','35285877XoARqH','profile_activate','owOIp','trackPhaseStart','path','326424UxQMVB','KtOvE','✓\x20Claude\x20Code\x20plugin\x20installed','length','DoGqR','baseUrl','hyqSJ','184nQfKeS','auth.json.enc','success','error','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','join','ZuLpl','bMBNS','uBBuz','QybPL','lXyiC','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','plugin','130588dQzphA','5UGcuUV','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','profile','\x22:\x20','skipChromium'];_0x3bad=function(){return _0x30f353;};return _0x3bad();}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';function _0x2fc0(_0xff6933,_0x4ed494){_0xff6933=_0xff6933-0x17d;const _0x3bad6b=_0x3bad();let _0x2fc03a=_0x3bad6b[_0xff6933];return _0x2fc03a;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x161cfb){const _0x1b7b1e=_0x2fc0,_0x3fa7f9={'UjeKh':function(_0x544125,_0x216dff,_0x420e1d){return _0x544125(_0x216dff,_0x420e1d);},'PtClB':function(_0x48bfa8,_0x3d7f96){return _0x48bfa8+_0x3d7f96;},'uBBuz':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','pXCYx':_0x1b7b1e(0x19f)},_0x3e987e=getRangerDir(),_0x1acac4=_0x3fa7f9[_0x1b7b1e(0x1a4)](join,_0x3e987e,'ci');if(_0x161cfb){const _0x30943c=_0x3fa7f9['UjeKh'](join,_0x1acac4,_0x161cfb);return{'name':_0x161cfb,'path':_0x30943c};}if(!existsSync(_0x1acac4))throw new Error(_0x3fa7f9[_0x1b7b1e(0x1bb)](_0x1b7b1e(0x190),_0x3fa7f9[_0x1b7b1e(0x189)]));const _0x4e6226=await readdir(_0x1acac4,{'withFileTypes':!![]}),_0x24f2b9=_0x4e6226[_0x1b7b1e(0x1aa)](_0x273461=>_0x273461[_0x1b7b1e(0x19a)]())['map'](_0x4066d3=>_0x4066d3[_0x1b7b1e(0x1b7)]);if(_0x24f2b9[_0x1b7b1e(0x1c6)]===0x0)throw new Error(_0x3fa7f9[_0x1b7b1e(0x1ac)]+_0x3fa7f9['uBBuz']);if(_0x24f2b9[_0x1b7b1e(0x1c6)]===0x1){const _0xdf55f0=_0x24f2b9[0x0];return console[_0x1b7b1e(0x1b9)]('Auto-detected\x20CI\x20profile:\x20'+_0xdf55f0),{'name':_0xdf55f0,'path':join(_0x1acac4,_0xdf55f0)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x24f2b9[_0x1b7b1e(0x186)](',\x20')+_0x1b7b1e(0x18c));}async function installPluginNonInteractive(){const _0xb06307=_0x2fc0,_0x2ed843={'IStdp':_0xb06307(0x1b2),'YDHUZ':_0xb06307(0x19d),'bSODP':'✓\x20Marketplace\x20already\x20added','KtOvE':function(_0x251219,_0x497b22){return _0x251219(_0x497b22);},'EBHMp':_0xb06307(0x18d),'rBXhQ':_0xb06307(0x1a7),'gvCey':_0xb06307(0x1a6),'hyqSJ':_0xb06307(0x1a2),'PlsVm':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','KqRoS':function(_0x1ff206,_0x1483a1){return _0x1ff206(_0x1483a1);},'uENaD':'Failed\x20to\x20install\x20plugin:','fXmre':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','FZVjZ':_0xb06307(0x1c5)},_0x5a1147=await isPluginInstalled(_0xb06307(0x1ad));if(_0x5a1147)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x2ed843[_0xb06307(0x19e)]);const _0x31a9d6=await isMarketplaceAdded(_0x2ed843['YDHUZ']);let _0x56c86b=_0x31a9d6;if(_0x31a9d6)console[_0xb06307(0x1b9)](_0x2ed843['bSODP']);else{const _0x1dff0e=await _0x2ed843[_0xb06307(0x1c4)](runClaudeCommand,[_0x2ed843['EBHMp'],_0x2ed843['rBXhQ'],_0x2ed843['gvCey'],_0x2ed843[_0xb06307(0x17f)]]);!_0x1dff0e[_0xb06307(0x182)]?(console[_0xb06307(0x183)](_0xb06307(0x1ab),_0x1dff0e['error']),console['log'](_0x2ed843[_0xb06307(0x19b)])):_0x56c86b=!![];}if(_0x56c86b){const _0x1a2b01=await _0x2ed843['KqRoS'](runClaudeCommand,['plugin','install',_0xb06307(0x1ad),_0xb06307(0x195),'project']);!_0x1a2b01['success']?(console[_0xb06307(0x183)](_0x2ed843[_0xb06307(0x198)],_0x1a2b01[_0xb06307(0x183)]),console['log'](_0x2ed843[_0xb06307(0x1b4)])):console[_0xb06307(0x1b9)](_0x2ed843['FZVjZ']);}return!![];}export async function setupCi(_0x2e52af,_0x24fa40,_0x42cddf){const _0x4acda2=_0x2fc0,_0x59fdc2={'lXyiC':'auth','acBDj':function(_0x59d674,_0x10c71b){return _0x59d674(_0x10c71b);},'owOIp':function(_0x55354b){return _0x55354b();},'ZuLpl':function(_0x8a915f,_0x4ebe16,_0x2ac167){return _0x8a915f(_0x4ebe16,_0x2ac167);},'DoGqR':'dir_setup','ohnoi':'chromium','IPauT':_0x4acda2(0x185),'Achtm':'profile_activate','AnAKf':function(_0x23bb83,_0x32cd32){return _0x23bb83(_0x32cd32);},'DfWVv':function(_0x1f089d,_0x5731c2){return _0x1f089d(_0x5731c2);},'bgqhu':'auth.json','bMBNS':_0x4acda2(0x181),'uQiwC':function(_0x3784d9,_0x1a2ac3){return _0x3784d9(_0x1a2ac3);},'QybPL':_0x4acda2(0x196),'fQrZX':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','OaWaF':function(_0x7b3045,_0x4fa5b0){return _0x7b3045 instanceof _0x4fa5b0;},'qpIIM':function(_0x41e2b3,_0x482b79){return _0x41e2b3(_0x482b79);},'YPaNB':'plugin','BXdem':'skills','fAcaL':'project','iGJWs':_0x4acda2(0x194)};console[_0x4acda2(0x1b9)](_0x4acda2(0x1b1)),_0x42cddf?.['trackPhaseStart'](_0x59fdc2['lXyiC']),await _0x59fdc2['acBDj'](authenticate,_0x2e52af),_0x42cddf?.[_0x4acda2(0x199)](_0x59fdc2[_0x4acda2(0x18b)]),_0x42cddf?.[_0x4acda2(0x1c1)]('dir_setup');const {path:_0x1c7d5a,installed:_0x4728a6}=await _0x59fdc2[_0x4acda2(0x1c0)](ensureRangerDir);await writeRangerGitignore(_0x1c7d5a);const _0x4ff365=_0x59fdc2[_0x4acda2(0x187)](join,_0x1c7d5a,_0x4acda2(0x1b6));!existsSync(_0x4ff365)&&await mkdir(_0x4ff365,{'recursive':!![]});_0x42cddf?.[_0x4acda2(0x199)](_0x59fdc2[_0x4acda2(0x17d)],{'installed':_0x4728a6}),_0x42cddf?.[_0x4acda2(0x1c1)](_0x59fdc2[_0x4acda2(0x1a8)]);let _0x6c23e6=![];_0x24fa40?.[_0x4acda2(0x193)]?console[_0x4acda2(0x1b9)](_0x59fdc2[_0x4acda2(0x1b0)]):_0x6c23e6=await ensureChromium();_0x42cddf?.[_0x4acda2(0x199)](_0x59fdc2['ohnoi'],{'installed':_0x6c23e6,'skipped':!!_0x24fa40?.['skipChromium']}),_0x42cddf?.['trackPhaseStart'](_0x59fdc2[_0x4acda2(0x1bd)]);const _0x2abb8e=await _0x59fdc2[_0x4acda2(0x1a1)](findCiProfile,_0x24fa40?.[_0x4acda2(0x191)]);let _0x306df7=![];_0x24fa40?.['baseUrl']&&(await mkdir(_0x2abb8e[_0x4acda2(0x1c2)],{'recursive':!![]}),await saveSettings(_0x2abb8e[_0x4acda2(0x1b7)],{'baseUrl':_0x24fa40['baseUrl'],'headless':!![]}),console[_0x4acda2(0x1b9)](_0x4acda2(0x1a0)+_0x24fa40[_0x4acda2(0x17e)]),_0x306df7=!![]);const _0x237862=join(_0x2abb8e[_0x4acda2(0x1c2)],'settings.json');if(!_0x59fdc2['DfWVv'](existsSync,_0x237862)&&!_0x306df7)throw new Error(_0x4acda2(0x197)+_0x2abb8e[_0x4acda2(0x1b7)]+_0x4acda2(0x1b8));const _0x2f7207=join(_0x2abb8e['path'],_0x59fdc2['bgqhu']),_0x5cce76=join(_0x2abb8e[_0x4acda2(0x1c2)],_0x59fdc2[_0x4acda2(0x188)]),_0x5df79b=_0x59fdc2['uQiwC'](existsSync,_0x2f7207),_0x13df63=_0x59fdc2['AnAKf'](existsSync,_0x5cce76);if(_0x13df63)try{const _0x570a8c=await getToken();if(!_0x570a8c)throw new Error(_0x59fdc2[_0x4acda2(0x18a)]);const _0x18dc6a=await readFile(_0x5cce76);_0x59fdc2['ZuLpl'](decrypt,_0x18dc6a,_0x570a8c),console['log'](_0x59fdc2['fQrZX']);}catch(_0x3305fc){const _0x5af0b5=_0x59fdc2['OaWaF'](_0x3305fc,Error)?_0x3305fc['message']:String(_0x3305fc);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x2abb8e['name']+_0x4acda2(0x192)+_0x5af0b5);}else _0x5df79b?console['log']('✓\x20Auth\x20state\x20found'):console['log'](_0x4acda2(0x184));await _0x59fdc2[_0x4acda2(0x1a3)](writeActiveProfileName,_0x2abb8e[_0x4acda2(0x1b7)]),console[_0x4acda2(0x1b9)]('✓\x20Active\x20profile:\x20'+_0x2abb8e[_0x4acda2(0x1b7)]),_0x42cddf?.['trackPhaseEnd'](_0x4acda2(0x1bf),{'profileName':_0x2abb8e['name'],'hasAuth':_0x5df79b,'hasEncryptedAuth':_0x13df63,'createdSettings':_0x306df7}),_0x42cddf?.['trackPhaseStart'](_0x59fdc2['YPaNB']);const _0x41d783=await installPluginNonInteractive();_0x42cddf?.['trackPhaseEnd'](_0x59fdc2[_0x4acda2(0x19c)],{'installed':_0x41d783}),_0x42cddf?.['trackPhaseStart'](_0x59fdc2['BXdem']),await _0x59fdc2[_0x4acda2(0x1a5)](skillup,{'autoInstall':_0x59fdc2['fAcaL']}),_0x42cddf?.['trackPhaseEnd']('skills'),console[_0x4acda2(0x1b9)](_0x59fdc2[_0x4acda2(0x1b5)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27d1b2,_0x3fd913){const _0x418ca8=_0x4aab,_0x39bbbe=_0x27d1b2();while(!![]){try{const _0x3df5f1=-parseInt(_0x418ca8(0x158))/0x1*(parseInt(_0x418ca8(0x156))/0x2)+-parseInt(_0x418ca8(0x159))/0x3*(-parseInt(_0x418ca8(0x151))/0x4)+-parseInt(_0x418ca8(0x13f))/0x5+parseInt(_0x418ca8(0x14d))/0x6*(parseInt(_0x418ca8(0x14b))/0x7)+parseInt(_0x418ca8(0x163))/0x8+-parseInt(_0x418ca8(0x157))/0x9+-parseInt(_0x418ca8(0x14f))/0xa;if(_0x3df5f1===_0x3fd913)break;else _0x39bbbe['push'](_0x39bbbe['shift']());}catch(_0x53f62e){_0x39bbbe['push'](_0x39bbbe['shift']());}}}(_0x4a9e,0x8d9f1));import{basename}from'path';import _0x1f9965 from'inquirer';function _0x4aab(_0x4f4686,_0x245d11){_0x4f4686=_0x4f4686-0x13e;const _0x4a9ee6=_0x4a9e();let _0x4aab95=_0x4a9ee6[_0x4f4686];return _0x4aab95;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x4a9e(){const _0x5d57dc=['\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!','list','130582xbiyjk','1367136lYZyKC','17QqWXCj','2840793IVDLVo','rxibj','installLevel','/.opencode/skills/','\x20skill','stdout','eBFQK','QAKCO','HFerG','ranger','8409800FEUpZV','user-level','2261870HpmeQk','\x20\x202.\x20Run:\x20ranger\x20setup','fFWng','/skills/','log','OOpMb','warn','BDezN','This\x20project\x20only\x20(','prompt','opencode','jCiHm','7OuAKkJ','neZLd','2503806Eqirqz','/.claude/skills/','1211510qBWOSp','\x20<your-api-token>','4tfzhKr','platform','To\x20use:'];_0x4a9e=function(){return _0x5d57dc;};return _0x4a9e();}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x567a94={}){const _0x2c3776=_0x4aab,_0x39cca7={'BDezN':'claude','nJAIv':function(_0x9e1397){return _0x9e1397();},'jCiHm':'\x20--opencode','rxibj':'opencode','HFerG':function(_0x2a349c,_0x3dd212){return _0x2a349c(_0x3dd212);},'ecjmw':function(_0x43a92d,_0x1ebd9a){return _0x43a92d===_0x1ebd9a;},'fFWng':'project','eBFQK':'\x0a📦\x20Installing\x20skills...\x0a','fgcaV':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','eweIO':function(_0x498b5e,_0x51b32a){return _0x498b5e>_0x51b32a;},'QAKCO':function(_0x19c148,_0x4fbacc){return _0x19c148===_0x4fbacc;},'OOpMb':_0x2c3776(0x13e),'fTBzJ':_0x2c3776(0x153),'neZLd':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x173461=_0x567a94[_0x2c3776(0x152)]??_0x39cca7[_0x2c3776(0x146)],_0x35e3b7=await _0x39cca7['nJAIv'](getToken);if(!_0x35e3b7){console[_0x2c3776(0x143)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x2c3776(0x143)]('To\x20get\x20started:'),console[_0x2c3776(0x143)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log'](_0x2c3776(0x140)+(_0x173461==='opencode'?_0x39cca7[_0x2c3776(0x14a)]:'')+_0x2c3776(0x150)),console[_0x2c3776(0x143)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x173461===_0x39cca7['rxibj']?_0x39cca7[_0x2c3776(0x14a)]:'')+'\x0a');return;}console[_0x2c3776(0x143)]('✓\x20Found\x20API\x20token');const _0x59fd34=getProjectRoot(),_0x546e6b=_0x39cca7[_0x2c3776(0x161)](basename,_0x59fd34),_0x301bcd=_0x39cca7['ecjmw'](_0x173461,_0x39cca7['rxibj'])?_0x39cca7[_0x2c3776(0x161)](getOpencodeConfigDir,'user')+_0x2c3776(0x142):_0x39cca7['nJAIv'](getClaudeConfigDir)+'/skills/',_0x41fe22=_0x39cca7['ecjmw'](_0x173461,_0x2c3776(0x149))?_0x59fd34+_0x2c3776(0x15c):_0x59fd34+_0x2c3776(0x14e),_0x2cdda0=process['stdin']['isTTY']&&process[_0x2c3776(0x15e)]['isTTY'];let _0x1a9e0f;if(_0x567a94['autoInstall'])_0x1a9e0f=_0x567a94['autoInstall'];else{if(_0x2cdda0){const _0x861720=await _0x1f9965[_0x2c3776(0x148)]([{'type':_0x2c3776(0x155),'name':'installLevel','message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x301bcd+')','value':'user'},{'name':_0x2c3776(0x147)+_0x41fe22+')','value':_0x39cca7[_0x2c3776(0x141)]}]}]);_0x1a9e0f=_0x861720[_0x2c3776(0x15b)];}else _0x1a9e0f=_0x39cca7[_0x2c3776(0x141)],console[_0x2c3776(0x143)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x41fe22+')');}let _0x44f9c0=0x0;const _0x564016=getCurrentVersion();console[_0x2c3776(0x143)](_0x39cca7[_0x2c3776(0x15f)]);try{const _0x346ada=await installSkill(_0x2c3776(0x162),{'cliVersion':_0x564016,'level':_0x1a9e0f,'platform':_0x173461});_0x346ada&&_0x44f9c0++;}catch(_0x5cc924){console[_0x2c3776(0x145)](_0x39cca7['fgcaV'],_0x5cc924 instanceof Error?_0x5cc924['message']:_0x5cc924);}if(_0x39cca7['eweIO'](_0x44f9c0,0x0)){const _0x5a099b=_0x39cca7['QAKCO'](_0x1a9e0f,'user')?_0x39cca7[_0x2c3776(0x144)]:'project-level';console['log']('\x0a✅\x20Installed\x20'+_0x44f9c0+'\x20'+_0x5a099b+_0x2c3776(0x15d)+(_0x44f9c0>0x1?'s':'')+'\x20successfully!\x0a'),!_0x567a94['suppressUsage']&&(console[_0x2c3776(0x143)](_0x39cca7['fTBzJ']),_0x39cca7[_0x2c3776(0x160)](_0x173461,_0x39cca7[_0x2c3776(0x15a)])?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console['log'](_0x2c3776(0x154)));}else console['log'](_0x39cca7[_0x2c3776(0x14c)]);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x23facb,_0x214378){const _0x270521=_0x4a83,_0xe518bc=_0x23facb();while(!![]){try{const _0x46e86b=-parseInt(_0x270521(0x161))/0x1*(-parseInt(_0x270521(0x148))/0x2)+parseInt(_0x270521(0x186))/0x3*(-parseInt(_0x270521(0x185))/0x4)+parseInt(_0x270521(0x149))/0x5+-parseInt(_0x270521(0x137))/0x6+parseInt(_0x270521(0x162))/0x7+-parseInt(_0x270521(0x176))/0x8*(parseInt(_0x270521(0x187))/0x9)+parseInt(_0x270521(0x155))/0xa*(parseInt(_0x270521(0x156))/0xb);if(_0x46e86b===_0x214378)break;else _0xe518bc['push'](_0xe518bc['shift']());}catch(_0x3cb42c){_0xe518bc['push'](_0xe518bc['shift']());}}}(_0x2e14,0xa7b96));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2e14(){const _0x445781=['zBDIj','message','url','5556942oJZqLz','\x20install\x20chromium','MBEsK','scope','git_check','/ranger:enable','\x20\x20npx\x20playwright\x20install\x20chromium','HmVUJ','EFLxQ','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','Installation\x20failed\x20with\x20exit\x20code\x20','UdbEb','user','trackPhaseStart','✓\x20Authenticated\x20to\x20','rgJED','plugin','207222lYeAhx','3028800StQPHL','npx','ULYfa','opencode','fWRgW','pqTRa','inherit','isTTY','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','InMFu','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','✓\x20Playwright\x20Chromium\x20browser\x20found','178270qhxczz','66eckAHA','GITHUB_ENV','confirm','log','win32','PMuLa','Bexiq','device_auth','BRFGU','HILgr','\x0a⚠\x20Skipping\x20Chromium\x20installation.','7EgEQiz','5854870Qbptkq','IzQjy','vtnfR','stdout','yRimP','✓\x20Stored\x20credentials\x20locally','LhNBH','.gitignore','skipChromium','local','JRFkl','DBVLb','XnnAC','dZqkW','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','skills','install','tWWhK','bRgev','\x0a🚀\x20Ranger\x20Setup\x0a','1616HnyiaU','prompt','YphFp','SDsvz','No\x20git\x20repository\x20found','\x20\x20npx\x20playwright@','EsztW','ranger\x20profile\x20add\x20local','Authentication\x20failed:\x20','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','chromium','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','✓\x20Created\x20.ranger/\x20directory','wantsProfile','existing_token','112972sqRSXK','24xnXmJp','19395cKaxwk','.ranger','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','error','...','The\x20required\x20version\x20(','XNJQh','profile','thcgE','auth','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','ready','success','VzRyu','organizationName','warn','\x0aIn\x20Claude\x20Code,\x20run\x20','tDyXD','llLPU','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','trackPhaseEnd','✓\x20Already\x20authenticated\x20to\x20'];_0x2e14=function(){return _0x445781;};return _0x2e14();}import{createRequire}from'module';import{spawn}from'child_process';import _0x487077 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=_0x52f9db=>'\x1b[1m'+_0x52f9db+'\x1b[0m';function getPlaywrightVersion(){const _0x36cd73={'OcrDd':'playwright/package.json'};try{const _0x2bab2d=require['resolve'](_0x36cd73['OcrDd']),_0x2c8e74=require(_0x2bab2d);return _0x2c8e74['version'];}catch{return null;}}function installChromiumBinary(_0x2bcaea){const _0x3ce55f=_0x4a83,_0x19a90b={'EsztW':function(_0x56f5eb,_0x2f6eb8){return _0x56f5eb(_0x2f6eb8);},'MvbZh':_0x3ce55f(0x172),'niJOm':'playwright','zBDIj':'chromium','ACASe':function(_0x4bd724,_0x48b0a0,_0x4f73a2,_0x42e752){return _0x4bd724(_0x48b0a0,_0x4f73a2,_0x42e752);},'MBEsK':_0x3ce55f(0x14a),'bIhwK':_0x3ce55f(0x15a),'JRFkl':'close','HmVUJ':'error'};return new Promise((_0x166053,_0x245bc0)=>{const _0x1ce8ad=_0x3ce55f,_0x52f44d=_0x2bcaea?['playwright@'+_0x2bcaea,_0x19a90b['MvbZh'],_0x1ce8ad(0x180)]:[_0x19a90b['niJOm'],_0x1ce8ad(0x172),_0x19a90b[_0x1ce8ad(0x19d)]],_0x4af290=_0x19a90b['ACASe'](spawn,_0x19a90b[_0x1ce8ad(0x139)],_0x52f44d,{'stdio':_0x1ce8ad(0x14f),'shell':process['platform']===_0x19a90b['bIhwK']});_0x4af290['on'](_0x19a90b[_0x1ce8ad(0x16c)],_0x4f0e5f=>{const _0x126128=_0x1ce8ad;_0x4f0e5f===0x0?_0x166053():_0x19a90b[_0x126128(0x17c)](_0x245bc0,new Error(_0x126128(0x141)+_0x4f0e5f));}),_0x4af290['on'](_0x19a90b[_0x1ce8ad(0x13e)],_0x17f71a=>{_0x245bc0(_0x17f71a);});});}export async function authenticate(_0xa3e8c6){const _0x5d72b2=_0x4a83,_0x5bb33c={'yRimP':function(_0x333774){return _0x333774();},'dZqkW':function(_0x75a633,_0x5bc536){return _0x75a633 instanceof _0x5bc536;},'VzRyu':function(_0x16cca9,_0x532334){return _0x16cca9(_0x532334);},'DBVLb':'✓\x20Exported\x20credentials\x20for\x20CI','SDsvz':_0x5d72b2(0x167)};if(!_0xa3e8c6){const _0x300025=await _0x5bb33c[_0x5d72b2(0x166)](getToken);if(_0x300025){const _0x459fdb=await getCurrentUser(_0x300025);if(_0x459fdb['success'])return console['log'](_0x5d72b2(0x19c)+_0x459fdb['user'][_0x5d72b2(0x195)]),{'token':_0x300025,'method':_0x5d72b2(0x184)};}try{_0xa3e8c6=await runDeviceAuthFlow();}catch(_0x5254f0){throw new Error('Authentication\x20failed:\x20'+(_0x5bb33c[_0x5d72b2(0x16f)](_0x5254f0,Error)?_0x5254f0[_0x5d72b2(0x135)]:_0x5254f0));}const _0x2415b3=await getCurrentUser(_0xa3e8c6);if(!_0x2415b3[_0x5d72b2(0x193)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x2415b3[_0x5d72b2(0x18a)]);return console['log'](_0x5d72b2(0x145)+_0x2415b3['user']['organizationName']),{'token':_0xa3e8c6,'method':_0x5d72b2(0x15d)};}console['log']('Validating\x20API\x20token...');const _0x3f40b8=await getCurrentUser(_0xa3e8c6);if(!_0x3f40b8['success']){if(_0x3f40b8['status'])throw new Error(_0x5d72b2(0x17e)+_0x3f40b8['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x5d72b2(0x191)+_0x3f40b8[_0x5d72b2(0x18a)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x5d72b2(0x159)](_0x5d72b2(0x145)+_0x3f40b8[_0x5d72b2(0x143)][_0x5d72b2(0x195)]),await _0x5bb33c[_0x5d72b2(0x194)](storeToken,_0xa3e8c6),console['log'](process['env'][_0x5d72b2(0x157)]?_0x5bb33c[_0x5d72b2(0x16d)]:_0x5bb33c[_0x5d72b2(0x179)]),{'token':_0xa3e8c6,'method':'provided_token'};}export async function ensureRangerDir(){const _0x5c899e=_0x4a83,_0xe5ae2e={'YphFp':function(_0x216baa){return _0x216baa();},'tWWhK':function(_0xaaa207,_0x183b65,_0xb9b789){return _0xaaa207(_0x183b65,_0xb9b789);},'gZPnY':_0x5c899e(0x188),'oeCYx':_0x5c899e(0x182)},_0x2e0346=_0xe5ae2e['YphFp'](findGitRoot),_0x1c7d97=_0x2e0346?_0xe5ae2e[_0x5c899e(0x173)](join,_0x2e0346,_0xe5ae2e['gZPnY']):_0xe5ae2e[_0x5c899e(0x178)](getRangerDir);return!existsSync(_0x1c7d97)?(await mkdir(_0x1c7d97,{'recursive':!![]}),console[_0x5c899e(0x159)](_0xe5ae2e['oeCYx']),{'path':_0x1c7d97,'installed':!![]}):(console[_0x5c899e(0x159)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1c7d97,'installed':![]});}export async function ensureChromium(){const _0x3cbee4=_0x4a83,_0x453384={'zliNC':_0x3cbee4(0x154),'UdbEb':function(_0x319fa9){return _0x319fa9();},'HILgr':_0x3cbee4(0x158),'IzQjy':_0x3cbee4(0x172),'nZwks':'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','SGRCy':function(_0x5e56c6,_0x493d92){return _0x5e56c6 instanceof _0x493d92;},'hzHHy':_0x3cbee4(0x160),'aUOzr':'\x20\x20npx\x20playwright\x20install\x20chromium'};let _0xd52b65=![];try{const _0x206ca6=chromium['executablePath']();_0xd52b65=existsSync(_0x206ca6);}catch{_0xd52b65=![];}if(_0xd52b65)return console[_0x3cbee4(0x159)](_0x453384['zliNC']),![];const _0x48aab5=_0x453384[_0x3cbee4(0x142)](getPlaywrightVersion),_0x498f56=process['stdin']['isTTY']&&process[_0x3cbee4(0x165)]['isTTY'];let _0x1236ee=!![];if(_0x498f56){const {install:_0xf3dcd0}=await _0x487077[_0x3cbee4(0x177)]([{'type':_0x453384[_0x3cbee4(0x15f)],'name':_0x453384[_0x3cbee4(0x163)],'message':_0x48aab5?_0x3cbee4(0x18c)+_0x48aab5+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x453384['nZwks'],'default':!![]}]);_0x1236ee=_0xf3dcd0;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x48aab5?'\x20'+_0x48aab5:'')+_0x3cbee4(0x18b));if(_0x1236ee){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x48aab5),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x6ad0af){console[_0x3cbee4(0x18a)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x453384['SGRCy'](_0x6ad0af,Error)?_0x6ad0af[_0x3cbee4(0x135)]:_0x6ad0af),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x48aab5?console[_0x3cbee4(0x159)]('\x20\x20npx\x20playwright@'+_0x48aab5+_0x3cbee4(0x138)):console[_0x3cbee4(0x159)](_0x3cbee4(0x13d));}}else console[_0x3cbee4(0x159)](_0x453384['hzHHy']),console[_0x3cbee4(0x159)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),_0x48aab5?console[_0x3cbee4(0x159)](_0x3cbee4(0x17b)+_0x48aab5+'\x20install\x20chromium'):console['log'](_0x453384['aUOzr']);return!![];}function _0x4a83(_0x2b7fbd,_0x849587){_0x2b7fbd=_0x2b7fbd-0x135;const _0x2e14b8=_0x2e14();let _0x4a8395=_0x2e14b8[_0x2b7fbd];return _0x4a8395;}export async function writeRangerGitignore(_0x353b7e){const _0x2030e7=_0x4a83,_0x315ab5={'BRFGU':'✓\x20Created\x20.ranger/.gitignore'},_0x308d84=join(_0x353b7e,_0x2030e7(0x169)),_0x369598='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x308d84,_0x369598),console['log'](_0x315ab5[_0x2030e7(0x15e)]);}function printProfileSetupLaterInstructions(){const _0x1789b4=_0x4a83,_0x4ac4a1={'PMuLa':'ranger\x20profile\x20add\x20local','NRdJd':_0x1789b4(0x140)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x1789b4(0x159)]('\x20\x20'+bold(_0x4ac4a1[_0x1789b4(0x15b)])),console[_0x1789b4(0x159)](_0x4ac4a1['NRdJd']);}async function ensureLocalEnv(_0x1b8b20,_0x3938d1){const _0x250f83=_0x4a83,_0x37281d={'qPAkH':function(_0x16d8ff){return _0x16d8ff();},'NrmJe':function(_0x932d02,_0x1aeaa7,_0x2b084a){return _0x932d02(_0x1aeaa7,_0x2b084a);},'bRgev':_0x250f83(0x181),'FYwmG':_0x250f83(0x158),'vtnfR':_0x250f83(0x183),'tDyXD':function(_0x48519c,_0x350499,_0xcb55b2,_0x255505){return _0x48519c(_0x350499,_0xcb55b2,_0x255505);},'pnALX':function(_0x2e88da,_0xf3a0b0){return _0x2e88da instanceof _0xf3a0b0;},'XnnAC':function(_0x42cde1){return _0x42cde1();}};if(!_0x37281d['qPAkH'](findGitRoot))return console[_0x250f83(0x159)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x37281d['NrmJe'](findExistingEnv,'local',{'locations':[_0x250f83(0x16b)]}))return console[_0x250f83(0x159)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x19894d=process['stdin']['isTTY']&&process['stdout'][_0x250f83(0x150)];if(_0x19894d&&!_0x1b8b20?.['url']){console['log'](_0x37281d[_0x250f83(0x174)]),console['log']('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console[_0x250f83(0x159)]('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x250f83(0x159)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x250f83(0x159)](_0x250f83(0x19a));const {wantsProfile:_0x3ec2da}=await _0x487077[_0x250f83(0x177)]([{'type':_0x37281d['FYwmG'],'name':_0x37281d[_0x250f83(0x164)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x3ec2da)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x37281d[_0x250f83(0x198)](addEnv,_0x250f83(0x16b),{'url':_0x1b8b20?.[_0x250f83(0x136)],'force':_0x1b8b20?.['force'],'allowInsecureLocalhost':_0x1b8b20?.['allowInsecureLocalhost']},_0x3938d1),{'ready':!![],'skipped':![]};}catch(_0xac54d7){return console[_0x250f83(0x18a)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x37281d['pnALX'](_0xac54d7,Error)?_0xac54d7['message']:_0xac54d7),_0x37281d[_0x250f83(0x16e)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x4a8f8b,_0x38ae00,_0x1f7ce8){const _0x2828de=_0x4a83,_0x24d0e8={'EFLxQ':function(_0x31fc88){return _0x31fc88();},'XNJQh':function(_0x313e84){return _0x313e84();},'llLPU':_0x2828de(0x190),'fHDtj':'chromium','LhNBH':'plugin','thcgE':function(_0x57ea1e,_0x4f2d3b){return _0x57ea1e(_0x4f2d3b);},'CWlTN':function(_0x528bc9,_0x1f9a21){return _0x528bc9&&_0x1f9a21;},'AJIyT':_0x2828de(0x14c),'sjAVt':_0x2828de(0x171),'rgJED':'profile','XZVQW':_0x2828de(0x170),'fWRgW':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','Bexiq':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','ULYfa':_0x2828de(0x17f),'InMFu':function(_0x568449,_0x3d2d79){return _0x568449(_0x3d2d79);},'pqTRa':function(_0x3c67b0,_0x55909e){return _0x3c67b0+_0x55909e;},'VpQbd':function(_0x55c90b,_0x20eb77){return _0x55c90b+_0x20eb77;}};console['log'](_0x2828de(0x175));const _0x48f95f=process['stdin']['isTTY']&&process[_0x2828de(0x165)][_0x2828de(0x150)];!_0x48f95f&&!_0x38ae00?.[_0x2828de(0x13a)]&&(console['log'](_0x2828de(0x153)),_0x38ae00={..._0x38ae00,'scope':_0x2828de(0x143)});_0x1f7ce8?.[_0x2828de(0x144)]('git_check');if(!_0x24d0e8[_0x2828de(0x13f)](findGitRoot)){await _0x1f7ce8?.['trackPhaseError'](_0x2828de(0x13b),new Error(_0x2828de(0x17a)));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x1f7ce8?.[_0x2828de(0x19b)]('git_check');const _0x3cf883=!existsSync(_0x24d0e8[_0x2828de(0x18d)](getRangerDir)),{path:_0xa67a9}=await ensureRangerDir();_0x1f7ce8?.[_0x2828de(0x144)](_0x24d0e8[_0x2828de(0x199)]);const _0x578351=await authenticate(_0x4a8f8b);_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8[_0x2828de(0x199)],{'isFirstRun':_0x3cf883,'method':_0x578351['method']}),_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x180));_0x38ae00?.['skipChromium']?console['log'](_0x2828de(0x189)):await ensureChromium();_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8['fHDtj'],{'isFirstRun':_0x3cf883,'skipped':!!_0x38ae00?.[_0x2828de(0x16a)]}),await writeRangerGitignore(_0xa67a9),console[_0x2828de(0x159)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x44ce8a=_0x38ae00?.['scope'],_0x3d9da6=_0x38ae00?.['opencode']??![];let _0x5760c1=null;_0x3d9da6?(_0x1f7ce8?.[_0x2828de(0x144)](_0x24d0e8[_0x2828de(0x168)]),_0x5760c1=await ensureOpencodePluginConfig(_0x44ce8a),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8[_0x2828de(0x168)],{'isFirstRun':_0x3cf883,'opencode':!![]})):(_0x1f7ce8?.['trackPhaseStart'](_0x2828de(0x147)),await _0x24d0e8[_0x2828de(0x18f)](ensureClaudePlugin,_0x44ce8a),_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8['LhNBH'],{'isFirstRun':_0x3cf883}));if(_0x24d0e8['CWlTN'](_0x3d9da6,_0x5760c1)){_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x171));try{await installSkill('ranger',{'level':_0x5760c1['scope'],'cliVersion':getCurrentVersion(),'platform':_0x24d0e8['AJIyT']}),_0x1f7ce8?.[_0x2828de(0x19b)](_0x2828de(0x171),{'isFirstRun':_0x3cf883,'opencode':!![]});}catch(_0x1f5025){console[_0x2828de(0x196)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x1f5025 instanceof Error?_0x1f5025['message']:_0x1f5025),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8['sjAVt'],{'isFirstRun':_0x3cf883,'opencode':!![],'failed':!![]});}}else _0x1f7ce8?.[_0x2828de(0x144)]('skills'),await ensureClaudeSkills(_0x44ce8a),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8['sjAVt'],{'isFirstRun':_0x3cf883});if(!_0x48f95f&&!_0x38ae00?.[_0x2828de(0x136)])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console['log']('\x20\x20'+bold(_0x2828de(0x17d))+'\x0a');else{_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x18e));const _0x453cb7=await ensureLocalEnv({'url':_0x38ae00?.['url'],'force':_0x38ae00?.['force'],'allowInsecureLocalhost':_0x38ae00?.['allowInsecureLocalhost']},_0x1f7ce8);_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8[_0x2828de(0x146)],{'isFirstRun':_0x3cf883,'profileReady':_0x453cb7[_0x2828de(0x192)],'userSkipped':_0x453cb7['skipped']}),_0x453cb7['ready']&&console['log'](_0x2828de(0x151));}if(_0x3d9da6)console['log'](_0x24d0e8['XZVQW']),console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x14d)]),console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x15c)]),console['log'](_0x24d0e8[_0x2828de(0x14b)]);else{const _0xcbad3=_0x24d0e8[_0x2828de(0x152)](bold,_0x2828de(0x13c));console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x14e)](_0x24d0e8['VpQbd'](_0x2828de(0x197)+_0xcbad3+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
|
|
1
|
+
const _0x2c110f=_0x52cf;(function(_0x4c3f9e,_0x16cdf1){const _0x4b4532=_0x52cf,_0x1c3d9a=_0x4c3f9e();while(!![]){try{const _0x4f750a=parseInt(_0x4b4532(0x122))/0x1+parseInt(_0x4b4532(0x150))/0x2*(parseInt(_0x4b4532(0x128))/0x3)+-parseInt(_0x4b4532(0x123))/0x4*(parseInt(_0x4b4532(0xf5))/0x5)+-parseInt(_0x4b4532(0xe8))/0x6*(-parseInt(_0x4b4532(0x139))/0x7)+parseInt(_0x4b4532(0x105))/0x8+-parseInt(_0x4b4532(0x11b))/0x9+parseInt(_0x4b4532(0x153))/0xa;if(_0x4f750a===_0x16cdf1)break;else _0x1c3d9a['push'](_0x1c3d9a['shift']());}catch(_0x45516f){_0x1c3d9a['push'](_0x1c3d9a['shift']());}}}(_0x34e2,0xeaa6a));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2244d8 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';function _0x52cf(_0x462661,_0x4aa2f4){_0x462661=_0x462661-0xe2;const _0x34e2f3=_0x34e2();let _0x52cf9b=_0x34e2f3[_0x462661];return _0x52cf9b;}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';function _0x34e2(){const _0x1d02d9=['bQWCj','zurIl','mwXpQ','✓\x20Created\x20.ranger/\x20directory','63695WmEeOD','log','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','.ranger','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','.gitignore','VIgXA','✓\x20Authenticated\x20to\x20','tqNIr','iYVAz','ranger\x20profile\x20add\x20local','skills','profile','aZHJj','gGLtp','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','10687952eIrKhL','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','prompt','✓\x20Exported\x20credentials\x20for\x20CI','Vbqyx','zhjes','organizationName','GygTu','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','fDiKC','wxzSb','stdin','error','resolve','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','Installation\x20failed\x20with\x20exit\x20code\x20','device_auth','close','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','atWSS','skipped','ranger','10574415WVGnIi','RhEHk','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','playwright/package.json','playwright@','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','462012raiweV','404fROaLC','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','CjKSa','method','tpVIn','3LMrUpw','ffOdS','dEgDD','chromium','git_check','\x20\x20npx\x20playwright@','No\x20git\x20repository\x20found','use\x20until\x20the\x20session\x20expires.\x0a','provided_token','local','✓\x20Already\x20authenticated\x20to\x20','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','✓\x20Playwright\x20Chromium\x20browser\x20found','hdmBZ','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x1b[1m','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','224eZZZgW','oGtVx','trackPhaseEnd','success','\x0a⚠\x20Skipping\x20Chromium\x20installation.','force','jVpVu','plugin','rHnWi','✓\x20.ranger/\x20directory\x20already\x20exists','user','FNNez','npx','YzLjZ','stdout','...','OACrW','LEjif','ready','/ranger:enable','IoGJo','wantsProfile','The\x20required\x20version\x20(','1159426sKqCyc','KRUCV','auth','8144570JHJmvD','opencode','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','allowInsecureLocalhost','wKHcO','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','\x20install\x20chromium','evDHB','\x20and\x20prompt\x20the\x20coding','✓\x20Created\x20.ranger/.gitignore','GITHUB_ENV','trackPhaseStart','KzmXZ','XvMWD','xPFUJ','version','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','43224CyUYvB','eyhtK','message','url','isTTY','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','confirm','\x20now?','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'];_0x34e2=function(){return _0x1d02d9;};return _0x34e2();}import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x719f66=>_0x2c110f(0x137)+_0x719f66+'\x1b[0m';function getPlaywrightVersion(){const _0x1e6504=_0x2c110f,_0x693a7a={'MlBtp':_0x1e6504(0x11e),'Vbqyx':function(_0x51d801,_0x5ddf5c){return _0x51d801(_0x5ddf5c);}};try{const _0x5bb253=require[_0x1e6504(0x112)](_0x693a7a['MlBtp']),_0x340855=_0x693a7a[_0x1e6504(0x109)](require,_0x5bb253);return _0x340855[_0x1e6504(0xe5)];}catch{return null;}}function installChromiumBinary(_0x3baccc){const _0x242638=_0x2c110f,_0x30d902={'atWSS':function(_0x19367f,_0x53f34e){return _0x19367f===_0x53f34e;},'oGtVx':function(_0x57c718,_0x2f8a61){return _0x57c718(_0x2f8a61);},'iYVAz':'install','KzmXZ':_0x242638(0x12b),'BAYiu':_0x242638(0x145),'hwJbt':'inherit','eyhtK':'win32','GygTu':'error'};return new Promise((_0xdd6b0a,_0x5d165f)=>{const _0x53d927=_0x242638,_0x1e2fc3=[_0x53d927(0x11f)+_0x3baccc,_0x30d902[_0x53d927(0xfe)],_0x30d902[_0x53d927(0xe2)]],_0x16d8d7=spawn(_0x30d902['BAYiu'],_0x1e2fc3,{'stdio':_0x30d902['hwJbt'],'shell':process['platform']===_0x30d902[_0x53d927(0xe9)]});_0x16d8d7['on'](_0x53d927(0x116),_0x75924a=>{const _0x146472=_0x53d927;_0x30d902[_0x146472(0x118)](_0x75924a,0x0)?_0xdd6b0a():_0x30d902[_0x146472(0x13a)](_0x5d165f,new Error(_0x146472(0x114)+_0x75924a));}),_0x16d8d7['on'](_0x30d902[_0x53d927(0x10c)],_0x483344=>{_0x5d165f(_0x483344);});});}export async function authenticate(_0x44a44e){const _0x1ebafb=_0x2c110f,_0x4ad15e={'tpVIn':function(_0x3ad81f){return _0x3ad81f();},'LEjif':function(_0x3e7f7b,_0x4a2528){return _0x3e7f7b(_0x4a2528);},'hdmBZ':function(_0x361f81){return _0x361f81();},'wKHcO':function(_0x24e268,_0x430703){return _0x24e268 instanceof _0x430703;},'zhjes':function(_0x118088,_0x38fbf2){return _0x118088(_0x38fbf2);},'tqNIr':function(_0x592922,_0x5309be){return _0x592922(_0x5309be);},'wxzSb':_0x1ebafb(0x108),'ffOdS':_0x1ebafb(0x130)};if(!_0x44a44e){const _0x1af419=await _0x4ad15e[_0x1ebafb(0x127)](getToken);if(_0x1af419){const _0x32e09c=await _0x4ad15e[_0x1ebafb(0x14a)](getCurrentUser,_0x1af419);if(_0x32e09c['success'])return console[_0x1ebafb(0xf6)](_0x1ebafb(0x132)+_0x32e09c[_0x1ebafb(0x143)][_0x1ebafb(0x10b)]),{'token':_0x1af419,'method':'existing_token'};}try{_0x44a44e=await _0x4ad15e[_0x1ebafb(0x135)](runDeviceAuthFlow);}catch(_0x1e3ce3){throw new Error('Authentication\x20failed:\x20'+(_0x4ad15e[_0x1ebafb(0x157)](_0x1e3ce3,Error)?_0x1e3ce3[_0x1ebafb(0xea)]:_0x1e3ce3));}const _0x487936=await _0x4ad15e[_0x1ebafb(0x10a)](getCurrentUser,_0x44a44e);if(!_0x487936[_0x1ebafb(0x13c)])throw new Error(_0x1ebafb(0xe6)+_0x487936['error']);return console[_0x1ebafb(0xf6)]('✓\x20Authenticated\x20to\x20'+_0x487936['user'][_0x1ebafb(0x10b)]),{'token':_0x44a44e,'method':_0x1ebafb(0x115)};}console[_0x1ebafb(0xf6)]('Validating\x20API\x20token...');const _0x5974d7=await _0x4ad15e[_0x1ebafb(0xfd)](getCurrentUser,_0x44a44e);if(!_0x5974d7[_0x1ebafb(0x13c)]){if(_0x5974d7['status'])throw new Error('Authentication\x20failed:\x20'+_0x5974d7[_0x1ebafb(0x111)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x1ebafb(0xf0)+_0x5974d7['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x1ebafb(0xf6)](_0x1ebafb(0xfc)+_0x5974d7['user'][_0x1ebafb(0x10b)]),await storeToken(_0x44a44e),console[_0x1ebafb(0xf6)](process['env'][_0x1ebafb(0x15d)]?_0x4ad15e[_0x1ebafb(0x10f)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x44a44e,'method':_0x4ad15e[_0x1ebafb(0x129)]};}export async function ensureRangerDir(){const _0x1b186a=_0x2c110f,_0x241b94={'OrerF':function(_0x35f189){return _0x35f189();},'zAzEz':function(_0x20a87b){return _0x20a87b();},'iAwiC':function(_0x17709e,_0x303156){return _0x17709e(_0x303156);},'bJTnY':function(_0x77305f,_0x36d392,_0x5417ef){return _0x77305f(_0x36d392,_0x5417ef);},'xPFUJ':_0x1b186a(0xf4),'fDiKC':_0x1b186a(0x142)},_0x25ad8d=_0x241b94['OrerF'](findGitRoot),_0x5cf9c7=_0x25ad8d?join(_0x25ad8d,_0x1b186a(0xf8)):_0x241b94['zAzEz'](getRangerDir);return!_0x241b94['iAwiC'](existsSync,_0x5cf9c7)?(await _0x241b94['bJTnY'](mkdir,_0x5cf9c7,{'recursive':!![]}),console[_0x1b186a(0xf6)](_0x241b94[_0x1b186a(0xe4)]),{'path':_0x5cf9c7,'installed':!![]}):(console[_0x1b186a(0xf6)](_0x241b94[_0x1b186a(0x10e)]),{'path':_0x5cf9c7,'installed':![]});}export async function ensureChromium(){const _0x450444=_0x2c110f,_0x5264e1={'jSwHa':function(_0x281c3f,_0x50c6ef){return _0x281c3f(_0x50c6ef);},'JlKaH':_0x450444(0x134),'PzZNm':function(_0x3760cd,_0x35210d){return _0x3760cd??_0x35210d;},'CkMOo':'confirm','VIgXA':'install','SxqVv':'\x20(fallback\x20version)','JOaKl':'\x0aInstalling\x20Chromium\x20browser...\x0a','RhEHk':function(_0x280d1f,_0x23654e){return _0x280d1f instanceof _0x23654e;},'rHnWi':_0x450444(0x117)};let _0xb15208=![];try{const _0x3660cf=chromium['executablePath']();_0xb15208=_0x5264e1['jSwHa'](existsSync,_0x3660cf);}catch{_0xb15208=![];}if(_0xb15208)return console['log'](_0x5264e1['JlKaH']),![];const _0x123186=getPlaywrightVersion(),_0x490b2f=_0x5264e1['PzZNm'](_0x123186,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x439f29=!_0x123186,_0x293228=process[_0x450444(0x110)]['isTTY']&&process['stdout'][_0x450444(0xec)];let _0x50a5b9=!![];if(_0x293228){const {install:_0x2c7cf4}=await _0x2244d8['prompt']([{'type':_0x5264e1['CkMOo'],'name':_0x5264e1[_0x450444(0xfb)],'message':_0x439f29?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x490b2f+_0x450444(0xef):_0x450444(0x14f)+_0x490b2f+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x50a5b9=_0x2c7cf4;}else console['log'](_0x450444(0x120)+_0x490b2f+(_0x439f29?_0x5264e1['SxqVv']:'')+_0x450444(0x148));if(_0x50a5b9){console['log'](_0x5264e1['JOaKl']);try{await _0x5264e1['jSwHa'](installChromiumBinary,_0x490b2f),console[_0x450444(0xf6)](_0x450444(0x136));}catch(_0x4c1e21){console[_0x450444(0x111)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x5264e1[_0x450444(0x11c)](_0x4c1e21,Error)?_0x4c1e21[_0x450444(0xea)]:_0x4c1e21),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0x450444(0xf6)]('\x20\x20npx\x20playwright@'+_0x490b2f+'\x20install\x20chromium');}}else console['log'](_0x450444(0x13d)),console[_0x450444(0xf6)](_0x5264e1[_0x450444(0x141)]),console['log'](_0x450444(0x12d)+_0x490b2f+_0x450444(0x159));return!![];}export async function writeRangerGitignore(_0x322313){const _0x50156f=_0x2c110f,_0x3f04b8={'YzLjZ':function(_0x378fff,_0x31caa9,_0x119558){return _0x378fff(_0x31caa9,_0x119558);},'dLNjl':function(_0x149953,_0x1bddcb,_0x39c217){return _0x149953(_0x1bddcb,_0x39c217);}},_0x3cdff6=_0x3f04b8[_0x50156f(0x146)](join,_0x322313,_0x50156f(0xfa)),_0xee6a65='\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 _0x3f04b8['dLNjl'](writeFile,_0x3cdff6,_0xee6a65),console['log'](_0x50156f(0x15c));}function printProfileSetupLaterInstructions(){const _0x358627=_0x2c110f,_0x2c4916={'jVpVu':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'};console[_0x358627(0xf6)](_0x2c4916[_0x358627(0x13f)]),console['log']('\x20\x20'+bold('ranger\x20profile\x20add\x20local')),console['log'](_0x358627(0xe7));}async function ensureLocalEnv(_0x2e5f97,_0x3f312a){const _0x2a604d=_0x2c110f,_0x4ca69f={'SaIjD':_0x2a604d(0x133),'HZBhj':'✓\x20Local\x20profile\x20already\x20exists','gGLtp':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','nhqom':_0x2a604d(0xee),'mwXpQ':_0x2a604d(0x14e),'ArlSZ':function(_0xcbacc9,_0x1972cc,_0x52dd2e,_0x4099c3){return _0xcbacc9(_0x1972cc,_0x52dd2e,_0x4099c3);},'PBNMw':_0x2a604d(0x131),'BtAxk':'\x0a❌\x20Profile\x20setup\x20failed:','UKeeU':function(_0x241251,_0x999f84){return _0x241251 instanceof _0x999f84;},'CQdqd':function(_0x287463){return _0x287463();}};if(!findGitRoot())return console[_0x2a604d(0xf6)](_0x4ca69f['SaIjD']),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x2a604d(0x131),{'locations':['local']}))return console['log'](_0x4ca69f['HZBhj']),{'ready':!![],'skipped':![]};const _0x41eab0=process[_0x2a604d(0x110)]['isTTY']&&process['stdout'][_0x2a604d(0xec)];if(_0x41eab0&&!_0x2e5f97?.['url']){console[_0x2a604d(0xf6)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x2a604d(0xf6)](_0x2a604d(0x138)),console['log'](_0x4ca69f[_0x2a604d(0x103)]),console[_0x2a604d(0xf6)](_0x2a604d(0x12f)),console[_0x2a604d(0xf6)]('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0x14e776}=await _0x2244d8[_0x2a604d(0x107)]([{'type':_0x4ca69f['nhqom'],'name':_0x4ca69f[_0x2a604d(0xf3)],'message':_0x2a604d(0x106),'default':!![]}]);if(!_0x14e776)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x4ca69f['ArlSZ'](addEnv,_0x4ca69f['PBNMw'],{'url':_0x2e5f97?.[_0x2a604d(0xeb)],'force':_0x2e5f97?.['force'],'allowInsecureLocalhost':_0x2e5f97?.[_0x2a604d(0x156)]},_0x3f312a),{'ready':!![],'skipped':![]};}catch(_0xc84e08){return console[_0x2a604d(0x111)](_0x4ca69f['BtAxk'],_0x4ca69f['UKeeU'](_0xc84e08,Error)?_0xc84e08['message']:_0xc84e08),_0x4ca69f['CQdqd'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x198cde,_0x613ae,_0x1571ad){const _0x46e37f=_0x2c110f,_0x740dbe={'WCVje':'\x0a🚀\x20Ranger\x20Setup\x0a','OACrW':'git_check','XvMWD':function(_0x3cb209){return _0x3cb209();},'cxvAA':function(_0x422f2c,_0x4fed7a){return _0x422f2c(_0x4fed7a);},'bQWCj':'auth','IoGJo':function(_0x277127,_0x32769e){return _0x277127(_0x32769e);},'aZHJj':'chromium','zurIl':_0x46e37f(0x140),'CjKSa':'skills','pfAQW':function(_0x483be8,_0x12dcf2,_0x1b5bb2){return _0x483be8(_0x12dcf2,_0x1b5bb2);},'KRUCV':_0x46e37f(0x11a),'evDHB':function(_0x453c50,_0xb06949){return _0x453c50(_0xb06949);},'VJtxC':_0x46e37f(0x104),'dEgDD':_0x46e37f(0x121),'FNNez':function(_0x5c25eb,_0x2afe52){return _0x5c25eb+_0x2afe52;}};console['log'](_0x740dbe['WCVje']);const _0x58971d=process['stdin'][_0x46e37f(0xec)]&&process[_0x46e37f(0x147)][_0x46e37f(0xec)];!_0x58971d&&!_0x613ae?.['scope']&&(console[_0x46e37f(0xf6)](_0x46e37f(0x158)),_0x613ae={..._0x613ae,'scope':_0x46e37f(0x143)});_0x1571ad?.['trackPhaseStart'](_0x740dbe[_0x46e37f(0x149)]);if(!_0x740dbe[_0x46e37f(0xe3)](findGitRoot)){await _0x1571ad?.['trackPhaseError'](_0x740dbe[_0x46e37f(0x149)],new Error(_0x46e37f(0x12e)));throw new Error(_0x46e37f(0x113));}_0x1571ad?.['trackPhaseEnd'](_0x46e37f(0x12c));const _0x172e06=!_0x740dbe['cxvAA'](existsSync,getRangerDir()),{path:_0x22e19d}=await ensureRangerDir();_0x1571ad?.[_0x46e37f(0x15e)](_0x740dbe[_0x46e37f(0xf1)]);const _0xc56d64=await _0x740dbe['IoGJo'](authenticate,_0x198cde);_0x1571ad?.[_0x46e37f(0x13b)](_0x46e37f(0x152),{'isFirstRun':_0x172e06,'method':_0xc56d64[_0x46e37f(0x126)]}),_0x1571ad?.['trackPhaseStart'](_0x740dbe['aZHJj']);_0x613ae?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium();_0x1571ad?.[_0x46e37f(0x13b)](_0x740dbe[_0x46e37f(0x102)],{'isFirstRun':_0x172e06,'skipped':!!_0x613ae?.['skipChromium']}),await _0x740dbe[_0x46e37f(0x14d)](writeRangerGitignore,_0x22e19d),console[_0x46e37f(0xf6)](_0x46e37f(0xf7));const _0x2e47db=_0x613ae?.['scope'],_0x4bd025=_0x613ae?.[_0x46e37f(0x154)]??![];let _0x5353f7=null;_0x4bd025?(_0x1571ad?.[_0x46e37f(0x15e)](_0x740dbe[_0x46e37f(0xf2)]),_0x5353f7=await ensureOpencodePluginConfig(_0x2e47db),_0x1571ad?.[_0x46e37f(0x13b)](_0x740dbe[_0x46e37f(0xf2)],{'isFirstRun':_0x172e06,'opencode':!![]})):(_0x1571ad?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x2e47db),_0x1571ad?.[_0x46e37f(0x13b)](_0x740dbe[_0x46e37f(0xf2)],{'isFirstRun':_0x172e06}));if(_0x4bd025&&_0x5353f7){_0x1571ad?.['trackPhaseStart'](_0x740dbe[_0x46e37f(0x125)]);try{await _0x740dbe['pfAQW'](installSkill,_0x740dbe[_0x46e37f(0x151)],{'level':_0x5353f7['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x1571ad?.[_0x46e37f(0x13b)](_0x46e37f(0x100),{'isFirstRun':_0x172e06,'opencode':!![]});}catch(_0x27dba2){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x27dba2 instanceof Error?_0x27dba2[_0x46e37f(0xea)]:_0x27dba2),_0x1571ad?.[_0x46e37f(0x13b)]('skills',{'isFirstRun':_0x172e06,'opencode':!![],'failed':!![]});}}else _0x1571ad?.[_0x46e37f(0x15e)]('skills'),await ensureClaudeSkills(_0x2e47db),_0x1571ad?.['trackPhaseEnd'](_0x740dbe[_0x46e37f(0x125)],{'isFirstRun':_0x172e06});if(!_0x58971d&&!_0x613ae?.[_0x46e37f(0xeb)])console[_0x46e37f(0xf6)](_0x46e37f(0xed)),console[_0x46e37f(0xf6)]('\x20\x20'+_0x740dbe[_0x46e37f(0x15a)](bold,_0x46e37f(0xff))+'\x0a');else{_0x1571ad?.[_0x46e37f(0x15e)](_0x46e37f(0x101));const _0x6157ef=await ensureLocalEnv({'url':_0x613ae?.[_0x46e37f(0xeb)],'force':_0x613ae?.[_0x46e37f(0x13e)],'allowInsecureLocalhost':_0x613ae?.[_0x46e37f(0x156)]},_0x1571ad);_0x1571ad?.['trackPhaseEnd']('profile',{'isFirstRun':_0x172e06,'profileReady':_0x6157ef[_0x46e37f(0x14b)],'userSkipped':_0x6157ef[_0x46e37f(0x119)]}),_0x6157ef['ready']&&console[_0x46e37f(0xf6)](_0x46e37f(0x10d));}if(_0x4bd025)console['log'](_0x46e37f(0x155)),console['log'](_0x740dbe['VJtxC']),console[_0x46e37f(0xf6)](_0x46e37f(0x11d)),console['log'](_0x740dbe[_0x46e37f(0x12a)]);else{const _0x273ac5=_0x740dbe['cxvAA'](bold,_0x46e37f(0x14c));console['log'](_0x740dbe[_0x46e37f(0x144)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x273ac5+_0x46e37f(0x15b),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0x46e37f(0xf9)+_0x46e37f(0x124));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5f05c2=_0x525d;(function(_0x184d69,_0x31e93f){const _0x4f2521=_0x525d,_0x299ee7=_0x184d69();while(!![]){try{const _0x3f091b=-parseInt(_0x4f2521(0xb2))/0x1*(parseInt(_0x4f2521(0xc9))/0x2)+-parseInt(_0x4f2521(0xb6))/0x3*(parseInt(_0x4f2521(0xc8))/0x4)+-parseInt(_0x4f2521(0xea))/0x5*(parseInt(_0x4f2521(0xd9))/0x6)+parseInt(_0x4f2521(0xb4))/0x7+-parseInt(_0x4f2521(0xbf))/0x8+-parseInt(_0x4f2521(0xf6))/0x9*(parseInt(_0x4f2521(0xe0))/0xa)+-parseInt(_0x4f2521(0xed))/0xb*(-parseInt(_0x4f2521(0xe7))/0xc);if(_0x3f091b===_0x31e93f)break;else _0x299ee7['push'](_0x299ee7['shift']());}catch(_0x27aa87){_0x299ee7['push'](_0x299ee7['shift']());}}}(_0x45a7,0x9ddcb));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x45a7(){const _0xa03319=['success','not_installed','16467CrvDdb','yoDjX','configured','hasEncryptedAuth','plugin','WdzPc','user','oyboU','isArray','3510UduSxW','settingsPath','utf-8','project','toString','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','yLTfV','qgLdC','includes','path','OPMuq','cmsSP','version','qWwNV','ITVGG','opencode','match','\x0a\x20\x20No\x20active\x20profile\x20set','\x0a---\x20Skills\x20---','xofFV','foiIf','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','Version:\x20','LsSmR','map','status','akLOb','1155223maQEYV','Ycodx','3371823TUPXVx','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','84fkDmeo','rqkiw','\x20\x20Run:\x20ranger\x20setup\x20--opencode','organizationName','data','enabled','rlytr','cwd','Organization:\x20','9635288nKtXcb','zEhGa','join','API\x20Environment:\x20','\x1b[1m','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','\x20\x20Run:\x20ranger\x20skillup','\x20(latest:\x20','JTBhm','77084ptEgiH','2UDwuaR','hBRWG','NPgCf','DEBUG','isDirectory','\x20plugin(s)\x20configured','stdout','settings.json','log','close','truzZ','\x20(up\x20to\x20date)','ranger@trailhead','LYuYT','details','No\x20skills\x20installed','3294174mupuMn','name','SKILL.md','config','\x1b]8;;\x07','ZAYth','length','22710RagACD','pipe','auth.json','\x20\x20\x20\x20','unknown','\x20\x20Not\x20configured','\x20\x20\x20\x20Auth:\x20','40464hZEDwN','bYqZt','filter','10qIqjom'];_0x45a7=function(){return _0xa03319;};return _0x45a7();}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=_0xadd756=>_0x5f05c2(0xc3)+_0xadd756+'\x1b[0m',link=(_0x452256,_0x4ad44a)=>'\x1b]8;;file://'+_0x452256+'\x07'+(_0x4ad44a||_0x452256)+_0x5f05c2(0xdd);function _0x525d(_0x49e10d,_0x5495af){_0x49e10d=_0x49e10d-0xad;const _0x45a79b=_0x45a7();let _0x525d7f=_0x45a79b[_0x49e10d];return _0x525d7f;}async function getOpencodePluginStatus(){const _0xfd93a6=_0x5f05c2,_0xee045e={'rqkiw':_0xfd93a6(0xec),'Ycodx':function(_0x4b1356,_0x455641){return _0x4b1356(_0x455641);},'GeCQf':_0xfd93a6(0xef),'cmsSP':function(_0x1787f2,_0x466dd0){return _0x1787f2>_0x466dd0;},'RbGhJ':function(_0x1f4e17,_0x555c39){return _0x1f4e17(_0x555c39);},'EjFIp':function(_0x50df1f,_0x2e2156){return _0x50df1f(_0x2e2156);},'foiIf':'string','OPMuq':_0xfd93a6(0x105),'jFZdA':'pipe','ziEaa':'error','WdzPc':_0xfd93a6(0xd2)};return new Promise(_0x52e2d8=>{const _0x4742bc=_0xfd93a6,_0x2f3d92={'ZYiyI':function(_0x153935,_0x26447e){return _0x153935!==_0x26447e;},'yoDjX':_0xee045e[_0x4742bc(0x10a)],'yLTfV':'opencode-plugin'},_0x8f4292=spawn(_0xee045e[_0x4742bc(0x100)],['debug',_0x4742bc(0xdc)],{'stdio':['ignore',_0xee045e['jFZdA'],_0x4742bc(0xe1)]});let _0x2f90b9='';_0x8f4292[_0x4742bc(0xcf)]?.['on'](_0x4742bc(0xba),_0x24d3ea=>{_0x2f90b9+=_0x24d3ea['toString']();}),_0x8f4292['stderr']?.['on'](_0x4742bc(0xba),_0x39fa1d=>{const _0x50d6fe=_0x4742bc;_0x2f90b9+=_0x39fa1d[_0x50d6fe(0xfa)]();}),_0x8f4292['on'](_0xee045e['ziEaa'],()=>{const _0x5ad38c=_0x4742bc;_0x52e2d8({'status':_0xee045e[_0x5ad38c(0xb7)]});}),_0x8f4292['on'](_0xee045e[_0x4742bc(0xf2)],_0x22fc18=>{const _0xa03ebf=_0x4742bc;if(_0x22fc18!==0x0){_0xee045e[_0xa03ebf(0xb3)](_0x52e2d8,{'status':_0xee045e[_0xa03ebf(0xb7)]});return;}const _0x3f5336=_0x2f90b9['trim']();let _0x460f26=null;if(_0x3f5336)try{_0x460f26=JSON['parse'](_0x3f5336);}catch{const _0x4653d7=_0x3f5336['match'](/\{[\s\S]*\}$/);if(_0x4653d7)try{_0x460f26=JSON['parse'](_0x4653d7[0x0]);}catch{_0x460f26=null;}}const _0x44fec4=Array[_0xa03ebf(0xf5)](_0x460f26?.['plugin'])?_0x460f26?.[_0xa03ebf(0xf1)]:[],_0x4f9546=_0x44fec4['some'](_0x41ff9a=>{const _0x4427cf=_0xa03ebf;if(_0x2f3d92['ZYiyI'](typeof _0x41ff9a,_0x2f3d92[_0x4427cf(0xee)]))return![];return _0x41ff9a[_0x4427cf(0xfe)]('@ranger-testing/opencode-plugin')||_0x41ff9a['includes'](_0x2f3d92[_0x4427cf(0xfc)]);});if(_0x4f9546){_0x52e2d8({'status':_0xee045e['GeCQf'],'details':_0x44fec4['length']>0x0?_0x44fec4['length']+_0xa03ebf(0xce):undefined});return;}if(_0xee045e[_0xa03ebf(0x101)](_0x44fec4[_0xa03ebf(0xdf)],0x0)){_0xee045e['RbGhJ'](_0x52e2d8,{'status':'not_configured','details':_0x44fec4['length']+_0xa03ebf(0xce)});return;}_0xee045e['EjFIp'](_0x52e2d8,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x208586,_0x3d6c96){const _0x20718c=_0x5f05c2,_0x279570={'qWwNV':function(_0xc97f33,_0x128a59,_0x1b2d5f){return _0xc97f33(_0x128a59,_0x1b2d5f);},'ZAYth':_0x20718c(0xdb),'ITVGG':function(_0x73dee0,_0x7fd1bd){return _0x73dee0(_0x7fd1bd);},'sdJBg':function(_0x1e8a6f,_0x140f2b,_0x515713){return _0x1e8a6f(_0x140f2b,_0x515713);}};if(!existsSync(_0x208586))return[];const _0x4751f3=[];try{const _0x43c8bb=await _0x279570[_0x20718c(0x103)](readdir,_0x208586,{'withFileTypes':!![]});for(const _0x41eb5f of _0x43c8bb){if(_0x41eb5f[_0x20718c(0xcd)]()){const _0x5afb2d=join(_0x208586,_0x41eb5f['name'],_0x279570[_0x20718c(0xde)]);if(_0x279570[_0x20718c(0x104)](existsSync,_0x5afb2d)){let _0x4a76a4=_0x41eb5f[_0x20718c(0xda)];try{const _0x27f24b=await _0x279570['sdJBg'](readFile,_0x5afb2d,_0x20718c(0xf8)),_0x5348fd=_0x27f24b[_0x20718c(0x106)](/name:\s*(.+)/);_0x5348fd&&(_0x4a76a4=_0x5348fd[0x1]['trim']());}catch{}_0x4751f3['push']({'name':_0x41eb5f[_0x20718c(0xda)],'displayName':_0x4a76a4,'path':_0x5afb2d,'level':_0x3d6c96});}}}}catch{return[];}return _0x4751f3;}async function getInstalledSkills(){const _0x2f240b=_0x5f05c2,_0x5b89c4={'hJaJs':function(_0x2e058c,_0x2c142b,_0x5beda1){return _0x2e058c(_0x2c142b,_0x5beda1);},'LYuYT':function(_0x196be1){return _0x196be1();},'JyrDp':function(_0x42c4ee,_0x2a33fe,_0x10c1f0){return _0x42c4ee(_0x2a33fe,_0x10c1f0);},'oyboU':'user'},[_0x80f439,_0x2b4aee]=await Promise['all']([_0x5b89c4['hJaJs'](getSkillsFromDir,_0x5b89c4[_0x2f240b(0xd6)](getProjectSkillsDir),_0x2f240b(0xf9)),_0x5b89c4['JyrDp'](getSkillsFromDir,getUserSkillsDir(),_0x5b89c4[_0x2f240b(0xf4)])]);return{'project':_0x80f439,'user':_0x2b4aee};}async function getEnvironments(){const _0x4a66e1=_0x5f05c2,_0x4affa1={'qgLdC':function(_0x20ddf0,_0x37a7fb){return _0x20ddf0(_0x37a7fb);},'NPgCf':_0x4a66e1(0xd0),'MemJP':function(_0x1dde42,_0x456327,_0x24d96a){return _0x1dde42(_0x456327,_0x24d96a);},'cptpx':'auth.json.enc','rlytr':function(_0x5e71fb,_0x4a40ee){return _0x5e71fb(_0x4a40ee);},'zRWNo':function(_0x153e44,_0x39933a){return _0x153e44===_0x39933a;}},{envNames:_0x43a498,activeEnv:_0xcc0b46}=await getEnvNames(),_0x352911=getRangerDir();if(!_0x4affa1['rlytr'](existsSync,_0x352911))return{'envs':[],'activeEnv':null};const _0x2d9320=_0x43a498['map'](_0x305e19=>{const _0x472552=_0x4a66e1,_0x3dfbb7=_0x4affa1[_0x472552(0xfd)](getEnvDir,_0x305e19),_0x5b06f1=join(_0x3dfbb7,_0x4affa1[_0x472552(0xcb)]),_0x57d2c8=join(_0x3dfbb7,_0x472552(0xe2)),_0x4a1289=_0x4affa1['MemJP'](join,_0x3dfbb7,_0x4affa1['cptpx']);return{'name':_0x305e19,'settingsPath':existsSync(_0x5b06f1)?_0x5b06f1:'(not\x20found)','hasPlaintextAuth':_0x4affa1[_0x472552(0xbc)](existsSync,_0x57d2c8),'hasEncryptedAuth':existsSync(_0x4a1289),'isActive':_0x4affa1['zRWNo'](_0x305e19,_0xcc0b46)};});return{'envs':_0x2d9320,'activeEnv':_0xcc0b46};}export async function status(){const _0x24a5f8=_0x5f05c2,_0x2fb1ab={'GQjGd':'\x0a📊\x20Ranger\x20Status\x0a','zEhGa':function(_0x5b5d7e){return _0x5b5d7e();},'bYqZt':function(_0x3a6f15,_0x31a412,_0x116f94){return _0x3a6f15(_0x31a412,_0x116f94);},'YoXpH':function(_0x3f2910,_0x267ddc){return _0x3f2910(_0x267ddc);},'giUSK':function(_0x175e0e,_0x5d5c53){return _0x175e0e(_0x5d5c53);},'LsSmR':function(_0x40b51d){return _0x40b51d();},'xofFV':function(_0x3dbcf8){return _0x3dbcf8();},'USyPn':function(_0x36843c,_0x2a690a){return _0x36843c(_0x2a690a);},'UcTlc':'not_configured','tXmzK':_0x24a5f8(0xe5),'DAUhv':_0x24a5f8(0x10b),'SvaAD':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','akLOb':'enabled','djVyM':function(_0x11e220,_0x4b09af){return _0x11e220(_0x4b09af);},'hBRWG':_0x24a5f8(0xfb),'YHOKc':_0x24a5f8(0x108),'VJiuA':_0x24a5f8(0xd8),'HvFOt':function(_0x22a543,_0x1890b2){return _0x22a543>_0x1890b2;},'iavjA':'\x20\x20Project-level:','vDXwv':function(_0x521c07,_0x2940f9){return _0x521c07(_0x2940f9);},'JTBhm':'\x0a---\x20Profiles\x20---','EMEmL':function(_0x37ce60){return _0x37ce60();},'ayaEK':function(_0x495766,_0x1f87c6){return _0x495766===_0x1f87c6;},'truzZ':'No\x20profiles\x20configured','dYshm':'plaintext','uRbrB':'none'};console['log'](_0x2fb1ab['GQjGd']);const _0x2f8897=process[_0x24a5f8(0xbd)](),_0x1c2a72=_0x2fb1ab[_0x24a5f8(0xc0)](getRangerDir);if(!existsSync(_0x1c2a72)){console['log']('Root:\x20'+link(_0x2f8897,bold(basename(_0x2f8897)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x24a5f8(0xd1)](_0x24a5f8(0xb5));return;}console[_0x24a5f8(0xd1)]('Root:\x20'+_0x2fb1ab[_0x24a5f8(0xe8)](link,_0x2f8897,_0x2fb1ab['YoXpH'](bold,_0x2fb1ab['giUSK'](basename,_0x2f8897))));const _0x1f9588=getCurrentVersion(),_0x46090c=_0x2fb1ab[_0x24a5f8(0xae)](getLatestVersion);if(_0x46090c['version']&&_0x46090c['version']!==_0x1f9588)console[_0x24a5f8(0xd1)]('Version:\x20'+_0x1f9588+_0x24a5f8(0xc6)+_0x46090c[_0x24a5f8(0x102)]+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x46090c['version']?console[_0x24a5f8(0xd1)](_0x24a5f8(0xad)+_0x1f9588+_0x24a5f8(0xd4)):console['log'](_0x24a5f8(0xad)+_0x1f9588);const _0x221f90=await getToken();if(_0x221f90){const _0x43b31f=await getCurrentUser(_0x221f90);_0x43b31f[_0x24a5f8(0xeb)]?console[_0x24a5f8(0xd1)](_0x24a5f8(0xbe)+bold(_0x43b31f[_0x24a5f8(0xf3)][_0x24a5f8(0xb9)])):(console[_0x24a5f8(0xd1)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x24a5f8(0xd1)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x24a5f8(0xcc)]&&(console[_0x24a5f8(0xd1)](_0x24a5f8(0xc2)+_0x2fb1ab[_0x24a5f8(0x109)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x24a5f8(0xd1)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x1c2ea7=await getOpencodePluginStatus();if(_0x1c2ea7['status']==='configured')console['log']('\x20\x20'+_0x2fb1ab['USyPn'](bold,'@ranger-testing/opencode-plugin')+':\x20configured'),_0x1c2ea7['details']&&console[_0x24a5f8(0xd1)]('\x20\x20'+_0x1c2ea7['details']);else _0x1c2ea7[_0x24a5f8(0xb0)]===_0x2fb1ab['UcTlc']?(console[_0x24a5f8(0xd1)](_0x2fb1ab['tXmzK']),_0x1c2ea7[_0x24a5f8(0xd7)]&&console[_0x24a5f8(0xd1)]('\x20\x20'+_0x1c2ea7[_0x24a5f8(0xd7)]),console[_0x24a5f8(0xd1)](_0x24a5f8(0xb8))):console['log'](_0x2fb1ab['DAUhv']);console[_0x24a5f8(0xd1)](_0x2fb1ab['SvaAD']);const _0x207aaa=await getPluginInfo(_0x24a5f8(0xd5));if(_0x207aaa){const _0x3e3eb8=_0x207aaa['scope']||_0x24a5f8(0xe4),_0x1303cd=_0x207aaa[_0x24a5f8(0xbb)]?_0x2fb1ab[_0x24a5f8(0xb1)]:'disabled';console['log']('\x20\x20'+_0x2fb1ab['djVyM'](bold,_0x24a5f8(0xd5))+':\x20installed\x20('+_0x3e3eb8+',\x20'+_0x1303cd+')');}else console[_0x24a5f8(0xd1)]('\x20\x20Not\x20installed'),console['log'](_0x2fb1ab[_0x24a5f8(0xca)]);console[_0x24a5f8(0xd1)](_0x2fb1ab['YHOKc']);const {project:_0x112e17,user:_0x448ce6}=await _0x2fb1ab[_0x24a5f8(0xae)](getInstalledSkills),_0x37569f=_0x112e17['filter'](_0x10643c=>RANGER_MANAGED_SKILLS['includes'](_0x10643c['name'])),_0x1b2b31=_0x448ce6[_0x24a5f8(0xe9)](_0x21bd97=>RANGER_MANAGED_SKILLS['includes'](_0x21bd97['name'])),_0x4611e3=_0x37569f[_0x24a5f8(0xdf)]+_0x1b2b31['length'];if(_0x4611e3===0x0)console[_0x24a5f8(0xd1)](_0x2fb1ab['VJiuA']),console[_0x24a5f8(0xd1)](_0x24a5f8(0xc5));else{if(_0x2fb1ab['HvFOt'](_0x37569f[_0x24a5f8(0xdf)],0x0)){console['log'](_0x2fb1ab['iavjA']);for(const _0x14b935 of _0x37569f){console[_0x24a5f8(0xd1)](_0x24a5f8(0xe3)+_0x2fb1ab['giUSK'](bold,_0x14b935['displayName'])+':\x20'+link(_0x14b935[_0x24a5f8(0xff)],basename(_0x14b935[_0x24a5f8(0xff)])));}}if(_0x1b2b31[_0x24a5f8(0xdf)]>0x0){console['log']('\x20\x20User-level:');for(const _0x209a7d of _0x1b2b31){console['log'](_0x24a5f8(0xe3)+_0x2fb1ab['vDXwv'](bold,_0x209a7d['displayName'])+':\x20'+_0x2fb1ab['bYqZt'](link,_0x209a7d[_0x24a5f8(0xff)],basename(_0x209a7d['path'])));}}}console[_0x24a5f8(0xd1)](_0x2fb1ab[_0x24a5f8(0xc7)]);const {envs:_0x3a0bc4,activeEnv:_0xb6eed}=await _0x2fb1ab['EMEmL'](getEnvironments);if(_0x2fb1ab['ayaEK'](_0x3a0bc4['length'],0x0))console['log'](_0x2fb1ab[_0x24a5f8(0xd3)]),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x3df08f of _0x3a0bc4){const _0x1fb9f6=_0x3df08f['isActive']?'\x20(active)':'',_0x3158f5=_0x3df08f[_0x24a5f8(0xf0)]?'encrypted':_0x3df08f['hasPlaintextAuth']?_0x2fb1ab['dYshm']:_0x2fb1ab['uRbrB'];console['log']('\x20\x20'+bold(_0x3df08f['name'])+_0x1fb9f6),console[_0x24a5f8(0xd1)](_0x24a5f8(0xe6)+_0x3158f5),_0x3df08f['settingsPath']!=='(not\x20found)'&&console[_0x24a5f8(0xd1)]('\x20\x20\x20\x20Settings:\x20'+link(_0x3df08f['settingsPath'],basename(_0x3df08f[_0x24a5f8(0xf7)])));}!_0xb6eed&&(console['log'](_0x24a5f8(0x107)),console['log'](_0x24a5f8(0xc4)+_0x3a0bc4[_0x24a5f8(0xaf)](_0x1cd941=>_0x1cd941[_0x24a5f8(0xda)])[_0x24a5f8(0xc1)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
const _0xfb96ea=_0x10c7;(function(_0x4a530b,_0x5f2e43){const _0xe40ab8=_0x10c7,_0x25efed=_0x4a530b();while(!![]){try{const _0x4f0279=-parseInt(_0xe40ab8(0xcb))/0x1+-parseInt(_0xe40ab8(0x90))/0x2*(-parseInt(_0xe40ab8(0x82))/0x3)+parseInt(_0xe40ab8(0x8b))/0x4*(parseInt(_0xe40ab8(0xa1))/0x5)+parseInt(_0xe40ab8(0x6a))/0x6*(-parseInt(_0xe40ab8(0x6c))/0x7)+parseInt(_0xe40ab8(0xad))/0x8+parseInt(_0xe40ab8(0x93))/0x9*(parseInt(_0xe40ab8(0x80))/0xa)+parseInt(_0xe40ab8(0x6b))/0xb*(parseInt(_0xe40ab8(0x8f))/0xc);if(_0x4f0279===_0x5f2e43)break;else _0x25efed['push'](_0x25efed['shift']());}catch(_0x35ff66){_0x25efed['push'](_0x25efed['shift']());}}}(_0x520c,0x7ee04));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';function _0x520c(){const _0x426586=['match','status','\x20\x20\x20\x20','Version:\x20','\x20\x20Not\x20configured','none','length','\x20\x20Project-level:','\x20\x20\x20\x20Auth:\x20','ZgBke','500770sxLIZH','Ksrof','234lRigxi','mqfvN','WiCKq','\x1b]8;;file://','pNXib','\x0a---\x20OpenCode\x20Plugin\x20---','CqOBL','WvInN','hasPlaintextAuth','219196lEqYYO','auth.json','pipe','LskkP','7124376raHyDf','5140IDtvPt','all','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','63swRbJG','LXaOS','DNPLP','NCIJN','opencode-plugin','WAQIt','trim','DFucY','displayName','isDirectory','plugin','error','kZpAh','mulVY','25ZhNJRB','\x1b]8;;\x07','NTTYv','close','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','@ranger-testing/opencode-plugin','PJbta','NtRFp','Root:\x20','\x1b[0m','GoosC','push','723952ieFOyU','cKquT','uZadU','ORugb','OuIcA','\x20(latest:\x20','fyNuE','pCPiL','DaSGP','jyviP','\x0a---\x20Profiles\x20---','isActive','map','Zhfza','log','XRNTJ','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','version','\x20\x20Not\x20installed','cwd','hasEncryptedAuth','\x20\x20Run:\x20ranger\x20skillup','WzbWo','\x20plugin(s)\x20configured','yqZte','API\x20URL:\x20','pWjJz','stdout','\x20\x20Run:\x20ranger\x20setup\x20[token]','settings.json','238335ObulbB','No\x20profiles\x20configured','eQFWs','details','Organization:\x20','\x0a---\x20Skills\x20---','COevf','includes','4507002MrzuCc','11tGoIap','7RjFsrm','string','API\x20Token:\x20✗\x20Not\x20found','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','name','(not\x20found)','SKILL.md','user','path','ranger@trailhead'];_0x520c=function(){return _0x426586;};return _0x520c();}import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x10c7(_0x5899a2,_0xfc7225){_0x5899a2=_0x5899a2-0x68;const _0x520c11=_0x520c();let _0x10c7ef=_0x520c11[_0x5899a2];return _0x10c7ef;}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=_0x1d14b9=>'\x1b[1m'+_0x1d14b9+_0xfb96ea(0xaa),link=(_0xf05548,_0x5a0bc6)=>_0xfb96ea(0x85)+_0xf05548+'\x07'+(_0x5a0bc6||_0xf05548)+_0xfb96ea(0xa2);async function getOpencodePluginStatus(){const _0x1c789a=_0xfb96ea,_0x37dff3={'COevf':'not_installed','PJbta':function(_0x562d24,_0x1e6412){return _0x562d24(_0x1e6412);},'kZpAh':'configured','ZsgwM':function(_0x402d17,_0x192cb2){return _0x402d17>_0x192cb2;},'XRNTJ':_0x1c789a(0x6d),'ORugb':'debug','dsRbp':'ignore','mqfvN':_0x1c789a(0x8d),'WvInN':'data','ujlas':_0x1c789a(0x9e),'eQFWs':_0x1c789a(0xa4)};return new Promise(_0x1d84ff=>{const _0x265635=_0x1c789a,_0x5037ee={'fyNuE':_0x37dff3[_0x265635(0xbc)]},_0x467f46=spawn('opencode',[_0x37dff3[_0x265635(0xb0)],'config'],{'stdio':[_0x37dff3['dsRbp'],_0x265635(0x8d),_0x37dff3[_0x265635(0x83)]]});let _0x5b7bc0='';_0x467f46[_0x265635(0xc8)]?.['on'](_0x37dff3[_0x265635(0x89)],_0x4dcb3a=>{_0x5b7bc0+=_0x4dcb3a['toString']();}),_0x467f46['stderr']?.['on']('data',_0x11a18c=>{_0x5b7bc0+=_0x11a18c['toString']();}),_0x467f46['on'](_0x37dff3['ujlas'],()=>{const _0x4be07e=_0x265635;_0x1d84ff({'status':_0x37dff3[_0x4be07e(0x68)]});}),_0x467f46['on'](_0x37dff3[_0x265635(0xcd)],_0x5252bb=>{const _0x5bb361=_0x265635;if(_0x5252bb!==0x0){_0x1d84ff({'status':'not_installed'});return;}const _0x42eed2=_0x5b7bc0[_0x5bb361(0x99)]();let _0x278ab1=null;if(_0x42eed2)try{_0x278ab1=JSON['parse'](_0x42eed2);}catch{const _0x13a5bc=_0x42eed2[_0x5bb361(0x76)](/\{[\s\S]*\}$/);if(_0x13a5bc)try{_0x278ab1=JSON['parse'](_0x13a5bc[0x0]);}catch{_0x278ab1=null;}}const _0x20fba6=Array['isArray'](_0x278ab1?.[_0x5bb361(0x9d)])?_0x278ab1?.['plugin']:[],_0x59c159=_0x20fba6['some'](_0x2f2900=>{const _0x416a8a=_0x5bb361;if(typeof _0x2f2900!==_0x5037ee[_0x416a8a(0xb3)])return![];return _0x2f2900[_0x416a8a(0x69)](_0x416a8a(0xa6))||_0x2f2900[_0x416a8a(0x69)](_0x416a8a(0x97));});if(_0x59c159){_0x37dff3['PJbta'](_0x1d84ff,{'status':_0x37dff3[_0x5bb361(0x9f)],'details':_0x20fba6[_0x5bb361(0x7c)]>0x0?_0x20fba6[_0x5bb361(0x7c)]+_0x5bb361(0xc4):undefined});return;}if(_0x37dff3['ZsgwM'](_0x20fba6[_0x5bb361(0x7c)],0x0)){_0x37dff3[_0x5bb361(0xa7)](_0x1d84ff,{'status':'not_configured','details':_0x20fba6[_0x5bb361(0x7c)]+_0x5bb361(0xc4)});return;}_0x1d84ff({'status':'not_configured'});});});}async function getSkillsFromDir(_0x3a2983,_0x1be622){const _0x480a46=_0xfb96ea,_0x4e7d12={'Nezve':function(_0x3ae0ba,_0x13765c,_0x536e70){return _0x3ae0ba(_0x13765c,_0x536e70);},'LskkP':function(_0x3f1d45,_0x4a86b2,_0x1a4641,_0x3a0ed1){return _0x3f1d45(_0x4a86b2,_0x1a4641,_0x3a0ed1);},'zGCCJ':_0x480a46(0x72),'NTTYv':function(_0x2570b0,_0x48b858,_0x157691){return _0x2570b0(_0x48b858,_0x157691);}};if(!existsSync(_0x3a2983))return[];const _0x1f72be=[];try{const _0x3bceaf=await _0x4e7d12['Nezve'](readdir,_0x3a2983,{'withFileTypes':!![]});for(const _0x297d53 of _0x3bceaf){if(_0x297d53[_0x480a46(0x9c)]()){const _0x47c993=_0x4e7d12[_0x480a46(0x8e)](join,_0x3a2983,_0x297d53[_0x480a46(0x70)],_0x4e7d12['zGCCJ']);if(existsSync(_0x47c993)){let _0x514b06=_0x297d53[_0x480a46(0x70)];try{const _0x44566b=await _0x4e7d12[_0x480a46(0xa3)](readFile,_0x47c993,'utf-8'),_0x1c69dd=_0x44566b['match'](/name:\s*(.+)/);_0x1c69dd&&(_0x514b06=_0x1c69dd[0x1][_0x480a46(0x99)]());}catch{}_0x1f72be[_0x480a46(0xac)]({'name':_0x297d53[_0x480a46(0x70)],'displayName':_0x514b06,'path':_0x47c993,'level':_0x1be622});}}}}catch{return[];}return _0x1f72be;}async function getInstalledSkills(){const _0x378c46=_0xfb96ea,_0x2efbbf={'OuIcA':function(_0x3354d6){return _0x3354d6();},'fUgbW':'project'},[_0xd106cb,_0x101efb]=await Promise[_0x378c46(0x91)]([getSkillsFromDir(_0x2efbbf['OuIcA'](getProjectSkillsDir),_0x2efbbf['fUgbW']),getSkillsFromDir(_0x2efbbf[_0x378c46(0xb1)](getUserSkillsDir),_0x378c46(0x73))]);return{'project':_0xd106cb,'user':_0x101efb};}async function getEnvironments(){const _0x1cf29f=_0xfb96ea,_0x89a963={'HcVrL':function(_0x2f1441,_0xd43a6c,_0x26c0f0){return _0x2f1441(_0xd43a6c,_0x26c0f0);},'yqZte':_0x1cf29f(0xca),'pCPiL':'auth.json.enc','DWlBV':'(not\x20found)','ZgBke':function(_0x158d42,_0x493827){return _0x158d42(_0x493827);},'FEIvW':function(_0x3c1318){return _0x3c1318();},'FJeio':function(_0x38c6f2,_0x27ece6){return _0x38c6f2(_0x27ece6);}},{envNames:_0x287e71,activeEnv:_0x2920f1}=await _0x89a963['FEIvW'](getEnvNames),_0x5a20dc=_0x89a963['FEIvW'](getRangerDir);if(!_0x89a963['FJeio'](existsSync,_0x5a20dc))return{'envs':[],'activeEnv':null};const _0x12abfb=_0x287e71[_0x1cf29f(0xb9)](_0x3b2517=>{const _0x319641=_0x1cf29f,_0x7bf75b=getEnvDir(_0x3b2517),_0x4c25eb=_0x89a963['HcVrL'](join,_0x7bf75b,_0x89a963[_0x319641(0xc5)]),_0x147612=join(_0x7bf75b,_0x319641(0x8c)),_0x70558c=join(_0x7bf75b,_0x89a963[_0x319641(0xb4)]);return{'name':_0x3b2517,'settingsPath':existsSync(_0x4c25eb)?_0x4c25eb:_0x89a963['DWlBV'],'hasPlaintextAuth':existsSync(_0x147612),'hasEncryptedAuth':_0x89a963[_0x319641(0x7f)](existsSync,_0x70558c),'isActive':_0x3b2517===_0x2920f1};});return{'envs':_0x12abfb,'activeEnv':_0x2920f1};}export async function status(){const _0x107ae4=_0xfb96ea,_0x360675={'jyviP':function(_0x1204ea,_0x1229f2,_0xe03965){return _0x1204ea(_0x1229f2,_0xe03965);},'NCIJN':function(_0xd48d9f){return _0xd48d9f();},'pWjJz':function(_0x5d8dfc){return _0x5d8dfc();},'cKquT':function(_0x5e0062){return _0x5e0062();},'DNPLP':function(_0x5194c6,_0x776327){return _0x5194c6===_0x776327;},'DFucY':'configured','ojqcJ':_0x107ae4(0xa6),'uZadU':function(_0x4fef4a,_0x36f0ea){return _0x4fef4a===_0x36f0ea;},'eSgdz':_0x107ae4(0x7a),'dzFHq':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','rMnjh':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','CqOBL':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','NESaO':function(_0x346c96,_0x515418){return _0x346c96(_0x515418);},'GoosC':_0x107ae4(0x75),'phzbG':'unknown','SONkO':'enabled','DaSGP':'disabled','pNXib':_0x107ae4(0xbf),'KUCMR':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','LXaOS':function(_0x466200,_0x2f290f){return _0x466200+_0x2f290f;},'WiCKq':'No\x20skills\x20installed','WAQIt':function(_0x7e2faa,_0x4d6d6a){return _0x7e2faa>_0x4d6d6a;},'mcwHt':function(_0x2c5985,_0x2baab1){return _0x2c5985(_0x2baab1);},'NtRFp':'\x20\x20User-level:','Zhfza':function(_0x36e1c2,_0xe0820e){return _0x36e1c2(_0xe0820e);},'mulVY':_0x107ae4(0xb7),'vKqEi':function(_0x80624f){return _0x80624f();},'WzbWo':'\x20(active)','gCSFu':'encrypted','tobjj':_0x107ae4(0x7b),'LXDjo':function(_0x330171,_0x2e4b64){return _0x330171!==_0x2e4b64;},'YRFJZ':_0x107ae4(0x71),'Ksrof':function(_0x2e53ae,_0x10709d){return _0x2e53ae(_0x10709d);}};console[_0x107ae4(0xbb)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x5ebd7b=process[_0x107ae4(0xc0)](),_0x434c20=getRangerDir();if(!existsSync(_0x434c20)){console[_0x107ae4(0xbb)](_0x107ae4(0xa9)+link(_0x5ebd7b,bold(basename(_0x5ebd7b)))),console[_0x107ae4(0xbb)](_0x107ae4(0xbd)),console[_0x107ae4(0xbb)](_0x107ae4(0xa5));return;}console['log']('Root:\x20'+_0x360675['jyviP'](link,_0x5ebd7b,bold(basename(_0x5ebd7b))));const _0x4c8374=_0x360675[_0x107ae4(0x96)](getCurrentVersion),_0x357613=_0x360675[_0x107ae4(0x96)](getLatestVersion);if(_0x357613['version']&&_0x357613[_0x107ae4(0xbe)]!==_0x4c8374)console[_0x107ae4(0xbb)]('Version:\x20'+_0x4c8374+_0x107ae4(0xb2)+_0x357613[_0x107ae4(0xbe)]+')'),console[_0x107ae4(0xbb)]('\x20\x20Run:\x20ranger\x20update');else _0x357613['version']?console['log']('Version:\x20'+_0x4c8374+'\x20(up\x20to\x20date)'):console[_0x107ae4(0xbb)](_0x107ae4(0x79)+_0x4c8374);const _0x42f207=await _0x360675['pWjJz'](getToken);if(_0x42f207){const _0x5be09=await getCurrentUser(_0x42f207);_0x5be09['success']?console['log'](_0x107ae4(0xcf)+bold(_0x5be09['user']['organizationName'])):(console[_0x107ae4(0xbb)](_0x107ae4(0x6f)),console['log'](_0x107ae4(0xc9)));}else console['log'](_0x107ae4(0x6e)),console[_0x107ae4(0xbb)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+_0x360675['NCIJN'](getCurrentEnvironment)),console['log'](_0x107ae4(0xc6)+_0x360675[_0x107ae4(0xae)](getApiBaseUrl)));console[_0x107ae4(0xbb)](_0x107ae4(0x87));const _0x253761=await _0x360675[_0x107ae4(0xc7)](getOpencodePluginStatus);if(_0x360675[_0x107ae4(0x95)](_0x253761[_0x107ae4(0x77)],_0x360675[_0x107ae4(0x9a)]))console[_0x107ae4(0xbb)]('\x20\x20'+bold(_0x360675['ojqcJ'])+':\x20configured'),_0x253761['details']&&console[_0x107ae4(0xbb)]('\x20\x20'+_0x253761[_0x107ae4(0xce)]);else _0x360675[_0x107ae4(0xaf)](_0x253761['status'],'not_configured')?(console[_0x107ae4(0xbb)](_0x360675['eSgdz']),_0x253761[_0x107ae4(0xce)]&&console['log']('\x20\x20'+_0x253761['details']),console[_0x107ae4(0xbb)](_0x360675['dzFHq'])):console[_0x107ae4(0xbb)](_0x360675['rMnjh']);console[_0x107ae4(0xbb)](_0x360675[_0x107ae4(0x88)]);const _0x37bff6=await _0x360675['NESaO'](getPluginInfo,_0x360675[_0x107ae4(0xab)]);if(_0x37bff6){const _0x1a0cce=_0x37bff6['scope']||_0x360675['phzbG'],_0x2625c6=_0x37bff6['enabled']?_0x360675['SONkO']:_0x360675[_0x107ae4(0xb5)];console[_0x107ae4(0xbb)]('\x20\x20'+bold('ranger@trailhead')+':\x20installed\x20('+_0x1a0cce+',\x20'+_0x2625c6+')');}else console['log'](_0x360675[_0x107ae4(0x86)]),console['log'](_0x360675['KUCMR']);console[_0x107ae4(0xbb)](_0x107ae4(0xd0));const {project:_0x37ac38,user:_0x3f53a4}=await getInstalledSkills(),_0x4e42a3=_0x37ac38['filter'](_0xf96ecc=>RANGER_MANAGED_SKILLS[_0x107ae4(0x69)](_0xf96ecc['name'])),_0x86ac3c=_0x3f53a4['filter'](_0x2673af=>RANGER_MANAGED_SKILLS[_0x107ae4(0x69)](_0x2673af[_0x107ae4(0x70)])),_0x3cb0fd=_0x360675[_0x107ae4(0x94)](_0x4e42a3[_0x107ae4(0x7c)],_0x86ac3c[_0x107ae4(0x7c)]);if(_0x3cb0fd===0x0)console['log'](_0x360675[_0x107ae4(0x84)]),console[_0x107ae4(0xbb)](_0x107ae4(0xc2));else{if(_0x360675[_0x107ae4(0x98)](_0x4e42a3['length'],0x0)){console[_0x107ae4(0xbb)](_0x107ae4(0x7d));for(const _0x300737 of _0x4e42a3){console['log'](_0x107ae4(0x78)+_0x360675['mcwHt'](bold,_0x300737[_0x107ae4(0x9b)])+':\x20'+link(_0x300737[_0x107ae4(0x74)],basename(_0x300737[_0x107ae4(0x74)])));}}if(_0x360675[_0x107ae4(0x98)](_0x86ac3c[_0x107ae4(0x7c)],0x0)){console['log'](_0x360675[_0x107ae4(0xa8)]);for(const _0x98495f of _0x86ac3c){console['log'](_0x107ae4(0x78)+_0x360675[_0x107ae4(0xba)](bold,_0x98495f[_0x107ae4(0x9b)])+':\x20'+_0x360675[_0x107ae4(0xb6)](link,_0x98495f['path'],basename(_0x98495f[_0x107ae4(0x74)])));}}}console[_0x107ae4(0xbb)](_0x360675[_0x107ae4(0xa0)]);const {envs:_0x47b75a,activeEnv:_0x268445}=await _0x360675['vKqEi'](getEnvironments);if(_0x47b75a[_0x107ae4(0x7c)]===0x0)console[_0x107ae4(0xbb)](_0x107ae4(0xcc)),console[_0x107ae4(0xbb)](_0x107ae4(0x92));else{for(const _0x20ce88 of _0x47b75a){const _0x4a11ee=_0x20ce88[_0x107ae4(0xb8)]?_0x360675[_0x107ae4(0xc3)]:'',_0x29fb41=_0x20ce88[_0x107ae4(0xc1)]?_0x360675['gCSFu']:_0x20ce88[_0x107ae4(0x8a)]?'plaintext':_0x360675['tobjj'];console[_0x107ae4(0xbb)]('\x20\x20'+bold(_0x20ce88[_0x107ae4(0x70)])+_0x4a11ee),console['log'](_0x107ae4(0x7e)+_0x29fb41),_0x360675['LXDjo'](_0x20ce88['settingsPath'],_0x360675['YRFJZ'])&&console[_0x107ae4(0xbb)]('\x20\x20\x20\x20Settings:\x20'+link(_0x20ce88['settingsPath'],_0x360675[_0x107ae4(0x81)](basename,_0x20ce88['settingsPath'])));}!_0x268445&&(console[_0x107ae4(0xbb)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x107ae4(0xbb)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x47b75a[_0x107ae4(0xb9)](_0xb9b7be=>_0xb9b7be[_0x107ae4(0x70)])['join'](',\x20')+')'));}console['log']('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2f1267,_0xe670ab){const _0xc3f6e5=_0x37a6,_0x5b2f1d=_0x2f1267();while(!![]){try{const _0x5bd3c4=-parseInt(_0xc3f6e5(0x1d0))/0x1+parseInt(_0xc3f6e5(0x1d8))/0x2*(-parseInt(_0xc3f6e5(0x1fb))/0x3)+-parseInt(_0xc3f6e5(0x1ea))/0x4*(-parseInt(_0xc3f6e5(0x1fa))/0x5)+-parseInt(_0xc3f6e5(0x1f5))/0x6*(-parseInt(_0xc3f6e5(0x1f8))/0x7)+parseInt(_0xc3f6e5(0x1e4))/0x8+parseInt(_0xc3f6e5(0x1e2))/0x9+parseInt(_0xc3f6e5(0x1f2))/0xa;if(_0x5bd3c4===_0xe670ab)break;else _0x5b2f1d['push'](_0x5b2f1d['shift']());}catch(_0x65cd5){_0x5b2f1d['push'](_0x5b2f1d['shift']());}}}(_0x7dcc,0x63c28));import{spawn}from'child_process';function _0x7dcc(){const _0x30204b=['wNdKI','utf-8','opencode','UsIJO','inherit','TKrHc','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','active-profile.txt','length','findIndex','push','error','TdZuI','trailhead','\x0aYour\x20version\x20(','sJBag','trim','splice','afWdE','360147OKfvbb','\x20\x20Failed\x20to\x20reinstall\x20','\x0aSuccessfully\x20installed\x20latest\x20version.','\x0aInstalling\x20','CPYNh','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ranger@trailhead','6BgkqIh','update','pipe','install','GBrPl','yadhG','plcrO','@latest...\x0a','hYqwl','--scope','3406320SVGJjp','SjdvC','3453920ZzKVPH','.gitignore','lnKCx','Uqvkc','OvUCF','win32','1820CrsUIe','endsWith','SVlkE','Update\x20failed.','Attempting\x20install\x20anyway...','claude','PLhRC','project','1515620FBTrQR','YDbhH','close','267882uBuATN','join','warn','35UFNLgO','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','4145DwybSf','793449obiEjO','PnPlN','log','hLCVe','Update\x20failed:\x20','DAcoe'];_0x7dcc=function(){return _0x30204b;};return _0x7dcc();}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x37a6(_0x5a492c,_0x363d00){_0x5a492c=_0x5a492c-0x1c6;const _0x7dcce3=_0x7dcc();let _0x37a64c=_0x7dcce3[_0x5a492c];return _0x37a64c;}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x4a8373=_0x37a6,_0x5cc5e1={'wNdKI':function(_0xd3f483,_0xe723f6){return _0xd3f483(_0xe723f6);},'SVlkE':'npm','Uqvkc':_0x4a8373(0x1f4)};return new Promise(_0x11bbff=>{const _0x217e62=_0x4a8373;console['log'](_0x217e62(0x1d3)+PACKAGE_NAME+_0x217e62(0x1df));const _0x416b05=spawn(_0x5cc5e1[_0x217e62(0x1ec)],[_0x217e62(0x1db),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x217e62(0x205),'shell':process['platform']===_0x217e62(0x1e9)});_0x416b05['on'](_0x5cc5e1[_0x217e62(0x1e7)],_0x2af172=>{_0x11bbff(_0x2af172===0x0);}),_0x416b05['on'](_0x217e62(0x1c8),()=>{const _0x1c42cc=_0x217e62;_0x5cc5e1[_0x1c42cc(0x201)](_0x11bbff,![]);});});}async function updateClaudeMarketplace(){const _0x1f0880=_0x37a6,_0x55336d={'YjnGR':function(_0x2c5ccb,_0x49d47a,_0x54d214,_0x538f70){return _0x2c5ccb(_0x49d47a,_0x54d214,_0x538f70);},'uXhFY':_0x1f0880(0x1d9),'NBUvg':function(_0x132e60,_0x1a669d){return _0x132e60===_0x1a669d;},'TKrHc':'close'};return new Promise(_0x37b685=>{const _0x55a557=_0x1f0880,_0x381351=_0x55336d['YjnGR'](spawn,_0x55a557(0x1ef),['plugin','marketplace',_0x55336d['uXhFY'],_0x55a557(0x1ca)],{'stdio':'pipe','shell':_0x55336d['NBUvg'](process['platform'],_0x55a557(0x1e9))});_0x381351['on'](_0x55336d[_0x55a557(0x206)],_0x470da8=>{_0x37b685(_0x470da8===0x0);}),_0x381351['on']('error',()=>{_0x37b685(![]);});});}async function updateClaudePlugin(_0xfc1f15){const _0x4de75e={'mxwyH':'plugin','TdZuI':'update'};return new Promise(_0x357ae7=>{const _0x1121ed=_0x37a6,_0x2c73d9={'beDrH':function(_0x5ddbb5,_0x285393){return _0x5ddbb5(_0x285393);},'plcrO':function(_0x49c4aa,_0x4c3d4c){return _0x49c4aa===_0x4c3d4c;}},_0x294f2a=[_0x4de75e['mxwyH'],_0x4de75e[_0x1121ed(0x1c9)],_0x1121ed(0x1d7)];_0xfc1f15&&_0x294f2a[_0x1121ed(0x1c7)](_0x1121ed(0x1e1),_0xfc1f15);const _0x273be7=spawn(_0x1121ed(0x1ef),_0x294f2a,{'stdio':_0x1121ed(0x1da),'shell':process['platform']===_0x1121ed(0x1e9)});_0x273be7['on'](_0x1121ed(0x1f4),_0x32c159=>{const _0x3994cd=_0x1121ed;_0x2c73d9['beDrH'](_0x357ae7,_0x2c73d9[_0x3994cd(0x1de)](_0x32c159,0x0));}),_0x273be7['on'](_0x1121ed(0x1c8),()=>{_0x357ae7(![]);});});}function isSkillInstalled(_0x33801b,_0x52df1b,_0x5247f1){const _0x139e94=_0x37a6,_0x3e9b41={'cqspO':function(_0x30bd96,_0xb080df){return _0x30bd96===_0xb080df;},'bkXXL':_0x139e94(0x203),'OvUCF':function(_0x40ef18,_0x3406c2){return _0x40ef18(_0x3406c2);},'KKxRE':function(_0x2942ba,_0x44ac6f){return _0x2942ba(_0x44ac6f);},'qFODT':function(_0xf0b61d,_0x2612db,_0x3afb10){return _0xf0b61d(_0x2612db,_0x3afb10);},'YDbhH':function(_0x3e2ecc,_0x3e4629){return _0x3e2ecc(_0x3e4629);}},_0x17978c=_0x3e9b41['cqspO'](_0x5247f1,_0x3e9b41['bkXXL'])?_0x3e9b41[_0x139e94(0x1e8)](getOpencodeSkillsDir,_0x52df1b):_0x3e9b41['KKxRE'](getSkillsDir,_0x52df1b),_0x7bee16=_0x3e9b41['qFODT'](join,_0x17978c,_0x33801b);return _0x3e9b41[_0x139e94(0x1f3)](existsSync,_0x7bee16);}async function reinstallSkills(_0x49e47e){const _0x481379=_0x37a6,_0x83384c={'sdWFb':'project','TajbV':'user','GBrPl':_0x481379(0x1ef),'sJBag':function(_0x20fc59,_0x16c4f2,_0x2204c6){return _0x20fc59(_0x16c4f2,_0x2204c6);}},_0x1270b6=[_0x83384c['sdWFb'],_0x83384c['TajbV']],_0x4292e5=[];for(const _0xba38ea of _0x1270b6){for(const _0x3469ce of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x3469ce,_0xba38ea,_0x83384c[_0x481379(0x1dc)])&&_0x4292e5['push']({'skillName':_0x3469ce,'level':_0xba38ea,'platform':_0x481379(0x1ef)}),isSkillInstalled(_0x3469ce,_0xba38ea,'opencode')&&_0x4292e5['push']({'skillName':_0x3469ce,'level':_0xba38ea,'platform':'opencode'});}}for(const _0xa2c86c of _0x1270b6){for(const _0x133416 of DEPRECATED_SKILLS){await _0x83384c[_0x481379(0x1cc)](removeSkill,_0x133416,_0xa2c86c);}}if(_0x4292e5[_0x481379(0x209)]===0x0){console['log'](_0x481379(0x207));return;}console['log']('\x0aReinstalling\x20'+_0x4292e5[_0x481379(0x209)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x595481,level:_0x7c218a,platform:_0x262651}of _0x4292e5){try{await installSkill(_0x595481,{'level':_0x7c218a,'cliVersion':_0x49e47e,'platform':_0x262651});}catch(_0x47b464){console[_0x481379(0x1f7)](_0x481379(0x1d1)+_0x262651+'\x20'+_0x7c218a+'\x20skill\x20'+_0x595481+':',_0x47b464);}}}async function ensureActiveProfileGitignored(){const _0x183c8a=_0x37a6,_0x25ccfb={'SjdvC':function(_0x7183ef,_0xbfb83c,_0x329c93){return _0x7183ef(_0xbfb83c,_0x329c93);},'qKQgv':function(_0x1257a0){return _0x1257a0();},'HIIXi':_0x183c8a(0x1e5),'UWUYu':function(_0x77852d,_0x58533c,_0x16cf25){return _0x77852d(_0x58533c,_0x16cf25);},'PLhRC':_0x183c8a(0x202),'FlQXO':function(_0xa76d88,_0x3c3fa7,_0xd01ce0,_0xc13dec){return _0xa76d88(_0x3c3fa7,_0xd01ce0,_0xc13dec);}},_0x5924a8=_0x25ccfb[_0x183c8a(0x1e3)](join,_0x25ccfb['qKQgv'](getRangerDir),_0x25ccfb['HIIXi']);if(!existsSync(_0x5924a8))return![];let _0x474173='';try{_0x474173=await _0x25ccfb['UWUYu'](readFile,_0x5924a8,_0x25ccfb[_0x183c8a(0x1f0)]);}catch{return![];}const _0x2da503=_0x474173['split'](/\r?\n/);if(_0x2da503['some'](_0x4b8383=>_0x4b8383[_0x183c8a(0x1cd)]()===_0x183c8a(0x208)))return![];let _0xd37106=_0x2da503[_0x183c8a(0x1c6)](_0x1d5a66=>_0x1d5a66[_0x183c8a(0x1cd)]()==='active-feature.txt');_0xd37106===-0x1&&(_0xd37106=_0x2da503['length']);_0x2da503[_0x183c8a(0x1ce)](_0xd37106,0x0,'active-profile.txt');let _0x14e77c=_0x2da503[_0x183c8a(0x1f6)]('\x0a');!_0x14e77c[_0x183c8a(0x1eb)]('\x0a')&&(_0x14e77c+='\x0a');try{await _0x25ccfb['FlQXO'](writeFile,_0x5924a8,_0x14e77c,_0x25ccfb['PLhRC']);}catch{return![];}return!![];}export async function update(){const _0x59b2b3=_0x37a6,_0x336f69={'PnPlN':_0x59b2b3(0x1ee),'hYqwl':_0x59b2b3(0x1d2),'JXEJL':function(_0x3c332d){return _0x3c332d();},'CGgHe':function(_0x2194fa,_0x1e03a1){return _0x2194fa===_0x1e03a1;},'yadhG':_0x59b2b3(0x1f9),'UsIJO':function(_0x41bd9a){return _0x41bd9a();},'lnKCx':_0x59b2b3(0x1ed),'hLCVe':function(_0x5b6341,_0x64e0f1){return _0x5b6341(_0x64e0f1);},'rwlfS':'trailhead','CPYNh':_0x59b2b3(0x1d5),'Gcxbw':_0x59b2b3(0x1d6),'afWdE':_0x59b2b3(0x1f1),'DAcoe':'✓\x20Migrated\x20active\x20profile\x20file'},_0x48014e=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x48014e),console['log']('Checking\x20for\x20updates...');const _0x3de318=getLatestVersion();let _0x4c1e1d=_0x48014e;if(!_0x3de318['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x3de318[_0x59b2b3(0x1c8)]),console['log'](_0x336f69[_0x59b2b3(0x1fc)]);const _0x490f32=await runInstall();if(_0x490f32)console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1e0)]),_0x4c1e1d=_0x336f69['JXEJL'](getCurrentVersion);else throw new Error(_0x59b2b3(0x1ff)+_0x3de318['error']);}else{const _0x5742b1=_0x3de318['version'];console[_0x59b2b3(0x1fd)]('Latest\x20version:\x20\x20'+_0x5742b1);const _0x47e68d=compareVersions(_0x48014e,_0x5742b1);if(_0x336f69['CGgHe'](_0x47e68d,0x0))console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1dd)]);else{if(_0x47e68d<0x0)console['log'](_0x59b2b3(0x1cb)+_0x48014e+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x5742b1+').');else{const _0x5e3d42=await _0x336f69['UsIJO'](runInstall);if(_0x5e3d42)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x5742b1),_0x4c1e1d=_0x5742b1;else throw new Error(_0x336f69[_0x59b2b3(0x1e6)]);}}}await _0x336f69['hLCVe'](reinstallSkills,_0x4c1e1d);const _0x374f36=await _0x336f69[_0x59b2b3(0x1fe)](isMarketplaceAdded,_0x336f69['rwlfS']),_0x267fbd=await isPluginInstalled('ranger@trailhead');if(_0x374f36){const _0x1035fc=await _0x336f69[_0x59b2b3(0x204)](updateClaudeMarketplace);_0x1035fc&&console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1d4)]);}if(_0x267fbd){const _0x383393=await updateClaudePlugin();_0x383393&&console['log'](_0x336f69['Gcxbw']);const _0x1faa33=await updateClaudePlugin(_0x336f69[_0x59b2b3(0x1cf)]);_0x1faa33&&console[_0x59b2b3(0x1fd)]((_0x383393?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x84f70d=await migrateActiveProfileFile();_0x84f70d&&console['log'](_0x336f69[_0x59b2b3(0x200)]);const _0x55a471=await ensureActiveProfileGitignored();console['log']('\x0a✅\x20Update\x20complete!');}
|
|
1
|
+
(function(_0x4775d3,_0x1d92cf){const _0x3f1f96=_0x542e,_0x276ea1=_0x4775d3();while(!![]){try{const _0x4c5c9a=-parseInt(_0x3f1f96(0x1ed))/0x1+parseInt(_0x3f1f96(0x1ea))/0x2+-parseInt(_0x3f1f96(0x221))/0x3*(-parseInt(_0x3f1f96(0x209))/0x4)+parseInt(_0x3f1f96(0x1e4))/0x5+parseInt(_0x3f1f96(0x1e5))/0x6*(-parseInt(_0x3f1f96(0x1fb))/0x7)+parseInt(_0x3f1f96(0x219))/0x8+-parseInt(_0x3f1f96(0x217))/0x9;if(_0x4c5c9a===_0x1d92cf)break;else _0x276ea1['push'](_0x276ea1['shift']());}catch(_0x13772d){_0x276ea1['push'](_0x276ea1['shift']());}}}(_0x261a,0xc0f5a));import{spawn}from'child_process';import{existsSync}from'fs';function _0x542e(_0xb76042,_0x552d25){_0xb76042=_0xb76042-0x1e4;const _0x261a07=_0x261a();let _0x542e47=_0x261a07[_0xb76042];return _0x542e47;}import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x5be9f1=_0x542e,_0x3648f8={'QuNyp':'install','YmMnj':_0x5be9f1(0x1ef),'NKDmH':function(_0x19bf90,_0x2914b2){return _0x19bf90===_0x2914b2;}};return new Promise(_0x3c15b3=>{const _0x5eb05=_0x5be9f1;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+_0x5eb05(0x21c));const _0x479efb=spawn(_0x5eb05(0x1eb),[_0x3648f8[_0x5eb05(0x1f3)],'-g',PACKAGE_NAME+_0x5eb05(0x205)],{'stdio':_0x3648f8['YmMnj'],'shell':_0x3648f8[_0x5eb05(0x1fd)](process['platform'],'win32')});_0x479efb['on']('close',_0x4110b2=>{_0x3c15b3(_0x4110b2===0x0);}),_0x479efb['on'](_0x5eb05(0x21e),()=>{_0x3c15b3(![]);});});}async function updateClaudeMarketplace(){const _0x58f016=_0x542e,_0x592881={'NYYhr':function(_0xe90593,_0x121e98,_0x48f962,_0x20f8fb){return _0xe90593(_0x121e98,_0x48f962,_0x20f8fb);},'MJEsx':_0x58f016(0x215),'eolKh':'update','GCGzy':'trailhead','bvQvy':'close','VyQon':'error'};return new Promise(_0x13bc52=>{const _0x1049c5=_0x58f016,_0x19d4d7={'eYyGp':function(_0x5afa06,_0x33029e){return _0x5afa06(_0x33029e);}},_0x41bd5b=_0x592881['NYYhr'](spawn,'claude',['plugin',_0x592881['MJEsx'],_0x592881[_0x1049c5(0x1f6)],_0x592881['GCGzy']],{'stdio':_0x1049c5(0x1ee),'shell':process[_0x1049c5(0x202)]==='win32'});_0x41bd5b['on'](_0x592881[_0x1049c5(0x212)],_0x954e3b=>{_0x13bc52(_0x954e3b===0x0);}),_0x41bd5b['on'](_0x592881['VyQon'],()=>{_0x19d4d7['eYyGp'](_0x13bc52,![]);});});}async function updateClaudePlugin(_0x3a9442){const _0x2fb82c=_0x542e,_0x3a7e72={'tzxYy':function(_0x5929f9,_0x4448e1){return _0x5929f9(_0x4448e1);},'eIekH':_0x2fb82c(0x21d),'LNXjq':'claude','YZPQa':'pipe','gtTlS':function(_0x66342,_0x1d1e5e){return _0x66342===_0x1d1e5e;},'KCQyy':_0x2fb82c(0x216),'GjnoO':'close'};return new Promise(_0x1584b9=>{const _0xdf272c=_0x2fb82c,_0x1b807e={'byfEV':function(_0x2e23b1,_0x39c33f){return _0x3a7e72['tzxYy'](_0x2e23b1,_0x39c33f);},'AdUVI':function(_0x1175d6,_0x13f41e){return _0x1175d6===_0x13f41e;}},_0x22a9a8=[_0x3a7e72['eIekH'],'update','ranger@trailhead'];_0x3a9442&&_0x22a9a8['push']('--scope',_0x3a9442);const _0x54025e=spawn(_0x3a7e72[_0xdf272c(0x20f)],_0x22a9a8,{'stdio':_0x3a7e72['YZPQa'],'shell':_0x3a7e72[_0xdf272c(0x1f5)](process['platform'],_0x3a7e72['KCQyy'])});_0x54025e['on'](_0x3a7e72[_0xdf272c(0x1fa)],_0x182f9b=>{const _0x32582c=_0xdf272c;_0x1b807e['byfEV'](_0x1584b9,_0x1b807e[_0x32582c(0x204)](_0x182f9b,0x0));}),_0x54025e['on'](_0xdf272c(0x21e),()=>{_0x1584b9(![]);});});}function isSkillInstalled(_0x594b77,_0x4f4306,_0x3e784d){const _0x211505=_0x542e,_0x1730de={'mnhxq':_0x211505(0x20d),'bfqYx':function(_0x5b3d9f,_0x292155){return _0x5b3d9f(_0x292155);},'KQsHg':function(_0x35a0bf,_0x597b54){return _0x35a0bf(_0x597b54);}},_0x519a60=_0x3e784d===_0x1730de[_0x211505(0x1f8)]?_0x1730de['bfqYx'](getOpencodeSkillsDir,_0x4f4306):_0x1730de['KQsHg'](getSkillsDir,_0x4f4306),_0x430232=join(_0x519a60,_0x594b77);return existsSync(_0x430232);}function _0x261a(){const _0x812d82=['Jawzf','24412WkEweW','npm','push','175417bMnJYc','pipe','inherit','VnXGq','\x0aCould\x20not\x20check\x20latest\x20version:\x20','atOZD','QuNyp','WasAb','gtTlS','eolKh','\x0aCurrent\x20version:\x20','mnhxq','\x0a✅\x20Update\x20complete!','GjnoO','4067HXVDnD','KRVAp','NKDmH','Attempting\x20install\x20anyway...','\x0aReinstalling\x20','join','pVaPT','platform','user','AdUVI','@latest','warn','.gitignore','Latest\x20version:\x20\x20','4IktVDk','Update\x20failed:\x20','endsWith','utf-8','opencode','ranger@trailhead','LNXjq','claude','version','bvQvy','log','trailhead','marketplace','win32','21307086sAXUiG',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','7521520aZINmU','imgep','active-profile.txt','@latest...\x0a','plugin','error','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','splice','4480869JBPvew','active-feature.txt','6858840lPMfVD','5004QkdDjY','LDHZy','xOcXo','length'];_0x261a=function(){return _0x812d82;};return _0x261a();}async function reinstallSkills(_0x13cda8){const _0x136f2e=_0x542e,_0x18067b={'HEHRj':_0x136f2e(0x203),'KvqWd':function(_0x383fd9,_0x1152b4,_0x2c22c9,_0x55e470){return _0x383fd9(_0x1152b4,_0x2c22c9,_0x55e470);},'ToyjB':function(_0x27717c,_0x385df3,_0x4c61bf,_0x412627){return _0x27717c(_0x385df3,_0x4c61bf,_0x412627);},'atOZD':_0x136f2e(0x20d),'imgep':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x3f3319=['project',_0x18067b['HEHRj']],_0xed7d92=[];for(const _0x59947a of _0x3f3319){for(const _0x567e8e of RANGER_MANAGED_SKILLS){_0x18067b['KvqWd'](isSkillInstalled,_0x567e8e,_0x59947a,_0x136f2e(0x210))&&_0xed7d92['push']({'skillName':_0x567e8e,'level':_0x59947a,'platform':'claude'}),_0x18067b['ToyjB'](isSkillInstalled,_0x567e8e,_0x59947a,'opencode')&&_0xed7d92[_0x136f2e(0x1ec)]({'skillName':_0x567e8e,'level':_0x59947a,'platform':_0x18067b[_0x136f2e(0x1f2)]});}}for(const _0x22da76 of _0x3f3319){for(const _0x550a3f of DEPRECATED_SKILLS){await removeSkill(_0x550a3f,_0x22da76);}}if(_0xed7d92[_0x136f2e(0x1e8)]===0x0){console['log'](_0x18067b[_0x136f2e(0x21a)]);return;}console['log'](_0x136f2e(0x1ff)+_0xed7d92[_0x136f2e(0x1e8)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x4660d7,level:_0x34ad98,platform:_0x18df05}of _0xed7d92){try{await installSkill(_0x4660d7,{'level':_0x34ad98,'cliVersion':_0x13cda8,'platform':_0x18df05});}catch(_0x3e2474){console[_0x136f2e(0x206)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x18df05+'\x20'+_0x34ad98+'\x20skill\x20'+_0x4660d7+':',_0x3e2474);}}}async function ensureActiveProfileGitignored(){const _0x59b256=_0x542e,_0x16f107={'kweDw':_0x59b256(0x207),'oXOdr':_0x59b256(0x21b),'xOcXo':function(_0x5587e0,_0xa0664,_0x2addb2,_0x191824){return _0x5587e0(_0xa0664,_0x2addb2,_0x191824);}},_0x58c370=join(getRangerDir(),_0x16f107['kweDw']);if(!existsSync(_0x58c370))return![];let _0x133463='';try{_0x133463=await readFile(_0x58c370,'utf-8');}catch{return![];}const _0xac4496=_0x133463['split'](/\r?\n/);if(_0xac4496['some'](_0x18dc79=>_0x18dc79['trim']()==='active-profile.txt'))return![];let _0x503b0f=_0xac4496['findIndex'](_0xccd524=>_0xccd524['trim']()===_0x59b256(0x222));_0x503b0f===-0x1&&(_0x503b0f=_0xac4496['length']);_0xac4496[_0x59b256(0x220)](_0x503b0f,0x0,_0x16f107['oXOdr']);let _0x3cb4fe=_0xac4496[_0x59b256(0x200)]('\x0a');!_0x3cb4fe[_0x59b256(0x20b)]('\x0a')&&(_0x3cb4fe+='\x0a');try{await _0x16f107[_0x59b256(0x1e7)](writeFile,_0x58c370,_0x3cb4fe,_0x59b256(0x20c));}catch{return![];}return!![];}export async function update(){const _0x2b382c=_0x542e,_0xe04787={'KRVAp':function(_0x56f322){return _0x56f322();},'VnXGq':function(_0x3a4475){return _0x3a4475();},'dnuAm':_0x2b382c(0x1fe),'LDHZy':'\x0aSuccessfully\x20installed\x20latest\x20version.','pVaPT':function(_0x470627,_0x1bc254){return _0x470627<_0x1bc254;},'TDgzY':function(_0x2ca984,_0xf13b9c){return _0x2ca984(_0xf13b9c);},'Jawzf':_0x2b382c(0x214),'xrCWE':function(_0x2901e0,_0xb65def){return _0x2901e0(_0xb65def);},'kpoyR':_0x2b382c(0x21f),'WasAb':_0x2b382c(0x1f9)},_0x12fb64=_0xe04787[_0x2b382c(0x1fc)](getCurrentVersion);console[_0x2b382c(0x213)](_0x2b382c(0x1f7)+_0x12fb64),console[_0x2b382c(0x213)]('Checking\x20for\x20updates...');const _0xa4ff8a=_0xe04787[_0x2b382c(0x1f0)](getLatestVersion);let _0x32318f=_0x12fb64;if(!_0xa4ff8a['version']){console['warn'](_0x2b382c(0x1f1)+_0xa4ff8a[_0x2b382c(0x21e)]),console['log'](_0xe04787['dnuAm']);const _0x518b5e=await _0xe04787[_0x2b382c(0x1f0)](runInstall);if(_0x518b5e)console['log'](_0xe04787[_0x2b382c(0x1e6)]),_0x32318f=_0xe04787[_0x2b382c(0x1fc)](getCurrentVersion);else throw new Error(_0x2b382c(0x20a)+_0xa4ff8a['error']);}else{const _0x38053b=_0xa4ff8a[_0x2b382c(0x211)];console[_0x2b382c(0x213)](_0x2b382c(0x208)+_0x38053b);const _0x421c48=compareVersions(_0x12fb64,_0x38053b);if(_0x421c48===0x0)console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0xe04787[_0x2b382c(0x201)](_0x421c48,0x0))console['log']('\x0aYour\x20version\x20('+_0x12fb64+_0x2b382c(0x218)+_0x38053b+').');else{const _0x3729f4=await _0xe04787['KRVAp'](runInstall);if(_0x3729f4)console[_0x2b382c(0x213)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x38053b),_0x32318f=_0x38053b;else throw new Error('Update\x20failed.');}}}await reinstallSkills(_0x32318f);const _0x108cea=await _0xe04787['TDgzY'](isMarketplaceAdded,_0xe04787[_0x2b382c(0x1e9)]),_0x2084b2=await _0xe04787['xrCWE'](isPluginInstalled,_0x2b382c(0x20e));if(_0x108cea){const _0x6c7c6f=await updateClaudeMarketplace();_0x6c7c6f&&console[_0x2b382c(0x213)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x2084b2){const _0x2dd23d=await _0xe04787['VnXGq'](updateClaudePlugin);_0x2dd23d&&console['log'](_0xe04787['kpoyR']);const _0x5e765a=await updateClaudePlugin('project');_0x5e765a&&console['log']((_0x2dd23d?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x1f47b6=await migrateActiveProfileFile();_0x1f47b6&&console[_0x2b382c(0x213)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x5732ca=await ensureActiveProfileGitignored();console[_0x2b382c(0x213)](_0xe04787[_0x2b382c(0x1f4)]);}
|