@ranger-testing/ranger-cli 2.1.7 → 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/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_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
|
-
|
|
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(_0x3d51f6,_0x4ed075){const _0x1ea48c=_0xc872,_0x43397b=_0x3d51f6();while(!![]){try{const _0x44e556=parseInt(_0x1ea48c(0x123))/0x1+parseInt(_0x1ea48c(0x10c))/0x2+-parseInt(_0x1ea48c(0x121))/0x3+-parseInt(_0x1ea48c(0x142))/0x4+-parseInt(_0x1ea48c(0x112))/0x5*(parseInt(_0x1ea48c(0x116))/0x6)+-parseInt(_0x1ea48c(0x118))/0x7*(-parseInt(_0x1ea48c(0x12f))/0x8)+parseInt(_0x1ea48c(0x13f))/0x9;if(_0x44e556===_0x4ed075)break;else _0x43397b['push'](_0x43397b['shift']());}catch(_0x3322c1){_0x43397b['push'](_0x43397b['shift']());}}}(_0x394d,0x1f275));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0xc872(_0xa77ad1,_0x58df9a){_0xa77ad1=_0xa77ad1-0x10c;const _0x394d29=_0x394d();let _0xc87228=_0x394d29[_0xa77ad1];return _0xc87228;}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x394d(){const _0x49efde=['✓\x20Auth\x20state\x20found','trackPhaseEnd','rGUrw','auth','60565zDuIhN','LdPOZ','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','auth.json.enc','78pglByO','lYScX','35fEReFU','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','XGYHw','jNqCE','xbwIq','error','auth.json','ophKX','611712NWKNMO','baseUrl','176492KmhHhK','message','ranger-testing/trailhead','log','AIrWm','add','✓\x20Marketplace\x20already\x20added','path','map','marketplace','sessions','dir_setup','210368CusFaN','skipChromium','oSrGH','profile','name','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','chromium','YtXlv','skills','project','success','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','length','gjrFP','oZvgL','ranger@trailhead','2416572voPAQg','aJMPz','IKFub','657628HSuWwo','CI\x20profile\x20\x22','Failed\x20to\x20install\x20plugin:','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','tbluK','--scope','✓\x20Active\x20profile:\x20','VPmkn','settings.json','Auto-detected\x20CI\x20profile:\x20','bgCXA','nYwPE','UTxGc','153810lwerlF','plugin'];_0x394d=function(){return _0x49efde;};return _0x394d();}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(_0x294141){const _0x5ae880=_0xc872,_0x228f6a={'ophKX':function(_0x356191){return _0x356191();},'jNqCE':function(_0x1da10e,_0x2337c8,_0x261421){return _0x1da10e(_0x2337c8,_0x261421);},'OPWHB':function(_0x13edfc,_0x4bb602){return _0x13edfc(_0x4bb602);},'aJMPz':function(_0x464a4e,_0x5455fc){return _0x464a4e+_0x5455fc;},'pKrWa':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','UTxGc':function(_0x519d02,_0x35f6af){return _0x519d02===_0x35f6af;},'bCzDp':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'},_0x3c86c7=_0x228f6a[_0x5ae880(0x120)](getRangerDir),_0x22f8b6=_0x228f6a[_0x5ae880(0x11c)](join,_0x3c86c7,'ci');if(_0x294141){const _0x146794=_0x228f6a['jNqCE'](join,_0x22f8b6,_0x294141);return{'name':_0x294141,'path':_0x146794};}if(!_0x228f6a['OPWHB'](existsSync,_0x22f8b6))throw new Error(_0x228f6a[_0x5ae880(0x140)](_0x5ae880(0x11a),_0x228f6a['pKrWa']));const _0x5e5adf=await _0x228f6a[_0x5ae880(0x11c)](readdir,_0x22f8b6,{'withFileTypes':!![]}),_0x534d75=_0x5e5adf['filter'](_0x4d86a9=>_0x4d86a9['isDirectory']())[_0x5ae880(0x12b)](_0x41a71a=>_0x41a71a[_0x5ae880(0x133)]);if(_0x228f6a['UTxGc'](_0x534d75['length'],0x0))throw new Error(_0x228f6a['aJMPz'](_0x228f6a['bCzDp'],_0x5ae880(0x145)));if(_0x228f6a[_0x5ae880(0x14e)](_0x534d75[_0x5ae880(0x13b)],0x1)){const _0x11eaf0=_0x534d75[0x0];return console[_0x5ae880(0x126)](_0x5ae880(0x14b)+_0x11eaf0),{'name':_0x11eaf0,'path':_0x228f6a[_0x5ae880(0x11c)](join,_0x22f8b6,_0x11eaf0)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x534d75['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x1a31a1=_0xc872,_0x5de1ed={'IKFub':function(_0x4e4d6c,_0x8bd3ba){return _0x4e4d6c(_0x8bd3ba);},'YtXlv':'trailhead','VPmkn':_0x1a31a1(0x129),'VCBdk':'plugin','XGYHw':_0x1a31a1(0x12c),'mpiFL':_0x1a31a1(0x125),'rGUrw':_0x1a31a1(0x13e),'qszsq':_0x1a31a1(0x147),'gTfTD':_0x1a31a1(0x138),'oSrGH':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project'},_0xceac6=await _0x5de1ed[_0x1a31a1(0x141)](isPluginInstalled,_0x1a31a1(0x13e));if(_0xceac6)return console[_0x1a31a1(0x126)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x1a31a1(0x114));const _0x1c3aaf=await isMarketplaceAdded(_0x5de1ed[_0x1a31a1(0x136)]);let _0x3f48ae=_0x1c3aaf;if(_0x1c3aaf)console['log'](_0x5de1ed[_0x1a31a1(0x149)]);else{const _0x15dbdf=await _0x5de1ed[_0x1a31a1(0x141)](runClaudeCommand,[_0x5de1ed['VCBdk'],_0x5de1ed[_0x1a31a1(0x11b)],_0x1a31a1(0x128),_0x5de1ed['mpiFL']]);!_0x15dbdf['success']?(console[_0x1a31a1(0x11e)]('Failed\x20to\x20add\x20marketplace:',_0x15dbdf[_0x1a31a1(0x11e)]),console[_0x1a31a1(0x126)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x3f48ae=!![];}if(_0x3f48ae){const _0x15bec4=await _0x5de1ed['IKFub'](runClaudeCommand,['plugin','install',_0x5de1ed[_0x1a31a1(0x110)],_0x5de1ed['qszsq'],_0x5de1ed['gTfTD']]);!_0x15bec4[_0x1a31a1(0x139)]?(console['error'](_0x1a31a1(0x144),_0x15bec4[_0x1a31a1(0x11e)]),console[_0x1a31a1(0x126)](_0x5de1ed[_0x1a31a1(0x131)])):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0xa2b9cd,_0x3304ba,_0x31bcdd){const _0x1c0374=_0xc872,_0x8cdf5d={'siLfd':'auth','LdPOZ':'dir_setup','lYScX':function(_0x23b4c4,_0x5a8c90,_0x3837dc){return _0x23b4c4(_0x5a8c90,_0x3837dc);},'nYwPE':function(_0x534c34,_0xcb2966){return _0x534c34(_0xcb2966);},'AIrWm':_0x1c0374(0x135),'geBJD':function(_0x119f7d){return _0x119f7d();},'mmZKH':function(_0x226c83,_0x2c3ae1,_0x5b8d4f){return _0x226c83(_0x2c3ae1,_0x5b8d4f);},'XaKcZ':function(_0xd56340,_0x2ec8b1,_0x4a258f){return _0xd56340(_0x2ec8b1,_0x4a258f);},'pszro':_0x1c0374(0x14a),'bgCXA':function(_0x1cc249,_0x43f985){return _0x1cc249(_0x43f985);},'DtOjn':function(_0x3a9da1,_0x514bf1){return _0x3a9da1(_0x514bf1);},'oZvgL':'No\x20API\x20token\x20available\x20for\x20decryption','xbwIq':function(_0x35d4f0,_0x561a6c){return _0x35d4f0(_0x561a6c);},'MFyuu':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','OxBQT':_0x1c0374(0x10e),'gjrFP':_0x1c0374(0x119),'gNDkZ':'profile_activate','vxnkk':function(_0xe43609){return _0xe43609();},'YjZMX':'skills','tbluK':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console[_0x1c0374(0x126)]('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d['siLfd']),await authenticate(_0xa2b9cd),_0x31bcdd?.['trackPhaseEnd'](_0x1c0374(0x111)),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d[_0x1c0374(0x113)]);const {path:_0x3182f4,installed:_0x55a57f}=await ensureRangerDir();await writeRangerGitignore(_0x3182f4);const _0x1e37bb=_0x8cdf5d[_0x1c0374(0x117)](join,_0x3182f4,_0x1c0374(0x12d));!_0x8cdf5d[_0x1c0374(0x14d)](existsSync,_0x1e37bb)&&await mkdir(_0x1e37bb,{'recursive':!![]});_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x12e),{'installed':_0x55a57f}),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d[_0x1c0374(0x127)]);let _0x185e06=![];_0x3304ba?.[_0x1c0374(0x130)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x185e06=await _0x8cdf5d['geBJD'](ensureChromium);_0x31bcdd?.['trackPhaseEnd'](_0x8cdf5d['AIrWm'],{'installed':_0x185e06,'skipped':!!_0x3304ba?.[_0x1c0374(0x130)]}),_0x31bcdd?.['trackPhaseStart']('profile_activate');const _0x1ebf0e=await findCiProfile(_0x3304ba?.[_0x1c0374(0x132)]);let _0x2f826f=![];_0x3304ba?.[_0x1c0374(0x122)]&&(await _0x8cdf5d['mmZKH'](mkdir,_0x1ebf0e[_0x1c0374(0x12a)],{'recursive':!![]}),await _0x8cdf5d['XaKcZ'](saveSettings,_0x1ebf0e['name'],{'baseUrl':_0x3304ba['baseUrl'],'headless':!![]}),console[_0x1c0374(0x126)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3304ba['baseUrl']),_0x2f826f=!![]);const _0x1a89e9=join(_0x1ebf0e[_0x1c0374(0x12a)],_0x8cdf5d['pszro']);if(!_0x8cdf5d[_0x1c0374(0x14c)](existsSync,_0x1a89e9)&&!_0x2f826f)throw new Error(_0x1c0374(0x143)+_0x1ebf0e['name']+_0x1c0374(0x13a));const _0x2539c5=join(_0x1ebf0e['path'],_0x1c0374(0x11f)),_0x4c1934=join(_0x1ebf0e[_0x1c0374(0x12a)],_0x1c0374(0x115)),_0x4eec26=_0x8cdf5d['DtOjn'](existsSync,_0x2539c5),_0x4789f8=existsSync(_0x4c1934);if(_0x4789f8)try{const _0x3015dc=await getToken();if(!_0x3015dc)throw new Error(_0x8cdf5d[_0x1c0374(0x13d)]);const _0x5d625b=await _0x8cdf5d[_0x1c0374(0x11d)](readFile,_0x4c1934);decrypt(_0x5d625b,_0x3015dc),console['log'](_0x8cdf5d['MFyuu']);}catch(_0x1565ba){const _0x3f3752=_0x1565ba instanceof Error?_0x1565ba[_0x1c0374(0x124)]:_0x8cdf5d['bgCXA'](String,_0x1565ba);throw new Error(_0x1c0374(0x134)+_0x1ebf0e['name']+'\x22:\x20'+_0x3f3752);}else _0x4eec26?console[_0x1c0374(0x126)](_0x8cdf5d['OxBQT']):console['log'](_0x8cdf5d[_0x1c0374(0x13c)]);await writeActiveProfileName(_0x1ebf0e[_0x1c0374(0x133)]),console['log'](_0x1c0374(0x148)+_0x1ebf0e['name']),_0x31bcdd?.[_0x1c0374(0x10f)](_0x8cdf5d['gNDkZ'],{'profileName':_0x1ebf0e['name'],'hasAuth':_0x4eec26,'hasEncryptedAuth':_0x4789f8,'createdSettings':_0x2f826f}),_0x31bcdd?.['trackPhaseStart']('plugin');const _0x57b7cb=await _0x8cdf5d['vxnkk'](installPluginNonInteractive);_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x10d),{'installed':_0x57b7cb}),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d['YjZMX']),await skillup({'autoInstall':'project'}),_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x137)),console[_0x1c0374(0x126)](_0x8cdf5d[_0x1c0374(0x146)]);}
|
|
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
|
-
const _0x21b21b=_0x2622;(function(_0x3ffc8e,_0x45fcdb){const _0x4978b=_0x2622,_0x16be4e=_0x3ffc8e();while(!![]){try{const _0x1c8c9a=parseInt(_0x4978b(0x12c))/0x1+-parseInt(_0x4978b(0xc7))/0x2+-parseInt(_0x4978b(0x11d))/0x3*(parseInt(_0x4978b(0xd2))/0x4)+-parseInt(_0x4978b(0xe9))/0x5+parseInt(_0x4978b(0xf6))/0x6*(-parseInt(_0x4978b(0xfa))/0x7)+parseInt(_0x4978b(0x129))/0x8*(parseInt(_0x4978b(0xd1))/0x9)+-parseInt(_0x4978b(0xf2))/0xa*(-parseInt(_0x4978b(0xc9))/0xb);if(_0x1c8c9a===_0x45fcdb)break;else _0x16be4e['push'](_0x16be4e['shift']());}catch(_0x1f92a1){_0x16be4e['push'](_0x16be4e['shift']());}}}(_0x16ca,0xb3b6f));import{mkdir,writeFile}from'fs/promises';function _0x2622(_0x1f7a4c,_0x2171d8){_0x1f7a4c=_0x1f7a4c-0xc5;const _0x16ca77=_0x16ca();let _0x2622cd=_0x16ca77[_0x1f7a4c];return _0x2622cd;}import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x3e49c3 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 _0x16ca(){const _0x2d322e=['Validating\x20API\x20token...','isTTY','skipChromium','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','\x0a❌\x20Profile\x20setup\x20failed:','VWJgd',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','1909048cJlZVd','tWGbc','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','247190dsuExa','✓\x20Stored\x20credentials\x20locally','OHdWB','\x20\x20npx\x20playwright@','JlakD','YGooh','✓\x20.ranger/\x20directory\x20already\x20exists','sAMkI','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','.gitignore','1060510BYLpGb','playwright','28367053ZxImVj','LeAbL','trackPhaseEnd','stdout','\x1b[0m','xnzen','url','stdin','36aseMBq','20ncCdSN','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','WfKdN','qOIam','tAjos','use\x20until\x20the\x20session\x20expires.\x0a','tSbiG','✓\x20Playwright\x20Chromium\x20browser\x20found','IRHsi','✓\x20Authenticated\x20to\x20','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','✓\x20Created\x20.ranger/.gitignore','wCZyT','skills','method','Erifr','.ranger','error','wXSPK','success','plugin','playwright@','6027330KCAAKm','user','ITYCT','BDDHA','opencode','NtZJn','log','EjGnl','QenHJ','10jUedVt','\x0aIn\x20Claude\x20Code,\x20run\x20','auth','prompt','30YBDIey','\x0a⚠\x20Skipping\x20Chromium\x20installation.','GITHUB_ENV','platform','1077944hfDRsV','tDHNA','nPHqI','ZVkRs','OPoaM','message','CmEIw','playwright/package.json','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','organizationName','RLozi','scope','profile','\x20\x20npx\x20playwright\x20install\x20chromium','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','wantsProfile','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','LfoDE','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','WPsTK','\x0a🚀\x20Ranger\x20Setup\x0a','TGNML','bzWlS','trackPhaseStart','...','Installation\x20failed\x20with\x20exit\x20code\x20','MNpgO','resolve','install','chromium','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','✓\x20Local\x20profile\x20already\x20exists','WcKpd','ready','323247oxpWXY','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','local','close','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'];_0x16ca=function(){return _0x2d322e;};return _0x16ca();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x22d317=>'\x1b[1m'+_0x22d317+_0x21b21b(0xcd);function getPlaywrightVersion(){const _0x280e00=_0x21b21b,_0x532dfb={'MNpgO':function(_0xf3fa4c,_0x5b2e16){return _0xf3fa4c(_0x5b2e16);}};try{const _0x33b624=require[_0x280e00(0x116)](_0x280e00(0x101)),_0x2a9604=_0x532dfb[_0x280e00(0x115)](require,_0x33b624);return _0x2a9604['version'];}catch{return null;}}function installChromiumBinary(_0xe8a055){const _0x28c9cf=_0x21b21b,_0x3b64d7={'eFCBh':function(_0x16e401,_0x597612){return _0x16e401===_0x597612;},'Erifr':function(_0x503c32){return _0x503c32();},'WPsTK':function(_0x8223ba,_0x264aab){return _0x8223ba(_0x264aab);},'oMJcf':_0x28c9cf(0x117),'sAMkI':_0x28c9cf(0x118),'ByWaj':'inherit','IbmVn':function(_0x3036a4,_0x2ed550){return _0x3036a4===_0x2ed550;},'IRHsi':_0x28c9cf(0x120)};return new Promise((_0x1401e6,_0x4c7b46)=>{const _0x50a891=_0x28c9cf,_0x5e2547={'dBFhT':function(_0x4a21be,_0x4583b5){const _0x122dad=_0x2622;return _0x3b64d7[_0x122dad(0x10e)](_0x4a21be,_0x4583b5);}},_0x297f42=_0xe8a055?[_0x50a891(0xe8)+_0xe8a055,_0x3b64d7['oMJcf'],_0x3b64d7[_0x50a891(0x133)]]:[_0x50a891(0xc8),_0x50a891(0x117),_0x3b64d7['sAMkI']],_0x1d2a43=spawn('npx',_0x297f42,{'stdio':_0x3b64d7['ByWaj'],'shell':_0x3b64d7['IbmVn'](process[_0x50a891(0xf9)],'win32')});_0x1d2a43['on'](_0x3b64d7[_0x50a891(0xdb)],_0xb63024=>{const _0x3a093c=_0x50a891;_0x3b64d7['eFCBh'](_0xb63024,0x0)?_0x3b64d7[_0x3a093c(0xe2)](_0x1401e6):_0x3b64d7[_0x3a093c(0x10e)](_0x4c7b46,new Error(_0x3a093c(0x114)+_0xb63024));}),_0x1d2a43['on']('error',_0x3eb834=>{_0x5e2547['dBFhT'](_0x4c7b46,_0x3eb834);});});}export async function authenticate(_0x3c861e){const _0x2259ef=_0x21b21b,_0x114e94={'qZjsy':function(_0x491b5d){return _0x491b5d();},'BDDHA':function(_0xe96813,_0x9e631a){return _0xe96813(_0x9e631a);},'QWFHb':function(_0x4140f3,_0x231560){return _0x4140f3(_0x231560);},'gNTxL':'✓\x20Exported\x20credentials\x20for\x20CI','ITYCT':_0x2259ef(0x12d),'wCZyT':'provided_token'};if(!_0x3c861e){const _0x5a114a=await _0x114e94['qZjsy'](getToken);if(_0x5a114a){const _0x243fb8=await _0x114e94[_0x2259ef(0xec)](getCurrentUser,_0x5a114a);if(_0x243fb8[_0x2259ef(0xe6)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x243fb8[_0x2259ef(0xea)]['organizationName']),{'token':_0x5a114a,'method':'existing_token'};}try{_0x3c861e=await _0x114e94['qZjsy'](runDeviceAuthFlow);}catch(_0x5d7762){throw new Error('Authentication\x20failed:\x20'+(_0x5d7762 instanceof Error?_0x5d7762['message']:_0x5d7762));}const _0x38a507=await _0x114e94[_0x2259ef(0xec)](getCurrentUser,_0x3c861e);if(!_0x38a507[_0x2259ef(0xe6)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x38a507['error']);return console[_0x2259ef(0xef)]('✓\x20Authenticated\x20to\x20'+_0x38a507['user'][_0x2259ef(0x103)]),{'token':_0x3c861e,'method':'device_auth'};}console[_0x2259ef(0xef)](_0x2259ef(0x122));const _0x3e38ea=await getCurrentUser(_0x3c861e);if(!_0x3e38ea['success']){if(_0x3e38ea['status'])throw new Error('Authentication\x20failed:\x20'+_0x3e38ea['error']+_0x2259ef(0x10d));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3e38ea[_0x2259ef(0xe4)]+_0x2259ef(0x108));}return console[_0x2259ef(0xef)](_0x2259ef(0xdc)+_0x3e38ea['user']['organizationName']),await _0x114e94['QWFHb'](storeToken,_0x3c861e),console['log'](process['env'][_0x2259ef(0xf8)]?_0x114e94['gNTxL']:_0x114e94[_0x2259ef(0xeb)]),{'token':_0x3c861e,'method':_0x114e94[_0x2259ef(0xdf)]};}export async function ensureRangerDir(){const _0x4d49fa=_0x21b21b,_0x3d1306={'nPHqI':function(_0x53b1b0,_0x54508e,_0x18e9b3){return _0x53b1b0(_0x54508e,_0x18e9b3);},'tSbiG':function(_0x131458){return _0x131458();}},_0x267c8a=findGitRoot(),_0x126fec=_0x267c8a?_0x3d1306[_0x4d49fa(0xfc)](join,_0x267c8a,_0x4d49fa(0xe3)):_0x3d1306[_0x4d49fa(0xd9)](getRangerDir);return!existsSync(_0x126fec)?(await _0x3d1306[_0x4d49fa(0xfc)](mkdir,_0x126fec,{'recursive':!![]}),console['log']('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x126fec,'installed':!![]}):(console['log'](_0x4d49fa(0x132)),{'path':_0x126fec,'installed':![]});}export async function ensureChromium(){const _0x31146a=_0x21b21b,_0xee76e4={'TGNML':function(_0x1bf57f){return _0x1bf57f();},'diAdo':'confirm','LvujI':_0x31146a(0x10b),'RLozi':function(_0xbb43a1,_0x11ef34){return _0xbb43a1(_0x11ef34);},'IskMS':function(_0x31803c,_0x385eb8){return _0x31803c instanceof _0x385eb8;},'qOIam':_0x31146a(0xf7),'LeAbL':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','uOlCA':'\x20\x20npx\x20playwright\x20install\x20chromium'};let _0x1bdddc=![];try{const _0x3908f3=chromium['executablePath']();_0x1bdddc=existsSync(_0x3908f3);}catch{_0x1bdddc=![];}if(_0x1bdddc)return console[_0x31146a(0xef)](_0x31146a(0xda)),![];const _0x2f3198=_0xee76e4[_0x31146a(0x110)](getPlaywrightVersion),_0x43ed34=process[_0x31146a(0xd0)]['isTTY']&&process['stdout']['isTTY'];let _0x318836=!![];if(_0x43ed34){const {install:_0x11bb21}=await _0x3e49c3[_0x31146a(0xf5)]([{'type':_0xee76e4['diAdo'],'name':_0x31146a(0x117),'message':_0x2f3198?'The\x20required\x20version\x20('+_0x2f3198+_0x31146a(0x128):_0xee76e4['LvujI'],'default':!![]}]);_0x318836=_0x11bb21;}else console[_0x31146a(0xef)](_0x31146a(0xc5)+(_0x2f3198?'\x20'+_0x2f3198:'')+_0x31146a(0x113));if(_0x318836){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0xee76e4[_0x31146a(0x104)](installChromiumBinary,_0x2f3198),console[_0x31146a(0xef)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x2cc063){console[_0x31146a(0xe4)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0xee76e4['IskMS'](_0x2cc063,Error)?_0x2cc063[_0x31146a(0xff)]:_0x2cc063),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x2f3198?console[_0x31146a(0xef)]('\x20\x20npx\x20playwright@'+_0x2f3198+'\x20install\x20chromium'):console[_0x31146a(0xef)](_0x31146a(0x107));}}else console[_0x31146a(0xef)](_0xee76e4[_0x31146a(0xd6)]),console[_0x31146a(0xef)](_0xee76e4[_0x31146a(0xca)]),_0x2f3198?console[_0x31146a(0xef)](_0x31146a(0x12f)+_0x2f3198+'\x20install\x20chromium'):console[_0x31146a(0xef)](_0xee76e4['uOlCA']);return!![];}export async function writeRangerGitignore(_0x341369){const _0x51d18a=_0x21b21b,_0x56fa31={'LfoDE':_0x51d18a(0xc6)},_0x114fcf=join(_0x341369,_0x56fa31[_0x51d18a(0x10c)]),_0x83740e='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x114fcf,_0x83740e),console[_0x51d18a(0xef)](_0x51d18a(0xde));}function printProfileSetupLaterInstructions(){const _0x594175=_0x21b21b,_0x5d0994={'wXSPK':'ranger\x20profile\x20add\x20local'};console[_0x594175(0xef)](_0x594175(0xd4)),console[_0x594175(0xef)]('\x20\x20'+bold(_0x5d0994[_0x594175(0xe5)])),console[_0x594175(0xef)](_0x594175(0x12b));}async function ensureLocalEnv(_0x4a1d4f,_0x261e66){const _0x546a8e=_0x21b21b,_0x404e43={'wMlDI':function(_0x3cb2ca){return _0x3cb2ca();},'ZVkRs':'⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','VWJgd':'local','bzWlS':_0x546a8e(0xdd),'tAjos':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','JlakD':'confirm','WfKdN':_0x546a8e(0x10a),'QenHJ':_0x546a8e(0x126),'tDHNA':function(_0x2bf160){return _0x2bf160();}};if(!_0x404e43['wMlDI'](findGitRoot))return console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0xfd)]),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x404e43[_0x546a8e(0x127)],{'locations':[_0x546a8e(0x11f)]}))return console['log'](_0x546a8e(0x11a)),{'ready':!![],'skipped':![]};const _0x28fe58=process['stdin'][_0x546a8e(0x123)]&&process['stdout']['isTTY'];if(_0x28fe58&&!_0x4a1d4f?.['url']){console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0x111)]),console[_0x546a8e(0xef)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x546a8e(0xef)](_0x546a8e(0xd8)),console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0xd7)]);const {wantsProfile:_0x107d45}=await _0x3e49c3['prompt']([{'type':_0x404e43[_0x546a8e(0x130)],'name':_0x404e43[_0x546a8e(0xd5)],'message':_0x546a8e(0xd3),'default':!![]}]);if(!_0x107d45)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x546a8e(0x11f),{'url':_0x4a1d4f?.[_0x546a8e(0xcf)],'force':_0x4a1d4f?.['force']},_0x261e66),{'ready':!![],'skipped':![]};}catch(_0x15461e){return console[_0x546a8e(0xe4)](_0x404e43[_0x546a8e(0xf1)],_0x15461e instanceof Error?_0x15461e[_0x546a8e(0xff)]:_0x15461e),_0x404e43[_0x546a8e(0xfb)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x19d586,_0x30e6a2,_0x466205){const _0x506b8a=_0x21b21b,_0x516710={'YhNeM':'git_check','OPoaM':'No\x20git\x20repository\x20found','xnzen':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','EoXIe':function(_0xa770d2){return _0xa770d2();},'YGooh':_0x506b8a(0xf4),'sLZRx':function(_0x4945a4,_0x4ed379){return _0x4945a4(_0x4ed379);},'ijwFa':_0x506b8a(0x118),'EjGnl':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','tWGbc':function(_0x363ff7,_0x27feb5){return _0x363ff7(_0x27feb5);},'CmEIw':'plugin','WcKpd':_0x506b8a(0xe0),'hLpvz':function(_0x1b23da,_0x3d2a18,_0x1c300c){return _0x1b23da(_0x3d2a18,_0x1c300c);},'yrNnv':_0x506b8a(0x119),'sqROH':function(_0x2a4eaa,_0x181783){return _0x2a4eaa instanceof _0x181783;},'zIzzr':function(_0x2e06a4,_0x308b52){return _0x2e06a4(_0x308b52);},'NtZJn':_0x506b8a(0x106),'zwczy':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','OHdWB':function(_0x52c2c1,_0x561052){return _0x52c2c1(_0x561052);},'PKdsv':'/ranger:enable'};console[_0x506b8a(0xef)](_0x506b8a(0x10f));const _0x2afcdf=process['stdin']['isTTY']&&process[_0x506b8a(0xcc)][_0x506b8a(0x123)];!_0x2afcdf&&!_0x30e6a2?.['scope']&&(console[_0x506b8a(0xef)](_0x506b8a(0x121)),_0x30e6a2={..._0x30e6a2,'scope':_0x506b8a(0xea)});_0x466205?.['trackPhaseStart']('git_check');if(!findGitRoot()){await _0x466205?.['trackPhaseError'](_0x516710['YhNeM'],new Error(_0x516710[_0x506b8a(0xfe)]));throw new Error(_0x516710[_0x506b8a(0xce)]);}_0x466205?.['trackPhaseEnd']('git_check');const _0x2f4fec=!existsSync(_0x516710['EoXIe'](getRangerDir)),{path:_0x18ee83}=await _0x516710['EoXIe'](ensureRangerDir);_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0x131)]);const _0x51c0a2=await _0x516710['sLZRx'](authenticate,_0x19d586);_0x466205?.['trackPhaseEnd'](_0x516710[_0x506b8a(0x131)],{'isFirstRun':_0x2f4fec,'method':_0x51c0a2[_0x506b8a(0xe1)]}),_0x466205?.[_0x506b8a(0x112)](_0x516710['ijwFa']);_0x30e6a2?.['skipChromium']?console[_0x506b8a(0xef)](_0x516710[_0x506b8a(0xf0)]):await ensureChromium();_0x466205?.[_0x506b8a(0xcb)](_0x516710['ijwFa'],{'isFirstRun':_0x2f4fec,'skipped':!!_0x30e6a2?.[_0x506b8a(0x124)]}),await _0x516710[_0x506b8a(0x12a)](writeRangerGitignore,_0x18ee83),console[_0x506b8a(0xef)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x30c008=_0x30e6a2?.[_0x506b8a(0x105)],_0x1c4b3f=_0x30e6a2?.[_0x506b8a(0xed)]??![];let _0x1adeaa=null;_0x1c4b3f?(_0x466205?.['trackPhaseStart']('plugin'),_0x1adeaa=await ensureOpencodePluginConfig(_0x30c008),_0x466205?.['trackPhaseEnd'](_0x516710['CmEIw'],{'isFirstRun':_0x2f4fec,'opencode':!![]})):(_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0x100)]),await ensureClaudePlugin(_0x30c008),_0x466205?.[_0x506b8a(0xcb)](_0x506b8a(0xe7),{'isFirstRun':_0x2f4fec}));if(_0x1c4b3f&&_0x1adeaa){_0x466205?.['trackPhaseStart'](_0x516710['WcKpd']);try{await _0x516710['hLpvz'](installSkill,'ranger',{'level':_0x1adeaa[_0x506b8a(0x105)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x466205?.[_0x506b8a(0xcb)](_0x506b8a(0xe0),{'isFirstRun':_0x2f4fec,'opencode':!![]});}catch(_0x426984){console['warn'](_0x516710['yrNnv'],_0x516710['sqROH'](_0x426984,Error)?_0x426984[_0x506b8a(0xff)]:_0x426984),_0x466205?.['trackPhaseEnd'](_0x516710[_0x506b8a(0x11b)],{'isFirstRun':_0x2f4fec,'opencode':!![],'failed':!![]});}}else _0x466205?.['trackPhaseStart'](_0x516710['WcKpd']),await ensureClaudeSkills(_0x30c008),_0x466205?.[_0x506b8a(0xcb)]('skills',{'isFirstRun':_0x2f4fec});if(!_0x2afcdf&&!_0x30e6a2?.[_0x506b8a(0xcf)])console['log'](_0x506b8a(0x125)),console[_0x506b8a(0xef)]('\x20\x20'+_0x516710['zIzzr'](bold,'ranger\x20profile\x20add\x20local')+'\x0a');else{_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0xee)]);const _0x5cfb27=await ensureLocalEnv({'url':_0x30e6a2?.['url'],'force':_0x30e6a2?.['force']},_0x466205);_0x466205?.['trackPhaseEnd']('profile',{'isFirstRun':_0x2f4fec,'profileReady':_0x5cfb27[_0x506b8a(0x11c)],'userSkipped':_0x5cfb27['skipped']}),_0x5cfb27['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x1c4b3f)console[_0x506b8a(0xef)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x506b8a(0xef)](_0x506b8a(0x11e)),console[_0x506b8a(0xef)](_0x506b8a(0x102)),console['log'](_0x516710['zwczy']);else{const _0x27e960=_0x516710[_0x506b8a(0x12e)](bold,_0x516710['PKdsv']);console['log'](_0x506b8a(0xf3)+_0x27e960+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x506b8a(0x109));}}
|
|
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 _0x1636(){const _0x5516dc=['GaYyP','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','85704DxjKCf','disabled','trim','OQCze','push','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a\x20\x20No\x20active\x20profile\x20set','encrypted','\x1b[1m','Root:\x20','31704gNwlQI','log','OByXZ','all','ranger@trailhead','pCzZZ','none','20VJwDbH','75jzNffJ','FZEmb','ziqll','API\x20URL:\x20','2515fkUaYn','iBoxC','pTPVP','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','Jfahl','3678OLFeDe','API\x20Environment:\x20','cQNtK','YCoMl','UbKTP','configured','settings.json','XKfzY','opencode','wIrLY','cwd','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','some','auth.json.enc','includes','join','pMrSr','No\x20profiles\x20configured','scope','GkCbX','2qurfet','\x0a---\x20Skills\x20---','version','success','details','map','pipe','path','name','parse','LeABX','data','@ranger-testing/opencode-plugin','kWvEo','not_installed','21230gjFCsq','vUGgh','hasPlaintextAuth','plugin','jMNnh','filter','rUGXY','98011vtsbnq','\x20\x20\x20\x20','987786tKoapR','ignore','\x20(up\x20to\x20date)','ryEzR','11258429KVlpMi','stderr','isArray','10749648sqgsez','utf-8','No\x20skills\x20installed','auth.json','pBCKF','pfuYQ','GUgTf','unknown','Organization:\x20','Version:\x20','hUicP',':\x20installed\x20(','settingsPath','error','\x20\x20Not\x20installed','BvZsB','toString','config','WjXdO','DQsNu','(not\x20found)','\x20\x20Run:\x20ranger\x20setup\x20[token]','match','uPIkz','displayName','length','not_configured'];_0x1636=function(){return _0x5516dc;};return _0x1636();}function _0x3c2b(_0x196bec,_0x540522){_0x196bec=_0x196bec-0x1ac;const _0x16364f=_0x1636();let _0x3c2b9c=_0x16364f[_0x196bec];return _0x3c2b9c;}const _0x2c2cf3=_0x3c2b;(function(_0x1aadde,_0x41804b){const _0x27874b=_0x3c2b,_0x396ba1=_0x1aadde();while(!![]){try{const _0xaf2e95=-parseInt(_0x27874b(0x203))/0x1*(parseInt(_0x27874b(0x1ed))/0x2)+-parseInt(_0x27874b(0x1d0))/0x3*(parseInt(_0x27874b(0x1be))/0x4)+parseInt(_0x27874b(0x1d4))/0x5*(-parseInt(_0x27874b(0x1d9))/0x6)+-parseInt(_0x27874b(0x209))/0x7+-parseInt(_0x27874b(0x20c))/0x8+-parseInt(_0x27874b(0x205))/0x9*(parseInt(_0x27874b(0x1cf))/0xa)+parseInt(_0x27874b(0x1fc))/0xb*(parseInt(_0x27874b(0x1c8))/0xc);if(_0xaf2e95===_0x41804b)break;else _0x396ba1['push'](_0x396ba1['shift']());}catch(_0x37a7f2){_0x396ba1['push'](_0x396ba1['shift']());}}}(_0x1636,0xf099b));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=_0x268fd1=>_0x2c2cf3(0x1c6)+_0x268fd1+'\x1b[0m',link=(_0x43bb2b,_0x10c6b7)=>'\x1b]8;;file://'+_0x43bb2b+'\x07'+(_0x10c6b7||_0x43bb2b)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x3b3e63=_0x2c2cf3,_0x392d15={'pCzZZ':function(_0x2cbc5a,_0x48eb3b){return _0x2cbc5a(_0x48eb3b);},'pfcyO':_0x3b3e63(0x1fb),'EJrJq':'configured','ahDvC':function(_0x9acc0f,_0x383e90){return _0x9acc0f>_0x383e90;},'liMto':function(_0x36e719,_0x18149c){return _0x36e719(_0x18149c);},'pfuYQ':'debug','OQCze':_0x3b3e63(0x206),'rUGXY':_0x3b3e63(0x1f3),'GUgTf':'data','xdmRP':_0x3b3e63(0x1ae),'nybic':'close'};return new Promise(_0x1b34da=>{const _0x5a75e4=_0x3b3e63,_0x29c413={'GIGYd':function(_0x27fd96,_0x3d37cd){const _0x515fbf=_0x3c2b;return _0x392d15[_0x515fbf(0x1cd)](_0x27fd96,_0x3d37cd);},'afPMd':'not_installed','cQNtK':_0x392d15['EJrJq'],'avnps':function(_0x563f80,_0x5f2bcb){return _0x392d15['ahDvC'](_0x563f80,_0x5f2bcb);},'UbKTP':function(_0x177784,_0x19e766){const _0x3ebf4c=_0x3c2b;return _0x392d15[_0x3ebf4c(0x1cd)](_0x177784,_0x19e766);},'Jfahl':'not_configured','HwKqT':function(_0x3d6b79,_0x394dff){return _0x392d15['liMto'](_0x3d6b79,_0x394dff);}},_0x13019b=spawn(_0x5a75e4(0x1e1),[_0x392d15[_0x5a75e4(0x211)],_0x5a75e4(0x1b2)],{'stdio':[_0x392d15[_0x5a75e4(0x1c1)],'pipe',_0x392d15[_0x5a75e4(0x202)]]});let _0x5118af='';_0x13019b['stdout']?.['on'](_0x5a75e4(0x1f8),_0x5d2c20=>{const _0x1f0347=_0x5a75e4;_0x5118af+=_0x5d2c20[_0x1f0347(0x1b1)]();}),_0x13019b[_0x5a75e4(0x20a)]?.['on'](_0x392d15[_0x5a75e4(0x212)],_0x3d5eb7=>{_0x5118af+=_0x3d5eb7['toString']();}),_0x13019b['on'](_0x392d15['xdmRP'],()=>{const _0x5376d2=_0x5a75e4;_0x392d15[_0x5376d2(0x1cd)](_0x1b34da,{'status':_0x392d15['pfcyO']});}),_0x13019b['on'](_0x392d15['nybic'],_0x57a0f5=>{const _0x485a34=_0x5a75e4;if(_0x57a0f5!==0x0){_0x29c413['GIGYd'](_0x1b34da,{'status':_0x29c413['afPMd']});return;}const _0x163b68=_0x5118af[_0x485a34(0x1c0)]();let _0x4de0ae=null;if(_0x163b68)try{_0x4de0ae=JSON[_0x485a34(0x1f6)](_0x163b68);}catch{const _0x4a2bc4=_0x163b68[_0x485a34(0x1b7)](/\{[\s\S]*\}$/);if(_0x4a2bc4)try{_0x4de0ae=JSON['parse'](_0x4a2bc4[0x0]);}catch{_0x4de0ae=null;}}const _0x105f3f=Array[_0x485a34(0x20b)](_0x4de0ae?.['plugin'])?_0x4de0ae?.[_0x485a34(0x1ff)]:[],_0x568665=_0x105f3f[_0x485a34(0x1e5)](_0x17b624=>{const _0x419f7d=_0x485a34;if(typeof _0x17b624!=='string')return![];return _0x17b624['includes'](_0x419f7d(0x1f9))||_0x17b624['includes']('opencode-plugin');});if(_0x568665){_0x29c413['GIGYd'](_0x1b34da,{'status':_0x29c413[_0x485a34(0x1db)],'details':_0x29c413['avnps'](_0x105f3f[_0x485a34(0x1ba)],0x0)?_0x105f3f['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x105f3f['length']>0x0){_0x29c413[_0x485a34(0x1dd)](_0x1b34da,{'status':_0x29c413[_0x485a34(0x1d8)],'details':_0x105f3f[_0x485a34(0x1ba)]+'\x20plugin(s)\x20configured'});return;}_0x29c413['HwKqT'](_0x1b34da,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x5e1a08,_0x2d4045){const _0x8517a6=_0x2c2cf3,_0xcf3ab9={'GaYyP':function(_0x307a53,_0x46ba65){return _0x307a53(_0x46ba65);}};if(!_0xcf3ab9[_0x8517a6(0x1bc)](existsSync,_0x5e1a08))return[];const _0x231bbc=[];try{const _0xcf7cc6=await readdir(_0x5e1a08,{'withFileTypes':!![]});for(const _0x555256 of _0xcf7cc6){if(_0x555256['isDirectory']()){const _0x38da3c=join(_0x5e1a08,_0x555256[_0x8517a6(0x1f5)],'SKILL.md');if(_0xcf3ab9[_0x8517a6(0x1bc)](existsSync,_0x38da3c)){let _0x24797d=_0x555256[_0x8517a6(0x1f5)];try{const _0x735fa1=await readFile(_0x38da3c,_0x8517a6(0x20d)),_0x54265b=_0x735fa1[_0x8517a6(0x1b7)](/name:\s*(.+)/);_0x54265b&&(_0x24797d=_0x54265b[0x1]['trim']());}catch{}_0x231bbc[_0x8517a6(0x1c2)]({'name':_0x555256[_0x8517a6(0x1f5)],'displayName':_0x24797d,'path':_0x38da3c,'level':_0x2d4045});}}}}catch{return[];}return _0x231bbc;}async function getInstalledSkills(){const _0x5301f0=_0x2c2cf3,[_0x54b8d8,_0x5f2564]=await Promise[_0x5301f0(0x1cb)]([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x54b8d8,'user':_0x5f2564};}async function getEnvironments(){const _0x270d78=_0x2c2cf3,_0x535e18={'lusHe':function(_0x1fcf99,_0x162f01){return _0x1fcf99(_0x162f01);},'kWvEo':function(_0x110602,_0x1c9a68,_0x195692){return _0x110602(_0x1c9a68,_0x195692);},'ezriA':_0x270d78(0x20f),'pBCKF':_0x270d78(0x1e6),'FZEmb':_0x270d78(0x1b5),'AcBvs':function(_0x4c3aa1,_0x3c6e85){return _0x4c3aa1(_0x3c6e85);},'hUicP':function(_0x204a8b,_0x4f7e4a){return _0x204a8b(_0x4f7e4a);},'wIrLY':function(_0x5b862d,_0x2b8139){return _0x5b862d===_0x2b8139;},'WjXdO':function(_0x1b75ed){return _0x1b75ed();}},{envNames:_0x4343b9,activeEnv:_0x2b31e2}=await _0x535e18[_0x270d78(0x1b3)](getEnvNames),_0x57e5e1=_0x535e18['WjXdO'](getRangerDir);if(!existsSync(_0x57e5e1))return{'envs':[],'activeEnv':null};const _0x236016=_0x4343b9['map'](_0x2450b8=>{const _0x42508d=_0x270d78,_0x435d8a=_0x535e18['lusHe'](getEnvDir,_0x2450b8),_0x35b70d=_0x535e18[_0x42508d(0x1fa)](join,_0x435d8a,_0x42508d(0x1df)),_0x1ac07d=join(_0x435d8a,_0x535e18['ezriA']),_0x3c961e=_0x535e18[_0x42508d(0x1fa)](join,_0x435d8a,_0x535e18[_0x42508d(0x210)]);return{'name':_0x2450b8,'settingsPath':existsSync(_0x35b70d)?_0x35b70d:_0x535e18[_0x42508d(0x1d1)],'hasPlaintextAuth':_0x535e18['AcBvs'](existsSync,_0x1ac07d),'hasEncryptedAuth':_0x535e18[_0x42508d(0x216)](existsSync,_0x3c961e),'isActive':_0x535e18[_0x42508d(0x1e2)](_0x2450b8,_0x2b31e2)};});return{'envs':_0x236016,'activeEnv':_0x2b31e2};}export async function status(){const _0x14c0f0=_0x2c2cf3,_0x5bd85e={'uPIkz':'\x0a📊\x20Ranger\x20Status\x0a','AQDbn':function(_0xab9192){return _0xab9192();},'DQsNu':function(_0x56c3e1,_0xb47e1f){return _0x56c3e1(_0xb47e1f);},'iBoxC':function(_0x15271b,_0x459873){return _0x15271b(_0x459873);},'BvZsB':function(_0x30707e,_0x6e38c4){return _0x30707e!==_0x6e38c4;},'LeABX':'\x0a---\x20OpenCode\x20Plugin\x20---','GkCbX':_0x14c0f0(0x1de),'ncncT':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','ZGzin':_0x14c0f0(0x1cc),'YCoMl':'enabled','RqZoF':_0x14c0f0(0x1bf),'OByXZ':function(_0x27b7c8,_0x1f5d35){return _0x27b7c8(_0x1f5d35);},'ziqll':_0x14c0f0(0x1af),'ZIQek':_0x14c0f0(0x1ee),'ryEzR':function(_0x303e3b,_0x2e3df4){return _0x303e3b===_0x2e3df4;},'KLqoe':_0x14c0f0(0x20e),'pTPVP':function(_0x5b861d,_0x593d43){return _0x5b861d>_0x593d43;},'pMrSr':function(_0x2df88e,_0x9531a8,_0x202790){return _0x2df88e(_0x9531a8,_0x202790);},'XKfzY':function(_0x395545,_0x1fe5f7){return _0x395545(_0x1fe5f7);},'ASCUV':function(_0x2927c8,_0x482843,_0x1a34a8){return _0x2927c8(_0x482843,_0x1a34a8);},'jMNnh':function(_0xc61192){return _0xc61192();},'LBenO':_0x14c0f0(0x1ea),'uiEJI':'\x20(active)','vUGgh':'plaintext','SmJxM':_0x14c0f0(0x1b5)};console['log'](_0x5bd85e[_0x14c0f0(0x1b8)]);const _0x2811f7=process[_0x14c0f0(0x1e3)](),_0x39fd66=_0x5bd85e['AQDbn'](getRangerDir);if(!_0x5bd85e[_0x14c0f0(0x1b4)](existsSync,_0x39fd66)){console['log'](_0x14c0f0(0x1c7)+link(_0x2811f7,bold(_0x5bd85e[_0x14c0f0(0x1d5)](basename,_0x2811f7)))),console[_0x14c0f0(0x1c9)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x14c0f0(0x1c9)]('Root:\x20'+link(_0x2811f7,_0x5bd85e['iBoxC'](bold,basename(_0x2811f7))));const _0x3984e4=getCurrentVersion(),_0x1de7cf=getLatestVersion();if(_0x1de7cf[_0x14c0f0(0x1ef)]&&_0x5bd85e[_0x14c0f0(0x1b0)](_0x1de7cf[_0x14c0f0(0x1ef)],_0x3984e4))console[_0x14c0f0(0x1c9)](_0x14c0f0(0x215)+_0x3984e4+'\x20(latest:\x20'+_0x1de7cf['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x1de7cf['version']?console['log']('Version:\x20'+_0x3984e4+_0x14c0f0(0x207)):console[_0x14c0f0(0x1c9)](_0x14c0f0(0x215)+_0x3984e4);const _0x4d9180=await getToken();if(_0x4d9180){const _0x20e1f0=await getCurrentUser(_0x4d9180);_0x20e1f0[_0x14c0f0(0x1f0)]?console[_0x14c0f0(0x1c9)](_0x14c0f0(0x214)+_0x5bd85e['DQsNu'](bold,_0x20e1f0['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x14c0f0(0x1b6)));}else console[_0x14c0f0(0x1c9)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x14c0f0(0x1c9)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1da)+getCurrentEnvironment()),console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1d3)+_0x5bd85e['AQDbn'](getApiBaseUrl)));console[_0x14c0f0(0x1c9)](_0x5bd85e[_0x14c0f0(0x1f7)]);const _0x5120a8=await getOpencodePluginStatus();if(_0x5120a8['status']===_0x5bd85e[_0x14c0f0(0x1ec)])console[_0x14c0f0(0x1c9)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x5120a8[_0x14c0f0(0x1f1)]&&console[_0x14c0f0(0x1c9)]('\x20\x20'+_0x5120a8[_0x14c0f0(0x1f1)]);else _0x5120a8['status']===_0x14c0f0(0x1bb)?(console['log']('\x20\x20Not\x20configured'),_0x5120a8[_0x14c0f0(0x1f1)]&&console[_0x14c0f0(0x1c9)]('\x20\x20'+_0x5120a8['details']),console['log'](_0x14c0f0(0x1c3))):console['log'](_0x5bd85e['ncncT']);console[_0x14c0f0(0x1c9)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x580dd4=await _0x5bd85e['iBoxC'](getPluginInfo,_0x5bd85e['ZGzin']);if(_0x580dd4){const _0x48f730=_0x580dd4[_0x14c0f0(0x1eb)]||_0x14c0f0(0x213),_0x56a56c=_0x580dd4['enabled']?_0x5bd85e[_0x14c0f0(0x1dc)]:_0x5bd85e['RqZoF'];console['log']('\x20\x20'+_0x5bd85e[_0x14c0f0(0x1ca)](bold,_0x5bd85e['ZGzin'])+_0x14c0f0(0x1ac)+_0x48f730+',\x20'+_0x56a56c+')');}else console['log'](_0x5bd85e[_0x14c0f0(0x1d2)]),console['log'](_0x14c0f0(0x1d7));console['log'](_0x5bd85e['ZIQek']);const {project:_0x41e6b3,user:_0x5083a4}=await getInstalledSkills(),_0x3c7c12=_0x41e6b3[_0x14c0f0(0x201)](_0x2f2b58=>RANGER_MANAGED_SKILLS[_0x14c0f0(0x1e7)](_0x2f2b58[_0x14c0f0(0x1f5)])),_0xe416dd=_0x5083a4[_0x14c0f0(0x201)](_0x19f707=>RANGER_MANAGED_SKILLS[_0x14c0f0(0x1e7)](_0x19f707['name'])),_0x31b15c=_0x3c7c12['length']+_0xe416dd[_0x14c0f0(0x1ba)];if(_0x5bd85e[_0x14c0f0(0x208)](_0x31b15c,0x0))console[_0x14c0f0(0x1c9)](_0x5bd85e['KLqoe']),console[_0x14c0f0(0x1c9)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5bd85e[_0x14c0f0(0x1d6)](_0x3c7c12[_0x14c0f0(0x1ba)],0x0)){console['log']('\x20\x20Project-level:');for(const _0x490ec9 of _0x3c7c12){console['log']('\x20\x20\x20\x20'+bold(_0x490ec9[_0x14c0f0(0x1b9)])+':\x20'+_0x5bd85e[_0x14c0f0(0x1e9)](link,_0x490ec9[_0x14c0f0(0x1f4)],_0x5bd85e['DQsNu'](basename,_0x490ec9['path'])));}}if(_0x5bd85e[_0x14c0f0(0x1d6)](_0xe416dd['length'],0x0)){console['log']('\x20\x20User-level:');for(const _0x182c9c of _0xe416dd){console[_0x14c0f0(0x1c9)](_0x14c0f0(0x204)+_0x5bd85e['XKfzY'](bold,_0x182c9c['displayName'])+':\x20'+_0x5bd85e['ASCUV'](link,_0x182c9c['path'],_0x5bd85e[_0x14c0f0(0x1e0)](basename,_0x182c9c[_0x14c0f0(0x1f4)])));}}}console[_0x14c0f0(0x1c9)]('\x0a---\x20Profiles\x20---');const {envs:_0x37a885,activeEnv:_0x4f88bf}=await _0x5bd85e[_0x14c0f0(0x200)](getEnvironments);if(_0x37a885[_0x14c0f0(0x1ba)]===0x0)console[_0x14c0f0(0x1c9)](_0x5bd85e['LBenO']),console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1bd));else{for(const _0x177fb0 of _0x37a885){const _0x5bba33=_0x177fb0['isActive']?_0x5bd85e['uiEJI']:'',_0x15d1ac=_0x177fb0['hasEncryptedAuth']?_0x14c0f0(0x1c5):_0x177fb0[_0x14c0f0(0x1fe)]?_0x5bd85e[_0x14c0f0(0x1fd)]:_0x14c0f0(0x1ce);console['log']('\x20\x20'+_0x5bd85e['DQsNu'](bold,_0x177fb0[_0x14c0f0(0x1f5)])+_0x5bba33),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x15d1ac),_0x5bd85e['BvZsB'](_0x177fb0['settingsPath'],_0x5bd85e['SmJxM'])&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x177fb0[_0x14c0f0(0x1ad)],basename(_0x177fb0['settingsPath'])));}!_0x4f88bf&&(console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1c4)),console['log'](_0x14c0f0(0x1e4)+_0x37a885[_0x14c0f0(0x1f2)](_0x3e7a66=>_0x3e7a66[_0x14c0f0(0x1f5)])[_0x14c0f0(0x1e8)](',\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(_0x419fb4,_0x86fce1){const _0x1592e9=_0x57a4,_0x614ab2=_0x419fb4();while(!![]){try{const _0x5e8e6c=parseInt(_0x1592e9(0x1f7))/0x1*(parseInt(_0x1592e9(0x218))/0x2)+-parseInt(_0x1592e9(0x21e))/0x3*(parseInt(_0x1592e9(0x1fa))/0x4)+-parseInt(_0x1592e9(0x1ea))/0x5+-parseInt(_0x1592e9(0x1fd))/0x6*(parseInt(_0x1592e9(0x1f0))/0x7)+-parseInt(_0x1592e9(0x20e))/0x8*(-parseInt(_0x1592e9(0x228))/0x9)+-parseInt(_0x1592e9(0x205))/0xa+-parseInt(_0x1592e9(0x20a))/0xb*(-parseInt(_0x1592e9(0x207))/0xc);if(_0x5e8e6c===_0x86fce1)break;else _0x614ab2['push'](_0x614ab2['shift']());}catch(_0x328b5a){_0x614ab2['push'](_0x614ab2['shift']());}}}(_0x50e4,0x4f4c0));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x57a4(_0xcb979b,_0x2ba2dd){_0xcb979b=_0xcb979b-0x1e7;const _0x50e445=_0x50e4();let _0x57a487=_0x50e445[_0xcb979b];return _0x57a487;}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x50e4(){const _0x3b6c74=['ranger@trailhead','wBDJA','70693tnRPUv','active-feature.txt','log','platform','\x0aSuccessfully\x20updated\x20to\x20version\x20','plugin','close','973VlovJO','bBeFH','\x20\x20Failed\x20to\x20reinstall\x20','1000ASfEex','trim','inherit','36XHbrqD','\x0aReinstalling\x20','\x20skill\x20','IRhZR','EvDXi','WwYZV','length','pEwOm','3948630MIHAgZ','claude','285732nuodhK','Latest\x20version:\x20\x20','push','220DXtYly','LPIBs','version','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','342488kRZFdY','JkYEn','pipe','project','HHmTs','Update\x20failed.','warn','hUPYn','.gitignore','opencode','1130TSTFLr','weuYU','baCVT','active-profile.txt',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','update','6378istzqR','nBHMd','NzWdj','@latest','join','trailhead','aXZnJ','\x0a✅\x20Update\x20complete!','IdktI','HLIPS','99BoFPJN','\x20ranger-managed\x20skill(s)...','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','utf-8','jILLN','vIhCK','DgMcT','SJQoJ','925645wFeVtn','Checking\x20for\x20updates...','Update\x20failed:\x20','npm'];_0x50e4=function(){return _0x3b6c74;};return _0x50e4();}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x3b608b=_0x57a4,_0x46846e={'mjpce':_0x3b608b(0x1fc),'moNVt':'win32','unMJC':'error'};return new Promise(_0x341a6c=>{const _0x268273=_0x3b608b,_0x37b35c={'NzWdj':function(_0x2a30cb,_0xcfa476){return _0x2a30cb(_0xcfa476);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x454e5a=spawn(_0x268273(0x1ed),['install','-g',PACKAGE_NAME+_0x268273(0x221)],{'stdio':_0x46846e['mjpce'],'shell':process['platform']===_0x46846e['moNVt']});_0x454e5a['on'](_0x268273(0x1f6),_0x99adc0=>{const _0x122cd1=_0x268273;_0x37b35c[_0x122cd1(0x220)](_0x341a6c,_0x99adc0===0x0);}),_0x454e5a['on'](_0x46846e['unMJC'],()=>{const _0x4f4c50=_0x268273;_0x37b35c[_0x4f4c50(0x220)](_0x341a6c,![]);});});}async function updateClaudeMarketplace(){const _0x5debe7=_0x57a4,_0x3958d4={'HBiCe':function(_0x31d306,_0x29b40a){return _0x31d306(_0x29b40a);},'bBeFH':function(_0x1fa563,_0x33c5f8,_0x2e4315,_0xf17725){return _0x1fa563(_0x33c5f8,_0x2e4315,_0xf17725);},'WwYZV':_0x5debe7(0x206),'CSoGA':'plugin','wBDJA':_0x5debe7(0x21d),'AOnrR':'pipe','tayLR':function(_0x5c7567,_0x5d021c){return _0x5c7567===_0x5d021c;},'jILLN':'win32','LPIBs':_0x5debe7(0x1f6)};return new Promise(_0x113057=>{const _0x3a6a47=_0x5debe7,_0x2a1e58=_0x3958d4[_0x3a6a47(0x1f8)](spawn,_0x3958d4[_0x3a6a47(0x202)],[_0x3958d4['CSoGA'],'marketplace',_0x3958d4[_0x3a6a47(0x1ef)],'trailhead'],{'stdio':_0x3958d4['AOnrR'],'shell':_0x3958d4['tayLR'](process['platform'],_0x3958d4[_0x3a6a47(0x22c)])});_0x2a1e58['on'](_0x3958d4[_0x3a6a47(0x20b)],_0x5558a4=>{_0x113057(_0x5558a4===0x0);}),_0x2a1e58['on']('error',()=>{_0x3958d4['HBiCe'](_0x113057,![]);});});}async function updateClaudePlugin(_0x285729){const _0x53c426=_0x57a4,_0x5a5314={'weuYU':function(_0x35d359,_0x37c209){return _0x35d359(_0x37c209);},'NuroR':function(_0x287a26,_0x469b19){return _0x287a26===_0x469b19;},'vIhCK':_0x53c426(0x1ee),'JypAq':'close'};return new Promise(_0x348068=>{const _0x2bfb37=_0x53c426,_0x49976f=[_0x2bfb37(0x1f5),_0x2bfb37(0x21d),_0x5a5314[_0x2bfb37(0x1e7)]];_0x285729&&_0x49976f['push']('--scope',_0x285729);const _0x493191=spawn(_0x2bfb37(0x206),_0x49976f,{'stdio':_0x2bfb37(0x210),'shell':process[_0x2bfb37(0x1f3)]==='win32'});_0x493191['on'](_0x5a5314['JypAq'],_0xf357d7=>{const _0x24eca3=_0x2bfb37;_0x5a5314[_0x24eca3(0x219)](_0x348068,_0x5a5314['NuroR'](_0xf357d7,0x0));}),_0x493191['on']('error',()=>{_0x348068(![]);});});}function isSkillInstalled(_0xd1f93a,_0x334bc2,_0x479ca8){const _0x2fe11d=_0x57a4,_0x223e0a={'RaYLD':function(_0x543ff4,_0x5238dd){return _0x543ff4===_0x5238dd;},'baCVT':_0x2fe11d(0x217),'IdktI':function(_0x267e03,_0x567890){return _0x267e03(_0x567890);},'hUPYn':function(_0x152199,_0x266ad4,_0x366554){return _0x152199(_0x266ad4,_0x366554);}},_0x9113b8=_0x223e0a['RaYLD'](_0x479ca8,_0x223e0a[_0x2fe11d(0x21a)])?_0x223e0a['IdktI'](getOpencodeSkillsDir,_0x334bc2):_0x223e0a[_0x2fe11d(0x226)](getSkillsDir,_0x334bc2),_0x5ef5b4=_0x223e0a[_0x2fe11d(0x215)](join,_0x9113b8,_0xd1f93a);return existsSync(_0x5ef5b4);}async function reinstallSkills(_0xb7b5b8){const _0x1c747b=_0x57a4,_0x13110b={'HVitm':_0x1c747b(0x211),'IRhZR':'user','EvDXi':_0x1c747b(0x206),'HHmTs':'opencode','bzDNs':_0x1c747b(0x20d),'SJQoJ':function(_0x40cda2,_0x837c7a,_0xb3cf6){return _0x40cda2(_0x837c7a,_0xb3cf6);}},_0x35394b=[_0x13110b['HVitm'],_0x13110b[_0x1c747b(0x200)]],_0x116669=[];for(const _0x389d29 of _0x35394b){for(const _0x58f55e of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x58f55e,_0x389d29,_0x13110b[_0x1c747b(0x201)])&&_0x116669[_0x1c747b(0x209)]({'skillName':_0x58f55e,'level':_0x389d29,'platform':_0x13110b['EvDXi']}),isSkillInstalled(_0x58f55e,_0x389d29,_0x13110b[_0x1c747b(0x212)])&&_0x116669[_0x1c747b(0x209)]({'skillName':_0x58f55e,'level':_0x389d29,'platform':_0x13110b['HHmTs']});}}for(const _0x487080 of _0x35394b){for(const _0x26a19a of DEPRECATED_SKILLS){await removeSkill(_0x26a19a,_0x487080);}}if(_0x116669[_0x1c747b(0x203)]===0x0){console[_0x1c747b(0x1f2)](_0x13110b['bzDNs']);return;}console[_0x1c747b(0x1f2)](_0x1c747b(0x1fe)+_0x116669[_0x1c747b(0x203)]+_0x1c747b(0x229));for(const {skillName:_0x17192c,level:_0x488fc4,platform:_0x4836fb}of _0x116669){try{await _0x13110b[_0x1c747b(0x1e9)](installSkill,_0x17192c,{'level':_0x488fc4,'cliVersion':_0xb7b5b8,'platform':_0x4836fb});}catch(_0x350b8f){console[_0x1c747b(0x214)](_0x1c747b(0x1f9)+_0x4836fb+'\x20'+_0x488fc4+_0x1c747b(0x1ff)+_0x17192c+':',_0x350b8f);}}}async function ensureActiveProfileGitignored(){const _0x27cd91=_0x57a4,_0x2e09e3={'pEwOm':function(_0x4309c4,_0x546129,_0x4c5e70){return _0x4309c4(_0x546129,_0x4c5e70);},'JkZLC':function(_0x1c7ab2,_0x311412){return _0x1c7ab2===_0x311412;}},_0x2a6676=_0x2e09e3[_0x27cd91(0x204)](join,getRangerDir(),_0x27cd91(0x216));if(!existsSync(_0x2a6676))return![];let _0x158910='';try{_0x158910=await readFile(_0x2a6676,_0x27cd91(0x22b));}catch{return![];}const _0x247c2c=_0x158910['split'](/\r?\n/);if(_0x247c2c['some'](_0x90a86b=>_0x90a86b[_0x27cd91(0x1fb)]()==='active-profile.txt'))return![];let _0x1529da=_0x247c2c['findIndex'](_0x2ac213=>_0x2ac213['trim']()===_0x27cd91(0x1f1));_0x2e09e3['JkZLC'](_0x1529da,-0x1)&&(_0x1529da=_0x247c2c['length']);_0x247c2c['splice'](_0x1529da,0x0,_0x27cd91(0x21b));let _0x288b3c=_0x247c2c[_0x27cd91(0x222)]('\x0a');!_0x288b3c['endsWith']('\x0a')&&(_0x288b3c+='\x0a');try{await writeFile(_0x2a6676,_0x288b3c,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x2e1d9f=_0x57a4,_0x5c8b2b={'NoFOh':_0x2e1d9f(0x1eb),'UKUMk':'Attempting\x20install\x20anyway...','DgMcT':function(_0x4dbc35){return _0x4dbc35();},'HLIPS':function(_0x43908c,_0x509efa){return _0x43908c<_0x509efa;},'pVQKx':_0x2e1d9f(0x213),'HmpSC':function(_0x4848b2,_0x546635){return _0x4848b2(_0x546635);},'YFBDf':_0x2e1d9f(0x22a),'nBHMd':function(_0x1c45da){return _0x1c45da();},'SVhPD':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','JkYEn':function(_0x14737e,_0xa39f05){return _0x14737e(_0xa39f05);},'aXZnJ':'✓\x20Migrated\x20active\x20profile\x20file'},_0x8f0ba0=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x8f0ba0),console[_0x2e1d9f(0x1f2)](_0x5c8b2b['NoFOh']);const _0x551a7e=getLatestVersion();let _0x4bc7b0=_0x8f0ba0;if(!_0x551a7e[_0x2e1d9f(0x20c)]){console[_0x2e1d9f(0x214)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x551a7e['error']),console['log'](_0x5c8b2b['UKUMk']);const _0x16d0ce=await runInstall();if(_0x16d0ce)console[_0x2e1d9f(0x1f2)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x4bc7b0=_0x5c8b2b[_0x2e1d9f(0x1e8)](getCurrentVersion);else throw new Error(_0x2e1d9f(0x1ec)+_0x551a7e['error']);}else{const _0x181b44=_0x551a7e['version'];console[_0x2e1d9f(0x1f2)](_0x2e1d9f(0x208)+_0x181b44);const _0x5b68b9=compareVersions(_0x8f0ba0,_0x181b44);if(_0x5b68b9===0x0)console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x5c8b2b[_0x2e1d9f(0x227)](_0x5b68b9,0x0))console[_0x2e1d9f(0x1f2)]('\x0aYour\x20version\x20('+_0x8f0ba0+_0x2e1d9f(0x21c)+_0x181b44+').');else{const _0x308c11=await runInstall();if(_0x308c11)console['log'](_0x2e1d9f(0x1f4)+_0x181b44),_0x4bc7b0=_0x181b44;else throw new Error(_0x5c8b2b['pVQKx']);}}}await _0x5c8b2b['HmpSC'](reinstallSkills,_0x4bc7b0);const _0x5873cc=await isMarketplaceAdded(_0x2e1d9f(0x223)),_0x39b73a=await isPluginInstalled('ranger@trailhead');if(_0x5873cc){const _0x2559d5=await updateClaudeMarketplace();_0x2559d5&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b['YFBDf']);}if(_0x39b73a){const _0x8e5646=await _0x5c8b2b[_0x2e1d9f(0x21f)](updateClaudePlugin);_0x8e5646&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b['SVhPD']);const _0x28b826=await _0x5c8b2b[_0x2e1d9f(0x20f)](updateClaudePlugin,'project');_0x28b826&&console[_0x2e1d9f(0x1f2)]((_0x8e5646?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x31f82e=await migrateActiveProfileFile();_0x31f82e&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b[_0x2e1d9f(0x224)]);const _0x241bb8=await ensureActiveProfileGitignored();console[_0x2e1d9f(0x1f2)](_0x2e1d9f(0x225));}
|
|
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)]);}
|