@ranger-testing/ranger-cli 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4dd7(){const _0x1d0067=['stat','266frkYDi','NvPZq','featureId','AHJvH','oQDhV','size','297846ixYKkJ','89rqPoig','\x20for\x20\x22','JrZZL','RANGER_SKIP_VERIFICATION','12vabXES','1337192TzlugD','ztBkJ','AFJKk','6614XdPvPx','utf8','alloc','message','input','trackCommandStart','27FYrEdv','stringify','157758bUCQwP',':\x0a\x0a','28732860BMcYaW','stop_hook_active','log','130cprcQM','283715rIgVOG','468325RZfuVo','\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(','DkTJT','https://dashboard.ranger.net/features/','QrfIb','includes','toString'];_0x4dd7=function(){return _0x1d0067;};return _0x4dd7();}(function(_0x232080,_0x9bee4d){const _0x5a709f=_0x2b08,_0x47e1bf=_0x232080();while(!![]){try{const _0x297c97=-parseInt(_0x5a709f(0xb0))/0x1*(-parseInt(_0x5a709f(0x92))/0x2)+parseInt(_0x5a709f(0xaf))/0x3+-parseInt(_0x5a709f(0xb4))/0x4*(parseInt(_0x5a709f(0xa0))/0x5)+parseInt(_0x5a709f(0x9a))/0x6*(-parseInt(_0x5a709f(0xa9))/0x7)+-parseInt(_0x5a709f(0xb5))/0x8*(parseInt(_0x5a709f(0x98))/0x9)+-parseInt(_0x5a709f(0x9f))/0xa*(parseInt(_0x5a709f(0xa1))/0xb)+parseInt(_0x5a709f(0x9c))/0xc;if(_0x297c97===_0x9bee4d)break;else _0x47e1bf['push'](_0x47e1bf['shift']());}catch(_0xf35ea7){_0x47e1bf['push'](_0x47e1bf['shift']());}}}(_0x4dd7,0x89a0d));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x2b08(_0x30b5b6,_0x25e251){_0x30b5b6=_0x30b5b6-0x91;const _0x4dd7ae=_0x4dd7();let _0x2b0816=_0x4dd7ae[_0x30b5b6];return _0x2b0816;}export async function stopHook(_0x3c5f57){const _0x2d9624=_0x2b08,_0x4f3ab5={'AHJvH':function(_0x9b7955){return _0x9b7955();},'oQDhV':function(_0x159434,_0x1a14c1,_0x184dcd){return _0x159434(_0x1a14c1,_0x184dcd);},'AFJKk':function(_0x38ca77,_0x14f602){return _0x38ca77(_0x14f602);},'ycwem':function(_0x4a1c8c,_0x2a7b50){return _0x4a1c8c&&_0x2a7b50;},'JrZZL':function(_0x4893fb,_0x111fa9,_0x360ac2,_0x4cf917){return _0x4893fb(_0x111fa9,_0x360ac2,_0x4cf917);},'DkTJT':function(_0x5533b7,_0x1d40e2){return _0x5533b7(_0x1d40e2);}},_0x3e7f1d=await getEnabledHookContext(_0x3c5f57),_0x42b0f1=_0x3e7f1d?.['sessionId']??null,_0x4f0d0f=Boolean(_0x3e7f1d?.[_0x2d9624(0x96)]?.[_0x2d9624(0x9d)]),_0x31174d=typeof _0x3e7f1d?.['input']?.['transcript_path']==='string'?_0x3e7f1d[_0x2d9624(0x96)]['transcript_path']:null;let _0x82e04=!![];if(!_0x42b0f1){await trackStop(_0x42b0f1,![],_0x82e04);return;}try{const _0x53249e=getSessionEntry(_0x42b0f1);if(!_0x53249e){await trackStop(_0x42b0f1,!![],_0x82e04);return;}const _0x3e3738=_0x2d9624(0xa4)+_0x53249e[_0x2d9624(0xab)],_0x2d6749=_0x2d9624(0xb3),_0x527f52=await _0x4f3ab5[_0x2d9624(0xac)](getToken),_0x2750da=!_0x4f0d0f;let _0x57d2c6=null,_0x364026=null;const _0x4d569a=_0x4f0d0f&&await _0x4f3ab5[_0x2d9624(0xad)](transcriptHasToken,_0x31174d,_0x2d6749),_0x3e9287=await transcriptHasToken(_0x31174d,_0x3e3738);if(_0x527f52)try{const _0x5c1e11=await _0x4f3ab5[_0x2d9624(0x91)](getFeature,_0x53249e['featureId']);_0x57d2c6=_0x5c1e11['name']??null,_0x364026=_0x5c1e11['currentSessionId']??null;}catch{}if(_0x4f3ab5['ycwem'](_0x527f52,_0x364026))try{await concludeSession(_0x53249e['featureId'],_0x364026);}catch(_0x567f40){if(_0x4d569a){await _0x4f3ab5[_0x2d9624(0xb2)](trackStop,_0x42b0f1,!![],_0x82e04);return;}_0x82e04=![];const _0x524c5c=_0x567f40 instanceof Error?_0x567f40[_0x2d9624(0x95)]:_0x4f3ab5[_0x2d9624(0xa3)](String,_0x567f40),_0x248581={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x57d2c6?_0x2d9624(0xb1)+_0x57d2c6+'\x22':'')+_0x2d9624(0x9b)+_0x524c5c+_0x2d9624(0xa2)+_0x3e3738+')\x20and\x20the\x20token\x20`'+_0x2d6749+'`,\x20then\x20run\x20/exit\x20again.'};console[_0x2d9624(0x9e)](JSON[_0x2d9624(0x99)](_0x248581)),await trackStop(_0x42b0f1,!![],_0x82e04);return;}await trackStop(_0x42b0f1,!![],_0x82e04);return;}catch{await trackStop(_0x42b0f1,!![],_0x82e04);return;}}async function trackStop(_0x41c2f2,_0x596324,_0x9d9eb2){const _0x6b7901=_0x2b08,_0x201835={'MOXzx':function(_0x44ad5d,_0x5b17f3){return _0x44ad5d(_0x5b17f3);},'uuNjP':function(_0x547579,_0x696720){return _0x547579??_0x696720;},'wkPWs':'success'};try{const _0x26843b=_0x201835['MOXzx'](createTelemetryCollector,'hook:stop');await _0x26843b[_0x6b7901(0x97)]({'sessionId':_0x201835['uuNjP'](_0x41c2f2,undefined),'hooksEnabled':_0x596324,'stopAllowed':_0x9d9eb2}),await _0x26843b['trackCommandEnd'](_0x201835['wkPWs']);}catch{}}async function transcriptHasToken(_0x1895df,_0x16fb12){const _0x4cdc36=_0x2b08,_0x3eb7ec={'ceOEp':function(_0xc5c9e8,_0x4d0dd6,_0x336835){return _0xc5c9e8(_0x4d0dd6,_0x336835);}};if(!_0x1895df)return![];const _0x5d08bc=await _0x3eb7ec['ceOEp'](readTranscriptTail,_0x1895df,0x30d40);return _0x5d08bc?_0x5d08bc[_0x4cdc36(0xa6)](_0x16fb12):![];}async function readTranscriptTail(_0x4a1fcd,_0x2156f2){const _0x3f214e=_0x2b08,_0x2a6f09={'NvPZq':function(_0x4f5271,_0x30db6a){return _0x4f5271<=_0x30db6a;},'ztBkJ':function(_0x3e7d04,_0x175f59){return _0x3e7d04-_0x175f59;},'QrfIb':_0x3f214e(0x93)};let _0x232479=null;try{_0x232479=await open(_0x4a1fcd,'r');const _0x58b143=await _0x232479[_0x3f214e(0xa8)](),_0x3d08a7=Math['min'](_0x58b143[_0x3f214e(0xae)],_0x2156f2);if(_0x2a6f09[_0x3f214e(0xaa)](_0x3d08a7,0x0))return'';const _0x1733bf=Buffer[_0x3f214e(0x94)](_0x3d08a7);return await _0x232479['read'](_0x1733bf,0x0,_0x3d08a7,_0x2a6f09[_0x3f214e(0xb6)](_0x58b143[_0x3f214e(0xae)],_0x3d08a7)),_0x1733bf[_0x3f214e(0xa7)](_0x2a6f09[_0x3f214e(0xa5)]);}catch{return null;}finally{try{await _0x232479?.['close']();}catch{}}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43518b,_0x558fb6){var _0x55ea57=_0x5130,_0x37e21f=_0x43518b();while(!![]){try{var _0x116008=parseInt(_0x55ea57(0xd4))/0x1*(-parseInt(_0x55ea57(0xcd))/0x2)+parseInt(_0x55ea57(0xd5))/0x3+-parseInt(_0x55ea57(0xd3))/0x4+parseInt(_0x55ea57(0xd2))/0x5*(parseInt(_0x55ea57(0xce))/0x6)+-parseInt(_0x55ea57(0xd1))/0x7+parseInt(_0x55ea57(0xd0))/0x8+parseInt(_0x55ea57(0xcf))/0x9;if(_0x116008===_0x558fb6)break;else _0x37e21f['push'](_0x37e21f['shift']());}catch(_0x2d34bd){_0x37e21f['push'](_0x37e21f['shift']());}}}(_0x525c,0x8acc5));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';function _0x525c(){var _0x44408e=['994448LfKwhg','33739tFjTUa','1312272aTXrho','50ylrMZQ','162BgOrMV','5006997PlvlQG','6348200RGqJst','6933045imHfiL','159955QwkEsJ'];_0x525c=function(){return _0x44408e;};return _0x525c();}export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';function _0x5130(_0x21e7c3,_0x3907fd){_0x21e7c3=_0x21e7c3-0xcd;var _0x525c01=_0x525c();var _0x5130cc=_0x525c01[_0x21e7c3];return _0x5130cc;}export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xd0f7(){const _0x5a421b=['success','stdout','18gjhbKD','333774IoaXiQ','4OLWnaZ','mPgiG','isTTY','8764mPImcg','Login\x20failed:\x20','88170UYWZcM','23089IvEAgL','log','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','6410JnJiEd','65562ALQIIG','17522ZucmEI','780UVemnp','19VRRiTR','8983fFiYgZ','\x0a✅\x20Logged\x20in\x20to\x20','pNvCC','1236mSSExj','message','96hfeiyP'];_0xd0f7=function(){return _0x5a421b;};return _0xd0f7();}(function(_0x123929,_0x53ba52){const _0x4c07cc=_0x5c54,_0x5d794e=_0x123929();while(!![]){try{const _0x42ea0a=parseInt(_0x4c07cc(0x1d1))/0x1*(-parseInt(_0x4c07cc(0x1cf))/0x2)+parseInt(_0x4c07cc(0x1db))/0x3*(-parseInt(_0x4c07cc(0x1dc))/0x4)+parseInt(_0x4c07cc(0x1cd))/0x5*(-parseInt(_0x4c07cc(0x1d0))/0x6)+-parseInt(_0x4c07cc(0x1ce))/0x7*(parseInt(_0x4c07cc(0x1d7))/0x8)+parseInt(_0x4c07cc(0x1da))/0x9*(parseInt(_0x4c07cc(0x1c9))/0xa)+-parseInt(_0x4c07cc(0x1ca))/0xb*(-parseInt(_0x4c07cc(0x1d5))/0xc)+parseInt(_0x4c07cc(0x1d2))/0xd*(parseInt(_0x4c07cc(0x1c7))/0xe);if(_0x42ea0a===_0x53ba52)break;else _0x5d794e['push'](_0x5d794e['shift']());}catch(_0x20cb0a){_0x5d794e['push'](_0x5d794e['shift']());}}}(_0xd0f7,0x1ac3c));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x5c54(_0x470ae9,_0x12ed5d){_0x470ae9=_0x470ae9-0x1c7;const _0xd0f7af=_0xd0f7();let _0x5c5473=_0xd0f7af[_0x470ae9];return _0x5c5473;}export async function login(){const _0x2e814d=_0x5c54,_0x183e8e={'EeZMb':function(_0x21afc0){return _0x21afc0();},'pNvCC':function(_0x4e1b19,_0x3da708){return _0x4e1b19(_0x3da708);},'mPgiG':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x18f275=process['stdin']['isTTY']&&process[_0x2e814d(0x1d9)][_0x2e814d(0x1de)];if(!_0x18f275)throw new Error(_0x2e814d(0x1cc));try{const _0x5b18fc=await _0x183e8e['EeZMb'](runDeviceAuthFlow),_0x49a0f9=await _0x183e8e[_0x2e814d(0x1d4)](getCurrentUser,_0x5b18fc);_0x49a0f9[_0x2e814d(0x1d8)]?console[_0x2e814d(0x1cb)](_0x2e814d(0x1d3)+_0x49a0f9['user']['organizationName']):console['log'](_0x183e8e[_0x2e814d(0x1dd)]);}catch(_0x5ce1dc){throw new Error(_0x2e814d(0x1c8)+(_0x5ce1dc instanceof Error?_0x5ce1dc[_0x2e814d(0x1d6)]:_0x5ce1dc));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bbd98,_0x474f2d){const _0xb2c018=_0x34d7,_0x259130=_0x2bbd98();while(!![]){try{const _0x374a7b=-parseInt(_0xb2c018(0x158))/0x1+parseInt(_0xb2c018(0x152))/0x2+parseInt(_0xb2c018(0x15b))/0x3+parseInt(_0xb2c018(0x13b))/0x4*(-parseInt(_0xb2c018(0x135))/0x5)+-parseInt(_0xb2c018(0x140))/0x6*(-parseInt(_0xb2c018(0x156))/0x7)+parseInt(_0xb2c018(0x143))/0x8*(parseInt(_0xb2c018(0x160))/0x9)+-parseInt(_0xb2c018(0x13d))/0xa*(parseInt(_0xb2c018(0x145))/0xb);if(_0x374a7b===_0x474f2d)break;else _0x259130['push'](_0x259130['shift']());}catch(_0x55a388){_0x259130['push'](_0x259130['shift']());}}}(_0xf4f6,0x53210));import{join}from'path';import{existsSync}from'fs';import _0x5e60dc from'inquirer';function _0x34d7(_0x2698ee,_0x40a8bd){_0x2698ee=_0x2698ee-0x133;const _0xf4f6a7=_0xf4f6();let _0x34d7b7=_0xf4f6a7[_0x2698ee];return _0x34d7b7;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x1ed000){const _0x37436d=_0x34d7,_0x1977a8={'PEZHx':_0x37436d(0x157),'rxfjI':function(_0x560e35,_0x12b719,_0x2855cd){return _0x560e35(_0x12b719,_0x2855cd);},'HSwWo':_0x37436d(0x13c),'GgAgx':_0x37436d(0x134),'bJLja':_0x37436d(0x150),'ZXHvF':'plugin','sYdAa':_0x37436d(0x15c),'cmyPG':_0x37436d(0x146),'nwVdH':_0x37436d(0x15f),'ybjaV':function(_0x55ba84,_0x6eca66){return _0x55ba84(_0x6eca66);},'KUwBm':'❌\x20Failed\x20to\x20install\x20plugin:','PbkPI':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','AbTYI':'--scope','vySbI':_0x37436d(0x147)},_0x249eb4=await isPluginInstalled(_0x1977a8['PEZHx']);if(_0x249eb4)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0xf8d52c=existsSync(_0x1977a8[_0x37436d(0x137)](join,getProjectRoot(),'.claude'));let _0x31e862;if(_0x1ed000)_0x31e862=_0x1ed000;else{if(_0xf8d52c)_0x31e862=_0x1977a8[_0x37436d(0x142)];else{console['log'](_0x37436d(0x15d));const _0x21e929=await _0x5e60dc['prompt']([{'type':'list','name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x1977a8['GgAgx'],'value':_0x1977a8[_0x37436d(0x14b)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x37436d(0x13c)}],'default':_0x1977a8['bJLja']}]);_0x31e862=_0x21e929[_0x37436d(0x14c)];}}console[_0x37436d(0x153)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x31e862+_0x37436d(0x136));const _0x46f450=await isMarketplaceAdded('trailhead');let _0x5a56c8=_0x46f450;if(_0x46f450)console[_0x37436d(0x153)](_0x37436d(0x162));else{const _0x4a314c=await runClaudeCommand([_0x1977a8['ZXHvF'],'marketplace',_0x37436d(0x138),'ranger-testing/trailhead']);!_0x4a314c[_0x37436d(0x133)]?(console['error'](_0x1977a8['sYdAa'],_0x4a314c[_0x37436d(0x14f)]),console['log'](_0x1977a8['cmyPG']),console['log'](_0x1977a8['nwVdH']),console['log'](_0x37436d(0x141)+_0x31e862)):_0x5a56c8=!![];}if(_0x5a56c8){const _0x10b4d0=await _0x1977a8[_0x37436d(0x139)](runClaudeCommand,['plugin',_0x37436d(0x161),_0x1977a8[_0x37436d(0x14d)],'--scope',_0x31e862]);if(!_0x10b4d0[_0x37436d(0x133)])console[_0x37436d(0x14f)](_0x1977a8['KUwBm'],_0x10b4d0[_0x37436d(0x14f)]),console['log'](_0x37436d(0x146)),console['log'](_0x37436d(0x141)+_0x31e862);else{console[_0x37436d(0x153)](_0x1977a8[_0x37436d(0x13f)]);const _0x57243c=['plugin',_0x37436d(0x148),_0x1977a8[_0x37436d(0x14d)]];_0x31e862===_0x1977a8[_0x37436d(0x142)]&&_0x57243c[_0x37436d(0x13e)](_0x1977a8['AbTYI'],_0x1977a8[_0x37436d(0x142)]);const _0x5c559b=await _0x1977a8[_0x37436d(0x137)](runClaudeCommand,_0x57243c,{'captureOutput':!![]}),_0xc64fe2=_0x5c559b['output']?.[_0x37436d(0x15e)]('already\x20enabled');!_0x5c559b[_0x37436d(0x133)]&&!_0xc64fe2?console['error'](_0x37436d(0x15a),_0x5c559b['error']):console['log'](_0x1977a8['vySbI']);}}return!![];}export async function ensureClaudeSkills(_0x3739ae){const _0x54f1c4=_0x34d7,_0x58363e={'tkxge':function(_0x4593ef,_0x3d2e8b){return _0x4593ef(_0x3d2e8b);},'TRwnA':function(_0x1b50be,_0x391d57){return _0x1b50be(_0x391d57);},'ANblu':function(_0x595a5c,_0x57b20f){return _0x595a5c(_0x57b20f);},'UurIt':_0x54f1c4(0x14a),'WNiIO':function(_0xe2e8b4,_0x48ef69){return _0xe2e8b4||_0x48ef69;},'pWmai':function(_0x20d5fe,_0x451f93,_0x19ac73){return _0x20d5fe(_0x451f93,_0x19ac73);},'EIAtd':'.claude','LtZRf':function(_0x5d69a4,_0x348fb6){return _0x5d69a4(_0x348fb6);},'KaPrz':'project','vRWEH':'wantsSkillup','lJVMi':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x22b25e=_0x58363e['tkxge'](existsSync,join(_0x58363e['TRwnA'](getSkillsDir,_0x54f1c4(0x150)),'ranger','SKILL.md')),_0x413d99=_0x58363e['ANblu'](existsSync,join(_0x58363e['tkxge'](getSkillsDir,'project'),_0x58363e['UurIt'],'SKILL.md'));if(_0x58363e['WNiIO'](_0x22b25e,_0x413d99))return console[_0x54f1c4(0x153)](_0x54f1c4(0x13a)),![];const _0x5013f6=_0x58363e[_0x54f1c4(0x154)](existsSync,_0x58363e[_0x54f1c4(0x159)](join,getProjectRoot(),_0x58363e[_0x54f1c4(0x155)]));let _0x2daed5=!![];if(_0x3739ae)await _0x58363e[_0x54f1c4(0x144)](skillup,{'autoInstall':_0x3739ae,'suppressUsage':!![]});else{if(_0x5013f6)await _0x58363e['LtZRf'](skillup,{'autoInstall':_0x58363e['KaPrz'],'suppressUsage':!![]});else{const _0x336740=await _0x5e60dc['prompt']([{'type':_0x54f1c4(0x151),'name':_0x58363e[_0x54f1c4(0x149)],'message':_0x58363e[_0x54f1c4(0x14e)],'default':!![]}]);_0x2daed5=_0x336740['wantsSkillup'],_0x2daed5&&await _0x58363e[_0x54f1c4(0x144)](skillup,{'suppressUsage':!![]});}}return _0x2daed5;}function _0xf4f6(){const _0x35a4b1=['2768megExK','project','400EkyrDz','push','PbkPI','30woIOXe','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','HSwWo','32ApHDRp','ANblu','206272gJOcbg','\x0aYou\x20can\x20install\x20manually\x20with:','✓\x20Claude\x20Code\x20plugin\x20enabled','enable','vRWEH','ranger','bJLja','pluginScope','PEZHx','lJVMi','error','user','confirm','1337506aaJqyE','log','TRwnA','EIAtd','654353wKysht','ranger@trailhead','17914SVKgPm','pWmai','⚠\x20Failed\x20to\x20enable\x20plugin:','942930zMAuXP','❌\x20Failed\x20to\x20add\x20marketplace:','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','includes','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','174114EVblZm','install','✓\x20Marketplace\x20already\x20added','success','User\x20(available\x20in\x20all\x20your\x20projects)','3030XtFLfg','\x20level)...\x0a','rxfjI','add','ybjaV','✓\x20Ranger\x20skills\x20already\x20installed'];_0xf4f6=function(){return _0x35a4b1;};return _0xf4f6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49993c,_0x327f75){const _0x352e95=_0x3335,_0x296985=_0x49993c();while(!![]){try{const _0x35120f=parseInt(_0x352e95(0x127))/0x1*(parseInt(_0x352e95(0x122))/0x2)+-parseInt(_0x352e95(0x129))/0x3*(-parseInt(_0x352e95(0x12e))/0x4)+parseInt(_0x352e95(0x12b))/0x5+-parseInt(_0x352e95(0x138))/0x6+parseInt(_0x352e95(0x134))/0x7*(parseInt(_0x352e95(0x12c))/0x8)+-parseInt(_0x352e95(0x13b))/0x9+-parseInt(_0x352e95(0x128))/0xa*(parseInt(_0x352e95(0x12d))/0xb);if(_0x35120f===_0x327f75)break;else _0x296985['push'](_0x296985['shift']());}catch(_0x3685bb){_0x296985['push'](_0x296985['shift']());}}}(_0x42f9,0x98d50));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x3c41c1 from'inquirer';function _0x3335(_0xedda4f,_0x4c7e15){_0xedda4f=_0xedda4f-0x121;const _0x42f98c=_0x42f9();let _0x33355f=_0x42f98c[_0xedda4f];return _0x33355f;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x42f9(){const _0x13db4f=['833760LLCNuw','opencode.json','ghOPF','76DbGuXv','✓\x20OpenCode\x20plugin\x20configured','VKhHs','GWAkQ','error','6092JkPRAr','5910HdEoGf','39rasrfW','isArray','958215mXVxNd','24368WxeQqd','13706YMHbFe','143408HfbEVI','✓\x20OpenCode\x20plugin\x20already\x20configured','project','pluginScope','prompt','log','1547OLsxuD','\x0a📦\x20OpenCode\x20Plugin\x0a','$schema','Project\x20(shared\x20with\x20team\x20via\x20git)','644130fArecU','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','jEAYT'];_0x42f9=function(){return _0x13db4f;};return _0x42f9();}export async function ensureOpencodePluginConfig(_0x2f2661){const _0x220320=_0x3335,_0x56fc4f={'GWAkQ':function(_0x52fe66,_0x23d7d8){return _0x52fe66(_0x23d7d8);},'ghOPF':function(_0x53c477,_0x4b9f39,_0x42f4c3){return _0x53c477(_0x4b9f39,_0x42f4c3);},'UPOXq':_0x220320(0x13c),'CvExH':_0x220320(0x135),'VKhHs':'list','RBusM':_0x220320(0x131),'jEAYT':'Where\x20should\x20the\x20plugin\x20be\x20installed?','EOamk':'User\x20(available\x20in\x20all\x20your\x20projects)','OWQbG':'https://opencode.ai/config.json','vHjcg':function(_0x393ee6,_0x51ef8e){return _0x393ee6(_0x51ef8e);},'qjxXa':'utf-8','QTKxV':_0x220320(0x139),'NwwXi':'Failed\x20to\x20read\x20opencode.json'},_0x524d07=_0x56fc4f[_0x220320(0x125)](existsSync,_0x56fc4f[_0x220320(0x121)](join,getOpencodeConfigDir(_0x220320(0x130)),_0x56fc4f['UPOXq']));let _0x37a64b;if(_0x2f2661)_0x37a64b=_0x2f2661;else{if(_0x524d07)_0x37a64b=_0x220320(0x130);else{console[_0x220320(0x133)](_0x56fc4f['CvExH']);const _0x48ef33=await _0x3c41c1[_0x220320(0x132)]([{'type':_0x56fc4f[_0x220320(0x124)],'name':_0x56fc4f['RBusM'],'message':_0x56fc4f[_0x220320(0x13a)],'choices':[{'name':_0x56fc4f['EOamk'],'value':'user'},{'name':_0x220320(0x137),'value':_0x220320(0x130)}],'default':'user'}]);_0x37a64b=_0x48ef33[_0x220320(0x131)];}}const _0x350f34=join(_0x56fc4f[_0x220320(0x125)](getOpencodeConfigDir,_0x37a64b),'opencode.json'),_0x275d79='@ranger-testing/opencode-plugin',_0x28a17c=_0x56fc4f['OWQbG'];let _0x537afc={};if(_0x56fc4f['vHjcg'](existsSync,_0x350f34))try{const _0x67170b=await readFile(_0x350f34,_0x56fc4f['qjxXa']);_0x537afc=JSON['parse'](_0x67170b);}catch(_0x5e22ff){return console[_0x220320(0x126)](_0x56fc4f['QTKxV']),{'configured':![],'scope':_0x37a64b,'error':_0x56fc4f['NwwXi'],'details':_0x5e22ff};}const _0x31e080=Array[_0x220320(0x12a)](_0x537afc['plugin'])?_0x537afc['plugin']:[];if(_0x31e080['includes'](_0x275d79))return console[_0x220320(0x133)](_0x220320(0x12f)),{'configured':![],'scope':_0x37a64b};return _0x537afc[_0x220320(0x136)]=_0x537afc[_0x220320(0x136)]||_0x28a17c,_0x537afc['plugin']=[..._0x31e080,_0x275d79],await mkdir(getOpencodeConfigDir(_0x37a64b),{'recursive':!![]}),await writeFile(_0x350f34,JSON['stringify'](_0x537afc,null,0x2)+'\x0a'),console['log'](_0x220320(0x123)),{'configured':!![],'scope':_0x37a64b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2510c4,_0x1558a6){const _0x4ec83a=_0x6c73,_0x135f5c=_0x2510c4();while(!![]){try{const _0x3c0641=-parseInt(_0x4ec83a(0x226))/0x1*(parseInt(_0x4ec83a(0x20e))/0x2)+parseInt(_0x4ec83a(0x1ff))/0x3+parseInt(_0x4ec83a(0x203))/0x4+parseInt(_0x4ec83a(0x223))/0x5*(-parseInt(_0x4ec83a(0x215))/0x6)+parseInt(_0x4ec83a(0x200))/0x7+-parseInt(_0x4ec83a(0x1fe))/0x8*(parseInt(_0x4ec83a(0x20a))/0x9)+-parseInt(_0x4ec83a(0x1fd))/0xa*(-parseInt(_0x4ec83a(0x212))/0xb);if(_0x3c0641===_0x1558a6)break;else _0x135f5c['push'](_0x135f5c['shift']());}catch(_0x3b9d88){_0x135f5c['push'](_0x135f5c['shift']());}}}(_0x1125,0x84bec));function _0x1125(){const _0x229d68=['oGCxl','name','ranger@trailhead','profile','mqIVC','XGIgE','baseUrl','KxJHN','512530RQkVCp','3438984SSRZSN','2377350mIcDWT','2970835oqsMYR','zMdzS','path','4029824MGMZYZ','Failed\x20to\x20add\x20marketplace:','gFNuv','ewGfm','plugin','profile_activate','fGFyj','9RwOkUc','CI\x20profile\x20\x22','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','skipChromium','229234wlbDVg','error','auth.json','map','11KFrzsy','SCxyc','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','187368obqqvj','sessions','✓\x20Claude\x20Code\x20plugin\x20installed','✓\x20Marketplace\x20already\x20added','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','kHMTw','message','TJoEZ','bINNL','XZdEy','trackPhaseStart','✓\x20Created\x20profile\x20settings:\x20baseUrl=','marketplace','80UJACRb','trackPhaseEnd','chromium','7wFwuRU','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','auth','trailhead','success','log','project','ZxYnl','baBpi','tiENk','ranger-testing/trailhead','dir_setup','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','QZtLq'];_0x1125=function(){return _0x229d68;};return _0x1125();}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';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x6c73(_0x20ce59,_0x1e342e){_0x20ce59=_0x20ce59-0x1e8;const _0x1125e7=_0x1125();let _0x6c730e=_0x1125e7[_0x20ce59];return _0x6c730e;}async function findCiProfile(_0xb63dc){const _0x10854e=_0x6c73,_0x539a98={'baBpi':function(_0x210cfd,_0x2e1ab9,_0x36a017){return _0x210cfd(_0x2e1ab9,_0x36a017);},'tiENk':function(_0xd71417,_0x24dbc6){return _0xd71417+_0x24dbc6;},'zMdzS':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','fGFyj':function(_0x656a7,_0xa25d19,_0x15740b){return _0x656a7(_0xa25d19,_0x15740b);},'kHMTw':function(_0x2db747,_0xe200a0){return _0x2db747===_0xe200a0;},'UFwYZ':_0x10854e(0x21a)},_0x3f2e74=getRangerDir(),_0x23658e=join(_0x3f2e74,'ci');if(_0xb63dc){const _0x484b98=_0x539a98[_0x10854e(0x1ef)](join,_0x23658e,_0xb63dc);return{'name':_0xb63dc,'path':_0x484b98};}if(!existsSync(_0x23658e))throw new Error(_0x539a98[_0x10854e(0x1f0)](_0x10854e(0x219),_0x539a98['zMdzS']));const _0x41b6ea=await _0x539a98[_0x10854e(0x209)](readdir,_0x23658e,{'withFileTypes':!![]}),_0x427416=_0x41b6ea['filter'](_0x7e7047=>_0x7e7047['isDirectory']())[_0x10854e(0x211)](_0x4cd72d=>_0x4cd72d[_0x10854e(0x1f6)]);if(_0x539a98[_0x10854e(0x21b)](_0x427416['length'],0x0))throw new Error(_0x539a98['tiENk'](_0x539a98['UFwYZ'],_0x539a98[_0x10854e(0x201)]));if(_0x427416['length']===0x1){const _0x159dd7=_0x427416[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x159dd7),{'name':_0x159dd7,'path':join(_0x23658e,_0x159dd7)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x427416['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x4c9f09=_0x6c73,_0xc6487e={'xudlF':function(_0x533412,_0x3105b3){return _0x533412(_0x3105b3);},'QZtLq':'ranger@trailhead','BsJcS':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','noCOZ':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','LDLGj':_0x4c9f09(0x1ea),'oGCxl':_0x4c9f09(0x204),'STueJ':_0x4c9f09(0x207),'PWVkj':'install','bINNL':'Failed\x20to\x20install\x20plugin:','GxRzY':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project'},_0x5ebcc0=await _0xc6487e['xudlF'](isPluginInstalled,_0xc6487e[_0x4c9f09(0x1f4)]);if(_0x5ebcc0)return console[_0x4c9f09(0x1ec)](_0xc6487e['BsJcS']),![];console['log'](_0xc6487e['noCOZ']);const _0x40dd29=await isMarketplaceAdded(_0xc6487e['LDLGj']);let _0x1d41de=_0x40dd29;if(_0x40dd29)console[_0x4c9f09(0x1ec)](_0x4c9f09(0x218));else{const _0x23b7fc=await runClaudeCommand(['plugin',_0x4c9f09(0x222),'add',_0x4c9f09(0x1f1)]);!_0x23b7fc[_0x4c9f09(0x1eb)]?(console['error'](_0xc6487e[_0x4c9f09(0x1f5)],_0x23b7fc[_0x4c9f09(0x20f)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x1d41de=!![];}if(_0x1d41de){const _0x558693=await runClaudeCommand([_0xc6487e['STueJ'],_0xc6487e['PWVkj'],_0x4c9f09(0x1f7),'--scope',_0x4c9f09(0x1ed)]);!_0x558693['success']?(console['error'](_0xc6487e[_0x4c9f09(0x21e)],_0x558693['error']),console[_0x4c9f09(0x1ec)](_0xc6487e['GxRzY'])):console[_0x4c9f09(0x1ec)](_0x4c9f09(0x217));}return!![];}export async function setupCi(_0xdf4273,_0x4e56ac,_0x46bb63){const _0x2d780b=_0x6c73,_0x53fd18={'lIQMS':function(_0x1d97f2,_0x268e8b){return _0x1d97f2(_0x268e8b);},'rQAqC':_0x2d780b(0x1e9),'ZxYnl':_0x2d780b(0x1f2),'TJoEZ':function(_0x45969a){return _0x45969a();},'KxJHN':function(_0x37ba14,_0x3bb161){return _0x37ba14(_0x3bb161);},'lrxll':function(_0x194f87,_0x1cfe36,_0x199f21){return _0x194f87(_0x1cfe36,_0x199f21);},'FZmBW':function(_0x316ccf,_0x545e94,_0x5699ec){return _0x316ccf(_0x545e94,_0x5699ec);},'ewGfm':'settings.json','EWOwB':function(_0x4ada10,_0x108ec1,_0x10ee63){return _0x4ada10(_0x108ec1,_0x10ee63);},'XGIgE':function(_0x472f43,_0x175151,_0xe4ef13){return _0x472f43(_0x175151,_0xe4ef13);},'mqIVC':'auth.json.enc','ouUjx':'✓\x20Auth\x20state\x20found','EOtMZ':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','gFNuv':'profile_activate','SCxyc':'skills','XZdEy':_0x2d780b(0x20c)};console[_0x2d780b(0x1ec)](_0x2d780b(0x1f3)),_0x46bb63?.[_0x2d780b(0x220)]('auth'),await _0x53fd18['lIQMS'](authenticate,_0xdf4273),_0x46bb63?.['trackPhaseEnd'](_0x53fd18['rQAqC']),_0x46bb63?.['trackPhaseStart'](_0x53fd18[_0x2d780b(0x1ee)]);const {path:_0x2e582f,installed:_0x24fec2}=await ensureRangerDir();await writeRangerGitignore(_0x2e582f);const _0x181f34=join(_0x2e582f,_0x2d780b(0x216));!existsSync(_0x181f34)&&await mkdir(_0x181f34,{'recursive':!![]});_0x46bb63?.['trackPhaseEnd'](_0x53fd18['ZxYnl'],{'installed':_0x24fec2}),_0x46bb63?.['trackPhaseStart'](_0x2d780b(0x225));let _0x3d06f1=![];_0x4e56ac?.[_0x2d780b(0x20d)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3d06f1=await _0x53fd18[_0x2d780b(0x21d)](ensureChromium);_0x46bb63?.[_0x2d780b(0x224)]('chromium',{'installed':_0x3d06f1,'skipped':!!_0x4e56ac?.[_0x2d780b(0x20d)]}),_0x46bb63?.['trackPhaseStart'](_0x2d780b(0x208));const _0x2cfbfa=await _0x53fd18[_0x2d780b(0x1fc)](findCiProfile,_0x4e56ac?.[_0x2d780b(0x1f8)]);let _0x2de216=![];_0x4e56ac?.[_0x2d780b(0x1fb)]&&(await _0x53fd18['lrxll'](mkdir,_0x2cfbfa['path'],{'recursive':!![]}),await _0x53fd18['lrxll'](saveSettings,_0x2cfbfa[_0x2d780b(0x1f6)],{'baseUrl':_0x4e56ac['baseUrl'],'headless':!![]}),console['log'](_0x2d780b(0x221)+_0x4e56ac['baseUrl']),_0x2de216=!![]);const _0x547fac=_0x53fd18['FZmBW'](join,_0x2cfbfa['path'],_0x53fd18[_0x2d780b(0x206)]);if(!existsSync(_0x547fac)&&!_0x2de216)throw new Error(_0x2d780b(0x20b)+_0x2cfbfa[_0x2d780b(0x1f6)]+_0x2d780b(0x214));const _0x2afdf4=_0x53fd18['EWOwB'](join,_0x2cfbfa[_0x2d780b(0x202)],_0x2d780b(0x210)),_0x4a547f=_0x53fd18[_0x2d780b(0x1fa)](join,_0x2cfbfa[_0x2d780b(0x202)],_0x53fd18[_0x2d780b(0x1f9)]),_0x28bde9=existsSync(_0x2afdf4),_0x44518d=existsSync(_0x4a547f);if(_0x44518d)try{const _0x53b967=await getToken();if(!_0x53b967)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2d6a8c=await readFile(_0x4a547f);decrypt(_0x2d6a8c,_0x53b967),console[_0x2d780b(0x1ec)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x52de15){const _0x4c719f=_0x52de15 instanceof Error?_0x52de15[_0x2d780b(0x21c)]:_0x53fd18['lIQMS'](String,_0x52de15);throw new Error(_0x2d780b(0x1e8)+_0x2cfbfa['name']+'\x22:\x20'+_0x4c719f);}else _0x28bde9?console[_0x2d780b(0x1ec)](_0x53fd18['ouUjx']):console['log'](_0x53fd18['EOtMZ']);await writeActiveProfileName(_0x2cfbfa[_0x2d780b(0x1f6)]),console[_0x2d780b(0x1ec)]('✓\x20Active\x20profile:\x20'+_0x2cfbfa['name']),_0x46bb63?.['trackPhaseEnd'](_0x53fd18[_0x2d780b(0x205)],{'profileName':_0x2cfbfa['name'],'hasAuth':_0x28bde9,'hasEncryptedAuth':_0x44518d,'createdSettings':_0x2de216}),_0x46bb63?.[_0x2d780b(0x220)](_0x2d780b(0x207));const _0x2d3aa9=await installPluginNonInteractive();_0x46bb63?.[_0x2d780b(0x224)](_0x2d780b(0x207),{'installed':_0x2d3aa9}),_0x46bb63?.['trackPhaseStart'](_0x53fd18[_0x2d780b(0x213)]),await skillup({'autoInstall':'project'}),_0x46bb63?.['trackPhaseEnd'](_0x53fd18[_0x2d780b(0x213)]),console[_0x2d780b(0x1ec)](_0x53fd18[_0x2d780b(0x21f)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e538c,_0x5823b8){const _0x2c7606=_0x19cc,_0x244b65=_0x5e538c();while(!![]){try{const _0x2b1ccf=-parseInt(_0x2c7606(0xe9))/0x1+-parseInt(_0x2c7606(0xfe))/0x2*(-parseInt(_0x2c7606(0x100))/0x3)+-parseInt(_0x2c7606(0x103))/0x4*(-parseInt(_0x2c7606(0xe0))/0x5)+-parseInt(_0x2c7606(0xfd))/0x6*(parseInt(_0x2c7606(0xe2))/0x7)+parseInt(_0x2c7606(0xe7))/0x8*(-parseInt(_0x2c7606(0xe6))/0x9)+-parseInt(_0x2c7606(0xe5))/0xa+parseInt(_0x2c7606(0xff))/0xb*(parseInt(_0x2c7606(0x108))/0xc);if(_0x2b1ccf===_0x5823b8)break;else _0x244b65['push'](_0x244b65['shift']());}catch(_0x713931){_0x244b65['push'](_0x244b65['shift']());}}}(_0x3299,0x96c63));function _0x19cc(_0x3b034d,_0x1c9573){_0x3b034d=_0x3b034d-0xde;const _0x329976=_0x3299();let _0x19cc38=_0x329976[_0x3b034d];return _0x19cc38;}import{basename}from'path';import _0x4bf787 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x3299(){const _0x153aea=['opencode','967995SnsKlF','EHBdF','suppressUsage','FHHxm','\x20<your-api-token>','claude','YXqWl','ZGXVR','KBTqC','\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!','autoInstall','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','\x0a📦\x20Installing\x20skills...\x0a','To\x20get\x20started:','user','All\x20projects\x20(','stdout','This\x20project\x20only\x20(','rGEHR','list','168LtvMfR','1000yHsSjn','2024tDTnVU','486SwlqkE','TsVOF','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','10484oLhjWf','\x20successfully!\x0a','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','prompt','stdin','227496ekCcct','log','message','125iBOlxB','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','236614uCMWxl','To\x20use:','RYXnn','6579740ZpiaTq','3231PUwmTP','9912cMVHKw'];_0x3299=function(){return _0x153aea;};return _0x3299();}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(_0x1d5145={}){const _0x234a7c=_0x19cc,_0x4c635a={'VRLmD':_0x234a7c(0x105),'HmGYF':_0x234a7c(0xf6),'TJvRM':_0x234a7c(0xf4),'dlobL':_0x234a7c(0xe1),'vycZl':'\x20--opencode','ZGXVR':function(_0x21a5fc,_0x2867a7){return _0x21a5fc===_0x2867a7;},'rGEHR':'opencode','TsVOF':function(_0x2049b4,_0x3e4da5){return _0x2049b4(_0x3e4da5);},'mwPyJ':function(_0x177c20,_0x221336){return _0x177c20===_0x221336;},'RYXnn':_0x234a7c(0xfc),'TTgUt':'installLevel','AhONg':'Where\x20should\x20skills\x20be\x20installed?','fZJgp':_0x234a7c(0xf7),'KuloP':'project','KBTqC':function(_0x51409a){return _0x51409a();},'vvdAC':_0x234a7c(0xf5),'SdEJo':function(_0x3fb7c6,_0x5830dd){return _0x3fb7c6 instanceof _0x5830dd;},'YXqWl':function(_0x45107f,_0x499956){return _0x45107f>_0x499956;},'EHBdF':_0x234a7c(0xe3),'FHHxm':_0x234a7c(0xf2)};console['log'](_0x4c635a['VRLmD']);const _0x27d635=_0x1d5145['platform']??_0x234a7c(0xee),_0x3693b2=await getToken();if(!_0x3693b2){const _0x5b8df8='2|0|1|4|5|3'['split']('|');let _0x1511f5=0x0;while(!![]){switch(_0x5b8df8[_0x1511f5++]){case'0':console[_0x234a7c(0xde)](_0x4c635a['HmGYF']);continue;case'1':console['log'](_0x4c635a['TJvRM']);continue;case'2':console['log'](_0x4c635a['dlobL']);continue;case'3':return;case'4':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x27d635===_0x234a7c(0xe8)?_0x4c635a['vycZl']:'')+_0x234a7c(0xed));continue;case'5':console[_0x234a7c(0xde)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x4c635a[_0x234a7c(0xf0)](_0x27d635,_0x4c635a['rGEHR'])?_0x4c635a['vycZl']:'')+'\x0a');continue;}break;}}console['log']('✓\x20Found\x20API\x20token');const _0x55d6ac=getProjectRoot(),_0x40bfa0=basename(_0x55d6ac),_0x45e0be=_0x27d635===_0x4c635a[_0x234a7c(0xfb)]?_0x4c635a[_0x234a7c(0x101)](getOpencodeConfigDir,'user')+'/skills/':getClaudeConfigDir()+'/skills/',_0x4de8b1=_0x4c635a['mwPyJ'](_0x27d635,'opencode')?_0x55d6ac+'/.opencode/skills/':_0x55d6ac+'/.claude/skills/',_0x4912f3=process[_0x234a7c(0x107)]['isTTY']&&process[_0x234a7c(0xf9)]['isTTY'];let _0x2e9642;if(_0x1d5145[_0x234a7c(0xf3)])_0x2e9642=_0x1d5145['autoInstall'];else{if(_0x4912f3){const _0x3cdc61=await _0x4bf787[_0x234a7c(0x106)]([{'type':_0x4c635a[_0x234a7c(0xe4)],'name':_0x4c635a['TTgUt'],'message':_0x4c635a['AhONg'],'choices':[{'name':_0x234a7c(0xf8)+_0x45e0be+')','value':_0x4c635a['fZJgp']},{'name':_0x234a7c(0xfa)+_0x4de8b1+')','value':_0x4c635a['KuloP']}]}]);_0x2e9642=_0x3cdc61['installLevel'];}else _0x2e9642='project',console[_0x234a7c(0xde)](_0x234a7c(0x102)+_0x4de8b1+')');}let _0x453521=0x0;const _0x38a4f8=_0x4c635a[_0x234a7c(0xf1)](getCurrentVersion);console[_0x234a7c(0xde)](_0x4c635a['vvdAC']);try{const _0x35d76c=await installSkill('ranger',{'cliVersion':_0x38a4f8,'level':_0x2e9642,'platform':_0x27d635});_0x35d76c&&_0x453521++;}catch(_0x57d987){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x4c635a['SdEJo'](_0x57d987,Error)?_0x57d987[_0x234a7c(0xdf)]:_0x57d987);}if(_0x4c635a['YXqWl'](_0x453521,0x0)){const _0x3d1ce3=_0x2e9642===_0x234a7c(0xf7)?'user-level':'project-level';console[_0x234a7c(0xde)]('\x0a✅\x20Installed\x20'+_0x453521+'\x20'+_0x3d1ce3+'\x20skill'+(_0x4c635a[_0x234a7c(0xef)](_0x453521,0x1)?'s':'')+_0x234a7c(0x104)),!_0x1d5145[_0x234a7c(0xeb)]&&(console['log'](_0x4c635a[_0x234a7c(0xea)]),_0x27d635===_0x4c635a['rGEHR']?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x234a7c(0xde)](_0x4c635a[_0x234a7c(0xec)]));}else console[_0x234a7c(0xde)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2cd5af,_0x24be13){const _0x8c677f=_0x3183,_0x563f94=_0x2cd5af();while(!![]){try{const _0x1ca228=parseInt(_0x8c677f(0x20c))/0x1+-parseInt(_0x8c677f(0x242))/0x2*(-parseInt(_0x8c677f(0x1f9))/0x3)+-parseInt(_0x8c677f(0x202))/0x4+parseInt(_0x8c677f(0x247))/0x5*(parseInt(_0x8c677f(0x23f))/0x6)+-parseInt(_0x8c677f(0x225))/0x7*(-parseInt(_0x8c677f(0x1de))/0x8)+parseInt(_0x8c677f(0x23a))/0x9+parseInt(_0x8c677f(0x211))/0xa*(-parseInt(_0x8c677f(0x249))/0xb);if(_0x1ca228===_0x24be13)break;else _0x563f94['push'](_0x563f94['shift']());}catch(_0x21d77d){_0x563f94['push'](_0x563f94['shift']());}}}(_0x1915,0x5a47e));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x3810f3 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x3183(_0x46eb96,_0x5eb1c9){_0x46eb96=_0x46eb96-0x1d8;const _0x191525=_0x1915();let _0x318356=_0x191525[_0x46eb96];return _0x318356;}import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x4088c0=>'\x1b[1m'+_0x4088c0+'\x1b[0m';function getPlaywrightVersion(){const _0x43357f=_0x3183,_0x3f7980={'rsclM':_0x43357f(0x217),'TGbrg':function(_0x4a6e48,_0x5bdb48){return _0x4a6e48(_0x5bdb48);}};try{const _0x43708d=require[_0x43357f(0x1dc)](_0x3f7980['rsclM']),_0x28ef43=_0x3f7980['TGbrg'](require,_0x43708d);return _0x28ef43[_0x43357f(0x1f0)];}catch{return null;}}function installChromiumBinary(_0x72c984){const _0x26aaf5=_0x3183,_0x43dd0a={'TloqV':function(_0x348052,_0x58450f){return _0x348052===_0x58450f;},'hJwkg':function(_0x10712b){return _0x10712b();},'snEur':'chromium','cWJOm':_0x26aaf5(0x210),'olGgd':'install','UaINi':function(_0x5aff1e,_0x4d9848,_0x32eac1,_0x4e8272){return _0x5aff1e(_0x4d9848,_0x32eac1,_0x4e8272);},'zhuKr':_0x26aaf5(0x20f),'bvVIZ':_0x26aaf5(0x23b),'YGdNj':_0x26aaf5(0x230)};return new Promise((_0x5522e2,_0x55d299)=>{const _0x207a6b=_0x26aaf5,_0x383b0c=_0x72c984?[_0x207a6b(0x23e)+_0x72c984,_0x207a6b(0x20a),_0x43dd0a['snEur']]:[_0x43dd0a['cWJOm'],_0x43dd0a[_0x207a6b(0x245)],_0x43dd0a[_0x207a6b(0x1ec)]],_0x390f8c=_0x43dd0a['UaINi'](spawn,_0x207a6b(0x22c),_0x383b0c,{'stdio':'inherit','shell':process[_0x207a6b(0x1da)]===_0x43dd0a[_0x207a6b(0x213)]});_0x390f8c['on'](_0x43dd0a['bvVIZ'],_0xf3a09=>{const _0x307ad7=_0x207a6b;_0x43dd0a['TloqV'](_0xf3a09,0x0)?_0x43dd0a['hJwkg'](_0x5522e2):_0x55d299(new Error(_0x307ad7(0x23d)+_0xf3a09));}),_0x390f8c['on'](_0x43dd0a['YGdNj'],_0x4c9c9c=>{_0x55d299(_0x4c9c9c);});});}export async function authenticate(_0x3c61b1){const _0x24b4e2=_0x3183,_0x2f9b36={'EGMPG':function(_0x348aff,_0x1c08c9){return _0x348aff(_0x1c08c9);},'SUWlM':'existing_token','aTpkh':function(_0x1468c8,_0x1a82bc){return _0x1468c8 instanceof _0x1a82bc;},'eCaSR':_0x24b4e2(0x1f1),'WxNOS':function(_0x1a27b0,_0x2639e6){return _0x1a27b0(_0x2639e6);},'VnpFf':'✓\x20Stored\x20credentials\x20locally','rZJIR':_0x24b4e2(0x241)};if(!_0x3c61b1){const _0x98ca31=await getToken();if(_0x98ca31){const _0x1bfed9=await _0x2f9b36[_0x24b4e2(0x1f6)](getCurrentUser,_0x98ca31);if(_0x1bfed9[_0x24b4e2(0x20e)])return console['log'](_0x24b4e2(0x1f8)+_0x1bfed9['user']['organizationName']),{'token':_0x98ca31,'method':_0x2f9b36[_0x24b4e2(0x229)]};}try{_0x3c61b1=await runDeviceAuthFlow();}catch(_0x5b09e0){throw new Error(_0x24b4e2(0x212)+(_0x2f9b36[_0x24b4e2(0x22f)](_0x5b09e0,Error)?_0x5b09e0['message']:_0x5b09e0));}const _0x3350e3=await getCurrentUser(_0x3c61b1);if(!_0x3350e3[_0x24b4e2(0x20e)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3350e3[_0x24b4e2(0x230)]);return console[_0x24b4e2(0x22d)](_0x24b4e2(0x1ef)+_0x3350e3['user']['organizationName']),{'token':_0x3c61b1,'method':'device_auth'};}console[_0x24b4e2(0x22d)](_0x2f9b36['eCaSR']);const _0x43ae79=await _0x2f9b36['WxNOS'](getCurrentUser,_0x3c61b1);if(!_0x43ae79['success']){if(_0x43ae79[_0x24b4e2(0x235)])throw new Error('Authentication\x20failed:\x20'+_0x43ae79[_0x24b4e2(0x230)]+_0x24b4e2(0x1ea));else throw new Error(_0x24b4e2(0x22b)+_0x43ae79['error']+_0x24b4e2(0x222));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x43ae79[_0x24b4e2(0x1e6)][_0x24b4e2(0x1e5)]),await _0x2f9b36[_0x24b4e2(0x1f6)](storeToken,_0x3c61b1),console['log'](process[_0x24b4e2(0x236)][_0x24b4e2(0x204)]?_0x24b4e2(0x1fd):_0x2f9b36['VnpFf']),{'token':_0x3c61b1,'method':_0x2f9b36['rZJIR']};}export async function ensureRangerDir(){const _0x4d78e2=_0x3183,_0x585912={'peWWZ':function(_0x12eac5){return _0x12eac5();},'AlfTS':function(_0x4ba613,_0x1b3bb3,_0x281c14){return _0x4ba613(_0x1b3bb3,_0x281c14);},'IAbzH':'.ranger','NOyKT':function(_0x21d492){return _0x21d492();},'TaoZk':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x11ea06=_0x585912['peWWZ'](findGitRoot),_0x1f21c6=_0x11ea06?_0x585912[_0x4d78e2(0x1f4)](join,_0x11ea06,_0x585912['IAbzH']):_0x585912['NOyKT'](getRangerDir);return!existsSync(_0x1f21c6)?(await mkdir(_0x1f21c6,{'recursive':!![]}),console[_0x4d78e2(0x22d)](_0x4d78e2(0x21b)),{'path':_0x1f21c6,'installed':!![]}):(console['log'](_0x585912['TaoZk']),{'path':_0x1f21c6,'installed':![]});}export async function ensureChromium(){const _0x24c44a=_0x3183,_0x5762a7={'bLhDp':'✓\x20Playwright\x20Chromium\x20browser\x20found','RzvnG':'confirm','TbDvu':'install','zKNnt':_0x24c44a(0x1fa),'WTELj':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','prnHe':function(_0x3f1157,_0x5b64b8){return _0x3f1157 instanceof _0x5b64b8;},'MBxdr':_0x24c44a(0x205),'KwJyM':'\x20\x20npx\x20playwright\x20install\x20chromium','NWyRW':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x1055ca=![];try{const _0x232adb=chromium[_0x24c44a(0x1e1)]();_0x1055ca=existsSync(_0x232adb);}catch{_0x1055ca=![];}if(_0x1055ca)return console['log'](_0x5762a7['bLhDp']),![];const _0x6f7002=getPlaywrightVersion(),_0x5a2711=process['stdin'][_0x24c44a(0x240)]&&process[_0x24c44a(0x1e4)][_0x24c44a(0x240)];let _0x5ada7e=!![];if(_0x5a2711){const {install:_0x2a7cbb}=await _0x3810f3[_0x24c44a(0x1e9)]([{'type':_0x5762a7['RzvnG'],'name':_0x5762a7['TbDvu'],'message':_0x6f7002?'The\x20required\x20version\x20('+_0x6f7002+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x5762a7[_0x24c44a(0x1f3)],'default':!![]}]);_0x5ada7e=_0x2a7cbb;}else console[_0x24c44a(0x22d)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x6f7002?'\x20'+_0x6f7002:'')+'...');if(_0x5ada7e){console[_0x24c44a(0x22d)](_0x24c44a(0x22a));try{await installChromiumBinary(_0x6f7002),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x3e9a64){console['error'](_0x5762a7[_0x24c44a(0x226)],_0x5762a7[_0x24c44a(0x228)](_0x3e9a64,Error)?_0x3e9a64['message']:_0x3e9a64),console[_0x24c44a(0x22d)](_0x5762a7['MBxdr']),_0x6f7002?console[_0x24c44a(0x22d)](_0x24c44a(0x24a)+_0x6f7002+'\x20install\x20chromium'):console[_0x24c44a(0x22d)](_0x5762a7[_0x24c44a(0x1f5)]);}}else console[_0x24c44a(0x22d)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0x5762a7['NWyRW']),_0x6f7002?console['log'](_0x24c44a(0x24a)+_0x6f7002+'\x20install\x20chromium'):console['log'](_0x5762a7[_0x24c44a(0x1f5)]);return!![];}export async function writeRangerGitignore(_0x2cc3cb){const _0x4e09a4=_0x3183,_0x256f68={'XIZPj':'✓\x20Created\x20.ranger/.gitignore'},_0x1bfd37=join(_0x2cc3cb,'.gitignore'),_0x1e7a2f='\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(_0x1bfd37,_0x1e7a2f),console[_0x4e09a4(0x22d)](_0x256f68[_0x4e09a4(0x1ee)]);}function _0x1915(){const _0x20033c=['force','GITHUB_ENV','You\x20can\x20install\x20it\x20manually\x20by\x20running:','BZXne','url','JqGRd','FiBhL','install','ivJMS','642495WpNNNW','mTwWn','success','win32','playwright','88090wfhZaW','Authentication\x20failed:\x20','zhuKr','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','skipChromium','plugin','playwright/package.json','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','ranger\x20profile\x20add\x20local','✓\x20Created\x20.ranger/\x20directory','maXio','diDFr','use\x20until\x20the\x20session\x20expires.\x0a','kDHAI','stdin','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','bbXJv','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','15729ccwVkV','WTELj','\x0a❌\x20Profile\x20setup\x20failed:','prnHe','SUWlM','\x0aInstalling\x20Chromium\x20browser...\x0a','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','npx','log','scope','aTpkh','error','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','trackPhaseStart','KKgwM','method','status','env','warn','message','ghGSS','6029487kqrBXw','close','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','Installation\x20failed\x20with\x20exit\x20code\x20','playwright@','126KCarRu','isTTY','provided_token','544cELMlr','XdMBu','No\x20git\x20repository\x20found','olGgd','CNwkA','91550iaBRpw','local','1529aSEqHK','\x20\x20npx\x20playwright@','BFmRf','trackPhaseEnd','skills','platform','oxRZm','resolve','PrpqI','472kQFsOw','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','XuhAw','executablePath','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','UlLHs','stdout','organizationName','user','confirm','Nzvtf','prompt','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','honzH','snEur','trackPhaseError','XIZPj','✓\x20Authenticated\x20to\x20','version','Validating\x20API\x20token...','chromium','zKNnt','AlfTS','KwJyM','EGMPG','skipped','✓\x20Already\x20authenticated\x20to\x20','3468xxhBgH','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','bhfzd','nzFdW','✓\x20Exported\x20credentials\x20for\x20CI','WoOPl','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','ranger','kUUJO','2198848mBIFFX'];_0x1915=function(){return _0x20033c;};return _0x1915();}function printProfileSetupLaterInstructions(){const _0x1a966e=_0x3183,_0x65697a={'VKdIa':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','WoOPl':function(_0x4cf52f,_0x2ea96d){return _0x4cf52f(_0x2ea96d);},'kDHAI':_0x1a966e(0x21a),'alKPm':_0x1a966e(0x214)};console['log'](_0x65697a['VKdIa']),console['log']('\x20\x20'+_0x65697a[_0x1a966e(0x1fe)](bold,_0x65697a[_0x1a966e(0x21f)])),console[_0x1a966e(0x22d)](_0x65697a['alKPm']);}async function ensureLocalEnv(_0x155701,_0x5f23ab){const _0x61b9d5=_0x3183,_0x582f3d={'diDFr':'⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','ghGSS':function(_0x992ca3,_0x595f0f,_0x4be9e9){return _0x992ca3(_0x595f0f,_0x4be9e9);},'CrwyK':'✓\x20Local\x20profile\x20already\x20exists','mRsDp':_0x61b9d5(0x1e2),'kUUJO':_0x61b9d5(0x1e7),'bhfzd':_0x61b9d5(0x224),'kbsmq':function(_0x1b23a9,_0x4a02a4,_0x4906dd,_0x1076d9){return _0x1b23a9(_0x4a02a4,_0x4906dd,_0x1076d9);},'XuhAw':function(_0x212a10,_0x34fa5e){return _0x212a10 instanceof _0x34fa5e;},'diXYo':function(_0x5d457b){return _0x5d457b();}};if(!findGitRoot())return console[_0x61b9d5(0x22d)](_0x582f3d[_0x61b9d5(0x21d)]),{'ready':![],'skipped':!![]};if(_0x582f3d[_0x61b9d5(0x239)](findExistingEnv,_0x61b9d5(0x248),{'locations':['local']}))return console['log'](_0x582f3d['CrwyK']),{'ready':!![],'skipped':![]};const _0x12edee=process['stdin']['isTTY']&&process[_0x61b9d5(0x1e4)][_0x61b9d5(0x240)];if(_0x12edee&&!_0x155701?.['url']){console[_0x61b9d5(0x22d)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log']('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log'](_0x582f3d['mRsDp']),console[_0x61b9d5(0x22d)](_0x61b9d5(0x21e)),console[_0x61b9d5(0x22d)]('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0x4933ea}=await _0x3810f3['prompt']([{'type':_0x582f3d[_0x61b9d5(0x201)],'name':'wantsProfile','message':_0x582f3d[_0x61b9d5(0x1fb)],'default':!![]}]);if(!_0x4933ea)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x582f3d['kbsmq'](addEnv,_0x61b9d5(0x248),{'url':_0x155701?.[_0x61b9d5(0x207)],'force':_0x155701?.[_0x61b9d5(0x203)]},_0x5f23ab),{'ready':!![],'skipped':![]};}catch(_0x2cbe39){return console['error'](_0x61b9d5(0x227),_0x582f3d[_0x61b9d5(0x1e0)](_0x2cbe39,Error)?_0x2cbe39['message']:_0x2cbe39),_0x582f3d['diXYo'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x54a2c0,_0x2af1c6,_0x27449a){const _0xcd18ea=_0x3183,_0xf41d16={'CNwkA':'git_check','ivJMS':_0xcd18ea(0x244),'PrpqI':_0xcd18ea(0x219),'BZXne':function(_0x3bf599){return _0x3bf599();},'nzFdW':'auth','KKgwM':_0xcd18ea(0x1f2),'Jizhj':_0xcd18ea(0x221),'BFmRf':function(_0x2ae2d6,_0x1658b3){return _0x2ae2d6(_0x1658b3);},'XcSOj':function(_0x2452d6,_0x9a9d7a){return _0x2452d6(_0x9a9d7a);},'oxRZm':_0xcd18ea(0x216),'FiBhL':'skills','XdMBu':_0xcd18ea(0x200),'kMrEl':'opencode','maXio':function(_0xa0d3b1,_0x13f71f){return _0xa0d3b1(_0x13f71f);},'KgZKS':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','JqGRd':function(_0x4b4a7c,_0x1d6861){return _0x4b4a7c(_0x1d6861);},'mTwWn':'profile','UlLHs':function(_0x1af596,_0xe6a21f,_0x3562de){return _0x1af596(_0xe6a21f,_0x3562de);},'tVBrI':_0xcd18ea(0x23c),'Nzvtf':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','honzH':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','VEdqM':function(_0x18af9e,_0x3683c0){return _0x18af9e(_0x3683c0);},'bbXJv':function(_0xf9f8a4,_0x423c72){return _0xf9f8a4+_0x423c72;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');const _0xda3353=process[_0xcd18ea(0x220)][_0xcd18ea(0x240)]&&process[_0xcd18ea(0x1e4)]['isTTY'];!_0xda3353&&!_0x2af1c6?.[_0xcd18ea(0x22e)]&&(console[_0xcd18ea(0x22d)]('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x2af1c6={..._0x2af1c6,'scope':'user'});_0x27449a?.['trackPhaseStart'](_0xf41d16['CNwkA']);if(!findGitRoot()){await _0x27449a?.[_0xcd18ea(0x1ed)](_0xf41d16[_0xcd18ea(0x246)],new Error(_0xf41d16[_0xcd18ea(0x20b)]));throw new Error(_0xf41d16[_0xcd18ea(0x1dd)]);}_0x27449a?.[_0xcd18ea(0x1d8)](_0xf41d16[_0xcd18ea(0x246)]);const _0xdbf3c2=!existsSync(_0xf41d16[_0xcd18ea(0x206)](getRangerDir)),{path:_0x4172c8}=await ensureRangerDir();_0x27449a?.['trackPhaseStart']('auth');const _0x3f83fc=await authenticate(_0x54a2c0);_0x27449a?.[_0xcd18ea(0x1d8)](_0xf41d16[_0xcd18ea(0x1fc)],{'isFirstRun':_0xdbf3c2,'method':_0x3f83fc[_0xcd18ea(0x234)]}),_0x27449a?.['trackPhaseStart'](_0xf41d16[_0xcd18ea(0x233)]);_0x2af1c6?.[_0xcd18ea(0x215)]?console['log'](_0xf41d16['Jizhj']):await _0xf41d16[_0xcd18ea(0x206)](ensureChromium);_0x27449a?.[_0xcd18ea(0x1d8)](_0xcd18ea(0x1f2),{'isFirstRun':_0xdbf3c2,'skipped':!!_0x2af1c6?.['skipChromium']}),await _0xf41d16['BFmRf'](writeRangerGitignore,_0x4172c8),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x39cca5=_0x2af1c6?.['scope'],_0x1df1db=_0x2af1c6?.['opencode']??![];let _0x4d8c18=null;_0x1df1db?(_0x27449a?.[_0xcd18ea(0x232)]('plugin'),_0x4d8c18=await _0xf41d16['XcSOj'](ensureOpencodePluginConfig,_0x39cca5),_0x27449a?.['trackPhaseEnd']('plugin',{'isFirstRun':_0xdbf3c2,'opencode':!![]})):(_0x27449a?.['trackPhaseStart'](_0xf41d16[_0xcd18ea(0x1db)]),await _0xf41d16[_0xcd18ea(0x24b)](ensureClaudePlugin,_0x39cca5),_0x27449a?.['trackPhaseEnd'](_0xcd18ea(0x216),{'isFirstRun':_0xdbf3c2}));if(_0x1df1db&&_0x4d8c18){_0x27449a?.[_0xcd18ea(0x232)](_0xf41d16[_0xcd18ea(0x209)]);try{await installSkill(_0xf41d16[_0xcd18ea(0x243)],{'level':_0x4d8c18[_0xcd18ea(0x22e)],'cliVersion':_0xf41d16['BZXne'](getCurrentVersion),'platform':_0xf41d16['kMrEl']}),_0x27449a?.['trackPhaseEnd'](_0xf41d16['FiBhL'],{'isFirstRun':_0xdbf3c2,'opencode':!![]});}catch(_0x3338be){console[_0xcd18ea(0x237)](_0xcd18ea(0x231),_0x3338be instanceof Error?_0x3338be[_0xcd18ea(0x238)]:_0x3338be),_0x27449a?.[_0xcd18ea(0x1d8)](_0xf41d16['FiBhL'],{'isFirstRun':_0xdbf3c2,'opencode':!![],'failed':!![]});}}else _0x27449a?.['trackPhaseStart'](_0xcd18ea(0x1d9)),await _0xf41d16[_0xcd18ea(0x21c)](ensureClaudeSkills,_0x39cca5),_0x27449a?.[_0xcd18ea(0x1d8)](_0xf41d16[_0xcd18ea(0x209)],{'isFirstRun':_0xdbf3c2});if(!_0xda3353&&!_0x2af1c6?.[_0xcd18ea(0x207)])console[_0xcd18ea(0x22d)](_0xf41d16['KgZKS']),console[_0xcd18ea(0x22d)]('\x20\x20'+_0xf41d16[_0xcd18ea(0x208)](bold,_0xcd18ea(0x21a))+'\x0a');else{_0x27449a?.['trackPhaseStart'](_0xf41d16[_0xcd18ea(0x20d)]);const _0x2152d6=await _0xf41d16[_0xcd18ea(0x1e3)](ensureLocalEnv,{'url':_0x2af1c6?.['url'],'force':_0x2af1c6?.[_0xcd18ea(0x203)]},_0x27449a);_0x27449a?.[_0xcd18ea(0x1d8)](_0xf41d16[_0xcd18ea(0x20d)],{'isFirstRun':_0xdbf3c2,'profileReady':_0x2152d6['ready'],'userSkipped':_0x2152d6[_0xcd18ea(0x1f7)]}),_0x2152d6['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x1df1db)console[_0xcd18ea(0x22d)](_0xcd18ea(0x1df)),console[_0xcd18ea(0x22d)](_0xf41d16['tVBrI']),console[_0xcd18ea(0x22d)](_0xf41d16[_0xcd18ea(0x1e8)]),console[_0xcd18ea(0x22d)](_0xf41d16[_0xcd18ea(0x1eb)]);else{const _0x5eda96=_0xf41d16['VEdqM'](bold,'/ranger:enable');console[_0xcd18ea(0x22d)](_0xf41d16[_0xcd18ea(0x223)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x5eda96+'\x20and\x20prompt\x20the\x20coding'+_0xcd18ea(0x218),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0xcd18ea(0x1ff));}}
|
|
1
|
+
const _0xe9c477=_0x5c08;(function(_0x3ce1e0,_0x294b37){const _0x36fe47=_0x5c08,_0x38127c=_0x3ce1e0();while(!![]){try{const _0xf8d7a=-parseInt(_0x36fe47(0x18c))/0x1*(parseInt(_0x36fe47(0x1a8))/0x2)+-parseInt(_0x36fe47(0x163))/0x3*(parseInt(_0x36fe47(0x1a3))/0x4)+parseInt(_0x36fe47(0x18a))/0x5+-parseInt(_0x36fe47(0x157))/0x6+parseInt(_0x36fe47(0x19d))/0x7+-parseInt(_0x36fe47(0x161))/0x8+parseInt(_0x36fe47(0x15c))/0x9;if(_0xf8d7a===_0x294b37)break;else _0x38127c['push'](_0x38127c['shift']());}catch(_0x4b0e52){_0x38127c['push'](_0x38127c['shift']());}}}(_0x4c90,0xb3543));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x259226 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';function _0x4c90(){const _0x465dca=['nNftN','\x0a🚀\x20Ranger\x20Setup\x0a','Validating\x20API\x20token...','4610025WhbpqD','isTTY','yZRvF','\x20\x20npx\x20playwright@','opencode','2964528VnbBIi','✓\x20Exported\x20credentials\x20for\x20CI','1890243CSyuTR','xMoqh','MZcUi','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','stdin','log','GITHUB_ENV','Installation\x20failed\x20with\x20exit\x20code\x20','BdpJO','skipChromium','RkfcS','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','✓\x20Already\x20authenticated\x20to\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','stdout','oHSpb','mgZTA','fsOJR','npx','✓\x20Authenticated\x20to\x20','gyExr','\x20\x20npx\x20playwright\x20install\x20chromium','auth','qESYU','chromium','mgbbW','YYocM','ranger','error','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','install','FKukx','JrVey','success','organizationName','mzbvx','skills','✓\x20Local\x20profile\x20already\x20exists','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','5721295GEVKyf','trackPhaseStart','22853YlUQRw','SkGso','prompt','executablePath','plugin','kPGtj','warn','fMqGf','\x1b[0m','XOZNe','ExbkB','force','message','wantsProfile','QLfXY','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','UiRID','8554217mUDlzD','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','uamqW','/ranger:enable','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','playwright','8EMzzua','EGFrw','fZxQe','LqHCx','close','34iucEbc','method','skipped','bMnso','ggEVr','AJOpk','url','env','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','user','gAvIw','AUXmT','fPWmJ','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','ranger\x20profile\x20add\x20local','sKEKy','No\x20git\x20repository\x20found','AHAqb','Authentication\x20failed:\x20','use\x20until\x20the\x20session\x20expires.\x0a','trackPhaseEnd','kNcpA','Hlafr','QvJbG','qbNkG','eVOCF','qMeQC','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','platform','git_check','lZySo','qcpvy','LqEWV','748530NBgIIo','CpTUy'];_0x4c90=function(){return _0x465dca;};return _0x4c90();}import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';function _0x5c08(_0x47fcac,_0x1b16fc){_0x47fcac=_0x47fcac-0x155;const _0x4c900c=_0x4c90();let _0x5c08ec=_0x4c900c[_0x47fcac];return _0x5c08ec;}const require=createRequire(import.meta.url),bold=_0x1e67f1=>'\x1b[1m'+_0x1e67f1+_0xe9c477(0x194);function getPlaywrightVersion(){const _0x199a5f=_0xe9c477,_0x390908={'qcpvy':'playwright/package.json','lZySo':function(_0x2e7ecd,_0x44b36f){return _0x2e7ecd(_0x44b36f);}};try{const _0x18a6b4=require['resolve'](_0x390908[_0x199a5f(0x155)]),_0x275031=_0x390908[_0x199a5f(0x1c7)](require,_0x18a6b4);return _0x275031['version'];}catch{return null;}}function installChromiumBinary(_0x14d6e4){const _0x464989=_0xe9c477,_0x4855fa={'HNZbJ':_0x464989(0x181),'LqHCx':_0x464989(0x17b),'oNgNW':_0x464989(0x175),'kNcpA':'inherit','RkfcS':function(_0x1da76c,_0x12512c){return _0x1da76c===_0x12512c;},'oHSpb':'win32','nNRVu':_0x464989(0x17f)};return new Promise((_0x302191,_0x48e959)=>{const _0x1c450e=_0x464989,_0x4b0d24=_0x14d6e4?['playwright@'+_0x14d6e4,_0x4855fa['HNZbJ'],_0x4855fa[_0x1c450e(0x1a6)]]:[_0x1c450e(0x1a2),'install','chromium'],_0x7ef821=spawn(_0x4855fa['oNgNW'],_0x4b0d24,{'stdio':_0x4855fa[_0x1c450e(0x1be)],'shell':_0x4855fa[_0x1c450e(0x16d)](process[_0x1c450e(0x1c5)],_0x4855fa[_0x1c450e(0x172)])});_0x7ef821['on'](_0x1c450e(0x1a7),_0x6e0c83=>{const _0x371598=_0x1c450e;_0x6e0c83===0x0?_0x302191():_0x48e959(new Error(_0x371598(0x16a)+_0x6e0c83));}),_0x7ef821['on'](_0x4855fa['nNRVu'],_0x46eb6a=>{_0x48e959(_0x46eb6a);});});}export async function authenticate(_0x225b5b){const _0x5e04e3=_0xe9c477,_0x5aa5ba={'fsOJR':function(_0x4d2bc0,_0x1ab7c9){return _0x4d2bc0(_0x1ab7c9);},'ajbSv':'existing_token','QLfXY':function(_0x7ccad8,_0x503cbd){return _0x7ccad8(_0x503cbd);},'AHAqb':'device_auth'};if(!_0x225b5b){const _0x546127=await getToken();if(_0x546127){const _0xaa1b0b=await _0x5aa5ba[_0x5e04e3(0x174)](getCurrentUser,_0x546127);if(_0xaa1b0b['success'])return console[_0x5e04e3(0x168)](_0x5e04e3(0x16f)+_0xaa1b0b[_0x5e04e3(0x1b2)]['organizationName']),{'token':_0x546127,'method':_0x5aa5ba['ajbSv']};}try{_0x225b5b=await runDeviceAuthFlow();}catch(_0x42dead){throw new Error(_0x5e04e3(0x1bb)+(_0x42dead instanceof Error?_0x42dead[_0x5e04e3(0x198)]:_0x42dead));}const _0x339535=await _0x5aa5ba['QLfXY'](getCurrentUser,_0x225b5b);if(!_0x339535[_0x5e04e3(0x184)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x339535[_0x5e04e3(0x17f)]);return console['log'](_0x5e04e3(0x176)+_0x339535['user']['organizationName']),{'token':_0x225b5b,'method':_0x5aa5ba[_0x5e04e3(0x1ba)]};}console[_0x5e04e3(0x168)](_0x5e04e3(0x15b));const _0x44da74=await getCurrentUser(_0x225b5b);if(!_0x44da74[_0x5e04e3(0x184)]){if(_0x44da74['status'])throw new Error(_0x5e04e3(0x1bb)+_0x44da74[_0x5e04e3(0x17f)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x5e04e3(0x1a1)+_0x44da74[_0x5e04e3(0x17f)]+_0x5e04e3(0x1b1));}return console['log'](_0x5e04e3(0x176)+_0x44da74[_0x5e04e3(0x1b2)][_0x5e04e3(0x185)]),await _0x5aa5ba[_0x5e04e3(0x19a)](storeToken,_0x225b5b),console['log'](process[_0x5e04e3(0x1af)][_0x5e04e3(0x169)]?_0x5e04e3(0x162):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x225b5b,'method':'provided_token'};}export async function ensureRangerDir(){const _0x26fa27=_0xe9c477,_0x3bc079={'nlsDz':function(_0xf187e3){return _0xf187e3();},'gAvIw':function(_0x5968ec,_0x211b97){return _0x5968ec(_0x211b97);},'mgZTA':function(_0x3eab1a,_0x5c9dfb,_0x65c19){return _0x3eab1a(_0x5c9dfb,_0x65c19);},'MYBjG':'✓\x20Created\x20.ranger/\x20directory'},_0x1180e7=findGitRoot(),_0x154504=_0x1180e7?join(_0x1180e7,'.ranger'):_0x3bc079['nlsDz'](getRangerDir);return!_0x3bc079[_0x26fa27(0x1b3)](existsSync,_0x154504)?(await _0x3bc079[_0x26fa27(0x173)](mkdir,_0x154504,{'recursive':!![]}),console['log'](_0x3bc079['MYBjG']),{'path':_0x154504,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x154504,'installed':![]});}export async function ensureChromium(){const _0x1c03a1=_0xe9c477,_0x34fcc0={'MdtEJ':function(_0x67baf7,_0x250b8b){return _0x67baf7(_0x250b8b);},'FKukx':_0x1c03a1(0x170),'JRJMs':function(_0x4561de){return _0x4561de();},'gyExr':'confirm','kPGtj':_0x1c03a1(0x181),'XOZNe':_0x1c03a1(0x1b6),'XIHVu':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','mzbvx':_0x1c03a1(0x1c4),'bMnso':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','uamqW':_0x1c03a1(0x178)};let _0x5f8ae9=![];try{const _0x402991=chromium[_0x1c03a1(0x18f)]();_0x5f8ae9=_0x34fcc0['MdtEJ'](existsSync,_0x402991);}catch{_0x5f8ae9=![];}if(_0x5f8ae9)return console[_0x1c03a1(0x168)](_0x34fcc0[_0x1c03a1(0x182)]),![];const _0x27d4fc=_0x34fcc0['JRJMs'](getPlaywrightVersion),_0x54b572=process[_0x1c03a1(0x167)]['isTTY']&&process[_0x1c03a1(0x171)]['isTTY'];let _0x451493=!![];if(_0x54b572){const {install:_0x56dea7}=await _0x259226[_0x1c03a1(0x18e)]([{'type':_0x34fcc0[_0x1c03a1(0x177)],'name':_0x34fcc0[_0x1c03a1(0x191)],'message':_0x27d4fc?'The\x20required\x20version\x20('+_0x27d4fc+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x34fcc0[_0x1c03a1(0x195)],'default':!![]}]);_0x451493=_0x56dea7;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x27d4fc?'\x20'+_0x27d4fc:'')+'...');if(_0x451493){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x27d4fc),console[_0x1c03a1(0x168)](_0x34fcc0['XIHVu']);}catch(_0x1f73f9){console['error'](_0x34fcc0[_0x1c03a1(0x186)],_0x1f73f9 instanceof Error?_0x1f73f9[_0x1c03a1(0x198)]:_0x1f73f9),console[_0x1c03a1(0x168)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x27d4fc?console[_0x1c03a1(0x168)](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x1c03a1(0x178));}}else console[_0x1c03a1(0x168)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0x34fcc0[_0x1c03a1(0x1ab)]),_0x27d4fc?console['log'](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x34fcc0[_0x1c03a1(0x19f)]);return!![];}export async function writeRangerGitignore(_0x5839d1){const _0x5b0de0=_0xe9c477,_0x52c5dd={'ggEVr':function(_0x32b36e,_0x34c7a8,_0xad0eb5){return _0x32b36e(_0x34c7a8,_0xad0eb5);},'yZRvF':function(_0x3436bb,_0x17ee80,_0x5455d6){return _0x3436bb(_0x17ee80,_0x5455d6);}},_0x4e866d=_0x52c5dd[_0x5b0de0(0x1ac)](join,_0x5839d1,'.gitignore'),_0x482078='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await _0x52c5dd[_0x5b0de0(0x15e)](writeFile,_0x4e866d,_0x482078),console['log']('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x3fe4e7=_0xe9c477,_0x208914={'qMeQC':function(_0xc4178e,_0x37cfa8){return _0xc4178e(_0x37cfa8);},'qESYU':_0x3fe4e7(0x1b7),'LnPLO':_0x3fe4e7(0x180)};console[_0x3fe4e7(0x168)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x208914[_0x3fe4e7(0x1c3)](bold,_0x208914[_0x3fe4e7(0x17a)])),console[_0x3fe4e7(0x168)](_0x208914['LnPLO']);}async function ensureLocalEnv(_0x176e49,_0x10bc6b){const _0x581715=_0xe9c477,_0x1b90d3={'eVOCF':function(_0x53a969){return _0x53a969();},'JrVey':function(_0x101259,_0x5797a9,_0x3e6e61){return _0x101259(_0x5797a9,_0x3e6e61);},'nNftN':'local','DQTvb':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','qbNkG':_0x581715(0x1bc),'MkDqz':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','GXWXy':'confirm','YYocM':_0x581715(0x199),'LqEWV':function(_0x24a5f){return _0x24a5f();},'bqpNH':function(_0x55ce3d,_0x42c143,_0x31c065,_0x636eec){return _0x55ce3d(_0x42c143,_0x31c065,_0x636eec);},'SkGso':'\x0a❌\x20Profile\x20setup\x20failed:','QvJbG':function(_0x3929a5,_0x4b47ae){return _0x3929a5 instanceof _0x4b47ae;}};if(!_0x1b90d3[_0x581715(0x1c2)](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x1b90d3[_0x581715(0x183)](findExistingEnv,_0x1b90d3['nNftN'],{'locations':[_0x1b90d3[_0x581715(0x159)]]}))return console['log'](_0x581715(0x188)),{'ready':!![],'skipped':![]};const _0x401bca=process['stdin']['isTTY']&&process[_0x581715(0x171)][_0x581715(0x15d)];if(_0x401bca&&!_0x176e49?.[_0x581715(0x1ae)]){console[_0x581715(0x168)](_0x1b90d3['DQTvb']),console['log'](_0x581715(0x1b0)),console[_0x581715(0x168)](_0x581715(0x189)),console['log'](_0x1b90d3[_0x581715(0x1c1)]),console['log'](_0x1b90d3['MkDqz']);const {wantsProfile:_0xf1520a}=await _0x259226['prompt']([{'type':_0x1b90d3['GXWXy'],'name':_0x1b90d3[_0x581715(0x17d)],'message':_0x581715(0x16e),'default':!![]}]);if(!_0xf1520a)return _0x1b90d3[_0x581715(0x156)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x1b90d3['bqpNH'](addEnv,_0x1b90d3['nNftN'],{'url':_0x176e49?.['url'],'force':_0x176e49?.[_0x581715(0x197)]},_0x10bc6b),{'ready':!![],'skipped':![]};}catch(_0x19a8fc){return console['error'](_0x1b90d3[_0x581715(0x18d)],_0x1b90d3[_0x581715(0x1c0)](_0x19a8fc,Error)?_0x19a8fc['message']:_0x19a8fc),_0x1b90d3['eVOCF'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x452ad2,_0x3fdb2e,_0x6d7619){const _0x31d34f=_0xe9c477,_0x3b4524={'CpTUy':_0x31d34f(0x15a),'MZcUi':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','kNXCX':'git_check','fMqGf':_0x31d34f(0x1b9),'vwQdn':_0x31d34f(0x19e),'mgbbW':function(_0x43ba55,_0x1627fd){return _0x43ba55(_0x1627fd);},'fZxQe':function(_0x322861){return _0x322861();},'Hlafr':_0x31d34f(0x179),'ExbkB':_0x31d34f(0x17b),'sKEKy':function(_0x49b5fc){return _0x49b5fc();},'AJOpk':_0x31d34f(0x190),'xMoqh':function(_0x1b03c7,_0x54e50d){return _0x1b03c7&&_0x54e50d;},'UiRID':_0x31d34f(0x187),'BdpJO':function(_0x39eee2,_0x37f28a,_0x58e17e){return _0x39eee2(_0x37f28a,_0x58e17e);},'rFQah':_0x31d34f(0x1b7),'AUXmT':function(_0x1d523a,_0x103296,_0x241294){return _0x1d523a(_0x103296,_0x241294);},'dXtzX':'profile','IIQUy':_0x31d34f(0x166),'EGFrw':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','fPWmJ':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console['log'](_0x3b4524[_0x31d34f(0x158)]);const _0xf85a9e=process['stdin'][_0x31d34f(0x15d)]&&process['stdout']['isTTY'];!_0xf85a9e&&!_0x3fdb2e?.['scope']&&(console['log'](_0x3b4524[_0x31d34f(0x165)]),_0x3fdb2e={..._0x3fdb2e,'scope':'user'});_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x1c6));if(!findGitRoot()){await _0x6d7619?.['trackPhaseError'](_0x3b4524['kNXCX'],new Error(_0x3b4524[_0x31d34f(0x193)]));throw new Error(_0x3b4524['vwQdn']);}_0x6d7619?.[_0x31d34f(0x1bd)](_0x3b4524['kNXCX']);const _0x3075ba=!_0x3b4524['mgbbW'](existsSync,_0x3b4524[_0x31d34f(0x1a5)](getRangerDir)),{path:_0x2dbe7c}=await _0x3b4524['fZxQe'](ensureRangerDir);_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x179));const _0x10434f=await _0x3b4524[_0x31d34f(0x17c)](authenticate,_0x452ad2);_0x6d7619?.['trackPhaseEnd'](_0x3b4524[_0x31d34f(0x1bf)],{'isFirstRun':_0x3075ba,'method':_0x10434f[_0x31d34f(0x1a9)]}),_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x196)]);_0x3fdb2e?.['skipChromium']?console[_0x31d34f(0x168)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x3b4524[_0x31d34f(0x1b8)](ensureChromium);_0x6d7619?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3075ba,'skipped':!!_0x3fdb2e?.[_0x31d34f(0x16c)]}),await writeRangerGitignore(_0x2dbe7c),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x86191f=_0x3fdb2e?.['scope'],_0x5337af=_0x3fdb2e?.[_0x31d34f(0x160)]??![];let _0x2974ce=null;_0x5337af?(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x1ad)]),_0x2974ce=await ensureOpencodePluginConfig(_0x86191f),_0x6d7619?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3075ba,'opencode':!![]})):(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['AJOpk']),await ensureClaudePlugin(_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('plugin',{'isFirstRun':_0x3075ba}));if(_0x3b4524[_0x31d34f(0x164)](_0x5337af,_0x2974ce)){_0x6d7619?.['trackPhaseStart'](_0x3b4524[_0x31d34f(0x19c)]);try{await _0x3b4524[_0x31d34f(0x16b)](installSkill,_0x31d34f(0x17e),{'level':_0x2974ce['scope'],'cliVersion':getCurrentVersion(),'platform':_0x31d34f(0x160)}),_0x6d7619?.['trackPhaseEnd']('skills',{'isFirstRun':_0x3075ba,'opencode':!![]});}catch(_0x47619f){console[_0x31d34f(0x192)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x47619f instanceof Error?_0x47619f[_0x31d34f(0x198)]:_0x47619f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba,'opencode':!![],'failed':!![]});}}else _0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['UiRID']),await _0x3b4524[_0x31d34f(0x17c)](ensureClaudeSkills,_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba});if(!_0xf85a9e&&!_0x3fdb2e?.[_0x31d34f(0x1ae)])console['log'](_0x31d34f(0x19b)),console['log']('\x20\x20'+bold(_0x3b4524['rFQah'])+'\x0a');else{_0x6d7619?.['trackPhaseStart']('profile');const _0xfce09e=await _0x3b4524[_0x31d34f(0x1b4)](ensureLocalEnv,{'url':_0x3fdb2e?.[_0x31d34f(0x1ae)],'force':_0x3fdb2e?.[_0x31d34f(0x197)]},_0x6d7619);_0x6d7619?.['trackPhaseEnd'](_0x3b4524['dXtzX'],{'isFirstRun':_0x3075ba,'profileReady':_0xfce09e['ready'],'userSkipped':_0xfce09e[_0x31d34f(0x1aa)]}),_0xfce09e['ready']&&console[_0x31d34f(0x168)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x5337af)console[_0x31d34f(0x168)](_0x3b4524['IIQUy']),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1a4)]),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1b5)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0xb01b62=bold(_0x31d34f(0x1a0));console['log']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0xb01b62+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x40e51a=_0x332c;function _0x3415(){const _0x48751a=['hLFFN','configured','YXTzh','fwagZ','none','not_configured','CzoxU','not_installed','rwQmL','user','cMinP','success','cwd','YazTW','sljAi','LiUBQ','PLkZU','SoBAM','494933nbyLex','some','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','HgJzQ','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','isArray','\x0a📊\x20Ranger\x20Status\x0a','disabled','path','includes','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a---\x20Claude\x20Code\x20Plugin\x20---','3TUTCsP','stderr','32748TCpLqc','status','\x1b[0m','\x20\x20\x20\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','7860349KinOzc','\x0a---\x20OpenCode\x20Plugin\x20---','DIEKZ','GtLFY','55tqtRwI','RtZfs','displayName','\x1b[1m','iNfCa','DEaIU','ifhEe','mrejl','99400jhEowo','name','DEBUG','1460324tVCIps','NfQuR','QsbVX','settingsPath','auth.json','utf-8','nOtXo','plugin','cKUBW','string','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','tHKMV','details','\x20\x20Not\x20configured',':\x20installed\x20(','\x20\x20User-level:','filter','\x20\x20Run:\x20ranger\x20setup\x20[token]','length','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','NjZpq','SJNHr','toString','SKILL.md','cwHnx','\x20(latest:\x20','(not\x20found)','KoOvh','map','hasEncryptedAuth','DjPeR','@ranger-testing/opencode-plugin','TWeBU','pipe','error','vIvVg','JVyQN','\x20\x20\x20\x20Auth:\x20','wudaF','parse','ukKlP','\x20\x20Not\x20installed','enabled','\x0a---\x20Profiles\x20---','\x0a---\x20Skills\x20---','log','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','zzvLf','910gnFqmo','lzHqK','hasPlaintextAuth','621TGgmmX','1053650AsmEWS','Version:\x20','2JCyoSs','\x20plugin(s)\x20configured','Root:\x20','nwfhq','1208352NFxvlp','encrypted'];_0x3415=function(){return _0x48751a;};return _0x3415();}(function(_0x57243c,_0x131d1c){const _0xdf0e70=_0x332c,_0x5a78df=_0x57243c();while(!![]){try{const _0x42090a=parseInt(_0xdf0e70(0x1b4))/0x1*(-parseInt(_0xdf0e70(0x19c))/0x2)+parseInt(_0xdf0e70(0x1c0))/0x3*(parseInt(_0xdf0e70(0x166))/0x4)+-parseInt(_0xdf0e70(0x196))/0x5*(-parseInt(_0xdf0e70(0x1c2))/0x6)+parseInt(_0xdf0e70(0x1c7))/0x7+parseInt(_0xdf0e70(0x163))/0x8*(-parseInt(_0xdf0e70(0x199))/0x9)+parseInt(_0xdf0e70(0x19a))/0xa*(-parseInt(_0xdf0e70(0x15b))/0xb)+parseInt(_0xdf0e70(0x1a0))/0xc;if(_0x42090a===_0x131d1c)break;else _0x5a78df['push'](_0x5a78df['shift']());}catch(_0x19ca17){_0x5a78df['push'](_0x5a78df['shift']());}}}(_0x3415,0xab9ed));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';function _0x332c(_0x235967,_0x1dbfb3){_0x235967=_0x235967-0x15b;const _0x34158a=_0x3415();let _0x332c50=_0x34158a[_0x235967];return _0x332c50;}const bold=_0x2f1bbc=>_0x40e51a(0x15e)+_0x2f1bbc+_0x40e51a(0x1c4),link=(_0x2684dd,_0x2d63ff)=>'\x1b]8;;file://'+_0x2684dd+'\x07'+(_0x2d63ff||_0x2684dd)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0xb0566d=_0x40e51a,_0x578b80={'nOtXo':_0xb0566d(0x1a9),'Viirt':function(_0x561394,_0x3b38b0){return _0x561394(_0x3b38b0);},'YazTW':_0xb0566d(0x1a7),'DjPeR':function(_0x55fe8b,_0x57f642,_0x1c604c,_0x44e1dc){return _0x55fe8b(_0x57f642,_0x1c604c,_0x44e1dc);},'LiUBQ':'config','RtZfs':_0xb0566d(0x187),'HgJzQ':'data','ifhEe':'close'};return new Promise(_0x491012=>{const _0x5430de=_0xb0566d,_0x23ae20={'tHKMV':function(_0x54b84f,_0x452942){return _0x54b84f(_0x452942);},'vIvVg':function(_0x36f022,_0x50fbe0){return _0x578b80['Viirt'](_0x36f022,_0x50fbe0);},'isQxu':_0x5430de(0x1a3),'pNWpc':_0x578b80[_0x5430de(0x1af)]},_0x4ae283=_0x578b80[_0x5430de(0x184)](spawn,'opencode',['debug',_0x578b80[_0x5430de(0x1b1)]],{'stdio':['ignore',_0x578b80[_0x5430de(0x15c)],_0x5430de(0x187)]});let _0x38977f='';_0x4ae283['stdout']?.['on']('data',_0x36740e=>{const _0x5b7011=_0x5430de;_0x38977f+=_0x36740e[_0x5b7011(0x17c)]();}),_0x4ae283[_0x5430de(0x1c1)]?.['on'](_0x578b80[_0x5430de(0x1b7)],_0x535e37=>{_0x38977f+=_0x535e37['toString']();}),_0x4ae283['on'](_0x5430de(0x188),()=>{const _0x358689=_0x5430de;_0x491012({'status':_0x578b80[_0x358689(0x16c)]});}),_0x4ae283['on'](_0x578b80[_0x5430de(0x161)],_0x502e14=>{const _0x2ec4e6=_0x5430de,_0x105793={'vMtSq':_0x2ec4e6(0x16f)};if(_0x502e14!==0x0){_0x23ae20['tHKMV'](_0x491012,{'status':'not_installed'});return;}const _0x489a27=_0x38977f['trim']();let _0x549a3d=null;if(_0x489a27)try{_0x549a3d=JSON[_0x2ec4e6(0x18d)](_0x489a27);}catch{const _0x59ce0c=_0x489a27['match'](/\{[\s\S]*\}$/);if(_0x59ce0c)try{_0x549a3d=JSON['parse'](_0x59ce0c[0x0]);}catch{_0x549a3d=null;}}const _0x4c7a3e=Array[_0x2ec4e6(0x1b9)](_0x549a3d?.[_0x2ec4e6(0x16d)])?_0x549a3d?.['plugin']:[],_0x58ff8d=_0x4c7a3e[_0x2ec4e6(0x1b5)](_0x2d0760=>{const _0x3c07ce=_0x2ec4e6;if(typeof _0x2d0760!==_0x105793['vMtSq'])return![];return _0x2d0760['includes'](_0x3c07ce(0x185))||_0x2d0760['includes']('opencode-plugin');});if(_0x58ff8d){_0x23ae20['vIvVg'](_0x491012,{'status':_0x23ae20['isQxu'],'details':_0x4c7a3e[_0x2ec4e6(0x178)]>0x0?_0x4c7a3e[_0x2ec4e6(0x178)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4c7a3e[_0x2ec4e6(0x178)]>0x0){_0x23ae20[_0x2ec4e6(0x189)](_0x491012,{'status':_0x23ae20['pNWpc'],'details':_0x4c7a3e['length']+_0x2ec4e6(0x19d)});return;}_0x23ae20[_0x2ec4e6(0x171)](_0x491012,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x5f2287,_0x5c083c){const _0x460237=_0x40e51a,_0x18a002={'wudaF':function(_0x3efb58,_0x43e653){return _0x3efb58(_0x43e653);},'aaCnx':function(_0x5bb82c,_0xaa19d4,_0x248135){return _0x5bb82c(_0xaa19d4,_0x248135);}};if(!_0x18a002[_0x460237(0x18c)](existsSync,_0x5f2287))return[];const _0x48690b=[];try{const _0x2fb374=await _0x18a002['aaCnx'](readdir,_0x5f2287,{'withFileTypes':!![]});for(const _0x1829b7 of _0x2fb374){if(_0x1829b7['isDirectory']()){const _0x2cb73c=join(_0x5f2287,_0x1829b7[_0x460237(0x164)],_0x460237(0x17d));if(existsSync(_0x2cb73c)){let _0x5cc7e5=_0x1829b7[_0x460237(0x164)];try{const _0x4f4ac9=await _0x18a002['aaCnx'](readFile,_0x2cb73c,_0x460237(0x16b)),_0x669fc6=_0x4f4ac9['match'](/name:\s*(.+)/);_0x669fc6&&(_0x5cc7e5=_0x669fc6[0x1]['trim']());}catch{}_0x48690b['push']({'name':_0x1829b7[_0x460237(0x164)],'displayName':_0x5cc7e5,'path':_0x2cb73c,'level':_0x5c083c});}}}}catch{return[];}return _0x48690b;}async function getInstalledSkills(){const _0x47d0cc=_0x40e51a,_0x304661={'JVyQN':function(_0x16fcbb,_0x33777d,_0x7fa99d){return _0x16fcbb(_0x33777d,_0x7fa99d);},'iNfCa':function(_0x413ef2){return _0x413ef2();},'SJNHr':'project','YZwqY':_0x47d0cc(0x1ab)},[_0x31042d,_0x235850]=await Promise['all']([_0x304661['JVyQN'](getSkillsFromDir,_0x304661[_0x47d0cc(0x15f)](getProjectSkillsDir),_0x304661[_0x47d0cc(0x17b)]),_0x304661[_0x47d0cc(0x18a)](getSkillsFromDir,getUserSkillsDir(),_0x304661['YZwqY'])]);return{'project':_0x31042d,'user':_0x235850};}async function getEnvironments(){const _0x56e0e3=_0x40e51a,_0x3e54f7={'cKUBW':'settings.json','nwfhq':function(_0x15d696,_0x256a74,_0x563e59){return _0x15d696(_0x256a74,_0x563e59);},'TWeBU':_0x56e0e3(0x16a),'PLkZU':function(_0x4ab7cb,_0x2db50f,_0x53abc4){return _0x4ab7cb(_0x2db50f,_0x53abc4);},'DEaIU':function(_0x361107){return _0x361107();}},{envNames:_0x369020,activeEnv:_0x4b630c}=await getEnvNames(),_0x445f78=_0x3e54f7[_0x56e0e3(0x160)](getRangerDir);if(!existsSync(_0x445f78))return{'envs':[],'activeEnv':null};const _0x66f99=_0x369020['map'](_0x1d9891=>{const _0x2f2ec8=_0x56e0e3,_0x2e108f=getEnvDir(_0x1d9891),_0x4dd5bc=join(_0x2e108f,_0x3e54f7[_0x2f2ec8(0x16e)]),_0x4c8264=_0x3e54f7[_0x2f2ec8(0x19f)](join,_0x2e108f,_0x3e54f7[_0x2f2ec8(0x186)]),_0x14ba06=_0x3e54f7[_0x2f2ec8(0x1b2)](join,_0x2e108f,'auth.json.enc');return{'name':_0x1d9891,'settingsPath':existsSync(_0x4dd5bc)?_0x4dd5bc:_0x2f2ec8(0x180),'hasPlaintextAuth':existsSync(_0x4c8264),'hasEncryptedAuth':existsSync(_0x14ba06),'isActive':_0x1d9891===_0x4b630c};});return{'envs':_0x66f99,'activeEnv':_0x4b630c};}export async function status(){const _0x3218aa=_0x40e51a,_0x275839={'zzvLf':function(_0x65127b){return _0x65127b();},'BzTKz':function(_0x257a1e,_0x3765ed){return _0x257a1e(_0x3765ed);},'YXTzh':function(_0x47c909,_0x148080){return _0x47c909(_0x148080);},'NfQuR':function(_0x188293,_0x2441d8,_0x4c6c88){return _0x188293(_0x2441d8,_0x4c6c88);},'KoOvh':function(_0x288f8c){return _0x288f8c();},'sljAi':function(_0x43e437,_0x53c9cc){return _0x43e437!==_0x53c9cc;},'fwagZ':function(_0x5553db,_0x18e991){return _0x5553db(_0x18e991);},'QsbVX':'@ranger-testing/opencode-plugin','UttCb':_0x3218aa(0x1a7),'DIEKZ':_0x3218aa(0x173),'WUEmD':_0x3218aa(0x1be),'lzHqK':_0x3218aa(0x1bf),'ukKlP':'enabled','hLFFN':_0x3218aa(0x1bb),'lUwaU':'ranger@trailhead','rwQmL':_0x3218aa(0x18f),'jmoWK':_0x3218aa(0x192),'NjZpq':function(_0xaeda){return _0xaeda();},'mrejl':function(_0x57a56f,_0x264939){return _0x57a56f===_0x264939;},'CzoxU':'No\x20skills\x20installed','gkOsc':function(_0x50a1c7,_0x191583){return _0x50a1c7>_0x191583;},'kqHMv':function(_0x56d14e,_0x5b57e,_0x12f9e4){return _0x56d14e(_0x5b57e,_0x12f9e4);},'SoBAM':_0x3218aa(0x175),'EMcWw':_0x3218aa(0x191),'IaYbT':function(_0x2fb0d0){return _0x2fb0d0();},'cMinP':_0x3218aa(0x1a1),'qVGYY':'plaintext','cwHnx':_0x3218aa(0x1a6),'GtLFY':_0x3218aa(0x180)};console[_0x3218aa(0x193)](_0x3218aa(0x1ba));const _0x3dffff=process[_0x3218aa(0x1ae)](),_0x52e1bd=_0x275839[_0x3218aa(0x195)](getRangerDir);if(!_0x275839['BzTKz'](existsSync,_0x52e1bd)){console['log'](_0x3218aa(0x19e)+link(_0x3dffff,_0x275839['YXTzh'](bold,basename(_0x3dffff)))),console[_0x3218aa(0x193)](_0x3218aa(0x179)),console['log'](_0x3218aa(0x170));return;}console['log'](_0x3218aa(0x19e)+_0x275839[_0x3218aa(0x167)](link,_0x3dffff,bold(_0x275839[_0x3218aa(0x1a4)](basename,_0x3dffff))));const _0x39f33a=getCurrentVersion(),_0x4347fd=_0x275839[_0x3218aa(0x181)](getLatestVersion);if(_0x4347fd&&_0x275839[_0x3218aa(0x1b0)](_0x4347fd,_0x39f33a))console['log'](_0x3218aa(0x19b)+_0x39f33a+_0x3218aa(0x17f)+_0x4347fd+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x4347fd?console[_0x3218aa(0x193)](_0x3218aa(0x19b)+_0x39f33a+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x39f33a);const _0x1d9f97=await getToken();if(_0x1d9f97){const _0x4b951a=await getCurrentUser(_0x1d9f97);_0x4b951a[_0x3218aa(0x1ad)]?console[_0x3218aa(0x193)]('Organization:\x20'+bold(_0x4b951a['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x3218aa(0x193)](_0x3218aa(0x177)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x3218aa(0x193)](_0x3218aa(0x177));process['env'][_0x3218aa(0x165)]&&(console['log']('API\x20Environment:\x20'+_0x275839['zzvLf'](getCurrentEnvironment)),console[_0x3218aa(0x193)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x3218aa(0x193)](_0x3218aa(0x1c8));const _0x328cb8=await _0x275839[_0x3218aa(0x195)](getOpencodePluginStatus);if(_0x328cb8['status']==='configured')console[_0x3218aa(0x193)]('\x20\x20'+_0x275839[_0x3218aa(0x1a5)](bold,_0x275839[_0x3218aa(0x168)])+':\x20configured'),_0x328cb8[_0x3218aa(0x172)]&&console[_0x3218aa(0x193)]('\x20\x20'+_0x328cb8['details']);else _0x328cb8[_0x3218aa(0x1c3)]===_0x275839['UttCb']?(console['log'](_0x275839[_0x3218aa(0x1c9)]),_0x328cb8[_0x3218aa(0x172)]&&console['log']('\x20\x20'+_0x328cb8['details']),console['log'](_0x275839['WUEmD'])):console['log'](_0x3218aa(0x1b6));console['log'](_0x275839[_0x3218aa(0x197)]);const _0x16515d=await getPluginInfo('ranger@trailhead');if(_0x16515d){const _0x4995a0=_0x16515d['scope']||'unknown',_0x1b011a=_0x16515d[_0x3218aa(0x190)]?_0x275839[_0x3218aa(0x18e)]:_0x275839[_0x3218aa(0x1a2)];console['log']('\x20\x20'+bold(_0x275839['lUwaU'])+_0x3218aa(0x174)+_0x4995a0+',\x20'+_0x1b011a+')');}else console[_0x3218aa(0x193)](_0x275839[_0x3218aa(0x1aa)]),console['log'](_0x3218aa(0x1c6));console['log'](_0x275839['jmoWK']);const {project:_0x999349,user:_0x3f7750}=await _0x275839[_0x3218aa(0x17a)](getInstalledSkills),_0x258fd0=_0x999349[_0x3218aa(0x176)](_0x30d2a8=>RANGER_MANAGED_SKILLS['includes'](_0x30d2a8['name'])),_0x20a2da=_0x3f7750[_0x3218aa(0x176)](_0x1cda3a=>RANGER_MANAGED_SKILLS[_0x3218aa(0x1bd)](_0x1cda3a[_0x3218aa(0x164)])),_0x20b3b5=_0x258fd0['length']+_0x20a2da['length'];if(_0x275839[_0x3218aa(0x162)](_0x20b3b5,0x0))console[_0x3218aa(0x193)](_0x275839[_0x3218aa(0x1a8)]),console[_0x3218aa(0x193)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x275839['gkOsc'](_0x258fd0['length'],0x0)){console[_0x3218aa(0x193)]('\x20\x20Project-level:');for(const _0x314d09 of _0x258fd0){console['log'](_0x3218aa(0x1c5)+bold(_0x314d09[_0x3218aa(0x15d)])+':\x20'+_0x275839['kqHMv'](link,_0x314d09[_0x3218aa(0x1bc)],basename(_0x314d09[_0x3218aa(0x1bc)])));}}if(_0x275839['gkOsc'](_0x20a2da['length'],0x0)){console[_0x3218aa(0x193)](_0x275839[_0x3218aa(0x1b3)]);for(const _0x4ab420 of _0x20a2da){console['log']('\x20\x20\x20\x20'+bold(_0x4ab420['displayName'])+':\x20'+link(_0x4ab420['path'],basename(_0x4ab420['path'])));}}}console[_0x3218aa(0x193)](_0x275839['EMcWw']);const {envs:_0x402eb3,activeEnv:_0x688cdb}=await _0x275839['IaYbT'](getEnvironments);if(_0x275839['mrejl'](_0x402eb3[_0x3218aa(0x178)],0x0))console['log']('No\x20profiles\x20configured'),console[_0x3218aa(0x193)](_0x3218aa(0x1b8));else{for(const _0x1a8bcd of _0x402eb3){const _0x410ff2=_0x1a8bcd['isActive']?'\x20(active)':'',_0x25bc4f=_0x1a8bcd[_0x3218aa(0x183)]?_0x275839[_0x3218aa(0x1ac)]:_0x1a8bcd[_0x3218aa(0x198)]?_0x275839['qVGYY']:_0x275839[_0x3218aa(0x17e)];console[_0x3218aa(0x193)]('\x20\x20'+bold(_0x1a8bcd[_0x3218aa(0x164)])+_0x410ff2),console[_0x3218aa(0x193)](_0x3218aa(0x18b)+_0x25bc4f),_0x1a8bcd['settingsPath']!==_0x275839[_0x3218aa(0x1ca)]&&console[_0x3218aa(0x193)]('\x20\x20\x20\x20Settings:\x20'+_0x275839['kqHMv'](link,_0x1a8bcd[_0x3218aa(0x169)],basename(_0x1a8bcd['settingsPath'])));}!_0x688cdb&&(console[_0x3218aa(0x193)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x3218aa(0x193)](_0x3218aa(0x194)+_0x402eb3[_0x3218aa(0x182)](_0x36f0ac=>_0x36f0ac['name'])['join'](',\x20')+')'));}console['log']('');}
|
|
1
|
+
const _0x195f95=_0xb971;(function(_0x323aa8,_0x465c04){const _0x2aa33f=_0xb971,_0x4972b4=_0x323aa8();while(!![]){try{const _0x551c34=parseInt(_0x2aa33f(0x7c))/0x1+parseInt(_0x2aa33f(0xc1))/0x2*(parseInt(_0x2aa33f(0xb3))/0x3)+-parseInt(_0x2aa33f(0x7d))/0x4+parseInt(_0x2aa33f(0x7e))/0x5+parseInt(_0x2aa33f(0xb7))/0x6*(parseInt(_0x2aa33f(0x89))/0x7)+-parseInt(_0x2aa33f(0x9a))/0x8+-parseInt(_0x2aa33f(0x9e))/0x9;if(_0x551c34===_0x465c04)break;else _0x4972b4['push'](_0x4972b4['shift']());}catch(_0x2771ec){_0x4972b4['push'](_0x4972b4['shift']());}}}(_0x7597,0x8577b));import{readFile,readdir}from'fs/promises';function _0xb971(_0x5570ec,_0x319baa){_0x5570ec=_0x5570ec-0x6b;const _0x759789=_0x7597();let _0xb97147=_0x759789[_0x5570ec];return _0xb97147;}import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x171ede=>_0x195f95(0x92)+_0x171ede+_0x195f95(0xa0),link=(_0x316eb4,_0x3dfb54)=>'\x1b]8;;file://'+_0x316eb4+'\x07'+(_0x3dfb54||_0x316eb4)+_0x195f95(0xa4);async function getOpencodePluginStatus(){const _0x2f915c=_0x195f95,_0x2caa6f={'gzTJo':function(_0xc28fa2,_0x4f94c3){return _0xc28fa2(_0x4f94c3);},'vCtHA':function(_0x39b698,_0x46253e){return _0x39b698!==_0x46253e;},'rKeUu':'opencode-plugin','JYQhm':function(_0x481ee5,_0x1732e9){return _0x481ee5>_0x1732e9;},'aPGcv':function(_0x4eb5e6,_0x2a362e){return _0x4eb5e6(_0x2a362e);},'vIezM':function(_0x4e829d,_0x2065bd){return _0x4e829d(_0x2065bd);},'bgcHi':_0x2f915c(0x84),'CQfxP':'debug','bnrZs':'pipe','dcQyf':_0x2f915c(0x80),'EBOSz':_0x2f915c(0x8b)};return new Promise(_0x5444b5=>{const _0x5450b0=_0x2f915c,_0x425655={'HlHSt':function(_0x99bed2,_0x5ce2d9){return _0x2caa6f['vCtHA'](_0x99bed2,_0x5ce2d9);},'oIiAo':_0x2caa6f[_0x5450b0(0xce)],'Jpkdf':function(_0x14aead,_0x130546){const _0x3e1687=_0x5450b0;return _0x2caa6f[_0x3e1687(0xc6)](_0x14aead,_0x130546);},'qQAcZ':function(_0x53bdbb,_0x462aaf){return _0x2caa6f['aPGcv'](_0x53bdbb,_0x462aaf);},'EaArY':function(_0x47ef7f,_0x1d8604){const _0x3368c8=_0x5450b0;return _0x2caa6f[_0x3368c8(0x7a)](_0x47ef7f,_0x1d8604);}},_0x380bc6=spawn(_0x2caa6f[_0x5450b0(0x8e)],[_0x2caa6f[_0x5450b0(0xa1)],_0x5450b0(0xcb)],{'stdio':[_0x5450b0(0x97),'pipe',_0x2caa6f['bnrZs']]});let _0x53132b='';_0x380bc6[_0x5450b0(0x9f)]?.['on'](_0x2caa6f['dcQyf'],_0x2f5f68=>{const _0x3997ec=_0x5450b0;_0x53132b+=_0x2f5f68[_0x3997ec(0xa2)]();}),_0x380bc6[_0x5450b0(0x9c)]?.['on'](_0x2caa6f['dcQyf'],_0x31eaf8=>{_0x53132b+=_0x31eaf8['toString']();}),_0x380bc6['on']('error',()=>{const _0x257465=_0x5450b0;_0x2caa6f[_0x257465(0xc2)](_0x5444b5,{'status':'not_installed'});}),_0x380bc6['on'](_0x2caa6f['EBOSz'],_0x390b17=>{const _0x1ec7f4=_0x5450b0;if(_0x390b17!==0x0){_0x5444b5({'status':_0x1ec7f4(0x93)});return;}const _0xa4b55=_0x53132b['trim']();let _0x1e8289=null;if(_0xa4b55)try{_0x1e8289=JSON['parse'](_0xa4b55);}catch{const _0x3febe6=_0xa4b55['match'](/\{[\s\S]*\}$/);if(_0x3febe6)try{_0x1e8289=JSON['parse'](_0x3febe6[0x0]);}catch{_0x1e8289=null;}}const _0x5866ce=Array['isArray'](_0x1e8289?.['plugin'])?_0x1e8289?.[_0x1ec7f4(0x83)]:[],_0x2255da=_0x5866ce['some'](_0x1899ed=>{const _0x2ba1a8=_0x1ec7f4;if(_0x425655['HlHSt'](typeof _0x1899ed,_0x2ba1a8(0x96)))return![];return _0x1899ed[_0x2ba1a8(0x78)](_0x2ba1a8(0xb4))||_0x1899ed[_0x2ba1a8(0x78)](_0x425655['oIiAo']);});if(_0x2255da){_0x5444b5({'status':_0x1ec7f4(0xb2),'details':_0x425655[_0x1ec7f4(0xd1)](_0x5866ce['length'],0x0)?_0x5866ce[_0x1ec7f4(0x88)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x425655[_0x1ec7f4(0xd1)](_0x5866ce[_0x1ec7f4(0x88)],0x0)){_0x425655[_0x1ec7f4(0xc5)](_0x5444b5,{'status':'not_configured','details':_0x5866ce[_0x1ec7f4(0x88)]+_0x1ec7f4(0xc3)});return;}_0x425655['EaArY'](_0x5444b5,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x1f273e,_0x1f150d){const _0x5a9337=_0x195f95,_0x302a6f={'eGrUw':function(_0x48f573,_0x4a4420,_0x39ea43,_0x4c4dc6){return _0x48f573(_0x4a4420,_0x39ea43,_0x4c4dc6);},'KLFXN':function(_0x2cc034,_0xd9ac4f,_0x25ef8d){return _0x2cc034(_0xd9ac4f,_0x25ef8d);}};if(!existsSync(_0x1f273e))return[];const _0x14d9f7=[];try{const _0x4f2f84=await readdir(_0x1f273e,{'withFileTypes':!![]});for(const _0x399f5f of _0x4f2f84){if(_0x399f5f['isDirectory']()){const _0x51418a=_0x302a6f[_0x5a9337(0x94)](join,_0x1f273e,_0x399f5f['name'],_0x5a9337(0xb8));if(existsSync(_0x51418a)){let _0x441fcd=_0x399f5f[_0x5a9337(0xb0)];try{const _0x3112bd=await _0x302a6f[_0x5a9337(0xb6)](readFile,_0x51418a,'utf-8'),_0x3fc2e5=_0x3112bd[_0x5a9337(0xae)](/name:\s*(.+)/);_0x3fc2e5&&(_0x441fcd=_0x3fc2e5[0x1][_0x5a9337(0xa7)]());}catch{}_0x14d9f7['push']({'name':_0x399f5f['name'],'displayName':_0x441fcd,'path':_0x51418a,'level':_0x1f150d});}}}}catch{return[];}return _0x14d9f7;}async function getInstalledSkills(){const _0x35a37c=_0x195f95,_0x2c645e={'cDfiO':function(_0xf7a059,_0xba0fd1,_0xb61c63){return _0xf7a059(_0xba0fd1,_0xb61c63);},'zDpOU':_0x35a37c(0xc9),'ckNed':function(_0x24dc14){return _0x24dc14();}},[_0x2b1d3f,_0x49d639]=await Promise['all']([_0x2c645e[_0x35a37c(0xb5)](getSkillsFromDir,getProjectSkillsDir(),_0x2c645e['zDpOU']),_0x2c645e['cDfiO'](getSkillsFromDir,_0x2c645e['ckNed'](getUserSkillsDir),'user')]);return{'project':_0x2b1d3f,'user':_0x49d639};}async function getEnvironments(){const _0x40246c=_0x195f95,_0x50edf0={'spDBd':function(_0x435d80,_0x80676c){return _0x435d80(_0x80676c);},'pqIby':'settings.json','knONd':function(_0x414f90,_0x51ea6c,_0x4c1d49){return _0x414f90(_0x51ea6c,_0x4c1d49);},'NwTiI':'auth.json','rwVlC':'(not\x20found)','iClKB':function(_0x5ef48b){return _0x5ef48b();}},{envNames:_0x1b840b,activeEnv:_0x54d284}=await _0x50edf0['iClKB'](getEnvNames),_0x411832=getRangerDir();if(!existsSync(_0x411832))return{'envs':[],'activeEnv':null};const _0x56436e=_0x1b840b[_0x40246c(0xba)](_0x33bedf=>{const _0x2cf34f=_0x40246c,_0x215376=_0x50edf0[_0x2cf34f(0x9d)](getEnvDir,_0x33bedf),_0xb62b01=join(_0x215376,_0x50edf0[_0x2cf34f(0x87)]),_0x259da1=_0x50edf0[_0x2cf34f(0x72)](join,_0x215376,_0x50edf0['NwTiI']),_0x10934d=join(_0x215376,'auth.json.enc');return{'name':_0x33bedf,'settingsPath':_0x50edf0['spDBd'](existsSync,_0xb62b01)?_0xb62b01:_0x50edf0['rwVlC'],'hasPlaintextAuth':existsSync(_0x259da1),'hasEncryptedAuth':existsSync(_0x10934d),'isActive':_0x33bedf===_0x54d284};});return{'envs':_0x56436e,'activeEnv':_0x54d284};}function _0x7597(){const _0x570976=['WunsP','No\x20skills\x20installed','Jpkdf','plaintext','\x0a\x20\x20No\x20active\x20profile\x20set','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','enabled','displayName','status','cDJnH','knONd','sbnPM','Version:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]','log','RGdbO','includes','\x0a📊\x20Ranger\x20Status\x0a','vIezM','Organization:\x20','473327eMEzCS','2071412EtfLUu','1357150tMSjIl','\x20\x20Run:\x20ranger\x20skillup','data','hpupf','RdzFe','plugin','opencode','(not\x20found)','path','pqIby','length','469AqHqYO','FOmhv','close','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a---\x20Skills\x20---','bgcHi','user','\x20\x20User-level:','KLFgs','\x1b[1m','not_installed','eGrUw','No\x20profiles\x20configured','string','ignore','DEBUG','LYsym','4329448QoIDOf','\x20\x20\x20\x20Settings:\x20','stderr','spDBd','3709305LwXkcD','stdout','\x1b[0m','CQfxP','toString','success','\x1b]8;;\x07','scope','filter','trim','details','HLZiT','hasPlaintextAuth','\x20\x20Project-level:','RtLzv','\x0a---\x20Profiles\x20---','match','\x20\x20Not\x20installed','name','\x20\x20Run:\x20ranger\x20update','configured','1934337EtAElS','@ranger-testing/opencode-plugin','cDfiO','KLFXN','56268MOTkvi','SKILL.md','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','map','tKsNK','bjnRD','\x20(active)','\x20\x20Not\x20configured','GwbzL','Root:\x20','2eEvSmN','gzTJo','\x20plugin(s)\x20configured','isActive','qQAcZ','JYQhm',':\x20configured','settingsPath','project','API\x20Environment:\x20','config','hasEncryptedAuth','\x0a---\x20OpenCode\x20Plugin\x20---','rKeUu'];_0x7597=function(){return _0x570976;};return _0x7597();}export async function status(){const _0x318c14=_0x195f95,_0x30e77e={'bjnRD':function(_0x23ad29,_0x104a65){return _0x23ad29(_0x104a65);},'wjgMv':function(_0x4f08e6,_0x4bd9ad,_0x4d5b00){return _0x4f08e6(_0x4bd9ad,_0x4d5b00);},'RGdbO':function(_0x84b3ef,_0x3d7fb9){return _0x84b3ef(_0x3d7fb9);},'ukxEN':function(_0x1aed0f,_0x49ced5){return _0x1aed0f!==_0x49ced5;},'RtLzv':function(_0x18e0e4){return _0x18e0e4();},'WunsP':function(_0x1a0a92,_0x3e9282){return _0x1a0a92===_0x3e9282;},'sbnPM':'configured','iZPBS':'@ranger-testing/opencode-plugin','FOmhv':function(_0x47750a,_0x4fa48d){return _0x47750a===_0x4fa48d;},'RdzFe':'not_configured','LYsym':_0x318c14(0x8c),'HLZiT':'ranger@trailhead','VZIqX':_0x318c14(0x6e),'KLFgs':_0x318c14(0xaf),'tKsNK':_0x318c14(0x8d),'CdFfP':function(_0x5d24c3){return _0x5d24c3();},'RoxkH':function(_0x5bf060,_0x36d53b){return _0x5bf060+_0x36d53b;},'cDJnH':_0x318c14(0xd0),'EqtwZ':function(_0x10ad1d,_0x50adae){return _0x10ad1d>_0x50adae;},'GwbzL':function(_0x38bfa5,_0x398a87,_0x3a75d4){return _0x38bfa5(_0x398a87,_0x3a75d4);},'brglD':function(_0x5cff75,_0x4b0fc5){return _0x5cff75(_0x4b0fc5);},'hpupf':function(_0x3a11e5,_0x191c1a,_0x2f93d5){return _0x3a11e5(_0x191c1a,_0x2f93d5);},'jmTzP':function(_0x5518d7){return _0x5518d7();},'iiFUD':_0x318c14(0x95),'ghQUY':_0x318c14(0x6b),'Tczpi':_0x318c14(0x85)};console['log'](_0x318c14(0x79));const _0x4c8b49=process['cwd'](),_0x7a32a8=getRangerDir();if(!_0x30e77e[_0x318c14(0xbc)](existsSync,_0x7a32a8)){console[_0x318c14(0x76)](_0x318c14(0xc0)+_0x30e77e['wjgMv'](link,_0x4c8b49,bold(basename(_0x4c8b49)))),console[_0x318c14(0x76)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x318c14(0xc0)+link(_0x4c8b49,_0x30e77e[_0x318c14(0xbc)](bold,_0x30e77e[_0x318c14(0x77)](basename,_0x4c8b49))));const _0xa050e4=getCurrentVersion(),_0xde048d=getLatestVersion();if(_0xde048d&&_0x30e77e['ukxEN'](_0xde048d,_0xa050e4))console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4+'\x20(latest:\x20'+_0xde048d+')'),console['log'](_0x318c14(0xb1));else _0xde048d?console['log']('Version:\x20'+_0xa050e4+'\x20(up\x20to\x20date)'):console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4);const _0x3ed4f1=await _0x30e77e[_0x318c14(0xac)](getToken);if(_0x3ed4f1){const _0x49f9d1=await getCurrentUser(_0x3ed4f1);_0x49f9d1[_0x318c14(0xa3)]?console['log'](_0x318c14(0x7b)+bold(_0x49f9d1[_0x318c14(0x8f)]['organizationName'])):(console['log'](_0x318c14(0x6d)),console[_0x318c14(0x76)](_0x318c14(0x75)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x318c14(0x75));process['env'][_0x318c14(0x98)]&&(console[_0x318c14(0x76)](_0x318c14(0xca)+getCurrentEnvironment()),console[_0x318c14(0x76)]('API\x20URL:\x20'+_0x30e77e['RtLzv'](getApiBaseUrl)));console[_0x318c14(0x76)](_0x318c14(0xcd));const _0x23cb27=await getOpencodePluginStatus();if(_0x30e77e[_0x318c14(0xcf)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x73)]))console['log']('\x20\x20'+_0x30e77e['RGdbO'](bold,_0x30e77e['iZPBS'])+_0x318c14(0xc7)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]);else _0x30e77e[_0x318c14(0x8a)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x82)])?(console['log'](_0x318c14(0xbe)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]),console[_0x318c14(0x76)](_0x30e77e[_0x318c14(0x99)])):console[_0x318c14(0x76)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x344f43=await getPluginInfo(_0x30e77e[_0x318c14(0xa9)]);if(_0x344f43){const _0x5342c9=_0x344f43[_0x318c14(0xa5)]||'unknown',_0x264579=_0x344f43['enabled']?_0x30e77e['VZIqX']:'disabled';console[_0x318c14(0x76)]('\x20\x20'+bold('ranger@trailhead')+':\x20installed\x20('+_0x5342c9+',\x20'+_0x264579+')');}else console['log'](_0x30e77e[_0x318c14(0x91)]),console[_0x318c14(0x76)](_0x318c14(0xb9));console['log'](_0x30e77e[_0x318c14(0xbb)]);const {project:_0x5ae53f,user:_0x548968}=await _0x30e77e['CdFfP'](getInstalledSkills),_0x92028e=_0x5ae53f['filter'](_0x1eada6=>RANGER_MANAGED_SKILLS[_0x318c14(0x78)](_0x1eada6['name'])),_0x3bb24=_0x548968[_0x318c14(0xa6)](_0x1c2641=>RANGER_MANAGED_SKILLS['includes'](_0x1c2641['name'])),_0xb94201=_0x30e77e['RoxkH'](_0x92028e[_0x318c14(0x88)],_0x3bb24[_0x318c14(0x88)]);if(_0xb94201===0x0)console['log'](_0x30e77e[_0x318c14(0x71)]),console['log'](_0x318c14(0x7f));else{if(_0x30e77e['EqtwZ'](_0x92028e[_0x318c14(0x88)],0x0)){console['log'](_0x318c14(0xab));for(const _0x5ddbb3 of _0x92028e){console['log']('\x20\x20\x20\x20'+bold(_0x5ddbb3['displayName'])+':\x20'+_0x30e77e[_0x318c14(0xbf)](link,_0x5ddbb3[_0x318c14(0x86)],_0x30e77e['brglD'](basename,_0x5ddbb3[_0x318c14(0x86)])));}}if(_0x3bb24['length']>0x0){console[_0x318c14(0x76)](_0x318c14(0x90));for(const _0x2da03c of _0x3bb24){console['log']('\x20\x20\x20\x20'+bold(_0x2da03c[_0x318c14(0x6f)])+':\x20'+_0x30e77e[_0x318c14(0x81)](link,_0x2da03c[_0x318c14(0x86)],_0x30e77e[_0x318c14(0xbc)](basename,_0x2da03c['path'])));}}}console['log'](_0x318c14(0xad));const {envs:_0x4b049f,activeEnv:_0x358a7a}=await _0x30e77e['jmTzP'](getEnvironments);if(_0x30e77e['FOmhv'](_0x4b049f[_0x318c14(0x88)],0x0))console[_0x318c14(0x76)](_0x30e77e['iiFUD']),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x4ed885 of _0x4b049f){const _0x2e959a=_0x4ed885[_0x318c14(0xc4)]?_0x318c14(0xbd):'',_0x256d30=_0x4ed885[_0x318c14(0xcc)]?'encrypted':_0x4ed885[_0x318c14(0xaa)]?_0x30e77e['ghQUY']:'none';console[_0x318c14(0x76)]('\x20\x20'+bold(_0x4ed885['name'])+_0x2e959a),console[_0x318c14(0x76)]('\x20\x20\x20\x20Auth:\x20'+_0x256d30),_0x4ed885[_0x318c14(0xc8)]!==_0x30e77e['Tczpi']&&console['log'](_0x318c14(0x9b)+_0x30e77e['wjgMv'](link,_0x4ed885[_0x318c14(0xc8)],_0x30e77e[_0x318c14(0x77)](basename,_0x4ed885[_0x318c14(0xc8)])));}!_0x358a7a&&(console['log'](_0x318c14(0x6c)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x4b049f['map'](_0xe9afc0=>_0xe9afc0[_0x318c14(0xb0)])['join'](',\x20')+')'));}console[_0x318c14(0x76)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x630823,_0x59c860){const _0x436602=_0x5343,_0x18764f=_0x630823();while(!![]){try{const _0x59417b=parseInt(_0x436602(0x20c))/0x1+parseInt(_0x436602(0x213))/0x2+-parseInt(_0x436602(0x220))/0x3*(parseInt(_0x436602(0x219))/0x4)+parseInt(_0x436602(0x200))/0x5+-parseInt(_0x436602(0x224))/0x6*(parseInt(_0x436602(0x1f6))/0x7)+-parseInt(_0x436602(0x20e))/0x8+parseInt(_0x436602(0x207))/0x9;if(_0x59417b===_0x59c860)break;else _0x18764f['push'](_0x18764f['shift']());}catch(_0x272f35){_0x18764f['push'](_0x18764f['shift']());}}}(_0x5470,0x95974));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x1f68b3=_0x5343,_0x594d5f={'dVJpS':function(_0x3fe68f,_0x561658){return _0x3fe68f(_0x561658);},'PSYwW':function(_0x895a04,_0xfc515b){return _0x895a04(_0xfc515b);},'dqwQD':'npm','vcXxb':function(_0x33cf18,_0x1ee78b){return _0x33cf18===_0x1ee78b;},'LbFHL':_0x1f68b3(0x1f2),'GFXRE':_0x1f68b3(0x1fd)};return new Promise(_0x11f2ec=>{const _0x2cedc5=_0x1f68b3,_0x3e4bcc={'kdYut':function(_0x5341ba,_0x48646a){const _0x1f5427=_0x5343;return _0x594d5f[_0x1f5427(0x226)](_0x5341ba,_0x48646a);}};console[_0x2cedc5(0x1fa)](_0x2cedc5(0x1fc)+PACKAGE_NAME+_0x2cedc5(0x229));const _0x3bfcf4=spawn(_0x594d5f['dqwQD'],[_0x2cedc5(0x208),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x2cedc5(0x20d),'shell':_0x594d5f['vcXxb'](process['platform'],_0x594d5f[_0x2cedc5(0x225)])});_0x3bfcf4['on'](_0x594d5f[_0x2cedc5(0x1f8)],_0x2decd1=>{_0x594d5f['dVJpS'](_0x11f2ec,_0x2decd1===0x0);}),_0x3bfcf4['on']('error',()=>{_0x3e4bcc['kdYut'](_0x11f2ec,![]);});});}async function updateClaudeMarketplace(){const _0x341961=_0x5343,_0x500041={'ZWOIa':function(_0x17ed9c,_0x1fa3f9,_0x2d57d6,_0x3f69d0){return _0x17ed9c(_0x1fa3f9,_0x2d57d6,_0x3f69d0);},'xWzby':_0x341961(0x1f0),'AlncW':_0x341961(0x228),'cLAdQ':'win32','IVZIe':_0x341961(0x1fd)};return new Promise(_0x5862e8=>{const _0x64d47a=_0x341961,_0x273611={'ZoamE':function(_0x5d85f9,_0x43585a){return _0x5d85f9(_0x43585a);},'BIwFA':function(_0x5e21ae,_0x549ad2){return _0x5e21ae===_0x549ad2;},'nTsqc':function(_0x143fe8,_0x180a3f){return _0x143fe8(_0x180a3f);}},_0x355ddc=_0x500041['ZWOIa'](spawn,'claude',[_0x64d47a(0x21c),_0x500041['xWzby'],_0x500041[_0x64d47a(0x1f9)],_0x64d47a(0x202)],{'stdio':'pipe','shell':process['platform']===_0x500041['cLAdQ']});_0x355ddc['on'](_0x500041[_0x64d47a(0x211)],_0x1a85ac=>{const _0x6b81c1=_0x64d47a;_0x273611['ZoamE'](_0x5862e8,_0x273611[_0x6b81c1(0x1f3)](_0x1a85ac,0x0));}),_0x355ddc['on']('error',()=>{_0x273611['nTsqc'](_0x5862e8,![]);});});}async function updateClaudePlugin(_0x39c2ba){const _0x386d91=_0x5343,_0x2f762c={'lfRyo':function(_0x2bf4ef,_0x31b01e){return _0x2bf4ef===_0x31b01e;},'mUghA':_0x386d91(0x21c),'HhfMF':function(_0x5025bf,_0xfa1f74,_0x3e7bbb,_0x58fe71){return _0x5025bf(_0xfa1f74,_0x3e7bbb,_0x58fe71);},'iOEdG':'claude','lDzSy':'pipe','wOoQp':_0x386d91(0x1fd)};return new Promise(_0x18092e=>{const _0x5158a0=_0x386d91,_0x1b9acc={'GRnbO':function(_0x57b3a0,_0x5d4804){return _0x57b3a0(_0x5d4804);}},_0x193be1=[_0x2f762c[_0x5158a0(0x1fb)],'update',_0x5158a0(0x1ff)];_0x39c2ba&&_0x193be1['push']('--scope',_0x39c2ba);const _0x500bea=_0x2f762c[_0x5158a0(0x21d)](spawn,_0x2f762c[_0x5158a0(0x21a)],_0x193be1,{'stdio':_0x2f762c['lDzSy'],'shell':_0x2f762c[_0x5158a0(0x223)](process['platform'],'win32')});_0x500bea['on'](_0x2f762c[_0x5158a0(0x209)],_0x121215=>{_0x18092e(_0x2f762c['lfRyo'](_0x121215,0x0));}),_0x500bea['on']('error',()=>{_0x1b9acc['GRnbO'](_0x18092e,![]);});});}function _0x5470(){const _0x5d0471=['BwbHG','gDlrB','marketplace','warn','win32','BIwFA','\x20skill\x20','join','679cXCEvY','push','GFXRE','AlncW','log','mUghA','\x0aInstalling\x20','close','qxfuM','ranger@trailhead','5606870XwLJae','\x20\x20Failed\x20to\x20reinstall\x20','trailhead','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','WnNDQ','SoEur','Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20','5564817gwaeUk','install','wOoQp','splice','pgQUI','121850aeuUHg','inherit','745952eickFm','lNMBt','trim','IVZIe','Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','520050oHEOne','iEDwO','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','\x0aSuccessfully\x20updated\x20to\x20version\x20','findIndex','YaCmU','4lzBnES','iOEdG','✓\x20Migrated\x20active\x20profile\x20file','plugin','HhfMF','opencode','.gitignore','3634809Vkimnt','KmgTM','claude','lfRyo','12618TsOPaF','LbFHL','PSYwW','pOayp','update','@latest...\x0a','length'];_0x5470=function(){return _0x5d0471;};return _0x5470();}function isSkillInstalled(_0x233034,_0x19d6c2,_0x33b7b2){const _0x9d4a1f=_0x5343,_0x30cdd7={'pgQUI':function(_0x29caa7,_0x3b41e4){return _0x29caa7(_0x3b41e4);},'WnNDQ':function(_0x37caa0,_0x16ba76,_0x26c608){return _0x37caa0(_0x16ba76,_0x26c608);}},_0x5c4c53=_0x33b7b2===_0x9d4a1f(0x21e)?getOpencodeSkillsDir(_0x19d6c2):_0x30cdd7[_0x9d4a1f(0x20b)](getSkillsDir,_0x19d6c2),_0x3f1e42=_0x30cdd7[_0x9d4a1f(0x204)](join,_0x5c4c53,_0x233034);return _0x30cdd7['pgQUI'](existsSync,_0x3f1e42);}async function reinstallSkills(_0x12a970){const _0x2dafcf=_0x5343,_0x28efda={'QqQgi':function(_0x5bcbff,_0x366123,_0x34655b,_0x3a5607){return _0x5bcbff(_0x366123,_0x34655b,_0x3a5607);},'RNfhf':_0x2dafcf(0x21e),'uzNmc':function(_0x416288,_0x235f81,_0x19d08b){return _0x416288(_0x235f81,_0x19d08b);},'jzuyx':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x5b9a5d=['project','user'],_0x4259d4=[];for(const _0x4c943d of _0x5b9a5d){for(const _0x4a228c of RANGER_MANAGED_SKILLS){_0x28efda['QqQgi'](isSkillInstalled,_0x4a228c,_0x4c943d,_0x2dafcf(0x222))&&_0x4259d4[_0x2dafcf(0x1f7)]({'skillName':_0x4a228c,'level':_0x4c943d,'platform':'claude'}),isSkillInstalled(_0x4a228c,_0x4c943d,_0x28efda['RNfhf'])&&_0x4259d4[_0x2dafcf(0x1f7)]({'skillName':_0x4a228c,'level':_0x4c943d,'platform':_0x28efda['RNfhf']});}}for(const _0x237341 of _0x5b9a5d){for(const _0x36e883 of DEPRECATED_SKILLS){await _0x28efda['uzNmc'](removeSkill,_0x36e883,_0x237341);}}if(_0x4259d4['length']===0x0){console['log'](_0x28efda['jzuyx']);return;}console[_0x2dafcf(0x1fa)]('\x0aReinstalling\x20'+_0x4259d4['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x3c44ae,level:_0x6f42e8,platform:_0x3d1389}of _0x4259d4){try{await installSkill(_0x3c44ae,{'level':_0x6f42e8,'cliVersion':_0x12a970,'platform':_0x3d1389});}catch(_0x5a9cbc){console[_0x2dafcf(0x1f1)](_0x2dafcf(0x201)+_0x3d1389+'\x20'+_0x6f42e8+_0x2dafcf(0x1f4)+_0x3c44ae+':',_0x5a9cbc);}}}async function ensureActiveProfileGitignored(){const _0x1c4cfe=_0x5343,_0x3e127c={'mmOBF':_0x1c4cfe(0x21f),'SoEur':function(_0x55585a,_0x52f83d,_0x414e78){return _0x55585a(_0x52f83d,_0x414e78);},'YaCmU':'utf-8','WZXke':'active-profile.txt'},_0x47ed2=join(getRangerDir(),_0x3e127c['mmOBF']);if(!existsSync(_0x47ed2))return![];let _0x5501b8='';try{_0x5501b8=await _0x3e127c[_0x1c4cfe(0x205)](readFile,_0x47ed2,_0x3e127c[_0x1c4cfe(0x218)]);}catch{return![];}const _0x585109=_0x5501b8['split'](/\r?\n/);if(_0x585109['some'](_0x4b8560=>_0x4b8560[_0x1c4cfe(0x210)]()==='active-profile.txt'))return![];let _0x262c8d=_0x585109[_0x1c4cfe(0x217)](_0x45799a=>_0x45799a['trim']()==='active-feature.txt');_0x262c8d===-0x1&&(_0x262c8d=_0x585109[_0x1c4cfe(0x1ed)]);_0x585109[_0x1c4cfe(0x20a)](_0x262c8d,0x0,_0x3e127c['WZXke']);let _0x13fa48=_0x585109[_0x1c4cfe(0x1f5)]('\x0a');!_0x13fa48['endsWith']('\x0a')&&(_0x13fa48+='\x0a');try{await writeFile(_0x47ed2,_0x13fa48,'utf-8');}catch{return![];}return!![];}function _0x5343(_0x481817,_0x40fba8){_0x481817=_0x481817-0x1ed;const _0x547005=_0x5470();let _0x37a7ce=_0x547005[_0x481817];return _0x37a7ce;}export async function update(){const _0x2cd0a1=_0x5343,_0x47e238={'uFfIv':function(_0x1aa0e8){return _0x1aa0e8();},'qxfuM':'Checking\x20for\x20updates...','pOayp':function(_0x1663fc){return _0x1663fc();},'iEDwO':function(_0x273722,_0x4b3281,_0x1ecbe1){return _0x273722(_0x4b3281,_0x1ecbe1);},'CzLRt':function(_0x1b1ae7,_0x80ebac){return _0x1b1ae7<_0x80ebac;},'BwbHG':function(_0x4be467){return _0x4be467();},'KmgTM':function(_0x3bba06,_0x54634d){return _0x3bba06(_0x54634d);},'lNMBt':function(_0x42b1b2,_0xf013d7){return _0x42b1b2(_0xf013d7);},'gDlrB':'project','wYotE':_0x2cd0a1(0x21b),'bfTHJ':'\x0a✅\x20Update\x20complete!'},_0xa8f79c=_0x47e238['uFfIv'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0xa8f79c),console['log'](_0x47e238[_0x2cd0a1(0x1fe)]);const _0x3d284f=_0x47e238[_0x2cd0a1(0x227)](getLatestVersion);if(!_0x3d284f)throw new Error(_0x2cd0a1(0x212));console['log']('Latest\x20version:\x20\x20'+_0x3d284f);const _0xf928dc=_0x47e238[_0x2cd0a1(0x214)](compareVersions,_0xa8f79c,_0x3d284f);let _0x547408=_0xa8f79c;if(_0xf928dc===0x0)console[_0x2cd0a1(0x1fa)](_0x2cd0a1(0x215));else{if(_0x47e238['CzLRt'](_0xf928dc,0x0))console[_0x2cd0a1(0x1fa)]('\x0aYour\x20version\x20('+_0xa8f79c+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3d284f+').');else{const _0x333ea5=await _0x47e238[_0x2cd0a1(0x1ee)](runInstall);if(_0x333ea5)console[_0x2cd0a1(0x1fa)](_0x2cd0a1(0x216)+_0x3d284f),_0x547408=_0x3d284f;else throw new Error(_0x2cd0a1(0x206)+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x547408);const _0x4ff129=await _0x47e238[_0x2cd0a1(0x221)](isMarketplaceAdded,_0x2cd0a1(0x202)),_0x125c89=await _0x47e238['lNMBt'](isPluginInstalled,'ranger@trailhead');if(_0x4ff129){const _0x50a2e0=await updateClaudeMarketplace();_0x50a2e0&&console[_0x2cd0a1(0x1fa)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x125c89){const _0x5034e6=await updateClaudePlugin();_0x5034e6&&console[_0x2cd0a1(0x1fa)](_0x2cd0a1(0x203));const _0x5810d2=await _0x47e238[_0x2cd0a1(0x20f)](updateClaudePlugin,_0x47e238[_0x2cd0a1(0x1ef)]);_0x5810d2&&console['log']((_0x5034e6?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x27dbd7=await migrateActiveProfileFile();_0x27dbd7&&console[_0x2cd0a1(0x1fa)](_0x47e238['wYotE']);const _0x26c040=await ensureActiveProfileGitignored();console['log'](_0x47e238['bfTHJ']);}
|
|
1
|
+
(function(_0x438247,_0x3fed15){const _0x515abc=_0x225c,_0x2c76e6=_0x438247();while(!![]){try{const _0x480a1a=-parseInt(_0x515abc(0x16a))/0x1*(parseInt(_0x515abc(0x15a))/0x2)+-parseInt(_0x515abc(0x152))/0x3*(parseInt(_0x515abc(0x159))/0x4)+parseInt(_0x515abc(0x165))/0x5+-parseInt(_0x515abc(0x14a))/0x6*(parseInt(_0x515abc(0x14b))/0x7)+parseInt(_0x515abc(0x157))/0x8+-parseInt(_0x515abc(0x154))/0x9*(parseInt(_0x515abc(0x14d))/0xa)+-parseInt(_0x515abc(0x16d))/0xb*(-parseInt(_0x515abc(0x162))/0xc);if(_0x480a1a===_0x3fed15)break;else _0x2c76e6['push'](_0x2c76e6['shift']());}catch(_0x5799ac){_0x2c76e6['push'](_0x2c76e6['shift']());}}}(_0xeafd,0xe487f));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0xeafd(){const _0x153c58=['ranger@trailhead',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','159066lXbdpn','7TAylFt','Latest\x20version:\x20\x20','74090jyjsdD','push','log','close','trim','926910qzmPms','error','1881VrmYxY','\x20\x20Failed\x20to\x20reinstall\x20','Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','5285704xEPkWa','\x0a✅\x20Update\x20complete!','20ogUrVR','178gGkURR','win32','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','pNvlf','NdlTi','fPcTJ','update','--scope','516peHyTo','QDyZK','endsWith','2295535pCQkBq','opencode','.gitignore','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','inherit','14734JnMjwA','ATzJn','npm','1086547WAXAHQ','claude','NVMPh','active-feature.txt','platform','bKeyM','install','hEFcB','Claude\x20plugin\x20updated\x20(project\x20scope).','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','CsSBj','length','plugin','IEbaD','project','split','NAKPk','GQpAz','LoUMr','trailhead','warn','EEBWt','LkKxH','\x0aInstalling\x20','✓\x20Migrated\x20active\x20profile\x20file'];_0xeafd=function(){return _0x153c58;};return _0xeafd();}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';function _0x225c(_0x28c1da,_0x10f703){_0x28c1da=_0x28c1da-0x139;const _0xeafd2d=_0xeafd();let _0x225ccc=_0xeafd2d[_0x28c1da];return _0x225ccc;}import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x4fa571=_0x225c,_0x108b8f={'gvtTx':function(_0x5aa96b,_0x3dbc92){return _0x5aa96b(_0x3dbc92);},'YIqHK':_0x4fa571(0x16c),'rmhWV':_0x4fa571(0x169),'NdlTi':'error'};return new Promise(_0x38ea48=>{const _0x30fe97=_0x4fa571,_0x478238={'bKzuW':function(_0x2b597e,_0x1ab84c){return _0x108b8f['gvtTx'](_0x2b597e,_0x1ab84c);}};console['log'](_0x30fe97(0x146)+PACKAGE_NAME+'@latest...\x0a');const _0x147395=spawn(_0x108b8f['YIqHK'],[_0x30fe97(0x173),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x108b8f['rmhWV'],'shell':process['platform']===_0x30fe97(0x15b)});_0x147395['on'](_0x30fe97(0x150),_0x34604d=>{_0x38ea48(_0x34604d===0x0);}),_0x147395['on'](_0x108b8f[_0x30fe97(0x15e)],()=>{_0x478238['bKzuW'](_0x38ea48,![]);});});}async function updateClaudeMarketplace(){const _0x1b507f=_0x225c,_0x5cdb2d={'EEBWt':function(_0x3e1d1e,_0x4e042d){return _0x3e1d1e(_0x4e042d);},'NVMPh':'claude','rclJl':_0x1b507f(0x142),'jzSQa':function(_0x4278fe,_0x520834){return _0x4278fe===_0x520834;},'JtVJk':'win32','LUvDb':'error'};return new Promise(_0xcf8fd6=>{const _0x476d29=_0x1b507f,_0x1ab02d={'QDyZK':function(_0xf9d413,_0x40d829){const _0x25b7fd=_0x225c;return _0x5cdb2d[_0x25b7fd(0x144)](_0xf9d413,_0x40d829);}},_0x27f30f=spawn(_0x5cdb2d[_0x476d29(0x16f)],[_0x476d29(0x13b),'marketplace',_0x476d29(0x160),_0x5cdb2d['rclJl']],{'stdio':'pipe','shell':_0x5cdb2d['jzSQa'](process['platform'],_0x5cdb2d['JtVJk'])});_0x27f30f['on']('close',_0x17f0fc=>{const _0x1c29e4=_0x476d29;_0x1ab02d[_0x1c29e4(0x163)](_0xcf8fd6,_0x17f0fc===0x0);}),_0x27f30f['on'](_0x5cdb2d['LUvDb'],()=>{_0xcf8fd6(![]);});});}async function updateClaudePlugin(_0x2ce002){const _0x57801a=_0x225c,_0x368c95={'REevZ':'pipe','TrLKI':function(_0x3370fb,_0x2f985b){return _0x3370fb===_0x2f985b;},'MiBkb':_0x57801a(0x153)};return new Promise(_0x40a3f3=>{const _0x3a7c5e=_0x57801a,_0x1790e0=['plugin',_0x3a7c5e(0x160),_0x3a7c5e(0x148)];_0x2ce002&&_0x1790e0[_0x3a7c5e(0x14e)](_0x3a7c5e(0x161),_0x2ce002);const _0x49779b=spawn(_0x3a7c5e(0x16e),_0x1790e0,{'stdio':_0x368c95['REevZ'],'shell':_0x368c95['TrLKI'](process[_0x3a7c5e(0x171)],_0x3a7c5e(0x15b))});_0x49779b['on'](_0x3a7c5e(0x150),_0x1d1eff=>{_0x40a3f3(_0x1d1eff===0x0);}),_0x49779b['on'](_0x368c95['MiBkb'],()=>{_0x40a3f3(![]);});});}function isSkillInstalled(_0x2c2338,_0xd9db97,_0x448763){const _0x5246bc=_0x225c,_0x10c442={'fPcTJ':function(_0x3869bb,_0x429707){return _0x3869bb===_0x429707;},'CeKZy':_0x5246bc(0x166),'NAKPk':function(_0xefb4a4,_0x337199){return _0xefb4a4(_0x337199);},'fGBfB':function(_0xc27475,_0x549534){return _0xc27475(_0x549534);}},_0x207cc1=_0x10c442[_0x5246bc(0x15f)](_0x448763,_0x10c442['CeKZy'])?getOpencodeSkillsDir(_0xd9db97):_0x10c442[_0x5246bc(0x13f)](getSkillsDir,_0xd9db97),_0x20c6c3=join(_0x207cc1,_0x2c2338);return _0x10c442['fGBfB'](existsSync,_0x20c6c3);}async function reinstallSkills(_0x4eb536){const _0x20cf66=_0x225c,_0x1e4fa1={'IEbaD':_0x20cf66(0x16e),'mwbSG':'opencode','hlTcp':function(_0x30443a,_0x294610,_0x1a4838){return _0x30443a(_0x294610,_0x1a4838);},'GQpAz':_0x20cf66(0x176),'CsSBj':function(_0x5b6bb0,_0x40fe1a,_0x2a3918){return _0x5b6bb0(_0x40fe1a,_0x2a3918);}},_0x4fa88c=[_0x20cf66(0x13d),'user'],_0x39abd1=[];for(const _0x550bd8 of _0x4fa88c){for(const _0x37466b of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1[_0x20cf66(0x13c)])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1[_0x20cf66(0x13c)]}),isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1['mwbSG'])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1['mwbSG']});}}for(const _0x5ad43e of _0x4fa88c){for(const _0x22ba99 of DEPRECATED_SKILLS){await _0x1e4fa1['hlTcp'](removeSkill,_0x22ba99,_0x5ad43e);}}if(_0x39abd1[_0x20cf66(0x13a)]===0x0){console[_0x20cf66(0x14f)](_0x1e4fa1[_0x20cf66(0x140)]);return;}console['log']('\x0aReinstalling\x20'+_0x39abd1[_0x20cf66(0x13a)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x307ed5,level:_0x5b99c5,platform:_0x42c251}of _0x39abd1){try{await _0x1e4fa1[_0x20cf66(0x139)](installSkill,_0x307ed5,{'level':_0x5b99c5,'cliVersion':_0x4eb536,'platform':_0x42c251});}catch(_0x3f65d1){console[_0x20cf66(0x143)](_0x20cf66(0x155)+_0x42c251+'\x20'+_0x5b99c5+'\x20skill\x20'+_0x307ed5+':',_0x3f65d1);}}}async function ensureActiveProfileGitignored(){const _0x2d09ec=_0x225c,_0x1cb4f9={'LoUMr':function(_0x4366ea,_0x51be38){return _0x4366ea(_0x51be38);},'mdSwQ':function(_0x5bdc6c,_0x49a87f,_0xea4bbd){return _0x5bdc6c(_0x49a87f,_0xea4bbd);},'bKeyM':'utf-8','NrfGJ':function(_0x53fefb,_0x318f36){return _0x53fefb===_0x318f36;},'ayspM':'active-profile.txt'},_0x24131c=join(getRangerDir(),_0x2d09ec(0x167));if(!_0x1cb4f9[_0x2d09ec(0x141)](existsSync,_0x24131c))return![];let _0x5b21ed='';try{_0x5b21ed=await _0x1cb4f9['mdSwQ'](readFile,_0x24131c,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}const _0x3a4e27=_0x5b21ed[_0x2d09ec(0x13e)](/\r?\n/);if(_0x3a4e27['some'](_0xafc259=>_0xafc259[_0x2d09ec(0x151)]()==='active-profile.txt'))return![];let _0x256808=_0x3a4e27['findIndex'](_0x3fb59b=>_0x3fb59b[_0x2d09ec(0x151)]()===_0x2d09ec(0x170));_0x1cb4f9['NrfGJ'](_0x256808,-0x1)&&(_0x256808=_0x3a4e27['length']);_0x3a4e27['splice'](_0x256808,0x0,_0x1cb4f9['ayspM']);let _0x24a129=_0x3a4e27['join']('\x0a');!_0x24a129[_0x2d09ec(0x164)]('\x0a')&&(_0x24a129+='\x0a');try{await writeFile(_0x24131c,_0x24a129,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}return!![];}export async function update(){const _0x494c39=_0x225c,_0x536db6={'ATzJn':'Checking\x20for\x20updates...','pNvlf':function(_0x508ab4){return _0x508ab4();},'vtwuq':function(_0x3fb7c2,_0x4b7ca0,_0x5839a2){return _0x3fb7c2(_0x4b7ca0,_0x5839a2);},'SAYfu':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','JuIIQ':function(_0x2728c7,_0x14b36b){return _0x2728c7<_0x14b36b;},'LkKxH':function(_0x4f8799){return _0x4f8799();},'hEFcB':function(_0x14f960,_0xe6a52a){return _0x14f960(_0xe6a52a);},'RIuVn':_0x494c39(0x13d)},_0x46f69c=getCurrentVersion();console[_0x494c39(0x14f)]('\x0aCurrent\x20version:\x20'+_0x46f69c),console['log'](_0x536db6[_0x494c39(0x16b)]);const _0x11806d=_0x536db6['pNvlf'](getLatestVersion);if(!_0x11806d)throw new Error(_0x494c39(0x156));console['log'](_0x494c39(0x14c)+_0x11806d);const _0x5713f4=_0x536db6['vtwuq'](compareVersions,_0x46f69c,_0x11806d);let _0x18ed6f=_0x46f69c;if(_0x5713f4===0x0)console[_0x494c39(0x14f)](_0x536db6['SAYfu']);else{if(_0x536db6['JuIIQ'](_0x5713f4,0x0))console['log']('\x0aYour\x20version\x20('+_0x46f69c+_0x494c39(0x149)+_0x11806d+').');else{const _0x2c3ba9=await _0x536db6[_0x494c39(0x145)](runInstall);if(_0x2c3ba9)console[_0x494c39(0x14f)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x11806d),_0x18ed6f=_0x11806d;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+'@latest');}}await _0x536db6['hEFcB'](reinstallSkills,_0x18ed6f);const _0x8f184c=await isMarketplaceAdded('trailhead'),_0x43e760=await isPluginInstalled(_0x494c39(0x148));if(_0x8f184c){const _0x30b6a7=await updateClaudeMarketplace();_0x30b6a7&&console[_0x494c39(0x14f)](_0x494c39(0x15c));}if(_0x43e760){const _0x2d1e8c=await _0x536db6[_0x494c39(0x15d)](updateClaudePlugin);_0x2d1e8c&&console[_0x494c39(0x14f)](_0x494c39(0x168));const _0x559c43=await _0x536db6[_0x494c39(0x174)](updateClaudePlugin,_0x536db6['RIuVn']);_0x559c43&&console[_0x494c39(0x14f)]((_0x2d1e8c?'':'\x0a')+_0x494c39(0x175));}const _0x8c312=await _0x536db6['pNvlf'](migrateActiveProfileFile);_0x8c312&&console['log'](_0x494c39(0x147));const _0x19d278=await ensureActiveProfileGitignored();console[_0x494c39(0x14f)](_0x494c39(0x158));}
|