@ranger-testing/ranger-cli 2.5.4-alpha.5f9facb-17 → 2.5.4-alpha.816b7e2-24
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/deleteProfile.js +1 -0
- 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/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.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/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.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/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.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/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.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/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50c267,_0x1ed54d){const _0x236b80=_0x3b62,_0x44318b=_0x50c267();while(!![]){try{const _0x3cd34a=-parseInt(_0x236b80(0xd9))/0x1*(-parseInt(_0x236b80(0xd0))/0x2)+parseInt(_0x236b80(0xdf))/0x3*(-parseInt(_0x236b80(0xcf))/0x4)+-parseInt(_0x236b80(0xc8))/0x5+parseInt(_0x236b80(0xc6))/0x6+-parseInt(_0x236b80(0xd3))/0x7+parseInt(_0x236b80(0xd6))/0x8+parseInt(_0x236b80(0xce))/0x9;if(_0x3cd34a===_0x1ed54d)break;else _0x44318b['push'](_0x44318b['shift']());}catch(_0x427639){_0x44318b['push'](_0x44318b['shift']());}}}(_0x5198,0xb2f5a));import{join}from'path';function _0x3b62(_0xd27396,_0x4d9a8f){_0xd27396=_0xd27396-0xc5;const _0x5198f1=_0x5198();let _0x3b626b=_0x5198f1[_0xd27396];return _0x3b626b;}function _0x5198(){const _0x45d379=['plugin','6809430YTlSzq','project','YtoAd','$schema','Failed\x20to\x20read\x20opencode.json','isArray','582813fueUQl','8324juPmWt','38SwbzNU','McDAB','NtnAu','516579kgveZV','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','11311544HLVmsT','prompt','@ranger-testing/opencode-plugin','46310OJgqud','pvcOG','log','MSLRp','nLQgU','Project\x20(shared\x20with\x20team\x20via\x20git)','1737rcCtTR','MFNNh','pHSwl','https://opencode.ai/config.json','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','user','6090060kijauw'];_0x5198=function(){return _0x45d379;};return _0x5198();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0xfe76f4 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x4d88d2){const _0x57116e=_0x3b62,_0xc1a5e6={'pHSwl':function(_0x2336dd,_0x28621b,_0x597138){return _0x2336dd(_0x28621b,_0x597138);},'dIQQb':'opencode.json','qxXfd':'\x0a📦\x20OpenCode\x20Plugin\x0a','pvcOG':'list','MFNNh':'pluginScope','nLQgU':'user','NtnAu':function(_0xe2b3b3,_0x26e8c7){return _0xe2b3b3(_0x26e8c7);},'GxzWG':_0x57116e(0xd8),'XMpIS':_0x57116e(0xe2),'YtoAd':'utf-8','dUGVQ':_0x57116e(0xe3),'MSLRp':_0x57116e(0xcc),'kukOf':'✓\x20OpenCode\x20plugin\x20already\x20configured','McDAB':'✓\x20OpenCode\x20plugin\x20configured'},_0x462b8d=existsSync(_0xc1a5e6[_0x57116e(0xe1)](join,getOpencodeConfigDir('project'),_0xc1a5e6['dIQQb']));let _0xab44b9;if(_0x4d88d2)_0xab44b9=_0x4d88d2;else{if(_0x462b8d)_0xab44b9=_0x57116e(0xc9);else{console['log'](_0xc1a5e6['qxXfd']);const _0x366a61=await _0xfe76f4[_0x57116e(0xd7)]([{'type':_0xc1a5e6[_0x57116e(0xda)],'name':_0xc1a5e6[_0x57116e(0xe0)],'message':_0x57116e(0xd5),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0xc1a5e6[_0x57116e(0xdd)]},{'name':_0x57116e(0xde),'value':'project'}],'default':_0x57116e(0xc5)}]);_0xab44b9=_0x366a61['pluginScope'];}}const _0x504865=join(_0xc1a5e6[_0x57116e(0xd2)](getOpencodeConfigDir,_0xab44b9),'opencode.json'),_0x4301b5=_0xc1a5e6['GxzWG'],_0x3e9dd9=_0xc1a5e6['XMpIS'];let _0x1097c8={};if(existsSync(_0x504865))try{const _0x380a95=await readFile(_0x504865,_0xc1a5e6[_0x57116e(0xca)]);_0x1097c8=JSON[_0x57116e(0xd4)](_0x380a95);}catch(_0x26835b){return console['error'](_0xc1a5e6['dUGVQ']),{'configured':![],'scope':_0xab44b9,'error':_0xc1a5e6[_0x57116e(0xdc)],'details':_0x26835b};}const _0x19cf6f=Array[_0x57116e(0xcd)](_0x1097c8['plugin'])?_0x1097c8[_0x57116e(0xc7)]:[];if(_0x19cf6f['includes'](_0x4301b5))return console[_0x57116e(0xdb)](_0xc1a5e6['kukOf']),{'configured':![],'scope':_0xab44b9};return _0x1097c8[_0x57116e(0xcb)]=_0x1097c8[_0x57116e(0xcb)]||_0x3e9dd9,_0x1097c8[_0x57116e(0xc7)]=[..._0x19cf6f,_0x4301b5],await mkdir(getOpencodeConfigDir(_0xab44b9),{'recursive':!![]}),await _0xc1a5e6[_0x57116e(0xe1)](writeFile,_0x504865,JSON['stringify'](_0x1097c8,null,0x2)+'\x0a'),console[_0x57116e(0xdb)](_0xc1a5e6[_0x57116e(0xd1)]),{'configured':!![],'scope':_0xab44b9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x46e7d0,_0x39e9ef){var _0x12aac4=_0x31b3,_0x4026c2=_0x46e7d0();while(!![]){try{var _0x43324d=parseInt(_0x12aac4(0x1b3))/0x1+parseInt(_0x12aac4(0x1b5))/0x2*(parseInt(_0x12aac4(0x1b4))/0x3)+-parseInt(_0x12aac4(0x1ba))/0x4*(parseInt(_0x12aac4(0x1bd))/0x5)+-parseInt(_0x12aac4(0x1b2))/0x6*(-parseInt(_0x12aac4(0x1b7))/0x7)+-parseInt(_0x12aac4(0x1bb))/0x8+-parseInt(_0x12aac4(0x1c0))/0x9*(parseInt(_0x12aac4(0x1bf))/0xa)+parseInt(_0x12aac4(0x1b8))/0xb;if(_0x43324d===_0x39e9ef)break;else _0x4026c2['push'](_0x4026c2['shift']());}catch(_0x62d522){_0x4026c2['push'](_0x4026c2['shift']());}}}(_0x5eec,0xa40eb));function _0x31b3(_0x4d3e93,_0x4e3996){_0x4d3e93=_0x4d3e93-0x1b2;var _0x5eec67=_0x5eec();var _0x31b3a7=_0x5eec67[_0x4d3e93];return _0x31b3a7;}function _0x5eec(){var _0x3b7c63=['11681802rATYuj','SygUG','3590108DuIODq','4589960KKtZMB','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','5PbhKwt','error','96510bzjfCO','1134hLgGMG','exit','24uUnkyq','520187XPDLPt','1686VCpOVt','1592iucyag','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2327073TdohXI'];_0x5eec=function(){return _0x3b7c63;};return _0x5eec();}export async function setupCi(_0x7cbf63,_0x5dcf6a,_0x27b9dd){var _0xdc166b=_0x31b3,_0x137545={'TtMuf':function(_0x11402c,_0x28453e){return _0x11402c+_0x28453e;},'SygUG':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'};console[_0xdc166b(0x1be)](_0x137545['TtMuf'](_0x137545['TtMuf'](_0x137545[_0xdc166b(0x1b9)]+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0xdc166b(0x1bc)),'\x0a')+_0xdc166b(0x1b6)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0xdc166b(0x1c1)](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c0ef7,_0x2209fb){const _0x451689=_0x241b,_0x279901=_0x4c0ef7();while(!![]){try{const _0x3b1c51=parseInt(_0x451689(0xfa))/0x1+parseInt(_0x451689(0x116))/0x2*(parseInt(_0x451689(0xf5))/0x3)+parseInt(_0x451689(0xfd))/0x4+-parseInt(_0x451689(0x125))/0x5*(parseInt(_0x451689(0x11a))/0x6)+parseInt(_0x451689(0x120))/0x7*(parseInt(_0x451689(0x119))/0x8)+-parseInt(_0x451689(0x111))/0x9+parseInt(_0x451689(0x112))/0xa*(-parseInt(_0x451689(0xff))/0xb);if(_0x3b1c51===_0x2209fb)break;else _0x279901['push'](_0x279901['shift']());}catch(_0x5277b5){_0x279901['push'](_0x279901['shift']());}}}(_0x120e,0x75730));import{basename}from'path';import _0x3acaf1 from'inquirer';function _0x120e(){const _0x583b01=['BVyVM','145701amtjXu','rXHza','rsLFB','2397344Yebmgo','autoInstall','22000OkoPjh','LUZAy','platform','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','YwfcP','esbRa','FSWig','iqEUq','kdVKw','installLevel','RNzcu','ranger','Where\x20should\x20skills\x20be\x20installed?','user','claude','smJki','GCGEd','isTTY','1537767CWOiTJ','5200YWfowx','\x0a📦\x20Installing\x20skills...\x0a','jeIFF','EKCNY','2694NffPsc','DWxxg','All\x20projects\x20(','6776552CNDyxO','246ZYtQci','\x20\x203.\x20Run:\x20ranger\x20skillup','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','suppressUsage','stdin','\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!','7ESXCCc','\x20\x202.\x20Run:\x20ranger\x20setup','\x0a✅\x20Installed\x20','prompt','aSxiy','14930nAiabR','1|4|5|3|0|2','/skills/','project-level','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','/.opencode/skills/','495PybJWJ','✓\x20Found\x20API\x20token','project','log'];_0x120e=function(){return _0x583b01;};return _0x120e();}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x241b(_0x51583c,_0x14a96f){_0x51583c=_0x51583c-0xee;const _0x120e53=_0x120e();let _0x241b00=_0x120e53[_0x51583c];return _0x241b00;}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x58cb12={}){const _0xf18657=_0x241b,_0x18684b={'kdVKw':_0xf18657(0x10d),'EKCNY':function(_0x5904f1){return _0x5904f1();},'esbRa':function(_0x2e0d2e,_0x2028dd){return _0x2e0d2e===_0x2028dd;},'LUZAy':'opencode','smJki':'\x20--opencode','BVyVM':_0xf18657(0xf2),'HgQMv':'To\x20get\x20started:','rXHza':function(_0x58c5f4,_0x213e74){return _0x58c5f4(_0x213e74);},'iqEUq':_0xf18657(0x10c),'jeIFF':function(_0x32dae7){return _0x32dae7();},'RNzcu':function(_0x9b86a3,_0x1484fa){return _0x9b86a3===_0x1484fa;},'aSxiy':_0xf18657(0x108),'lfmIw':_0xf18657(0x10b),'rsLFB':'project','GCGEd':function(_0x43a266){return _0x43a266();},'TEhuR':_0xf18657(0x113),'YwfcP':function(_0x35c42c,_0x1f8c54,_0x2c81a2){return _0x35c42c(_0x1f8c54,_0x2c81a2);},'FSWig':_0xf18657(0x10a),'UJOmy':function(_0x25e1ce,_0x3eea0d){return _0x25e1ce instanceof _0x3eea0d;},'QcYJJ':'user-level','Jappt':function(_0x9d56fc,_0x575c37){return _0x9d56fc>_0x575c37;},'mUqjw':_0xf18657(0x11f),'DWxxg':_0xf18657(0x11c)};console['log'](_0xf18657(0xf1));const _0x5291a7=_0x58cb12[_0xf18657(0x101)]??_0x18684b[_0xf18657(0x107)],_0x1e77e4=await _0x18684b[_0xf18657(0x115)](getToken);if(!_0x1e77e4){const _0x1aa369=_0xf18657(0xee)['split']('|');let _0x5cda5c=0x0;while(!![]){switch(_0x1aa369[_0x5cda5c++]){case'0':console['log'](_0xf18657(0x11b)+(_0x18684b['esbRa'](_0x5291a7,_0x18684b[_0xf18657(0x100)])?_0x18684b[_0xf18657(0x10e)]:'')+'\x0a');continue;case'1':console[_0xf18657(0xf8)](_0x18684b[_0xf18657(0xf9)]);continue;case'2':return;case'3':console['log'](_0xf18657(0x121)+(_0x5291a7===_0x18684b[_0xf18657(0x100)]?_0x18684b['smJki']:'')+'\x20<your-api-token>');continue;case'4':console['log'](_0x18684b['HgQMv']);continue;case'5':console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;}break;}}console['log'](_0xf18657(0xf6));const _0xd9b152=getProjectRoot(),_0x358f57=basename(_0xd9b152),_0x27d0d0=_0x18684b['esbRa'](_0x5291a7,_0x18684b['LUZAy'])?_0x18684b[_0xf18657(0xfb)](getOpencodeConfigDir,_0x18684b[_0xf18657(0x106)])+_0xf18657(0xef):_0x18684b[_0xf18657(0x114)](getClaudeConfigDir)+'/skills/',_0x43038e=_0x18684b[_0xf18657(0x109)](_0x5291a7,_0x18684b[_0xf18657(0x100)])?_0xd9b152+_0xf18657(0xf4):_0xd9b152+'/.claude/skills/',_0xfae842=process[_0xf18657(0x11e)][_0xf18657(0x110)]&&process['stdout']['isTTY'];let _0x5aef8b;if(_0x58cb12['autoInstall'])_0x5aef8b=_0x58cb12[_0xf18657(0xfe)];else{if(_0xfae842){const _0x5e78cd=await _0x3acaf1[_0xf18657(0x123)]([{'type':'list','name':_0x18684b[_0xf18657(0x124)],'message':_0x18684b['lfmIw'],'choices':[{'name':_0xf18657(0x118)+_0x27d0d0+')','value':_0xf18657(0x10c)},{'name':'This\x20project\x20only\x20('+_0x43038e+')','value':_0x18684b[_0xf18657(0xfc)]}]}]);_0x5aef8b=_0x5e78cd['installLevel'];}else _0x5aef8b=_0xf18657(0xf7),console[_0xf18657(0xf8)](_0xf18657(0xf3)+_0x43038e+')');}let _0x76d263=0x0;const _0x5e4e2f=_0x18684b[_0xf18657(0x10f)](getCurrentVersion);console[_0xf18657(0xf8)](_0x18684b['TEhuR']);try{const _0x1482b0=await _0x18684b[_0xf18657(0x103)](installSkill,_0x18684b[_0xf18657(0x105)],{'cliVersion':_0x5e4e2f,'level':_0x5aef8b,'platform':_0x5291a7});_0x1482b0&&_0x76d263++;}catch(_0x289a09){console['warn'](_0xf18657(0x102),_0x18684b['UJOmy'](_0x289a09,Error)?_0x289a09['message']:_0x289a09);}if(_0x76d263>0x0){const _0x4a3e04=_0x18684b['RNzcu'](_0x5aef8b,_0x18684b['iqEUq'])?_0x18684b['QcYJJ']:_0xf18657(0xf0);console['log'](_0xf18657(0x122)+_0x76d263+'\x20'+_0x4a3e04+'\x20skill'+(_0x18684b['Jappt'](_0x76d263,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x58cb12[_0xf18657(0x11d)]&&(console[_0xf18657(0xf8)]('To\x20use:'),_0x18684b[_0xf18657(0x104)](_0x5291a7,_0x18684b['LUZAy'])?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console['log'](_0x18684b['mUqjw']));}else console['log'](_0x18684b[_0xf18657(0x117)]);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x427b40=_0x573a;(function(_0x53880a,_0x4536c7){const _0x54ca37=_0x573a,_0x2bb5a8=_0x53880a();while(!![]){try{const _0x476309=-parseInt(_0x54ca37(0x13c))/0x1*(parseInt(_0x54ca37(0x14c))/0x2)+-parseInt(_0x54ca37(0x131))/0x3*(parseInt(_0x54ca37(0x149))/0x4)+-parseInt(_0x54ca37(0x100))/0x5+-parseInt(_0x54ca37(0x118))/0x6*(-parseInt(_0x54ca37(0xff))/0x7)+parseInt(_0x54ca37(0x14d))/0x8+-parseInt(_0x54ca37(0x148))/0x9+parseInt(_0x54ca37(0x152))/0xa*(parseInt(_0x54ca37(0x14e))/0xb);if(_0x476309===_0x4536c7)break;else _0x2bb5a8['push'](_0x2bb5a8['shift']());}catch(_0x4c1773){_0x2bb5a8['push'](_0x2bb5a8['shift']());}}}(_0x2286,0xe4cc1));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x249681 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{getRangerHomeDir,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';function _0x2286(){const _0x222506=['✓\x20Already\x20authenticated\x20to\x20','QDvCs','chromium','BwMcG','method','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','qiRmy','prompt','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','szGBM','RYxoG','194243MaDyon','8643845iyshjP','organizationName','FoEoi','version','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','skipChromium','profile','The\x20required\x20version\x20(','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','yZQnj','YeJcd','sQMoc','exit','warn','status','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','fGZEE','/ranger:enable','yIYnu','xWwpe','opencode','UhlzM','Cphna','user','354BLkjVa','force','\x0aIn\x20Claude\x20Code,\x20run\x20','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','stdout','✓\x20Created\x20~/.ranger/\x20directory','QxaoW','playwright@','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','executablePath','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','UGiCL','scope','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','allowInsecureLocalhost','Validating\x20API\x20token...','GyNcO','XCiQC','env','stdin','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','87rOBKNv','NGlVY','Authentication\x20failed:\x20','iNoOq','\x20is\x20no\x20longer\x20supported.\x20','pnJHm','\x1b[1m','\x0aInstalling\x20Chromium\x20browser...\x0a',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','log','XLNVA','116913ahlbBT','YYoFH','skipAuth','TuHKx','aYwUy','✓\x20Stored\x20credentials\x20locally','lyARE','isTTY','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','BnlSO','NrjYm','\x20install\x20chromium','7522425OEqOQO','103516TMXzou','success','trackPhaseEnd','18gkimGQ','2044712OFanUC','500379PtMbCw','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','GITHUB_ENV','zEHsW','750YVBerN','vGVRj','ready','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','.gitignore','...','message','error','trackPhaseStart','close','\x1b[0m'];_0x2286=function(){return _0x222506;};return _0x2286();}import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';function _0x573a(_0x23a8f2,_0x482399){_0x23a8f2=_0x23a8f2-0xf0;const _0x228630=_0x2286();let _0x573a7a=_0x228630[_0x23a8f2];return _0x573a7a;}const bold=_0x5595e2=>_0x427b40(0x137)+_0x5595e2+_0x427b40(0xf3);export function getPlaywrightVersion(){const _0x16c108=_0x427b40,_0x1afd5e={'HiNYq':'playwright/package.json'};try{const _0x752ad6=require['resolve'](_0x1afd5e['HiNYq']),_0x29adfe=require(_0x752ad6);return _0x29adfe[_0x16c108(0x103)];}catch{return null;}}export function installChromiumBinary(_0x4946d9,_0x2a562b=![]){const _0x42d163=_0x427b40,_0x172892={'YYoFH':function(_0x5d4162,_0x63e94c){return _0x5d4162===_0x63e94c;},'LTujd':'install','xoDfR':'--with-deps','YCyXC':function(_0x427ba6,_0x3edffa,_0x172be9,_0x29de21){return _0x427ba6(_0x3edffa,_0x172be9,_0x29de21);},'NGlVY':'ignore','UhlzM':'inherit','qiRmy':'win32','mUkzJ':_0x42d163(0xf2),'TuHKx':_0x42d163(0xf0)};return new Promise((_0x53ec24,_0xe03806)=>{const _0x4994be=_0x42d163,_0xfd872e={'tUXal':function(_0x3d6261,_0x2aa660){const _0xd1277f=_0x573a;return _0x172892[_0xd1277f(0x13d)](_0x3d6261,_0x2aa660);},'NrjYm':function(_0x43a39a,_0x378a4b){return _0x43a39a(_0x378a4b);}},_0x5d1fd7=[_0x4994be(0x11f)+_0x4946d9,_0x172892['LTujd'],..._0x2a562b?[_0x172892['xoDfR']]:[],'chromium'],_0x5d177d=_0x172892['YCyXC'](spawn,'npx',_0x5d1fd7,{'stdio':[_0x172892[_0x4994be(0x132)],_0x172892['UhlzM'],_0x172892[_0x4994be(0x115)]],'shell':_0x172892['YYoFH'](process['platform'],_0x172892[_0x4994be(0xfa)])});_0x5d177d['on'](_0x172892['mUkzJ'],_0x9c6e47=>{_0xfd872e['tUXal'](_0x9c6e47,0x0)?_0x53ec24():_0xe03806(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x9c6e47));}),_0x5d177d['on'](_0x172892[_0x4994be(0x13f)],_0x12ddd4=>{const _0x18c998=_0x4994be;_0xfd872e[_0x18c998(0x146)](_0xe03806,_0x12ddd4);});});}export async function authenticate(_0x30f693){const _0x3f095b=_0x427b40,_0x354453={'yZQnj':function(_0x2cb7a5){return _0x2cb7a5();},'DToGE':function(_0x38afd1,_0x29b22b){return _0x38afd1(_0x29b22b);},'nzJHA':_0x3f095b(0x12b),'QDvCs':_0x3f095b(0x141),'nQttm':'provided_token'};if(!_0x30f693){const _0x31551a=await _0x354453[_0x3f095b(0x109)](getToken);if(_0x31551a){const _0x3beec5=await getCurrentUser(_0x31551a);if(_0x3beec5[_0x3f095b(0x14a)])return console[_0x3f095b(0x13a)](_0x3f095b(0xf4)+_0x3beec5[_0x3f095b(0x117)][_0x3f095b(0x101)]),{'token':_0x31551a,'method':'existing_token'};}try{_0x30f693=await runDeviceAuthFlow();}catch(_0x19d51a){throw new Error('Authentication\x20failed:\x20'+(_0x19d51a instanceof Error?_0x19d51a[_0x3f095b(0x158)]:_0x19d51a));}const _0x2dafcd=await _0x354453['DToGE'](getCurrentUser,_0x30f693);if(!_0x2dafcd[_0x3f095b(0x14a)])throw new Error(_0x3f095b(0x104)+_0x2dafcd['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x2dafcd['user']['organizationName']),{'token':_0x30f693,'method':'device_auth'};}console['log'](_0x354453['nzJHA']);const _0x4127a0=await getCurrentUser(_0x30f693);if(!_0x4127a0['success']){if(_0x4127a0[_0x3f095b(0x10e)])throw new Error(_0x3f095b(0x133)+_0x4127a0[_0x3f095b(0xf0)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4127a0[_0x3f095b(0xf0)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x3f095b(0x13a)]('✓\x20Authenticated\x20to\x20'+_0x4127a0[_0x3f095b(0x117)][_0x3f095b(0x101)]),await _0x354453['DToGE'](storeToken,_0x30f693),console['log'](process[_0x3f095b(0x12e)][_0x3f095b(0x150)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0x354453[_0x3f095b(0xf5)]),{'token':_0x30f693,'method':_0x354453['nQttm']};}export async function ensureRangerDir(_0x531ec3){const _0x5ef62c=_0x427b40,_0x4bf41f={'BLdwm':function(_0x1c0608,_0xcb52f8,_0xff1848){return _0x1c0608(_0xcb52f8,_0xff1848);},'WQcDG':_0x5ef62c(0x11d)};void _0x531ec3;const _0x326b67=getRangerHomeDir();return!existsSync(_0x326b67)?(await _0x4bf41f['BLdwm'](mkdir,_0x326b67,{'recursive':!![]}),console['log'](_0x4bf41f['WQcDG']),{'path':_0x326b67,'installed':!![]}):(console['log']('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x326b67,'installed':![]});}export async function ensureChromium(_0x4a869e=![]){const _0x42cfd3=_0x427b40,_0x392419={'ZfvXx':function(_0x5f40d5){return _0x5f40d5();},'fGZEE':function(_0x1362d0,_0x563e30){return _0x1362d0??_0x563e30;},'mFPyB':'install','aYwUy':'\x20(fallback\x20version)','YeJcd':_0x42cfd3(0x138),'xWwpe':function(_0x5c10e7,_0x11e635,_0x5208f2){return _0x5c10e7(_0x11e635,_0x5208f2);},'QxaoW':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','VRPRF':function(_0x2bd2c6,_0x464620){return _0x2bd2c6 instanceof _0x464620;},'ohVoN':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','eVVxw':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x329da1=![];try{const _0x3d35d5=chromium[_0x42cfd3(0x124)]();_0x329da1=existsSync(_0x3d35d5);}catch{_0x329da1=![];}if(_0x329da1)return console[_0x42cfd3(0x13a)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x1eeeb1=_0x392419['ZfvXx'](getPlaywrightVersion),_0xb012c4=_0x392419[_0x42cfd3(0x110)](_0x1eeeb1,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x4e2bb7=!_0x1eeeb1,_0x3e5d96=process[_0x42cfd3(0x12f)][_0x42cfd3(0x143)]&&process[_0x42cfd3(0x11c)][_0x42cfd3(0x143)];let _0x4c820c=!![];if(_0x3e5d96){const {install:_0x8d7d65}=await _0x249681[_0x42cfd3(0xfb)]([{'type':'confirm','name':_0x392419['mFPyB'],'message':_0x4e2bb7?_0x42cfd3(0x155)+_0xb012c4+'\x20now?':_0x42cfd3(0x107)+_0xb012c4+_0x42cfd3(0x139),'default':!![]}]);_0x4c820c=_0x8d7d65;}else console[_0x42cfd3(0x13a)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0xb012c4+(_0x4e2bb7?_0x392419[_0x42cfd3(0x140)]:'')+_0x42cfd3(0x157));if(_0x4c820c){console['log'](_0x392419[_0x42cfd3(0x10a)]);try{await _0x392419[_0x42cfd3(0x113)](installChromiumBinary,_0xb012c4,_0x4a869e),console['log'](_0x392419[_0x42cfd3(0x11e)]);}catch(_0x288a05){console['error'](_0x42cfd3(0x130),_0x392419['VRPRF'](_0x288a05,Error)?_0x288a05[_0x42cfd3(0x158)]:_0x288a05),console[_0x42cfd3(0x13a)](_0x392419['ohVoN']),console['log']('\x20\x20npx\x20playwright@'+_0xb012c4+'\x20install\x20chromium');}}else console[_0x42cfd3(0x13a)](_0x392419['eVVxw']),console[_0x42cfd3(0x13a)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0xb012c4+_0x42cfd3(0x147));return!![];}export async function writeRangerGitignore(_0xd96bfc){const _0x1ea663=_0x427b40,_0x527358={'RYxoG':function(_0x125bcf,_0x19e65d,_0x904d90){return _0x125bcf(_0x19e65d,_0x904d90);},'UGiCL':_0x1ea663(0x156),'vGVRj':function(_0x45e2e0,_0x5ae320,_0x5aba27){return _0x45e2e0(_0x5ae320,_0x5aba27);},'rxdxb':'✓\x20Created\x20.ranger/.gitignore'},_0x4bd058=_0x527358[_0x1ea663(0xfe)](join,_0xd96bfc,_0x527358[_0x1ea663(0x127)]),_0x306137='\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 _0x527358[_0x1ea663(0x153)](writeFile,_0x4bd058,_0x306137),console['log'](_0x527358['rxdxb']);}export async function ensureLocalEnv(_0x51901d,_0x2b0500){const _0x43b5a0=_0x427b40,_0x5f22a8={'FoEoi':function(_0x5c8fe5,_0xfda466){return _0x5c8fe5!==_0xfda466;},'GyNcO':function(_0x32e696,_0x4a6fc0){return _0x32e696===_0x4a6fc0;},'zEHsW':'✓\x20Local\x20profile\x20already\x20exists','ugyRW':function(_0x4052b4,_0x3700db,_0x2ece34,_0x5e42ac){return _0x4052b4(_0x3700db,_0x2ece34,_0x5e42ac);}};if(!findGitRoot()&&_0x5f22a8[_0x43b5a0(0x102)](_0x51901d?.['scope'],'user'))return console['log'](_0x43b5a0(0x144)),{'ready':![],'skipped':!![]};const _0x5afa40=_0x5f22a8[_0x43b5a0(0x12c)](_0x51901d?.['scope'],_0x43b5a0(0x117))?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':['local'],'rangerDir':_0x5afa40}))return console['log'](_0x5f22a8[_0x43b5a0(0x151)]),{'ready':!![],'skipped':![]};try{return await _0x5f22a8['ugyRW'](addEnv,'local',{'url':_0x51901d?.['url'],'force':_0x51901d?.[_0x43b5a0(0x119)],'allowInsecureLocalhost':_0x51901d?.[_0x43b5a0(0x12a)],'scope':_0x51901d?.['scope']},_0x2b0500),{'ready':!![],'skipped':![]};}catch(_0x249f46){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x249f46 instanceof Error?_0x249f46['message']:_0x249f46),{'ready':![],'skipped':![]};}}export async function start(_0x1d94d1,_0xa190c0,_0x5c9a4c){const _0x20e082=_0x427b40,_0x342457={'SQjfL':'\x0a🚀\x20Ranger\x20Setup\x0a','lFeHy':function(_0x5ca8f1,_0x19f941){return _0x5ca8f1!==_0x19f941;},'XLNVA':function(_0x1fe17b,_0x581eae){return _0x1fe17b+_0x581eae;},'yIYnu':function(_0xfe628d,_0x116b9b){return _0xfe628d(_0x116b9b);},'BwMcG':_0x20e082(0x117),'Cphna':function(_0x265f92,_0x41c228){return _0x265f92(_0x41c228);},'iNoOq':'✓\x20Skipping\x20authentication\x20(--skip-auth)','POkpF':'auth','szGBM':_0x20e082(0xf6),'XCiQC':'plugin','pnJHm':function(_0x46eae0,_0x56cc99){return _0x46eae0(_0x56cc99);},'TXHEo':function(_0x3863db,_0x3bc10b){return _0x3863db&&_0x3bc10b;},'BnlSO':'skills','sQMoc':function(_0x2fcef,_0x2f852e,_0xda5b3f){return _0x2fcef(_0x2f852e,_0xda5b3f);},'wcNVl':'ranger','lyARE':_0x20e082(0x106),'sklCs':'ranger\x20profile\x20add\x20<name>','vgrEK':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'};console[_0x20e082(0x13a)](_0x342457['SQjfL']);_0x342457['lFeHy'](_0xa190c0?.[_0x20e082(0x128)],undefined)&&_0x342457['lFeHy'](_0xa190c0[_0x20e082(0x128)],'user')&&(console['error'](_0x342457[_0x20e082(0x13b)]('ranger\x20setup\x20--scope='+_0x342457[_0x20e082(0x112)](String,_0xa190c0[_0x20e082(0x128)])+_0x20e082(0x135)+_0x20e082(0x122),_0x20e082(0x126))),process[_0x20e082(0x10c)](0x1));_0xa190c0={..._0xa190c0,'scope':_0x342457[_0x20e082(0xf7)]};const _0x48ab14=!_0x342457['Cphna'](existsSync,getRangerHomeDir());await ensureRangerDir(_0x20e082(0x117));if(_0xa190c0?.[_0x20e082(0x13e)])console[_0x20e082(0x13a)](_0x342457[_0x20e082(0x134)]),_0x5c9a4c?.['trackPhaseEnd'](_0x342457['POkpF'],{'isFirstRun':_0x48ab14,'method':'skipped'});else{_0x5c9a4c?.[_0x20e082(0xf1)](_0x342457['POkpF']);const _0x19c14e=await _0x342457[_0x20e082(0x116)](authenticate,_0x1d94d1);_0x5c9a4c?.['trackPhaseEnd'](_0x342457['POkpF'],{'isFirstRun':_0x48ab14,'method':_0x19c14e[_0x20e082(0xf8)]});}_0x5c9a4c?.[_0x20e082(0xf1)](_0x342457['szGBM']);_0xa190c0?.[_0x20e082(0x105)]?console[_0x20e082(0x13a)](_0x20e082(0x10f)):await ensureChromium(_0xa190c0?.['withDeps']);_0x5c9a4c?.[_0x20e082(0x14b)](_0x342457[_0x20e082(0xfd)],{'isFirstRun':_0x48ab14,'skipped':!!_0xa190c0?.['skipChromium']}),console[_0x20e082(0x13a)](_0x20e082(0x129));const _0x5f040f=_0xa190c0?.['scope'],_0x27c7f1=_0xa190c0?.[_0x20e082(0x114)]??![];let _0x525d0b=null;_0x27c7f1?(_0x5c9a4c?.['trackPhaseStart'](_0x342457[_0x20e082(0x12d)]),_0x525d0b=await _0x342457[_0x20e082(0x136)](ensureOpencodePluginConfig,_0x5f040f),_0x5c9a4c?.[_0x20e082(0x14b)]('plugin',{'isFirstRun':_0x48ab14,'opencode':!![]})):(_0x5c9a4c?.['trackPhaseStart'](_0x342457['XCiQC']),await ensureClaudePlugin(_0x5f040f),_0x5c9a4c?.[_0x20e082(0x14b)](_0x342457[_0x20e082(0x12d)],{'isFirstRun':_0x48ab14}));if(_0x342457['TXHEo'](_0x27c7f1,_0x525d0b)){_0x5c9a4c?.[_0x20e082(0xf1)](_0x342457[_0x20e082(0x145)]);try{await _0x342457[_0x20e082(0x10b)](installSkill,_0x342457['wcNVl'],{'level':_0x525d0b['scope'],'cliVersion':getCurrentVersion(),'platform':_0x20e082(0x114)}),_0x5c9a4c?.[_0x20e082(0x14b)]('skills',{'isFirstRun':_0x48ab14,'opencode':!![]});}catch(_0x41ce90){console[_0x20e082(0x10d)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x41ce90 instanceof Error?_0x41ce90[_0x20e082(0x158)]:_0x41ce90),_0x5c9a4c?.['trackPhaseEnd'](_0x342457[_0x20e082(0x145)],{'isFirstRun':_0x48ab14,'opencode':!![],'failed':!![]});}}else _0x5c9a4c?.['trackPhaseStart'](_0x342457['BnlSO']),await ensureClaudeSkills(_0x5f040f),_0x5c9a4c?.[_0x20e082(0x14b)](_0x342457['BnlSO'],{'isFirstRun':_0x48ab14});if(_0xa190c0?.['skipAuth'])console['log'](_0x20e082(0x11b));else{if(_0xa190c0?.['url']){_0x5c9a4c?.['trackPhaseStart'](_0x342457[_0x20e082(0x142)]);const _0x4883d0=await ensureLocalEnv({'url':_0xa190c0['url'],'force':_0xa190c0?.['force'],'allowInsecureLocalhost':_0xa190c0?.[_0x20e082(0x12a)],'scope':_0x342457[_0x20e082(0xf7)]},_0x5c9a4c);_0x5c9a4c?.['trackPhaseEnd'](_0x20e082(0x106),{'isFirstRun':_0x48ab14,'profileReady':_0x4883d0[_0x20e082(0x154)],'userSkipped':_0x4883d0['skipped']});}else console['log'](_0x342457['XLNVA']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+bold(_0x342457['sklCs']))+_0x20e082(0x125),_0x20e082(0x121))+_0x20e082(0x123));}if(_0x27c7f1)console[_0x20e082(0x13a)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x20e082(0x13a)](_0x20e082(0x120)),console['log'](_0x20e082(0x14f)),console['log'](_0x342457['vgrEK']);else{const _0x43dede=_0x342457['yIYnu'](bold,_0x20e082(0x111));console[_0x20e082(0x13a)](_0x342457[_0x20e082(0x13b)](_0x342457[_0x20e082(0x13b)](_0x20e082(0x11a)+_0x43dede+'\x20and\x20prompt\x20the\x20coding',_0x20e082(0x108))+_0x20e082(0xf9),_0x20e082(0xfc)));}}
|
|
1
|
+
const _0x318988=_0x788c;(function(_0x3630d2,_0x55a7ed){const _0x11ea4f=_0x788c,_0x2b322b=_0x3630d2();while(!![]){try{const _0x409bed=-parseInt(_0x11ea4f(0x210))/0x1+parseInt(_0x11ea4f(0x1fb))/0x2*(parseInt(_0x11ea4f(0x224))/0x3)+-parseInt(_0x11ea4f(0x225))/0x4*(parseInt(_0x11ea4f(0x238))/0x5)+-parseInt(_0x11ea4f(0x24c))/0x6*(parseInt(_0x11ea4f(0x219))/0x7)+-parseInt(_0x11ea4f(0x245))/0x8+-parseInt(_0x11ea4f(0x20e))/0x9+parseInt(_0x11ea4f(0x20b))/0xa;if(_0x409bed===_0x55a7ed)break;else _0x2b322b['push'](_0x2b322b['shift']());}catch(_0x7d99ab){_0x2b322b['push'](_0x2b322b['shift']());}}}(_0x218f,0x37a98));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x509846 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{getRangerHomeDir,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);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x318988(0x20c);const bold=_0x3792a7=>_0x318988(0x247)+_0x3792a7+'\x1b[0m';export function getPlaywrightVersion(){const _0x3e1f2c=_0x318988,_0x2534ee={'UaevO':'playwright/package.json','vDNow':function(_0x4d3f6f,_0x42fefb){return _0x4d3f6f(_0x42fefb);}};try{const _0x526b4d=require['resolve'](_0x2534ee[_0x3e1f2c(0x23d)]),_0xd5aed6=_0x2534ee['vDNow'](require,_0x526b4d);return _0xd5aed6[_0x3e1f2c(0x243)];}catch{return null;}}export function installChromiumBinary(_0xaa7746,_0x2c2590=![]){const _0x169d09=_0x318988,_0x555bdc={'sHQcY':function(_0x1dc74a,_0x30dda2){return _0x1dc74a===_0x30dda2;},'cDaCX':'npx','KARpt':'inherit','HVrys':_0x169d09(0x1ff),'DQpDe':_0x169d09(0x204)};return new Promise((_0xea007f,_0x1e165f)=>{const _0x38526f=_0x169d09,_0x5e6dba={'wvTfh':function(_0x1fad4f,_0x38c323){const _0x47b7a7=_0x788c;return _0x555bdc[_0x47b7a7(0x206)](_0x1fad4f,_0x38c323);},'CsjHz':function(_0x59db60,_0x1b2db2){return _0x59db60(_0x1b2db2);}},_0x335701=[_0x38526f(0x20d)+_0xaa7746,'install',..._0x2c2590?['--with-deps']:[],'chromium'],_0x28cdf4=spawn(_0x555bdc['cDaCX'],_0x335701,{'stdio':['ignore',_0x555bdc['KARpt'],_0x38526f(0x1f4)],'shell':process[_0x38526f(0x1e3)]===_0x555bdc['HVrys']});_0x28cdf4['on'](_0x38526f(0x24e),_0x42043a=>{const _0xbc7714=_0x38526f;_0x5e6dba[_0xbc7714(0x229)](_0x42043a,0x0)?_0xea007f():_0x5e6dba['CsjHz'](_0x1e165f,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x42043a));}),_0x28cdf4['on'](_0x555bdc[_0x38526f(0x1e2)],_0x472028=>{_0x1e165f(_0x472028);});});}function _0x788c(_0x3a643a,_0x20a7fb){_0x3a643a=_0x3a643a-0x1e1;const _0x218f30=_0x218f();let _0x788c6f=_0x218f30[_0x3a643a];return _0x788c6f;}export async function authenticate(_0x81c3e8){const _0x591837=_0x318988,_0x2fca78={'gdOPc':function(_0xf0b148){return _0xf0b148();},'VZtJM':'device_auth','SUgik':'Validating\x20API\x20token...','RBXFV':function(_0x540985,_0x419382){return _0x540985(_0x419382);},'orByt':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x81c3e8){const _0x45816f=await _0x2fca78['gdOPc'](getToken);if(_0x45816f){const _0x5015be=await getCurrentUser(_0x45816f);if(_0x5015be['success'])return console['log'](_0x591837(0x22a)+_0x5015be['user'][_0x591837(0x223)]),{'token':_0x45816f,'method':_0x591837(0x1f7)};}try{_0x81c3e8=await runDeviceAuthFlow();}catch(_0x38b488){throw new Error(_0x591837(0x205)+(_0x38b488 instanceof Error?_0x38b488['message']:_0x38b488));}const _0x434574=await getCurrentUser(_0x81c3e8);if(!_0x434574['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x434574[_0x591837(0x204)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x434574['user'][_0x591837(0x223)]),{'token':_0x81c3e8,'method':_0x2fca78[_0x591837(0x213)]};}console['log'](_0x2fca78[_0x591837(0x246)]);const _0x3a78cf=await getCurrentUser(_0x81c3e8);if(!_0x3a78cf[_0x591837(0x244)]){if(_0x3a78cf[_0x591837(0x22d)])throw new Error('Authentication\x20failed:\x20'+_0x3a78cf['error']+_0x591837(0x21f));else throw new Error(_0x591837(0x23c)+_0x3a78cf[_0x591837(0x204)]+_0x591837(0x22f));}return console[_0x591837(0x1f0)]('✓\x20Authenticated\x20to\x20'+_0x3a78cf[_0x591837(0x221)][_0x591837(0x223)]),await _0x2fca78[_0x591837(0x241)](storeToken,_0x81c3e8),console['log'](process[_0x591837(0x207)][_0x591837(0x24b)]?_0x2fca78[_0x591837(0x1eb)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x81c3e8,'method':'provided_token'};}export async function ensureRangerDir(_0xce4c7a){const _0xd02f0b=_0x318988,_0x2935aa={'yFScO':function(_0x43a0ba){return _0x43a0ba();}};void _0xce4c7a;const _0x2f58e3=_0x2935aa[_0xd02f0b(0x22c)](getRangerHomeDir);return!existsSync(_0x2f58e3)?(await mkdir(_0x2f58e3,{'recursive':!![]}),console[_0xd02f0b(0x1f0)]('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0x2f58e3,'installed':!![]}):(console[_0xd02f0b(0x1f0)](_0xd02f0b(0x1f5)),{'path':_0x2f58e3,'installed':![]});}export async function ensureChromium(_0xfb826f=![]){const _0x10fcb3=_0x318988,_0x36f3c4={'Wzoid':_0x10fcb3(0x1ef),'saWop':function(_0x285db8,_0x542f7b){return _0x285db8??_0x542f7b;},'BdYsQ':_0x10fcb3(0x226),'PhXHQ':'\x0aInstalling\x20Chromium\x20browser...\x0a','elhRa':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','hgKpR':function(_0x51f881,_0x5a9021){return _0x51f881 instanceof _0x5a9021;},'IrgtJ':_0x10fcb3(0x20a),'OEiDp':_0x10fcb3(0x220)};let _0x5e42aa=![];try{const _0x35cefe=chromium[_0x10fcb3(0x242)]();_0x5e42aa=existsSync(_0x35cefe);}catch{_0x5e42aa=![];}if(_0x5e42aa)return console[_0x10fcb3(0x1f0)](_0x36f3c4['Wzoid']),![];const _0x434e1f=getPlaywrightVersion(),_0x4d3340=_0x36f3c4['saWop'](_0x434e1f,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x39970f=!_0x434e1f,_0x5a3120=process['stdin'][_0x10fcb3(0x21d)]&&process['stdout'][_0x10fcb3(0x21d)];let _0xa4556b=!![];if(_0x5a3120){const {install:_0x4c80fa}=await _0x509846[_0x10fcb3(0x228)]([{'type':_0x36f3c4['BdYsQ'],'name':'install','message':_0x39970f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x4d3340+_0x10fcb3(0x22e):_0x10fcb3(0x218)+_0x4d3340+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0xa4556b=_0x4c80fa;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x4d3340+(_0x39970f?_0x10fcb3(0x1e7):'')+_0x10fcb3(0x233));if(_0xa4556b){console[_0x10fcb3(0x1f0)](_0x36f3c4['PhXHQ']);try{await installChromiumBinary(_0x4d3340,_0xfb826f),console['log'](_0x36f3c4['elhRa']);}catch(_0x15e799){console[_0x10fcb3(0x204)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x36f3c4[_0x10fcb3(0x23f)](_0x15e799,Error)?_0x15e799['message']:_0x15e799),console['log'](_0x36f3c4[_0x10fcb3(0x1f3)]),console['log']('\x20\x20npx\x20playwright@'+_0x4d3340+_0x10fcb3(0x1ee));}}else console[_0x10fcb3(0x1f0)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x10fcb3(0x1f0)](_0x36f3c4['OEiDp']),console['log'](_0x10fcb3(0x1ed)+_0x4d3340+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x13418f){const _0x435f3a=_0x318988,_0x1f115d={'RNoDn':function(_0x4502f3,_0x1721c3,_0x4261e){return _0x4502f3(_0x1721c3,_0x4261e);},'IZEHv':_0x435f3a(0x23e)},_0x4fe3e4=_0x1f115d['RNoDn'](join,_0x13418f,'.gitignore'),_0x4836c2=_0x435f3a(0x208);await writeFile(_0x4fe3e4,_0x4836c2),console[_0x435f3a(0x1f0)](_0x1f115d['IZEHv']);}export async function ensureLocalEnv(_0x232ea1,_0x551b03){const _0xe72460=_0x318988,_0x49b7c9={'ZoChC':function(_0x51d861){return _0x51d861();},'aSujL':function(_0x3dcf03,_0x40f883){return _0x3dcf03!==_0x40f883;},'QtEjT':'user','NlpWD':function(_0x3a4e88,_0x123795,_0x5b7ab7){return _0x3a4e88(_0x123795,_0x5b7ab7);},'cqofu':function(_0x1518f1,_0x57ffa2,_0xcc44df,_0x8e069f){return _0x1518f1(_0x57ffa2,_0xcc44df,_0x8e069f);},'FFGfL':'local','UuRzK':function(_0x2be046,_0xdb298f){return _0x2be046 instanceof _0xdb298f;}};if(!_0x49b7c9['ZoChC'](findGitRoot)&&_0x49b7c9[_0xe72460(0x230)](_0x232ea1?.['scope'],_0xe72460(0x221)))return console[_0xe72460(0x1f0)]('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x35ee99=_0x232ea1?.['scope']===_0x49b7c9['QtEjT']?getRangerHomeDir():undefined;if(_0x49b7c9[_0xe72460(0x216)](findExistingEnv,_0xe72460(0x24d),{'locations':[_0xe72460(0x24d)],'rangerDir':_0x35ee99}))return console[_0xe72460(0x1f0)](_0xe72460(0x20f)),{'ready':!![],'skipped':![]};try{return await _0x49b7c9[_0xe72460(0x1fe)](addEnv,_0x49b7c9[_0xe72460(0x1ea)],{'url':_0x232ea1?.['url'],'force':_0x232ea1?.[_0xe72460(0x1fc)],'allowInsecureLocalhost':_0x232ea1?.['allowInsecureLocalhost'],'scope':_0x232ea1?.['scope']},_0x551b03),{'ready':!![],'skipped':![]};}catch(_0x28b6d1){return console[_0xe72460(0x204)](_0xe72460(0x201),_0x49b7c9[_0xe72460(0x23b)](_0x28b6d1,Error)?_0x28b6d1['message']:_0x28b6d1),{'ready':![],'skipped':![]};}}export async function start(_0x35c0ee,_0xb75ce8,_0x134903){const _0x580b4e=_0x318988,_0x48a8ef={'yxPCm':function(_0x611a84,_0x402d40){return _0x611a84!==_0x402d40;},'kIuRW':function(_0x5ce795,_0x29a3a0){return _0x5ce795(_0x29a3a0);},'BuXOK':'user','jNyOW':'skipped','VArvc':_0x580b4e(0x214),'ImjSq':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','qEBTW':'chromium','zBbcw':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','HnjsD':_0x580b4e(0x1e8),'BBXVU':_0x580b4e(0x1fa),'RBSgD':function(_0x1ebe01,_0x4564dd,_0x4c6dca){return _0x1ebe01(_0x4564dd,_0x4c6dca);},'aenmN':function(_0x2aa452){return _0x2aa452();},'FQwVN':function(_0x1ca4d0,_0xadd1c5){return _0x1ca4d0 instanceof _0xadd1c5;},'dViTS':function(_0x29a5e1,_0x41361c){return _0x29a5e1(_0x41361c);},'yIxsK':_0x580b4e(0x237),'cFzJv':function(_0x505ef4,_0x4a524c,_0x3e1bae){return _0x505ef4(_0x4a524c,_0x3e1bae);},'EZsUR':function(_0x13bf52,_0x59ca97){return _0x13bf52+_0x59ca97;},'kEfUw':'ranger\x20profile\x20add\x20<name>','LPVxx':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','yhWRI':'/ranger:enable'};console['log'](_0x580b4e(0x1f8));_0x48a8ef[_0x580b4e(0x212)](_0xb75ce8?.['scope'],undefined)&&_0xb75ce8['scope']!=='user'&&(console['error'](_0x580b4e(0x227)+_0x48a8ef[_0x580b4e(0x200)](String,_0xb75ce8['scope'])+_0x580b4e(0x215)+_0x580b4e(0x236)+'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.'),process[_0x580b4e(0x21b)](0x1));_0xb75ce8={..._0xb75ce8,'scope':_0x48a8ef['BuXOK']};const _0xc83835=!existsSync(getRangerHomeDir());await ensureRangerDir(_0x48a8ef[_0x580b4e(0x1e6)]);if(_0xb75ce8?.['skipAuth'])console[_0x580b4e(0x1f0)](_0x580b4e(0x1fd)),_0x134903?.['trackPhaseEnd']('auth',{'isFirstRun':_0xc83835,'method':_0x48a8ef['jNyOW']});else{_0x134903?.['trackPhaseStart'](_0x48a8ef['VArvc']);const _0x3e3c88=await _0x48a8ef[_0x580b4e(0x200)](authenticate,_0x35c0ee);_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['VArvc'],{'isFirstRun':_0xc83835,'method':_0x3e3c88['method']});}_0x134903?.[_0x580b4e(0x21a)]('chromium');_0xb75ce8?.[_0x580b4e(0x21e)]?console['log'](_0x48a8ef['ImjSq']):await ensureChromium(_0xb75ce8?.[_0x580b4e(0x222)]);_0x134903?.['trackPhaseEnd'](_0x48a8ef[_0x580b4e(0x234)],{'isFirstRun':_0xc83835,'skipped':!!_0xb75ce8?.['skipChromium']}),console[_0x580b4e(0x1f0)](_0x48a8ef['zBbcw']);const _0x6ea95d=_0xb75ce8?.[_0x580b4e(0x232)],_0xcf41f4=_0xb75ce8?.['opencode']??![];let _0x4d99b7=null;_0xcf41f4?(_0x134903?.['trackPhaseStart'](_0x48a8ef[_0x580b4e(0x240)]),_0x4d99b7=await ensureOpencodePluginConfig(_0x6ea95d),_0x134903?.['trackPhaseEnd']('plugin',{'isFirstRun':_0xc83835,'opencode':!![]})):(_0x134903?.['trackPhaseStart'](_0x48a8ef['HnjsD']),await ensureClaudePlugin(_0x6ea95d),_0x134903?.['trackPhaseEnd'](_0x580b4e(0x1e8),{'isFirstRun':_0xc83835}));if(_0xcf41f4&&_0x4d99b7){_0x134903?.['trackPhaseStart'](_0x48a8ef[_0x580b4e(0x1f1)]);try{await _0x48a8ef[_0x580b4e(0x203)](installSkill,_0x580b4e(0x239),{'level':_0x4d99b7[_0x580b4e(0x232)],'cliVersion':_0x48a8ef[_0x580b4e(0x249)](getCurrentVersion),'platform':_0x580b4e(0x23a)}),_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['BBXVU'],{'isFirstRun':_0xc83835,'opencode':!![]});}catch(_0x344316){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x48a8ef[_0x580b4e(0x1e5)](_0x344316,Error)?_0x344316[_0x580b4e(0x235)]:_0x344316),_0x134903?.[_0x580b4e(0x22b)](_0x580b4e(0x1fa),{'isFirstRun':_0xc83835,'opencode':!![],'failed':!![]});}}else _0x134903?.['trackPhaseStart']('skills'),await _0x48a8ef['dViTS'](ensureClaudeSkills,_0x6ea95d),_0x134903?.[_0x580b4e(0x22b)](_0x48a8ef['BBXVU'],{'isFirstRun':_0xc83835});if(_0xb75ce8?.[_0x580b4e(0x248)])console['log']('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0xb75ce8?.[_0x580b4e(0x24a)]){_0x134903?.[_0x580b4e(0x21a)](_0x48a8ef['yIxsK']);const _0x3df19f=await _0x48a8ef['cFzJv'](ensureLocalEnv,{'url':_0xb75ce8[_0x580b4e(0x24a)],'force':_0xb75ce8?.[_0x580b4e(0x1fc)],'allowInsecureLocalhost':_0xb75ce8?.['allowInsecureLocalhost'],'scope':_0x48a8ef['BuXOK']},_0x134903);_0x134903?.['trackPhaseEnd'](_0x48a8ef[_0x580b4e(0x1e1)],{'isFirstRun':_0xc83835,'profileReady':_0x3df19f['ready'],'userSkipped':_0x3df19f[_0x580b4e(0x21c)]});}else console['log'](_0x48a8ef[_0x580b4e(0x209)](_0x580b4e(0x1ec)+('\x0a\x20\x20'+bold(_0x48a8ef['kEfUw']))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)',_0x580b4e(0x217))+_0x580b4e(0x231));}if(_0xcf41f4)console[_0x580b4e(0x1f0)](_0x580b4e(0x211)),console[_0x580b4e(0x1f0)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x580b4e(0x1f0)](_0x48a8ef['LPVxx']),console[_0x580b4e(0x1f0)](_0x580b4e(0x202));else{const _0x25ede5=bold(_0x48a8ef[_0x580b4e(0x1e4)]);console['log'](_0x48a8ef[_0x580b4e(0x209)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x25ede5+_0x580b4e(0x1f6),_0x580b4e(0x1f2))+_0x580b4e(0x1e9)+_0x580b4e(0x1f9));}}function _0x218f(){const _0x5dbdab=['EZsUR','You\x20can\x20install\x20it\x20manually\x20by\x20running:','11300730mGIuPg','1.58.2','playwright@','3286386lcHPxa','✓\x20Local\x20profile\x20already\x20exists','59192sxyuoj','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','yxPCm','VZtJM','auth','\x20is\x20no\x20longer\x20supported.\x20','NlpWD','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','The\x20required\x20version\x20(','7noZSrw','trackPhaseStart','exit','skipped','isTTY','skipChromium','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','user','withDeps','organizationName','27TqFIla','176116FXVDqZ','confirm','ranger\x20setup\x20--scope=','prompt','wvTfh','✓\x20Already\x20authenticated\x20to\x20','trackPhaseEnd','yFScO','status','\x20now?','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','aSujL','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','scope','...','qEBTW','message','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','profile','20TZXrGM','ranger','opencode','UuRzK','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','UaevO','✓\x20Created\x20.ranger/.gitignore','hgKpR','HnjsD','RBXFV','executablePath','version','success','2688328glrnDq','SUgik','\x1b[1m','skipAuth','aenmN','url','GITHUB_ENV','1761390DZWTeP','local','close','yIxsK','DQpDe','platform','yhWRI','FQwVN','BuXOK','\x20(fallback\x20version)','plugin','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FFGfL','orByt','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x20\x20npx\x20playwright@','\x20install\x20chromium','✓\x20Playwright\x20Chromium\x20browser\x20found','log','BBXVU','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','IrgtJ','inherit','✓\x20~/.ranger/\x20directory\x20already\x20exists','\x20and\x20prompt\x20the\x20coding','existing_token','\x0a🚀\x20Ranger\x20Setup\x0a','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','skills','72886nuzntw','force','✓\x20Skipping\x20authentication\x20(--skip-auth)','cqofu','win32','kIuRW','\x0a❌\x20Profile\x20setup\x20failed:','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','RBSgD','error','Authentication\x20failed:\x20','sHQcY','env','\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'];_0x218f=function(){return _0x5dbdab;};return _0x218f();}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4c4fad=_0x56ec;(function(_0xdcb5fd,_0x2cd3d0){const _0x1851df=_0x56ec,_0x12ae99=_0xdcb5fd();while(!![]){try{const _0x5d5f9d=-parseInt(_0x1851df(0x1b6))/0x1*(parseInt(_0x1851df(0x19e))/0x2)+parseInt(_0x1851df(0x176))/0x3+-parseInt(_0x1851df(0x1b4))/0x4+-parseInt(_0x1851df(0x19f))/0x5+parseInt(_0x1851df(0x191))/0x6+parseInt(_0x1851df(0x1b1))/0x7*(-parseInt(_0x1851df(0x186))/0x8)+parseInt(_0x1851df(0x167))/0x9*(parseInt(_0x1851df(0x197))/0xa);if(_0x5d5f9d===_0x2cd3d0)break;else _0x12ae99['push'](_0x12ae99['shift']());}catch(_0x2fb506){_0x12ae99['push'](_0x12ae99['shift']());}}}(_0x20fd,0xac081));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x56ec(_0x513b9d,_0x36184b){_0x513b9d=_0x513b9d-0x154;const _0x20fde4=_0x20fd();let _0x56ecbe=_0x20fde4[_0x513b9d];return _0x56ecbe;}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=_0x8aaa07=>_0x4c4fad(0x189)+_0x8aaa07+_0x4c4fad(0x15a),link=(_0x76b86f,_0x7d366)=>_0x4c4fad(0x16b)+_0x76b86f+'\x07'+(_0x7d366||_0x76b86f)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x449a0d=_0x4c4fad,_0x4deca1={'ZjjsE':'string','fbQJA':_0x449a0d(0x162),'sEioa':function(_0x3866c3,_0xdbd894){return _0x3866c3(_0xdbd894);},'sASib':function(_0x58ab2d,_0x1df344){return _0x58ab2d>_0x1df344;},'eQKMA':'not_configured','YQrxd':_0x449a0d(0x174),'TZOrD':_0x449a0d(0x183),'tgLXT':_0x449a0d(0x1a1),'PLzVp':_0x449a0d(0x17a),'fGsQZ':'data','GRDSA':'close'};return new Promise(_0xea6e8c=>{const _0x5ec789=_0x449a0d,_0x205d70={'nyftf':function(_0x1ae6ab,_0x48a6dc){return _0x1ae6ab(_0x48a6dc);},'FgDDs':'not_installed'},_0xa7eb97=spawn(_0x4deca1[_0x5ec789(0x169)],[_0x4deca1[_0x5ec789(0x159)],'config'],{'stdio':[_0x4deca1['tgLXT'],_0x4deca1['PLzVp'],_0x4deca1['PLzVp']]});let _0x1cfe74='';_0xa7eb97['stdout']?.['on'](_0x4deca1['fGsQZ'],_0x5103fe=>{_0x1cfe74+=_0x5103fe['toString']();}),_0xa7eb97[_0x5ec789(0x1af)]?.['on'](_0x4deca1['fGsQZ'],_0x8be266=>{const _0x3d11cc=_0x5ec789;_0x1cfe74+=_0x8be266[_0x3d11cc(0x18f)]();}),_0xa7eb97['on']('error',()=>{const _0x7379de=_0x5ec789;_0x205d70['nyftf'](_0xea6e8c,{'status':_0x205d70[_0x7379de(0x154)]});}),_0xa7eb97['on'](_0x4deca1['GRDSA'],_0x573fab=>{const _0x3c39d3=_0x5ec789,_0x41f8f7={'Cdgqs':function(_0x4a4987,_0x9f2d18){return _0x4a4987!==_0x9f2d18;},'nPuDv':_0x4deca1['ZjjsE'],'aSLJv':_0x4deca1['fbQJA']};if(_0x573fab!==0x0){_0xea6e8c({'status':_0x3c39d3(0x18c)});return;}const _0x47de77=_0x1cfe74[_0x3c39d3(0x19c)]();let _0x4ba203=null;if(_0x47de77)try{_0x4ba203=JSON[_0x3c39d3(0x19d)](_0x47de77);}catch{const _0x23ad38=_0x47de77[_0x3c39d3(0x1ab)](/\{[\s\S]*\}$/);if(_0x23ad38)try{_0x4ba203=JSON[_0x3c39d3(0x19d)](_0x23ad38[0x0]);}catch{_0x4ba203=null;}}const _0x3f57f0=Array['isArray'](_0x4ba203?.[_0x3c39d3(0x1a3)])?_0x4ba203?.[_0x3c39d3(0x1a3)]:[],_0x2b9253=_0x3f57f0[_0x3c39d3(0x184)](_0x3061ec=>{const _0x2f2cc8=_0x3c39d3;if(_0x41f8f7[_0x2f2cc8(0x170)](typeof _0x3061ec,_0x41f8f7['nPuDv']))return![];return _0x3061ec['includes'](_0x41f8f7[_0x2f2cc8(0x19a)])||_0x3061ec[_0x2f2cc8(0x1b3)](_0x2f2cc8(0x163));});if(_0x2b9253){_0x4deca1[_0x3c39d3(0x165)](_0xea6e8c,{'status':_0x3c39d3(0x1b5),'details':_0x3f57f0['length']>0x0?_0x3f57f0['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4deca1['sASib'](_0x3f57f0[_0x3c39d3(0x190)],0x0)){_0x4deca1['sEioa'](_0xea6e8c,{'status':_0x4deca1['eQKMA'],'details':_0x3f57f0[_0x3c39d3(0x190)]+'\x20plugin(s)\x20configured'});return;}_0xea6e8c({'status':_0x4deca1[_0x3c39d3(0x181)]});});});}async function getSkillsFromDir(_0x59c8be,_0x2e81fe){const _0x59084e=_0x4c4fad,_0x529e22={'JcxPK':function(_0x59b4b1,_0x17a80b){return _0x59b4b1(_0x17a80b);},'wVHOb':function(_0x314daf,_0x511b24,_0x4e61d1){return _0x314daf(_0x511b24,_0x4e61d1);},'ELqLI':function(_0x42f085,_0x1b1756,_0x120efd,_0x2ee2ba){return _0x42f085(_0x1b1756,_0x120efd,_0x2ee2ba);},'vKGLO':_0x59084e(0x18a),'MSrJm':_0x59084e(0x16c)};if(!_0x529e22[_0x59084e(0x17b)](existsSync,_0x59c8be))return[];const _0x3990cf=[];try{const _0x22d33c=await _0x529e22[_0x59084e(0x166)](readdir,_0x59c8be,{'withFileTypes':!![]});for(const _0x4d3300 of _0x22d33c){if(_0x4d3300['isDirectory']()){const _0x320462=_0x529e22['ELqLI'](join,_0x59c8be,_0x4d3300[_0x59084e(0x1b7)],_0x529e22['vKGLO']);if(existsSync(_0x320462)){let _0x3c4e8d=_0x4d3300['name'];try{const _0x5a3ee4=await _0x529e22[_0x59084e(0x166)](readFile,_0x320462,_0x529e22['MSrJm']),_0x1bb6e7=_0x5a3ee4['match'](/name:\s*(.+)/);_0x1bb6e7&&(_0x3c4e8d=_0x1bb6e7[0x1]['trim']());}catch{}_0x3990cf['push']({'name':_0x4d3300['name'],'displayName':_0x3c4e8d,'path':_0x320462,'level':_0x2e81fe});}}}}catch{return[];}return _0x3990cf;}async function getInstalledSkills(){const _0x2b0d86=_0x4c4fad,_0x405bfd={'JeZip':function(_0x4852ea,_0x4fc159,_0x500f49){return _0x4852ea(_0x4fc159,_0x500f49);},'LrHIn':'project','essns':'user'},[_0xade57f,_0x19bfe8]=await Promise[_0x2b0d86(0x1a0)]([_0x405bfd['JeZip'](getSkillsFromDir,getProjectSkillsDir(),_0x405bfd['LrHIn']),getSkillsFromDir(getUserSkillsDir(),_0x405bfd[_0x2b0d86(0x168)])]);return{'project':_0xade57f,'user':_0x19bfe8};}function _0x20fd(){const _0x565527=['status','bjYOf','qKQFZ','TZOrD','\x1b[0m','\x20\x20User-level:','Version:\x20','settingsPath','NmKml','API\x20Token:\x20✗\x20Not\x20found','\x0a\x20\x20No\x20active\x20profile\x20set','No\x20profiles\x20configured','@ranger-testing/opencode-plugin','opencode-plugin','gMWps','sEioa','wVHOb','110151MazuqD','essns','YQrxd','No\x20skills\x20installed','\x1b]8;;file://','utf-8','dNHaH',':\x20configured','PAsUw','Cdgqs','env','hasEncryptedAuth','\x20\x20\x20\x20Settings:\x20','opencode','QHInA','3647160hOCmnu','join','path','ranger@trailhead','pipe','JcxPK','kArHx','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','zVsAw','user','HyFpE','eQKMA','unknown','debug','some','\x0a---\x20OpenCode\x20Plugin\x20---','4909592OsUwCH','jVzwn','log','\x1b[1m','SKILL.md','details','not_installed','hasPlaintextAuth','gYSIz','toString','length','6123522jonOUV','wTszl','edadd','(not\x20found)','disabled','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','1270jGJXTV','\x20\x20Run:\x20ranger\x20skillup','displayName','aSLJv','RpwxI','trim','parse','1857520uWZnCm','1061680naGlZt','all','ignore','\x20\x20\x20\x20','plugin','mEGJZ','Root:\x20','rKriY','enabled','\x20\x20Project-level:','MKWPs','version','match','isActive','YNHEg','auth.json.enc','stderr','\x0a📊\x20Ranger\x20Status\x0a','7xVOAIe','\x20(up\x20to\x20date)','includes','5324896gLeKXI','configured','1kCEQxi','name','FgDDs','success'];_0x20fd=function(){return _0x565527;};return _0x20fd();}async function getEnvironments(){const _0x9d8fc3=_0x4c4fad,_0x10cab1={'bjYOf':function(_0x1d577e,_0x10ce07,_0x336920){return _0x1d577e(_0x10ce07,_0x336920);},'iIenN':_0x9d8fc3(0x1ae),'zVsAw':function(_0x21cf30,_0x1bb0be){return _0x21cf30(_0x1bb0be);},'kArHx':function(_0x59303a){return _0x59303a();}},{envNames:_0x1b7d67,activeEnv:_0x3f1f1c}=await _0x10cab1['kArHx'](getEnvNames),_0x10fefe=_0x10cab1[_0x9d8fc3(0x17c)](getRangerDir);if(!existsSync(_0x10fefe))return{'envs':[],'activeEnv':null};const _0x430184=_0x1b7d67['map'](_0xb36e95=>{const _0x5b264a=_0x9d8fc3,_0x4bb923=getEnvDir(_0xb36e95),_0x406a65=_0x10cab1[_0x5b264a(0x157)](join,_0x4bb923,'settings.json'),_0x59d972=_0x10cab1[_0x5b264a(0x157)](join,_0x4bb923,'auth.json'),_0x5700f1=join(_0x4bb923,_0x10cab1['iIenN']);return{'name':_0xb36e95,'settingsPath':_0x10cab1[_0x5b264a(0x17e)](existsSync,_0x406a65)?_0x406a65:'(not\x20found)','hasPlaintextAuth':existsSync(_0x59d972),'hasEncryptedAuth':existsSync(_0x5700f1),'isActive':_0xb36e95===_0x3f1f1c};});return{'envs':_0x430184,'activeEnv':_0x3f1f1c};}export async function status(){const _0x2e73dd=_0x4c4fad,_0x6fb2a9={'MKWPs':_0x2e73dd(0x1b0),'mEGJZ':function(_0x2c3359){return _0x2c3359();},'AWNnx':function(_0x44aa2d,_0x2f24a5){return _0x44aa2d(_0x2f24a5);},'RpwxI':function(_0x3f3c18,_0x1ebf66){return _0x3f3c18(_0x1ebf66);},'PAsUw':function(_0x555c91,_0x3ca51a){return _0x555c91(_0x3ca51a);},'wTszl':function(_0x50e370,_0x1f84ed){return _0x50e370!==_0x1f84ed;},'YNHEg':function(_0x4e3ca3,_0x47dc5d){return _0x4e3ca3(_0x47dc5d);},'gYSIz':_0x2e73dd(0x185),'dNHaH':'configured','mVrpy':function(_0x4ad5a5,_0x265757){return _0x4ad5a5(_0x265757);},'HyFpE':'@ranger-testing/opencode-plugin','EPWqc':'\x20\x20Not\x20configured','xclwm':_0x2e73dd(0x182),'NmKml':_0x2e73dd(0x1a7),'QHInA':'\x20\x20Not\x20installed','wQuTe':'\x0a---\x20Skills\x20---','PuNrI':function(_0x33c96a){return _0x33c96a();},'tgeBO':function(_0x550378,_0xd15105){return _0x550378+_0xd15105;},'rKriY':function(_0x214cd3,_0x4ff547){return _0x214cd3===_0x4ff547;},'jVzwn':_0x2e73dd(0x16a),'qKQFZ':function(_0x31f7eb,_0x3e7999,_0x671254){return _0x31f7eb(_0x3e7999,_0x671254);},'wWjTQ':function(_0x505e7c,_0x48811e){return _0x505e7c(_0x48811e);},'edadd':function(_0x27f825,_0x377958){return _0x27f825>_0x377958;},'YvXEZ':_0x2e73dd(0x15b),'Ivxdi':'encrypted','vLRhB':_0x2e73dd(0x194),'gMWps':function(_0x51bcf0,_0x11bc8a,_0x435e4f){return _0x51bcf0(_0x11bc8a,_0x435e4f);}};console['log'](_0x6fb2a9[_0x2e73dd(0x1a9)]);const _0x595e94=process['cwd'](),_0x2f3a2b=_0x6fb2a9['mEGJZ'](getRangerDir);if(!_0x6fb2a9['AWNnx'](existsSync,_0x2f3a2b)){console[_0x2e73dd(0x188)](_0x2e73dd(0x1a5)+link(_0x595e94,_0x6fb2a9['AWNnx'](bold,_0x6fb2a9[_0x2e73dd(0x19b)](basename,_0x595e94)))),console[_0x2e73dd(0x188)](_0x2e73dd(0x17d)),console[_0x2e73dd(0x188)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x2e73dd(0x1a5)+link(_0x595e94,_0x6fb2a9['PAsUw'](bold,basename(_0x595e94))));const _0x6be19f=getCurrentVersion(),_0xcfc092=getLatestVersion();if(_0xcfc092[_0x2e73dd(0x1aa)]&&_0x6fb2a9[_0x2e73dd(0x192)](_0xcfc092[_0x2e73dd(0x1aa)],_0x6be19f))console['log'](_0x2e73dd(0x15c)+_0x6be19f+'\x20(latest:\x20'+_0xcfc092[_0x2e73dd(0x1aa)]+')'),console[_0x2e73dd(0x188)]('\x20\x20Run:\x20ranger\x20update');else _0xcfc092['version']?console['log'](_0x2e73dd(0x15c)+_0x6be19f+_0x2e73dd(0x1b2)):console[_0x2e73dd(0x188)](_0x2e73dd(0x15c)+_0x6be19f);const _0x59ee2e=await _0x6fb2a9[_0x2e73dd(0x1a4)](getToken);if(_0x59ee2e){const _0x5dd421=await _0x6fb2a9[_0x2e73dd(0x1ad)](getCurrentUser,_0x59ee2e);_0x5dd421[_0x2e73dd(0x155)]?console['log']('Organization:\x20'+_0x6fb2a9[_0x2e73dd(0x16f)](bold,_0x5dd421[_0x2e73dd(0x17f)]['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x2e73dd(0x188)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x2e73dd(0x188)](_0x2e73dd(0x15f)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x2e73dd(0x171)]['DEBUG']&&(console[_0x2e73dd(0x188)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x2e73dd(0x188)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x2e73dd(0x188)](_0x6fb2a9[_0x2e73dd(0x18e)]);const _0x19d17b=await getOpencodePluginStatus();if(_0x19d17b[_0x2e73dd(0x156)]===_0x6fb2a9[_0x2e73dd(0x16d)])console[_0x2e73dd(0x188)]('\x20\x20'+_0x6fb2a9['mVrpy'](bold,_0x6fb2a9[_0x2e73dd(0x180)])+_0x2e73dd(0x16e)),_0x19d17b[_0x2e73dd(0x18b)]&&console['log']('\x20\x20'+_0x19d17b[_0x2e73dd(0x18b)]);else _0x19d17b['status']==='not_configured'?(console[_0x2e73dd(0x188)](_0x6fb2a9['EPWqc']),_0x19d17b[_0x2e73dd(0x18b)]&&console[_0x2e73dd(0x188)]('\x20\x20'+_0x19d17b[_0x2e73dd(0x18b)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x2e73dd(0x188)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x402083=await getPluginInfo('ranger@trailhead');if(_0x402083){const _0x260df4=_0x402083['scope']||_0x6fb2a9['xclwm'],_0x294660=_0x402083['enabled']?_0x6fb2a9[_0x2e73dd(0x15e)]:_0x2e73dd(0x195);console['log']('\x20\x20'+bold(_0x2e73dd(0x179))+':\x20installed\x20('+_0x260df4+',\x20'+_0x294660+')');}else console['log'](_0x6fb2a9[_0x2e73dd(0x175)]),console[_0x2e73dd(0x188)](_0x2e73dd(0x196));console['log'](_0x6fb2a9['wQuTe']);const {project:_0x4ff25c,user:_0xf40afa}=await _0x6fb2a9['PuNrI'](getInstalledSkills),_0x4c6b15=_0x4ff25c['filter'](_0x41efe9=>RANGER_MANAGED_SKILLS['includes'](_0x41efe9[_0x2e73dd(0x1b7)])),_0x56f945=_0xf40afa['filter'](_0x49af24=>RANGER_MANAGED_SKILLS['includes'](_0x49af24[_0x2e73dd(0x1b7)])),_0x3654f4=_0x6fb2a9['tgeBO'](_0x4c6b15[_0x2e73dd(0x190)],_0x56f945['length']);if(_0x6fb2a9[_0x2e73dd(0x1a6)](_0x3654f4,0x0))console[_0x2e73dd(0x188)](_0x6fb2a9[_0x2e73dd(0x187)]),console['log'](_0x2e73dd(0x198));else{if(_0x4c6b15[_0x2e73dd(0x190)]>0x0){console['log'](_0x2e73dd(0x1a8));for(const _0x14a707 of _0x4c6b15){console[_0x2e73dd(0x188)](_0x2e73dd(0x1a2)+bold(_0x14a707[_0x2e73dd(0x199)])+':\x20'+_0x6fb2a9[_0x2e73dd(0x158)](link,_0x14a707['path'],_0x6fb2a9['wWjTQ'](basename,_0x14a707[_0x2e73dd(0x178)])));}}if(_0x6fb2a9[_0x2e73dd(0x193)](_0x56f945[_0x2e73dd(0x190)],0x0)){console['log'](_0x6fb2a9['YvXEZ']);for(const _0x3972aa of _0x56f945){console[_0x2e73dd(0x188)]('\x20\x20\x20\x20'+bold(_0x3972aa['displayName'])+':\x20'+link(_0x3972aa['path'],basename(_0x3972aa[_0x2e73dd(0x178)])));}}}console[_0x2e73dd(0x188)]('\x0a---\x20Profiles\x20---');const {envs:_0x47a5c5,activeEnv:_0x285a76}=await getEnvironments();if(_0x6fb2a9['rKriY'](_0x47a5c5['length'],0x0))console[_0x2e73dd(0x188)](_0x2e73dd(0x161)),console[_0x2e73dd(0x188)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x20deea of _0x47a5c5){const _0x3a0b7b=_0x20deea[_0x2e73dd(0x1ac)]?'\x20(active)':'',_0x5bdbf4=_0x20deea[_0x2e73dd(0x172)]?_0x6fb2a9['Ivxdi']:_0x20deea[_0x2e73dd(0x18d)]?'plaintext':'none';console[_0x2e73dd(0x188)]('\x20\x20'+bold(_0x20deea[_0x2e73dd(0x1b7)])+_0x3a0b7b),console[_0x2e73dd(0x188)]('\x20\x20\x20\x20Auth:\x20'+_0x5bdbf4),_0x20deea['settingsPath']!==_0x6fb2a9['vLRhB']&&console[_0x2e73dd(0x188)](_0x2e73dd(0x173)+_0x6fb2a9[_0x2e73dd(0x164)](link,_0x20deea['settingsPath'],_0x6fb2a9['YNHEg'](basename,_0x20deea[_0x2e73dd(0x15d)])));}!_0x285a76&&(console['log'](_0x2e73dd(0x160)),console[_0x2e73dd(0x188)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x47a5c5['map'](_0x291722=>_0x291722[_0x2e73dd(0x1b7)])[_0x2e73dd(0x177)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
const _0x56c773=_0x2167;(function(_0x37c788,_0xbf72ef){const _0xd9d674=_0x2167,_0x9e5c16=_0x37c788();while(!![]){try{const _0x195c53=-parseInt(_0xd9d674(0x1a6))/0x1*(parseInt(_0xd9d674(0x177))/0x2)+-parseInt(_0xd9d674(0x1ab))/0x3+parseInt(_0xd9d674(0x17c))/0x4+parseInt(_0xd9d674(0x1a2))/0x5*(parseInt(_0xd9d674(0x1a0))/0x6)+-parseInt(_0xd9d674(0x151))/0x7*(-parseInt(_0xd9d674(0x178))/0x8)+-parseInt(_0xd9d674(0x1aa))/0x9+-parseInt(_0xd9d674(0x15f))/0xa*(parseInt(_0xd9d674(0x161))/0xb);if(_0x195c53===_0xbf72ef)break;else _0x9e5c16['push'](_0x9e5c16['shift']());}catch(_0xf9e910){_0x9e5c16['push'](_0x9e5c16['shift']());}}}(_0x27f8,0x9cf5c));import{readFile,readdir}from'fs/promises';function _0x27f8(){const _0x576572=['filter','ignore','push','gApYF','organizationName','yMTgv','join','opencode','BdLDc','status','length','LYDph','\x0a---\x20Skills\x20---','trim','\x1b[1m','\x1b[0m','isArray','22ypHsdx','9756632cKOQBm','project','QEtfi','\x20[cloud]','4122172yMGNpQ','HzIAd','eQnrf','parse','\x20\x20\x20\x20Settings:\x20','env','\x20\x20\x20\x20','IKLzY','egHzi','scope','OhAaZ','\x20(active)','data','yezJV','JhTeh','includes','gRFag','mmdff','BhIao','\x20(up\x20to\x20date)','\x20[local]','Root:\x20','PfLrO','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','qiWqo',':\x20installed\x20(','hasEncryptedAuth','version','not_configured','luvdU','uECzS','configured','ranger@trailhead','displayName','some','\x20\x20Run:\x20ranger\x20setup\x20[token]','3930VPzrIU','\x20plugin(s)\x20configured','3460YJUsCU','gPffp','\x20local','(not\x20found)','88549avpvAv','nfIOH','close','plugin','8110494hHTSVj','164697hxrTMj','sessionUpdatedAt','unknown','user','settingsPath','upAgc','debug','\x20\x20Project-level:','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','mAmmD','pbjiI','stderr','utf-8','\x0a---\x20OpenCode\x20Plugin\x20---','encrypted','\x20\x20\x20\x20Session:\x20','DUAaK','JbRhM','DEBUG','\x1b]8;;file://','stdout','Organization:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','7yrMTkm','details','pyWVa','API\x20Environment:\x20','Version:\x20','disabled','path','auth.json','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','error','No\x20profiles\x20configured','Fttuf','\x20\x20Active:\x20','name','100qbvNRS','log','143407oWgxtK','map','\x20\x20Not\x20configured','config','JGWMm'];_0x27f8=function(){return _0x576572;};return _0x27f8();}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{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x55a115=>_0x56c773(0x174)+_0x55a115+_0x56c773(0x175),link=(_0x52cb55,_0x17a6c3)=>_0x56c773(0x14d)+_0x52cb55+'\x07'+(_0x17a6c3||_0x52cb55)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1526ae=_0x56c773,_0x1b7c8c={'OhAaZ':function(_0x25f28d,_0x16d48a){return _0x25f28d>_0x16d48a;},'VvATh':function(_0x4ee501,_0x193487){return _0x4ee501(_0x193487);},'cUlht':function(_0x2d2c77,_0xe74e25,_0x599600,_0x16eb55){return _0x2d2c77(_0xe74e25,_0x599600,_0x16eb55);},'egHzi':_0x1526ae(0x1b1),'uECzS':'pipe','BdLDc':_0x1526ae(0x1a8)};return new Promise(_0x2f3af2=>{const _0xa9b130=_0x1526ae,_0x12d7e1={'yMTgv':_0xa9b130(0x19b),'QEtfi':function(_0x4ce91d,_0x142a49){const _0x392645=_0xa9b130;return _0x1b7c8c[_0x392645(0x186)](_0x4ce91d,_0x142a49);},'luvdU':function(_0x1cc376,_0x35d875){return _0x1cc376>_0x35d875;},'LYDph':function(_0x54c7e0,_0x46e7f1){return _0x1b7c8c['VvATh'](_0x54c7e0,_0x46e7f1);}},_0x565cd0=_0x1b7c8c['cUlht'](spawn,_0xa9b130(0x16d),[_0x1b7c8c[_0xa9b130(0x184)],_0xa9b130(0x164)],{'stdio':[_0xa9b130(0x167),_0x1b7c8c[_0xa9b130(0x19a)],_0x1b7c8c[_0xa9b130(0x19a)]]});let _0x51cb2c='';_0x565cd0[_0xa9b130(0x14e)]?.['on']('data',_0x31985e=>{_0x51cb2c+=_0x31985e['toString']();}),_0x565cd0[_0xa9b130(0x1b6)]?.['on'](_0xa9b130(0x188),_0x5c4d45=>{_0x51cb2c+=_0x5c4d45['toString']();}),_0x565cd0['on'](_0xa9b130(0x15a),()=>{_0x2f3af2({'status':'not_installed'});}),_0x565cd0['on'](_0x1b7c8c[_0xa9b130(0x16e)],_0x90c655=>{const _0x11f3f0=_0xa9b130,_0x530549={'BhIao':'opencode-plugin'};if(_0x90c655!==0x0){_0x2f3af2({'status':'not_installed'});return;}const _0x45691f=_0x51cb2c[_0x11f3f0(0x173)]();let _0xd992c0=null;if(_0x45691f)try{_0xd992c0=JSON['parse'](_0x45691f);}catch{const _0x5117ff=_0x45691f['match'](/\{[\s\S]*\}$/);if(_0x5117ff)try{_0xd992c0=JSON[_0x11f3f0(0x17f)](_0x5117ff[0x0]);}catch{_0xd992c0=null;}}const _0x287d68=Array[_0x11f3f0(0x176)](_0xd992c0?.[_0x11f3f0(0x1a9)])?_0xd992c0?.[_0x11f3f0(0x1a9)]:[],_0x48117e=_0x287d68[_0x11f3f0(0x19e)](_0x541f82=>{const _0xcf0ba2=_0x11f3f0;if(typeof _0x541f82!=='string')return![];return _0x541f82[_0xcf0ba2(0x18b)]('@ranger-testing/opencode-plugin')||_0x541f82['includes'](_0x530549[_0xcf0ba2(0x18e)]);});if(_0x48117e){_0x2f3af2({'status':_0x12d7e1[_0x11f3f0(0x16b)],'details':_0x12d7e1[_0x11f3f0(0x17a)](_0x287d68['length'],0x0)?_0x287d68['length']+_0x11f3f0(0x1a1):undefined});return;}if(_0x12d7e1[_0x11f3f0(0x199)](_0x287d68['length'],0x0)){_0x12d7e1[_0x11f3f0(0x171)](_0x2f3af2,{'status':'not_configured','details':_0x287d68['length']+'\x20plugin(s)\x20configured'});return;}_0x2f3af2({'status':_0x11f3f0(0x198)});});});}async function getSkillsFromDir(_0x4f9d59,_0x3f3958){const _0x32d2ec=_0x56c773,_0xd3fff9={'JGWMm':function(_0x4c5956,_0x2b3192){return _0x4c5956(_0x2b3192);},'gRFag':function(_0x4d6ee9,_0x2ceeed,_0x17c883){return _0x4d6ee9(_0x2ceeed,_0x17c883);},'yPvvK':'SKILL.md','eDxQr':function(_0x346208,_0x5cd9bb){return _0x346208(_0x5cd9bb);},'PfLrO':_0x32d2ec(0x1b7)};if(!_0xd3fff9[_0x32d2ec(0x165)](existsSync,_0x4f9d59))return[];const _0x39843e=[];try{const _0x2416a2=await _0xd3fff9[_0x32d2ec(0x18c)](readdir,_0x4f9d59,{'withFileTypes':!![]});for(const _0x3e84a0 of _0x2416a2){if(_0x3e84a0['isDirectory']()){const _0x45c3fb=join(_0x4f9d59,_0x3e84a0['name'],_0xd3fff9['yPvvK']);if(_0xd3fff9['eDxQr'](existsSync,_0x45c3fb)){let _0x396c88=_0x3e84a0['name'];try{const _0xfd890a=await readFile(_0x45c3fb,_0xd3fff9[_0x32d2ec(0x192)]),_0x220bd1=_0xfd890a['match'](/name:\s*(.+)/);_0x220bd1&&(_0x396c88=_0x220bd1[0x1][_0x32d2ec(0x173)]());}catch{}_0x39843e['push']({'name':_0x3e84a0['name'],'displayName':_0x396c88,'path':_0x45c3fb,'level':_0x3f3958});}}}}catch{return[];}return _0x39843e;}async function getInstalledSkills(){const _0x4e4ba1=_0x56c773,_0x2c993a={'HzIAd':function(_0x378ed4,_0x5b5a6a,_0x5a9c4e){return _0x378ed4(_0x5b5a6a,_0x5a9c4e);},'mAmmD':_0x4e4ba1(0x179),'pbjiI':function(_0x5e0737){return _0x5e0737();}},[_0x1fdcf3,_0x616db0]=await Promise['all']([_0x2c993a[_0x4e4ba1(0x17d)](getSkillsFromDir,getProjectSkillsDir(),_0x2c993a[_0x4e4ba1(0x1b4)]),getSkillsFromDir(_0x2c993a[_0x4e4ba1(0x1b5)](getUserSkillsDir),_0x4e4ba1(0x1ae))]);return{'project':_0x1fdcf3,'user':_0x616db0};}function _0x2167(_0x24ac71,_0x489e1e){_0x24ac71=_0x24ac71-0x148;const _0x27f8e3=_0x27f8();let _0x216727=_0x27f8e3[_0x24ac71];return _0x216727;}async function getEnvironments(){const _0x5f5cf6=_0x56c773,_0x432e2f={'eQnrf':function(_0x40bf6e,_0x52df65){return _0x40bf6e(_0x52df65);},'pyWVa':function(_0x503445,_0x2042fc,_0x54a018){return _0x503445(_0x2042fc,_0x54a018);},'gApYF':_0x5f5cf6(0x158),'mnMGH':'auth.json.enc','gPffp':function(_0x35c27b,_0x5ca6ab){return _0x35c27b(_0x5ca6ab);}},{envNames:_0x48be11,activeEnv:_0x35f3aa}=await getEnvNames(),_0x122e25=getRangerDir();if(!_0x432e2f[_0x5f5cf6(0x1a3)](existsSync,_0x122e25))return{'envs':[],'activeEnv':null};const _0x2e4616=_0x48be11[_0x5f5cf6(0x162)](_0x5a68f9=>{const _0x5d7483=_0x5f5cf6,_0x28b296=_0x432e2f[_0x5d7483(0x17e)](getEnvDir,_0x5a68f9),_0x3b4dca=_0x432e2f[_0x5d7483(0x153)](join,_0x28b296,'settings.json'),_0x3e1ea0=join(_0x28b296,_0x432e2f[_0x5d7483(0x169)]),_0x2dbf0e=join(_0x28b296,_0x432e2f['mnMGH']);return{'name':_0x5a68f9,'settingsPath':existsSync(_0x3b4dca)?_0x3b4dca:_0x5d7483(0x1a5),'hasPlaintextAuth':_0x432e2f['eQnrf'](existsSync,_0x3e1ea0),'hasEncryptedAuth':existsSync(_0x2dbf0e),'isActive':_0x5a68f9===_0x35f3aa};});return{'envs':_0x2e4616,'activeEnv':_0x35f3aa};}export async function status(){const _0x39b9de=_0x56c773,_0x2bd72b={'UqWQR':function(_0x5218d3,_0x4a2fa8,_0x149740){return _0x5218d3(_0x4a2fa8,_0x149740);},'icrAY':function(_0x26d66e){return _0x26d66e();},'JhTeh':function(_0x5654c0){return _0x5654c0();},'qiWqo':function(_0xcab379,_0x5ac238){return _0xcab379(_0x5ac238);},'upAgc':'@ranger-testing/opencode-plugin','GBgjk':_0x39b9de(0x198),'mmdff':_0x39b9de(0x19c),'yezJV':_0x39b9de(0x156),'oIQih':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','DUAaK':function(_0x5c7a73,_0x22e4c3){return _0x5c7a73+_0x22e4c3;},'YZhMO':function(_0x2377c7,_0x3d8227){return _0x2377c7===_0x3d8227;},'tLFuT':function(_0x3c0c4c,_0x40c0ef){return _0x3c0c4c>_0x40c0ef;},'JbRhM':'\x20\x20User-level:','tOqXt':function(_0x3aaa21,_0x4288d2){return _0x3aaa21(_0x4288d2);},'gObLH':function(_0x350f4d,_0x5d7eb6){return _0x350f4d(_0x5d7eb6);},'zHLJp':_0x39b9de(0x15b),'htLEC':function(_0x1ae1f5,_0x2a6b93){return _0x1ae1f5>_0x2a6b93;},'nfIOH':function(_0x21b4eb,_0x5138f1){return _0x21b4eb(_0x5138f1);},'XRFIe':'no\x20session','IKLzY':_0x39b9de(0x187),'WSIRQ':_0x39b9de(0x148),'bdhws':'plaintext','Fttuf':'none','fnyLw':function(_0x1b8060,_0x41d94c){return _0x1b8060!==_0x41d94c;}};console[_0x39b9de(0x160)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x4e07d5=process['cwd'](),_0x567fd5=getRangerDir();if(!existsSync(_0x567fd5)){console[_0x39b9de(0x160)](_0x39b9de(0x191)+_0x2bd72b['UqWQR'](link,_0x4e07d5,bold(basename(_0x4e07d5)))),console[_0x39b9de(0x160)](_0x39b9de(0x159)),console[_0x39b9de(0x160)](_0x39b9de(0x1b3));return;}console['log']('Root:\x20'+_0x2bd72b['UqWQR'](link,_0x4e07d5,bold(basename(_0x4e07d5))));const _0x4d6d23=_0x2bd72b['icrAY'](getCurrentVersion),_0x3a8099=_0x2bd72b[_0x39b9de(0x18a)](getLatestVersion);if(_0x3a8099['version']&&_0x3a8099[_0x39b9de(0x197)]!==_0x4d6d23)console['log']('Version:\x20'+_0x4d6d23+'\x20(latest:\x20'+_0x3a8099['version']+')'),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20update');else _0x3a8099['version']?console['log'](_0x39b9de(0x155)+_0x4d6d23+_0x39b9de(0x18f)):console['log']('Version:\x20'+_0x4d6d23);const _0x41ba18=await _0x2bd72b[_0x39b9de(0x18a)](getToken);if(_0x41ba18){const _0x1e654b=await getCurrentUser(_0x41ba18);_0x1e654b['success']?console['log'](_0x39b9de(0x14f)+_0x2bd72b[_0x39b9de(0x194)](bold,_0x1e654b[_0x39b9de(0x1ae)][_0x39b9de(0x16a)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x39b9de(0x160)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x39b9de(0x19f));process[_0x39b9de(0x181)][_0x39b9de(0x14c)]&&(console['log'](_0x39b9de(0x154)+getCurrentEnvironment()),console[_0x39b9de(0x160)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x39b9de(0x160)](_0x39b9de(0x1b8));const _0x5bcd5c=await getOpencodePluginStatus();if(_0x5bcd5c['status']===_0x39b9de(0x19b))console['log']('\x20\x20'+bold(_0x2bd72b[_0x39b9de(0x1b0)])+':\x20configured'),_0x5bcd5c['details']&&console['log']('\x20\x20'+_0x5bcd5c['details']);else _0x5bcd5c[_0x39b9de(0x16f)]===_0x2bd72b['GBgjk']?(console['log'](_0x39b9de(0x163)),_0x5bcd5c[_0x39b9de(0x152)]&&console[_0x39b9de(0x160)]('\x20\x20'+_0x5bcd5c[_0x39b9de(0x152)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x39b9de(0x160)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x37d74d=await getPluginInfo(_0x2bd72b['mmdff']);if(_0x37d74d){const _0x14d2ac=_0x37d74d[_0x39b9de(0x185)]||_0x39b9de(0x1ad),_0x68ac40=_0x37d74d['enabled']?'enabled':_0x2bd72b[_0x39b9de(0x189)];console['log']('\x20\x20'+bold(_0x2bd72b[_0x39b9de(0x18d)])+_0x39b9de(0x195)+_0x14d2ac+',\x20'+_0x68ac40+')');}else console[_0x39b9de(0x160)]('\x20\x20Not\x20installed'),console[_0x39b9de(0x160)](_0x2bd72b['oIQih']);console[_0x39b9de(0x160)](_0x39b9de(0x172));const {project:_0x621b1f,user:_0x5eb31a}=await _0x2bd72b[_0x39b9de(0x18a)](getInstalledSkills),_0x3af0a9=_0x621b1f[_0x39b9de(0x166)](_0x3d2508=>RANGER_MANAGED_SKILLS['includes'](_0x3d2508['name'])),_0x49ef00=_0x5eb31a[_0x39b9de(0x166)](_0x441574=>RANGER_MANAGED_SKILLS[_0x39b9de(0x18b)](_0x441574['name'])),_0x4515c7=_0x2bd72b[_0x39b9de(0x14a)](_0x3af0a9['length'],_0x49ef00['length']);if(_0x2bd72b['YZhMO'](_0x4515c7,0x0))console[_0x39b9de(0x160)]('No\x20skills\x20installed'),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3af0a9[_0x39b9de(0x170)]>0x0){console['log'](_0x39b9de(0x1b2));for(const _0x4b4d95 of _0x3af0a9){console[_0x39b9de(0x160)](_0x39b9de(0x182)+_0x2bd72b[_0x39b9de(0x194)](bold,_0x4b4d95[_0x39b9de(0x19d)])+':\x20'+link(_0x4b4d95['path'],_0x2bd72b[_0x39b9de(0x194)](basename,_0x4b4d95['path'])));}}if(_0x2bd72b['tLFuT'](_0x49ef00['length'],0x0)){console['log'](_0x2bd72b[_0x39b9de(0x14b)]);for(const _0x5482e7 of _0x49ef00){console['log'](_0x39b9de(0x182)+_0x2bd72b['tOqXt'](bold,_0x5482e7['displayName'])+':\x20'+link(_0x5482e7['path'],_0x2bd72b['gObLH'](basename,_0x5482e7[_0x39b9de(0x157)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x4460f8,activeEnv:_0x477c09}=await getEnvironments();let _0x367324=[];if(_0x41ba18)try{_0x367324=await listCloudProfiles();}catch{}const _0x2a1323=_0x4460f8[_0x39b9de(0x170)]+_0x367324[_0x39b9de(0x170)];if(_0x2a1323===0x0)console['log'](_0x2bd72b['zHLJp']),console[_0x39b9de(0x160)](_0x39b9de(0x193));else{if(_0x2a1323>0x5){const _0x31718c=[];_0x367324[_0x39b9de(0x170)]>0x0&&_0x31718c['push'](_0x367324[_0x39b9de(0x170)]+'\x20cloud'),_0x2bd72b['htLEC'](_0x4460f8['length'],0x0)&&_0x31718c[_0x39b9de(0x168)](_0x4460f8[_0x39b9de(0x170)]+_0x39b9de(0x1a4)),console['log'](_0x2a1323+'\x20profiles\x20configured\x20('+_0x31718c[_0x39b9de(0x16c)](',\x20')+')'),_0x477c09&&console['log'](_0x39b9de(0x15d)+_0x2bd72b[_0x39b9de(0x1a7)](bold,_0x477c09)),console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x574de5 of _0x367324){const _0xf352d1=_0x574de5['name']===_0x477c09?_0x39b9de(0x187):'';console['log']('\x20\x20'+bold(_0x574de5['name'])+_0x39b9de(0x17b)+_0xf352d1);const _0x510661=_0x574de5[_0x39b9de(0x1ac)]?'cached\x20(updated\x20'+_0x574de5['sessionUpdatedAt']+')':_0x2bd72b['XRFIe'];console['log'](_0x39b9de(0x149)+_0x510661);}const _0x5043cc=new Set(_0x367324['map'](_0x1aa423=>_0x1aa423[_0x39b9de(0x15e)]));for(const _0x1a4229 of _0x4460f8){if(_0x5043cc['has'](_0x1a4229[_0x39b9de(0x15e)]))continue;const _0x4bc58e=_0x1a4229['isActive']?_0x2bd72b[_0x39b9de(0x183)]:'',_0x3d8b67=_0x1a4229[_0x39b9de(0x196)]?_0x2bd72b['WSIRQ']:_0x1a4229['hasPlaintextAuth']?_0x2bd72b['bdhws']:_0x2bd72b[_0x39b9de(0x15c)];console[_0x39b9de(0x160)]('\x20\x20'+_0x2bd72b['gObLH'](bold,_0x1a4229[_0x39b9de(0x15e)])+_0x39b9de(0x190)+_0x4bc58e),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x3d8b67),_0x2bd72b['fnyLw'](_0x1a4229[_0x39b9de(0x1af)],_0x39b9de(0x1a5))&&console[_0x39b9de(0x160)](_0x39b9de(0x180)+link(_0x1a4229[_0x39b9de(0x1af)],_0x2bd72b['tOqXt'](basename,_0x1a4229['settingsPath'])));}if(!_0x477c09){console['log'](_0x39b9de(0x150));const _0x59f36f=[..._0x367324['map'](_0x344b0b=>_0x344b0b['name']),..._0x4460f8[_0x39b9de(0x166)](_0x391f66=>!_0x5043cc['has'](_0x391f66[_0x39b9de(0x15e)]))['map'](_0x190d21=>_0x190d21['name'])];console[_0x39b9de(0x160)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x59f36f[_0x39b9de(0x16c)](',\x20')+')');}}}console[_0x39b9de(0x160)]('');}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x58f103=_0xf7e3;(function(_0x237841,_0x5e5cb3){const _0x5fa71a=_0xf7e3,_0xcbadd6=_0x237841();while(!![]){try{const _0x8c4a4d=-parseInt(_0x5fa71a(0xd8))/0x1*(-parseInt(_0x5fa71a(0xf4))/0x2)+parseInt(_0x5fa71a(0xda))/0x3+parseInt(_0x5fa71a(0xe8))/0x4*(parseInt(_0x5fa71a(0xec))/0x5)+-parseInt(_0x5fa71a(0xe6))/0x6+-parseInt(_0x5fa71a(0xb3))/0x7*(parseInt(_0x5fa71a(0xeb))/0x8)+parseInt(_0x5fa71a(0xb5))/0x9*(-parseInt(_0x5fa71a(0xee))/0xa)+parseInt(_0x5fa71a(0xc8))/0xb*(-parseInt(_0x5fa71a(0xf2))/0xc);if(_0x8c4a4d===_0x5e5cb3)break;else _0xcbadd6['push'](_0xcbadd6['shift']());}catch(_0x312056){_0xcbadd6['push'](_0xcbadd6['shift']());}}}(_0x18b5,0x3d08a));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 _0x18b5(){const _0x13c145=['push','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','claude','update','pZgof','\x0aCurrent\x20version:\x20','test','\x20—\x20reinstalling\x20@','YUNeS','112ahmgic',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','153pYIHad','wDjkk','yVvAA','win32','MWZXT',').\x20Staying\x20on\x20','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','WzIbl','error','ryWud','\x0aReinstalling\x20','latest','Prerelease\x20channel\x20detected\x20(@','BzWiN','beta','npm','user','BFoot','splice','66pBqtTX','BXOIv','enpIK','active-profile.txt','kill','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','TKziF','omlnU','Attempting\x20install\x20anyway...','platform','some','jFFYF','onCMx','\x0aInstalling\x20','PxUin','project','106oCcRQY','BxEaJ','1334295rfssAh','Orklc','Update\x20failed.','active-feature.txt','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','Update\x20failed:\x20','ignore','plugin','mCgrO','timeoutMs','inherit','trim','858330fgWtxl','Xdyls','1096vVSgMQ','version','jlVvF','188008jYsyHp','7330Xwtbvj','warn','78640xRtDDO','\x20skill\x20','KsJVX','yQUhW','819768ijBBQh','ZuJeF','8796zvPdBN','RuwJY','BmjiS','\x0aCould\x20not\x20check\x20latest\x20version:\x20','--scope','EZtWY','ranger@trailhead','dTeTM','VusAH','trailhead','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','mlqkF','hCgfb','log','Ntuxb','...','opencode','Latest\x20version:\x20\x20','ELBMQ'];_0x18b5=function(){return _0x13c145;};return _0x18b5();}function _0xf7e3(_0x4bc787,_0x2c90f5){_0x4bc787=_0x4bc787-0xa5;const _0x18b590=_0x18b5();let _0xf7e312=_0x18b590[_0x4bc787];return _0xf7e312;}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x31bac2,_0x1719e6,_0x49c41f){const _0xb7c8e8=_0xf7e3,_0x1a3a0e={'pZgof':function(_0x158dda,_0x33615b,_0x9bce5d,_0x4f68ed){return _0x158dda(_0x33615b,_0x9bce5d,_0x4f68ed);},'omlnU':_0xb7c8e8(0xe0),'SgvOE':function(_0x2b0ed3,_0x207132){return _0x2b0ed3===_0x207132;},'yVvAA':function(_0x46b572,_0x3d1d60,_0xc58d88){return _0x46b572(_0x3d1d60,_0xc58d88);},'JtYBg':_0xb7c8e8(0xbd)};return new Promise(_0x2c09c5=>{const _0x49ef4e=_0xb7c8e8,_0x21221e={'dTeTM':function(_0xc3d507,_0x3adc28){return _0xc3d507===_0x3adc28;}};let _0x261c1f=![],_0x6ca1ba;const _0x54752f=_0x3ec348=>{if(_0x261c1f)return;_0x261c1f=!![],_0x6ca1ba&&clearTimeout(_0x6ca1ba),_0x2c09c5(_0x3ec348);},_0x531b9a=_0x1a3a0e[_0x49ef4e(0xae)](spawn,_0x31bac2,_0x1719e6,{'stdio':[_0x1a3a0e[_0x49ef4e(0xcf)],_0x49c41f?.['stdio']??'inherit',_0x49c41f?.['stdio']??_0x49ef4e(0xe4)],'cwd':_0x49c41f?.['cwd'],'shell':_0x1a3a0e['SgvOE'](process[_0x49ef4e(0xd1)],_0x49ef4e(0xb8))});_0x6ca1ba=_0x49c41f?.[_0x49ef4e(0xe3)]?_0x1a3a0e[_0x49ef4e(0xb7)](setTimeout,()=>{const _0x1a1877=_0x49ef4e;_0x531b9a[_0x1a1877(0xcc)](),_0x531b9a['unref'](),_0x54752f(![]);},_0x49c41f['timeoutMs']):undefined,_0x531b9a['on']('close',_0x431e45=>{const _0x315751=_0x49ef4e;_0x54752f(_0x21221e[_0x315751(0xfb)](_0x431e45,0x0));}),_0x531b9a['on'](_0x1a3a0e['JtYBg'],()=>{_0x54752f(![]);});});}export function resolveDistTag(_0x4f0e1b){const _0x543903=_0xf7e3,_0xc63c43={'hCgfb':'alpha','OyBjC':_0x543903(0xc3)};if(/-alpha\./i[_0x543903(0xb0)](_0x4f0e1b))return _0xc63c43[_0x543903(0x100)];if(/-beta\./i['test'](_0x4f0e1b))return _0xc63c43['OyBjC'];if(/-rc\./i['test'](_0x4f0e1b))return'rc';return _0x543903(0xc0);}async function runInstall(_0xd64f01='latest'){const _0x14cb85=_0xf7e3,_0x3b7a15={'YUNeS':function(_0x446ebb,_0x1b45d2){return _0x446ebb(_0x1b45d2);},'RuwJY':function(_0x586dcf,_0x466622){return _0x586dcf===_0x466622;},'Orklc':function(_0x29b96b,_0x1685b4,_0x2cc9b1,_0x2c458f){return _0x29b96b(_0x1685b4,_0x2cc9b1,_0x2c458f);},'jFFYF':_0x14cb85(0xc4),'MWZXT':'ignore','yQUhW':'close','onCMx':_0x14cb85(0xbd)};return new Promise(_0x53945f=>{const _0x15f08e=_0x14cb85,_0x5f5811={'Xdyls':function(_0x1f082e,_0x8077d0){const _0x8af685=_0xf7e3;return _0x3b7a15[_0x8af685(0xb2)](_0x1f082e,_0x8077d0);},'yetGA':function(_0x4b0ab4,_0x79823a){const _0x3f5a6c=_0xf7e3;return _0x3b7a15[_0x3f5a6c(0xf5)](_0x4b0ab4,_0x79823a);}};console[_0x15f08e(0x101)](_0x15f08e(0xd5)+PACKAGE_NAME+'@'+_0xd64f01+'...\x0a');const _0x1d46b2=_0x3b7a15[_0x15f08e(0xdb)](spawn,_0x3b7a15[_0x15f08e(0xd3)],['install','-g',PACKAGE_NAME+'@'+_0xd64f01],{'stdio':[_0x3b7a15[_0x15f08e(0xb9)],'inherit',_0x15f08e(0xe4)],'shell':process[_0x15f08e(0xd1)]==='win32'});_0x1d46b2['on'](_0x3b7a15[_0x15f08e(0xf1)],_0xbc0e04=>{const _0xbbce62=_0x15f08e;_0x5f5811[_0xbbce62(0xe7)](_0x53945f,_0x5f5811['yetGA'](_0xbc0e04,0x0));}),_0x1d46b2['on'](_0x3b7a15[_0x15f08e(0xd4)],()=>{_0x53945f(![]);});});}async function updateClaudeMarketplace(){const _0x4ed340=_0xf7e3,_0x4fa02f={'EZtWY':'claude','mbrAt':_0x4ed340(0xe1),'BXOIv':'marketplace','LvUrB':_0x4ed340(0xad),'vTxGU':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x22baae=await runCommand(_0x4fa02f[_0x4ed340(0xf9)],[_0x4fa02f['mbrAt'],_0x4fa02f[_0x4ed340(0xc9)],_0x4fa02f['LvUrB'],_0x4ed340(0xfd)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x22baae)throw new Error(_0x4fa02f['vTxGU']);}async function updateClaudePlugin(_0x31aea0=_0x58f103(0xc5)){const _0x2896ef=_0x58f103,_0x1a064e={'utFTX':_0x2896ef(0xe1),'UqQDb':_0x2896ef(0xad),'Ntuxb':'ranger@trailhead','BmjiS':'claude','BzWiN':function(_0x5183e5,_0x560df5){return _0x5183e5===_0x560df5;},'sVvVD':_0x2896ef(0xd7),'JQjFJ':'local','XgbgS':function(_0x2da183){return _0x2da183();}},_0x47df5c=[_0x1a064e['utFTX'],_0x1a064e['UqQDb'],_0x1a064e[_0x2896ef(0x102)]];_0x31aea0!==_0x2896ef(0xc5)&&_0x47df5c[_0x2896ef(0xa9)](_0x2896ef(0xf8),_0x31aea0);const _0x457430=await runCommand(_0x1a064e[_0x2896ef(0xf6)],_0x47df5c,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x1a064e[_0x2896ef(0xc2)](_0x31aea0,_0x1a064e['sVvVD'])||_0x31aea0===_0x1a064e['JQjFJ']?_0x1a064e['XgbgS'](getProjectRoot):undefined});if(!_0x457430)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x31aea0+_0x2896ef(0xab));}function isSkillInstalled(_0x23fb05,_0x57e99a,_0xa5cfb5){const _0x27bdec=_0x58f103,_0x4567ff={'OvHdZ':'opencode','BFoot':function(_0x124ae7,_0x4ef273){return _0x124ae7(_0x4ef273);},'OljRN':function(_0x327ea4,_0x4c6673,_0x350dcd){return _0x327ea4(_0x4c6673,_0x350dcd);},'mCgrO':function(_0x48044b,_0x2e3ca3){return _0x48044b(_0x2e3ca3);}},_0x33af07=_0xa5cfb5===_0x4567ff['OvHdZ']?getOpencodeSkillsDir(_0x57e99a):_0x4567ff[_0x27bdec(0xc6)](getSkillsDir,_0x57e99a),_0x349283=_0x4567ff['OljRN'](join,_0x33af07,_0x23fb05);return _0x4567ff[_0x27bdec(0xe2)](existsSync,_0x349283);}async function reinstallSkills(_0x4b1a32){const _0x112f45=_0x58f103,_0x539cc8={'zJkeg':'project','mlqkF':'user','lplIr':_0x112f45(0xac),'jlVvF':'opencode','TKziF':function(_0x40001a,_0xc58b5d,_0x2eeee6){return _0x40001a(_0xc58b5d,_0x2eeee6);},'GYICA':function(_0x219940,_0x582729){return _0x219940===_0x582729;}},_0x1e853c=[_0x539cc8['zJkeg'],_0x539cc8[_0x112f45(0xff)]],_0x434dbd=[];for(const _0x2133db of _0x1e853c){for(const _0x253500 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x253500,_0x2133db,'claude')&&_0x434dbd['push']({'skillName':_0x253500,'level':_0x2133db,'platform':_0x539cc8['lplIr']}),isSkillInstalled(_0x253500,_0x2133db,_0x112f45(0xa6))&&_0x434dbd['push']({'skillName':_0x253500,'level':_0x2133db,'platform':_0x539cc8[_0x112f45(0xea)]});}}for(const _0x17f36a of _0x1e853c){for(const _0x37e964 of DEPRECATED_SKILLS){await _0x539cc8[_0x112f45(0xce)](removeSkill,_0x37e964,_0x17f36a);}}if(_0x539cc8['GYICA'](_0x434dbd['length'],0x0)){console['log'](_0x112f45(0xde));return;}console[_0x112f45(0x101)](_0x112f45(0xbf)+_0x434dbd['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x14c44b,level:_0x5da6ad,platform:_0x32772b}of _0x434dbd){try{await installSkill(_0x14c44b,{'level':_0x5da6ad,'cliVersion':_0x4b1a32,'platform':_0x32772b});}catch(_0x232ecf){console[_0x112f45(0xed)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x32772b+'\x20'+_0x5da6ad+_0x112f45(0xef)+_0x14c44b+':',_0x232ecf);}}}async function ensureActiveProfileGitignored(){const _0x306d28=_0x58f103,_0x55b2c9={'BQocn':function(_0x569b74,_0x4573ee,_0x3cb57f){return _0x569b74(_0x4573ee,_0x3cb57f);},'BxEaJ':'.gitignore','VusAH':'utf-8','OZNwS':_0x306d28(0xcb)},_0x5b411a=_0x55b2c9['BQocn'](join,getRangerDir(),_0x55b2c9[_0x306d28(0xd9)]);if(!existsSync(_0x5b411a))return![];let _0x3eb072='';try{_0x3eb072=await readFile(_0x5b411a,_0x55b2c9[_0x306d28(0xfc)]);}catch{return![];}const _0x128763=_0x3eb072['split'](/\r?\n/);if(_0x128763[_0x306d28(0xd2)](_0xfbfd35=>_0xfbfd35['trim']()===_0x306d28(0xcb)))return![];let _0x373edc=_0x128763['findIndex'](_0x56744c=>_0x56744c[_0x306d28(0xe5)]()===_0x306d28(0xdd));_0x373edc===-0x1&&(_0x373edc=_0x128763['length']);_0x128763[_0x306d28(0xc7)](_0x373edc,0x0,_0x55b2c9['OZNwS']);let _0x19f48a=_0x128763['join']('\x0a');!_0x19f48a['endsWith']('\x0a')&&(_0x19f48a+='\x0a');try{await writeFile(_0x5b411a,_0x19f48a,_0x55b2c9[_0x306d28(0xfc)]);}catch{return![];}return!![];}export async function update(){const _0x399b7c=_0x58f103,_0x4e0899={'KsJVX':function(_0x1d3d66,_0xefd358){return _0x1d3d66!==_0xefd358;},'zwhzr':function(_0x357e72,_0xa89976){return _0x357e72(_0xa89976);},'iKysi':function(_0x43d011,_0x4db33b){return _0x43d011(_0x4db33b);},'gcJpk':function(_0x147d74){return _0x147d74();},'wDjkk':'\x0a✅\x20Update\x20complete!','BrqdQ':_0x399b7c(0xd0),'PxUin':function(_0x35d14c){return _0x35d14c();},'wKjGf':function(_0x1e5773,_0x3fc576,_0x13e4b0){return _0x1e5773(_0x3fc576,_0x13e4b0);},'ELBMQ':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','ExmGh':'trailhead','helIV':function(_0xcf8694,_0x3e0011){return _0xcf8694(_0x3e0011);},'ZuJeF':'ranger@trailhead','ItuDZ':_0x399b7c(0xbb),'pSioQ':function(_0x1b761b,_0x196e97){return _0x1b761b(_0x196e97);},'ryWud':function(_0x555e5a,_0x1d0519){return _0x555e5a===_0x1d0519;},'abCgu':'project','WzIbl':'local','enpIK':_0x399b7c(0xfe),'UoRyZ':_0x399b7c(0xcd)},_0x5ed294=getCurrentVersion();console['log'](_0x399b7c(0xaf)+_0x5ed294);const _0x13528a=resolveDistTag(_0x5ed294);if(_0x4e0899[_0x399b7c(0xf0)](_0x13528a,_0x399b7c(0xc0))){console[_0x399b7c(0x101)](_0x399b7c(0xc1)+_0x13528a+_0x399b7c(0xba)+_0x13528a+_0x399b7c(0xb1)+_0x13528a+_0x399b7c(0xa5));const _0x1f4d1d=await _0x4e0899['zwhzr'](runInstall,_0x13528a);if(!_0x1f4d1d)throw new Error('Update\x20failed\x20for\x20@'+_0x13528a+'\x20channel.');const _0x865442=getCurrentVersion();console[_0x399b7c(0x101)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x13528a+'.'),await _0x4e0899['iKysi'](reinstallSkills,_0x865442),await _0x4e0899['gcJpk'](ensureActiveProfileGitignored),console[_0x399b7c(0x101)](_0x4e0899[_0x399b7c(0xb6)]);return;}console[_0x399b7c(0x101)]('Checking\x20for\x20updates...');const _0x1551c1=getLatestVersion();let _0x2b628a=_0x5ed294;if(!_0x1551c1[_0x399b7c(0xe9)]){console[_0x399b7c(0xed)](_0x399b7c(0xf7)+_0x1551c1[_0x399b7c(0xbd)]),console['log'](_0x4e0899['BrqdQ']);const _0x516070=await _0x4e0899[_0x399b7c(0xd6)](runInstall);if(_0x516070)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x2b628a=getCurrentVersion();else throw new Error(_0x399b7c(0xdf)+_0x1551c1['error']);}else{const _0x3d47d2=_0x1551c1['version'];console['log'](_0x399b7c(0xa7)+_0x3d47d2);const _0x9c8c5c=_0x4e0899['wKjGf'](compareVersions,_0x5ed294,_0x3d47d2);if(_0x9c8c5c===0x0)console[_0x399b7c(0x101)](_0x4e0899[_0x399b7c(0xa8)]);else{if(_0x9c8c5c<0x0)console[_0x399b7c(0x101)]('\x0aYour\x20version\x20('+_0x5ed294+_0x399b7c(0xb4)+_0x3d47d2+').');else{const _0x57f9cb=await _0x4e0899['PxUin'](runInstall);if(_0x57f9cb)console['log'](_0x399b7c(0xaa)+_0x3d47d2),_0x2b628a=_0x3d47d2;else throw new Error(_0x399b7c(0xdc));}}}await reinstallSkills(_0x2b628a);const _0xa65c54=await isMarketplaceAdded(_0x4e0899['ExmGh']),_0x251e15=await _0x4e0899['helIV'](isPluginInstalled,_0x4e0899[_0x399b7c(0xf3)]);_0xa65c54&&(await updateClaudeMarketplace(),console[_0x399b7c(0x101)](_0x4e0899['ItuDZ']));if(_0x251e15){const _0x5749a6=await _0x4e0899['pSioQ'](getPluginInfo,_0x399b7c(0xfa)),_0x275228=_0x5749a6?.['scope']??_0x399b7c(0xc5);await _0x4e0899['helIV'](updateClaudePlugin,_0x275228);if(_0x4e0899[_0x399b7c(0xbe)](_0x275228,_0x4e0899['abCgu']))console[_0x399b7c(0x101)]('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x275228===_0x4e0899[_0x399b7c(0xbc)]?console[_0x399b7c(0x101)](_0x4e0899[_0x399b7c(0xca)]):console['log'](_0x4e0899['UoRyZ']);}const _0x4bea21=await _0x4e0899['gcJpk'](ensureActiveProfileGitignored);console[_0x399b7c(0x101)](_0x4e0899[_0x399b7c(0xb6)]);}
|
|
1
|
+
const _0x5f5c44=_0x1c56;(function(_0x215eb5,_0x37edaa){const _0x2ec9f9=_0x1c56,_0x3c9fb3=_0x215eb5();while(!![]){try{const _0x480042=parseInt(_0x2ec9f9(0x12c))/0x1+-parseInt(_0x2ec9f9(0x147))/0x2*(-parseInt(_0x2ec9f9(0x120))/0x3)+parseInt(_0x2ec9f9(0x11e))/0x4*(-parseInt(_0x2ec9f9(0x127))/0x5)+-parseInt(_0x2ec9f9(0x141))/0x6*(parseInt(_0x2ec9f9(0x169))/0x7)+-parseInt(_0x2ec9f9(0x160))/0x8*(-parseInt(_0x2ec9f9(0x143))/0x9)+-parseInt(_0x2ec9f9(0x129))/0xa*(-parseInt(_0x2ec9f9(0x15c))/0xb)+-parseInt(_0x2ec9f9(0x130))/0xc;if(_0x480042===_0x37edaa)break;else _0x3c9fb3['push'](_0x3c9fb3['shift']());}catch(_0x288f7b){_0x3c9fb3['push'](_0x3c9fb3['shift']());}}}(_0x50f6,0xd205d));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{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x1c56(_0x33d3c6,_0x4a5649){_0x33d3c6=_0x33d3c6-0x118;const _0x50f6e4=_0x50f6();let _0x1c5651=_0x50f6e4[_0x33d3c6];return _0x1c5651;}const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x14dcfb,_0x2b25b2,_0x3268e4){const _0x3238a8={'rGAre':function(_0x54f08c,_0x2d81a0){return _0x54f08c(_0x2d81a0);},'ctvCt':function(_0x287252,_0x2142c9,_0x238672,_0x3a7465){return _0x287252(_0x2142c9,_0x238672,_0x3a7465);},'spTcS':'win32','SkOzu':function(_0x54d6b0,_0x142b28,_0x1d5ed3){return _0x54d6b0(_0x142b28,_0x1d5ed3);},'lPZkW':'error'};return new Promise(_0x318d4d=>{const _0xdadd42=_0x1c56;let _0x5933c1=![],_0x194fec;const _0x521580=_0x531f90=>{if(_0x5933c1)return;_0x5933c1=!![],_0x194fec&&clearTimeout(_0x194fec),_0x318d4d(_0x531f90);},_0x4791ff=_0x3238a8['ctvCt'](spawn,_0x14dcfb,_0x2b25b2,{'stdio':[_0xdadd42(0x11d),_0x3268e4?.['stdio']??_0xdadd42(0x13c),_0x3268e4?.['stdio']??_0xdadd42(0x13c)],'cwd':_0x3268e4?.[_0xdadd42(0x12b)],'shell':process[_0xdadd42(0x132)]===_0x3238a8['spTcS']});_0x194fec=_0x3268e4?.[_0xdadd42(0x16f)]?_0x3238a8[_0xdadd42(0x161)](setTimeout,()=>{const _0x4bd74f=_0xdadd42;_0x4791ff[_0x4bd74f(0x15b)](),_0x4791ff[_0x4bd74f(0x11f)](),_0x521580(![]);},_0x3268e4[_0xdadd42(0x16f)]):undefined,_0x4791ff['on']('close',_0x4bf1a7=>{const _0x15b9e2=_0xdadd42;_0x3238a8[_0x15b9e2(0x171)](_0x521580,_0x4bf1a7===0x0);}),_0x4791ff['on'](_0x3238a8[_0xdadd42(0x14c)],()=>{_0x3238a8['rGAre'](_0x521580,![]);});});}export function resolveDistTag(_0x5a9748){const _0x2ff8b8=_0x1c56,_0xff965={'mapPq':_0x2ff8b8(0x139),'DnqtS':_0x2ff8b8(0x136)};if(/-alpha\./i['test'](_0x5a9748))return _0xff965['mapPq'];if(/-beta\./i['test'](_0x5a9748))return'beta';if(/-rc\./i[_0x2ff8b8(0x170)](_0x5a9748))return'rc';return _0xff965[_0x2ff8b8(0x149)];}async function runInstall(_0x5c90dd=_0x5f5c44(0x136)){const _0x24f6cc=_0x5f5c44,_0x1e906f={'YunDX':function(_0x2dcd29,_0x3f3ea6){return _0x2dcd29(_0x3f3ea6);},'cbbUY':function(_0x305003,_0x259d8f,_0x57f455,_0x323bd7){return _0x305003(_0x259d8f,_0x57f455,_0x323bd7);},'xbSHD':'npm','ZINeU':_0x24f6cc(0x119),'AsfHh':_0x24f6cc(0x11d),'OAVRG':_0x24f6cc(0x13c)};return new Promise(_0x24d72f=>{const _0x3ca8c5=_0x24f6cc,_0x2d7b0c={'qTsXj':function(_0xf71d13,_0x38987f){const _0x4c669a=_0x1c56;return _0x1e906f[_0x4c669a(0x12f)](_0xf71d13,_0x38987f);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x5c90dd+'...\x0a');const _0x3f44a4=_0x1e906f['cbbUY'](spawn,_0x1e906f[_0x3ca8c5(0x14e)],[_0x1e906f[_0x3ca8c5(0x13a)],'-g',PACKAGE_NAME+'@'+_0x5c90dd],{'stdio':[_0x1e906f['AsfHh'],_0x1e906f['OAVRG'],_0x1e906f['OAVRG']],'shell':process[_0x3ca8c5(0x132)]===_0x3ca8c5(0x165)});_0x3f44a4['on']('close',_0x27476e=>{_0x2d7b0c['qTsXj'](_0x24d72f,_0x27476e===0x0);}),_0x3f44a4['on'](_0x3ca8c5(0x13f),()=>{_0x24d72f(![]);});});}function _0x50f6(){const _0x538d79=[')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','...','SrxuY','version','SvdGy','Update\x20failed\x20for\x20@','JtTKi','nomjJ','project','.gitignore','kill','2969791kTgIQf','adpuR','\x20skill\x20','raboR','1696AxGHfp','SkOzu','urptM','SFnNw','\x0aSuccessfully\x20updated\x20to\x20version\x20','win32','YqeBq','trim','gsmiS','795557mWOFxH','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','findIndex','local','\x0a✅\x20Update\x20complete!','BhOpP','timeoutMs','test','rGAre','rOxCb','MNtnA','install',').\x20Staying\x20on\x20','uEXLx','length','ignore','668RsCGHB','unref','71427vqXOYP','Checking\x20for\x20updates...','--scope','user','ralJF','Claude\x20plugin\x20update\x20failed\x20for\x20','log','35965hWStKP','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','10fFVZmD','ixzNx','cwd','790655zgBLlS','ranger@trailhead','EFogH','YunDX','2269488zjWfxe','push','platform','BHsYP','\x20—\x20reinstalling\x20@','opencode','latest','Attempting\x20install\x20anyway...','GZfUW','alpha','ZINeU','Latest\x20version:\x20\x20','inherit','plugin','trailhead','error','endsWith','18iwlexo','SssBM','27594PsHaSK','SujIF','warn','lCxEA','74ekqcRA','utf-8','DnqtS','rxlUz','join','lPZkW','OJkWY','xbSHD','active-feature.txt','lmJJL'];_0x50f6=function(){return _0x538d79;};return _0x50f6();}async function updateClaudeMarketplace(){const _0x35cc72=_0x5f5c44,_0xa5625c={'OJkWY':_0x35cc72(0x13d),'RjCId':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x3c79c6=await runCommand('claude',[_0xa5625c[_0x35cc72(0x14d)],'marketplace','update',_0x35cc72(0x13e)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x3c79c6)throw new Error(_0xa5625c['RjCId']);}async function updateClaudePlugin(_0x16d881='user'){const _0x50b57f=_0x5f5c44,_0x1b2b5a={'SssBM':_0x50b57f(0x13d),'urptM':_0x50b57f(0x12d),'MNtnA':function(_0x4abb70,_0xbb4835){return _0x4abb70!==_0xbb4835;},'SrxuY':_0x50b57f(0x122),'ralJF':function(_0x4078e2,_0x5b89cb,_0x179c47,_0x334927){return _0x4078e2(_0x5b89cb,_0x179c47,_0x334927);},'lCxEA':'claude','dszqv':_0x50b57f(0x16c)},_0x55aa02=[_0x1b2b5a[_0x50b57f(0x142)],'update',_0x1b2b5a[_0x50b57f(0x162)]];_0x1b2b5a[_0x50b57f(0x118)](_0x16d881,'user')&&_0x55aa02['push'](_0x1b2b5a[_0x50b57f(0x153)],_0x16d881);const _0x1bb7b=await _0x1b2b5a[_0x50b57f(0x124)](runCommand,_0x1b2b5a[_0x50b57f(0x146)],_0x55aa02,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x16d881===_0x50b57f(0x159)||_0x16d881===_0x1b2b5a['dszqv']?getProjectRoot():undefined});if(!_0x1bb7b)throw new Error(_0x50b57f(0x125)+_0x16d881+_0x50b57f(0x128));}function isSkillInstalled(_0xb6270a,_0x2419d4,_0x1ca16d){const _0x56a86e=_0x5f5c44,_0x27d2dc={'raboR':function(_0x452cae,_0x3ae9a7){return _0x452cae(_0x3ae9a7);}},_0x5b964e=_0x1ca16d===_0x56a86e(0x135)?_0x27d2dc[_0x56a86e(0x15f)](getOpencodeSkillsDir,_0x2419d4):getSkillsDir(_0x2419d4),_0x1cc380=join(_0x5b964e,_0xb6270a);return existsSync(_0x1cc380);}async function reinstallSkills(_0xa4f7a3){const _0xdbdc81=_0x5f5c44,_0x34aa4a={'BhOpP':_0xdbdc81(0x159),'EFogH':'claude','lmJJL':_0xdbdc81(0x135),'GZfUW':function(_0x4d1fad,_0x3b1062,_0x5a3304){return _0x4d1fad(_0x3b1062,_0x5a3304);}},_0x118963=[_0x34aa4a[_0xdbdc81(0x16e)],_0xdbdc81(0x123)],_0x1e6a34=[];for(const _0x4673e1 of _0x118963){for(const _0x4ad742 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x4ad742,_0x4673e1,'claude')&&_0x1e6a34[_0xdbdc81(0x131)]({'skillName':_0x4ad742,'level':_0x4673e1,'platform':_0x34aa4a[_0xdbdc81(0x12e)]}),isSkillInstalled(_0x4ad742,_0x4673e1,_0x34aa4a['lmJJL'])&&_0x1e6a34[_0xdbdc81(0x131)]({'skillName':_0x4ad742,'level':_0x4673e1,'platform':_0x34aa4a[_0xdbdc81(0x150)]});}}for(const _0x2db705 of _0x118963){for(const _0x30c907 of DEPRECATED_SKILLS){await _0x34aa4a[_0xdbdc81(0x138)](removeSkill,_0x30c907,_0x2db705);}}if(_0x1e6a34['length']===0x0){console[_0xdbdc81(0x126)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console[_0xdbdc81(0x126)]('\x0aReinstalling\x20'+_0x1e6a34[_0xdbdc81(0x11c)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x272c9b,level:_0x1661b5,platform:_0x51f8be}of _0x1e6a34){try{await installSkill(_0x272c9b,{'level':_0x1661b5,'cliVersion':_0xa4f7a3,'platform':_0x51f8be});}catch(_0x1451e7){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x51f8be+'\x20'+_0x1661b5+_0xdbdc81(0x15e)+_0x272c9b+':',_0x1451e7);}}}async function ensureActiveProfileGitignored(){const _0x3c2943=_0x5f5c44,_0x5d6e82={'YrJzG':function(_0x20a6ed){return _0x20a6ed();},'KaZRD':_0x3c2943(0x15a),'xedAF':function(_0x16b15e,_0xe01bb){return _0x16b15e(_0xe01bb);},'LXVCc':'utf-8','xmUVn':function(_0x513897,_0x12541a){return _0x513897===_0x12541a;},'SZmBH':'active-profile.txt','eNwDD':function(_0x2155d8,_0x48c56f,_0x16a31c,_0x5a618c){return _0x2155d8(_0x48c56f,_0x16a31c,_0x5a618c);}},_0x58c021=join(_0x5d6e82['YrJzG'](getRangerDir),_0x5d6e82['KaZRD']);if(!_0x5d6e82['xedAF'](existsSync,_0x58c021))return![];let _0x3385b2='';try{_0x3385b2=await readFile(_0x58c021,_0x5d6e82['LXVCc']);}catch{return![];}const _0x40d60c=_0x3385b2['split'](/\r?\n/);if(_0x40d60c['some'](_0x507c19=>_0x507c19[_0x3c2943(0x167)]()==='active-profile.txt'))return![];let _0x168d21=_0x40d60c[_0x3c2943(0x16b)](_0x353ca7=>_0x353ca7[_0x3c2943(0x167)]()===_0x3c2943(0x14f));_0x5d6e82['xmUVn'](_0x168d21,-0x1)&&(_0x168d21=_0x40d60c[_0x3c2943(0x11c)]);_0x40d60c['splice'](_0x168d21,0x0,_0x5d6e82['SZmBH']);let _0x16f6d1=_0x40d60c[_0x3c2943(0x14b)]('\x0a');!_0x16f6d1[_0x3c2943(0x140)]('\x0a')&&(_0x16f6d1+='\x0a');try{await _0x5d6e82['eNwDD'](writeFile,_0x58c021,_0x16f6d1,_0x3c2943(0x148));}catch{return![];}return!![];}export async function update(){const _0x5a0a0f=_0x5f5c44,_0x516c78={'SFnNw':function(_0x40e356){return _0x40e356();},'adpuR':_0x5a0a0f(0x121),'iUHuQ':_0x5a0a0f(0x137),'ixzNx':function(_0x5f72cb){return _0x5f72cb();},'nomjJ':function(_0x202710){return _0x202710();},'rOxCb':function(_0x3a3b5c,_0x58cefd){return _0x3a3b5c===_0x58cefd;},'SujIF':function(_0x4812f6,_0x130c7c){return _0x4812f6<_0x130c7c;},'JtTKi':function(_0x4015e0,_0x36c63d){return _0x4015e0(_0x36c63d);},'gsmiS':function(_0x154943,_0x10eb2f){return _0x154943(_0x10eb2f);},'moqdy':function(_0x3994a6,_0x2508a2){return _0x3994a6(_0x2508a2);},'kYYPJ':_0x5a0a0f(0x123),'iAtVG':function(_0x538020,_0x47137a){return _0x538020(_0x47137a);},'rxlUz':_0x5a0a0f(0x159),'SvdGy':'\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','YqeBq':_0x5a0a0f(0x16c),'uEXLx':'\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','BHsYP':_0x5a0a0f(0x16d)},_0x1202d0=getCurrentVersion();console[_0x5a0a0f(0x126)]('\x0aCurrent\x20version:\x20'+_0x1202d0);const _0x599e29=resolveDistTag(_0x1202d0);if(_0x599e29!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x599e29+_0x5a0a0f(0x11a)+_0x599e29+_0x5a0a0f(0x134)+_0x599e29+_0x5a0a0f(0x152));const _0x2fb112=await runInstall(_0x599e29);if(!_0x2fb112)throw new Error(_0x5a0a0f(0x156)+_0x599e29+'\x20channel.');const _0x19c10c=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x599e29+'.'),await reinstallSkills(_0x19c10c),await _0x516c78[_0x5a0a0f(0x163)](ensureActiveProfileGitignored),console['log'](_0x5a0a0f(0x16d));return;}console['log'](_0x516c78[_0x5a0a0f(0x15d)]);const _0x5bbd9f=getLatestVersion();let _0x424b48=_0x1202d0;if(!_0x5bbd9f[_0x5a0a0f(0x154)]){console[_0x5a0a0f(0x145)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x5bbd9f[_0x5a0a0f(0x13f)]),console[_0x5a0a0f(0x126)](_0x516c78['iUHuQ']);const _0x225dc2=await _0x516c78[_0x5a0a0f(0x12a)](runInstall);if(_0x225dc2)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x424b48=_0x516c78[_0x5a0a0f(0x158)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5bbd9f[_0x5a0a0f(0x13f)]);}else{const _0x2b8d13=_0x5bbd9f['version'];console['log'](_0x5a0a0f(0x13b)+_0x2b8d13);const _0x3c349c=compareVersions(_0x1202d0,_0x2b8d13);if(_0x516c78[_0x5a0a0f(0x172)](_0x3c349c,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x516c78[_0x5a0a0f(0x144)](_0x3c349c,0x0))console['log']('\x0aYour\x20version\x20('+_0x1202d0+_0x5a0a0f(0x151)+_0x2b8d13+').');else{const _0x3516a4=await runInstall();if(_0x3516a4)console[_0x5a0a0f(0x126)](_0x5a0a0f(0x164)+_0x2b8d13),_0x424b48=_0x2b8d13;else throw new Error('Update\x20failed.');}}}await _0x516c78[_0x5a0a0f(0x157)](reinstallSkills,_0x424b48);const _0x48c39c=await _0x516c78[_0x5a0a0f(0x168)](isMarketplaceAdded,'trailhead'),_0x2e8bb5=await _0x516c78['moqdy'](isPluginInstalled,'ranger@trailhead');_0x48c39c&&(await _0x516c78[_0x5a0a0f(0x158)](updateClaudeMarketplace),console['log'](_0x5a0a0f(0x16a)));if(_0x2e8bb5){const _0x285e37=await _0x516c78['gsmiS'](getPluginInfo,_0x5a0a0f(0x12d)),_0xe528bc=_0x285e37?.['scope']??_0x516c78['kYYPJ'];await _0x516c78['iAtVG'](updateClaudePlugin,_0xe528bc);if(_0xe528bc===_0x516c78[_0x5a0a0f(0x14a)])console['log'](_0x516c78[_0x5a0a0f(0x155)]);else _0xe528bc===_0x516c78[_0x5a0a0f(0x166)]?console['log'](_0x516c78[_0x5a0a0f(0x11b)]):console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).');}const _0x489b06=await ensureActiveProfileGitignored();console['log'](_0x516c78[_0x5a0a0f(0x133)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x375c(_0x137e5c,_0x37e5c2){_0x137e5c=_0x137e5c-0x161;const _0x14cf63=_0x14cf();let _0x375ca3=_0x14cf63[_0x137e5c];return _0x375ca3;}(function(_0x5627a3,_0x4ad624){const _0xc36a8f=_0x375c,_0x143d36=_0x5627a3();while(!![]){try{const _0x387465=parseInt(_0xc36a8f(0x171))/0x1+-parseInt(_0xc36a8f(0x177))/0x2*(-parseInt(_0xc36a8f(0x162))/0x3)+parseInt(_0xc36a8f(0x16a))/0x4*(parseInt(_0xc36a8f(0x170))/0x5)+-parseInt(_0xc36a8f(0x17e))/0x6*(parseInt(_0xc36a8f(0x16b))/0x7)+parseInt(_0xc36a8f(0x16f))/0x8+parseInt(_0xc36a8f(0x17c))/0x9+-parseInt(_0xc36a8f(0x16d))/0xa;if(_0x387465===_0x4ad624)break;else _0x143d36['push'](_0x143d36['shift']());}catch(_0x4bcaee){_0x143d36['push'](_0x143d36['shift']());}}}(_0x14cf,0x7ad29));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';function _0x14cf(){const _0x17863a=['log','Create\x20it\x20with:\x0a','Profile\x20\x22','✓\x20Session\x20refreshed\x20for\x20\x22','eLBrp','2jqxvYD','Refreshing\x20session\x20for\x20\x22','muzFU','Re-create\x20it\x20with:\x0a','Run\x20`ranger\x20profile\x20update\x20','4506273MgutDD','BtlyI','6MARgZv','\x22\x20via\x20server-side\x20login...','FYgLv','Dwwhz','XoElc','\x20\x20ranger\x20profile\x20add\x20','environmentKey','BmlJU','local','2741559kLopda','HtvUb','success','BipGr','error','test_output','status','exit','1256468biQcoZ','2839599skuoJI','iMECt','25405840FblXRe','message','4588808Ouujkd','15SEyayu','518820bnmzMP'];_0x14cf=function(){return _0x17863a;};return _0x14cf();}import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x4b3386,_0x1d8bd0,_0x5f352c){const _0x486310=_0x375c,_0x569234={'HtvUb':function(_0x3b609a,_0x5a797b){return _0x3b609a(_0x5a797b);},'XoElc':function(_0x4a554a){return _0x4a554a();},'iMECt':function(_0x1b18f7,_0x11fde8){return _0x1b18f7===_0x11fde8;},'FYgLv':'legacy','Dwwhz':function(_0x4c805d,_0x29460e){return _0x4c805d===_0x29460e;},'qsYGU':_0x486310(0x161),'nYzyX':function(_0x4e945c,_0x3e2639){return _0x4e945c===_0x3e2639;},'DBkfz':function(_0x2696d3,_0x203d5d){return _0x2696d3+_0x203d5d;},'BipGr':function(_0x4f5076,_0xa7bddb){return _0x4f5076+_0xa7bddb;},'muzFU':function(_0x153be7){return _0x153be7();},'WLvpO':function(_0x2082e8,_0x4d32d7,_0x18133f){return _0x2082e8(_0x4d32d7,_0x18133f);},'LzvdQ':_0x486310(0x164),'uLSLO':'not_configured','QVRuW':'\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','BmlJU':'\x20\x20Falling\x20back\x20to\x20headed\x20browser...','WSvqW':function(_0x523374,_0x369828){return _0x523374 instanceof _0x369828;},'eLBrp':function(_0x138596,_0x3c9916){return _0x138596+_0x3c9916;},'BtlyI':function(_0x5f400d,_0x5e244c,_0x4f5814){return _0x5f400d(_0x5e244c,_0x4f5814);}},_0x342645=await _0x569234[_0x486310(0x163)](fetchCloudProfile,_0x4b3386);if(!_0x342645){const {envTypes:_0x11c626}=await _0x569234[_0x486310(0x182)](getEnvNames),_0x255d0a=_0x11c626[_0x4b3386];(_0x569234[_0x486310(0x16c)](_0x255d0a,_0x569234[_0x486310(0x180)])||_0x569234[_0x486310(0x181)](_0x255d0a,_0x569234['qsYGU'])||_0x569234['nYzyX'](_0x255d0a,'ci'))&&(console[_0x486310(0x166)](_0x569234['DBkfz'](_0x569234[_0x486310(0x165)](_0x486310(0x174)+_0x4b3386+'\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a'+'Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','\x0a'),'\x20\x20ranger\x20profile\x20add\x20'+_0x4b3386+'\x0a')),process[_0x486310(0x169)](0x1));}!_0x342645&&(console['error']('No\x20profile\x20named\x20\x22'+_0x4b3386+'\x22\x20found.\x0a'+_0x486310(0x173)+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x4b3386+'\x0a')),process[_0x486310(0x169)](0x1));const _0x3c3efa=await _0x569234[_0x486310(0x179)](fetchAuthConfig)['catch'](()=>null),_0x2ae7fa=_0x342645[_0x486310(0x184)]&&_0x3c3efa?_0x569234['WLvpO'](resolveAuthEnvironmentLocally,_0x3c3efa,_0x342645[_0x486310(0x184)]):null;if(_0x342645['environmentKey']&&_0x2ae7fa){console['log'](_0x486310(0x178)+_0x4b3386+_0x486310(0x17f));try{const _0x4b5804=await _0x569234['WLvpO'](serverSideLogin,_0x4b3386,{'force':!![]});if(_0x4b5804['status']===_0x569234['LzvdQ']){console['log'](_0x486310(0x175)+_0x4b3386+'\x22.');return;}_0x4b5804[_0x486310(0x168)]===_0x569234['uLSLO']?console['log'](_0x569234['QVRuW']):(_0x4b5804[_0x486310(0x167)]&&(console[_0x486310(0x172)]('\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:'),console[_0x486310(0x172)](_0x4b5804[_0x486310(0x167)])),console['log'](_0x569234['BmlJU']));}catch(_0x517814){console[_0x486310(0x172)]('\x20\x20Server-side\x20login\x20error:\x20'+(_0x569234['WSvqW'](_0x517814,Error)?_0x517814[_0x486310(0x16e)]:_0x569234[_0x486310(0x163)](String,_0x517814))),console['log'](_0x569234[_0x486310(0x185)]);}}const _0x19c67d=_0x342645['settings']??{},_0x2a3e4a=_0x19c67d['setupHeaders'],_0x4ba3e5=_0x19c67d['baseUrl'],_0x378da9=_0x2ae7fa?{..._0x2ae7fa,'setupHeaders':_0x2a3e4a??_0x2ae7fa['setupHeaders']}:_0x4ba3e5?{'key':_0x342645['environmentKey']??'','domains':[_0x4ba3e5],'setupHeaders':_0x2a3e4a}:null;!_0x378da9&&(console[_0x486310(0x166)](_0x569234['BipGr']('Profile\x20\x22'+_0x4b3386+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a',_0x486310(0x17a))+'\x0a'+(_0x486310(0x183)+_0x4b3386+'\x20--url\x20<your-app-url>\x0a')),process[_0x486310(0x169)](0x1)),!_0x569234['XoElc'](isInteractive)&&(console['error'](_0x569234[_0x486310(0x176)]('Can\x27t\x20refresh\x20\x22'+_0x4b3386+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a',_0x486310(0x17b)+_0x4b3386+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x486310(0x169)](0x1)),console['log']('Capturing\x20a\x20fresh\x20session\x20for\x20\x22'+_0x4b3386+'\x22\x20via\x20headed\x20browser...'),await _0x569234[_0x486310(0x17d)](manualBrowserLogin,_0x342645,_0x378da9),console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x4b3386+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14189b,_0x3ec4b1){const _0x324ef4=_0xd4a8,_0x377b6d=_0x14189b();while(!![]){try{const _0x3441b5=parseInt(_0x324ef4(0x1c1))/0x1+-parseInt(_0x324ef4(0x1ba))/0x2+-parseInt(_0x324ef4(0x1b8))/0x3+-parseInt(_0x324ef4(0x1c3))/0x4+parseInt(_0x324ef4(0x1be))/0x5*(-parseInt(_0x324ef4(0x1c7))/0x6)+-parseInt(_0x324ef4(0x1ca))/0x7*(parseInt(_0x324ef4(0x1b9))/0x8)+-parseInt(_0x324ef4(0x1c0))/0x9*(-parseInt(_0x324ef4(0x1bf))/0xa);if(_0x3441b5===_0x3ec4b1)break;else _0x377b6d['push'](_0x377b6d['shift']());}catch(_0x552151){_0x377b6d['push'](_0x377b6d['shift']());}}}(_0x2e30,0x33e10));function _0x2e30(){const _0x21a27b=['1604980KoSGPk','status','settings.json','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','174aRcSKM','\x0a✓\x20Now\x20using\x20profile\x20\x22','fxgSM','7eLPsXc','`\x20to\x20create\x20one.','CNUYE','693333lovKGY','1466984iAJiwO','516132VuJVvs','Profile\x20\x22','dgkao','ewzLc','10695dQMvMn','6410MChrCL','14733YEfIVk','299005ztGlQE','log'];_0x2e30=function(){return _0x21a27b;};return _0x2e30();}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0xd4a8(_0x5a56ff,_0x52daf4){_0x5a56ff=_0x5a56ff-0x1b7;const _0x2e3039=_0x2e30();let _0xd4a828=_0x2e3039[_0x5a56ff];return _0xd4a828;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x47b3ae){const _0x529f6c=_0xd4a8,_0x16e4ee={'dgkao':function(_0x796b8c,_0x27fe60){return _0x796b8c(_0x27fe60);},'TCpmH':function(_0x5a8e30,_0x43de95,_0x47db57){return _0x5a8e30(_0x43de95,_0x47db57);},'fxgSM':_0x529f6c(0x1c5),'mjxIS':function(_0x47aada,_0x588c9d){return _0x47aada(_0x588c9d);},'pKzNJ':function(_0x24ed51,_0x1ed2d5){return _0x24ed51 instanceof _0x1ed2d5;},'CNUYE':function(_0x5571d2,_0x5c1a29){return _0x5571d2===_0x5c1a29;},'ewzLc':function(_0x2beafd,_0x3901c6){return _0x2beafd+_0x3901c6;}},_0x349fed=_0x16e4ee[_0x529f6c(0x1bc)](getEnvDir,_0x47b3ae),_0x57f928=_0x16e4ee['TCpmH'](join,_0x349fed,_0x16e4ee[_0x529f6c(0x1c9)]),_0x693c7e=existsSync(_0x349fed)&&_0x16e4ee[_0x529f6c(0x1bc)](existsSync,_0x57f928);if(_0x693c7e){await _0x16e4ee['mjxIS'](writeActiveProfileName,_0x47b3ae),console[_0x529f6c(0x1c2)](_0x529f6c(0x1c8)+_0x47b3ae+'\x22');return;}let _0x1c10b2=null,_0x2f46d2=![];try{_0x1c10b2=await fetchCloudProfile(_0x47b3ae);if(!_0x1c10b2)_0x2f46d2=!![];}catch(_0x5e9c3d){_0x16e4ee['pKzNJ'](_0x5e9c3d,ApiError)&&_0x16e4ee[_0x529f6c(0x1b7)](_0x5e9c3d[_0x529f6c(0x1c4)],0x194)&&(_0x2f46d2=!![]);}if(_0x2f46d2)throw new Error(_0x16e4ee[_0x529f6c(0x1bd)](_0x16e4ee[_0x529f6c(0x1bd)](_0x529f6c(0x1bb)+_0x47b3ae+_0x529f6c(0x1c6),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),'`ranger\x20profile\x20add\x20'+_0x47b3ae+_0x529f6c(0x1cb)));await writeActiveProfileName(_0x47b3ae),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x47b3ae+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4dab3d=_0x4b15;(function(_0x30a253,_0x192811){const _0x655474=_0x4b15,_0x4c51ec=_0x30a253();while(!![]){try{const _0x3ebedd=parseInt(_0x655474(0x1d1))/0x1+-parseInt(_0x655474(0x1d2))/0x2*(-parseInt(_0x655474(0x1cd))/0x3)+-parseInt(_0x655474(0x1cb))/0x4+-parseInt(_0x655474(0x1cf))/0x5*(parseInt(_0x655474(0x1ce))/0x6)+-parseInt(_0x655474(0x1d3))/0x7*(-parseInt(_0x655474(0x1c9))/0x8)+parseInt(_0x655474(0x1d5))/0x9+-parseInt(_0x655474(0x1d4))/0xa;if(_0x3ebedd===_0x192811)break;else _0x4c51ec['push'](_0x4c51ec['shift']());}catch(_0xcfe730){_0x4c51ec['push'](_0x4c51ec['shift']());}}}(_0x4ec7,0xb81c5));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0x4dab3d(0x1cc),LEGACY_ACTIVE_ENV_FILE=_0x4dab3d(0x1ca);function readLegacyActiveProfileFile(){const _0x45f557={'yLtOH':function(_0x4a4a5c){return _0x4a4a5c();},'cqIzs':function(_0x5aad37,_0x59fcc9,_0x2f88d9){return _0x5aad37(_0x59fcc9,_0x2f88d9);}},_0x401c76=[join(_0x45f557['yLtOH'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE),_0x45f557['cqIzs'](join,getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x3325b7 of _0x401c76){if(existsSync(_0x3325b7))return _0x3325b7;}return null;}export async function readActiveProfileName(){const _0x166e51=_0x4dab3d,_0x448f91={'mfFma':function(_0x1fe3c2,_0x579703){return _0x1fe3c2(_0x579703);},'fgLVW':function(_0xa7131e,_0x81571f,_0x4099d9){return _0xa7131e(_0x81571f,_0x4099d9);},'fqXeH':_0x166e51(0x1c8)},_0x445da5=_0x448f91[_0x166e51(0x1d0)](readLastProfile,process['cwd']());if(_0x445da5)return _0x445da5;const _0x3bbeab=readLegacyActiveProfileFile();if(!_0x3bbeab)return null;try{return(await _0x448f91['fgLVW'](readFile,_0x3bbeab,_0x448f91[_0x166e51(0x1d6)]))['trim']()||null;}catch{return null;}}function _0x4b15(_0x3f0a01,_0x47a3d6){_0x3f0a01=_0x3f0a01-0x1c8;const _0x4ec761=_0x4ec7();let _0x4b1545=_0x4ec761[_0x3f0a01];return _0x4b1545;}function _0x4ec7(){const _0x6a3d3e=['161NCrYps','11913140XJuQAO','4367034STDzif','fqXeH','cwd','utf-8','369920FsTDbc','active-env.txt','2733504MJmuZx','active-profile.txt','3703719hmpJis','12234WoGCtn','3235jdDRCB','mfFma','1164721IUWvLw','2ZGaiqB'];_0x4ec7=function(){return _0x6a3d3e;};return _0x4ec7();}export async function writeActiveProfileName(_0x48aeb4){const _0x1bfda7=_0x4dab3d,_0x4c4cd9={'RJFkg':function(_0x213398,_0x3aabe8,_0x2896b8){return _0x213398(_0x3aabe8,_0x2896b8);}};_0x4c4cd9['RJFkg'](writeLastProfile,process[_0x1bfda7(0x1d7)](),_0x48aeb4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5e6740=_0x21ca;function _0x21ca(_0x254fe3,_0x3f3500){_0x254fe3=_0x254fe3-0x189;const _0x5313b0=_0x5313();let _0x21ca05=_0x5313b0[_0x254fe3];return _0x21ca05;}(function(_0x5b0cde,_0x81068e){const _0x2315fa=_0x21ca,_0x18c935=_0x5b0cde();while(!![]){try{const _0x6af349=parseInt(_0x2315fa(0x19f))/0x1+parseInt(_0x2315fa(0x18a))/0x2*(parseInt(_0x2315fa(0x18f))/0x3)+parseInt(_0x2315fa(0x1a7))/0x4+-parseInt(_0x2315fa(0x196))/0x5*(parseInt(_0x2315fa(0x19e))/0x6)+-parseInt(_0x2315fa(0x197))/0x7*(parseInt(_0x2315fa(0x1b5))/0x8)+parseInt(_0x2315fa(0x1ba))/0x9*(parseInt(_0x2315fa(0x1a4))/0xa)+-parseInt(_0x2315fa(0x1c0))/0xb;if(_0x6af349===_0x81068e)break;else _0x18c935['push'](_0x18c935['shift']());}catch(_0xba9b90){_0x18c935['push'](_0x18c935['shift']());}}}(_0x5313,0xdbc1e));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';function _0x5313(){const _0x4799e5=['AqpgB','TMPDIR','3717240gXCiLg','XDG_CACHE_HOME','yPHBM','3271100ENdhfh','win32','npm_config_userconfig','USERPROFILE','NPM_CONFIG_PREFIX','/usr/bin','kTuCz','ciLrx','platform','uTZXW','NODE_ENV','RANGER_DISABLE_MCP','NPM_CONFIG_CACHE','fromEntries','96LATLuk','entries','NPM_CONFIG_USERCONFIG','CHROMIUM_BIN','push','18jAUOIN','join','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','HOME','includes','add','7848313fKereI','RANGER_TEST_SKIP_BROWSER_WAIT','byokEnabled','msTDK','EUrsh','2353402OHOQot','tZuZm','TEMP','split','CHROME_BIN','3PgIxhr','npm_config_prefix','NPM_CONFIG_REGISTRY','/bin','sessionToken','XDG_CONFIG_HOME','slice','1247750BTRnXB','381773TngwgU','set','length','filter','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','env','${PATH}','30cqftiP','777903cWOicO','map','toLowerCase'];_0x5313=function(){return _0x4799e5;};return _0x5313();}import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0x5e6740(0x1bd),_0x5e6740(0x1a3),'TMP',_0x5e6740(0x18c),_0x5e6740(0x1aa),'APPDATA','LOCALAPPDATA',_0x5e6740(0x1a5),_0x5e6740(0x194),'PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x5e6740(0x18e),_0x5e6740(0x1b8),'npm_config_cache',_0x5e6740(0x1b3),_0x5e6740(0x1a9),_0x5e6740(0x1b7),_0x5e6740(0x190),_0x5e6740(0x1ab),'npm_config_registry',_0x5e6740(0x191),'DEBUG',_0x5e6740(0x1b1),_0x5e6740(0x1c1),_0x5e6740(0x1b2),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x5e6740(0x19d),'$PATH','%PATH%'];function parseCustomHeaders(_0x35aaf3){const _0x528db2=_0x5e6740,_0x262f5f={'tZuZm':function(_0x4ec529,_0x513bde){return _0x4ec529===_0x513bde;}};if(!_0x35aaf3)return[];return _0x35aaf3[_0x528db2(0x18d)](/\r?\n/)['map'](_0x225812=>_0x225812['trim']())[_0x528db2(0x19a)](Boolean)[_0x528db2(0x1a0)](_0x3d7948=>{const _0x7fafe1=_0x528db2,_0x9a4323=_0x3d7948['indexOf'](':');if(_0x262f5f[_0x7fafe1(0x18b)](_0x9a4323,-0x1))return null;const _0x3981e5=_0x3d7948['slice'](0x0,_0x9a4323)['trim'](),_0x38ad19=_0x3d7948[_0x7fafe1(0x195)](_0x9a4323+0x1)['trim']();if(!_0x3981e5)return null;return[_0x3981e5,_0x38ad19];})['filter'](_0x5cbb74=>_0x5cbb74!==null);}export function getAgentPathHealthWarning(_0xc2e503,_0x9d9a3f=process[_0x5e6740(0x1af)]){const _0x2d6a93=_0x5e6740,_0x3179fa={'rzgkH':function(_0x3ef507,_0x4f8e3b){return _0x3ef507||_0x4f8e3b;},'AcPSP':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','ciLrx':_0x2d6a93(0x1bc),'AqpgB':function(_0x383f26,_0xf8d7c8){return _0x383f26!==_0xf8d7c8;},'qDIMV':_0x2d6a93(0x1a8),'Vsugy':_0x2d6a93(0x1ac),'Rxkvm':_0x2d6a93(0x192),'kTuCz':_0x2d6a93(0x19b)},_0x2bb531=[],_0x439ee4=_0x3179fa['rzgkH'](_0xc2e503,'')[_0x2d6a93(0x18d)](delimiter)[_0x2d6a93(0x19a)](Boolean);_0x439ee4[_0x2d6a93(0x199)]===0x0&&_0x2bb531[_0x2d6a93(0x1b9)](_0x3179fa['AcPSP']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x352744=>(_0xc2e503||'')['includes'](_0x352744))&&_0x2bb531[_0x2d6a93(0x1b9)](_0x3179fa[_0x2d6a93(0x1ae)]);if(_0x3179fa[_0x2d6a93(0x1a2)](_0x9d9a3f,_0x3179fa['qDIMV'])){const _0x3bd17c=_0x439ee4['includes'](_0x3179fa['Vsugy']),_0x52c88e=_0x439ee4[_0x2d6a93(0x1be)](_0x3179fa['Rxkvm']);!_0x3bd17c&&!_0x52c88e&&_0x2bb531[_0x2d6a93(0x1b9)]('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x2bb531[_0x2d6a93(0x199)]===0x0)return null;return{'summary':_0x3179fa[_0x2d6a93(0x1ad)],'issues':_0x2bb531};}export function buildAgentEnv(_0x4dd938){const _0x4dbabe=_0x5e6740,_0xf44983={'hhZwa':'true','yPHBM':'TMP','uTZXW':function(_0x37810f,_0x5e0163,_0x3b54af){return _0x37810f(_0x5e0163,_0x3b54af);},'msTDK':'ranger-claude-tmp','BTyvz':'TMPDIR','EUrsh':function(_0x2042a5,_0x304f9b){return _0x2042a5==_0x304f9b;}};if(_0x4dd938[_0x4dbabe(0x1c2)])return Object[_0x4dbabe(0x1b4)](Object[_0x4dbabe(0x1b6)](process['env'])[_0x4dbabe(0x19a)](_0x31ae16=>typeof _0x31ae16[0x1]==='string'));if(!_0x4dd938[_0x4dbabe(0x193)])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x3b2bf4={'ANTHROPIC_API_KEY':_0x4dd938['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0xf44983['hhZwa']};for(const _0x392077 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x4a9dc7=process['env'][_0x392077];_0x4a9dc7&&![_0x4dbabe(0x1a3),_0xf44983[_0x4dbabe(0x1a6)],_0x4dbabe(0x18c)][_0x4dbabe(0x1be)](_0x392077)&&(_0x3b2bf4[_0x392077]=_0x4a9dc7);}const _0x2f7aa7=_0xf44983[_0x4dbabe(0x1b0)](join,tmpdir(),_0xf44983[_0x4dbabe(0x1c3)]);try{_0xf44983['uTZXW'](mkdirSync,_0x2f7aa7,{'recursive':!![]});}catch{}_0x3b2bf4[_0xf44983['BTyvz']]=_0x2f7aa7,_0x3b2bf4['TMP']=_0x2f7aa7,_0x3b2bf4['TEMP']=_0x2f7aa7;const _0x323aa3=parseCustomHeaders(process[_0x4dbabe(0x19c)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x599bbc=new Map(_0x323aa3),_0x37fe7d=new Set(_0x323aa3[_0x4dbabe(0x1a0)](([_0x48af66])=>_0x48af66[_0x4dbabe(0x1a1)]()));if(_0x4dd938['metadata'])for(const [_0x2de2ea,_0x3af997]of Object[_0x4dbabe(0x1b6)](_0x4dd938['metadata'])){if(_0xf44983[_0x4dbabe(0x189)](_0x3af997,null)||_0x3af997==='')continue;const _0x9a2b86='x-ranger-'+_0x2de2ea;!_0x37fe7d['has'](_0x9a2b86['toLowerCase']())&&(_0x599bbc[_0x4dbabe(0x198)](_0x9a2b86,_0x3af997),_0x37fe7d[_0x4dbabe(0x1bf)](_0x9a2b86['toLowerCase']()));}const _0x1d2572=Array['from'](_0x599bbc['entries']())[_0x4dbabe(0x1a0)](([_0x419305,_0x482635])=>_0x419305+':\x20'+_0x482635)[_0x4dbabe(0x1bb)]('\x0a');return _0x1d2572&&(_0x3b2bf4[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x1d2572),_0x3b2bf4;}
|