@ranger-testing/ranger-cli 2.2.2 → 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/README.md +3 -1
- 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
|
-
|
|
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(_0x5a4271,_0x802acb){const _0xf13b89=_0x3c84,_0x530cc2=_0x5a4271();while(!![]){try{const _0x300356=parseInt(_0xf13b89(0x1a9))/0x1+-parseInt(_0xf13b89(0x1be))/0x2+parseInt(_0xf13b89(0x1aa))/0x3+-parseInt(_0xf13b89(0x1c3))/0x4+parseInt(_0xf13b89(0x1c8))/0x5*(parseInt(_0xf13b89(0x1c4))/0x6)+parseInt(_0xf13b89(0x1a5))/0x7+parseInt(_0xf13b89(0x1cf))/0x8;if(_0x300356===_0x802acb)break;else _0x530cc2['push'](_0x530cc2['shift']());}catch(_0x39af47){_0x530cc2['push'](_0x530cc2['shift']());}}}(_0x1aab,0xb1689));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x3c84(_0x47cd04,_0x2b96d1){_0x47cd04=_0x47cd04-0x19e;const _0x1aabc1=_0x1aab();let _0x3c8445=_0x1aabc1[_0x47cd04];return _0x3c8445;}import{saveSettings}from'./utils/settings.js';function _0x1aab(){const _0x5ed877=['PwILE','install','ranger@trailhead','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','afdSb','add','zMrrR','BYxAr','join','eeElJ','auth.json','7320131pRLHXm','skills','AgGfl','ONOlI','301713LhTgtK','2833341JTqTZH','map','trackPhaseEnd','gwgJf','path','CI\x20profile\x20\x22','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','dir_setup','profile_activate','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','uGtgL','error','✓\x20Auth\x20state\x20found','length','fJTXv','log','Failed\x20to\x20add\x20marketplace:','UvcSf','\x22:\x20','VvzGe','2511222PkNIpr','trackPhaseStart','OdBTW','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','Multiple\x20CI\x20profiles\x20found:\x20','3928616oubyMC','2364ZZCOxL','baseUrl','BMGdj','--scope','4270RbHvxX','KiOhT','zPTQx','jbqiJ','plugin','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','bSKmF','2688488LcIVph','name','project','tLWeL','message','WLqnW','isDirectory','QjawN','success','filter','azaXB','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)'];_0x1aab=function(){return _0x5ed877;};return _0x1aab();}import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x208280){const _0x1c74f4=_0x3c84,_0x10c3fd={'UvcSf':function(_0x3f0acb,_0x5cc943,_0x9ea2f6){return _0x3f0acb(_0x5cc943,_0x9ea2f6);},'AuqYr':function(_0xc37f85,_0x1569d9){return _0xc37f85(_0x1569d9);},'uGtgL':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','BYxAr':_0x1c74f4(0x1b0)},_0x47fe64=getRangerDir(),_0x24e258=join(_0x47fe64,'ci');if(_0x208280){const _0x3fb314=_0x10c3fd[_0x1c74f4(0x1bb)](join,_0x24e258,_0x208280);return{'name':_0x208280,'path':_0x3fb314};}if(!_0x10c3fd['AuqYr'](existsSync,_0x24e258))throw new Error(_0x10c3fd[_0x1c74f4(0x1b4)]+_0x10c3fd[_0x1c74f4(0x1a1)]);const _0x25fadb=await readdir(_0x24e258,{'withFileTypes':!![]}),_0x250504=_0x25fadb[_0x1c74f4(0x1d8)](_0x1a08e3=>_0x1a08e3[_0x1c74f4(0x1d5)]())[_0x1c74f4(0x1ab)](_0xbc10ec=>_0xbc10ec['name']);if(_0x250504[_0x1c74f4(0x1b7)]===0x0)throw new Error('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x10c3fd[_0x1c74f4(0x1a1)]);if(_0x250504['length']===0x1){const _0x4e5901=_0x250504[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x4e5901),{'name':_0x4e5901,'path':join(_0x24e258,_0x4e5901)};}throw new Error(_0x1c74f4(0x1c2)+_0x250504[_0x1c74f4(0x1a2)](',\x20')+_0x1c74f4(0x1de));}async function installPluginNonInteractive(){const _0x353ad4=_0x3c84,_0x5c6250={'zPTQx':function(_0x4a21f2,_0x28c2a6){return _0x4a21f2(_0x28c2a6);},'OdBTW':'✓\x20Marketplace\x20already\x20added','ONOlI':'marketplace','QjawN':_0x353ad4(0x19f),'tLWeL':'ranger-testing/trailhead','OCvej':_0x353ad4(0x1ba)},_0x3e53b2=await isPluginInstalled(_0x353ad4(0x1dd));if(_0x3e53b2)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x353ad4(0x1b9)]('Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...');const _0x40100a=await _0x5c6250[_0x353ad4(0x1ca)](isMarketplaceAdded,'trailhead');let _0x1170f6=_0x40100a;if(_0x40100a)console['log'](_0x5c6250[_0x353ad4(0x1c0)]);else{const _0x410afe=await runClaudeCommand([_0x353ad4(0x1cc),_0x5c6250[_0x353ad4(0x1a8)],_0x5c6250[_0x353ad4(0x1d6)],_0x5c6250[_0x353ad4(0x1d2)]]);!_0x410afe['success']?(console[_0x353ad4(0x1b5)](_0x5c6250['OCvej'],_0x410afe['error']),console['log'](_0x353ad4(0x1b3))):_0x1170f6=!![];}if(_0x1170f6){const _0x403901=await runClaudeCommand(['plugin',_0x353ad4(0x1dc),_0x353ad4(0x1dd),_0x353ad4(0x1c7),'project']);!_0x403901[_0x353ad4(0x1d7)]?(console['error']('Failed\x20to\x20install\x20plugin:',_0x403901[_0x353ad4(0x1b5)]),console[_0x353ad4(0x1b9)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0xa86496,_0x50bc09,_0x3e9dca){const _0x513cb9=_0x3c84,_0x3b4dfc={'OeCSL':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','azaXB':'auth','afdSb':'dir_setup','AgGfl':function(_0xfabe01,_0x29c011){return _0xfabe01(_0x29c011);},'BBDXs':function(_0x273d53,_0x4846a4,_0x7ff8f8){return _0x273d53(_0x4846a4,_0x7ff8f8);},'KiOhT':'chromium','KGPLo':function(_0x4bc73a,_0x29678b){return _0x4bc73a(_0x29678b);},'HJfKo':'settings.json','fJTXv':function(_0x30d331,_0x29d783){return _0x30d331(_0x29d783);},'VvzGe':function(_0x3e3cfb,_0x23470d){return _0x3e3cfb(_0x23470d);},'zMrrR':'No\x20API\x20token\x20available\x20for\x20decryption','jbqiJ':function(_0x3d308c,_0x514fc3){return _0x3d308c(_0x514fc3);},'TLAkd':function(_0x39d801,_0x128701,_0x123c4a){return _0x39d801(_0x128701,_0x123c4a);},'eeElJ':_0x513cb9(0x1c1),'gwgJf':_0x513cb9(0x1b6),'WLqnW':function(_0x21d55b,_0x507ddd){return _0x21d55b(_0x507ddd);},'bSKmF':_0x513cb9(0x1b2),'PwILE':_0x513cb9(0x1cc),'CAcui':function(_0xca54a4,_0x45e86f){return _0xca54a4(_0x45e86f);},'BMGdj':'skills'};console[_0x513cb9(0x1b9)](_0x3b4dfc['OeCSL']),_0x3e9dca?.[_0x513cb9(0x1bf)](_0x3b4dfc[_0x513cb9(0x1d9)]),await authenticate(_0xa86496),_0x3e9dca?.[_0x513cb9(0x1ac)]('auth'),_0x3e9dca?.[_0x513cb9(0x1bf)](_0x3b4dfc[_0x513cb9(0x19e)]);const {path:_0x57afac,installed:_0x526b2d}=await ensureRangerDir();await writeRangerGitignore(_0x57afac);const _0x176b5d=join(_0x57afac,'sessions');!_0x3b4dfc[_0x513cb9(0x1a7)](existsSync,_0x176b5d)&&await _0x3b4dfc['BBDXs'](mkdir,_0x176b5d,{'recursive':!![]});_0x3e9dca?.['trackPhaseEnd'](_0x513cb9(0x1b1),{'installed':_0x526b2d}),_0x3e9dca?.['trackPhaseStart'](_0x3b4dfc[_0x513cb9(0x1c9)]);let _0xfd16d9=![];_0x50bc09?.['skipChromium']?console[_0x513cb9(0x1b9)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0xfd16d9=await ensureChromium();_0x3e9dca?.['trackPhaseEnd'](_0x3b4dfc[_0x513cb9(0x1c9)],{'installed':_0xfd16d9,'skipped':!!_0x50bc09?.['skipChromium']}),_0x3e9dca?.['trackPhaseStart']('profile_activate');const _0x7d5a1c=await _0x3b4dfc['KGPLo'](findCiProfile,_0x50bc09?.['profile']);let _0xfe5b67=![];_0x50bc09?.['baseUrl']&&(await mkdir(_0x7d5a1c['path'],{'recursive':!![]}),await saveSettings(_0x7d5a1c[_0x513cb9(0x1d0)],{'baseUrl':_0x50bc09['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x50bc09[_0x513cb9(0x1c5)]),_0xfe5b67=!![]);const _0x3ee336=join(_0x7d5a1c['path'],_0x3b4dfc['HJfKo']);if(!_0x3b4dfc['fJTXv'](existsSync,_0x3ee336)&&!_0xfe5b67)throw new Error(_0x513cb9(0x1af)+_0x7d5a1c[_0x513cb9(0x1d0)]+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x522a4e=join(_0x7d5a1c['path'],_0x513cb9(0x1a4)),_0x47e727=join(_0x7d5a1c[_0x513cb9(0x1ae)],'auth.json.enc'),_0x165435=_0x3b4dfc[_0x513cb9(0x1a7)](existsSync,_0x522a4e),_0x3c64f5=_0x3b4dfc[_0x513cb9(0x1bd)](existsSync,_0x47e727);if(_0x3c64f5)try{const _0x4f57ee=await getToken();if(!_0x4f57ee)throw new Error(_0x3b4dfc[_0x513cb9(0x1a0)]);const _0x234277=await _0x3b4dfc[_0x513cb9(0x1cb)](readFile,_0x47e727);_0x3b4dfc['TLAkd'](decrypt,_0x234277,_0x4f57ee),console[_0x513cb9(0x1b9)](_0x3b4dfc[_0x513cb9(0x1a3)]);}catch(_0x246167){const _0x2fe794=_0x246167 instanceof Error?_0x246167[_0x513cb9(0x1d3)]:_0x3b4dfc[_0x513cb9(0x1b8)](String,_0x246167);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x7d5a1c[_0x513cb9(0x1d0)]+_0x513cb9(0x1bc)+_0x2fe794);}else _0x165435?console[_0x513cb9(0x1b9)](_0x3b4dfc[_0x513cb9(0x1ad)]):console[_0x513cb9(0x1b9)](_0x513cb9(0x1da));await _0x3b4dfc[_0x513cb9(0x1d4)](writeActiveProfileName,_0x7d5a1c[_0x513cb9(0x1d0)]),console[_0x513cb9(0x1b9)]('✓\x20Active\x20profile:\x20'+_0x7d5a1c['name']),_0x3e9dca?.['trackPhaseEnd'](_0x3b4dfc[_0x513cb9(0x1ce)],{'profileName':_0x7d5a1c['name'],'hasAuth':_0x165435,'hasEncryptedAuth':_0x3c64f5,'createdSettings':_0xfe5b67}),_0x3e9dca?.['trackPhaseStart'](_0x3b4dfc[_0x513cb9(0x1db)]);const _0x26442c=await installPluginNonInteractive();_0x3e9dca?.[_0x513cb9(0x1ac)](_0x3b4dfc[_0x513cb9(0x1db)],{'installed':_0x26442c}),_0x3e9dca?.[_0x513cb9(0x1bf)](_0x513cb9(0x1a6)),await _0x3b4dfc['CAcui'](skillup,{'autoInstall':_0x513cb9(0x1d1)}),_0x3e9dca?.['trackPhaseEnd'](_0x3b4dfc[_0x513cb9(0x1c6)]),console[_0x513cb9(0x1b9)](_0x513cb9(0x1cd));}
|
|
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
|
-
const _0x71eea3=_0x5c1b;(function(_0x1f271b,_0x1120bc){const _0x58d69b=_0x5c1b,_0x35b9bb=_0x1f271b();while(!![]){try{const _0x281d35=parseInt(_0x58d69b(0x171))/0x1*(-parseInt(_0x58d69b(0x174))/0x2)+parseInt(_0x58d69b(0x168))/0x3+-parseInt(_0x58d69b(0x17a))/0x4*(parseInt(_0x58d69b(0x150))/0x5)+parseInt(_0x58d69b(0x165))/0x6+parseInt(_0x58d69b(0x16f))/0x7+-parseInt(_0x58d69b(0x13e))/0x8+parseInt(_0x58d69b(0x15d))/0x9*(parseInt(_0x58d69b(0x139))/0xa);if(_0x281d35===_0x1120bc)break;else _0x35b9bb['push'](_0x35b9bb['shift']());}catch(_0x1a9a7d){_0x35b9bb['push'](_0x35b9bb['shift']());}}}(_0x2ac9,0x37633));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x3e4f72 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';function _0x5c1b(_0x20c1d0,_0x2769b9){_0x20c1d0=_0x20c1d0-0x11c;const _0x2ac9bc=_0x2ac9();let _0x5c1bae=_0x2ac9bc[_0x20c1d0];return _0x5c1bae;}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=_0x17fbea=>'\x1b[1m'+_0x17fbea+_0x71eea3(0x17b);function getPlaywrightVersion(){const _0xe40a73=_0x71eea3,_0x17a9ab={'iTkxq':_0xe40a73(0x126)};try{const _0x142e16=require[_0xe40a73(0x14a)](_0x17a9ab[_0xe40a73(0x11f)]),_0x321280=require(_0x142e16);return _0x321280['version'];}catch{return null;}}function installChromiumBinary(_0x4bc58f){const _0x5efc50=_0x71eea3,_0x219ddc={'cWIuT':'install','AxJJh':'chromium','tmlZI':function(_0x3547b7,_0x4ba746){return _0x3547b7===_0x4ba746;},'bEhfr':'win32','GMiUB':_0x5efc50(0x183)};return new Promise((_0x542ba3,_0x37d4f8)=>{const _0x4c99ef=_0x5efc50,_0x1faa2a={'cNfOs':function(_0x362e5d,_0x4b0cc6){return _0x362e5d(_0x4b0cc6);},'UcCvi':function(_0x2a53ac,_0x22b6fc){return _0x2a53ac(_0x22b6fc);}},_0x2a4600=_0x4bc58f?[_0x4c99ef(0x169)+_0x4bc58f,_0x219ddc[_0x4c99ef(0x14d)],_0x219ddc[_0x4c99ef(0x137)]]:['playwright',_0x219ddc[_0x4c99ef(0x14d)],_0x219ddc[_0x4c99ef(0x137)]],_0x51004a=spawn(_0x4c99ef(0x166),_0x2a4600,{'stdio':'inherit','shell':_0x219ddc['tmlZI'](process['platform'],_0x219ddc['bEhfr'])});_0x51004a['on']('close',_0x40b049=>{const _0x55c666=_0x4c99ef;_0x40b049===0x0?_0x542ba3():_0x1faa2a['cNfOs'](_0x37d4f8,new Error(_0x55c666(0x177)+_0x40b049));}),_0x51004a['on'](_0x219ddc['GMiUB'],_0x45393b=>{_0x1faa2a['UcCvi'](_0x37d4f8,_0x45393b);});});}function _0x2ac9(){const _0x118f41=['vZDsK','2672316WFYIyT','npx','aaSnt','1163625KeXesk','playwright@','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','prompt','✓\x20.ranger/\x20directory\x20already\x20exists','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','ISxAH','2088877TOMsWU','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','3yEfzrk','\x20install\x20chromium','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','247414QNagWo','\x0aIn\x20Claude\x20Code,\x20run\x20','message','Installation\x20failed\x20with\x20exit\x20code\x20','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','PVBRO','3488onSFDx','\x1b[0m','fLXYA','GITHUB_ENV','trackPhaseStart','rTcpQ','confirm','nECJo','LuXeW','error','qgoSf','trackPhaseEnd','executablePath','user','QKVPu','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','organizationName','dgMNv','OlhjK','\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','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','iDeVd','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','provided_token','FeBEZ','iTkxq','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','opencode','local','newTk','stdout','scope','playwright/package.json','aDCRw','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','success','url','.gitignore','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','LnIeX','allowInsecureLocalhost','✓\x20Local\x20profile\x20already\x20exists','DkGNH','skills','log','\x20\x20npx\x20playwright@','uIgLC','iaKCv','AxJJh','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','10lCEpNG','skipChromium','FsVDp','FQmAO','device_auth','2884952AvqFvF','✓\x20Created\x20.ranger/.gitignore','\x0a⚠\x20Skipping\x20Chromium\x20installation.','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','✓\x20Created\x20.ranger/\x20directory','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','\x20\x20npx\x20playwright\x20install\x20chromium','stdin','/ranger:enable','IdWAB','The\x20required\x20version\x20(','JVeLH','resolve','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','ready','cWIuT',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','\x0a🚀\x20Ranger\x20Setup\x0a','1515vGLbjq','cHkFg','plugin','✓\x20Exported\x20credentials\x20for\x20CI','method','trackPhaseError','tfAsj','auth','git_check','Authentication\x20failed:\x20','chromium','bIHUM','ranger\x20profile\x20add\x20local','820359neQRuG','✓\x20Authenticated\x20to\x20','isTTY','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','use\x20until\x20the\x20session\x20expires.\x0a','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'];_0x2ac9=function(){return _0x118f41;};return _0x2ac9();}export async function authenticate(_0x2f1cd2){const _0x25e8b2=_0x71eea3,_0x38020c={'YBRkf':'existing_token','gjbED':function(_0x15cd64){return _0x15cd64();},'IdWAB':function(_0x594c97,_0x3776dc){return _0x594c97(_0x3776dc);},'syrMF':_0x25e8b2(0x13d),'Monfj':'Validating\x20API\x20token...','FeBEZ':_0x25e8b2(0x153),'aqHQv':'✓\x20Stored\x20credentials\x20locally'};if(!_0x2f1cd2){const _0x4405ad=await getToken();if(_0x4405ad){const _0x14995e=await getCurrentUser(_0x4405ad);if(_0x14995e[_0x25e8b2(0x12a)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x14995e[_0x25e8b2(0x187)][_0x25e8b2(0x18a)]),{'token':_0x4405ad,'method':_0x38020c['YBRkf']};}try{_0x2f1cd2=await _0x38020c['gjbED'](runDeviceAuthFlow);}catch(_0x27f6e2){throw new Error(_0x25e8b2(0x159)+(_0x27f6e2 instanceof Error?_0x27f6e2['message']:_0x27f6e2));}const _0x3957f4=await _0x38020c[_0x25e8b2(0x147)](getCurrentUser,_0x2f1cd2);if(!_0x3957f4[_0x25e8b2(0x12a)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3957f4[_0x25e8b2(0x183)]);return console[_0x25e8b2(0x133)]('✓\x20Authenticated\x20to\x20'+_0x3957f4['user'][_0x25e8b2(0x18a)]),{'token':_0x2f1cd2,'method':_0x38020c['syrMF']};}console[_0x25e8b2(0x133)](_0x38020c['Monfj']);const _0x331e21=await getCurrentUser(_0x2f1cd2);if(!_0x331e21['success']){if(_0x331e21['status'])throw new Error('Authentication\x20failed:\x20'+_0x331e21['error']+_0x25e8b2(0x120));else throw new Error(_0x25e8b2(0x189)+_0x331e21['error']+_0x25e8b2(0x12d));}return console['log'](_0x25e8b2(0x15e)+_0x331e21['user'][_0x25e8b2(0x18a)]),await _0x38020c['IdWAB'](storeToken,_0x2f1cd2),console[_0x25e8b2(0x133)](process['env'][_0x25e8b2(0x17d)]?_0x38020c[_0x25e8b2(0x11e)]:_0x38020c['aqHQv']),{'token':_0x2f1cd2,'method':_0x25e8b2(0x11d)};}export async function ensureRangerDir(){const _0xcfa878=_0x71eea3,_0x2acc22={'PVBRO':function(_0x181fab,_0x588885,_0x361160){return _0x181fab(_0x588885,_0x361160);},'fLXYA':'.ranger','LnIeX':function(_0x13f273){return _0x13f273();},'aaSnt':function(_0x1d4878,_0xe6fa3d){return _0x1d4878(_0xe6fa3d);}},_0x20c13b=findGitRoot(),_0x4ff820=_0x20c13b?_0x2acc22[_0xcfa878(0x179)](join,_0x20c13b,_0x2acc22[_0xcfa878(0x17c)]):_0x2acc22[_0xcfa878(0x12e)](getRangerDir);return!_0x2acc22[_0xcfa878(0x167)](existsSync,_0x4ff820)?(await mkdir(_0x4ff820,{'recursive':!![]}),console[_0xcfa878(0x133)](_0xcfa878(0x142)),{'path':_0x4ff820,'installed':!![]}):(console[_0xcfa878(0x133)](_0xcfa878(0x16c)),{'path':_0x4ff820,'installed':![]});}export async function ensureChromium(){const _0x3e8fb9=_0x71eea3,_0x9bbb0c={'vZDsK':'✓\x20Playwright\x20Chromium\x20browser\x20found','DkGNH':_0x3e8fb9(0x18e),'rTcpQ':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:'};let _0x83dd19=![];try{const _0x2f6556=chromium[_0x3e8fb9(0x186)]();_0x83dd19=existsSync(_0x2f6556);}catch{_0x83dd19=![];}if(_0x83dd19)return console['log'](_0x9bbb0c[_0x3e8fb9(0x164)]),![];const _0x416986=getPlaywrightVersion(),_0x50aee1=process['stdin']['isTTY']&&process[_0x3e8fb9(0x124)]['isTTY'];let _0x34080a=!![];if(_0x50aee1){const {install:_0x5ca53d}=await _0x3e4f72['prompt']([{'type':'confirm','name':'install','message':_0x416986?_0x3e8fb9(0x148)+_0x416986+_0x3e8fb9(0x14e):'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x34080a=_0x5ca53d;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x416986?'\x20'+_0x416986:'')+'...');if(_0x34080a){console[_0x3e8fb9(0x133)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x416986),console['log'](_0x9bbb0c[_0x3e8fb9(0x131)]);}catch(_0x16ffe8){console['error'](_0x9bbb0c[_0x3e8fb9(0x17f)],_0x16ffe8 instanceof Error?_0x16ffe8[_0x3e8fb9(0x176)]:_0x16ffe8),console[_0x3e8fb9(0x133)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x416986?console[_0x3e8fb9(0x133)]('\x20\x20npx\x20playwright@'+_0x416986+_0x3e8fb9(0x172)):console['log'](_0x3e8fb9(0x144));}}else console[_0x3e8fb9(0x133)](_0x3e8fb9(0x140)),console[_0x3e8fb9(0x133)](_0x3e8fb9(0x170)),_0x416986?console['log'](_0x3e8fb9(0x134)+_0x416986+_0x3e8fb9(0x172)):console[_0x3e8fb9(0x133)](_0x3e8fb9(0x144));return!![];}export async function writeRangerGitignore(_0x1841c5){const _0x4a37ea=_0x71eea3,_0x8f204f={'boVUQ':function(_0x20dbc5,_0x923d11,_0x3bc949){return _0x20dbc5(_0x923d11,_0x3bc949);}},_0x31a198=_0x8f204f['boVUQ'](join,_0x1841c5,_0x4a37ea(0x12c)),_0x53459a=_0x4a37ea(0x18d);await _0x8f204f['boVUQ'](writeFile,_0x31a198,_0x53459a),console[_0x4a37ea(0x133)](_0x4a37ea(0x13f));}function printProfileSetupLaterInstructions(){const _0x1e21e7=_0x71eea3,_0x2cb56d={'UVBAP':function(_0x374aaf,_0x4d6c28){return _0x374aaf(_0x4d6c28);},'LuXeW':'Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a'};console[_0x1e21e7(0x133)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x2cb56d['UVBAP'](bold,_0x1e21e7(0x15c))),console['log'](_0x2cb56d[_0x1e21e7(0x182)]);}async function ensureLocalEnv(_0x52d278,_0xb69b23){const _0x4db52b=_0x71eea3,_0x1270e5={'BsKQa':function(_0x113683){return _0x113683();},'JVeLH':function(_0x3c50d0,_0x428947,_0x5a1e3c){return _0x3c50d0(_0x428947,_0x5a1e3c);},'bIHUM':'local','NBFvP':_0x4db52b(0x130),'nECJo':_0x4db52b(0x161),'vjDCK':_0x4db52b(0x128),'iaKCv':_0x4db52b(0x138),'blGXN':function(_0x540067){return _0x540067();},'QKVPu':function(_0x43db63,_0x2e8a88,_0x2ac49d,_0x128274){return _0x43db63(_0x2e8a88,_0x2ac49d,_0x128274);},'cqbRJ':function(_0xf7d10b,_0x13bb74){return _0xf7d10b instanceof _0x13bb74;}};if(!_0x1270e5['BsKQa'](findGitRoot))return console[_0x4db52b(0x133)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x1270e5[_0x4db52b(0x149)](findExistingEnv,_0x1270e5['bIHUM'],{'locations':[_0x1270e5[_0x4db52b(0x15b)]]}))return console[_0x4db52b(0x133)](_0x1270e5['NBFvP']),{'ready':!![],'skipped':![]};const _0xe23d8a=process['stdin'][_0x4db52b(0x15f)]&&process['stdout'][_0x4db52b(0x15f)];if(_0xe23d8a&&!_0x52d278?.[_0x4db52b(0x12b)]){console['log'](_0x1270e5[_0x4db52b(0x181)]),console['log']('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console[_0x4db52b(0x133)](_0x1270e5['vjDCK']),console['log'](_0x4db52b(0x162)),console[_0x4db52b(0x133)](_0x1270e5[_0x4db52b(0x136)]);const {wantsProfile:_0x17483d}=await _0x3e4f72[_0x4db52b(0x16b)]([{'type':_0x4db52b(0x180),'name':'wantsProfile','message':_0x4db52b(0x16d),'default':!![]}]);if(!_0x17483d)return _0x1270e5['blGXN'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x1270e5[_0x4db52b(0x188)](addEnv,_0x4db52b(0x122),{'url':_0x52d278?.['url'],'force':_0x52d278?.['force'],'allowInsecureLocalhost':_0x52d278?.[_0x4db52b(0x12f)]},_0xb69b23),{'ready':!![],'skipped':![]};}catch(_0x39088d){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x1270e5['cqbRJ'](_0x39088d,Error)?_0x39088d['message']:_0x39088d),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x1b493c,_0x1c8670,_0x3d5f12){const _0x54ae20=_0x71eea3,_0x3c5c78={'OlhjK':_0x54ae20(0x14f),'CudNy':_0x54ae20(0x163),'iDeVd':_0x54ae20(0x158),'aDCRw':function(_0x3a122d){return _0x3a122d();},'ISxAH':_0x54ae20(0x157),'dgMNv':function(_0x2d54fb,_0x28e411){return _0x2d54fb(_0x28e411);},'wZbJt':_0x54ae20(0x173),'VJOgq':_0x54ae20(0x15a),'uIgLC':_0x54ae20(0x11c),'newTk':'plugin','cHkFg':function(_0x53a82f,_0x855e12){return _0x53a82f&&_0x855e12;},'qgoSf':_0x54ae20(0x132),'gBTBt':function(_0x35e75f,_0x3ddd6e){return _0x35e75f instanceof _0x3ddd6e;},'mXvtt':function(_0x28bc41,_0x192b99){return _0x28bc41(_0x192b99);},'FsVDp':'ranger\x20profile\x20add\x20local','FQmAO':'profile','tfAsj':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','DwXnM':function(_0x7c479b,_0x503a07){return _0x7c479b+_0x503a07;}};console['log'](_0x3c5c78[_0x54ae20(0x18c)]);const _0x43d63d=process[_0x54ae20(0x145)][_0x54ae20(0x15f)]&&process[_0x54ae20(0x124)][_0x54ae20(0x15f)];!_0x43d63d&&!_0x1c8670?.['scope']&&(console[_0x54ae20(0x133)](_0x3c5c78['CudNy']),_0x1c8670={..._0x1c8670,'scope':'user'});_0x3d5f12?.[_0x54ae20(0x17e)](_0x3c5c78['iDeVd']);if(!findGitRoot()){await _0x3d5f12?.[_0x54ae20(0x155)](_0x54ae20(0x158),new Error('No\x20git\x20repository\x20found'));throw new Error(_0x54ae20(0x129));}_0x3d5f12?.[_0x54ae20(0x185)](_0x3c5c78[_0x54ae20(0x190)]);const _0x3eb581=!existsSync(_0x3c5c78['aDCRw'](getRangerDir)),{path:_0x5308d1}=await _0x3c5c78['aDCRw'](ensureRangerDir);_0x3d5f12?.[_0x54ae20(0x17e)](_0x3c5c78[_0x54ae20(0x16e)]);const _0x31cbd2=await _0x3c5c78[_0x54ae20(0x18b)](authenticate,_0x1b493c);_0x3d5f12?.['trackPhaseEnd']('auth',{'isFirstRun':_0x3eb581,'method':_0x31cbd2[_0x54ae20(0x154)]}),_0x3d5f12?.[_0x54ae20(0x17e)](_0x54ae20(0x15a));_0x1c8670?.['skipChromium']?console[_0x54ae20(0x133)](_0x3c5c78['wZbJt']):await ensureChromium();_0x3d5f12?.['trackPhaseEnd'](_0x3c5c78['VJOgq'],{'isFirstRun':_0x3eb581,'skipped':!!_0x1c8670?.[_0x54ae20(0x13a)]}),await writeRangerGitignore(_0x5308d1),console[_0x54ae20(0x133)](_0x3c5c78[_0x54ae20(0x135)]);const _0x289fb3=_0x1c8670?.[_0x54ae20(0x125)],_0x360fc7=_0x1c8670?.[_0x54ae20(0x121)]??![];let _0x2ce750=null;_0x360fc7?(_0x3d5f12?.['trackPhaseStart'](_0x3c5c78[_0x54ae20(0x123)]),_0x2ce750=await ensureOpencodePluginConfig(_0x289fb3),_0x3d5f12?.[_0x54ae20(0x185)]('plugin',{'isFirstRun':_0x3eb581,'opencode':!![]})):(_0x3d5f12?.[_0x54ae20(0x17e)](_0x3c5c78[_0x54ae20(0x123)]),await ensureClaudePlugin(_0x289fb3),_0x3d5f12?.[_0x54ae20(0x185)](_0x54ae20(0x152),{'isFirstRun':_0x3eb581}));if(_0x3c5c78[_0x54ae20(0x151)](_0x360fc7,_0x2ce750)){_0x3d5f12?.['trackPhaseStart']('skills');try{await installSkill('ranger',{'level':_0x2ce750['scope'],'cliVersion':_0x3c5c78[_0x54ae20(0x127)](getCurrentVersion),'platform':'opencode'}),_0x3d5f12?.['trackPhaseEnd'](_0x3c5c78[_0x54ae20(0x184)],{'isFirstRun':_0x3eb581,'opencode':!![]});}catch(_0x417984){console['warn'](_0x54ae20(0x160),_0x3c5c78['gBTBt'](_0x417984,Error)?_0x417984[_0x54ae20(0x176)]:_0x417984),_0x3d5f12?.[_0x54ae20(0x185)]('skills',{'isFirstRun':_0x3eb581,'opencode':!![],'failed':!![]});}}else _0x3d5f12?.[_0x54ae20(0x17e)](_0x3c5c78[_0x54ae20(0x184)]),await _0x3c5c78['dgMNv'](ensureClaudeSkills,_0x289fb3),_0x3d5f12?.['trackPhaseEnd'](_0x54ae20(0x132),{'isFirstRun':_0x3eb581});if(!_0x43d63d&&!_0x1c8670?.[_0x54ae20(0x12b)])console[_0x54ae20(0x133)]('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x54ae20(0x133)]('\x20\x20'+_0x3c5c78['mXvtt'](bold,_0x3c5c78[_0x54ae20(0x13b)])+'\x0a');else{_0x3d5f12?.[_0x54ae20(0x17e)](_0x3c5c78[_0x54ae20(0x13c)]);const _0x576d55=await ensureLocalEnv({'url':_0x1c8670?.['url'],'force':_0x1c8670?.['force'],'allowInsecureLocalhost':_0x1c8670?.[_0x54ae20(0x12f)]},_0x3d5f12);_0x3d5f12?.['trackPhaseEnd'](_0x3c5c78[_0x54ae20(0x13c)],{'isFirstRun':_0x3eb581,'profileReady':_0x576d55[_0x54ae20(0x14c)],'userSkipped':_0x576d55['skipped']}),_0x576d55[_0x54ae20(0x14c)]&&console['log'](_0x54ae20(0x143));}if(_0x360fc7)console[_0x54ae20(0x133)](_0x54ae20(0x16a)),console[_0x54ae20(0x133)](_0x3c5c78[_0x54ae20(0x156)]),console['log'](_0x54ae20(0x18f)),console['log'](_0x54ae20(0x141));else{const _0x2979d5=bold(_0x54ae20(0x146));console[_0x54ae20(0x133)](_0x3c5c78['DwXnM'](_0x3c5c78['DwXnM'](_0x54ae20(0x175)+_0x2979d5+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0x54ae20(0x14b),_0x54ae20(0x178)));}}
|
|
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 _0x89bb65=_0x3a17;(function(_0x3f211c,_0x5df3c3){const _0x459611=_0x3a17,_0x4a636e=_0x3f211c();while(!![]){try{const _0x1276c6=-parseInt(_0x459611(0x15f))/0x1+-parseInt(_0x459611(0x14c))/0x2+parseInt(_0x459611(0x179))/0x3*(parseInt(_0x459611(0x150))/0x4)+parseInt(_0x459611(0x16b))/0x5+-parseInt(_0x459611(0x135))/0x6+parseInt(_0x459611(0x149))/0x7+parseInt(_0x459611(0x178))/0x8;if(_0x1276c6===_0x5df3c3)break;else _0x4a636e['push'](_0x4a636e['shift']());}catch(_0x132103){_0x4a636e['push'](_0x4a636e['shift']());}}}(_0x93be,0x38aaa));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';function _0x3a17(_0x385023,_0x2e9faf){_0x385023=_0x385023-0x122;const _0x93bee1=_0x93be();let _0x3a1731=_0x93bee1[_0x385023];return _0x3a1731;}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x184e84=>'\x1b[1m'+_0x184e84+_0x89bb65(0x16a),link=(_0x128977,_0x188aec)=>_0x89bb65(0x128)+_0x128977+'\x07'+(_0x188aec||_0x128977)+_0x89bb65(0x171);async function getOpencodePluginStatus(){const _0x5f72c=_0x89bb65,_0xfabce6={'lADME':'string','XeYLU':_0x5f72c(0x155),'tJCgw':function(_0x559850,_0x6c1678){return _0x559850>_0x6c1678;},'vVDXu':'not_configured','vzdMZ':function(_0x9527b,_0x5a27a6,_0x4dc01b,_0x2beb19){return _0x9527b(_0x5a27a6,_0x4dc01b,_0x2beb19);},'whWQL':_0x5f72c(0x184),'wJHwq':_0x5f72c(0x14d),'bupNr':'pipe','PILrW':'error','utJzL':'close'};return new Promise(_0x2bff08=>{const _0x2fa96d=_0x5f72c,_0x2510db={'TsIwO':_0xfabce6[_0x2fa96d(0x158)],'fmVzL':_0x2fa96d(0x12b),'SXdgR':function(_0x26f56b,_0x1c050d){return _0x26f56b(_0x1c050d);},'bFaYt':_0xfabce6[_0x2fa96d(0x14e)],'HOyGQ':function(_0x4408ba,_0x42413b){const _0x154859=_0x2fa96d;return _0xfabce6[_0x154859(0x14f)](_0x4408ba,_0x42413b);},'JbYKn':_0xfabce6[_0x2fa96d(0x139)]},_0x2ee941=_0xfabce6['vzdMZ'](spawn,_0xfabce6['whWQL'],['debug',_0x2fa96d(0x12c)],{'stdio':[_0xfabce6['wJHwq'],'pipe',_0xfabce6['bupNr']]});let _0x198b9c='';_0x2ee941[_0x2fa96d(0x17e)]?.['on'](_0x2fa96d(0x18c),_0x34ce47=>{_0x198b9c+=_0x34ce47['toString']();}),_0x2ee941['stderr']?.['on'](_0x2fa96d(0x18c),_0x1445b0=>{_0x198b9c+=_0x1445b0['toString']();}),_0x2ee941['on'](_0xfabce6[_0x2fa96d(0x176)],()=>{const _0x2ff804=_0x2fa96d;_0x2bff08({'status':_0x2ff804(0x172)});}),_0x2ee941['on'](_0xfabce6['utJzL'],_0x6e8c8f=>{const _0x575b49=_0x2fa96d;if(_0x6e8c8f!==0x0){_0x2510db['SXdgR'](_0x2bff08,{'status':'not_installed'});return;}const _0x10d6d3=_0x198b9c['trim']();let _0x4c8521=null;if(_0x10d6d3)try{_0x4c8521=JSON[_0x575b49(0x141)](_0x10d6d3);}catch{const _0xe666b1=_0x10d6d3[_0x575b49(0x12d)](/\{[\s\S]*\}$/);if(_0xe666b1)try{_0x4c8521=JSON['parse'](_0xe666b1[0x0]);}catch{_0x4c8521=null;}}const _0x4d2ffd=Array[_0x575b49(0x13f)](_0x4c8521?.[_0x575b49(0x16f)])?_0x4c8521?.[_0x575b49(0x16f)]:[],_0x2aed23=_0x4d2ffd[_0x575b49(0x169)](_0xd684b=>{const _0x5ba8e6=_0x575b49;if(typeof _0xd684b!==_0x2510db[_0x5ba8e6(0x144)])return![];return _0xd684b['includes'](_0x2510db[_0x5ba8e6(0x182)])||_0xd684b[_0x5ba8e6(0x136)]('opencode-plugin');});if(_0x2aed23){_0x2510db['SXdgR'](_0x2bff08,{'status':_0x2510db['bFaYt'],'details':_0x2510db[_0x575b49(0x156)](_0x4d2ffd[_0x575b49(0x162)],0x0)?_0x4d2ffd['length']+_0x575b49(0x146):undefined});return;}if(_0x2510db['HOyGQ'](_0x4d2ffd['length'],0x0)){_0x2bff08({'status':'not_configured','details':_0x4d2ffd['length']+_0x575b49(0x146)});return;}_0x2bff08({'status':_0x2510db['JbYKn']});});});}async function getSkillsFromDir(_0x5a5c87,_0x44ac23){const _0x12580a=_0x89bb65,_0x6103be={'wAIUq':_0x12580a(0x127)};if(!existsSync(_0x5a5c87))return[];const _0x1f4601=[];try{const _0xa283d=await readdir(_0x5a5c87,{'withFileTypes':!![]});for(const _0x3ccc9f of _0xa283d){if(_0x3ccc9f['isDirectory']()){const _0x2620f7=join(_0x5a5c87,_0x3ccc9f[_0x12580a(0x153)],_0x6103be['wAIUq']);if(existsSync(_0x2620f7)){let _0x257ff0=_0x3ccc9f['name'];try{const _0x4d8a7a=await readFile(_0x2620f7,'utf-8'),_0x280789=_0x4d8a7a[_0x12580a(0x12d)](/name:\s*(.+)/);_0x280789&&(_0x257ff0=_0x280789[0x1][_0x12580a(0x123)]());}catch{}_0x1f4601['push']({'name':_0x3ccc9f[_0x12580a(0x153)],'displayName':_0x257ff0,'path':_0x2620f7,'level':_0x44ac23});}}}}catch{return[];}return _0x1f4601;}async function getInstalledSkills(){const _0x206b31=_0x89bb65,_0x53b702={'qrLNj':function(_0x4d8dd0,_0x2e7010,_0x57a5c0){return _0x4d8dd0(_0x2e7010,_0x57a5c0);},'pMuVH':_0x206b31(0x145),'HEjGw':function(_0x31acb5){return _0x31acb5();},'TwONR':_0x206b31(0x14a)},[_0x56dd43,_0x2f588b]=await Promise[_0x206b31(0x13b)]([_0x53b702[_0x206b31(0x13e)](getSkillsFromDir,getProjectSkillsDir(),_0x53b702['pMuVH']),getSkillsFromDir(_0x53b702[_0x206b31(0x17a)](getUserSkillsDir),_0x53b702['TwONR'])]);return{'project':_0x56dd43,'user':_0x2f588b};}async function getEnvironments(){const _0xd015ef=_0x89bb65,_0x1fd587={'uOqcX':function(_0x592ee8,_0x5531c7){return _0x592ee8(_0x5531c7);},'ipEkx':function(_0x424888,_0x25aadf,_0x26bff8){return _0x424888(_0x25aadf,_0x26bff8);},'DsMTp':function(_0x511c33,_0x5bf721,_0x5165bf){return _0x511c33(_0x5bf721,_0x5165bf);},'nTzap':_0xd015ef(0x157),'oVOhA':_0xd015ef(0x126),'FDXuH':function(_0x19feb7,_0x3fe817){return _0x19feb7(_0x3fe817);},'HsWSL':function(_0x1dd98b,_0x2383b5){return _0x1dd98b===_0x2383b5;},'ejmaS':function(_0x2ee6ce){return _0x2ee6ce();}},{envNames:_0x39a2fd,activeEnv:_0x437a87}=await getEnvNames(),_0x29cfb9=_0x1fd587['ejmaS'](getRangerDir);if(!_0x1fd587[_0xd015ef(0x12e)](existsSync,_0x29cfb9))return{'envs':[],'activeEnv':null};const _0x13b536=_0x39a2fd[_0xd015ef(0x12f)](_0x313292=>{const _0x461915=_0xd015ef,_0x51be78=_0x1fd587[_0x461915(0x189)](getEnvDir,_0x313292),_0x5d5297=_0x1fd587['ipEkx'](join,_0x51be78,_0x461915(0x138)),_0x761c1=_0x1fd587[_0x461915(0x12a)](join,_0x51be78,_0x461915(0x186)),_0x5b540f=join(_0x51be78,_0x1fd587['nTzap']);return{'name':_0x313292,'settingsPath':existsSync(_0x5d5297)?_0x5d5297:_0x1fd587[_0x461915(0x175)],'hasPlaintextAuth':existsSync(_0x761c1),'hasEncryptedAuth':_0x1fd587['FDXuH'](existsSync,_0x5b540f),'isActive':_0x1fd587['HsWSL'](_0x313292,_0x437a87)};});return{'envs':_0x13b536,'activeEnv':_0x437a87};}export async function status(){const _0x3af6c=_0x89bb65,_0x4d4e2f={'viFYu':_0x3af6c(0x125),'ruVHv':function(_0xd25895){return _0xd25895();},'tCgFv':function(_0x522238,_0x5716c4,_0x223f84){return _0x522238(_0x5716c4,_0x223f84);},'mPpmt':function(_0x261767,_0x3196ef){return _0x261767(_0x3196ef);},'Cxtgt':function(_0x157fe9){return _0x157fe9();},'XhFFI':function(_0x1fdb94){return _0x1fdb94();},'IDWwA':function(_0x53fc5e,_0x3d3d58){return _0x53fc5e(_0x3d3d58);},'OEmxT':_0x3af6c(0x15a),'MztkX':function(_0x193b5f){return _0x193b5f();},'axxvG':_0x3af6c(0x12b),'Uwiqk':_0x3af6c(0x142),'cLCOH':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','sAqlD':_0x3af6c(0x15c),'RSQhD':_0x3af6c(0x185),'tfAcv':function(_0x1dc725,_0x165732){return _0x1dc725===_0x165732;},'iqVaL':_0x3af6c(0x17f),'oxzwL':function(_0x32979f,_0x15c23a){return _0x32979f(_0x15c23a);},'NAlNB':function(_0x2edc2d,_0x1a468f,_0x95211f){return _0x2edc2d(_0x1a468f,_0x95211f);},'EyOmT':'\x20\x20User-level:','SDWVz':_0x3af6c(0x17b),'oQBUE':'\x20(active)','WeOop':'plaintext','OqzNy':_0x3af6c(0x126),'ycSzq':function(_0x181942,_0x29a1f6,_0x3a340e){return _0x181942(_0x29a1f6,_0x3a340e);}};console[_0x3af6c(0x181)](_0x4d4e2f[_0x3af6c(0x188)]);const _0x56e6b9=process[_0x3af6c(0x165)](),_0x4e9301=_0x4d4e2f[_0x3af6c(0x16e)](getRangerDir);if(!existsSync(_0x4e9301)){console[_0x3af6c(0x181)](_0x3af6c(0x13a)+_0x4d4e2f[_0x3af6c(0x164)](link,_0x56e6b9,_0x4d4e2f['mPpmt'](bold,basename(_0x56e6b9)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x3af6c(0x181)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x3af6c(0x181)]('Root:\x20'+_0x4d4e2f['tCgFv'](link,_0x56e6b9,bold(basename(_0x56e6b9))));const _0x1f240a=_0x4d4e2f['Cxtgt'](getCurrentVersion),_0x833c8b=_0x4d4e2f['ruVHv'](getLatestVersion);if(_0x833c8b[_0x3af6c(0x15e)]&&_0x833c8b['version']!==_0x1f240a)console['log']('Version:\x20'+_0x1f240a+_0x3af6c(0x187)+_0x833c8b[_0x3af6c(0x15e)]+')'),console[_0x3af6c(0x181)]('\x20\x20Run:\x20ranger\x20update');else _0x833c8b[_0x3af6c(0x15e)]?console[_0x3af6c(0x181)](_0x3af6c(0x183)+_0x1f240a+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x1f240a);const _0x23d90d=await _0x4d4e2f[_0x3af6c(0x143)](getToken);if(_0x23d90d){const _0xe84542=await getCurrentUser(_0x23d90d);_0xe84542['success']?console['log']('Organization:\x20'+_0x4d4e2f['IDWwA'](bold,_0xe84542['user'][_0x3af6c(0x170)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x3af6c(0x181)](_0x3af6c(0x16d)));}else console['log'](_0x3af6c(0x151)),console['log'](_0x3af6c(0x16d));process['env']['DEBUG']&&(console[_0x3af6c(0x181)](_0x3af6c(0x161)+_0x4d4e2f[_0x3af6c(0x18a)](getCurrentEnvironment)),console['log'](_0x3af6c(0x140)+_0x4d4e2f[_0x3af6c(0x16e)](getApiBaseUrl)));console[_0x3af6c(0x181)](_0x4d4e2f[_0x3af6c(0x147)]);const _0x2283a5=await _0x4d4e2f[_0x3af6c(0x16c)](getOpencodePluginStatus);if(_0x2283a5['status']==='configured')console['log']('\x20\x20'+bold(_0x4d4e2f[_0x3af6c(0x168)])+':\x20configured'),_0x2283a5[_0x3af6c(0x154)]&&console['log']('\x20\x20'+_0x2283a5[_0x3af6c(0x154)]);else _0x2283a5['status']==='not_configured'?(console[_0x3af6c(0x181)]('\x20\x20Not\x20configured'),_0x2283a5['details']&&console['log']('\x20\x20'+_0x2283a5[_0x3af6c(0x154)]),console[_0x3af6c(0x181)](_0x4d4e2f[_0x3af6c(0x177)])):console['log'](_0x3af6c(0x163));console[_0x3af6c(0x181)](_0x4d4e2f['cLCOH']);const _0x1d2223=await getPluginInfo(_0x4d4e2f['sAqlD']);if(_0x1d2223){const _0x3fc05b=_0x1d2223[_0x3af6c(0x173)]||'unknown',_0x19c1cd=_0x1d2223[_0x3af6c(0x134)]?_0x3af6c(0x134):'disabled';console[_0x3af6c(0x181)]('\x20\x20'+bold(_0x4d4e2f['sAqlD'])+_0x3af6c(0x13c)+_0x3fc05b+',\x20'+_0x19c1cd+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x3af6c(0x181)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x3af6c(0x181)](_0x4d4e2f['RSQhD']);const {project:_0x2b0151,user:_0xdf4812}=await getInstalledSkills(),_0x10eb0c=_0x2b0151[_0x3af6c(0x17d)](_0x5f550d=>RANGER_MANAGED_SKILLS[_0x3af6c(0x136)](_0x5f550d[_0x3af6c(0x153)])),_0x1159f0=_0xdf4812['filter'](_0x16174c=>RANGER_MANAGED_SKILLS[_0x3af6c(0x136)](_0x16174c['name'])),_0x4a854d=_0x10eb0c[_0x3af6c(0x162)]+_0x1159f0[_0x3af6c(0x162)];if(_0x4d4e2f['tfAcv'](_0x4a854d,0x0))console[_0x3af6c(0x181)](_0x4d4e2f[_0x3af6c(0x130)]),console[_0x3af6c(0x181)](_0x3af6c(0x15b));else{if(_0x10eb0c['length']>0x0){console['log'](_0x3af6c(0x160));for(const _0x5631b1 of _0x10eb0c){console['log']('\x20\x20\x20\x20'+_0x4d4e2f[_0x3af6c(0x166)](bold,_0x5631b1['displayName'])+':\x20'+_0x4d4e2f[_0x3af6c(0x18b)](link,_0x5631b1['path'],_0x4d4e2f['IDWwA'](basename,_0x5631b1['path'])));}}if(_0x1159f0[_0x3af6c(0x162)]>0x0){console['log'](_0x4d4e2f['EyOmT']);for(const _0x2d5e9c of _0x1159f0){console['log'](_0x3af6c(0x180)+bold(_0x2d5e9c[_0x3af6c(0x137)])+':\x20'+link(_0x2d5e9c[_0x3af6c(0x124)],basename(_0x2d5e9c['path'])));}}}console['log'](_0x4d4e2f[_0x3af6c(0x133)]);const {envs:_0x5d23aa,activeEnv:_0x59f59d}=await _0x4d4e2f[_0x3af6c(0x18a)](getEnvironments);if(_0x4d4e2f['tfAcv'](_0x5d23aa[_0x3af6c(0x162)],0x0))console['log']('No\x20profiles\x20configured'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x55eb5d of _0x5d23aa){const _0x2476b6=_0x55eb5d[_0x3af6c(0x148)]?_0x4d4e2f['oQBUE']:'',_0x52e362=_0x55eb5d[_0x3af6c(0x167)]?_0x3af6c(0x132):_0x55eb5d[_0x3af6c(0x129)]?_0x4d4e2f[_0x3af6c(0x13d)]:_0x3af6c(0x15d);console['log']('\x20\x20'+_0x4d4e2f['mPpmt'](bold,_0x55eb5d[_0x3af6c(0x153)])+_0x2476b6),console[_0x3af6c(0x181)]('\x20\x20\x20\x20Auth:\x20'+_0x52e362),_0x55eb5d[_0x3af6c(0x131)]!==_0x4d4e2f[_0x3af6c(0x14b)]&&console['log'](_0x3af6c(0x122)+_0x4d4e2f[_0x3af6c(0x152)](link,_0x55eb5d['settingsPath'],_0x4d4e2f[_0x3af6c(0x174)](basename,_0x55eb5d[_0x3af6c(0x131)])));}!_0x59f59d&&(console[_0x3af6c(0x181)](_0x3af6c(0x159)),console[_0x3af6c(0x181)](_0x3af6c(0x17c)+_0x5d23aa[_0x3af6c(0x12f)](_0x3367eb=>_0x3367eb['name'])['join'](',\x20')+')'));}console[_0x3af6c(0x181)]('');}function _0x93be(){const _0x272757=['\x1b[0m','1781515LOZZKU','MztkX','\x20\x20Run:\x20ranger\x20setup\x20[token]','ruVHv','plugin','organizationName','\x1b]8;;\x07','not_installed','scope','mPpmt','oVOhA','PILrW','Uwiqk','2910000belmtL','2154xhQDgy','HEjGw','\x0a---\x20Profiles\x20---','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','filter','stdout','No\x20skills\x20installed','\x20\x20\x20\x20','log','fmVzL','Version:\x20','opencode','\x0a---\x20Skills\x20---','auth.json','\x20(latest:\x20','viFYu','uOqcX','Cxtgt','NAlNB','data','\x20\x20\x20\x20Settings:\x20','trim','path','\x0a📊\x20Ranger\x20Status\x0a','(not\x20found)','SKILL.md','\x1b]8;;file://','hasPlaintextAuth','DsMTp','@ranger-testing/opencode-plugin','config','match','FDXuH','map','iqVaL','settingsPath','encrypted','SDWVz','enabled','1617318JBtWFr','includes','displayName','settings.json','vVDXu','Root:\x20','all',':\x20installed\x20(','WeOop','qrLNj','isArray','API\x20URL:\x20','parse','\x20\x20Run:\x20ranger\x20setup\x20--opencode','XhFFI','TsIwO','project','\x20plugin(s)\x20configured','OEmxT','isActive','1696947BMPrIx','user','OqzNy','800120VgzOPq','ignore','XeYLU','tJCgw','412VAwiqR','API\x20Token:\x20✗\x20Not\x20found','ycSzq','name','details','configured','HOyGQ','auth.json.enc','lADME','\x0a\x20\x20No\x20active\x20profile\x20set','\x0a---\x20OpenCode\x20Plugin\x20---','\x20\x20Run:\x20ranger\x20skillup','ranger@trailhead','none','version','134709VpYJku','\x20\x20Project-level:','API\x20Environment:\x20','length','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','tCgFv','cwd','oxzwL','hasEncryptedAuth','axxvG','some'];_0x93be=function(){return _0x272757;};return _0x93be();}
|
|
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(_0x230f5a,_0x4615d3){const _0x33240e=_0x30ec,_0x6253f0=_0x230f5a();while(!![]){try{const _0x50f374=-parseInt(_0x33240e(0x17f))/0x1+parseInt(_0x33240e(0x195))/0x2*(-parseInt(_0x33240e(0x162))/0x3)+-parseInt(_0x33240e(0x19c))/0x4*(parseInt(_0x33240e(0x177))/0x5)+-parseInt(_0x33240e(0x170))/0x6*(parseInt(_0x33240e(0x19f))/0x7)+parseInt(_0x33240e(0x16f))/0x8+-parseInt(_0x33240e(0x1a4))/0x9+-parseInt(_0x33240e(0x16b))/0xa*(-parseInt(_0x33240e(0x17c))/0xb);if(_0x50f374===_0x4615d3)break;else _0x6253f0['push'](_0x6253f0['shift']());}catch(_0x3ad8db){_0x6253f0['push'](_0x6253f0['shift']());}}}(_0x56d0,0xcec71));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';function _0x30ec(_0x58fbc5,_0x28ce8e){_0x58fbc5=_0x58fbc5-0x159;const _0x56d0d2=_0x56d0();let _0x30ecc0=_0x56d0d2[_0x58fbc5];return _0x30ecc0;}import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x49bbf8=_0x30ec,_0xd1159b={'mLBmj':function(_0x1aa353,_0x146b0c,_0x2eea8c,_0x12f1a6){return _0x1aa353(_0x146b0c,_0x2eea8c,_0x12f1a6);},'TSGqV':_0x49bbf8(0x189),'PLXNV':_0x49bbf8(0x1a3),'sozDD':_0x49bbf8(0x176),'elyaO':_0x49bbf8(0x1a5)};return new Promise(_0x50885d=>{const _0x3a5765=_0x49bbf8,_0x312efd={'kzslV':function(_0x5540e9,_0x18a3e6){return _0x5540e9(_0x18a3e6);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x5496ee=_0xd1159b[_0x3a5765(0x178)](spawn,_0xd1159b[_0x3a5765(0x190)],[_0x3a5765(0x186),'-g',PACKAGE_NAME+_0x3a5765(0x17e)],{'stdio':_0xd1159b[_0x3a5765(0x18b)],'shell':process[_0x3a5765(0x184)]===_0xd1159b['sozDD']});_0x5496ee['on'](_0xd1159b[_0x3a5765(0x15c)],_0x148bb0=>{_0x312efd['kzslV'](_0x50885d,_0x148bb0===0x0);}),_0x5496ee['on'](_0x3a5765(0x166),()=>{_0x50885d(![]);});});}async function updateClaudeMarketplace(){const _0x4c886d=_0x30ec,_0x4d1190={'FXmTe':function(_0x3b2e17,_0x566c73){return _0x3b2e17(_0x566c73);},'IusOp':function(_0xed3f08,_0xd8eb9e){return _0xed3f08===_0xd8eb9e;},'hjSwX':function(_0x240e7b,_0x464972,_0x5931c9,_0x41eae0){return _0x240e7b(_0x464972,_0x5931c9,_0x41eae0);},'vmlZY':'claude','yJrAn':_0x4c886d(0x199),'IcVGl':'trailhead','SoFZV':function(_0x3c6223,_0x1d5c01){return _0x3c6223===_0x1d5c01;},'qWBwB':_0x4c886d(0x176),'isyfJ':_0x4c886d(0x1a5),'ZJmBy':'error'};return new Promise(_0x338be1=>{const _0x51201c=_0x4c886d,_0x3ccaf9=_0x4d1190[_0x51201c(0x19a)](spawn,_0x4d1190[_0x51201c(0x167)],[_0x4d1190[_0x51201c(0x197)],'marketplace','update',_0x4d1190[_0x51201c(0x18f)]],{'stdio':'pipe','shell':_0x4d1190[_0x51201c(0x17d)](process['platform'],_0x4d1190[_0x51201c(0x1a7)])});_0x3ccaf9['on'](_0x4d1190[_0x51201c(0x196)],_0x3aa09c=>{const _0x518aaa=_0x51201c;_0x4d1190[_0x518aaa(0x192)](_0x338be1,_0x4d1190['IusOp'](_0x3aa09c,0x0));}),_0x3ccaf9['on'](_0x4d1190[_0x51201c(0x16d)],()=>{_0x338be1(![]);});});}async function updateClaudePlugin(_0x519538){const _0x57d258=_0x30ec,_0x5b288a={'FumtT':function(_0x164701,_0x7a4326){return _0x164701(_0x7a4326);},'HibFd':function(_0x11a1cf,_0x2058ce){return _0x11a1cf(_0x2058ce);},'XZTba':function(_0x1e3bb5,_0x34b759){return _0x1e3bb5===_0x34b759;},'BgyQR':_0x57d258(0x18e),'ovXxE':'ranger@trailhead','VoQVz':_0x57d258(0x175),'PIAoY':_0x57d258(0x176)};return new Promise(_0x400ab9=>{const _0xb4a3ac=_0x57d258,_0x4c7ca2={'cKFKe':function(_0x54c069,_0x15b9ad){return _0x5b288a['HibFd'](_0x54c069,_0x15b9ad);},'RWGIS':function(_0x4679f1,_0x25171c){return _0x5b288a['XZTba'](_0x4679f1,_0x25171c);}},_0x1051fa=[_0xb4a3ac(0x199),_0x5b288a[_0xb4a3ac(0x1a8)],_0x5b288a['ovXxE']];_0x519538&&_0x1051fa['push'](_0xb4a3ac(0x1a0),_0x519538);const _0xae53f1=spawn('claude',_0x1051fa,{'stdio':_0x5b288a[_0xb4a3ac(0x18d)],'shell':process[_0xb4a3ac(0x184)]===_0x5b288a[_0xb4a3ac(0x188)]});_0xae53f1['on']('close',_0x36fd7a=>{const _0xdf32b7=_0xb4a3ac;_0x4c7ca2[_0xdf32b7(0x161)](_0x400ab9,_0x4c7ca2['RWGIS'](_0x36fd7a,0x0));}),_0xae53f1['on'](_0xb4a3ac(0x166),()=>{_0x5b288a['FumtT'](_0x400ab9,![]);});});}function isSkillInstalled(_0x2d9806,_0x7bb984,_0x1df04e){const _0x5e412b=_0x30ec,_0x28cf8a={'FfYKO':function(_0x5d1ad9,_0x151730){return _0x5d1ad9(_0x151730);},'MkWfF':function(_0x4a1819,_0x2c4574){return _0x4a1819(_0x2c4574);}},_0x9ab32a=_0x1df04e==='opencode'?_0x28cf8a['FfYKO'](getOpencodeSkillsDir,_0x7bb984):_0x28cf8a[_0x5e412b(0x18c)](getSkillsDir,_0x7bb984),_0x32000c=join(_0x9ab32a,_0x2d9806);return existsSync(_0x32000c);}function _0x56d0(){const _0x1c0b16=['\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','PLXNV','MkWfF','VoQVz','update','IcVGl','TSGqV','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','FXmTe','ECqFP','Update\x20failed.','4hvBDUo','isyfJ','yJrAn','\x20\x20Failed\x20to\x20reinstall\x20','plugin','hjSwX','some','17796usbhxN','push','user','3542ahAyKr','--scope','findIndex','Paiuy','inherit','7967889DjFdeI','close','uDhzd','qWBwB','BgyQR','cwbkZ','DGdnn','aKaIa','claude','elyaO','utf-8','qdkVR','\x0aYour\x20version\x20(','Latest\x20version:\x20\x20','cKFKe','1452909KyQbpw','warn','Checking\x20for\x20updates...','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','error','vmlZY','vXsKt','version','active-profile.txt','10VUndDY','length','ZJmBy','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','12675808VjRvXg','15660qixFPv','log','\x0aCould\x20not\x20check\x20latest\x20version:\x20','project','JyiOp','pipe','win32','765gIDNpS','mLBmj','YOHnD','join','\x0aCurrent\x20version:\x20','37571919tsjzua','SoFZV','@latest','297860fVorRo','Update\x20failed:\x20','\x0aReinstalling\x20','trim','zQQYj','platform','\x20ranger-managed\x20skill(s)...','install',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','PIAoY','npm'];_0x56d0=function(){return _0x1c0b16;};return _0x56d0();}async function reinstallSkills(_0xdd0ee7){const _0x183e17=_0x30ec,_0x53ef61={'HavmW':_0x183e17(0x19e),'YOHnD':function(_0x4c9900,_0x3d46a8,_0x588ee9,_0x6e11bc){return _0x4c9900(_0x3d46a8,_0x588ee9,_0x6e11bc);},'uDhzd':_0x183e17(0x15b),'Paiuy':'opencode','oLlHP':function(_0x2c9d4f,_0x2c644d,_0x4dfb83){return _0x2c9d4f(_0x2c644d,_0x4dfb83);}},_0x884c94=['project',_0x53ef61['HavmW']],_0x279e46=[];for(const _0x5d5099 of _0x884c94){for(const _0x48757c of RANGER_MANAGED_SKILLS){_0x53ef61['YOHnD'](isSkillInstalled,_0x48757c,_0x5d5099,_0x53ef61['uDhzd'])&&_0x279e46['push']({'skillName':_0x48757c,'level':_0x5d5099,'platform':_0x53ef61[_0x183e17(0x1a6)]}),_0x53ef61[_0x183e17(0x179)](isSkillInstalled,_0x48757c,_0x5d5099,_0x53ef61[_0x183e17(0x1a2)])&&_0x279e46[_0x183e17(0x19d)]({'skillName':_0x48757c,'level':_0x5d5099,'platform':'opencode'});}}for(const _0x10f8e4 of _0x884c94){for(const _0x380347 of DEPRECATED_SKILLS){await removeSkill(_0x380347,_0x10f8e4);}}if(_0x279e46[_0x183e17(0x16c)]===0x0){console[_0x183e17(0x171)](_0x183e17(0x18a));return;}console[_0x183e17(0x171)](_0x183e17(0x181)+_0x279e46['length']+_0x183e17(0x185));for(const {skillName:_0x5c2559,level:_0x5cff1e,platform:_0x3aa09e}of _0x279e46){try{await _0x53ef61['oLlHP'](installSkill,_0x5c2559,{'level':_0x5cff1e,'cliVersion':_0xdd0ee7,'platform':_0x3aa09e});}catch(_0x1a324a){console[_0x183e17(0x163)](_0x183e17(0x198)+_0x3aa09e+'\x20'+_0x5cff1e+'\x20skill\x20'+_0x5c2559+':',_0x1a324a);}}}async function ensureActiveProfileGitignored(){const _0x4c6fcb=_0x30ec,_0x5b2567={'izwje':function(_0x176899){return _0x176899();},'aKaIa':'.gitignore','zQQYj':function(_0x2ead21,_0x477d55,_0xa870c6){return _0x2ead21(_0x477d55,_0xa870c6);},'ihqTs':'utf-8'},_0x34e92c=join(_0x5b2567['izwje'](getRangerDir),_0x5b2567[_0x4c6fcb(0x15a)]);if(!existsSync(_0x34e92c))return![];let _0x1729ea='';try{_0x1729ea=await _0x5b2567[_0x4c6fcb(0x183)](readFile,_0x34e92c,_0x4c6fcb(0x15d));}catch{return![];}const _0x1c51d8=_0x1729ea['split'](/\r?\n/);if(_0x1c51d8[_0x4c6fcb(0x19b)](_0x3d415f=>_0x3d415f[_0x4c6fcb(0x182)]()==='active-profile.txt'))return![];let _0x565415=_0x1c51d8[_0x4c6fcb(0x1a1)](_0x4e8644=>_0x4e8644['trim']()==='active-feature.txt');_0x565415===-0x1&&(_0x565415=_0x1c51d8['length']);_0x1c51d8['splice'](_0x565415,0x0,_0x4c6fcb(0x16a));let _0x4dc333=_0x1c51d8[_0x4c6fcb(0x17a)]('\x0a');!_0x4dc333['endsWith']('\x0a')&&(_0x4dc333+='\x0a');try{await writeFile(_0x34e92c,_0x4dc333,_0x5b2567['ihqTs']);}catch{return![];}return!![];}export async function update(){const _0x508f15=_0x30ec,_0x3ebd7d={'KKKUP':_0x508f15(0x164),'ECqFP':function(_0x5119dd){return _0x5119dd();},'qdkVR':function(_0x550691,_0xf109d8,_0x3d2f61){return _0x550691(_0xf109d8,_0x3d2f61);},'UYbOp':function(_0xe05be1,_0x437fe6){return _0xe05be1===_0x437fe6;},'ypIhw':_0x508f15(0x191),'cwbkZ':function(_0x11206a,_0xf29acf){return _0x11206a<_0xf29acf;},'JyiOp':function(_0x2fb3fd){return _0x2fb3fd();},'KkEGE':_0x508f15(0x194),'faZYx':_0x508f15(0x16e),'vJDkf':_0x508f15(0x173),'DGdnn':function(_0x32007d){return _0x32007d();},'vXsKt':'✓\x20Migrated\x20active\x20profile\x20file'},_0x2a53a3=getCurrentVersion();console[_0x508f15(0x171)](_0x508f15(0x17b)+_0x2a53a3),console[_0x508f15(0x171)](_0x3ebd7d['KKKUP']);const _0x340da2=getLatestVersion();let _0x1960c3=_0x2a53a3;if(!_0x340da2[_0x508f15(0x169)]){console[_0x508f15(0x163)](_0x508f15(0x172)+_0x340da2[_0x508f15(0x166)]),console[_0x508f15(0x171)]('Attempting\x20install\x20anyway...');const _0x5a5f3b=await _0x3ebd7d['ECqFP'](runInstall);if(_0x5a5f3b)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x1960c3=_0x3ebd7d[_0x508f15(0x193)](getCurrentVersion);else throw new Error(_0x508f15(0x180)+_0x340da2['error']);}else{const _0xee07d9=_0x340da2[_0x508f15(0x169)];console[_0x508f15(0x171)](_0x508f15(0x160)+_0xee07d9);const _0x3dca11=_0x3ebd7d[_0x508f15(0x15e)](compareVersions,_0x2a53a3,_0xee07d9);if(_0x3ebd7d['UYbOp'](_0x3dca11,0x0))console[_0x508f15(0x171)](_0x3ebd7d['ypIhw']);else{if(_0x3ebd7d[_0x508f15(0x1a9)](_0x3dca11,0x0))console[_0x508f15(0x171)](_0x508f15(0x15f)+_0x2a53a3+_0x508f15(0x187)+_0xee07d9+').');else{const _0x482154=await _0x3ebd7d[_0x508f15(0x174)](runInstall);if(_0x482154)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0xee07d9),_0x1960c3=_0xee07d9;else throw new Error(_0x3ebd7d['KkEGE']);}}}await reinstallSkills(_0x1960c3);const _0x33eb81=await isMarketplaceAdded('trailhead'),_0x1a7012=await isPluginInstalled('ranger@trailhead');if(_0x33eb81){const _0x1c680c=await _0x3ebd7d['JyiOp'](updateClaudeMarketplace);_0x1c680c&&console['log'](_0x508f15(0x165));}if(_0x1a7012){const _0x55cab9=await updateClaudePlugin();_0x55cab9&&console['log'](_0x3ebd7d['faZYx']);const _0x50ba73=await updateClaudePlugin(_0x3ebd7d['vJDkf']);_0x50ba73&&console[_0x508f15(0x171)]((_0x55cab9?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x58d0cc=await _0x3ebd7d[_0x508f15(0x159)](migrateActiveProfileFile);_0x58d0cc&&console[_0x508f15(0x171)](_0x3ebd7d[_0x508f15(0x168)]);const _0x5ce147=await _0x3ebd7d['ECqFP'](ensureActiveProfileGitignored);console[_0x508f15(0x171)]('\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)]);}
|