@ranger-testing/ranger-cli 2.1.6 → 2.1.8
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 +1 -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/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/build/skills/ranger/SKILL.md +25 -7
- package/build/skills/ranger/claude.md +7 -0
- package/build/skills/ranger/start.md +2 -2
- package/build/skills/ranger/verify.md +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x575375,_0x6b8523){const _0xd00305=_0x1aeb,_0x42a5c5=_0x575375();while(!![]){try{const _0xa73fa4=parseInt(_0xd00305(0xbb))/0x1+-parseInt(_0xd00305(0xbc))/0x2*(-parseInt(_0xd00305(0xb5))/0x3)+-parseInt(_0xd00305(0xa9))/0x4+-parseInt(_0xd00305(0xaf))/0x5*(-parseInt(_0xd00305(0xba))/0x6)+parseInt(_0xd00305(0xb4))/0x7+parseInt(_0xd00305(0xb7))/0x8*(-parseInt(_0xd00305(0xc0))/0x9)+parseInt(_0xd00305(0xae))/0xa*(parseInt(_0xd00305(0xb6))/0xb);if(_0xa73fa4===_0x6b8523)break;else _0x42a5c5['push'](_0x42a5c5['shift']());}catch(_0x3c5b31){_0x42a5c5['push'](_0x42a5c5['shift']());}}}(_0x51ed,0x38f19));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';function _0x1aeb(_0xd2b1d9,_0x4ec605){_0xd2b1d9=_0xd2b1d9-0xa7;const _0x51edf0=_0x51ed();let _0x1aeb21=_0x51edf0[_0xd2b1d9];return _0x1aeb21;}import{getEnabledHookContext}from'./output.js';function _0x51ed(){const _0x111fce=['toString','dQiZa','10watzvI','515yYTNnc','stringify','trackCommandStart','featureId','iccOF','7728uwhxoS','3VWZgRz','1002331kERTVT','16CCgoIM','success',':\x0a\x0a','13656LWNCtE','40684dBDmxM','493538PNxswL','zyUwY','message','\x20for\x20\x22','40428XLHZdK','alloc','min','input','includes','stat','ezUhV','hook:stop','1487524ZDMFYS','stop_hook_active','trackCommandEnd'];_0x51ed=function(){return _0x111fce;};return _0x51ed();}import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x426b4a){const _0x5b2fb9=_0x1aeb,_0x2ac720={'iccOF':function(_0x1361b5,_0x5da2c2){return _0x1361b5(_0x5da2c2);},'llWuH':function(_0x224156){return _0x224156();},'bYebA':function(_0x5ba51e,_0x10f411,_0x5f1b18){return _0x5ba51e(_0x10f411,_0x5f1b18);},'ezUhV':function(_0xabbf52,_0x482f55,_0xd52580){return _0xabbf52(_0x482f55,_0xd52580);},'zyUwY':function(_0x3b5019,_0x3e3297){return _0x3b5019 instanceof _0x3e3297;},'XljWT':'block','dQiZa':function(_0x5ea7ca,_0xb2e270,_0x155cd1,_0x3764bb){return _0x5ea7ca(_0xb2e270,_0x155cd1,_0x3764bb);}},_0x50fde9=await _0x2ac720[_0x5b2fb9(0xb3)](getEnabledHookContext,_0x426b4a),_0x596d71=_0x50fde9?.['sessionId']??null,_0x36f75e=_0x2ac720['iccOF'](Boolean,_0x50fde9?.[_0x5b2fb9(0xc3)]?.[_0x5b2fb9(0xaa)]),_0x123a00=typeof _0x50fde9?.['input']?.['transcript_path']==='string'?_0x50fde9['input']['transcript_path']:null;let _0x265dee=!![];if(!_0x596d71){await trackStop(_0x596d71,![],_0x265dee);return;}try{const _0x168e39=getSessionEntry(_0x596d71);if(!_0x168e39){await trackStop(_0x596d71,!![],_0x265dee);return;}const _0x426d5d='https://dashboard.ranger.net/features/'+_0x168e39[_0x5b2fb9(0xb2)],_0x14d142='RANGER_SKIP_VERIFICATION',_0x3e8a3f=await _0x2ac720['llWuH'](getToken),_0x8fd357=!_0x36f75e;let _0x5b9a9d=null,_0x23b04f=null;const _0x4d6289=_0x36f75e&&await _0x2ac720['bYebA'](transcriptHasToken,_0x123a00,_0x14d142),_0x116ae5=await _0x2ac720[_0x5b2fb9(0xa7)](transcriptHasToken,_0x123a00,_0x426d5d);if(_0x3e8a3f)try{const _0x4444a8=await _0x2ac720[_0x5b2fb9(0xb3)](getFeature,_0x168e39[_0x5b2fb9(0xb2)]);_0x5b9a9d=_0x4444a8['name']??null,_0x23b04f=_0x4444a8['currentSessionId']??null;}catch{}if(_0x3e8a3f&&_0x23b04f)try{await concludeSession(_0x168e39['featureId'],_0x23b04f);}catch(_0x5ca078){if(_0x4d6289){await trackStop(_0x596d71,!![],_0x265dee);return;}_0x265dee=![];const _0x248abb=_0x2ac720[_0x5b2fb9(0xbd)](_0x5ca078,Error)?_0x5ca078[_0x5b2fb9(0xbe)]:String(_0x5ca078),_0x36ada7={'decision':_0x2ac720['XljWT'],'reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x5b9a9d?_0x5b2fb9(0xbf)+_0x5b9a9d+'\x22':'')+_0x5b2fb9(0xb9)+_0x248abb+'\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('+_0x426d5d+')\x20and\x20the\x20token\x20`'+_0x14d142+'`,\x20then\x20run\x20/exit\x20again.'};console['log'](JSON[_0x5b2fb9(0xb0)](_0x36ada7)),await trackStop(_0x596d71,!![],_0x265dee);return;}await trackStop(_0x596d71,!![],_0x265dee);return;}catch{await _0x2ac720[_0x5b2fb9(0xad)](trackStop,_0x596d71,!![],_0x265dee);return;}}async function trackStop(_0xf49a78,_0x371726,_0x2ce3bb){const _0x46c77a=_0x1aeb,_0x2e2640={'SRRsz':_0x46c77a(0xb8)};try{const _0x52be37=createTelemetryCollector(_0x46c77a(0xa8));await _0x52be37[_0x46c77a(0xb1)]({'sessionId':_0xf49a78??undefined,'hooksEnabled':_0x371726,'stopAllowed':_0x2ce3bb}),await _0x52be37[_0x46c77a(0xab)](_0x2e2640['SRRsz']);}catch{}}async function transcriptHasToken(_0x35431b,_0x4d1180){const _0xdada3b=_0x1aeb,_0x59db47={'bIwEO':function(_0xe076de,_0x2e940a,_0x58ab96){return _0xe076de(_0x2e940a,_0x58ab96);}};if(!_0x35431b)return![];const _0x1b1c59=await _0x59db47['bIwEO'](readTranscriptTail,_0x35431b,0x30d40);return _0x1b1c59?_0x1b1c59[_0xdada3b(0xc4)](_0x4d1180):![];}async function readTranscriptTail(_0x3537c0,_0x5c0c96){const _0x228d31=_0x1aeb;let _0x3bb7da=null;try{_0x3bb7da=await open(_0x3537c0,'r');const _0x404933=await _0x3bb7da[_0x228d31(0xc5)](),_0x4bc289=Math[_0x228d31(0xc2)](_0x404933['size'],_0x5c0c96);if(_0x4bc289<=0x0)return'';const _0x4bc088=Buffer[_0x228d31(0xc1)](_0x4bc289);return await _0x3bb7da['read'](_0x4bc088,0x0,_0x4bc289,_0x404933['size']-_0x4bc289),_0x4bc088[_0x228d31(0xac)]('utf8');}catch{return null;}finally{try{await _0x3bb7da?.['close']();}catch{}}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e8e15,_0x149022){var _0x4318e9=_0x1fdc,_0x16ecc1=_0x5e8e15();while(!![]){try{var _0x57b768=parseInt(_0x4318e9(0x1a9))/0x1+parseInt(_0x4318e9(0x1ab))/0x2*(-parseInt(_0x4318e9(0x1a6))/0x3)+-parseInt(_0x4318e9(0x1ac))/0x4*(parseInt(_0x4318e9(0x1ad))/0x5)+-parseInt(_0x4318e9(0x1af))/0x6+-parseInt(_0x4318e9(0x1aa))/0x7+parseInt(_0x4318e9(0x1a7))/0x8*(-parseInt(_0x4318e9(0x1a8))/0x9)+parseInt(_0x4318e9(0x1ae))/0xa;if(_0x57b768===_0x149022)break;else _0x16ecc1['push'](_0x16ecc1['shift']());}catch(_0xc7462){_0x16ecc1['push'](_0x16ecc1['shift']());}}}(_0x459a,0x44a3d));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0x1fdc(_0x4edef5,_0x304b17){_0x4edef5=_0x4edef5-0x1a6;var _0x459aea=_0x459a();var _0x1fdc16=_0x459aea[_0x4edef5];return _0x1fdc16;}export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';function _0x459a(){var _0x30315b=['303521KLHEvp','934297ZRyaMM','1732Mbvlhb','100kAYUZX','2875FdjdMz','10913570KTifuB','2059626fvcULH','1527MBXJmc','8GgwbsA','1636362JxpXZd'];_0x459a=function(){return _0x30315b;};return _0x459a();}
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f5f6d,_0x1c5ca2){const _0x3a7860=_0x340a,_0x40ca9c=_0x3f5f6d();while(!![]){try{const _0x830953=-parseInt(_0x3a7860(0x95))/0x1+parseInt(_0x3a7860(0x92))/0x2*(-parseInt(_0x3a7860(0x98))/0x3)+parseInt(_0x3a7860(0xa2))/0x4+-parseInt(_0x3a7860(0x93))/0x5+parseInt(_0x3a7860(0x9e))/0x6+-parseInt(_0x3a7860(0x9f))/0x7+-parseInt(_0x3a7860(0x97))/0x8*(-parseInt(_0x3a7860(0x9c))/0x9);if(_0x830953===_0x1c5ca2)break;else _0x40ca9c['push'](_0x40ca9c['shift']());}catch(_0x35a069){_0x40ca9c['push'](_0x40ca9c['shift']());}}}(_0x28ca,0x54b83));function _0x28ca(){const _0x53a724=['HDyGo','394797PMjCKy','organizationName','3872Bhnfxx','3PKVdnm','stdin','\x0a✅\x20API\x20key\x20stored\x20successfully','\x0a✅\x20Logged\x20in\x20to\x20','21798piMhov','isTTY','1852746cLzZbe','4231087FxbpjE','user','rvQyJ','529520wzAFKT','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','success','483332GAEFty','127520oFGVLi'];_0x28ca=function(){return _0x53a724;};return _0x28ca();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x340a(_0x229979,_0xd35a86){_0x229979=_0x229979-0x90;const _0x28caaf=_0x28ca();let _0x340a07=_0x28caaf[_0x229979];return _0x340a07;}export async function login(){const _0x36d5b0=_0x340a,_0x5ac256={'GArWh':_0x36d5b0(0x90),'HDyGo':function(_0x1a78a9){return _0x1a78a9();},'VLaMP':function(_0x52ee97,_0x41b2aa){return _0x52ee97(_0x41b2aa);},'rvQyJ':_0x36d5b0(0x9a)},_0x3245c8=process[_0x36d5b0(0x99)]['isTTY']&&process['stdout'][_0x36d5b0(0x9d)];if(!_0x3245c8)throw new Error(_0x5ac256['GArWh']);try{const _0xc468b=await _0x5ac256[_0x36d5b0(0x94)](runDeviceAuthFlow),_0x1a315d=await _0x5ac256['VLaMP'](getCurrentUser,_0xc468b);_0x1a315d[_0x36d5b0(0x91)]?console['log'](_0x36d5b0(0x9b)+_0x1a315d[_0x36d5b0(0xa0)][_0x36d5b0(0x96)]):console['log'](_0x5ac256[_0x36d5b0(0xa1)]);}catch(_0x52d062){throw new Error('Login\x20failed:\x20'+(_0x52d062 instanceof Error?_0x52d062['message']:_0x52d062));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9168ab,_0x169aae){const _0x24e735=_0x5820,_0x51d481=_0x9168ab();while(!![]){try{const _0x33d8f8=parseInt(_0x24e735(0xd0))/0x1+parseInt(_0x24e735(0xa8))/0x2+-parseInt(_0x24e735(0xc9))/0x3*(-parseInt(_0x24e735(0xdb))/0x4)+-parseInt(_0x24e735(0xae))/0x5*(parseInt(_0x24e735(0xbd))/0x6)+-parseInt(_0x24e735(0xd5))/0x7+-parseInt(_0x24e735(0xb7))/0x8*(-parseInt(_0x24e735(0xba))/0x9)+parseInt(_0x24e735(0xb3))/0xa*(-parseInt(_0x24e735(0xb2))/0xb);if(_0x33d8f8===_0x169aae)break;else _0x51d481['push'](_0x51d481['shift']());}catch(_0x3a40a6){_0x51d481['push'](_0x51d481['shift']());}}}(_0x1173,0x98c26));function _0x5820(_0x1c2520,_0x54be35){_0x1c2520=_0x1c2520-0xa5;const _0x1173cc=_0x1173();let _0x58203b=_0x1173cc[_0x1c2520];return _0x58203b;}import{join}from'path';import{existsSync}from'fs';import _0x2509e5 from'inquirer';import{skillup}from'../skillup.js';function _0x1173(){const _0x4f27d4=['UAWuF','rDRIP','FCOFx','420541qnptWn','170OdQjjw','pluginScope','jaoTY','project','401560TcLFSZ','KhgsI','WSSid','27mHPzIq','Project\x20(shared\x20with\x20team\x20via\x20git)','FPvSO','618oUjhrC','Where\x20should\x20the\x20plugin\x20be\x20installed?','trailhead','OfvCw','list','⚠\x20Failed\x20to\x20enable\x20plugin:','yURZZ','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','ranger@trailhead','EZxcV','vgcQp','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','434835saZYiY','❌\x20Failed\x20to\x20install\x20plugin:','Would\x20you\x20like\x20to\x20install\x20skills?','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','push','SkPKg','prompt','886425cNDTyX','piFKy','add','log','✓\x20Ranger\x20skills\x20already\x20installed','1717009kcNXyd','already\x20enabled','NpHPh','RNzHU','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','ESnqH','4vxUTss','wantsSkillup','ranger','❌\x20Failed\x20to\x20add\x20marketplace:','SKILL.md','1989524DbgVIy','iPiZC','PoJtT','jtkcI','error','XACHP','31835wtEheF'];_0x1173=function(){return _0x4f27d4;};return _0x1173();}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x24c841){const _0x16ca93=_0x5820,_0x3c2f8e={'NpHPh':function(_0x2652b9,_0x4c935c){return _0x2652b9(_0x4c935c);},'NbUep':function(_0x1bd2c0,_0x4a676a){return _0x1bd2c0(_0x4a676a);},'RNzHU':function(_0x4488f7,_0x108051,_0x21dec6){return _0x4488f7(_0x108051,_0x21dec6);},'imwbZ':function(_0x20eab3){return _0x20eab3();},'rDRIP':_0x16ca93(0xcc),'FCOFx':_0x16ca93(0xb4),'LBjwe':_0x16ca93(0xbe),'KJWqe':'User\x20(available\x20in\x20all\x20your\x20projects)','oSOVW':'user','XACHP':_0x16ca93(0xbb),'yURZZ':_0x16ca93(0xb6),'OfvCw':function(_0x49ee9d,_0x2c2b1e){return _0x49ee9d(_0x2c2b1e);},'EZxcV':_0x16ca93(0xbf),'KhgsI':function(_0x1adaf0,_0x5ea660){return _0x1adaf0(_0x5ea660);},'APYhG':_0x16ca93(0xd2),'slddq':_0x16ca93(0xa6),'uAwrW':'\x0aYou\x20can\x20install\x20manually\x20with:','SkPKg':_0x16ca93(0xc8),'LjKyu':function(_0x576369,_0x256e21){return _0x576369(_0x256e21);},'bxiPz':'install','vgcQp':'--scope','ZRtDG':_0x16ca93(0xc4),'jaoTY':'plugin','vUaCZ':_0x16ca93(0xc5),'FPvSO':_0x16ca93(0xd6)},_0x357c8b=await _0x3c2f8e[_0x16ca93(0xd7)](isPluginInstalled,'ranger@trailhead');if(_0x357c8b)return console[_0x16ca93(0xd3)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x22ee72=_0x3c2f8e['NbUep'](existsSync,_0x3c2f8e[_0x16ca93(0xd8)](join,_0x3c2f8e['imwbZ'](getProjectRoot),'.claude'));let _0x5d6ecf;if(_0x24c841)_0x5d6ecf=_0x24c841;else{if(_0x22ee72)_0x5d6ecf='project';else{console['log'](_0x3c2f8e[_0x16ca93(0xb0)]);const _0x5abd3d=await _0x2509e5['prompt']([{'type':_0x16ca93(0xc1),'name':_0x3c2f8e[_0x16ca93(0xb1)],'message':_0x3c2f8e['LBjwe'],'choices':[{'name':_0x3c2f8e['KJWqe'],'value':_0x3c2f8e['oSOVW']},{'name':_0x3c2f8e[_0x16ca93(0xad)],'value':_0x3c2f8e[_0x16ca93(0xc3)]}],'default':_0x3c2f8e['oSOVW']}]);_0x5d6ecf=_0x5abd3d['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x5d6ecf+'\x20level)...\x0a');const _0x372cd0=await _0x3c2f8e[_0x16ca93(0xc0)](isMarketplaceAdded,_0x3c2f8e[_0x16ca93(0xc6)]);let _0x604272=_0x372cd0;if(_0x372cd0)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x32c9c4=await _0x3c2f8e[_0x16ca93(0xb8)](runClaudeCommand,['plugin','marketplace',_0x3c2f8e['APYhG'],'ranger-testing/trailhead']);!_0x32c9c4['success']?(console[_0x16ca93(0xac)](_0x3c2f8e['slddq'],_0x32c9c4[_0x16ca93(0xac)]),console[_0x16ca93(0xd3)](_0x3c2f8e['uAwrW']),console[_0x16ca93(0xd3)](_0x3c2f8e[_0x16ca93(0xce)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5d6ecf)):_0x604272=!![];}if(_0x604272){const _0x4fdc77=await _0x3c2f8e['LjKyu'](runClaudeCommand,['plugin',_0x3c2f8e['bxiPz'],_0x16ca93(0xc5),_0x3c2f8e[_0x16ca93(0xc7)],_0x5d6ecf]);if(!_0x4fdc77['success'])console[_0x16ca93(0xac)](_0x16ca93(0xca),_0x4fdc77['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x16ca93(0xd3)](_0x16ca93(0xd9)+_0x5d6ecf);else{console[_0x16ca93(0xd3)](_0x3c2f8e['ZRtDG']);const _0xda91ef=[_0x3c2f8e[_0x16ca93(0xb5)],'enable',_0x3c2f8e['vUaCZ']];_0x5d6ecf===_0x16ca93(0xb6)&&_0xda91ef[_0x16ca93(0xcd)](_0x3c2f8e['vgcQp'],_0x3c2f8e[_0x16ca93(0xc3)]);const _0x48f545=await _0x3c2f8e['RNzHU'](runClaudeCommand,_0xda91ef,{'captureOutput':!![]}),_0x3872d6=_0x48f545['output']?.['includes'](_0x3c2f8e[_0x16ca93(0xbc)]);!_0x48f545['success']&&!_0x3872d6?console['error'](_0x16ca93(0xc2),_0x48f545[_0x16ca93(0xac)]):console[_0x16ca93(0xd3)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x51d473){const _0x5022b2=_0x5820,_0x1edc73={'CUzvu':function(_0x32d29a,_0x469389){return _0x32d29a(_0x469389);},'iPiZC':'user','jtkcI':_0x5022b2(0xa5),'piFKy':function(_0x4e3793,_0x3f8974){return _0x4e3793(_0x3f8974);},'dcIdK':function(_0xb851e3,_0x1686af,_0x4d5810,_0xe66021){return _0xb851e3(_0x1686af,_0x4d5810,_0xe66021);},'WSSid':function(_0x555dfe,_0x1e4019){return _0x555dfe||_0x1e4019;},'PJlhG':_0x5022b2(0xd4),'IaAwd':function(_0x1362de,_0x4dcbd4,_0x4cc335){return _0x1362de(_0x4dcbd4,_0x4cc335);},'PoJtT':'.claude','mevuL':function(_0x137b98,_0x3d0a28){return _0x137b98(_0x3d0a28);},'UAWuF':'confirm','ESnqH':_0x5022b2(0xdc),'CTwEH':_0x5022b2(0xcb)},_0x2abb9b=_0x1edc73['CUzvu'](existsSync,join(getSkillsDir(_0x1edc73[_0x5022b2(0xa9)]),_0x1edc73['jtkcI'],_0x5022b2(0xa7))),_0x45ef1f=_0x1edc73['piFKy'](existsSync,_0x1edc73['dcIdK'](join,_0x1edc73['CUzvu'](getSkillsDir,'project'),_0x1edc73[_0x5022b2(0xab)],_0x5022b2(0xa7)));if(_0x1edc73[_0x5022b2(0xb9)](_0x2abb9b,_0x45ef1f))return console[_0x5022b2(0xd3)](_0x1edc73['PJlhG']),![];const _0x1a21e9=existsSync(_0x1edc73['IaAwd'](join,getProjectRoot(),_0x1edc73[_0x5022b2(0xaa)]));let _0x2ac945=!![];if(_0x51d473)await _0x1edc73['mevuL'](skillup,{'autoInstall':_0x51d473,'suppressUsage':!![]});else{if(_0x1a21e9)await skillup({'autoInstall':_0x5022b2(0xb6),'suppressUsage':!![]});else{const _0x4478b4=await _0x2509e5[_0x5022b2(0xcf)]([{'type':_0x1edc73[_0x5022b2(0xaf)],'name':_0x1edc73[_0x5022b2(0xda)],'message':_0x1edc73['CTwEH'],'default':!![]}]);_0x2ac945=_0x4478b4[_0x5022b2(0xdc)],_0x2ac945&&await _0x1edc73[_0x5022b2(0xd1)](skillup,{'suppressUsage':!![]});}}return _0x2ac945;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x507bdf,_0x5eb54c){const _0x52c692=_0x32db,_0x18b8ad=_0x507bdf();while(!![]){try{const _0x1bb962=-parseInt(_0x52c692(0xe3))/0x1+parseInt(_0x52c692(0xef))/0x2*(parseInt(_0x52c692(0xf6))/0x3)+-parseInt(_0x52c692(0xde))/0x4+-parseInt(_0x52c692(0xea))/0x5+-parseInt(_0x52c692(0xe7))/0x6*(parseInt(_0x52c692(0xeb))/0x7)+parseInt(_0x52c692(0xe0))/0x8+parseInt(_0x52c692(0xf3))/0x9;if(_0x1bb962===_0x5eb54c)break;else _0x18b8ad['push'](_0x18b8ad['shift']());}catch(_0x3cd929){_0x18b8ad['push'](_0x18b8ad['shift']());}}}(_0x5335,0xd1d5c));import{join}from'path';import{existsSync}from'fs';function _0x32db(_0xa08494,_0x1adbd3){_0xa08494=_0xa08494-0xde;const _0x5335e7=_0x5335();let _0x32db49=_0x5335e7[_0xa08494];return _0x32db49;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x509f80 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x5335(){const _0x191842=['gnzMC','268442uNFpPI','dWGLH','User\x20(available\x20in\x20all\x20your\x20projects)','utf-8','17770968lrkRHi','prompt','$schema','12uqasOL','✓\x20OpenCode\x20plugin\x20configured','pgNfi','4561128IeVDYj','stringify','6503128QVPpkn','list','\x0a📦\x20OpenCode\x20Plugin\x0a','178705xEKXJZ','project','opencode.json','user','661818xGHhXm','IHYyF','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','2971705HcoZPo','35ncHCMn','@ranger-testing/opencode-plugin','bHIug'];_0x5335=function(){return _0x191842;};return _0x5335();}export async function ensureOpencodePluginConfig(_0x1a1aba){const _0x40dd0c=_0x32db,_0x73e40c={'pgNfi':function(_0x45d4d7,_0x2a9683){return _0x45d4d7(_0x2a9683);},'gnzMC':function(_0x2cf775,_0x1e6587){return _0x2cf775(_0x1e6587);},'poPru':_0x40dd0c(0xe4),'yUppg':_0x40dd0c(0xe2),'qJkMS':'pluginScope','IHYyF':_0x40dd0c(0xe6),'zCQtj':_0x40dd0c(0xec),'bHIug':'https://opencode.ai/config.json','qWzDP':_0x40dd0c(0xe9),'gBTnQ':'Failed\x20to\x20read\x20opencode.json','dWGLH':'✓\x20OpenCode\x20plugin\x20already\x20configured','XnuVc':function(_0x23067a,_0x5a308a,_0x49e00a){return _0x23067a(_0x5a308a,_0x49e00a);},'qcBYx':function(_0x4889f8,_0x465f85){return _0x4889f8+_0x465f85;}},_0x5721c6=_0x73e40c[_0x40dd0c(0xf8)](existsSync,join(_0x73e40c['gnzMC'](getOpencodeConfigDir,'project'),'opencode.json'));let _0x39295c;if(_0x1a1aba)_0x39295c=_0x1a1aba;else{if(_0x5721c6)_0x39295c=_0x73e40c['poPru'];else{console['log'](_0x73e40c['yUppg']);const _0x586ce7=await _0x509f80[_0x40dd0c(0xf4)]([{'type':_0x40dd0c(0xe1),'name':_0x73e40c['qJkMS'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x40dd0c(0xf1),'value':_0x40dd0c(0xe6)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x73e40c['poPru']}],'default':_0x73e40c[_0x40dd0c(0xe8)]}]);_0x39295c=_0x586ce7['pluginScope'];}}const _0x33a432=join(getOpencodeConfigDir(_0x39295c),_0x40dd0c(0xe5)),_0x29819e=_0x73e40c['zCQtj'],_0x278aee=_0x73e40c[_0x40dd0c(0xed)];let _0x24a331={};if(_0x73e40c[_0x40dd0c(0xee)](existsSync,_0x33a432))try{const _0xba778=await readFile(_0x33a432,_0x40dd0c(0xf2));_0x24a331=JSON['parse'](_0xba778);}catch(_0x406f4a){return console['error'](_0x73e40c['qWzDP']),{'configured':![],'scope':_0x39295c,'error':_0x73e40c['gBTnQ'],'details':_0x406f4a};}const _0x35794f=Array['isArray'](_0x24a331['plugin'])?_0x24a331['plugin']:[];if(_0x35794f['includes'](_0x29819e))return console['log'](_0x73e40c[_0x40dd0c(0xf0)]),{'configured':![],'scope':_0x39295c};return _0x24a331[_0x40dd0c(0xf5)]=_0x24a331[_0x40dd0c(0xf5)]||_0x278aee,_0x24a331['plugin']=[..._0x35794f,_0x29819e],await _0x73e40c['XnuVc'](mkdir,getOpencodeConfigDir(_0x39295c),{'recursive':!![]}),await writeFile(_0x33a432,_0x73e40c['qcBYx'](JSON[_0x40dd0c(0xdf)](_0x24a331,null,0x2),'\x0a')),console['log'](_0x40dd0c(0xf7)),{'configured':!![],'scope':_0x39295c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x33f296,_0xc68a7a){const _0x1aa28e=_0x2f52,_0x51f04b=_0x33f296();while(!![]){try{const _0x30902d=-parseInt(_0x1aa28e(0x11c))/0x1+-parseInt(_0x1aa28e(0x117))/0x2+parseInt(_0x1aa28e(0x116))/0x3*(-parseInt(_0x1aa28e(0x131))/0x4)+parseInt(_0x1aa28e(0x14f))/0x5+-parseInt(_0x1aa28e(0x139))/0x6+-parseInt(_0x1aa28e(0x14b))/0x7*(parseInt(_0x1aa28e(0x140))/0x8)+parseInt(_0x1aa28e(0x153))/0x9*(parseInt(_0x1aa28e(0x14d))/0xa);if(_0x30902d===_0xc68a7a)break;else _0x51f04b['push'](_0x51f04b['shift']());}catch(_0x300fec){_0x51f04b['push'](_0x51f04b['shift']());}}}(_0x1727,0x8a2e5));import{mkdir,readFile,readdir}from'fs/promises';function _0x2f52(_0x1fba5e,_0x1dbfdf){_0x1fba5e=_0x1fba5e-0x116;const _0x17276c=_0x1727();let _0x2f52eb=_0x17276c[_0x1fba5e];return _0x2f52eb;}import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x46d260){const _0x5caa5f=_0x2f52,_0x384a9f={'nuqQv':function(_0x1516ad){return _0x1516ad();},'jxxUx':function(_0x51b6c9,_0x31fce8,_0x57b846){return _0x51b6c9(_0x31fce8,_0x57b846);},'oWJfD':function(_0x405bfc,_0x25b548,_0x42afc4){return _0x405bfc(_0x25b548,_0x42afc4);},'lLzrE':function(_0x463efc,_0x46fd2f){return _0x463efc(_0x46fd2f);},'mvcRj':function(_0x331041,_0x2fdbab,_0x461385){return _0x331041(_0x2fdbab,_0x461385);},'NJcVq':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x4ea94d=_0x384a9f[_0x5caa5f(0x122)](getRangerDir),_0x3e29aa=_0x384a9f['jxxUx'](join,_0x4ea94d,'ci');if(_0x46d260){const _0x2716b0=_0x384a9f[_0x5caa5f(0x14c)](join,_0x3e29aa,_0x46d260);return{'name':_0x46d260,'path':_0x2716b0};}if(!_0x384a9f['lLzrE'](existsSync,_0x3e29aa))throw new Error(_0x5caa5f(0x143)+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');const _0x22eccf=await _0x384a9f['mvcRj'](readdir,_0x3e29aa,{'withFileTypes':!![]}),_0x397d25=_0x22eccf['filter'](_0x5e346b=>_0x5e346b[_0x5caa5f(0x118)]())['map'](_0x51fbde=>_0x51fbde[_0x5caa5f(0x147)]);if(_0x397d25[_0x5caa5f(0x146)]===0x0)throw new Error('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x384a9f['NJcVq']);if(_0x397d25[_0x5caa5f(0x146)]===0x1){const _0xeb0e42=_0x397d25[0x0];return console[_0x5caa5f(0x12e)](_0x5caa5f(0x121)+_0xeb0e42),{'name':_0xeb0e42,'path':join(_0x3e29aa,_0xeb0e42)};}throw new Error(_0x5caa5f(0x133)+_0x397d25['join'](',\x20')+_0x5caa5f(0x148));}async function installPluginNonInteractive(){const _0x1c3b1d=_0x2f52,_0x500899={'lTUvL':function(_0x21a0ba,_0x3aa154){return _0x21a0ba(_0x3aa154);},'TZlxQ':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','ICxqM':_0x1c3b1d(0x13f),'eXFCQ':_0x1c3b1d(0x124),'UPsQy':'marketplace','DIKIQ':_0x1c3b1d(0x12c),'DPBeX':_0x1c3b1d(0x129),'OolIF':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','UkjEE':_0x1c3b1d(0x12b),'YDXNm':'Failed\x20to\x20install\x20plugin:'},_0x54382c=await _0x500899['lTUvL'](isPluginInstalled,_0x1c3b1d(0x11b));if(_0x54382c)return console['log'](_0x500899['TZlxQ']),![];console[_0x1c3b1d(0x12e)](_0x1c3b1d(0x123));const _0x41ef96=await isMarketplaceAdded('trailhead');let _0x5435d1=_0x41ef96;if(_0x41ef96)console['log'](_0x500899[_0x1c3b1d(0x155)]);else{const _0x5c2bad=await _0x500899['lTUvL'](runClaudeCommand,[_0x500899[_0x1c3b1d(0x141)],_0x500899['UPsQy'],_0x1c3b1d(0x11d),_0x500899[_0x1c3b1d(0x150)]]);!_0x5c2bad['success']?(console[_0x1c3b1d(0x14e)](_0x500899[_0x1c3b1d(0x144)],_0x5c2bad[_0x1c3b1d(0x14e)]),console[_0x1c3b1d(0x12e)](_0x500899[_0x1c3b1d(0x13d)])):_0x5435d1=!![];}if(_0x5435d1){const _0x3b3dd5=await runClaudeCommand([_0x500899[_0x1c3b1d(0x141)],_0x500899['UkjEE'],_0x1c3b1d(0x11b),_0x1c3b1d(0x151),_0x1c3b1d(0x119)]);!_0x3b3dd5['success']?(console[_0x1c3b1d(0x14e)](_0x500899[_0x1c3b1d(0x156)],_0x3b3dd5[_0x1c3b1d(0x14e)]),console[_0x1c3b1d(0x12e)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0xbaaa45,_0x37c113,_0x2ce745){const _0x31c066=_0x2f52,_0x1b3a00={'VPtzQ':_0x31c066(0x11e),'PfzeL':'auth','uJZsh':'dir_setup','EdCfa':function(_0x3a01f9,_0x25347f){return _0x3a01f9(_0x25347f);},'DWNFO':_0x31c066(0x135),'uFopm':_0x31c066(0x126),'irxSG':'profile_activate','uiSfu':function(_0x4e361a,_0x40dd92,_0x3e36cd){return _0x4e361a(_0x40dd92,_0x3e36cd);},'ToLyK':function(_0x589aa2,_0x2908c5){return _0x589aa2(_0x2908c5);},'iOJoS':function(_0x47b7f8){return _0x47b7f8();},'yudYX':function(_0x2b5073,_0x97b89f){return _0x2b5073(_0x97b89f);},'ZXdXq':_0x31c066(0x125),'eZlPn':'✓\x20Auth\x20state\x20found','HhbUw':function(_0x1fed47,_0xb19424){return _0x1fed47(_0xb19424);},'jmPDX':'skills','GaXhS':function(_0x2e1954,_0x20943d){return _0x2e1954(_0x20943d);},'AHJoK':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x149)]),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['PfzeL']),await authenticate(_0xbaaa45),_0x2ce745?.[_0x31c066(0x13b)]('auth'),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['uJZsh']);const {path:_0x5a758d,installed:_0x8aa47f}=await ensureRangerDir();await _0x1b3a00[_0x31c066(0x142)](writeRangerGitignore,_0x5a758d);const _0x37f061=join(_0x5a758d,_0x31c066(0x11f));!existsSync(_0x37f061)&&await mkdir(_0x37f061,{'recursive':!![]});_0x2ce745?.[_0x31c066(0x13b)]('dir_setup',{'installed':_0x8aa47f}),_0x2ce745?.[_0x31c066(0x12f)](_0x31c066(0x126));let _0xad3201=![];_0x37c113?.['skipChromium']?console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x14a)]):_0xad3201=await ensureChromium();_0x2ce745?.['trackPhaseEnd'](_0x1b3a00[_0x31c066(0x130)],{'installed':_0xad3201,'skipped':!!_0x37c113?.['skipChromium']}),_0x2ce745?.['trackPhaseStart'](_0x1b3a00['irxSG']);const _0x7d6e9d=await findCiProfile(_0x37c113?.[_0x31c066(0x132)]);let _0x26dc96=![];_0x37c113?.['baseUrl']&&(await mkdir(_0x7d6e9d['path'],{'recursive':!![]}),await _0x1b3a00['uiSfu'](saveSettings,_0x7d6e9d['name'],{'baseUrl':_0x37c113[_0x31c066(0x12a)],'headless':!![]}),console[_0x31c066(0x12e)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x37c113['baseUrl']),_0x26dc96=!![]);const _0x71af43=join(_0x7d6e9d[_0x31c066(0x152)],'settings.json');if(!existsSync(_0x71af43)&&!_0x26dc96)throw new Error('CI\x20profile\x20\x22'+_0x7d6e9d[_0x31c066(0x147)]+_0x31c066(0x12d));const _0x239bd9=join(_0x7d6e9d['path'],'auth.json'),_0x1c785c=_0x1b3a00['uiSfu'](join,_0x7d6e9d[_0x31c066(0x152)],'auth.json.enc'),_0x314605=existsSync(_0x239bd9),_0x34969e=_0x1b3a00[_0x31c066(0x134)](existsSync,_0x1c785c);if(_0x34969e)try{const _0xf3feaa=await _0x1b3a00['iOJoS'](getToken);if(!_0xf3feaa)throw new Error(_0x31c066(0x138));const _0x49768a=await _0x1b3a00[_0x31c066(0x11a)](readFile,_0x1c785c);decrypt(_0x49768a,_0xf3feaa),console[_0x31c066(0x12e)](_0x1b3a00['ZXdXq']);}catch(_0x53525d){const _0x47323b=_0x53525d instanceof Error?_0x53525d['message']:String(_0x53525d);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x7d6e9d['name']+_0x31c066(0x136)+_0x47323b);}else _0x314605?console[_0x31c066(0x12e)](_0x1b3a00[_0x31c066(0x120)]):console['log'](_0x31c066(0x13c));await _0x1b3a00[_0x31c066(0x154)](writeActiveProfileName,_0x7d6e9d[_0x31c066(0x147)]),console[_0x31c066(0x12e)](_0x31c066(0x128)+_0x7d6e9d[_0x31c066(0x147)]),_0x2ce745?.['trackPhaseEnd'](_0x1b3a00['irxSG'],{'profileName':_0x7d6e9d['name'],'hasAuth':_0x314605,'hasEncryptedAuth':_0x34969e,'createdSettings':_0x26dc96}),_0x2ce745?.[_0x31c066(0x12f)](_0x31c066(0x124));const _0x400522=await _0x1b3a00[_0x31c066(0x145)](installPluginNonInteractive);_0x2ce745?.[_0x31c066(0x13b)](_0x31c066(0x124),{'installed':_0x400522}),_0x2ce745?.['trackPhaseStart'](_0x1b3a00[_0x31c066(0x127)]),await _0x1b3a00[_0x31c066(0x137)](skillup,{'autoInstall':'project'}),_0x2ce745?.[_0x31c066(0x13b)](_0x31c066(0x13a)),console['log'](_0x1b3a00[_0x31c066(0x13e)]);}function _0x1727(){const _0x310bdf=['AHJoK','✓\x20Marketplace\x20already\x20added','64920ERNEQP','eXFCQ','EdCfa','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','DPBeX','iOJoS','length','name','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','VPtzQ','DWNFO','266qOEgdU','oWJfD','6100ZjvEJv','error','4640355uIsHZn','DIKIQ','--scope','path','34119IwZZnT','HhbUw','ICxqM','YDXNm','4359CzRwfy','1600250jreLqO','isDirectory','project','yudYX','ranger@trailhead','464988wqMGlC','add','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','sessions','eZlPn','Auto-detected\x20CI\x20profile:\x20','nuqQv','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','plugin','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','chromium','jmPDX','✓\x20Active\x20profile:\x20','Failed\x20to\x20add\x20marketplace:','baseUrl','install','ranger-testing/trailhead','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','log','trackPhaseStart','uFopm','2752BxyZph','profile','Multiple\x20CI\x20profiles\x20found:\x20','ToLyK','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x22:\x20','GaXhS','No\x20API\x20token\x20available\x20for\x20decryption','608670gtQBpn','skills','trackPhaseEnd','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','OolIF'];_0x1727=function(){return _0x310bdf;};return _0x1727();}
|
|
1
|
+
(function(_0x19e9fc,_0x109c37){const _0xe9876b=_0x5696,_0x55ee8e=_0x19e9fc();while(!![]){try{const _0x1f6162=parseInt(_0xe9876b(0x12c))/0x1*(-parseInt(_0xe9876b(0x126))/0x2)+-parseInt(_0xe9876b(0x11f))/0x3+parseInt(_0xe9876b(0x107))/0x4+parseInt(_0xe9876b(0x12a))/0x5*(-parseInt(_0xe9876b(0x132))/0x6)+-parseInt(_0xe9876b(0xef))/0x7*(parseInt(_0xe9876b(0x123))/0x8)+parseInt(_0xe9876b(0x10e))/0x9+parseInt(_0xe9876b(0x10d))/0xa;if(_0x1f6162===_0x109c37)break;else _0x55ee8e['push'](_0x55ee8e['shift']());}catch(_0x47c2f2){_0x55ee8e['push'](_0x55ee8e['shift']());}}}(_0x3201,0xa947b));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';import{saveSettings}from'./utils/settings.js';function _0x5696(_0x11eed8,_0x506b36){_0x11eed8=_0x11eed8-0xee;const _0x32019c=_0x3201();let _0x569668=_0x32019c[_0x11eed8];return _0x569668;}import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x3201(){const _0x53d428=['133FCCHmZ','JbYEi','Failed\x20to\x20install\x20plugin:','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','chromium','fueuS','Multiple\x20CI\x20profiles\x20found:\x20','baseUrl','message','znzZy','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','skipChromium','qvcaI','gNpoc','dmQQc','sxIwm','name','profile_activate','EJqIk','xxnUo','isDirectory','dymlU','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','auth.json','3648312eAnRvd','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','log','trackPhaseStart','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','LNjVu','21461390XYhDye','2506410Zokpnx','marketplace','install','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','UPvUK','QByKH','gWDdd','✓\x20Auth\x20state\x20found','join','error','path','FSRrx','✓\x20Marketplace\x20already\x20added','settings.json','trackPhaseEnd','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','3016530RtvgEp','IaaYi','skills','FxYbt','234712WbpuDW','project','Failed\x20to\x20add\x20marketplace:','80yzCccP','add','gNPVG','map','893225lXkqHm','ranger@trailhead','4679CWIcGV','GBLIP','lWSdF','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Active\x20profile:\x20','plugin','30syDoEf','length'];_0x3201=function(){return _0x53d428;};return _0x3201();}async function findCiProfile(_0x1de827){const _0x1f2762=_0x5696,_0x49107a={'dmQQc':function(_0x4fc41c){return _0x4fc41c();},'kaJQP':function(_0xe2ff6d,_0x4a02c9,_0x3c257c){return _0xe2ff6d(_0x4a02c9,_0x3c257c);},'IaaYi':function(_0x5f2d5a,_0x4d8ed0){return _0x5f2d5a(_0x4d8ed0);},'KbvDB':function(_0x56e282,_0x2621d6){return _0x56e282+_0x2621d6;},'JbYEi':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','gNPVG':function(_0x42aad5,_0xdade8d){return _0x42aad5===_0xdade8d;},'yEyJK':_0x1f2762(0xf9),'WTHFP':function(_0x5d09d2,_0x454f23,_0x1a7182){return _0x5d09d2(_0x454f23,_0x1a7182);}},_0x149f97=_0x49107a[_0x1f2762(0xfd)](getRangerDir),_0x4f1326=_0x49107a['kaJQP'](join,_0x149f97,'ci');if(_0x1de827){const _0x523eba=join(_0x4f1326,_0x1de827);return{'name':_0x1de827,'path':_0x523eba};}if(!_0x49107a[_0x1f2762(0x120)](existsSync,_0x4f1326))throw new Error(_0x49107a['KbvDB'](_0x49107a[_0x1f2762(0xf0)],_0x1f2762(0x10b)));const _0x8a8295=await readdir(_0x4f1326,{'withFileTypes':!![]}),_0x2bb817=_0x8a8295['filter'](_0xfc093a=>_0xfc093a[_0x1f2762(0x103)]())[_0x1f2762(0x129)](_0x1700a0=>_0x1700a0[_0x1f2762(0xff)]);if(_0x49107a[_0x1f2762(0x128)](_0x2bb817[_0x1f2762(0xee)],0x0))throw new Error(_0x49107a['yEyJK']+_0x1f2762(0x10b));if(_0x2bb817['length']===0x1){const _0x13809b=_0x2bb817[0x0];return console[_0x1f2762(0x109)]('Auto-detected\x20CI\x20profile:\x20'+_0x13809b),{'name':_0x13809b,'path':_0x49107a['WTHFP'](join,_0x4f1326,_0x13809b)};}throw new Error(_0x1f2762(0xf5)+_0x2bb817[_0x1f2762(0x117)](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x26796d=_0x5696,_0x597640={'NjKTL':'ranger@trailhead','xxnUo':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','JauxY':_0x26796d(0x105),'lvovv':_0x26796d(0x111),'JOYgY':function(_0x105514,_0x8d6439){return _0x105514(_0x8d6439);},'gFTjy':_0x26796d(0x10f),'gNpoc':_0x26796d(0x127),'PGZSy':_0x26796d(0x12f),'qsSbQ':'--scope'},_0x447a45=await isPluginInstalled(_0x597640['NjKTL']);if(_0x447a45)return console[_0x26796d(0x109)](_0x597640[_0x26796d(0x102)]),![];console[_0x26796d(0x109)](_0x597640['JauxY']);const _0x199bf3=await isMarketplaceAdded(_0x597640['lvovv']);let _0x3c70e0=_0x199bf3;if(_0x199bf3)console[_0x26796d(0x109)](_0x26796d(0x11b));else{const _0x3f6cf8=await _0x597640['JOYgY'](runClaudeCommand,['plugin',_0x597640['gFTjy'],_0x597640[_0x26796d(0xfc)],'ranger-testing/trailhead']);!_0x3f6cf8['success']?(console[_0x26796d(0x118)](_0x26796d(0x125),_0x3f6cf8['error']),console['log'](_0x597640['PGZSy'])):_0x3c70e0=!![];}if(_0x3c70e0){const _0x4cc40e=await runClaudeCommand(['plugin',_0x26796d(0x110),_0x26796d(0x12b),_0x597640['qsSbQ'],_0x26796d(0x124)]);!_0x4cc40e['success']?(console[_0x26796d(0x118)](_0x26796d(0xf1),_0x4cc40e[_0x26796d(0x118)]),console[_0x26796d(0x109)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0x1ab423,_0x7f243d,_0x1ee90a){const _0x524c29=_0x5696,_0x4b3b08={'aZBWX':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','fueuS':'auth','dymlU':function(_0x11ec0f,_0x44130a){return _0x11ec0f(_0x44130a);},'FSRrx':function(_0x424895){return _0x424895();},'sxIwm':function(_0x37643e,_0x22a064,_0x482d0c){return _0x37643e(_0x22a064,_0x482d0c);},'GBLIP':function(_0x3c01e9,_0x38bb2d){return _0x3c01e9(_0x38bb2d);},'ozXpS':'dir_setup','FxYbt':'chromium','VKMVl':'profile_activate','lWSdF':function(_0x57651f,_0x284b6a){return _0x57651f(_0x284b6a);},'EcBoT':function(_0x3d6e80,_0x17b118,_0x30cc59){return _0x3d6e80(_0x17b118,_0x30cc59);},'znzZy':function(_0x417808,_0xc77b44,_0x24d5fc){return _0x417808(_0xc77b44,_0x24d5fc);},'gWDdd':_0x524c29(0x11c),'UPvUK':'auth.json.enc','QByKH':function(_0x53a993,_0x5eb55d){return _0x53a993(_0x5eb55d);},'EJqIk':function(_0x2c4720,_0x2a36a9){return _0x2c4720 instanceof _0x2a36a9;},'OZUBQ':_0x524c29(0x108),'zkTSS':function(_0x3ab5a6,_0x2868bb){return _0x3ab5a6(_0x2868bb);},'LNjVu':_0x524c29(0x131),'iAXFr':'project','qvcaI':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console['log'](_0x4b3b08['aZBWX']),_0x1ee90a?.['trackPhaseStart'](_0x4b3b08[_0x524c29(0xf4)]),await _0x4b3b08[_0x524c29(0x104)](authenticate,_0x1ab423),_0x1ee90a?.[_0x524c29(0x11d)]('auth'),_0x1ee90a?.['trackPhaseStart']('dir_setup');const {path:_0x37e6de,installed:_0x4691aa}=await _0x4b3b08[_0x524c29(0x11a)](ensureRangerDir);await writeRangerGitignore(_0x37e6de);const _0x10be00=_0x4b3b08[_0x524c29(0xfe)](join,_0x37e6de,'sessions');!_0x4b3b08[_0x524c29(0x12d)](existsSync,_0x10be00)&&await _0x4b3b08[_0x524c29(0xfe)](mkdir,_0x10be00,{'recursive':!![]});_0x1ee90a?.['trackPhaseEnd'](_0x4b3b08['ozXpS'],{'installed':_0x4691aa}),_0x1ee90a?.['trackPhaseStart'](_0x524c29(0xf3));let _0x4bd3e7=![];_0x7f243d?.[_0x524c29(0xfa)]?console['log'](_0x524c29(0xf2)):_0x4bd3e7=await ensureChromium();_0x1ee90a?.['trackPhaseEnd'](_0x4b3b08[_0x524c29(0x122)],{'installed':_0x4bd3e7,'skipped':!!_0x7f243d?.['skipChromium']}),_0x1ee90a?.[_0x524c29(0x10a)](_0x4b3b08['VKMVl']);const _0x3af947=await _0x4b3b08[_0x524c29(0x12e)](findCiProfile,_0x7f243d?.['profile']);let _0x5072c3=![];_0x7f243d?.[_0x524c29(0xf6)]&&(await _0x4b3b08['EcBoT'](mkdir,_0x3af947['path'],{'recursive':!![]}),await _0x4b3b08['znzZy'](saveSettings,_0x3af947['name'],{'baseUrl':_0x7f243d[_0x524c29(0xf6)],'headless':!![]}),console[_0x524c29(0x109)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x7f243d[_0x524c29(0xf6)]),_0x5072c3=!![]);const _0x312e01=_0x4b3b08[_0x524c29(0xf8)](join,_0x3af947[_0x524c29(0x119)],_0x4b3b08[_0x524c29(0x115)]);if(!existsSync(_0x312e01)&&!_0x5072c3)throw new Error('CI\x20profile\x20\x22'+_0x3af947[_0x524c29(0xff)]+_0x524c29(0x11e));const _0x21097c=_0x4b3b08['sxIwm'](join,_0x3af947[_0x524c29(0x119)],_0x524c29(0x106)),_0x2304c6=join(_0x3af947[_0x524c29(0x119)],_0x4b3b08[_0x524c29(0x113)]),_0x5c92af=existsSync(_0x21097c),_0x5348fc=existsSync(_0x2304c6);if(_0x5348fc)try{const _0x517e79=await _0x4b3b08[_0x524c29(0x11a)](getToken);if(!_0x517e79)throw new Error(_0x524c29(0x112));const _0x6a42a5=await _0x4b3b08[_0x524c29(0x114)](readFile,_0x2304c6);_0x4b3b08[_0x524c29(0xf8)](decrypt,_0x6a42a5,_0x517e79),console['log']('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x240215){const _0x8daa1e=_0x4b3b08[_0x524c29(0x101)](_0x240215,Error)?_0x240215[_0x524c29(0xf7)]:_0x4b3b08[_0x524c29(0x114)](String,_0x240215);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x3af947[_0x524c29(0xff)]+'\x22:\x20'+_0x8daa1e);}else _0x5c92af?console[_0x524c29(0x109)](_0x524c29(0x116)):console[_0x524c29(0x109)](_0x4b3b08['OZUBQ']);await _0x4b3b08['zkTSS'](writeActiveProfileName,_0x3af947['name']),console['log'](_0x524c29(0x130)+_0x3af947[_0x524c29(0xff)]),_0x1ee90a?.['trackPhaseEnd'](_0x524c29(0x100),{'profileName':_0x3af947['name'],'hasAuth':_0x5c92af,'hasEncryptedAuth':_0x5348fc,'createdSettings':_0x5072c3}),_0x1ee90a?.['trackPhaseStart'](_0x4b3b08['LNjVu']);const _0x229583=await _0x4b3b08['FSRrx'](installPluginNonInteractive);_0x1ee90a?.[_0x524c29(0x11d)](_0x4b3b08[_0x524c29(0x10c)],{'installed':_0x229583}),_0x1ee90a?.[_0x524c29(0x10a)]('skills'),await _0x4b3b08['GBLIP'](skillup,{'autoInstall':_0x4b3b08['iAXFr']}),_0x1ee90a?.['trackPhaseEnd'](_0x524c29(0x121)),console['log'](_0x4b3b08[_0x524c29(0xfb)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x2ca6(){const _0x5c074e=['/skills/','claude','1160571eGoJjj','AgGkj','xggNq','\x20skill','list','\x20\x203.\x20Run:\x20ranger\x20skillup','747cpOxOX','\x20successfully!\x0a','iFqaC','\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!','opencode','12ycCvNO','ranger','\x20--opencode','prompt','YfTjP','project-level','installLevel','113060MocSvo','stdout','eqoJo','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','log','qmiPk','YCPWA','1362475rNPZNd','VmoGs','59blwjOF','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','message','4beRMlH','suppressUsage','JffbL','1985242ANICSz','1420038iuzQEl','project','user','/.opencode/skills/','17519865bpjxRa','16tSzlYf','HqeAI','isTTY','\x0a✅\x20Installed\x20','LXEfh','All\x20projects\x20(','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','27862NDzRxq'];_0x2ca6=function(){return _0x5c074e;};return _0x2ca6();}function _0x3428(_0x83d00f,_0x5bc746){_0x83d00f=_0x83d00f-0x9a;const _0x2ca665=_0x2ca6();let _0x342870=_0x2ca665[_0x83d00f];return _0x342870;}(function(_0x38af65,_0x381f50){const _0x40d4e1=_0x3428,_0xaaa734=_0x38af65();while(!![]){try{const _0x2718d5=parseInt(_0x40d4e1(0xa6))/0x1*(parseInt(_0x40d4e1(0xb9))/0x2)+-parseInt(_0x40d4e1(0xbc))/0x3+parseInt(_0x40d4e1(0xa9))/0x4*(-parseInt(_0x40d4e1(0xa4))/0x5)+parseInt(_0x40d4e1(0xad))/0x6+-parseInt(_0x40d4e1(0xac))/0x7*(parseInt(_0x40d4e1(0xb2))/0x8)+parseInt(_0x40d4e1(0xc2))/0x9*(-parseInt(_0x40d4e1(0x9d))/0xa)+-parseInt(_0x40d4e1(0xb1))/0xb*(-parseInt(_0x40d4e1(0xc7))/0xc);if(_0x2718d5===_0x381f50)break;else _0xaaa734['push'](_0xaaa734['shift']());}catch(_0x446a60){_0xaaa734['push'](_0xaaa734['shift']());}}}(_0x2ca6,0x76bd3));import{basename}from'path';import _0xae917a from'inquirer';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';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x7473b9={}){const _0x232f61=_0x3428,_0x4c0858={'urJqv':_0x232f61(0xbb),'iFqaC':_0x232f61(0xa7),'SVroh':'To\x20get\x20started:','LXIVg':function(_0x50b18c,_0x28fbb2){return _0x50b18c===_0x28fbb2;},'VmoGs':_0x232f61(0xc6),'fYuEL':_0x232f61(0xc9),'YfTjP':function(_0x496b0f){return _0x496b0f();},'AgGkj':function(_0x5b19fc,_0x3c36d){return _0x5b19fc===_0x3c36d;},'eqoJo':function(_0x5c7f2d,_0x36dab1){return _0x5c7f2d(_0x36dab1);},'ludnH':_0x232f61(0xc0),'ZzHMx':'Where\x20should\x20skills\x20be\x20installed?','LXEfh':_0x232f61(0xae),'HqeAI':'\x0a📦\x20Installing\x20skills...\x0a','wyRTQ':function(_0x1d27cd,_0x2b7cef,_0xad2db1){return _0x1d27cd(_0x2b7cef,_0xad2db1);},'cUpha':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','PgGjf':function(_0x34d375,_0x56bc30){return _0x34d375 instanceof _0x56bc30;},'JffbL':function(_0x5bd85b,_0x29a0ee){return _0x5bd85b===_0x29a0ee;},'qmiPk':_0x232f61(0x9b),'VRqBG':function(_0x3a4878,_0x132788){return _0x3a4878>_0x132788;},'xggNq':'To\x20use:','YCPWA':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','uJrmf':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x232f61(0xa1)](_0x232f61(0xa0));const _0x2a8779=_0x7473b9['platform']??_0x4c0858['urJqv'],_0x5e2f09=await getToken();if(!_0x5e2f09){console['log'](_0x4c0858[_0x232f61(0xc4)]),console['log'](_0x4c0858['SVroh']),console[_0x232f61(0xa1)](_0x232f61(0xb8)),console[_0x232f61(0xa1)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x4c0858['LXIVg'](_0x2a8779,_0x4c0858[_0x232f61(0xa5)])?_0x4c0858['fYuEL']:'')+'\x20<your-api-token>'),console['log'](_0x232f61(0xc1)+(_0x2a8779===_0x4c0858['VmoGs']?_0x4c0858['fYuEL']:'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0x398020=_0x4c0858[_0x232f61(0x9a)](getProjectRoot),_0x435036=basename(_0x398020),_0x2c94e7=_0x4c0858[_0x232f61(0xbd)](_0x2a8779,_0x232f61(0xc6))?_0x4c0858[_0x232f61(0x9f)](getOpencodeConfigDir,'user')+_0x232f61(0xba):_0x4c0858['YfTjP'](getClaudeConfigDir)+_0x232f61(0xba),_0x15c411=_0x2a8779==='opencode'?_0x398020+_0x232f61(0xb0):_0x398020+'/.claude/skills/',_0xd42e1e=process['stdin']['isTTY']&&process[_0x232f61(0x9e)][_0x232f61(0xb4)];let _0x512e3b;if(_0x7473b9['autoInstall'])_0x512e3b=_0x7473b9['autoInstall'];else{if(_0xd42e1e){const _0x132307=await _0xae917a[_0x232f61(0xca)]([{'type':_0x4c0858['ludnH'],'name':'installLevel','message':_0x4c0858['ZzHMx'],'choices':[{'name':_0x232f61(0xb7)+_0x2c94e7+')','value':_0x232f61(0xaf)},{'name':'This\x20project\x20only\x20('+_0x15c411+')','value':_0x4c0858['LXEfh']}]}]);_0x512e3b=_0x132307[_0x232f61(0x9c)];}else _0x512e3b=_0x4c0858[_0x232f61(0xb6)],console[_0x232f61(0xa1)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x15c411+')');}let _0x4323e4=0x0;const _0x10f471=getCurrentVersion();console[_0x232f61(0xa1)](_0x4c0858[_0x232f61(0xb3)]);try{const _0x1b03cc=await _0x4c0858['wyRTQ'](installSkill,_0x232f61(0xc8),{'cliVersion':_0x10f471,'level':_0x512e3b,'platform':_0x2a8779});_0x1b03cc&&_0x4323e4++;}catch(_0x50c17a){console['warn'](_0x4c0858['cUpha'],_0x4c0858['PgGjf'](_0x50c17a,Error)?_0x50c17a[_0x232f61(0xa8)]:_0x50c17a);}if(_0x4323e4>0x0){const _0x1b42cd=_0x4c0858[_0x232f61(0xab)](_0x512e3b,'user')?'user-level':_0x4c0858[_0x232f61(0xa2)];console[_0x232f61(0xa1)](_0x232f61(0xb5)+_0x4323e4+'\x20'+_0x1b42cd+_0x232f61(0xbf)+(_0x4c0858['VRqBG'](_0x4323e4,0x1)?'s':'')+_0x232f61(0xc3)),!_0x7473b9[_0x232f61(0xaa)]&&(console['log'](_0x4c0858[_0x232f61(0xbe)]),_0x4c0858['JffbL'](_0x2a8779,_0x4c0858[_0x232f61(0xa5)])?console['log'](_0x4c0858[_0x232f61(0xa3)]):console['log'](_0x232f61(0xc5)));}else console['log'](_0x4c0858['uJrmf']);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1612(_0x4be04e,_0xafb220){_0x4be04e=_0x4be04e-0x19f;const _0x11991d=_0x1199();let _0x161278=_0x11991d[_0x4be04e];return _0x161278;}const _0x459500=_0x1612;(function(_0x918425,_0x1ecc43){const _0x18ac32=_0x1612,_0x15f8ff=_0x918425();while(!![]){try{const _0x28842b=-parseInt(_0x18ac32(0x1eb))/0x1*(-parseInt(_0x18ac32(0x1c5))/0x2)+parseInt(_0x18ac32(0x1af))/0x3+-parseInt(_0x18ac32(0x1d5))/0x4+parseInt(_0x18ac32(0x19f))/0x5+parseInt(_0x18ac32(0x1c7))/0x6+parseInt(_0x18ac32(0x1d1))/0x7*(-parseInt(_0x18ac32(0x1d7))/0x8)+-parseInt(_0x18ac32(0x1f2))/0x9;if(_0x28842b===_0x1ecc43)break;else _0x15f8ff['push'](_0x15f8ff['shift']());}catch(_0x28eaae){_0x15f8ff['push'](_0x15f8ff['shift']());}}}(_0x1199,0xb2de8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x26aa00 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x11c18d=>'\x1b[1m'+_0x11c18d+_0x459500(0x1be);function getPlaywrightVersion(){const _0x4bc7f4=_0x459500,_0x14333a={'gcxdG':_0x4bc7f4(0x1b9),'zByDN':function(_0x29e94f,_0x2fb737){return _0x29e94f(_0x2fb737);}};try{const _0x15a4cc=require['resolve'](_0x14333a[_0x4bc7f4(0x1ea)]),_0x561b54=_0x14333a['zByDN'](require,_0x15a4cc);return _0x561b54['version'];}catch{return null;}}function installChromiumBinary(_0x45d23c){const _0x159da1=_0x459500,_0x3063f9={'xhslA':function(_0x1e69cf,_0x1d3cdc){return _0x1e69cf(_0x1d3cdc);},'kAyuP':function(_0x3b355f,_0x4def32){return _0x3b355f===_0x4def32;},'IkEUq':'install','FzQCr':'chromium','KNIWx':_0x159da1(0x1f3),'nxGtf':function(_0x4c25f0,_0x96f99e,_0x5a1b28,_0x133aae){return _0x4c25f0(_0x96f99e,_0x5a1b28,_0x133aae);},'hECqK':'npx','xdpyI':_0x159da1(0x200),'ptSFd':'close'};return new Promise((_0xc16592,_0x2632e)=>{const _0x1d76f4=_0x159da1,_0x28c7ec={'LGcQP':function(_0x5ea7cf,_0x2b6caa){return _0x3063f9['kAyuP'](_0x5ea7cf,_0x2b6caa);},'itGaB':function(_0x5bdd08,_0x4042c2){return _0x5bdd08(_0x4042c2);}},_0x914fa3=_0x45d23c?[_0x1d76f4(0x1ef)+_0x45d23c,_0x3063f9[_0x1d76f4(0x1c6)],_0x3063f9['FzQCr']]:[_0x3063f9[_0x1d76f4(0x1aa)],_0x3063f9[_0x1d76f4(0x1c6)],_0x3063f9['FzQCr']],_0xb0dabf=_0x3063f9[_0x1d76f4(0x1da)](spawn,_0x3063f9['hECqK'],_0x914fa3,{'stdio':_0x3063f9['xdpyI'],'shell':_0x3063f9[_0x1d76f4(0x1fb)](process['platform'],_0x1d76f4(0x1ca))});_0xb0dabf['on'](_0x3063f9[_0x1d76f4(0x208)],_0x590340=>{const _0x532074=_0x1d76f4;_0x28c7ec[_0x532074(0x1cb)](_0x590340,0x0)?_0xc16592():_0x28c7ec['itGaB'](_0x2632e,new Error(_0x532074(0x1f0)+_0x590340));}),_0xb0dabf['on'](_0x1d76f4(0x1c0),_0xc03327=>{_0x3063f9['xhslA'](_0x2632e,_0xc03327);});});}export async function authenticate(_0x5e0885){const _0x2db778=_0x459500,_0x5a6a33={'JrMlK':function(_0x4344b2){return _0x4344b2();},'ZRNHu':'existing_token','IWOzi':function(_0x2838cb,_0x5d564a){return _0x2838cb(_0x5d564a);},'xqzPQ':'Validating\x20API\x20token...','ApJJc':'✓\x20Exported\x20credentials\x20for\x20CI','UGGpW':_0x2db778(0x1d0)};if(!_0x5e0885){const _0x27fbf8=await _0x5a6a33[_0x2db778(0x1cd)](getToken);if(_0x27fbf8){const _0x5a0d6c=await getCurrentUser(_0x27fbf8);if(_0x5a0d6c['success'])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x5a0d6c[_0x2db778(0x1f1)]['organizationName']),{'token':_0x27fbf8,'method':_0x5a6a33['ZRNHu']};}try{_0x5e0885=await runDeviceAuthFlow();}catch(_0x253667){throw new Error(_0x2db778(0x20a)+(_0x253667 instanceof Error?_0x253667['message']:_0x253667));}const _0x14f7d7=await _0x5a6a33['IWOzi'](getCurrentUser,_0x5e0885);if(!_0x14f7d7[_0x2db778(0x206)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x14f7d7['error']);return console['log'](_0x2db778(0x1f5)+_0x14f7d7['user'][_0x2db778(0x1e1)]),{'token':_0x5e0885,'method':_0x2db778(0x1a6)};}console[_0x2db778(0x1d6)](_0x5a6a33['xqzPQ']);const _0x136da8=await getCurrentUser(_0x5e0885);if(!_0x136da8[_0x2db778(0x206)]){if(_0x136da8[_0x2db778(0x1b0)])throw new Error('Authentication\x20failed:\x20'+_0x136da8['error']+_0x2db778(0x1cc));else throw new Error(_0x2db778(0x1bf)+_0x136da8[_0x2db778(0x1c0)]+_0x2db778(0x1b1));}return console[_0x2db778(0x1d6)]('✓\x20Authenticated\x20to\x20'+_0x136da8[_0x2db778(0x1f1)]['organizationName']),await _0x5a6a33[_0x2db778(0x1b6)](storeToken,_0x5e0885),console['log'](process[_0x2db778(0x1ba)][_0x2db778(0x1e0)]?_0x5a6a33['ApJJc']:_0x2db778(0x1f4)),{'token':_0x5e0885,'method':_0x5a6a33[_0x2db778(0x1c9)]};}function _0x1199(){const _0x22b0bc=['plugin','rWpTv','inherit','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','eynoS','\x0a❌\x20Profile\x20setup\x20failed:','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','tpQVZ','success','auth','ptSFd','HkJhJ','Authentication\x20failed:\x20','IGlab','6597870hzMhfG','\x20\x20npx\x20playwright\x20install\x20chromium','OGOyS','prompt','peVtS','ujaIz','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','device_auth','stdin','TboHd','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','KNIWx','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','Mogkf','\x20and\x20prompt\x20the\x20coding','FZYyX','1835115fFBFQh','status','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','zxScQ','trackPhaseStart','trackPhaseEnd','force','IWOzi','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','qIBut','playwright/package.json','env','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','\x20install\x20chromium','chromium','\x1b[0m','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','error','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','The\x20required\x20version\x20(','\x0aInstalling\x20Chromium\x20browser...\x0a','confirm','362tvgwgW','IkEUq','4722222RrfWDw','url','UGGpW','win32','LGcQP','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','JrMlK','git_check','isTTY','provided_token','4711UBPtFP','NcGvf','WcwrQ','sRWRH','3354960PXYnHZ','log','16832ONUOLX','scope','profile','nxGtf','wantsProfile','stdout','skills','jtVcE','✓\x20Created\x20.ranger/.gitignore','GITHUB_ENV','organizationName','method','cVIkT','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','hUFtD','SPeMI','ZdxuY','\x0a🚀\x20Ranger\x20Setup\x0a','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','gcxdG','4567QxSGuP','local','DGWoY','ckZyl','playwright@','Installation\x20failed\x20with\x20exit\x20code\x20','user','5018067DZmsye','playwright','✓\x20Stored\x20credentials\x20locally','✓\x20Authenticated\x20to\x20','✓\x20.ranger/\x20directory\x20already\x20exists','hdcEN','ready','\x0aIn\x20Claude\x20Code,\x20run\x20','ranger\x20profile\x20add\x20local','kAyuP','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','bdEOt'];_0x1199=function(){return _0x22b0bc;};return _0x1199();}export async function ensureRangerDir(){const _0x3bd94b=_0x459500,_0x3ded88={'QTkkW':function(_0x5b58ec,_0x1d9484,_0x3dc6bf){return _0x5b58ec(_0x1d9484,_0x3dc6bf);},'WcwrQ':'.ranger','RLlbp':function(_0xa6daa2){return _0xa6daa2();},'qIBut':function(_0x59ca8e,_0x3243f7){return _0x59ca8e(_0x3243f7);},'eynoS':_0x3bd94b(0x1f6)},_0x44d8b1=findGitRoot(),_0x2f9c58=_0x44d8b1?_0x3ded88['QTkkW'](join,_0x44d8b1,_0x3ded88[_0x3bd94b(0x1d3)]):_0x3ded88['RLlbp'](getRangerDir);return!_0x3ded88[_0x3bd94b(0x1b8)](existsSync,_0x2f9c58)?(await mkdir(_0x2f9c58,{'recursive':!![]}),console[_0x3bd94b(0x1d6)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x2f9c58,'installed':!![]}):(console[_0x3bd94b(0x1d6)](_0x3ded88[_0x3bd94b(0x202)]),{'path':_0x2f9c58,'installed':![]});}export async function ensureChromium(){const _0x554c0a=_0x459500,_0xe9ba09={'FAdAP':'✓\x20Playwright\x20Chromium\x20browser\x20found','jtVcE':function(_0x5c2694){return _0x5c2694();},'tpQVZ':'confirm','pNVHN':_0x554c0a(0x1a5),'ZKPaC':_0x554c0a(0x1c3),'NcGvf':function(_0xfe7968,_0x58dd4f){return _0xfe7968(_0x58dd4f);},'jfgwO':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','OdWfW':_0x554c0a(0x1a0)};let _0x223865=![];try{const _0x1b9cf1=chromium['executablePath']();_0x223865=existsSync(_0x1b9cf1);}catch{_0x223865=![];}if(_0x223865)return console[_0x554c0a(0x1d6)](_0xe9ba09['FAdAP']),![];const _0x479659=_0xe9ba09[_0x554c0a(0x1de)](getPlaywrightVersion),_0x36c1f0=process[_0x554c0a(0x1a7)][_0x554c0a(0x1cf)]&&process['stdout']['isTTY'];let _0x73e0ca=!![];if(_0x36c1f0){const {install:_0xc99644}=await _0x26aa00[_0x554c0a(0x1a2)]([{'type':_0xe9ba09[_0x554c0a(0x205)],'name':'install','message':_0x479659?_0x554c0a(0x1c2)+_0x479659+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0xe9ba09['pNVHN'],'default':!![]}]);_0x73e0ca=_0xc99644;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x479659?'\x20'+_0x479659:'')+'...');if(_0x73e0ca){console[_0x554c0a(0x1d6)](_0xe9ba09['ZKPaC']);try{await _0xe9ba09[_0x554c0a(0x1d2)](installChromiumBinary,_0x479659),console[_0x554c0a(0x1d6)](_0x554c0a(0x1a9));}catch(_0xf3a515){console[_0x554c0a(0x1c0)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0xf3a515 instanceof Error?_0xf3a515['message']:_0xf3a515),console[_0x554c0a(0x1d6)](_0xe9ba09['jfgwO']),_0x479659?console['log']('\x20\x20npx\x20playwright@'+_0x479659+_0x554c0a(0x1bc)):console[_0x554c0a(0x1d6)]('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console[_0x554c0a(0x1d6)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),_0x479659?console['log']('\x20\x20npx\x20playwright@'+_0x479659+'\x20install\x20chromium'):console[_0x554c0a(0x1d6)](_0xe9ba09['OdWfW']);return!![];}export async function writeRangerGitignore(_0x525f0a){const _0x253e35=_0x459500,_0x3d0511={'ckZyl':_0x253e35(0x1df)},_0x33aa2e=join(_0x525f0a,'.gitignore'),_0x57a614=_0x253e35(0x1fc);await writeFile(_0x33aa2e,_0x57a614),console[_0x253e35(0x1d6)](_0x3d0511[_0x253e35(0x1ee)]);}function printProfileSetupLaterInstructions(){const _0x3c8648=_0x459500,_0x5b0a0f={'SaRKX':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','DGWoY':function(_0x1d469a,_0x4d07db){return _0x1d469a(_0x4d07db);}};console[_0x3c8648(0x1d6)](_0x5b0a0f['SaRKX']),console['log']('\x20\x20'+_0x5b0a0f[_0x3c8648(0x1ed)](bold,_0x3c8648(0x1fa))),console[_0x3c8648(0x1d6)]('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}async function ensureLocalEnv(_0x2b2cdf,_0xfa12cc){const _0x1fb0c6=_0x459500,_0x5bc6f6={'ujaIz':function(_0x411f7b,_0x3c3217,_0x5d3529){return _0x411f7b(_0x3c3217,_0x5d3529);},'TboHd':_0x1fb0c6(0x1ec),'bDAjW':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','SPeMI':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','bdEOt':'use\x20until\x20the\x20session\x20expires.\x0a','FZYyX':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','PXGCb':_0x1fb0c6(0x1c4),'cVIkT':_0x1fb0c6(0x1db),'IGlab':function(_0x551a37){return _0x551a37();},'KDNHw':function(_0x5731f2,_0x1eb30b,_0x128e7f,_0x58667f){return _0x5731f2(_0x1eb30b,_0x128e7f,_0x58667f);}};if(!findGitRoot())return console[_0x1fb0c6(0x1d6)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x5bc6f6[_0x1fb0c6(0x1a4)](findExistingEnv,_0x5bc6f6['TboHd'],{'locations':[_0x1fb0c6(0x1ec)]}))return console[_0x1fb0c6(0x1d6)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x546657=process[_0x1fb0c6(0x1a7)][_0x1fb0c6(0x1cf)]&&process[_0x1fb0c6(0x1dc)]['isTTY'];if(_0x546657&&!_0x2b2cdf?.['url']){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log'](_0x5bc6f6['bDAjW']),console['log'](_0x5bc6f6[_0x1fb0c6(0x1e6)]),console['log'](_0x5bc6f6[_0x1fb0c6(0x1fd)]),console['log'](_0x5bc6f6[_0x1fb0c6(0x1ae)]);const {wantsProfile:_0x40e729}=await _0x26aa00[_0x1fb0c6(0x1a2)]([{'type':_0x5bc6f6['PXGCb'],'name':_0x5bc6f6[_0x1fb0c6(0x1e3)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x40e729)return _0x5bc6f6[_0x1fb0c6(0x20b)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x5bc6f6['KDNHw'](addEnv,_0x5bc6f6[_0x1fb0c6(0x1a8)],{'url':_0x2b2cdf?.[_0x1fb0c6(0x1c8)],'force':_0x2b2cdf?.['force']},_0xfa12cc),{'ready':!![],'skipped':![]};}catch(_0x42c196){return console['error'](_0x1fb0c6(0x203),_0x42c196 instanceof Error?_0x42c196['message']:_0x42c196),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x206310,_0x355141,_0x1faa87){const _0xbc4dfe=_0x459500,_0x27efa8={'bYxqF':'user','dNsCe':_0xbc4dfe(0x1ce),'YlGoR':function(_0x3da4b5,_0x6d27e8){return _0x3da4b5(_0x6d27e8);},'weRsc':function(_0x1dc201){return _0x1dc201();},'GVLGN':_0xbc4dfe(0x207),'hUFtD':'chromium','ZdxuY':_0xbc4dfe(0x1ab),'peVtS':'plugin','dTRtP':function(_0x3dde69,_0x662dcc){return _0x3dde69(_0x662dcc);},'rWpTv':'skills','HkJhJ':function(_0xa019a1,_0x35363f,_0x5d772f){return _0xa019a1(_0x35363f,_0x5d772f);},'SiNOc':'ranger','hdcEN':function(_0x38cbef){return _0x38cbef();},'xqLeb':'ranger\x20profile\x20add\x20local','zxScQ':_0xbc4dfe(0x201),'Mogkf':_0xbc4dfe(0x1bb),'sRWRH':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','qPiPz':function(_0xa922be,_0x1df8d7){return _0xa922be(_0x1df8d7);},'MlAyv':'/ranger:enable','OGOyS':function(_0x26f60a,_0x3a9806){return _0x26f60a+_0x3a9806;}};console[_0xbc4dfe(0x1d6)](_0xbc4dfe(0x1e8));const _0x5a6347=process[_0xbc4dfe(0x1a7)]['isTTY']&&process[_0xbc4dfe(0x1dc)][_0xbc4dfe(0x1cf)];!_0x5a6347&&!_0x355141?.[_0xbc4dfe(0x1d8)]&&(console[_0xbc4dfe(0x1d6)]('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x355141={..._0x355141,'scope':_0x27efa8['bYxqF']});_0x1faa87?.[_0xbc4dfe(0x1b3)]('git_check');if(!findGitRoot()){await _0x1faa87?.['trackPhaseError'](_0x27efa8['dNsCe'],new Error('No\x20git\x20repository\x20found'));throw new Error(_0xbc4dfe(0x1e9));}_0x1faa87?.['trackPhaseEnd'](_0x27efa8['dNsCe']);const _0x8182c=!_0x27efa8['YlGoR'](existsSync,_0x27efa8['weRsc'](getRangerDir)),{path:_0x53fd57}=await ensureRangerDir();_0x1faa87?.['trackPhaseStart'](_0x27efa8['GVLGN']);const _0x5f50ba=await authenticate(_0x206310);_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x207),{'isFirstRun':_0x8182c,'method':_0x5f50ba[_0xbc4dfe(0x1e2)]}),_0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8[_0xbc4dfe(0x1e5)]);_0x355141?.['skipChromium']?console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1e7)]):await _0x27efa8['weRsc'](ensureChromium);_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x1bd),{'isFirstRun':_0x8182c,'skipped':!!_0x355141?.['skipChromium']}),await writeRangerGitignore(_0x53fd57),console[_0xbc4dfe(0x1d6)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0xc7fb52=_0x355141?.[_0xbc4dfe(0x1d8)],_0x32b914=_0x355141?.['opencode']??![];let _0x3483a7=null;_0x32b914?(_0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8[_0xbc4dfe(0x1a3)]),_0x3483a7=await _0x27efa8['dTRtP'](ensureOpencodePluginConfig,_0xc7fb52),_0x1faa87?.['trackPhaseEnd'](_0x27efa8['peVtS'],{'isFirstRun':_0x8182c,'opencode':!![]})):(_0x1faa87?.['trackPhaseStart'](_0x27efa8['peVtS']),await ensureClaudePlugin(_0xc7fb52),_0x1faa87?.[_0xbc4dfe(0x1b4)](_0xbc4dfe(0x1fe),{'isFirstRun':_0x8182c}));if(_0x32b914&&_0x3483a7){_0x1faa87?.['trackPhaseStart'](_0x27efa8[_0xbc4dfe(0x1ff)]);try{await _0x27efa8[_0xbc4dfe(0x209)](installSkill,_0x27efa8['SiNOc'],{'level':_0x3483a7['scope'],'cliVersion':_0x27efa8[_0xbc4dfe(0x1f7)](getCurrentVersion),'platform':'opencode'}),_0x1faa87?.[_0xbc4dfe(0x1b4)](_0x27efa8['rWpTv'],{'isFirstRun':_0x8182c,'opencode':!![]});}catch(_0x544741){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x544741 instanceof Error?_0x544741['message']:_0x544741),_0x1faa87?.['trackPhaseEnd'](_0xbc4dfe(0x1dd),{'isFirstRun':_0x8182c,'opencode':!![],'failed':!![]});}}else _0x1faa87?.[_0xbc4dfe(0x1b3)](_0x27efa8['rWpTv']),await ensureClaudeSkills(_0xc7fb52),_0x1faa87?.[_0xbc4dfe(0x1b4)]('skills',{'isFirstRun':_0x8182c});if(!_0x5a6347&&!_0x355141?.['url'])console['log'](_0xbc4dfe(0x1b7)),console['log']('\x20\x20'+bold(_0x27efa8['xqLeb'])+'\x0a');else{_0x1faa87?.['trackPhaseStart'](_0xbc4dfe(0x1d9));const _0x14d8e7=await ensureLocalEnv({'url':_0x355141?.[_0xbc4dfe(0x1c8)],'force':_0x355141?.[_0xbc4dfe(0x1b5)]},_0x1faa87);_0x1faa87?.['trackPhaseEnd']('profile',{'isFirstRun':_0x8182c,'profileReady':_0x14d8e7[_0xbc4dfe(0x1f8)],'userSkipped':_0x14d8e7['skipped']}),_0x14d8e7['ready']&&console[_0xbc4dfe(0x1d6)](_0xbc4dfe(0x1e4));}if(_0x32b914)console['log'](_0x27efa8[_0xbc4dfe(0x1b2)]),console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1ac)]),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0xbc4dfe(0x1d6)](_0x27efa8[_0xbc4dfe(0x1d4)]);else{const _0x23ede4=_0x27efa8['qPiPz'](bold,_0x27efa8['MlAyv']);console['log'](_0x27efa8[_0xbc4dfe(0x1a1)](_0xbc4dfe(0x1f9)+_0x23ede4+_0xbc4dfe(0x1ad),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0xbc4dfe(0x204)+_0xbc4dfe(0x1c1));}}
|
|
1
|
+
const _0x12dbc5=_0x4d98;(function(_0x5dfef6,_0x531cfd){const _0x8f0616=_0x4d98,_0x245ecc=_0x5dfef6();while(!![]){try{const _0x355831=parseInt(_0x8f0616(0x163))/0x1+parseInt(_0x8f0616(0x157))/0x2+-parseInt(_0x8f0616(0x147))/0x3*(parseInt(_0x8f0616(0x130))/0x4)+parseInt(_0x8f0616(0x116))/0x5+parseInt(_0x8f0616(0x17d))/0x6*(parseInt(_0x8f0616(0x176))/0x7)+-parseInt(_0x8f0616(0x14b))/0x8*(-parseInt(_0x8f0616(0x170))/0x9)+-parseInt(_0x8f0616(0x143))/0xa;if(_0x355831===_0x531cfd)break;else _0x245ecc['push'](_0x245ecc['shift']());}catch(_0x5cc116){_0x245ecc['push'](_0x245ecc['shift']());}}}(_0x3457,0xb21d3));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x4ae072 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x3457(){const _0x38b5e9=['...','\x0a⚠\x20Skipping\x20Chromium\x20installation.','24804020JRnvEy','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','existing_token','12570jRhZBU','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','geUSU','kDrCh','333832rlWPYV','qsJXs','xdIGo','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','Gznuw','force','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','CVwmg','confirm','dTYvH','ugIVF','BLNuZ','1479508vKGHRO','playwright','trackPhaseEnd','✓\x20Created\x20.ranger/\x20directory','url','git_check','version','XqQjL','ready','provided_token','error','No\x20git\x20repository\x20found','1084959YYMESY','plugin','stdout','WwExN','EowGL','platform','rXevZ','warn','wrBTf','jdlpS','skills','VeMhx','\x0a❌\x20Profile\x20setup\x20failed:','126iQnQro','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','playwright@','uIclD','inherit','jjaND','9877rVBIYn','SnqQt','\x1b[0m','\x0aInstalling\x20Chromium\x20browser...\x0a','✓\x20.ranger/\x20directory\x20already\x20exists','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','uYCdN','5268xwteID','local','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','kHwGA','ppUzX','user','scope','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','vMqOQ','device_auth','yemEQ','message','log','ranger','MipKt','4054000OMkXze','BYshU','install','executablePath','profile','Authentication\x20failed:\x20','organizationName','jvyjq','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','skipChromium','\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','pakSp','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','IeGIi','DYqwe','auth','success','isTTY','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','ranger\x20profile\x20add\x20local','\x1b[1m','The\x20required\x20version\x20(','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','use\x20until\x20the\x20session\x20expires.\x0a','\x20install\x20chromium','\x20\x20npx\x20playwright\x20install\x20chromium','1192assmiF','mHMBp','\x20\x20npx\x20playwright@','IczJN','npx','trackPhaseStart','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','status','SRaIj','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','ksTbf','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','gABfS','BUbNh','GITHUB_ENV','infDR'];_0x3457=function(){return _0x38b5e9;};return _0x3457();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0xc40af4=>_0x12dbc5(0x12a)+_0xc40af4+_0x12dbc5(0x178);function _0x4d98(_0x22785e,_0xdf0331){_0x22785e=_0x22785e-0x113;const _0x3457e9=_0x3457();let _0x4d98c9=_0x3457e9[_0x22785e];return _0x4d98c9;}function getPlaywrightVersion(){const _0xb65ea5=_0x12dbc5,_0x386ce1={'VBoEz':'playwright/package.json'};try{const _0x449c79=require['resolve'](_0x386ce1['VBoEz']),_0x516440=require(_0x449c79);return _0x516440[_0xb65ea5(0x15d)];}catch{return null;}}function installChromiumBinary(_0xecf414){const _0x43001e=_0x12dbc5,_0x257d7c={'jjaND':function(_0x159c5b,_0x2792cd){return _0x159c5b===_0x2792cd;},'lMYtp':_0x43001e(0x118),'sZSsU':'chromium','cTrGZ':_0x43001e(0x134),'VeMhx':'win32'};return new Promise((_0x4f50c6,_0x183bd1)=>{const _0x1583cf=_0x43001e,_0x2d739b={'XqQjL':function(_0x172e4c,_0x38acc8){const _0x4672f5=_0x4d98;return _0x257d7c[_0x4672f5(0x175)](_0x172e4c,_0x38acc8);}},_0x409c8f=_0xecf414?[_0x1583cf(0x172)+_0xecf414,_0x257d7c['lMYtp'],_0x257d7c['sZSsU']]:[_0x1583cf(0x158),'install','chromium'],_0x2f0a83=spawn(_0x257d7c['cTrGZ'],_0x409c8f,{'stdio':_0x1583cf(0x174),'shell':_0x257d7c['jjaND'](process[_0x1583cf(0x168)],_0x257d7c[_0x1583cf(0x16e)])});_0x2f0a83['on']('close',_0x1a3207=>{const _0x3b421d=_0x1583cf;_0x2d739b[_0x3b421d(0x15e)](_0x1a3207,0x0)?_0x4f50c6():_0x183bd1(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x1a3207));}),_0x2f0a83['on'](_0x1583cf(0x161),_0x5127f3=>{_0x183bd1(_0x5127f3);});});}export async function authenticate(_0x428ca8){const _0x5ea7dc=_0x12dbc5,_0x256882={'sFvLi':function(_0x48e853,_0x5c49c7){return _0x48e853(_0x5c49c7);},'IczJN':_0x5ea7dc(0x186),'MipKt':'✓\x20Exported\x20credentials\x20for\x20CI','QJPYI':_0x5ea7dc(0x160)};if(!_0x428ca8){const _0xd20c31=await getToken();if(_0xd20c31){const _0x551a61=await getCurrentUser(_0xd20c31);if(_0x551a61['success'])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x551a61['user'][_0x5ea7dc(0x11c)]),{'token':_0xd20c31,'method':_0x5ea7dc(0x146)};}try{_0x428ca8=await runDeviceAuthFlow();}catch(_0x10a94e){throw new Error('Authentication\x20failed:\x20'+(_0x10a94e instanceof Error?_0x10a94e['message']:_0x10a94e));}const _0x43de64=await _0x256882['sFvLi'](getCurrentUser,_0x428ca8);if(!_0x43de64['success'])throw new Error(_0x5ea7dc(0x13c)+_0x43de64[_0x5ea7dc(0x161)]);return console[_0x5ea7dc(0x113)]('✓\x20Authenticated\x20to\x20'+_0x43de64[_0x5ea7dc(0x182)][_0x5ea7dc(0x11c)]),{'token':_0x428ca8,'method':_0x256882[_0x5ea7dc(0x133)]};}console['log']('Validating\x20API\x20token...');const _0x432c2a=await getCurrentUser(_0x428ca8);if(!_0x432c2a[_0x5ea7dc(0x126)]){if(_0x432c2a[_0x5ea7dc(0x137)])throw new Error(_0x5ea7dc(0x11b)+_0x432c2a['error']+_0x5ea7dc(0x14e));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x432c2a['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x5ea7dc(0x113)]('✓\x20Authenticated\x20to\x20'+_0x432c2a['user']['organizationName']),await _0x256882['sFvLi'](storeToken,_0x428ca8),console[_0x5ea7dc(0x113)](process['env'][_0x5ea7dc(0x13f)]?_0x256882[_0x5ea7dc(0x115)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x428ca8,'method':_0x256882['QJPYI']};}export async function ensureRangerDir(){const _0x4a6107=_0x12dbc5,_0x48a36e={'EowGL':function(_0x490625){return _0x490625();},'rXevZ':function(_0x3dcefd,_0x593a3a){return _0x3dcefd(_0x593a3a);},'yemEQ':function(_0x5af929,_0x4e505b,_0x46d3bc){return _0x5af929(_0x4e505b,_0x46d3bc);}},_0x440495=_0x48a36e['EowGL'](findGitRoot),_0x2dc91f=_0x440495?join(_0x440495,'.ranger'):_0x48a36e[_0x4a6107(0x167)](getRangerDir);return!_0x48a36e[_0x4a6107(0x169)](existsSync,_0x2dc91f)?(await _0x48a36e[_0x4a6107(0x187)](mkdir,_0x2dc91f,{'recursive':!![]}),console[_0x4a6107(0x113)](_0x4a6107(0x15a)),{'path':_0x2dc91f,'installed':!![]}):(console[_0x4a6107(0x113)](_0x4a6107(0x17a)),{'path':_0x2dc91f,'installed':![]});}export async function ensureChromium(){const _0x47111f=_0x12dbc5,_0x3909b6={'kDrCh':_0x47111f(0x153),'yWBVy':_0x47111f(0x11e),'MzILl':function(_0x27aeac,_0x2795aa){return _0x27aeac(_0x2795aa);},'BYshU':_0x47111f(0x145),'SRaIj':function(_0x92dd89,_0x9706a3){return _0x92dd89 instanceof _0x9706a3;},'ppUzX':_0x47111f(0x139),'kHwGA':'\x20\x20npx\x20playwright\x20install\x20chromium','ifXTi':_0x47111f(0x142),'CVwmg':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x523045=![];try{const _0x5c1790=chromium[_0x47111f(0x119)]();_0x523045=existsSync(_0x5c1790);}catch{_0x523045=![];}if(_0x523045)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x312abf=getPlaywrightVersion(),_0x5b55b3=process['stdin']['isTTY']&&process[_0x47111f(0x165)][_0x47111f(0x127)];let _0x492e03=!![];if(_0x5b55b3){const {install:_0x155acd}=await _0x4ae072['prompt']([{'type':_0x3909b6[_0x47111f(0x14a)],'name':_0x47111f(0x118),'message':_0x312abf?_0x47111f(0x12b)+_0x312abf+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x3909b6['yWBVy'],'default':!![]}]);_0x492e03=_0x155acd;}else console['log'](_0x47111f(0x144)+(_0x312abf?'\x20'+_0x312abf:'')+_0x47111f(0x141));if(_0x492e03){console['log'](_0x47111f(0x179));try{await _0x3909b6['MzILl'](installChromiumBinary,_0x312abf),console[_0x47111f(0x113)](_0x3909b6[_0x47111f(0x117)]);}catch(_0x4dfdbf){console['error']('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x3909b6[_0x47111f(0x138)](_0x4dfdbf,Error)?_0x4dfdbf[_0x47111f(0x188)]:_0x4dfdbf),console[_0x47111f(0x113)](_0x3909b6[_0x47111f(0x181)]),_0x312abf?console[_0x47111f(0x113)](_0x47111f(0x132)+_0x312abf+_0x47111f(0x12e)):console[_0x47111f(0x113)](_0x3909b6[_0x47111f(0x180)]);}}else console['log'](_0x3909b6['ifXTi']),console[_0x47111f(0x113)](_0x3909b6[_0x47111f(0x152)]),_0x312abf?console['log'](_0x47111f(0x132)+_0x312abf+'\x20install\x20chromium'):console[_0x47111f(0x113)](_0x47111f(0x12f));return!![];}export async function writeRangerGitignore(_0xf42c51){const _0x9c98ae=_0x12dbc5,_0xdb9ff9={'BUbNh':function(_0x91a419,_0x2170e5,_0x3279f2){return _0x91a419(_0x2170e5,_0x3279f2);},'Gznuw':'.gitignore','ksTbf':function(_0x1d1e32,_0xb69681,_0x1736c2){return _0x1d1e32(_0xb69681,_0x1736c2);},'ugIVF':'✓\x20Created\x20.ranger/.gitignore'},_0x303438=_0xdb9ff9[_0x9c98ae(0x13e)](join,_0xf42c51,_0xdb9ff9[_0x9c98ae(0x14f)]),_0x19f5cf=_0x9c98ae(0x120);await _0xdb9ff9[_0x9c98ae(0x13b)](writeFile,_0x303438,_0x19f5cf),console['log'](_0xdb9ff9[_0x9c98ae(0x155)]);}function printProfileSetupLaterInstructions(){const _0x4872a6=_0x12dbc5,_0x50476c={'IiSuC':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','wWMgh':function(_0x33bb42,_0x2c06cf){return _0x33bb42(_0x2c06cf);}};console[_0x4872a6(0x113)](_0x50476c['IiSuC']),console['log']('\x20\x20'+_0x50476c['wWMgh'](bold,'ranger\x20profile\x20add\x20local')),console['log']('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}async function ensureLocalEnv(_0x4334f2,_0x27fb33){const _0x3c49b6=_0x12dbc5,_0x1cf09e={'qsJXs':function(_0x16d39b){return _0x16d39b();},'dTYvH':_0x3c49b6(0x17e),'pakSp':_0x3c49b6(0x136),'FVVDU':_0x3c49b6(0x171),'GmCxr':_0x3c49b6(0x12d),'uQDpf':'wantsProfile','DbTYQ':function(_0x4823bb,_0x1d53ce,_0x3ac819,_0xf305f4){return _0x4823bb(_0x1d53ce,_0x3ac819,_0xf305f4);}};if(!_0x1cf09e[_0x3c49b6(0x14c)](findGitRoot))return console[_0x3c49b6(0x113)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x3c49b6(0x17e),{'locations':[_0x1cf09e[_0x3c49b6(0x154)]]}))return console[_0x3c49b6(0x113)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x5a7cfb=process['stdin']['isTTY']&&process[_0x3c49b6(0x165)]['isTTY'];if(_0x5a7cfb&&!_0x4334f2?.[_0x3c49b6(0x15b)]){console['log'](_0x1cf09e[_0x3c49b6(0x121)]),console[_0x3c49b6(0x113)](_0x3c49b6(0x17f)),console['log'](_0x1cf09e['FVVDU']),console['log'](_0x1cf09e['GmCxr']),console['log'](_0x3c49b6(0x128));const {wantsProfile:_0x547c8a}=await _0x4ae072['prompt']([{'type':'confirm','name':_0x1cf09e['uQDpf'],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x547c8a)return _0x1cf09e['qsJXs'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x1cf09e['DbTYQ'](addEnv,_0x1cf09e['dTYvH'],{'url':_0x4334f2?.['url'],'force':_0x4334f2?.[_0x3c49b6(0x150)]},_0x27fb33),{'ready':!![],'skipped':![]};}catch(_0x471a6b){return console['error'](_0x3c49b6(0x16f),_0x471a6b instanceof Error?_0x471a6b[_0x3c49b6(0x188)]:_0x471a6b),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x3077b7,_0x550eec,_0x1c4419){const _0xb38799=_0x12dbc5,_0x5b66e9={'wrBTf':_0xb38799(0x184),'BLNuZ':_0xb38799(0x182),'geUSU':function(_0x37c6d6){return _0x37c6d6();},'vMqOQ':_0xb38799(0x15c),'WwExN':function(_0xa0d1a6,_0x35da5d){return _0xa0d1a6(_0x35da5d);},'uIclD':_0xb38799(0x125),'uYCdN':'chromium','CheZg':function(_0x495c35){return _0x495c35();},'xdIGo':'plugin','jvyjq':function(_0x31951c,_0x29a3b7){return _0x31951c(_0x29a3b7);},'jdlpS':function(_0x26b160,_0x368ee2){return _0x26b160&&_0x368ee2;},'mHMBp':_0xb38799(0x16d),'gABfS':function(_0x45c091,_0x26a6f1,_0x43e3b1){return _0x45c091(_0x26a6f1,_0x43e3b1);},'acOBK':'opencode','jcaEB':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','neAeI':function(_0x33cea4,_0x4ed3af){return _0x33cea4 instanceof _0x4ed3af;},'DYqwe':function(_0x4c2fc7,_0x26452c){return _0x4c2fc7(_0x26452c);},'SnqQt':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','eFnXM':function(_0x386451,_0x1d4eee){return _0x386451(_0x1d4eee);},'infDR':_0xb38799(0x11a),'JtFzb':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','IeGIi':_0xb38799(0x17b),'fytfp':function(_0x51ffd4,_0x447193){return _0x51ffd4+_0x447193;}};console[_0xb38799(0x113)]('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x151e94=process['stdin']['isTTY']&&process['stdout'][_0xb38799(0x127)];!_0x151e94&&!_0x550eec?.[_0xb38799(0x183)]&&(console[_0xb38799(0x113)](_0x5b66e9[_0xb38799(0x16b)]),_0x550eec={..._0x550eec,'scope':_0x5b66e9[_0xb38799(0x156)]});_0x1c4419?.[_0xb38799(0x135)](_0xb38799(0x15c));if(!_0x5b66e9[_0xb38799(0x149)](findGitRoot)){await _0x1c4419?.['trackPhaseError'](_0x5b66e9[_0xb38799(0x185)],new Error(_0xb38799(0x162)));throw new Error(_0xb38799(0x122));}_0x1c4419?.[_0xb38799(0x159)](_0x5b66e9['vMqOQ']);const _0x5c8878=!existsSync(getRangerDir()),{path:_0x83f464}=await ensureRangerDir();_0x1c4419?.['trackPhaseStart']('auth');const _0x22a0a0=await _0x5b66e9[_0xb38799(0x166)](authenticate,_0x3077b7);_0x1c4419?.['trackPhaseEnd'](_0x5b66e9[_0xb38799(0x173)],{'isFirstRun':_0x5c8878,'method':_0x22a0a0['method']}),_0x1c4419?.['trackPhaseStart'](_0x5b66e9[_0xb38799(0x17c)]);_0x550eec?.['skipChromium']?console[_0xb38799(0x113)](_0xb38799(0x12c)):await _0x5b66e9['CheZg'](ensureChromium);_0x1c4419?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x5c8878,'skipped':!!_0x550eec?.[_0xb38799(0x11f)]}),await _0x5b66e9['WwExN'](writeRangerGitignore,_0x83f464),console[_0xb38799(0x113)](_0xb38799(0x13a));const _0x557d9b=_0x550eec?.[_0xb38799(0x183)],_0xb5fdb1=_0x550eec?.['opencode']??![];let _0x4acd6b=null;_0xb5fdb1?(_0x1c4419?.[_0xb38799(0x135)](_0xb38799(0x164)),_0x4acd6b=await ensureOpencodePluginConfig(_0x557d9b),_0x1c4419?.['trackPhaseEnd'](_0x5b66e9['xdIGo'],{'isFirstRun':_0x5c8878,'opencode':!![]})):(_0x1c4419?.['trackPhaseStart'](_0x5b66e9['xdIGo']),await _0x5b66e9[_0xb38799(0x11d)](ensureClaudePlugin,_0x557d9b),_0x1c4419?.[_0xb38799(0x159)](_0x5b66e9[_0xb38799(0x14d)],{'isFirstRun':_0x5c8878}));if(_0x5b66e9[_0xb38799(0x16c)](_0xb5fdb1,_0x4acd6b)){_0x1c4419?.[_0xb38799(0x135)](_0x5b66e9[_0xb38799(0x131)]);try{await _0x5b66e9[_0xb38799(0x13d)](installSkill,_0xb38799(0x114),{'level':_0x4acd6b[_0xb38799(0x183)],'cliVersion':getCurrentVersion(),'platform':_0x5b66e9['acOBK']}),_0x1c4419?.['trackPhaseEnd'](_0x5b66e9[_0xb38799(0x131)],{'isFirstRun':_0x5c8878,'opencode':!![]});}catch(_0x28e52a){console[_0xb38799(0x16a)](_0x5b66e9['jcaEB'],_0x5b66e9['neAeI'](_0x28e52a,Error)?_0x28e52a['message']:_0x28e52a),_0x1c4419?.[_0xb38799(0x159)](_0xb38799(0x16d),{'isFirstRun':_0x5c8878,'opencode':!![],'failed':!![]});}}else _0x1c4419?.[_0xb38799(0x135)]('skills'),await _0x5b66e9[_0xb38799(0x124)](ensureClaudeSkills,_0x557d9b),_0x1c4419?.['trackPhaseEnd'](_0xb38799(0x16d),{'isFirstRun':_0x5c8878});if(!_0x151e94&&!_0x550eec?.['url'])console[_0xb38799(0x113)](_0x5b66e9[_0xb38799(0x177)]),console[_0xb38799(0x113)]('\x20\x20'+_0x5b66e9['eFnXM'](bold,_0xb38799(0x129))+'\x0a');else{_0x1c4419?.['trackPhaseStart'](_0x5b66e9[_0xb38799(0x140)]);const _0x5e6ecf=await ensureLocalEnv({'url':_0x550eec?.[_0xb38799(0x15b)],'force':_0x550eec?.[_0xb38799(0x150)]},_0x1c4419);_0x1c4419?.[_0xb38799(0x159)](_0x5b66e9[_0xb38799(0x140)],{'isFirstRun':_0x5c8878,'profileReady':_0x5e6ecf[_0xb38799(0x15f)],'userSkipped':_0x5e6ecf['skipped']}),_0x5e6ecf[_0xb38799(0x15f)]&&console[_0xb38799(0x113)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0xb5fdb1)console[_0xb38799(0x113)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0xb38799(0x113)](_0x5b66e9['JtFzb']),console['log'](_0xb38799(0x151)),console['log'](_0x5b66e9[_0xb38799(0x123)]);else{const _0x22e09a=bold('/ranger:enable');console['log'](_0x5b66e9['fytfp']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x22e09a+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with',_0xb38799(0x148))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3195(_0x372de8,_0x5e58ed){_0x372de8=_0x372de8-0x1e6;const _0x3d905e=_0x3d90();let _0x3195d9=_0x3d905e[_0x372de8];return _0x3195d9;}const _0x592d58=_0x3195;(function(_0x32dd88,_0x1f4125){const _0x3463b1=_0x3195,_0x44df14=_0x32dd88();while(!![]){try{const _0x3e9e22=-parseInt(_0x3463b1(0x22c))/0x1*(-parseInt(_0x3463b1(0x223))/0x2)+parseInt(_0x3463b1(0x225))/0x3+parseInt(_0x3463b1(0x251))/0x4*(-parseInt(_0x3463b1(0x229))/0x5)+parseInt(_0x3463b1(0x245))/0x6*(parseInt(_0x3463b1(0x24b))/0x7)+-parseInt(_0x3463b1(0x1e6))/0x8*(parseInt(_0x3463b1(0x23c))/0x9)+-parseInt(_0x3463b1(0x1fd))/0xa*(-parseInt(_0x3463b1(0x231))/0xb)+-parseInt(_0x3463b1(0x208))/0xc*(parseInt(_0x3463b1(0x1fe))/0xd);if(_0x3e9e22===_0x1f4125)break;else _0x44df14['push'](_0x44df14['shift']());}catch(_0x3a8f51){_0x44df14['push'](_0x44df14['shift']());}}}(_0x3d90,0xbf722));function _0x3d90(){const _0x5db431=['36bGUxBg','config','\x20\x20\x20\x20','utf-8','log','ZPsqn','twzhe','disabled','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','organizationName','dQMKk','\x1b[1m','push','plaintext','hasEncryptedAuth','yhilE','LRAEs','success','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','(not\x20found)','znJrA','user','fLWUt','\x20\x20Run:\x20ranger\x20setup\x20--opencode','ucrdx','PYGkc','encrypted','4jJlhLk','JzOPZ','569688kpwcuf','ZNHkS','bdgIh','\x20\x20Run:\x20ranger\x20update','31805aCTCWk','not_configured','join','378722OdOTNh','plugin','\x20(latest:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','version','649JQaWAO','isDirectory','auth.json','\x20(active)','GOwFG','yJOxY','YRGgH','map','name','enabled','\x0a📊\x20Ranger\x20Status\x0a','211995eWTkCh','includes','settings.json','Version:\x20','stdout','lqUbp','GNGrm','dRKGN','dmpRT','5286BxTagW','nbice','lQCTw','path','details',':\x20installed\x20(','4403cEUKbT','\x0a---\x20Skills\x20---','data','close','\x20\x20Not\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]','416jnsFSu','not_installed','Root:\x20','RntKp','SoLjb','length','56xZmXEM','OWFla','\x0a---\x20Profiles\x20---','toString','filter','trim','displayName','\x0a---\x20OpenCode\x20Plugin\x20---','ignore','vFcLq','some','HDeHG','ranger@trailhead','cwd','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','settingsPath','none','match','\x20plugin(s)\x20configured','opencode','Gyojh','project','22490qgDbsH','102219LDmiRM','DEBUG','pipe','Organization:\x20','configured','AUjuG','NbxZG','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','HQpBk','No\x20profiles\x20configured'];_0x3d90=function(){return _0x5db431;};return _0x3d90();}import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x1648dd=>_0x592d58(0x213)+_0x1648dd+'\x1b[0m',link=(_0x2300dc,_0x39fdb7)=>'\x1b]8;;file://'+_0x2300dc+'\x07'+(_0x39fdb7||_0x2300dc)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0xbd3329=_0x592d58,_0x54a28f={'cnXXv':'not_installed','WoFvx':function(_0x23fb22,_0x206b74){return _0x23fb22(_0x206b74);},'kFRla':function(_0x3f35c2,_0x382a65){return _0x3f35c2>_0x382a65;},'BiuNW':function(_0x46723e,_0x28a4c2){return _0x46723e(_0x28a4c2);},'odbcQ':function(_0x27fa25,_0xe0fc4){return _0x27fa25(_0xe0fc4);},'fLWUt':_0xbd3329(0x22a),'znJrA':function(_0x404b94,_0x303293,_0x5d5179,_0x5b8252){return _0x404b94(_0x303293,_0x5d5179,_0x5b8252);},'fVdQk':'debug','UCGoM':'pipe','fqarR':_0xbd3329(0x24d),'MDOrV':'error'};return new Promise(_0x2953bf=>{const _0x15e540=_0xbd3329,_0x1d93bc=_0x54a28f[_0x15e540(0x21c)](spawn,_0x15e540(0x1fa),[_0x54a28f['fVdQk'],_0x15e540(0x209)],{'stdio':[_0x15e540(0x1ee),_0x15e540(0x200),_0x54a28f['UCGoM']]});let _0x487b9a='';_0x1d93bc[_0x15e540(0x240)]?.['on'](_0x54a28f['fqarR'],_0x3b9a84=>{_0x487b9a+=_0x3b9a84['toString']();}),_0x1d93bc['stderr']?.['on']('data',_0x4f95b2=>{const _0x1e0b87=_0x15e540;_0x487b9a+=_0x4f95b2[_0x1e0b87(0x1e9)]();}),_0x1d93bc['on'](_0x54a28f['MDOrV'],()=>{const _0x1cb650=_0x15e540;_0x2953bf({'status':_0x1cb650(0x252)});}),_0x1d93bc['on'](_0x15e540(0x24e),_0x34d4b3=>{const _0x568606=_0x15e540,_0x2b6088={'bYLwa':function(_0x3e1674,_0x2e0aab){return _0x3e1674!==_0x2e0aab;},'WwUuw':'@ranger-testing/opencode-plugin','fiXwG':'opencode-plugin'};if(_0x34d4b3!==0x0){_0x2953bf({'status':_0x54a28f['cnXXv']});return;}const _0x590610=_0x487b9a['trim']();let _0x5d866d=null;if(_0x590610)try{_0x5d866d=JSON['parse'](_0x590610);}catch{const _0x127349=_0x590610[_0x568606(0x1f8)](/\{[\s\S]*\}$/);if(_0x127349)try{_0x5d866d=JSON['parse'](_0x127349[0x0]);}catch{_0x5d866d=null;}}const _0xc9391b=Array['isArray'](_0x5d866d?.[_0x568606(0x22d)])?_0x5d866d?.[_0x568606(0x22d)]:[],_0x19248e=_0xc9391b[_0x568606(0x1f0)](_0x5e140a=>{const _0x614357=_0x568606;if(_0x2b6088['bYLwa'](typeof _0x5e140a,'string'))return![];return _0x5e140a['includes'](_0x2b6088['WwUuw'])||_0x5e140a[_0x614357(0x23d)](_0x2b6088['fiXwG']);});if(_0x19248e){_0x54a28f['WoFvx'](_0x2953bf,{'status':'configured','details':_0xc9391b[_0x568606(0x256)]>0x0?_0xc9391b[_0x568606(0x256)]+_0x568606(0x1f9):undefined});return;}if(_0x54a28f['kFRla'](_0xc9391b[_0x568606(0x256)],0x0)){_0x54a28f['BiuNW'](_0x2953bf,{'status':_0x568606(0x22a),'details':_0xc9391b[_0x568606(0x256)]+_0x568606(0x1f9)});return;}_0x54a28f['odbcQ'](_0x2953bf,{'status':_0x54a28f[_0x568606(0x21e)]});});});}async function getSkillsFromDir(_0x4ab1c6,_0x142ab9){const _0x58c36d=_0x592d58,_0x54ac03={'mluFK':function(_0x3639ba,_0x57b1e7){return _0x3639ba(_0x57b1e7);},'dRKGN':function(_0x154871,_0x372006,_0x33d9da){return _0x154871(_0x372006,_0x33d9da);},'GOwFG':function(_0x3f5c60,_0x4ab3c4,_0x59b579,_0x212d0d){return _0x3f5c60(_0x4ab3c4,_0x59b579,_0x212d0d);},'lqUbp':function(_0x19e5fb,_0x122842){return _0x19e5fb(_0x122842);},'GzFWR':_0x58c36d(0x20b)};if(!_0x54ac03['mluFK'](existsSync,_0x4ab1c6))return[];const _0x42c38f=[];try{const _0x22a7e6=await _0x54ac03[_0x58c36d(0x243)](readdir,_0x4ab1c6,{'withFileTypes':!![]});for(const _0x14313b of _0x22a7e6){if(_0x14313b[_0x58c36d(0x232)]()){const _0x1c7778=_0x54ac03[_0x58c36d(0x235)](join,_0x4ab1c6,_0x14313b['name'],'SKILL.md');if(_0x54ac03[_0x58c36d(0x241)](existsSync,_0x1c7778)){let _0x21e10c=_0x14313b[_0x58c36d(0x239)];try{const _0x3726c2=await readFile(_0x1c7778,_0x54ac03['GzFWR']),_0x3b4eeb=_0x3726c2['match'](/name:\s*(.+)/);_0x3b4eeb&&(_0x21e10c=_0x3b4eeb[0x1][_0x58c36d(0x1eb)]());}catch{}_0x42c38f[_0x58c36d(0x214)]({'name':_0x14313b[_0x58c36d(0x239)],'displayName':_0x21e10c,'path':_0x1c7778,'level':_0x142ab9});}}}}catch{return[];}return _0x42c38f;}async function getInstalledSkills(){const _0x58c447=_0x592d58,_0x13543a={'PYGkc':function(_0x444d20,_0x3812a8,_0x527eae){return _0x444d20(_0x3812a8,_0x527eae);},'zHGJY':_0x58c447(0x1fc)},[_0x466763,_0x448ba8]=await Promise['all']([_0x13543a[_0x58c447(0x221)](getSkillsFromDir,getProjectSkillsDir(),_0x13543a['zHGJY']),_0x13543a['PYGkc'](getSkillsFromDir,getUserSkillsDir(),_0x58c447(0x21d))]);return{'project':_0x466763,'user':_0x448ba8};}async function getEnvironments(){const _0x303ddb=_0x592d58,_0x23b48b={'OWFla':function(_0x232608,_0x1f0075,_0xe89814){return _0x232608(_0x1f0075,_0xe89814);},'nbice':_0x303ddb(0x21b),'twzhe':function(_0xf335b8,_0x49f9a6){return _0xf335b8(_0x49f9a6);},'bdgIh':function(_0x36c466){return _0x36c466();}},{envNames:_0x4f8c75,activeEnv:_0x4240ec}=await _0x23b48b[_0x303ddb(0x227)](getEnvNames),_0x343239=_0x23b48b[_0x303ddb(0x227)](getRangerDir);if(!existsSync(_0x343239))return{'envs':[],'activeEnv':null};const _0x3580d=_0x4f8c75['map'](_0xd17f5d=>{const _0x3e9038=_0x303ddb,_0x395b45=getEnvDir(_0xd17f5d),_0x13ce81=_0x23b48b['OWFla'](join,_0x395b45,_0x3e9038(0x23e)),_0x17c304=_0x23b48b[_0x3e9038(0x1e7)](join,_0x395b45,_0x3e9038(0x233)),_0x459e49=_0x23b48b[_0x3e9038(0x1e7)](join,_0x395b45,'auth.json.enc');return{'name':_0xd17f5d,'settingsPath':existsSync(_0x13ce81)?_0x13ce81:_0x23b48b[_0x3e9038(0x246)],'hasPlaintextAuth':existsSync(_0x17c304),'hasEncryptedAuth':_0x23b48b[_0x3e9038(0x20e)](existsSync,_0x459e49),'isActive':_0xd17f5d===_0x4240ec};});return{'envs':_0x3580d,'activeEnv':_0x4240ec};}export async function status(){const _0x28c5fd=_0x592d58,_0x115dc5={'ZPsqn':function(_0x30fecb,_0x3ed29f){return _0x30fecb(_0x3ed29f);},'ZNHkS':function(_0x35206d,_0x42ee68,_0x4a55b3){return _0x35206d(_0x42ee68,_0x4a55b3);},'eGcbL':function(_0x444f28,_0x1882b1,_0x3b1af0){return _0x444f28(_0x1882b1,_0x3b1af0);},'ucrdx':function(_0xe39446){return _0xe39446();},'lQCTw':function(_0x3efc00,_0xeb24d7){return _0x3efc00!==_0xeb24d7;},'Gyojh':function(_0x18d5a4){return _0x18d5a4();},'vFcLq':function(_0x3782b,_0x4e4ae3){return _0x3782b(_0x4e4ae3);},'HDeHG':_0x28c5fd(0x202),'yhilE':function(_0x444589,_0x208060){return _0x444589===_0x208060;},'dmpRT':_0x28c5fd(0x24f),'YRGgH':_0x28c5fd(0x21f),'GNGrm':_0x28c5fd(0x21a),'LRAEs':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','NbxZG':'enabled','yJOxY':_0x28c5fd(0x20f),'Wuujl':_0x28c5fd(0x1f2),'Maqyv':function(_0x2f4c28,_0x2b2c41){return _0x2f4c28+_0x2b2c41;},'RntKp':function(_0x22cad2,_0x1d0e77){return _0x22cad2(_0x1d0e77);},'AUjuG':function(_0x35c87e,_0x322dcc){return _0x35c87e(_0x322dcc);},'JzOPZ':function(_0x32c099,_0xa7290e){return _0x32c099>_0xa7290e;},'JOtas':_0x28c5fd(0x207),'GEsXr':_0x28c5fd(0x234),'SoLjb':function(_0x4ab2e0,_0x1fb6b5){return _0x4ab2e0!==_0x1fb6b5;},'HQpBk':'(not\x20found)','dQMKk':function(_0x124a59,_0x2cb044,_0x3f8adc){return _0x124a59(_0x2cb044,_0x3f8adc);},'DWxRa':function(_0x5553b3,_0x10a118){return _0x5553b3(_0x10a118);}};console[_0x28c5fd(0x20c)](_0x28c5fd(0x23b));const _0x4b9277=process[_0x28c5fd(0x1f3)](),_0x38e6f1=getRangerDir();if(!_0x115dc5[_0x28c5fd(0x20d)](existsSync,_0x38e6f1)){console['log']('Root:\x20'+_0x115dc5[_0x28c5fd(0x226)](link,_0x4b9277,bold(basename(_0x4b9277)))),console[_0x28c5fd(0x20c)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x28c5fd(0x20c)](_0x28c5fd(0x210));return;}console['log'](_0x28c5fd(0x253)+_0x115dc5['eGcbL'](link,_0x4b9277,bold(basename(_0x4b9277))));const _0xcc4368=_0x115dc5['ucrdx'](getCurrentVersion),_0x5914be=getLatestVersion();if(_0x5914be[_0x28c5fd(0x230)]&&_0x115dc5[_0x28c5fd(0x247)](_0x5914be['version'],_0xcc4368))console[_0x28c5fd(0x20c)](_0x28c5fd(0x23f)+_0xcc4368+_0x28c5fd(0x22e)+_0x5914be[_0x28c5fd(0x230)]+')'),console[_0x28c5fd(0x20c)](_0x28c5fd(0x228));else _0x5914be[_0x28c5fd(0x230)]?console['log'](_0x28c5fd(0x23f)+_0xcc4368+_0x28c5fd(0x1f4)):console[_0x28c5fd(0x20c)](_0x28c5fd(0x23f)+_0xcc4368);const _0x534350=await _0x115dc5[_0x28c5fd(0x1fb)](getToken);if(_0x534350){const _0x370ea5=await _0x115dc5[_0x28c5fd(0x1ef)](getCurrentUser,_0x534350);_0x370ea5[_0x28c5fd(0x219)]?console[_0x28c5fd(0x20c)](_0x28c5fd(0x201)+_0x115dc5[_0x28c5fd(0x1ef)](bold,_0x370ea5['user'][_0x28c5fd(0x211)])):(console[_0x28c5fd(0x20c)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x28c5fd(0x20c)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x28c5fd(0x250));process['env'][_0x28c5fd(0x1ff)]&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+_0x115dc5[_0x28c5fd(0x220)](getApiBaseUrl)));console[_0x28c5fd(0x20c)](_0x28c5fd(0x1ed));const _0x57c2ba=await getOpencodePluginStatus();if(_0x57c2ba['status']===_0x115dc5[_0x28c5fd(0x1f1)])console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x57c2ba[_0x28c5fd(0x249)]&&console[_0x28c5fd(0x20c)]('\x20\x20'+_0x57c2ba[_0x28c5fd(0x249)]);else _0x115dc5[_0x28c5fd(0x217)](_0x57c2ba['status'],_0x28c5fd(0x22a))?(console['log'](_0x115dc5[_0x28c5fd(0x244)]),_0x57c2ba[_0x28c5fd(0x249)]&&console[_0x28c5fd(0x20c)]('\x20\x20'+_0x57c2ba['details']),console['log'](_0x115dc5[_0x28c5fd(0x237)])):console['log'](_0x115dc5[_0x28c5fd(0x242)]);console['log'](_0x115dc5[_0x28c5fd(0x218)]);const _0x95f4d7=await getPluginInfo(_0x28c5fd(0x1f2));if(_0x95f4d7){const _0x4918dc=_0x95f4d7['scope']||'unknown',_0x5002db=_0x95f4d7[_0x28c5fd(0x23a)]?_0x115dc5[_0x28c5fd(0x204)]:_0x115dc5[_0x28c5fd(0x236)];console['log']('\x20\x20'+_0x115dc5['ZPsqn'](bold,_0x115dc5['Wuujl'])+_0x28c5fd(0x24a)+_0x4918dc+',\x20'+_0x5002db+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x28c5fd(0x20c)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x28c5fd(0x20c)](_0x28c5fd(0x24c));const {project:_0x43b6a6,user:_0x3d9a4f}=await getInstalledSkills(),_0x7c844=_0x43b6a6[_0x28c5fd(0x1ea)](_0x145a4f=>RANGER_MANAGED_SKILLS[_0x28c5fd(0x23d)](_0x145a4f[_0x28c5fd(0x239)])),_0x29d06e=_0x3d9a4f['filter'](_0x20025d=>RANGER_MANAGED_SKILLS[_0x28c5fd(0x23d)](_0x20025d['name'])),_0x11f53a=_0x115dc5['Maqyv'](_0x7c844[_0x28c5fd(0x256)],_0x29d06e['length']);if(_0x11f53a===0x0)console['log']('No\x20skills\x20installed'),console[_0x28c5fd(0x20c)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x7c844[_0x28c5fd(0x256)]>0x0){console[_0x28c5fd(0x20c)]('\x20\x20Project-level:');for(const _0x5adb6f of _0x7c844){console['log'](_0x28c5fd(0x20a)+_0x115dc5[_0x28c5fd(0x254)](bold,_0x5adb6f[_0x28c5fd(0x1ec)])+':\x20'+link(_0x5adb6f[_0x28c5fd(0x248)],_0x115dc5[_0x28c5fd(0x203)](basename,_0x5adb6f[_0x28c5fd(0x248)])));}}if(_0x115dc5[_0x28c5fd(0x224)](_0x29d06e['length'],0x0)){console['log']('\x20\x20User-level:');for(const _0x206536 of _0x29d06e){console['log']('\x20\x20\x20\x20'+bold(_0x206536['displayName'])+':\x20'+link(_0x206536['path'],basename(_0x206536['path'])));}}}console['log'](_0x28c5fd(0x1e8));const {envs:_0x157247,activeEnv:_0x36abbd}=await _0x115dc5[_0x28c5fd(0x220)](getEnvironments);if(_0x157247['length']===0x0)console['log'](_0x115dc5['JOtas']),console[_0x28c5fd(0x20c)](_0x28c5fd(0x205));else{for(const _0x1d2141 of _0x157247){const _0x4536e9=_0x1d2141['isActive']?_0x115dc5['GEsXr']:'',_0x2ba375=_0x1d2141[_0x28c5fd(0x216)]?_0x28c5fd(0x222):_0x1d2141['hasPlaintextAuth']?_0x28c5fd(0x215):_0x28c5fd(0x1f7);console['log']('\x20\x20'+bold(_0x1d2141[_0x28c5fd(0x239)])+_0x4536e9),console[_0x28c5fd(0x20c)]('\x20\x20\x20\x20Auth:\x20'+_0x2ba375),_0x115dc5[_0x28c5fd(0x255)](_0x1d2141['settingsPath'],_0x115dc5[_0x28c5fd(0x206)])&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x115dc5[_0x28c5fd(0x212)](link,_0x1d2141['settingsPath'],_0x115dc5['DWxRa'](basename,_0x1d2141[_0x28c5fd(0x1f6)])));}!_0x36abbd&&(console[_0x28c5fd(0x20c)](_0x28c5fd(0x22f)),console[_0x28c5fd(0x20c)](_0x28c5fd(0x1f5)+_0x157247[_0x28c5fd(0x238)](_0x59a09f=>_0x59a09f[_0x28c5fd(0x239)])[_0x28c5fd(0x22b)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
const _0x509d1c=_0x372f;(function(_0x47d88a,_0x40ce13){const _0x2638d7=_0x372f,_0x3a6ecf=_0x47d88a();while(!![]){try{const _0x47da75=parseInt(_0x2638d7(0x1c5))/0x1*(parseInt(_0x2638d7(0x1e3))/0x2)+-parseInt(_0x2638d7(0x1cb))/0x3+-parseInt(_0x2638d7(0x18b))/0x4*(parseInt(_0x2638d7(0x1ae))/0x5)+-parseInt(_0x2638d7(0x1c4))/0x6+parseInt(_0x2638d7(0x1c6))/0x7+-parseInt(_0x2638d7(0x18c))/0x8+-parseInt(_0x2638d7(0x177))/0x9*(-parseInt(_0x2638d7(0x1a7))/0xa);if(_0x47da75===_0x40ce13)break;else _0x3a6ecf['push'](_0x3a6ecf['shift']());}catch(_0x44e98e){_0x3a6ecf['push'](_0x3a6ecf['shift']());}}}(_0x430b,0x93aa4));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';function _0x430b(){const _0x2fc6ab=['OMfjD','Rmkpx','\x20\x20\x20\x20Settings:\x20','MMLPo','2273844DKseYJ','472083QtvsGc','6996220YTKcTz','log','qvtSf','Version:\x20','parse','2036169FYIBle','ZCjsG','ZobAU','bLIJK','some','YurkM','OQFMj','not_configured','stderr','cwd','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','BrzXo',':\x20installed\x20(','API\x20Environment:\x20','toString','Root:\x20','DEBUG','\x20\x20Project-level:','\x20\x20User-level:','isActive','displayName','kKmUf','length','configured','2CPrnVE','Cfloz','close','\x20\x20Run:\x20ranger\x20setup\x20[token]','4001985lomHji','ofRvH','ranger@trailhead','unknown','zAGqH','version','fzlAS','pipe','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x0a📊\x20Ranger\x20Status\x0a','error','status','SHDDh','HMGPz','name','opencode','\x20plugin(s)\x20configured','JtKBy','disabled','push','280kdqhcP','6239880oJhcQG','lxdiw','path','@ranger-testing/opencode-plugin','Uquqq','details','\x1b]8;;file://','API\x20URL:\x20','plugin','opencode-plugin','enabled','trim','auth.json.enc','match','vzwLE','sDlwA','nuZUX','\x20\x20\x20\x20','settingsPath','bTWJA','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','yCDvk','filter','oGgFp','\x1b[1m','puzZM','\x1b]8;;\x07','30ouLrNc','includes','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','jnJSK','PvFhM','No\x20skills\x20installed','\x20\x20Run:\x20ranger\x20skillup','25930jLjwzJ','jOmgy','alBKc','ZMtGm','string','\x20\x20Run:\x20ranger\x20update','data','NBJDM','\x0a---\x20Claude\x20Code\x20Plugin\x20---','vVhGZ','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20Run:\x20ranger\x20setup\x20--opencode','NyzzL','\x0a\x20\x20No\x20active\x20profile\x20set','debug','RXjVK','\x20(latest:\x20','\x0a---\x20Profiles\x20---'];_0x430b=function(){return _0x2fc6ab;};return _0x430b();}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 _0x372f(_0x2950ef,_0x33024c){_0x2950ef=_0x2950ef-0x177;const _0x430bf4=_0x430b();let _0x372fa3=_0x430bf4[_0x2950ef];return _0x372fa3;}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=_0x1775af=>_0x509d1c(0x1a4)+_0x1775af+'\x1b[0m',link=(_0x1b3000,_0x500fb5)=>_0x509d1c(0x192)+_0x1b3000+'\x07'+(_0x500fb5||_0x1b3000)+_0x509d1c(0x1a6);async function getOpencodePluginStatus(){const _0x5b524b=_0x509d1c,_0x14bfea={'uBodK':_0x5b524b(0x1b2),'vbMjp':_0x5b524b(0x18f),'zAGqH':'not_installed','PvFhM':_0x5b524b(0x1d2),'yMsEI':function(_0x2057e7,_0x11eecc){return _0x2057e7(_0x11eecc);},'bHeKs':_0x5b524b(0x186),'IhioH':'config','zDHgV':'ignore','RXjVK':'pipe','ZMtGm':'data','aOTjb':_0x5b524b(0x1e5)};return new Promise(_0x8fa305=>{const _0xd8503=_0x5b524b,_0x23c225={'JtKBy':_0x14bfea['uBodK'],'sMIZr':_0x14bfea['vbMjp'],'JXdHt':_0x14bfea[_0xd8503(0x17b)],'vzwLE':function(_0x1cbb2a,_0x43c492){return _0x1cbb2a(_0x43c492);},'nuZUX':_0xd8503(0x1e2),'ITeHA':function(_0xef5063,_0x28e996){return _0xef5063>_0x28e996;},'ZCjsG':function(_0x11999a,_0x3aa811){return _0x11999a>_0x3aa811;},'puzZM':_0x14bfea[_0xd8503(0x1ab)],'XrkZz':function(_0x25bdd8,_0xd86985){return _0x14bfea['yMsEI'](_0x25bdd8,_0xd86985);}},_0x11729d=spawn(_0x14bfea['bHeKs'],[_0xd8503(0x1bc),_0x14bfea['IhioH']],{'stdio':[_0x14bfea['zDHgV'],_0x14bfea[_0xd8503(0x1bd)],_0xd8503(0x17e)]});let _0x274a71='';_0x11729d['stdout']?.['on'](_0x14bfea[_0xd8503(0x1b1)],_0x18f567=>{_0x274a71+=_0x18f567['toString']();}),_0x11729d[_0xd8503(0x1d3)]?.['on'](_0xd8503(0x1b4),_0x1ae1d8=>{const _0x27ca78=_0xd8503;_0x274a71+=_0x1ae1d8[_0x27ca78(0x1d9)]();}),_0x11729d['on'](_0xd8503(0x181),()=>{_0x8fa305({'status':'not_installed'});}),_0x11729d['on'](_0x14bfea['aOTjb'],_0x493795=>{const _0x535a89=_0xd8503,_0x32b5fe={'jnJSK':function(_0x17a4c4,_0x5e52a3){return _0x17a4c4!==_0x5e52a3;},'NIUMt':_0x23c225[_0x535a89(0x188)],'FETUv':_0x23c225['sMIZr']};if(_0x493795!==0x0){_0x8fa305({'status':_0x23c225['JXdHt']});return;}const _0x1eeec3=_0x274a71[_0x535a89(0x197)]();let _0x27567b=null;if(_0x1eeec3)try{_0x27567b=JSON['parse'](_0x1eeec3);}catch{const _0x44aca3=_0x1eeec3['match'](/\{[\s\S]*\}$/);if(_0x44aca3)try{_0x27567b=JSON[_0x535a89(0x1ca)](_0x44aca3[0x0]);}catch{_0x27567b=null;}}const _0x3927ea=Array['isArray'](_0x27567b?.[_0x535a89(0x194)])?_0x27567b?.[_0x535a89(0x194)]:[],_0x7cf11c=_0x3927ea[_0x535a89(0x1cf)](_0x218bf5=>{const _0x677f12=_0x535a89;if(_0x32b5fe[_0x677f12(0x1aa)](typeof _0x218bf5,_0x32b5fe['NIUMt']))return![];return _0x218bf5['includes'](_0x32b5fe['FETUv'])||_0x218bf5['includes'](_0x677f12(0x195));});if(_0x7cf11c){_0x23c225[_0x535a89(0x19a)](_0x8fa305,{'status':_0x23c225[_0x535a89(0x19c)],'details':_0x23c225['ITeHA'](_0x3927ea[_0x535a89(0x1e1)],0x0)?_0x3927ea[_0x535a89(0x1e1)]+_0x535a89(0x187):undefined});return;}if(_0x23c225[_0x535a89(0x1cc)](_0x3927ea[_0x535a89(0x1e1)],0x0)){_0x8fa305({'status':_0x23c225[_0x535a89(0x1a5)],'details':_0x3927ea['length']+_0x535a89(0x187)});return;}_0x23c225['XrkZz'](_0x8fa305,{'status':_0x23c225[_0x535a89(0x1a5)]});});});}async function getSkillsFromDir(_0x3f0882,_0x4d7be3){const _0x2cf1b8=_0x509d1c,_0x4f5ff2={'NBJDM':function(_0x1513fe,_0x372341){return _0x1513fe(_0x372341);},'XoyZK':function(_0x529169,_0x2fa478,_0x3b92f1){return _0x529169(_0x2fa478,_0x3b92f1);},'mBGrR':function(_0x475552,_0x56c731,_0x343bb1,_0x106ec8){return _0x475552(_0x56c731,_0x343bb1,_0x106ec8);},'lxdiw':function(_0x107ba0,_0x2e4410){return _0x107ba0(_0x2e4410);}};if(!_0x4f5ff2[_0x2cf1b8(0x1b5)](existsSync,_0x3f0882))return[];const _0x35da07=[];try{const _0x2df99b=await _0x4f5ff2['XoyZK'](readdir,_0x3f0882,{'withFileTypes':!![]});for(const _0x89ae6 of _0x2df99b){if(_0x89ae6['isDirectory']()){const _0x11ad3b=_0x4f5ff2['mBGrR'](join,_0x3f0882,_0x89ae6['name'],'SKILL.md');if(_0x4f5ff2[_0x2cf1b8(0x18d)](existsSync,_0x11ad3b)){let _0x32da5a=_0x89ae6[_0x2cf1b8(0x185)];try{const _0x1284f9=await readFile(_0x11ad3b,'utf-8'),_0x4c053e=_0x1284f9[_0x2cf1b8(0x199)](/name:\s*(.+)/);_0x4c053e&&(_0x32da5a=_0x4c053e[0x1]['trim']());}catch{}_0x35da07[_0x2cf1b8(0x18a)]({'name':_0x89ae6['name'],'displayName':_0x32da5a,'path':_0x11ad3b,'level':_0x4d7be3});}}}}catch{return[];}return _0x35da07;}async function getInstalledSkills(){const _0x5e164c=_0x509d1c,_0x1375f5={'SHDDh':function(_0x195b96){return _0x195b96();},'ofRvH':'project','YODdo':function(_0x4fe49e,_0x64771e,_0x2a4a58){return _0x4fe49e(_0x64771e,_0x2a4a58);},'sDlwA':'user'},[_0x109758,_0x40acf0]=await Promise['all']([getSkillsFromDir(_0x1375f5[_0x5e164c(0x183)](getProjectSkillsDir),_0x1375f5[_0x5e164c(0x178)]),_0x1375f5['YODdo'](getSkillsFromDir,getUserSkillsDir(),_0x1375f5[_0x5e164c(0x19b)])]);return{'project':_0x109758,'user':_0x40acf0};}async function getEnvironments(){const _0x3b95eb=_0x509d1c,_0x45a838={'OQFMj':function(_0x544524,_0x20a46d){return _0x544524(_0x20a46d);},'cWFGD':'settings.json','vVhGZ':_0x3b95eb(0x198),'OkPZs':function(_0x4e6b2c,_0x350705){return _0x4e6b2c(_0x350705);},'bTWJA':function(_0x40b950,_0x5c19d6){return _0x40b950(_0x5c19d6);},'wVioU':function(_0x3f29ab,_0x59dad7){return _0x3f29ab===_0x59dad7;},'OMfjD':function(_0x438c41){return _0x438c41();},'yCDvk':function(_0x44bf17,_0x37062d){return _0x44bf17(_0x37062d);}},{envNames:_0x5127b5,activeEnv:_0x35de2e}=await getEnvNames(),_0x46de45=_0x45a838[_0x3b95eb(0x1c0)](getRangerDir);if(!_0x45a838[_0x3b95eb(0x1a1)](existsSync,_0x46de45))return{'envs':[],'activeEnv':null};const _0x5abedb=_0x5127b5['map'](_0x99e917=>{const _0x51e07a=_0x3b95eb,_0x4a43e8=_0x45a838[_0x51e07a(0x1d1)](getEnvDir,_0x99e917),_0x55faa7=join(_0x4a43e8,_0x45a838['cWFGD']),_0x426800=join(_0x4a43e8,'auth.json'),_0x15c39b=join(_0x4a43e8,_0x45a838[_0x51e07a(0x1b7)]);return{'name':_0x99e917,'settingsPath':_0x45a838['OkPZs'](existsSync,_0x55faa7)?_0x55faa7:'(not\x20found)','hasPlaintextAuth':existsSync(_0x426800),'hasEncryptedAuth':_0x45a838[_0x51e07a(0x19f)](existsSync,_0x15c39b),'isActive':_0x45a838['wVioU'](_0x99e917,_0x35de2e)};});return{'envs':_0x5abedb,'activeEnv':_0x35de2e};}export async function status(){const _0x1e37cd=_0x509d1c,_0x69d260={'IPPjv':_0x1e37cd(0x180),'hEXeB':function(_0xe46c36,_0x56cc8c,_0x211312){return _0xe46c36(_0x56cc8c,_0x211312);},'NyzzL':function(_0x81620,_0x3b8b80){return _0x81620(_0x3b8b80);},'Uquqq':function(_0x766713,_0x38f16b){return _0x766713(_0x38f16b);},'RjzYd':function(_0x1f1f04,_0x10b77c){return _0x1f1f04!==_0x10b77c;},'alBKc':function(_0x162c44){return _0x162c44();},'oGgFp':function(_0x67d96b){return _0x67d96b();},'BrzXo':'\x0a---\x20OpenCode\x20Plugin\x20---','iKJVn':_0x1e37cd(0x1d2),'Cfloz':'\x20\x20Not\x20configured','MMLPo':_0x1e37cd(0x179),'nyMxU':'enabled','kKmUf':_0x1e37cd(0x189),'fzlAS':function(_0x51f934,_0x28fe1d){return _0x51f934+_0x28fe1d;},'blCRo':function(_0x29580e,_0x40bb6b){return _0x29580e===_0x40bb6b;},'gwdYx':_0x1e37cd(0x1ac),'knVMh':_0x1e37cd(0x1dc),'HMGPz':function(_0x3276fe,_0x4badb8){return _0x3276fe>_0x4badb8;},'SoazT':_0x1e37cd(0x1dd),'BEgQI':function(_0x369e86,_0x4f58e1){return _0x369e86(_0x4f58e1);},'Rmkpx':function(_0x5c5101){return _0x5c5101();},'bLIJK':'No\x20profiles\x20configured','YurkM':'\x20(active)','jOmgy':'encrypted','ZobAU':'plaintext','qvtSf':function(_0x15996e,_0x19d1fb){return _0x15996e(_0x19d1fb);}};console[_0x1e37cd(0x1c7)](_0x69d260['IPPjv']);const _0x590bd9=process[_0x1e37cd(0x1d4)](),_0x1c7019=getRangerDir();if(!existsSync(_0x1c7019)){console['log']('Root:\x20'+_0x69d260['hEXeB'](link,_0x590bd9,_0x69d260[_0x1e37cd(0x1ba)](bold,_0x69d260[_0x1e37cd(0x190)](basename,_0x590bd9)))),console[_0x1e37cd(0x1c7)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x1e37cd(0x1a9));return;}console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1da)+link(_0x590bd9,bold(basename(_0x590bd9))));const _0x552634=getCurrentVersion(),_0x191278=getLatestVersion();if(_0x191278[_0x1e37cd(0x17c)]&&_0x69d260['RjzYd'](_0x191278[_0x1e37cd(0x17c)],_0x552634))console['log']('Version:\x20'+_0x552634+_0x1e37cd(0x1be)+_0x191278['version']+')'),console['log'](_0x1e37cd(0x1b3));else _0x191278['version']?console['log'](_0x1e37cd(0x1c9)+_0x552634+'\x20(up\x20to\x20date)'):console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1c9)+_0x552634);const _0x1b38e4=await _0x69d260[_0x1e37cd(0x1b0)](getToken);if(_0x1b38e4){const _0x4d5b80=await getCurrentUser(_0x1b38e4);_0x4d5b80['success']?console['log']('Organization:\x20'+_0x69d260['Uquqq'](bold,_0x4d5b80['user']['organizationName'])):(console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1a0)),console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1e6)));}else console[_0x1e37cd(0x1c7)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1e6));process['env'][_0x1e37cd(0x1db)]&&(console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1d8)+getCurrentEnvironment()),console['log'](_0x1e37cd(0x193)+_0x69d260[_0x1e37cd(0x1a3)](getApiBaseUrl)));console[_0x1e37cd(0x1c7)](_0x69d260[_0x1e37cd(0x1d6)]);const _0x548699=await getOpencodePluginStatus();if(_0x548699['status']==='configured')console[_0x1e37cd(0x1c7)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x548699[_0x1e37cd(0x191)]&&console['log']('\x20\x20'+_0x548699['details']);else _0x548699[_0x1e37cd(0x182)]===_0x69d260['iKJVn']?(console['log'](_0x69d260[_0x1e37cd(0x1e4)]),_0x548699['details']&&console[_0x1e37cd(0x1c7)]('\x20\x20'+_0x548699['details']),console['log'](_0x1e37cd(0x1b9))):console[_0x1e37cd(0x1c7)](_0x1e37cd(0x17f));console['log'](_0x1e37cd(0x1b6));const _0x51633d=await getPluginInfo(_0x69d260[_0x1e37cd(0x1c3)]);if(_0x51633d){const _0x4aed1f=_0x51633d['scope']||_0x1e37cd(0x17a),_0x5ba1d8=_0x51633d[_0x1e37cd(0x196)]?_0x69d260['nyMxU']:_0x69d260[_0x1e37cd(0x1e0)];console[_0x1e37cd(0x1c7)]('\x20\x20'+bold(_0x1e37cd(0x179))+_0x1e37cd(0x1d7)+_0x4aed1f+',\x20'+_0x5ba1d8+')');}else console[_0x1e37cd(0x1c7)]('\x20\x20Not\x20installed'),console['log'](_0x1e37cd(0x1d5));console['log']('\x0a---\x20Skills\x20---');const {project:_0x49ab38,user:_0x7b38c6}=await getInstalledSkills(),_0x1e385c=_0x49ab38['filter'](_0x1a639f=>RANGER_MANAGED_SKILLS['includes'](_0x1a639f['name'])),_0x52389a=_0x7b38c6[_0x1e37cd(0x1a2)](_0x96c57d=>RANGER_MANAGED_SKILLS[_0x1e37cd(0x1a8)](_0x96c57d['name'])),_0x499624=_0x69d260[_0x1e37cd(0x17d)](_0x1e385c['length'],_0x52389a['length']);if(_0x69d260['blCRo'](_0x499624,0x0))console[_0x1e37cd(0x1c7)](_0x69d260['gwdYx']),console[_0x1e37cd(0x1c7)](_0x1e37cd(0x1ad));else{if(_0x1e385c[_0x1e37cd(0x1e1)]>0x0){console[_0x1e37cd(0x1c7)](_0x69d260['knVMh']);for(const _0x3f2839 of _0x1e385c){console['log'](_0x1e37cd(0x19d)+bold(_0x3f2839[_0x1e37cd(0x1df)])+':\x20'+link(_0x3f2839['path'],_0x69d260[_0x1e37cd(0x1ba)](basename,_0x3f2839['path'])));}}if(_0x69d260[_0x1e37cd(0x184)](_0x52389a['length'],0x0)){console['log'](_0x69d260['SoazT']);for(const _0x2efb59 of _0x52389a){console['log'](_0x1e37cd(0x19d)+_0x69d260[_0x1e37cd(0x1ba)](bold,_0x2efb59[_0x1e37cd(0x1df)])+':\x20'+link(_0x2efb59[_0x1e37cd(0x18e)],_0x69d260['BEgQI'](basename,_0x2efb59[_0x1e37cd(0x18e)])));}}}console['log'](_0x1e37cd(0x1bf));const {envs:_0x217303,activeEnv:_0xc0a02f}=await _0x69d260[_0x1e37cd(0x1c1)](getEnvironments);if(_0x217303['length']===0x0)console[_0x1e37cd(0x1c7)](_0x69d260[_0x1e37cd(0x1ce)]),console['log'](_0x1e37cd(0x1b8));else{for(const _0x346af7 of _0x217303){const _0x295229=_0x346af7[_0x1e37cd(0x1de)]?_0x69d260[_0x1e37cd(0x1d0)]:'',_0x44e7cf=_0x346af7['hasEncryptedAuth']?_0x69d260[_0x1e37cd(0x1af)]:_0x346af7['hasPlaintextAuth']?_0x69d260[_0x1e37cd(0x1cd)]:'none';console[_0x1e37cd(0x1c7)]('\x20\x20'+_0x69d260['Uquqq'](bold,_0x346af7['name'])+_0x295229),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x44e7cf),_0x69d260['RjzYd'](_0x346af7[_0x1e37cd(0x19e)],'(not\x20found)')&&console['log'](_0x1e37cd(0x1c2)+link(_0x346af7[_0x1e37cd(0x19e)],_0x69d260[_0x1e37cd(0x1c8)](basename,_0x346af7['settingsPath'])));}!_0xc0a02f&&(console['log'](_0x1e37cd(0x1bb)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x217303['map'](_0x3a59c9=>_0x3a59c9['name'])['join'](',\x20')+')'));}console[_0x1e37cd(0x1c7)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5a9444,_0x456a53){const _0x39ff44=_0x370b,_0x1b0b1e=_0x5a9444();while(!![]){try{const _0x556028=parseInt(_0x39ff44(0x16d))/0x1*(parseInt(_0x39ff44(0x140))/0x2)+-parseInt(_0x39ff44(0x16a))/0x3+-parseInt(_0x39ff44(0x163))/0x4*(parseInt(_0x39ff44(0x156))/0x5)+-parseInt(_0x39ff44(0x158))/0x6*(parseInt(_0x39ff44(0x160))/0x7)+parseInt(_0x39ff44(0x138))/0x8+-parseInt(_0x39ff44(0x142))/0x9+parseInt(_0x39ff44(0x16f))/0xa*(parseInt(_0x39ff44(0x13a))/0xb);if(_0x556028===_0x456a53)break;else _0x1b0b1e['push'](_0x1b0b1e['shift']());}catch(_0x45a10d){_0x1b0b1e['push'](_0x1b0b1e['shift']());}}}(_0x24a7,0x90004));import{spawn}from'child_process';function _0x24a7(){const _0x451b6c=['utf-8','push','xvIhf','log','length','npm','active-feature.txt','active-profile.txt','platform','vVEXV','10qbpPiW','ShfoY','12Pxzyzk','findIndex','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','hdDwf','inherit','pyDqd','error','ranger@trailhead','129402oOfjdV','CeDAU','.gitignore','956428kCrqfn','\x20skill\x20','FEQUA','naRAi','version','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','--scope','589779YdLjDS','\x0aSuccessfully\x20installed\x20latest\x20version.','pLaKN','1001911lIZnhx','\x0a✅\x20Update\x20complete!','702310hZqTCc','BGQZZ','GHftP','opencode','\x0aReinstalling\x20','xFhJG','win32','8557728GHyody','close','55DYbUwq','pipe','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','hoGpk','Update\x20failed.','claude','2OkXVps','\x0aYour\x20version\x20(','10090575iVqvjV','warn','xcEDF','rvyyb','tYXwW','splice','Update\x20failed:\x20','wdLFz','HBraC','JMREa'];_0x24a7=function(){return _0x451b6c;};return _0x24a7();}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';function _0x370b(_0x305b65,_0x444e40){_0x305b65=_0x305b65-0x134;const _0x24a7c8=_0x24a7();let _0x370b38=_0x24a7c8[_0x305b65];return _0x370b38;}import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x102b88=_0x370b,_0x4120f2={'cVogC':function(_0x5af102,_0x2c01f5){return _0x5af102(_0x2c01f5);},'rvyyb':_0x102b88(0x15c),'rVJqX':_0x102b88(0x137)};return new Promise(_0x40d0af=>{const _0x4ae8bb=_0x102b88;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x13ed10=spawn(_0x4ae8bb(0x151),['install','-g',PACKAGE_NAME+'@latest'],{'stdio':_0x4120f2[_0x4ae8bb(0x145)],'shell':process[_0x4ae8bb(0x154)]===_0x4120f2['rVJqX']});_0x13ed10['on'](_0x4ae8bb(0x139),_0x224ad3=>{_0x4120f2['cVogC'](_0x40d0af,_0x224ad3===0x0);}),_0x13ed10['on'](_0x4ae8bb(0x15e),()=>{_0x40d0af(![]);});});}async function updateClaudeMarketplace(){const _0x25775d={'UCKcD':'plugin','paNFO':'marketplace','qFSOu':'pipe'};return new Promise(_0x25c5a3=>{const _0x4edcb6=_0x370b,_0x450669={'vVEXV':function(_0x329d02,_0x56204a){return _0x329d02===_0x56204a;}},_0x2c5183=spawn(_0x4edcb6(0x13f),[_0x25775d['UCKcD'],_0x25775d['paNFO'],'update','trailhead'],{'stdio':_0x25775d['qFSOu'],'shell':process[_0x4edcb6(0x154)]==='win32'});_0x2c5183['on']('close',_0x3f2c00=>{const _0x36a101=_0x4edcb6;_0x25c5a3(_0x450669[_0x36a101(0x155)](_0x3f2c00,0x0));}),_0x2c5183['on']('error',()=>{_0x25c5a3(![]);});});}async function updateClaudePlugin(_0x17f1b9){const _0x2d2be2=_0x370b,_0x5b558d={'wdLFz':'update','pLaKN':_0x2d2be2(0x15f),'pyDqd':_0x2d2be2(0x169),'EKsib':function(_0x33db18,_0x258a3f,_0x54bd60,_0x5901e5){return _0x33db18(_0x258a3f,_0x54bd60,_0x5901e5);},'JMREa':'claude','xFhJG':function(_0x4cabb6,_0x1ba66f){return _0x4cabb6===_0x1ba66f;},'hoGpk':'close'};return new Promise(_0x4cb0fa=>{const _0x4d05f3=_0x2d2be2,_0x47e22a=['plugin',_0x5b558d[_0x4d05f3(0x149)],_0x5b558d[_0x4d05f3(0x16c)]];_0x17f1b9&&_0x47e22a['push'](_0x5b558d[_0x4d05f3(0x15d)],_0x17f1b9);const _0x2140ea=_0x5b558d['EKsib'](spawn,_0x5b558d[_0x4d05f3(0x14b)],_0x47e22a,{'stdio':_0x4d05f3(0x13b),'shell':_0x5b558d[_0x4d05f3(0x136)](process['platform'],_0x4d05f3(0x137))});_0x2140ea['on'](_0x5b558d[_0x4d05f3(0x13d)],_0xdfb533=>{_0x4cb0fa(_0xdfb533===0x0);}),_0x2140ea['on']('error',()=>{_0x4cb0fa(![]);});});}function isSkillInstalled(_0xc23973,_0x24b7f4,_0x4f4f88){const _0x27b9aa=_0x370b,_0x8a5afc={'FEQUA':function(_0xa8aaab,_0x50e7e9){return _0xa8aaab(_0x50e7e9);},'qOuwc':function(_0x1d3122,_0x4a87a8,_0x10066c){return _0x1d3122(_0x4a87a8,_0x10066c);},'ShfoY':function(_0x55cb1d,_0xe91b88){return _0x55cb1d(_0xe91b88);}},_0x325410=_0x4f4f88===_0x27b9aa(0x134)?_0x8a5afc[_0x27b9aa(0x165)](getOpencodeSkillsDir,_0x24b7f4):getSkillsDir(_0x24b7f4),_0x1b16e8=_0x8a5afc['qOuwc'](join,_0x325410,_0xc23973);return _0x8a5afc[_0x27b9aa(0x157)](existsSync,_0x1b16e8);}async function reinstallSkills(_0x3daad0){const _0x17b401=_0x370b,_0x5f7a33={'BGQZZ':function(_0x35e275,_0x1c4b6b,_0x153e19,_0x16ac57){return _0x35e275(_0x1c4b6b,_0x153e19,_0x16ac57);},'naRAi':_0x17b401(0x134),'mNOol':function(_0x170e2a,_0x44bfc0,_0x2f6f90){return _0x170e2a(_0x44bfc0,_0x2f6f90);}},_0x53cdab=['project','user'],_0x561de0=[];for(const _0x3d0c6c of _0x53cdab){for(const _0x2136aa of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x2136aa,_0x3d0c6c,_0x17b401(0x13f))&&_0x561de0[_0x17b401(0x14d)]({'skillName':_0x2136aa,'level':_0x3d0c6c,'platform':'claude'}),_0x5f7a33[_0x17b401(0x170)](isSkillInstalled,_0x2136aa,_0x3d0c6c,_0x5f7a33['naRAi'])&&_0x561de0['push']({'skillName':_0x2136aa,'level':_0x3d0c6c,'platform':_0x5f7a33[_0x17b401(0x166)]});}}for(const _0x36dfcf of _0x53cdab){for(const _0x469cfd of DEPRECATED_SKILLS){await _0x5f7a33['mNOol'](removeSkill,_0x469cfd,_0x36dfcf);}}if(_0x561de0[_0x17b401(0x150)]===0x0){console[_0x17b401(0x14f)](_0x17b401(0x13c));return;}console[_0x17b401(0x14f)](_0x17b401(0x135)+_0x561de0['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1c603f,level:_0x18032b,platform:_0x55d0c2}of _0x561de0){try{await installSkill(_0x1c603f,{'level':_0x18032b,'cliVersion':_0x3daad0,'platform':_0x55d0c2});}catch(_0x577e55){console[_0x17b401(0x143)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x55d0c2+'\x20'+_0x18032b+_0x17b401(0x164)+_0x1c603f+':',_0x577e55);}}}async function ensureActiveProfileGitignored(){const _0x1eede2=_0x370b,_0x56a89d={'xcEDF':function(_0x20e852){return _0x20e852();},'xrRQJ':_0x1eede2(0x162),'ZJGZo':'utf-8','CeDAU':function(_0x46ba4d,_0x3c1786){return _0x46ba4d===_0x3c1786;}},_0x283c06=join(_0x56a89d[_0x1eede2(0x144)](getRangerDir),_0x56a89d['xrRQJ']);if(!existsSync(_0x283c06))return![];let _0x10b380='';try{_0x10b380=await readFile(_0x283c06,_0x56a89d['ZJGZo']);}catch{return![];}const _0xac4dba=_0x10b380['split'](/\r?\n/);if(_0xac4dba['some'](_0x45ce62=>_0x45ce62['trim']()===_0x1eede2(0x153)))return![];let _0x1de8dc=_0xac4dba[_0x1eede2(0x159)](_0x23e582=>_0x23e582['trim']()===_0x1eede2(0x152));_0x56a89d[_0x1eede2(0x161)](_0x1de8dc,-0x1)&&(_0x1de8dc=_0xac4dba[_0x1eede2(0x150)]);_0xac4dba[_0x1eede2(0x147)](_0x1de8dc,0x0,'active-profile.txt');let _0x86fabd=_0xac4dba['join']('\x0a');!_0x86fabd['endsWith']('\x0a')&&(_0x86fabd+='\x0a');try{await writeFile(_0x283c06,_0x86fabd,_0x1eede2(0x14c));}catch{return![];}return!![];}export async function update(){const _0x36ff6a=_0x370b,_0x25d0da={'tXLZA':'Checking\x20for\x20updates...','hdDwf':function(_0x8fa71c){return _0x8fa71c();},'xvIhf':'Attempting\x20install\x20anyway...','pHMCo':function(_0x3cf7bf,_0x1e70aa){return _0x3cf7bf===_0x1e70aa;},'lTntF':_0x36ff6a(0x15f),'HBraC':_0x36ff6a(0x15a),'tYXwW':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','GHftP':function(_0x49aed4,_0x186d72){return _0x49aed4(_0x186d72);},'RJAGb':'project','wWbuR':'✓\x20Migrated\x20active\x20profile\x20file'},_0x20cd94=getCurrentVersion();console[_0x36ff6a(0x14f)]('\x0aCurrent\x20version:\x20'+_0x20cd94),console[_0x36ff6a(0x14f)](_0x25d0da['tXLZA']);const _0x88e816=_0x25d0da[_0x36ff6a(0x15b)](getLatestVersion);let _0x1a00a8=_0x20cd94;if(!_0x88e816['version']){console[_0x36ff6a(0x143)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x88e816['error']),console[_0x36ff6a(0x14f)](_0x25d0da[_0x36ff6a(0x14e)]);const _0x3c0ff2=await runInstall();if(_0x3c0ff2)console[_0x36ff6a(0x14f)](_0x36ff6a(0x16b)),_0x1a00a8=getCurrentVersion();else throw new Error(_0x36ff6a(0x148)+_0x88e816[_0x36ff6a(0x15e)]);}else{const _0x3641a6=_0x88e816[_0x36ff6a(0x167)];console['log']('Latest\x20version:\x20\x20'+_0x3641a6);const _0xcfb6be=compareVersions(_0x20cd94,_0x3641a6);if(_0x25d0da['pHMCo'](_0xcfb6be,0x0))console['log'](_0x36ff6a(0x168));else{if(_0xcfb6be<0x0)console[_0x36ff6a(0x14f)](_0x36ff6a(0x141)+_0x20cd94+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3641a6+').');else{const _0x678dd=await _0x25d0da['hdDwf'](runInstall);if(_0x678dd)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x3641a6),_0x1a00a8=_0x3641a6;else throw new Error(_0x36ff6a(0x13e));}}}await reinstallSkills(_0x1a00a8);const _0x1d3448=await isMarketplaceAdded('trailhead'),_0x1be9be=await isPluginInstalled(_0x25d0da['lTntF']);if(_0x1d3448){const _0x352705=await updateClaudeMarketplace();_0x352705&&console['log'](_0x25d0da[_0x36ff6a(0x14a)]);}if(_0x1be9be){const _0x379c9e=await updateClaudePlugin();_0x379c9e&&console['log'](_0x25d0da[_0x36ff6a(0x146)]);const _0x2ad44f=await _0x25d0da[_0x36ff6a(0x171)](updateClaudePlugin,_0x25d0da['RJAGb']);_0x2ad44f&&console[_0x36ff6a(0x14f)]((_0x379c9e?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x5842b7=await migrateActiveProfileFile();_0x5842b7&&console['log'](_0x25d0da['wWbuR']);const _0x4e482e=await ensureActiveProfileGitignored();console['log'](_0x36ff6a(0x16e));}
|
|
1
|
+
(function(_0x4db687,_0x24ff98){const _0x3c0e13=_0x4ec2,_0xb37acb=_0x4db687();while(!![]){try{const _0x36d89d=parseInt(_0x3c0e13(0x1f0))/0x1+-parseInt(_0x3c0e13(0x1c8))/0x2*(parseInt(_0x3c0e13(0x1db))/0x3)+parseInt(_0x3c0e13(0x1f6))/0x4+parseInt(_0x3c0e13(0x1f3))/0x5*(-parseInt(_0x3c0e13(0x1d4))/0x6)+-parseInt(_0x3c0e13(0x1cc))/0x7+-parseInt(_0x3c0e13(0x1e3))/0x8+parseInt(_0x3c0e13(0x1e0))/0x9;if(_0x36d89d===_0x24ff98)break;else _0xb37acb['push'](_0xb37acb['shift']());}catch(_0x15cfe0){_0xb37acb['push'](_0xb37acb['shift']());}}}(_0x5092,0xd9044));import{spawn}from'child_process';import{existsSync}from'fs';function _0x5092(){const _0xb426e2=['trailhead','Bmvck','platform','948xkTtVW','xtmoj','cLpnZ','warn','ranger@trailhead','pipe','xvnfY','2751hXtBMM','SByTn','LrwgB','log','install','36597114lGxjWo','update','mzBkK','11306072wDfXem','@latest','QYllF','ErJkB','gGPeH','zvdLF','LDmla','error','JHpNj','cAgnB','oiaQF','\x0aSuccessfully\x20installed\x20latest\x20version.','lGsju','342480SFtVug','\x20skill\x20','jHxxf','33340sBmLVV','mkpBf','utf-8','2221772QVxZSf','join','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','kebDR','version','rwdOJ','active-profile.txt','iisXk','✓\x20Migrated\x20active\x20profile\x20file','cBaoj','MwpYD','win32','@latest...\x0a','plugin','project','length','npm','jnuyb','sPZqC','2402hqgfdr','push','close','some','3550743uMhrca','VoFJv','ddJti','trim','opencode'];_0x5092=function(){return _0xb426e2;};return _0x5092();}import{readFile,writeFile}from'fs/promises';function _0x4ec2(_0x35f9fa,_0x5a013e){_0x35f9fa=_0x35f9fa-0x1b8;const _0x5092d6=_0x5092();let _0x4ec207=_0x5092d6[_0x35f9fa];return _0x4ec207;}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 _0x4591e2=_0x4ec2,_0x24e086={'rwdOJ':function(_0x1271f4,_0x1e7952,_0x365113,_0x53e6a7){return _0x1271f4(_0x1e7952,_0x365113,_0x53e6a7);},'gGPeH':_0x4591e2(0x1df),'ErJkB':'error'};return new Promise(_0x1c1a13=>{const _0x2168f1=_0x4591e2,_0x58fdbc={'ouXKr':function(_0x139612,_0x203bdc){return _0x139612(_0x203bdc);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+_0x2168f1(0x1c1));const _0x3ab9cb=_0x24e086[_0x2168f1(0x1ba)](spawn,_0x2168f1(0x1c5),[_0x24e086[_0x2168f1(0x1e7)],'-g',PACKAGE_NAME+_0x2168f1(0x1e4)],{'stdio':'inherit','shell':process[_0x2168f1(0x1d3)]===_0x2168f1(0x1c0)});_0x3ab9cb['on']('close',_0x14a140=>{_0x1c1a13(_0x14a140===0x0);}),_0x3ab9cb['on'](_0x24e086[_0x2168f1(0x1e6)],()=>{_0x58fdbc['ouXKr'](_0x1c1a13,![]);});});}async function updateClaudeMarketplace(){const _0xd7ddf8=_0x4ec2,_0xa33954={'sPZqC':function(_0x2f0360,_0x4ce961){return _0x2f0360(_0x4ce961);},'cAgnB':function(_0x17f2c8,_0x49419e,_0x3addce,_0x2eb72d){return _0x17f2c8(_0x49419e,_0x3addce,_0x2eb72d);},'mzBkK':'claude','rLQjv':'marketplace','SByTn':_0xd7ddf8(0x1e1),'MwpYD':_0xd7ddf8(0x1d1),'ddJti':'pipe','qlEUV':_0xd7ddf8(0x1ca),'jHxxf':'error'};return new Promise(_0x5827c0=>{const _0x24dba2=_0xd7ddf8,_0x4fe5c4=_0xa33954[_0x24dba2(0x1ec)](spawn,_0xa33954[_0x24dba2(0x1e2)],['plugin',_0xa33954['rLQjv'],_0xa33954[_0x24dba2(0x1dc)],_0xa33954[_0x24dba2(0x1bf)]],{'stdio':_0xa33954[_0x24dba2(0x1ce)],'shell':process['platform']===_0x24dba2(0x1c0)});_0x4fe5c4['on'](_0xa33954['qlEUV'],_0x23a935=>{const _0x5e364e=_0x24dba2;_0xa33954[_0x5e364e(0x1c7)](_0x5827c0,_0x23a935===0x0);}),_0x4fe5c4['on'](_0xa33954[_0x24dba2(0x1f2)],()=>{_0x5827c0(![]);});});}async function updateClaudePlugin(_0x4500e3){const _0x4d54fe=_0x4ec2,_0x1a48f2={'sVFdB':function(_0x231fe3,_0x7fe39b){return _0x231fe3===_0x7fe39b;},'LDmla':function(_0x12b772,_0x1e5284){return _0x12b772(_0x1e5284);},'bnvsg':'--scope','cLpnZ':function(_0x38b5fd,_0x167357,_0x4ee3d0,_0x28f70c){return _0x38b5fd(_0x167357,_0x4ee3d0,_0x28f70c);},'qAEye':'claude','xvnfY':_0x4d54fe(0x1d9),'MIuEE':_0x4d54fe(0x1c0),'oiaQF':_0x4d54fe(0x1ea)};return new Promise(_0x4b2b45=>{const _0x49ab10=_0x4d54fe,_0x2c8b80=[_0x49ab10(0x1c2),'update',_0x49ab10(0x1d8)];_0x4500e3&&_0x2c8b80[_0x49ab10(0x1c9)](_0x1a48f2['bnvsg'],_0x4500e3);const _0x553582=_0x1a48f2[_0x49ab10(0x1d6)](spawn,_0x1a48f2['qAEye'],_0x2c8b80,{'stdio':_0x1a48f2[_0x49ab10(0x1da)],'shell':process['platform']===_0x1a48f2['MIuEE']});_0x553582['on'](_0x49ab10(0x1ca),_0x3f2969=>{_0x4b2b45(_0x1a48f2['sVFdB'](_0x3f2969,0x0));}),_0x553582['on'](_0x1a48f2[_0x49ab10(0x1ed)],()=>{const _0xee9613=_0x49ab10;_0x1a48f2[_0xee9613(0x1e9)](_0x4b2b45,![]);});});}function isSkillInstalled(_0x2e06d0,_0x523993,_0x2f67e2){const _0x2c6892=_0x4ec2,_0x16a6bf={'cSDks':function(_0x4bb953,_0x39ef36){return _0x4bb953===_0x39ef36;},'sVJCK':_0x2c6892(0x1d0),'maOlV':function(_0x45d2ff,_0x1f303d){return _0x45d2ff(_0x1f303d);},'sCOgQ':function(_0x206728,_0x547fc4,_0x5c0146){return _0x206728(_0x547fc4,_0x5c0146);},'DVIZf':function(_0x3cc4eb,_0x12bd6c){return _0x3cc4eb(_0x12bd6c);}},_0x4d1f10=_0x16a6bf['cSDks'](_0x2f67e2,_0x16a6bf['sVJCK'])?_0x16a6bf['maOlV'](getOpencodeSkillsDir,_0x523993):getSkillsDir(_0x523993),_0x511b97=_0x16a6bf['sCOgQ'](join,_0x4d1f10,_0x2e06d0);return _0x16a6bf['DVIZf'](existsSync,_0x511b97);}async function reinstallSkills(_0x35d57f){const _0x523235=_0x4ec2,_0x490a14={'jnuyb':'user','iisXk':'claude','QYllF':_0x523235(0x1f8),'lGsju':function(_0x3ba027,_0x3540e5,_0x35d2d0){return _0x3ba027(_0x3540e5,_0x35d2d0);}},_0x4d9e34=['project',_0x490a14[_0x523235(0x1c6)]],_0x2a4123=[];for(const _0x3c4d2c of _0x4d9e34){for(const _0x2ab2dd of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x2ab2dd,_0x3c4d2c,'claude')&&_0x2a4123['push']({'skillName':_0x2ab2dd,'level':_0x3c4d2c,'platform':_0x490a14[_0x523235(0x1bc)]}),isSkillInstalled(_0x2ab2dd,_0x3c4d2c,_0x523235(0x1d0))&&_0x2a4123['push']({'skillName':_0x2ab2dd,'level':_0x3c4d2c,'platform':'opencode'});}}for(const _0x8570c1 of _0x4d9e34){for(const _0x500279 of DEPRECATED_SKILLS){await removeSkill(_0x500279,_0x8570c1);}}if(_0x2a4123[_0x523235(0x1c4)]===0x0){console[_0x523235(0x1de)](_0x490a14[_0x523235(0x1e5)]);return;}console['log']('\x0aReinstalling\x20'+_0x2a4123['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x25e5a8,level:_0xb872bb,platform:_0x3aee5a}of _0x2a4123){try{await _0x490a14[_0x523235(0x1ef)](installSkill,_0x25e5a8,{'level':_0xb872bb,'cliVersion':_0x35d57f,'platform':_0x3aee5a});}catch(_0xccf684){console[_0x523235(0x1d7)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x3aee5a+'\x20'+_0xb872bb+_0x523235(0x1f1)+_0x25e5a8+':',_0xccf684);}}}async function ensureActiveProfileGitignored(){const _0x4203e9=_0x4ec2,_0x4ccb77={'Bmvck':function(_0x19a159,_0x328655,_0x20b3eb){return _0x19a159(_0x328655,_0x20b3eb);},'JHpNj':function(_0x491f81,_0x24fae3){return _0x491f81(_0x24fae3);},'zrGTj':function(_0xcd8d2,_0x37e99e,_0x3411d9){return _0xcd8d2(_0x37e99e,_0x3411d9);},'mkpBf':_0x4203e9(0x1f5)},_0x5ccc90=_0x4ccb77[_0x4203e9(0x1d2)](join,getRangerDir(),'.gitignore');if(!_0x4ccb77[_0x4203e9(0x1eb)](existsSync,_0x5ccc90))return![];let _0x11d44b='';try{_0x11d44b=await _0x4ccb77['zrGTj'](readFile,_0x5ccc90,'utf-8');}catch{return![];}const _0x4aca8f=_0x11d44b['split'](/\r?\n/);if(_0x4aca8f[_0x4203e9(0x1cb)](_0x2ecf19=>_0x2ecf19[_0x4203e9(0x1cf)]()===_0x4203e9(0x1bb)))return![];let _0xbc091a=_0x4aca8f['findIndex'](_0xc0a6d0=>_0xc0a6d0['trim']()==='active-feature.txt');_0xbc091a===-0x1&&(_0xbc091a=_0x4aca8f['length']);_0x4aca8f['splice'](_0xbc091a,0x0,_0x4203e9(0x1bb));let _0x5bf771=_0x4aca8f[_0x4203e9(0x1f7)]('\x0a');!_0x5bf771['endsWith']('\x0a')&&(_0x5bf771+='\x0a');try{await writeFile(_0x5ccc90,_0x5bf771,_0x4ccb77[_0x4203e9(0x1f4)]);}catch{return![];}return!![];}export async function update(){const _0x31a009=_0x4ec2,_0x221776={'cBaoj':function(_0x25242e){return _0x25242e();},'LrwgB':function(_0x4de34f){return _0x4de34f();},'zvdLF':_0x31a009(0x1ee),'Boqen':function(_0x2cae9c){return _0x2cae9c();},'zjMXD':function(_0x1a0aa0,_0x50e03b){return _0x1a0aa0<_0x50e03b;},'kebDR':'Update\x20failed.','VoFJv':function(_0x5b58d7,_0x99ee19){return _0x5b58d7(_0x99ee19);},'ztyLH':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','xtmoj':'\x0a✅\x20Update\x20complete!'},_0xe97b52=_0x221776[_0x31a009(0x1be)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0xe97b52),console['log']('Checking\x20for\x20updates...');const _0x364a95=_0x221776[_0x31a009(0x1dd)](getLatestVersion);let _0x2ad439=_0xe97b52;if(!_0x364a95[_0x31a009(0x1b9)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x364a95['error']),console['log']('Attempting\x20install\x20anyway...');const _0x1563a1=await runInstall();if(_0x1563a1)console[_0x31a009(0x1de)](_0x221776[_0x31a009(0x1e8)]),_0x2ad439=_0x221776['Boqen'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x364a95['error']);}else{const _0x1506d7=_0x364a95[_0x31a009(0x1b9)];console[_0x31a009(0x1de)]('Latest\x20version:\x20\x20'+_0x1506d7);const _0xa57860=compareVersions(_0xe97b52,_0x1506d7);if(_0xa57860===0x0)console[_0x31a009(0x1de)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x221776['zjMXD'](_0xa57860,0x0))console['log']('\x0aYour\x20version\x20('+_0xe97b52+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1506d7+').');else{const _0x197f45=await runInstall();if(_0x197f45)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1506d7),_0x2ad439=_0x1506d7;else throw new Error(_0x221776[_0x31a009(0x1b8)]);}}}await reinstallSkills(_0x2ad439);const _0x2a3235=await _0x221776['VoFJv'](isMarketplaceAdded,_0x31a009(0x1d1)),_0xe18299=await _0x221776[_0x31a009(0x1cd)](isPluginInstalled,_0x31a009(0x1d8));if(_0x2a3235){const _0x7e9cd4=await updateClaudeMarketplace();_0x7e9cd4&&console[_0x31a009(0x1de)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0xe18299){const _0x593697=await _0x221776['cBaoj'](updateClaudePlugin);_0x593697&&console['log'](_0x221776['ztyLH']);const _0x4656fc=await _0x221776['VoFJv'](updateClaudePlugin,_0x31a009(0x1c3));_0x4656fc&&console['log']((_0x593697?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x42cd93=await _0x221776['LrwgB'](migrateActiveProfileFile);_0x42cd93&&console['log'](_0x31a009(0x1bd));const _0x11b6ca=await _0x221776['Boqen'](ensureActiveProfileGitignored);console['log'](_0x221776[_0x31a009(0x1d5)]);}
|